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
3,700
Nash Equilibria of Static Prediction Games Michael Br¨uckner Department of Computer Science University of Potsdam, Germany mibrueck@cs.uni-potsdam.de Tobias Scheffer Department of Computer Science University of Potsdam, Germany scheffer@cs.uni-potsdam.de Abstract The standard assumption of identically distributed training and test data is violated when an adversary can exercise some control over the generation of the test data. In a prediction game, a learner produces a predictive model while an adversary may alter the distribution of input data. We study single-shot prediction games in which the cost functions of learner and adversary are not necessarily antagonistic. We identify conditions under which the prediction game has a unique Nash equilibrium, and derive algorithms that will find the equilibrial prediction models. In a case study, we explore properties of Nash-equilibrial prediction models for email spam filtering empirically. 1 Introduction The assumption that training and test data are governed by identical distributions underlies many popular learning mechanisms. In a variety of applications, however, data at application time are generated by an adversary whose interests are in conflict with those of the learner. In computer and network security, fraud detection, and drug design, the distribution of data is changed – by a malevolent individual or under selective pressure – in response to the predictive model. An adversarial interaction between learner and data generator can be modeled as a single-shot game in which one player controls the predictive model whereas the other player exercises some control over the distribution of the input data. The optimal action for either player generally depends on both players’ moves. The minimax strategy minimizes the costs under the worst possible move of the opponent. This strategy is motivated for an opponent whose goal is to inflict the highest possible costs on the learner; it can also be applied when no information about the interests of the adversary is available. Lanckriet et al. [1] study the so called Minimax Probability Machine. This classifier minimizes the maximal probability of misclassifying new instances for a given mean and covariance matrix of each class. El Ghaoui et al. [2] study a minimax model for input data that are known to lie within some hyperrectangle. Their solution minimizes the worst-case loss over all possible choices of the data in these intervals. Similarly, minimax solutions to classification games in which the adversary deletes input features or performs a feature transformation have been studied [3, 4, 5]. These studies show that the minimax solution outperforms a learner that naively minimizes the costs on the training data without taking the adversary into account. When rational opponents aim at minimizing their personal costs, then the minimax solution is overly pessimistic. A Nash equilibrium is a pair of actions chosen such that no player gains a benefit by unilaterally selecting a different action. If a game has a unique Nash equilibrium, it is the strongest available concept of an optimal strategy in a game against a rational opponent. If, however, multiple equilibria exist and the players choose their action according to distinct ones, then the resulting combination may be arbitrarily disadvantageous for either player. It is therefore interesting to study whether adversarial prediction games have a unique Nash equilibrium. 1 We study games in which both players – learner and adversary – have cost functions that consist of data-dependent loss and regularizer. Contrasting prior results, we do not assume that the players’ cost functions are antagonistic. As an example, consider that a spam filter may minimize the error rate whereas a spam sender may aim at maximizing revenue solicited by spam emails. These criteria are conflicting, but not the exact negatives of each other. We study under which conditions unique Nash equilibria exist and derive algorithms for identifying them. The rest of this paper is organized as follows. Section 2 introduces the problem setting and defines action spaces and cost functions. We study the existence of a unique Nash equilibrium and derive an algorithm that finds it under defined conditions in Section 3. Section 4 discusses antagonistic loss functions. For this case, we derive an algorithm that finds a unique Nash equilibrium whenever it exists. Section 5 reports on experiments on email spam filtering; Section 6 concludes. 2 Modeling the Game We study prediction games between a learner (v = +1) and an adversary (v = −1). We consider static infinite games. Static or single-shot game means that players make decisions simultaneously; neither player has information about the opponent’s decisions. Infinite refers to continuous cost functions that leave players with infinitely many strategies to choose from. We constrain the players to select pure (i.e., deterministic) strategies. Mixed strategies and extensive-form games such as Stackelberg, Cournot, Bertrand, and repeated games are not within the scope of this work. Both players can access an input matrix of training instances X with outputs y, drawn according to a probability distribution q(X, y) = Qn i=1 q(xi, yi). The learner’s action a+1 ∈A+1 now is to choose parameters of a linear model ha+1(x) = a+1Tx. Simultaneously, the adversary chooses a transformation function φa−1 that maps any input matrix X to an altered matrix φa−1(X). This transformation induces a transition from input distribution q to test distribution qtest with q(X, y) = qtest(φa−1(X), y) = Qn i=1 qtest(φa−1(X)i, yi). Our main result uses a model that implements transformations as matrices a−1 ∈A−1 ⊆Rm×n. Transformation φa−1(X) = X + a−1 adds perturbation matrix a−1 to input matrix X, i.e., input pattern xi is subjected to a perturbation vector a−1,i. If, for instance, inputs are word vectors, the perturbation matrix adds and deletes words. The possible moves a = [a+1, a−1] constitute the joint action space A = A+1 × A−1 which is assumed to be nonempty, compact, and convex. Action spaces Av are parameters of the game. For instance, in spam filtering it is appropriate to constrain A−1 such that perturbation matrices contain zero vectors for non-spam messages; this reflects that spammers can only alter spam messages. Each pair of actions a incurs costs of θ+1(a) and θ−1(a), respectively, for the players. Each player has an individual loss function ℓv(y′, y) where y′ is the value of decision function ha+1 and y is the true label. Section 4 will discuss antagonistic loss functions ℓ+1 = −ℓ−1. However, our main contribution in Section 3 regards non-antagonistic loss functions. For instance, a learner may minimize the zero-one loss whereas the adversary may focus on the lost revenue. Both players aim at minimizing their loss over the test distribution qtest. But, since q and consequently qtest are unknown, the cost functions are regularized empirical loss functions over the sample φa−1(X) which reflects test distribution qtest. Equation 1 defines either player’s cost function as player-specific loss plus regularizer. The learner’s regularizer Ωa+1 will typically regularize the capacity of ha+1. Regularizer Ωa−1 controls the amount of distortion that the adversary may inflict on the data and thereby the extent to which an information payload has to be preserved. θv(av, a−v) = n X i=1 ℓv(ha+1(φa−1(X)i), yi) + Ωav (1) Each player’s cost function depends on the opponent’s parameter. In general, there is no value av that maximizes θv(av, a−v) independently of the opponent’s choice of a−v. The minimax solution arg minav maxa−v θv(av, a−v) minimizes the costs under the worst possible move of the opponent. This solution is optimal for a malicious opponent whose goal is to inflict maximally high costs on the learner. In absence of any information on the opponent’s goals, the minimax solution still gives the lowest upper bound on the learner’s costs over all possible strategies of the opponent. If both players – learner and adversary – behave rationally in the sense of minimizing their personal costs, then the Nash equilibrium is the strongest available concept of an optimal choice of av. A 2 Nash equilibrium is defined as a pair of actions a∗= [a∗ +1, a∗ −1] such that no player can benefit from changing the strategy unilaterally. That is, for both players v ∈{−1, +1}, θv(a∗ v, a∗ −v) = min av∈Av θv(av, a∗ −v). (2) The Nash equilibrium has several catches. Firstly, if the adversary behaves irrationally in the sense of inflicting high costs on the other player at the expense of incurring higher personal costs, then choosing an action according to the Nash equilibrium may result in higher costs than the minimax solution. Secondly, a game may not have an equilibrium point. If an equilibrium point exists, the game may thirdly possess multiple equilibria. If a∗= [a∗ +1, a∗ −1] and a′ = [a′ +1, a′ −1] are distinct equilibria, and each player decides to act according to one of them, then a combination [a∗ v, a′ −v] may be a poor joint strategy and may give rise to higher costs than a worst-case solution. However, if a unique Nash equilibrium exists and both players seek to minimize their individual costs, then the Nash equilibrium is guaranteed to be the optimal move. 3 Solution for Convex Loss Functions In this section, we study the existence of a unique Nash equilibrium of prediction games with cost functions as in Equation 1. We derive an algorithm that identifies the unique equilibrium if sufficient conditions are met. We consider regularized player-specific loss functions ℓv(y′, y) which are not assumed to satisfy the antagonicity criterion ℓ+1 = −ℓ−1. Both loss functions are, however, required to be convex and twice differentiable, and we assume strictly convex regularizers Ωav such as the l2-norm regularizer. Player- and instance-specific costs may be attached to the loss functions; however, we omit such cost factors for greater notational harmony. This section’s main result is that if both loss functions are monotonic in y′ with different monotonicities – that is, one is monotonically increasing, and one is decreasing for any fixed y – then the game has a unique Nash equilibrium that can be found efficiently. Theorem 1. Let the cost functions be defined as in Equation 1 with strictly convex regularizers Ωav, let action spaces Av be nonempty, compact, and convex subsets of finite-dimensional Euclidean spaces. If for any fixed y, both loss functions ℓv(y′, y) are monotonic in y′ ∈R with distinct monotonicity, convex in y′, and twice differentiable in y′, then a unique Nash equilibrium exists. Proof. The players’ regularizers Ωav are strictly convex, and both loss functions ℓv(ha+1(φa−1(X)i), yi) are convex and twice differentiable in av ∈Av for any fixed a−v ∈A−v. Hence, both cost functions θv are continuously differentiable and strictly convex, and according to Theorem 4.3 in [6], at least one Nash equilibrium exists. As each player has an own nonempty, compact, and convex action space Av, Theorem 2 of [7] applies as well; that is, if function σr(a) = rθ+1(a+1, a−1) + (1 −r)θ−1(a+1, a−1) (3) is diagonally strictly convex in a for some fixed 0 < r < 1, then a unique Nash equilibrium exists. A sufficient condition for σr(a) to be diagonally strictly convex is that matrix Jr(a) in Equation 4 is positive definite for any a ∈A (see Theorem 6 in [7]). This matrix Jr(a) = · r∇2 a+1a+1θ+1(a) r∇2 a+1a−1θ+1(a) (1 −r)∇2 a−1a+1θ−1(a) (1 −r)∇2 a−1a−1θ−1(a) ¸ (4) is the Jacobian of the pseudo-gradient of σr(a), that is, gr(a) = · r∇a+1θ+1(a) (1 −r)∇a−1θ−1(a) ¸ . (5) We want to show that Jr(a) is positive definite for some fixed r if both loss functions ℓv(y′, y) have distinct monotonicity and are convex in y′. Let ℓ′ v(y′, y) be the first and ℓ′′ v(y′, y) be the second derivative of ℓv(y′, y) with respect to y′. Let Ai denote the matrix where the i-th column is a+1 and all other elements are zero, let Γv be the diagonal matrix with diagonal elements γv,i = ℓ′′ v(ha+1(φa−1(X)i), yi), and we define µv,i = ℓ′ v(ha+1(φa−1(X)i), yi). Using these defini3 tions, the Jacobian of Equation 4 can be rewritten, Jr(a) =   φa−1(X) 0 0 A1 ... ... 0 An   · rΓ+1 rΓ+1 (1 −r)Γ−1 (1 −r)Γ−1 ¸   φa−1(X) 0 0 A1 ... ... 0 An   T +   r∇2Ωa+1 rµ+1,1I . . . rµ+1,nI (1 −r)µ−1,1I (1 −r)∇2Ωa−1 . . . 0 ... ... ... ... (1 −r)µ−1,nI 0 . . . (1 −r)∇2Ωa−1  . (6) The eigenvalues of the inner matrix of the first summand in Equation 6 are rγ+1,i +(1−r)γ−1,i and zero. Loss functions ℓv are convex in y′, that is, both second derivatives ℓ′′ v(y′, y) are non-negative for any y′ and consequently rγ+1,i + (1 −r)γ−1,i ≥0. Hence, the first summand of Jacobian Jr(a) is positive semi-definite for any choice of 0 < r < 1. Additionally, we can decompose the regularizers’ Hessians as follows: ∇2Ωav = λvI + (∇2Ωav −λvI), (7) where λv is the smallest eigenvalue of ∇2Ωav. As the regularizers are strictly convex, λv > 0 and the second summand in Equation 7 is positive semi-definite. Hence, it suffices to show that matrix   rλ+1I rµ+1,1I . . . rµ+1,nI (1 −r)µ−1,1I (1 −r)λ−1I . . . 0 ... ... ... ... (1 −r)µ−1,nI 0 . . . (1 −r)λ−1I   (8) is positive definite. We derive the eigenvalues of this matrix which assume only three different values; these are (1 −r)λ−1 and 1 2 µ rλ+1 + (1 −r)λ−1 ± q (rλ+1 −(1 −r)λ−1)2 + 4r(1 −r)µT +1µ−1 ¶ . (9) Eigenvalue (1−r)λ−1 is positive by definition. The others are positive if the value under the square root is non-negative and less than (rλ+1 + (1 −r)λ−1)2. The scalar product b = µT +1µ−1 is nonpositive as both loss functions ℓv(y′, y) are monotonic in y′ with distinct monotonicity, i.e., both derivatives have a different sign for any y′ ∈R and consequently b ≤0. This implies that the value under the square root is less or equal to (rλ+1 −(1 −r)λ−1)2 < (rλ+1 + (1 −r)λ−1)2. In addition, b is bounded from below as action spaces Av, and therefore the value of ha+1(φa−1(X)i), is bounded. Let b = infa∈A µT +1µ−1 be such a lower bound with −∞< b ≤0. We solve for r such that the value under the square root in Equation 9 attains a non-negative value, that is, 0 < r ≤ (λ+1 + λ−1)λ−1 −2b −2 q b2 −λ+1λ−1b (λ+1 + λ−1)2 −4b (10) or alternatively (λ+1 + λ−1)λ−1 −2b + 2 q b2 −λ+1λ−1b (λ+1 + λ−1)2 −4b ≤r < 1. (11) For any λ+1, λ−1 > 0 there are values r that satisfy Inequality 10 or 11 because, for any fixed b ≤0, 0 < (λ+1 + λ−1)λ−1 −2b ± 2 q b2 −λ+1λ−1b < (λ+1 + λ−1)2 −4b. (12) For such r all eigenvalues in Equation 9 are strictly positive which completes the proof. According to Theorem 1, a unique Nash equilibrium exists for suitable loss functions such as the squared hinge loss, logistic loss, etc. To find this equilibrium, we make use of the weighted NikaidoIsoda function (Equation 13). Intuitively, Ψrv(a, b) quantifies the weighted sum of the relative cost savings that the players can enjoy by changing from strategy av to strategy bv while their opponent continues to play a−v. Equation 14 defines the value function Vrv(a) as the weighted sum of greatest 4 possible cost savings attainable by changing from a to any strategy unilaterally. By these definitions, a∗is a Nash equilibrium if, and only if, Vrv(a∗) is a global minimum of the value function with Vrv(a∗) = 0 for any fixed weights r+1 = r and r−1 = 1 −r, where 0 < r < 1. Ψrv(a, b) = X v∈{+1,−1} rv(θv(av, a−v) −θv(bv, a−v)) (13) Vrv(a) = max b∈A Ψrv(a, b) (14) To find this global minimum of Vrv(a) we make use of Corollary 3.4 of [8]. The weights rv are fixed scaling factors of the players’ objectives which do not affect the Nash equilibrium in Equation 2; however, these weights ensure the main condition of Corollary 3.4, that is, the positive definiteness of the Jacobian Jr(a) in Equation 4. According to this corollary, vector d = bb −a is a descent direction for the value function at any position a, where bb is the maximizing argument bb = arg maxb∈A Ψrv(a, b). In addition, the convexity of A ensures that any point a + td with t ∈[0, 1] (i.e., a point between a and bb) is a valid pair of actions. Algorithm 1 Nash Equilibrium of Games with Convex Loss Functions Require: Cost functions θv as defined in Equation 1 and action spaces Av. 1: Select initial a0 ∈A+1 × A−1, set k := 0, and choose r that satisfies Inequality 10 or 11. 2: repeat 3: Set bk := arg maxb∈A+1×A−1 Ψrv(ak, b) where Ψrv is defined in Equation 13. 4: Set dk := bk −ak. 5: Find maximal step size tk ∈{2−l : l ∈N} with Vrv(ak + tkdk) ≤Vrv(ak) −ϵ∥tkdk∥2. 6: Set ak+1 := ak + tkdk and k := k + 1. 7: until ∥ak −ak−1∥≤ϵ. Algorithm 1 exploits these properties and finds the global minimum of Vrv and thereby the unique Nash equilibrium, under the preconditions of Theorem 1. Convergence follows from the fact that if in the k-th iteration dk = 0, then ak is a Nash equilibrium which is unique according to Theorem 1. If dk ̸= 0, then dk is a descent direction of Vrv at position ak. Together with term ϵ∥tkdk∥2, this ensures Vrv(ak+1) < Vrv(ak), and as value function Vrv is bounded from below, Algorithm 1 converges to the global minimum of Vrv. Note that r only controls the convergence rate, but has no influence on the solution. Any value of r that satisfies Inequality 10 or 11 ensures convergence. 4 Solution for Antagonistic Loss Functions Algorithm 1 is guaranteed to identify the unique equilibrium if the loss functions are convex, twice differentiable, and of distinct monotonicities. We will now study the case in which the learner’s cost function is continuous and convex, and the adversary’s loss function is antagonistic to the learner’s loss, that is, ℓ+1 = −ℓ−1. We abstain from making assumptions about the adversary’s regularizers. Because of the regularizers, the game is still not a zero-sum game. In this setting, a unique Nash equilibrium cannot be guaranteed to exist because the adversary’s cost function is not necessarily strictly convex. However, an individual game may still possess a unique Nash equilibrium, and we can derive an algorithm that identifies it whenever it exists. The symmetry of the loss functions simplifies the players’ cost functions in Equation 1 to θ+1(a+1, a−1) = n X i=1 ℓ+1(ha+1(φa−1(X)i), yi) + Ωa+1, (15) θ−1(a−1, a+1) = − n X i=1 ℓ+1(ha+1(φa−1(X)i), yi) + Ωa−1. (16) Even though the loss functions are antagonistic, the cost functions in Equations 15 and 16 are not, unless the player’s regularizers are antagonistic as well. Hence, the game is not a zero-sum game. However, according to Theorem 2, if the game has a unique Nash equilibrium, then this equilibrium is a minimax solution of the zero-sum game defined by the joint cost function of Equation 17. 5 Theorem 2. If the game with cost functions θ+1 and θ−1 defined in Equations 15 and 16 has a unique Nash equilibrium a∗, then this equilibrium also satisfies a∗ = arg mina+1 maxa−1 θ0(a+1, a−1) where θ0(a+1, a−1) = Xn i=1 ℓ+1(ha+1(φa−1(X)i), yi) + Ωa+1 −Ωa−1. (17) The proof can be found in the appendix. As a consequence of Theorem 2, we can identify the unique Nash equilibrium of the game with cost functions θ+1 and θ−1, if it exists, by finding the minimax solution of the game with joint cost function θ0. The minimax solution is given by a∗ +1 = arg min a+1∈A+1 max a−1∈A−1 θ0(a+1, a−1). (18) To solve this optimization problem, we define bθ0(a+1) = θ0(a+1, ba−1) to be the function of a+1 where ba−1 is set to the value ba−1 = arg maxa−1 θ0(a+1, a−1). Since cost function θ0 is continuous in its arguments, convex in a+1, and A−1 is a compact set, Danskin’s Theorem [9] implies that bθ0 is convex in a+1 with gradient ∇bθ0(a+1) = ∇a+1θ0(a+1, ba−1). (19) The significance of Danskin’s Theorem is that when calculating the gradient ∇a+1θ0(a+1, ba−1) at position a+1, argument ba−1 acts as a constant in the derivative instead of as a function of a+1. The convexity of bθ0(a+1) suggests the gradient descent method implemented in Algorithm 2. It identifies the unique Nash equilibrium of a game with antagonistic loss functions, if it exists, by finding the minimax solution of the game with joint cost function θ0. Algorithm 2 Nash Equilibrium of Games with Antagonistic Loss Functions Require: Joint cost function θ0 as defined in Equation 17 and action spaces Av. 1: Select initial a0 +1 ∈A+1 and set k := 0. 2: repeat 3: Set ak −1 := arg maxa−1∈A−1 θ0(ak +1, a−1). 4: Set dk := −∇ak +1θ0(ak +1, ak −1). 5: Find maximal step size tk ∈{2−l : l ∈N} with θ0(ak +1 + tkdk, ak −1) ≤θ0(ak +1, ak −1) −ϵ∥tkdk∥2. 6: Set ak+1 +1 := ak +1 + tkdk and k := k + 1. 7: Project ak +1 to the admissible set A+1, if necessary. 8: until ∥ak +1 −ak−1 +1 ∥≤ϵ A minimax solution arg mina+1 maxa−1 θ+1(a+1, a−1) of the learner’s cost function minimizes the learner’s costs when playing against the most malicious opponent; for instance, Invar-SVM [4] finds such a solution. By contrast, the minimax solution arg mina+1 maxa−1 θ0(a+1, a−1) of the joint cost function as defined in Equation 17 constitutes a Nash equilibrium of the game with cost functions θ+1 and θ−1, defined in Equations 15 and 16. It minimizes the costs for each of two players that seek their personal advantage. Algorithmically, Invar-SVM and Algorithm 2 are very similar; the main difference lies in the optimization criteria and the resulting properties of the solution. 5 Experiments We study the problem of email spam filtering where the learner tries to identify spam emails while the adversary conceals spam messages in order to penetrate the filter. Our goal is to explore the relative strengths and weaknesses of the proposed Nash models for antagonistic and non-antagonistic loss functions and existing baseline methods. We compare a regular SVM, logistic regression, SVM with Invariances (Invar-SVM, [4]), the Nash equilibrium for antagonistic loss functions found by identifying the minimax solution of the joint cost function (Minimax, Algorithm 2), and the Nash equilibrium for convex loss functions (Nash, Algorithm 1). 6 0.988 0.992 0.996 1 1 5 10 20 40 80 120 160 AUC K Amount of Transformation vs. Accuracy SVM LogReg Invar-SVM 0.988 0.992 0.996 1 0.5 0.1 0.05 0.02 0.01 0.0050.0020.001 AUC λ−1 Amount of Transformation vs. Accuracy SVM LogReg Minimax 0.988 0.992 0.996 1 5 1 0.5 0.1 0.05 0.01 0.005 AUC λ−1 Amount of Transformation vs. Accuracy SVM LogReg Nash Figure 1: Adversary’s regularization parameter and AUC on test data (private emails). We use the logistic loss as the learner’s loss function ℓ+1(h(x), y) = log(1 + e−yh(x)) for the Minimax and the Nash model. Consequently, the adversary’s loss for the Minimax solution is the negative loss of the learner. In the Nash model, we choose ℓ−1(h(x), y) = log(1 + eyh(x)) which is a convex approximation of the adversary’s zero-one loss, that is, correct predictions by the learner incur high costs for the adversary. We use the additive transformation model φa−1(X)i = xi+a−1,i as defined in Section 2. For spam emails xi, we impose box constraints −1 2xi ≤a−1,i ≤1 2xi on the adversary’s parameters; for non-spam we set a−1,i = 0. That is, the spam sender can only transform spam emails. This model is equivalent to the component-wise scaling model [4] with scaling factors between 0.5 and 1.5, and ensures that the adversary’s action space is nonempty, compact, and convex. We use l2-norm regularizers for both players, that is, Ωav = λv 2 ∥av∥2 2 where λv is the regularization parameter of player v. For the Nash model we set r to the mean of the interval defined by Inequality 11, where b = −n 4 is a lower bound for the chosen logistic loss and regularization parameters λv are identical to the smallest eigenvalues of ∇2Ωav. We use two email corpora: the first contains 65,000 publicly available emails received between 2000 and 2002 from the Enron corpus, the SpamAssassin corpus, Bruce Guenter’s spam trap, and several mailing lists. The second contains 40,000 private emails received between 2000 and 2007. All emails are binary word vectors of dimensionality 329,518 and 160,981, respectively. The emails are sorted chronologically and tagged with label, date, and size. The preprocessed corpora are available from the authors. We cannot use a standard TREC corpus because there the delivery dates of the spam messages have been fabricated, and our experiments require the correct chronological order. Our evaluation protocol is as follows. We use the 6,000 oldest instances as training portion and set the remaining emails aside as test instances. We use the area under the ROC curve as a fair evaluation metric that is adequate for the application; error bars indicate the standard error. We train all methods 20 times for the first experiment and 50 times for the following experiments on a subset of 200 messages drawn at random from the training portion and average the AUC values on the test set. In order to tune both players’ regularization parameters, we conduct a grid search maximizing the AUC for 5-fold cross validation on the training portion. In the first experiment, we explore the impact of the regularization parameter of the transformation model, i.e., λ−1 for our models and K – the maximal number of alterable attributes – for Invar-SVM. Figure 1 shows the averaged AUC value on the private corpus’ test portion. The crosses indicate the parameter values found by the grid search with cross validation on the training data. In the next experiment, we evaluate all methods into the future by processing the test set in chronological order. Figure 2 shows that Invar-SVM, Minimax, and the Nash solution outperform the regular SVM and logistic regression significantly. For the public data set, Minimax performs slightly better than Nash; for the private corpus, there is no significant difference between the solutions of Minimax and Nash. For both data sets, the l2-regularization gives Minimax and Nash an advantage over Invar-SVM. Recall that Minimax refers to the Nash equilibrium for antagonistic loss functions found by solving the minimax problem for the joint cost function (Algorithm 2). In this setting, loss functions – but not cost functions – are antagonistic; hence, Nash cannot gain an advantage over Minimax. Figure 2 (right hand side) shows the execution time of all methods. Regular SVM and logistic regression are faster than the game models; the game models behave comparably. Finally, we explore a setting with non-antagonistic loss. We weight the loss functions with playerand instance specific factors cv,i, that is, ℓc v(ha+1(φa−1(X)i), yi) = cv,iℓv(ha+1(φa−1(X)i), yi). 7 0.98 0.99 1 present 20,000 40,000 future AUC t emails received after training Accuracy over Time (65,000 Public Emails) 0.985 0.99 0.995 1 present 10,000 20,000 future AUC t emails received after training Accuracy over Time (40,000 Private Emails) SVM LogReg Invar-SVM Minimax Nash 0.1 1 10 100 1000 10000 100 400 1,600 6,200 time in sec number of training emails Execution Time Figure 2: Left, center: AUC evaluated into the future after training on past. Right: execution time. 70 75 80 85 90 95 0.84 0.88 0.92 0.96 required storage in MB non-spam recall Storage Costs vs. Accuracy (65,000 Public Emails) SVM SVM with costs LogReg LogReg with costs Invar-SVM Minimax Nash Nash with costs 38 39 40 41 42 43 44 45 0.92 0.94 0.96 0.98 required storage in MB non-spam recall Storage Costs vs. Accuracy (40,000 Private Emails) Figure 3: Average storage costs versus non-spam recall. Our model reflects that an email service provider may delete detected spam emails after a latency period whereas other emails incur storage costs c+1,i proportional to their file size. The spam sender’s costs are c−1,i = 1 for all spam instances and c−1,i = 0 for all non-spam instances. The classifier threshold balances a trade-off between non-spam recall (fraction of legitimate emails delivered) and storage costs. For a threshold of −∞, storage costs and non-spam recall are zero for all decision functions. Likewise, a threshold of ∞gives a recall of 1, but all emails have to be stored. Figure 3 shows this trade-off for all methods. The Nash prediction model behaves most favorably: it outperforms all reference methods for almost all threshold values, often by several standard errors. Invar-SVM and Minimax cannot reflect differing costs for learner and adversary in their optimization criteria and therefore perform worse. Logistic regression and the SVM with costs perform better than their counterparts without costs, but worse than the Nash model. 6 Conclusion We studied games in which each player’s cost function consists of a data-dependent loss and a regularizer. A learner produces a linear model while an adversary chooses a transformation matrix to be added to the data matrix. Our main result regards regularized non-antagonistic loss functions that are convex, twice differentiable, and have distinct monotonicity. In this case, a unique Nash equilibrium exists. It minimizes the costs of each of two players that aim for their highest personal benefit. We derive an algorithm that identifies the equilibrium under these conditions. For the case of antagonistic loss functions with arbitrary regularizers a unique Nash equilibrium may or may not exist. We derive an algorithm that finds the unique Nash equilibrium, if it exists, by solving a minimax problem on a newly derived joint cost function. We evaluate spam filters derived from the different optimization problems on chronologically ordered future emails. We observe that game models outperform the reference methods. In a setting with player- and instance-specific costs, the Nash model for non-antagonistic loss functions excels because this setting is poorly modeled with antagonistic loss functions. Acknowledgments We gratefully acknowledge support from STRATO AG. 8 References [1] Gert R. G. Lanckriet, Laurent El Ghaoui, Chiranjib Bhattacharyya, and Michael I. Jordan. A robust minimax approach to classification. Journal of Machine Learning Research, 3:555–582, 2002. [2] Laurent El Ghaoui, Gert R. G. Lanckriet, and Georges Natsoulis. Robust classification with interval data. Technical Report UCB/CSD-03-1279, EECS Department, University of California, Berkeley, 2003. [3] Amir Globerson and Sam T. Roweis. Nightmare at test time: robust learning by feature deletion. In Proceedings of the International Conference on Machine Learning, 2006. [4] Choon Hui Teo, Amir Globerson, Sam T. Roweis, and Alex J. Smola. Convex learning with invariances. In Advances in Neural Information Processing Systems, 2008. [5] Amir Globerson, Choon Hui Teo, Alex J. Smola, and Sam T. Roweis. Dataset Shift in Machine Learning, chapter An adversarial view of covariate shift and a minimax approach, pages 179– 198. MIT Press, 2009. [6] Tamer Basar and Geert J. Olsder. Dynamic Noncooperative Game Theory. Society for Industrial and Applied Mathematics, 1999. [7] J. B. Rosen. Existence and uniqueness of equilibrium points for concave n-person games. Econometrica, 33(3):520–534, 1965. [8] Anna von Heusinger and Christian Kanzow. Relaxation methods for generalized Nash equilibrium problems with inexact line search. Journal of Optimization Theory and Applications, 143(1):159–183, 2009. [9] John M. Danskin. The theory of max-min, with applications. SIAM Journal on Applied Mathematics, 14(4):641–664, 1966. 9
2009
198
3,701
Robust Principal Component Analysis: Exact Recovery of Corrupted Low-Rank Matrices by Convex Optimization John Wright∗, Yigang Peng, Yi Ma Visual Computing Group Microsoft Research Asia {jowrig,v-yipe,mayi}@microsoft.com Arvind Ganesh, Shankar Rao Coordinated Science Laboratory University of Illinois at Urbana-Champaign {abalasu2,srrao}@uiuc.edu Abstract Principal component analysis is a fundamental operation in computational data analysis, with myriad applications ranging from web search to bioinformatics to computer vision and image analysis. However, its performance and applicability in real scenarios are limited by a lack of robustness to outlying or corrupted observations. This paper considers the idealized “robust principal component analysis” problem of recovering a low rank matrix A from corrupted observations D = A + E. Here, the corrupted entries E are unknown and the errors can be arbitrarily large (modeling grossly corrupted observations common in visual and bioinformatic data), but are assumed to be sparse. We prove that most matrices A can be efficiently and exactly recovered from most error sign-and-support patterns by solving a simple convex program, for which we give a fast and provably convergent algorithm. Our result holds even when the rank of A grows nearly proportionally (up to a logarithmic factor) to the dimensionality of the observation space and the number of errors E grows in proportion to the total number of entries in the matrix. A by-product of our analysis is the first proportional growth results for the related problem of completing a low-rank matrix from a small fraction of its entries. Simulations and real-data examples corroborate the theoretical results, and suggest potential applications in computer vision. 1 Introduction The problem of finding and exploiting low-dimensional structure in high-dimensional data is taking on increasing importance in image, audio and video processing, web search, and bioinformatics, where datasets now routinely lie in thousand- or even million-dimensional observation spaces. The curse of dimensionality is in full play here: meaningful inference with limited number of observations requires some assumption that the data have low intrinsic complexity, e.g., that they are low-rank [1], sparse in some basis [2], or lie on some low-dimensional manifold [3, 4]. Perhaps the simplest useful assumption is that the observations all lie near some low-dimensional subspace. In other words, if we stack all the observations as column vectors of a matrix M ∈Rm×n, the matrix should be (approximately) low rank. Principal component analysis (PCA) [1, 5] seeks the best (in an ℓ2-sense) such low-rank representation of the given data matrix. It enjoys a number of optimality properties when the data are only mildly corrupted by small noise, and can be stably and efficiently computed via the singular value decomposition. ∗For more information, see http://perception.csl.illinois.edu/matrix-rank/home.html. This work was partially supported by NSF IIS 08-49292, NSF ECCS 07-01676, and ONR N00014-09-1-0230. 1 One major shortcoming of classical PCA is its brittleness with respect to grossly corrupted or outlying observations [5]. Gross errors are ubiquitous in modern applications in imaging and bioinformatics, where some measurements may be arbitrarily corrupted (e.g., due to occlusion or sensor failure) or simply irrelevant to the structure we are trying to identify. A number of natural approaches to robustifying PCA have been explored in the literature. These approaches include influence function techniques [6, 7], multivariate trimming [8], alternating minimization [9], and random sampling techniques [10]. Unfortunately, none of these existing approaches yields a polynomial-time algorithm with strong performance guarantees.1 In this paper, we consider an idealization of the robust PCA problem, in which the goal is to recover a low-rank matrix A from highly corrupted measurements D = A + E. The errors E can be arbitrary in magnitude, but are assumed to be sparsely supported, affecting only a fraction of the entries of D. This should be contrasted with the classical setting in which the matrix A is perturbed by small (but densely supported) noise. In that setting, classical PCA, computed via the singular value decomposition, remains optimal if the noise is Gaussian. Here, on the other hand, even a small fraction of large errors can cause arbitrary corruption in PCA’s estimate of the low rank structure, A. Our approach to robust PCA is motivated by two recent, and tightly related, lines of research. The first set of results concerns the robust solution of over-determined linear systems of equations in the presence of arbitrary, but sparse errors. These results imply that for generic systems of equations, it is possible to correct a constant fraction of arbitrary errors in polynomial time [11]. This is achieved by employing the ℓ1-norm as a convex surrogate for the highly-nonconvex ℓ0-norm. A parallel (and still emerging) line of work concerns the problem of computing low-rank matrix solutions to underdetermined linear equations [12, 13]. One of the most striking results concerns the exact completion of low-rank matrices from only a small fraction of their entries [13, 14, 15, 16].2 There, a similar convex relaxation is employed, replacing the highly non-convex matrix rank with the nuclear norm (or sum of singular values). The robust PCA problem outlined above combines aspects of both of these lines of work: we wish to recover a low-rank matrix from large but sparse errors. We will show that combining the solutions to the above problems (nuclear norm minimization for low-rank recovery and ℓ1-minimization for error correction) yields a polynomial-time algorithm for robust PCA that provably succeeds under broad conditions: With high probability, solving a simple convex program perfectly recovers a generic matrix A ∈Rm×m of rank as large as C m log(m), from errors affecting up to a constant fraction of the m2 entries. This conclusion holds with high probability as the dimensionality m increases, implying that in high-dimensional observation spaces, sparse and low-rank structures can be efficiently and exactly separated. This behavior is an example of the so-called the blessing of dimensionality [17]. However, this result would remain a theoretical curiosity without scalable algorithms for solving the associated convex program. To this end, we discuss how a near-solution to this convex program can be obtained relatively efficiently via proximal gradient [18, 19] and iterative thresholding techniques, similar to those proposed for matrix completion in [20, 21]. For large matrices, these algorithms are significantly faster and more scalable than general-purpose convex program solvers. Our analysis also implies an extension of existing results for the low-rank matrix completion problem, and including the first results applicable to the proportional growth setting where the rank of the matrix grows as a constant (non-vanishing) fraction of the dimensionality: With overwhelming probability, solving a simple convex program perfectly recovers a generic matrix A ∈Rm×m of rank as large as Cm, from observations consisting of only a fraction ρm2 (ρ < 1) of its entries. 1Random sampling approaches guarantee near-optimal estimates, but have complexity exponential in the rank of the matrix A0. Trimming algorithms have comparatively lower computational complexity, but guarantee only locally optimal solutions. 2A major difference between robust PCA and low-rank matrix completion is that here we do not know which entries are corrupted, whereas in matrix completion the support of the missing entries is given. 2 Organization of this paper. This paper is organized as follows. Section 2 formulates the robust principal component analysis problem more precisely and states the main results of this paper, placing these results in the context of existing work. The proof (available in [22]) relies on standard ideas from linear algebra and concentration of measure, but is beyond the scope of this paper. Section 3 extends existing proximal gradient techniques to give a simple, scalable algorithm for solving the robust PCA problem. In Section 4, we perform simulations and experiments corroborating the theoretical results and suggesting their applicability to real-world problems in computer vision. Finally, in Section 5, we outline several promising directions for future work. 2 Problem Setting and Main Results We assume that the observed data matrix D ∈Rm×n was generated by corrupting some of the entries of a low-rank matrix A ∈Rm×n. The corruption can be represented as an additive error E ∈Rm×n, so that D = A + E. Because the error affects only a portion of the entries of D, E is a sparse matrix. The idealized (or noise-free) robust PCA problem can then be formulated as follows: Problem 2.1 (Robust PCA). Given D = A + E, where A and E are unknown, but A is known to be low rank and E is known to be sparse, recover A. This problem formulation immediately suggests a conceptual solution: seek the lowest rank A that could have generated the data, subject to the constraint that the errors are sparse: ∥E∥0 ≤k. The Lagrangian reformulation of this optimization problem is min A,E rank(A) + γ∥E∥0 subj A + E = D. (1) If we could solve this problem for appropriate γ, we might hope to exactly recover the pair (A0, E0) that generated the data D. Unfortunately, (1) is a highly nonconvex optimization problem, and no efficient solution is known.3 We can obtain a tractable optimization problem by relaxing (1), replacing the ℓ0-norm with the ℓ1-norm, and the rank with the nuclear norm ∥A∥∗= P i σi(A), yielding the following convex surrogate: min A,E ∥A∥∗+ λ∥E∥1 subj A + E = D. (2) This relaxation can be motivated by observing that ∥A∥∗+ λ∥E∥1 is the convex envelope of rank(A) + λ∥E∥0 over the set of (A, E) such that max(∥A∥2,2, ∥E∥1,∞) ≤1. Moreover, recent advances in our understanding of the nuclear norm heuristic for low-rank solutions to matrix equations [12, 13] and the ℓ1 heuristic for sparse solutions to underdetermined linear systems [11, 24], suggest that there might be circumstances under which solving the tractable problem (2) perfectly recovers the low-rank matrix A0. The main result of this paper will be to show that this is indeed true under surprisingly broad conditions. A sketch of the result is as follows: For “almost all” pairs (A0, E0) consisting of a low-rank matrix A0 and a sparse matrix E0, (A0, E0) = arg min A,E ∥A∥∗+ λ∥E∥1 subj A + E = A0 + E0, and the minimizer is uniquely defined. That is, under natural probabilistic models for low-rank and sparse matrices, almost all observations D = A0 + E0 generated as the sum of a low-rank matrix A0 and a sparse matrix E0 can be efficiently and exactly decomposed into their generating parts by solving a convex program.4 Of course, this is only possible with an appropriate choice of the regularizing parameter λ > 0. From the optimality conditions for the convex program (2), it is not difficult to show that for matrices D ∈Rm×m, the correct scaling is λ = O m−1/2 . Throughout this paper, unless otherwise stated, we will fix λ = m−1/2. For simplicity, all of our results in this paper will be stated for square matrices D ∈Rm×m, although there is little difficulty in extending them to non-square matrices. 3In a sense, this problem subsumes both the low rank matrix completion problem and the ℓ0-minimization problem, both of which are NP-hard and hard to approximate [23]. 4Notice that this is not an “equivalence” result for (1) and (2) – rather than asserting that the solutions of these two problems are equal with high probability, we directly prove that the convex program correctly decomposes D = A0 + E0 into (A0, E0). A natural conjecture, however, is that under the conditions of our main result, (A0, E0) is also the solution to (1) for some choice of γ. 3 It should be clear that not all matrices A0 can be successfully recovered by solving the convex program (2). Consider, e.g., the rank-1 case where U = [ei] and V = [ej]. Without additional prior knowledge, the low-rank matrix A = USV ∗cannot be recovered from even a single gross error. We therefore restrict our attention to matrices A0 whose row and column spaces are not aligned with the standard basis. This can be done probabilistically, by asserting that the marginal distributions of U and V are uniform on the Stiefel manifold Wm r : Definition 2.2 (Random orthogonal model [13]). We consider a matrix A0 to be distributed according to the random orthogonal model of rank r if its left and right singular vectors are independent uniformly distributed m×r matrices with orthonormal columns.5 In this model, the nonzero singular values of A0 can be arbitrary. Our model for errors is similarly natural: each entry of the matrix is independently corrupted with some probability ρs, and the signs of the corruptions are independent Rademacher random variables. Definition 2.3 (Bernoulli error signs and support). We consider an error matrix E0 to be drawn from the Bernoulli sign and support model with parameter ρs if the entries of sign(E0) are independently distributed, each taking on value 0 with probability 1 −ρs, and ±1 with probability ρs/2 each. In this model, the magnitude of the nonzero entries in E0 can be arbitrary. Our main result is the following (see [22] for a proof): Theorem 2.4 (Robust recovery from non-vanishing error fractions). For any p > 0, there exist constants (C⋆ 0 > 0, ρ⋆ s > 0, m0) with the following property: if m > m0, (A0, E0) ∈Rm×m × Rm×m with the singular spaces of A0 ∈Rm×m distributed according to the random orthogonal model of rank r ≤C⋆ 0 m log(m) (3) and the signs and support of E0 ∈Rm×m distributed according to the Bernoulli sign-and-support model with error probability ≤ρ⋆ s, then with probability at least 1 −Cm−p (A0, E0) = arg min ∥A∥∗+ 1 √m∥E∥1 subj A + E = A0 + E0, (4) and the minimizer is uniquely defined. In other words, matrices A0 whose singular spaces are distributed according to the random orthogonal model can, with probability approaching one, be efficiently recovered from almost all corruption sign and support patterns without prior knowledge of the pattern of corruption. Our line of analysis also implies strong results for the matrix completion problem studied in [13, 15, 14, 16]. We again refer the interested reader to [22] for a proof of the following result: Theorem 2.5 (Matrix completion in proportional growth). There exist numerical constants m0, ρ⋆ r, ρ⋆ s, C all > 0, with the following property: if m > m0 and A0 ∈Rm×m is distributed according to the random orthogonal model of rank r ≤ρ⋆ r m, (5) and Υ ⊂[m] × [m] is an independently chosen subset of [m] × [m] in which the inclusion of each pair (i, j) is an independent Bernoulli(1−ρs) random variable with ρs ≤ρ⋆ s, then with probability at least 1 −exp (−Cm), A0 = arg min ∥A∥∗ subj A(i, j) = A0(i, j) ∀(i, j) ∈Υ, (6) and the minimizer is uniquely defined. Relationship to existing work. Contemporaneous results due to [25] show that for A0 distributed according to the random orthogonal model, and E0 with Bernoulli support, correct recovery occurs with high probability provided ∥E0∥0 ≤C m1.5 log(m)−1 max(r, log m)−1/2. (7) This is an interesting result, especially since it makes no assumption on the signs of the errors. However, even for constant rank r it guarantees correction of only a vanishing fraction o(m1.5) ≪ 5I.e., distributed according to the Haar measure on the Stiefel manifold Wm r . 4 m2 of errors. In contrast, our main result, Theorem 2.4, states that even if r grows proportional to m/ log(m), non-vanishing fractions of errors are corrected with high probability. Both analyses start from the optimality condition for the convex program (2). The key technical component of this improved result is a probabilistic analysis of an iterative refinement technique for producing a dual vector that certifies optimality of the pair (A0, E0). This approach extends techniques used in [11, 26], with additional care required to handle an operator norm constraint arising from the presence of the nuclear norm in (2). For further details we refer the interested reader to [22]. Finally, while Theorem 2.5 is not the main focus of this paper, it is interesting in light of results by [15]. That work proves that in the probabilistic model considered here, a generic m × m rank-r matrix can be efficiently and exactly completed from a subset of only Cmr log8(m) (8) entries. For r > m polylog(m), this bound exceeds the number m2 of possible observations. A similar result for spectral methods [14] gives exact completion from O(m log(m)) measurements when r = O(1). In contrast, our Theorem 2.5 implies that for certain scenarios with r as large as ρrm, the matrix can be completed from a subset of (1 −ρs)m2 entries. For matrices of large rank, this is a significant extension of [15]. However, our result does not supersede (8) for smaller ranks. 3 Scalable Optimization for Robust PCA There are a number of possible approaches to solving the robust PCA semidefinite program (2). For small problem sizes, interior point methods offer superior accuracy and convergence rates. However, off-the-shelf interior point solvers become impractical for data matrices larger than about 70 × 70, due to the O(m6) complexity of solving for the step direction. For the experiments in this paper we use an alternative first-order method based on the proximal gradient approach of [18],6 which we briefly introduce here. For further discussion of this approach, as well as alternatives based on duality, please see [27]. This algorithm solves a slightly relaxed version of (2), in which the equality constraint is replaced with a penalty term: min µ∥A∥∗+ λµ∥E∥1 + 1 2∥D −A −E∥2 F . (9) Here, µ is a small constant; as µ ↘0, the solutions to (9) approach the solution set of (2). The approach of [18] minimizes functions of this type by forming separable quadratic approximations to the data fidelity term ∥D−A−E∥2 F at a special set of points ( ˜Ak, ˜Ek) that are conspicuously chosen to obtain a convergence rate of O k−2 . The solutions to these subproblems, Ak+1 = arg min A µ∥A∥∗+ A −  ˜Ak −1 4∇A∥D −A −E∥2 F ˜ Ak, ˜ Ek  2 F , (10) Ek+1 = arg min E λµ∥E∥1 + E −  ˜Ek −1 4∇E∥D −A −E∥2 F ˜ Ak, ˜ Ek  2 F , (11) can be efficiently computed via the soft thresholding operator (for E) and the singular value thresholding operator (for A, see [20]). We terminate the iteration when the subgradient  ˜Ak −Ak+1 + Ek+1 −˜Ek, ˜Ek −Ek+1 + Ak+1 −˜Ak  ∈ ∂ µ∥A∥∗+ λµ∥E∥1 + 1 2∥D −A −E∥2 F  Ak+1,Ek+1 has sufficiently small Frobenius norm.7 In practice, convergence speed is dramatically improved by employing a continuation strategy in which µ starts relatively large and then decreases geometrically at each iteration until reaching a lower bound, ¯µ (as in [21]). The entire procedure is summarized as Algorithm 1 below. We encourage the interested reader to consult [18] for a more detailed explanation of the choice of the proximal points ( ˜Ak, ˜Ek), as well as a convergence proof ([18] Theorem 4.1). As we will see in the next section, in practice the total number of iterations is often as small as 200. Since the dominant cost of each iteration is computing the singular value decomposition, this means that it is often possible to obtain a provably robust PCA with only a constant factor more computational resources than required for conventional PCA. 6That work is similar in spirit to the work of [19], and has also applied to matrix completion in [21]. 7More precisely, as suggested in [21], we terminate when the norm of this subgradient is less than 2 max(1, ∥(Ak+1, Ek+1)∥F ) × τ. In our experiments, we set τ = 10−7. 5 Algorithm 1: Robust PCA via Proximal Gradient with Continuation 1: Input: Observation matrix D ∈Rm×n, weight λ. 2: A0, A−1 ←0, E0, E−1 ←0, t0, t−1 ←1, µ0 ←.99∥D∥2,2, ¯µ ←10−5µ0. 3: while not converged 4: ˜Ak ←Ak + tk−1−1 tk (Ak −Ak−1), ˜Ek ←Ek + tk−1−1 tk (Ek −Ek−1). 5: Y A k ←˜Ak −1 2  ˜Ak + ˜Ek −D  . 6: (U, S, V ) ←svd(Y A k ), Ak+1 ←U  S −µ 2 I  + V ∗. 7: Y E k ←˜Ek −1 2  ˜Ak + ˜Ek −D  . 8: Ek+1 ←sign[Y E k ] ◦ h |Y E k | −λµ 2 11∗i +. 9: tk+1 ← 1+√ 1+4t2 k 2 , µ ←max(.9µ, ¯µ). 10: end while 11: Output: A, E. 4 Simulations and Experiments In this section, we first perform simulations corroborating our theoretical results and clarifying their implications. We then sketch two computer vision applications involving the recovery of intrinsically low-dimensional data from gross corruption: background estimation from video and face subspace estimation under varying illumination. 8 Simulation: proportional growth. We first demonstrate the exactness of the convex programming heuristic, as well as the efficacy of Algorithm 1, on random matrix examples of increasing dimension. We generate A0 as a product of two independent m × r matrices whose elements are i.i.d. N(0, 1) random variables. We generate E0 as a sparse matrix whose support is chosen uniformly at random, and whose non-zero entries are independent and uniformly distributed in the range [−500, 500]. We apply the proposed algorithm to the matrix D .= A0 + E0 to recover ˆA and ˆE. The results are presented in Table 1. For these experiments, we choose λ = m−1/2. We observe that the proposed algorithm is successful in recovering A0 even when 10% of its entries are corrupted. m rank(A0) ∥E0∥0 ∥ˆ A−A0∥F ∥A0∥F rank( ˆA) ∥ˆE∥0 #iterations time (s) 100 5 500 3.0 × 10−4 5 506 104 1.6 200 10 2,000 2.1 × 10−4 10 2,012 104 7.9 400 20 8,000 1.4 × 10−4 20 8,030 104 64.8 800 40 32,000 9.9 × 10−5 40 32,062 104 531.6 100 5 1,000 3.1 × 10−4 5 1,033 108 1.6 200 10 4,000 2.3 × 10−4 10 4,042 107 8.0 400 20 16,000 1.6 × 10−4 20 16,110 107 66.7 800 40 64,000 1.2 × 10−4 40 64,241 106 542.8 Table 1: Proportional growth. Here the rank of the matrix grows in proportion (5%) to the dimensionality m; and the number of corrupted measurements grows in proportion to the number of entries m2, top 5% and bottom 10%, respectively. The time reported is for Matlab implementation run on a 2.8 GHz MacBook Pro. Simulation: phase transition w.r.t. rank and error sparsity. We next examine how the rank of A and the proportion of errors in E affect the performance our algorithm. We fix m = 200, and vary ρr .= rank(A0) m and the error probability ρs between 0 and 1. For each ρr, ρs pair, we generate 10 pairs (A0, E0) as in the above experiment. We deem (A0, E0) successfully recovered 8Here, we use these intuitive examples and data illustrate how our algorithm can be used as a simple, general tool to effectively separate low-dimensional and sparse structures occurring in real visual data. Appropriately harnessing additional structure (e.g., the spatial coherence of the error [28]) may yield even more effective algorithms. 6 if the recovered ˆA satisfies ∥ˆ A−A0∥F ∥A0∥F < 0.01. Figure 1 (left) plots the fraction of correct recoveries. White denotes perfect recovery in all experiments, and black denotes failure for all experiments. We observe that there is a relatively sharp phase transition between success and failure of the algorithm roughly above the line ρr + ρs = 0.35. To verify this behavior, we repeat the experiment, but only vary ρr and ρs between 0 and 0.4 with finer steps. These results, seen in Figure 1 (right), show that phase transition remains fairly sharp even at higher resolution. ρr ρs 0.2 0.4 0.6 0.8 1 0.2 0.4 0.6 0.8 1 ρr ρs 0.1 0.2 0.3 0.3 0.2 0.1 Figure 1: Phase transition wrt rank and error sparsity. Here, ρr = rank(A)/m, ρs = ∥E∥0/m2. Left: (ρr, ρs) ∈[0, 1]2. Right: (ρr, ρs) ∈[0, 0.4]2. Experiment: background modeling from video. Background modeling or subtraction from video sequences is a popular approach to detecting activity in the scene, and finds application in video surveillance from static cameras. Background estimation is complicated by the presence of foreground objects such as people, as well as variability in the background itself, for example due to varying illumination. In many cases, however, it is reasonable to assume that these background variations are low-rank, while the foreground activity is spatially localized, and therefore sparse. If the individual frames are stacked as columns of a matrix D, this matrix can be expressed as the sum of a low-rank background matrix and a sparse error matrix representing the activity in the scene. We illustrate this idea using two examples from [29] (see Figures 2). In Figure 2(a)-(c), the video sequence consists of 200 frames of a scene in an airport. There is no significant change in illumination in the video, but a lot of activity in the foreground. We observe that our algorithm is very effective in separating the background from the activity. In Figure 2(d)-(f), we have 550 frames from a scene in a lobby. There is little activity in the video, but the illumination changes drastically towards the end of the sequence. We see that our algorithm is once again able to recover the background, irrespective of the illumination change. Experiment: removing shadows and specularities from face images. Face recognition is another domain in computer vision where low-dimensional linear models have received a great deal of attention, mostly due to the work of [30]. The key observation is that under certain idealized circumstances, images of the same face under varying illumination lie near an approximately ninedimensional linear subspace known as the harmonic plane. However, since faces are neither perfectly convex nor Lambertian, face images taken under directional illumination often suffer from self-shadowing, specularities, or saturations in brightness. Given a matrix D whose columns represent well-aligned training images of a person’s face under various illumination conditions, our Robust PCA algorithm offers a principled way of removing such spatially localized artifacts. Figure 3 illustrates the results of our algorithm on images from subsets 1-3 of the Extended Yale B database [31]. The proposed algorithm algorithm removes the specularities in the eyes and the shadows around the nose region. This technique is potentially useful for pre-processing training images in face recognition systems to remove such deviations from the low-dimensional linear model. 5 Discussion and Future Work Our results give strong theoretical and empirical evidences for the efficacy of using convex programming to recover low-rank matrices from corrupted observations. However, there remain many fascinating open questions in this area. From a mathematical perspective, it would be interesting to 7 (a) (b) (c) (d) (e) (f) Figure 2: Background modeling. (a) Video sequence of a scene in an airport. The size of each frame is 72 × 88 pixels, and a total of 200 frames were used. (b) Static background recovered by our algorithm. (c) Sparse error recovered by our algorithm represents activity in the frame. (d) Video sequence of a lobby scene with changing illumination. The size of each frame is 64 × 80 pixels, and a total of 550 frames were used. (e) Static background recovered by our algorithm. (f) Sparse error. The background is correctly recovered even when the illumination in the room changes drastically in the frame on the last row. (a) (b) (c) (a) (b) (c) Figure 3: Removing shadows and specularities from face images. (a) Cropped and aligned images of a person’s face under different illuminations from the Extended Yale B database. The size of each image is 96 × 84 pixels, a total of 31 different illuminations were used for each person. (b) Images recovered by our algorithm. (c) The sparse errors returned by our algorithm correspond to specularities in the eyes, shadows around the nose region, or brightness saturations on the face. know if it is possible to remove the logarithmic factor in our main result. The phase transition experiment in Section 4 suggests that convex programming actually succeeds even for rank(A0) < ρrm and ∥E0∥0 < ρsm2, where ρr and ρs are sufficiently small positive constants. Another interesting and important question is whether the recovery is stable in the presence of small dense noise. That is, suppose we observe D = A0 + E0 + Z, where Z is a noise vector of small ℓ2-norm (e.g., Gaussian noise). A natural approach is to now minimize ∥A∥∗+ λ∥E∥1, subject to a relaxed constraint ∥D −A −E∥F ≤ε. For matrix completion, [16] showed that a similar relaxation gives stable recovery – the error in the solution is proportional to the noise level. Finally, while this paper has sketched several examples on visual data, we believe that this powerful new tool pertains to a wide range of high-dimensional data, for example in bioinformatics and web search. References [1] C. Eckart and G. Young. The approximation of one matrix by another of lower rank. Psychometrika, 1(3):211–218, 1936. 8 [2] S. Chen, D. Donoho, and M. Saunders. Atomic decomposition by basis pursuit. SIAM Review, 43(1):129– 159, 2001. [3] J. Tenenbaum, V. de Silva, and J. Langford. A global geometric framework for nonlinear dimensionality reduction. Science, 290(5500):2319–2323, 2000. [4] M. Belkin and P. Niyogi. Laplacian eigenmaps for dimensionality reduction and data representation. Neural Computation, 15(6):1373–1396, 2003. [5] I. Jolliffe. Principal Component Analysis. Springer-Verlag, New York, New York, 1986. [6] P. Huber. Robust Statistics. Wiley, New York, New York, 1981. [7] F. De La Torre and M. Black. A framework for robust subspace learning. IJCV, 54(1-3):117–142, 2003. [8] R. Gnanadesikan and J. Kettenring. Robust estimates, residuals, and outlier detection with multiresponse data. Biometrics, 28(1):81–124, 1972. [9] Q. Ke and T. Kanade. Robust l1 norm factorization in the presence of outliers and missing data by alternative convex programming. In CVPR, 2005. [10] M. Fischler and R. Bolles. Random sample consensus: A paradigm for model fitting with applications to image analysis and automated cartography. Communications of the ACM, 24(6):381–385, 1981. [11] E. Cand`es and T. Tao. Decoding by linear programming. IEEE Trans. Info. Thy., 51(12):4203–4215, 2005. [12] B. Recht, M. Fazel, and P. Parillo. Guaranteed minimum rank solution of matrix equations via nuclear norm minimization. SIAM Review, submitted for publication. [13] E. Candes and B. Recht. Exact matrix completion via convex optimzation. Foundations of Computational Mathematics, to appear. [14] A. Montanari R. Keshavan and S. Oh. Matrix completion from a few entries. preprint, 2009. [15] E. Candes and T. Tao. The power of convex relaxation: Near-optimal matrix completion. IEEE Transactions on Information Theory, submitted for publication. [16] E. Candes and Y. Plan. Matrix completion with noise. Proceedings of the IEEE, to appear. [17] D. Donoho. High-dimensional data analysis: The curses and blessings of dimensionality. AMS Math Challenges Lecture, 2000. [18] A. Beck and M. Teboulle. A fast iterative shrinkage-thresholding algorithm for linear inverse problems. SIAM Journal on Imaging Science, (1):183–202, 2009. [19] Y. Nesterov. Smooth minimization of non-smooth functions. Mathematical Programming, 103(1):127– 152, 2005. [20] J. Cai, E. Candes, and Z. Shen. A singular value thresholding algorithm for matrix completion. preprint, http://arxiv.org/abs/0810.3286, 2008. [21] K.-C. Toh and S. Yun. An accelerated proximal gradient algorithm for nuclear norm regularized least squares problems. preprint, http://math.nus.edu.sg/˜matys/apg.pdf, 2009. [22] J. Wright, A. Ganesh, S. Rao, and Y. Ma. Robust principal component analysis: Exact recovery of corrupted low-rank matrices via convex optimization. Journal of the ACM, submitted for publication. [23] E. Amaldi and V. Kann. On the approximability of minimizing nonzero variables or unsatisfied relations in linear systems. Theoretical Computer Science, 209(2):237–260, 1998. [24] D. Donoho. For most large underdetermined systems of linear equations the minimal l1-norm solution is also the sparsest solution. Communications on Pure and Applied Mathematics, 59(6):797–829, 2006. [25] V. Chandrasekaran, S. Sanghavi, P. Parrilo, and A. Willsky. Sparse and low-rank matrix decompositions. In IFAC Symposium on System Identification, 2009. [26] J. Wright and Y. Ma. Dense error correction via ℓ1-minimization. IEEE Transactions on Information Theory, to appear. [27] Z. Lin, A. Ganesh, J. Wright, M. Chen, L. Wu, and Y. Ma. Fast convex optimization algorithms for exact recovery of a corrupted low-rank matrix. SIAM Journal on Optimization, submitted for publication. [28] V. Cevher, , M. F. Duarte, C. Hegde, and R. G. Baraniuk. Sparse signal recovery using markov random fields. In NIPS, 2008. [29] L. Li, W. Huang, I. Gu, and Q. Tian. Statistical modeling of complex backgrounds for foreground object detection. IEEE Transactions on Image Processing, 13(11), 2004. [30] R. Basri and D. Jacobs. Lambertian reflection and linear subspaces. IEEE Trans. PAMI, 25(3):218–233, 2003. [31] A. Georghiades, P. Belhumeur, and D. Kriegman. From few to many: Illumination cone models for face recognition under variable lighting and pose. IEEE Trans. PAMI, 23(6):643–660, 2001. 9
2009
199
3,702
DUOL: A Double Updating Approach for Online Learning Peilin Zhao School of Comp. Eng. Nanyang Tech. University Singapore 639798 zhao0106@ntu.edu.sg Steven C.H. Hoi School of Comp. Eng. Nanyang Tech. University Singapore 639798 chhoi@ntu.edu.sg Rong Jin Dept. of Comp. Sci. & Eng. Michigan State University East Lansing, MI, 48824 rongjin@cse.msu.edu Abstract In most online learning algorithms, the weights assigned to the misclassified examples (or support vectors) remain unchanged during the entire learning process. This is clearly insufficient since when a new misclassified example is added to the pool of support vectors, we generally expect it to affect the weights for the existing support vectors. In this paper, we propose a new online learning method, termed Double Updating Online Learning, or DUOL for short. Instead of only assigning a fixed weight to the misclassified example received in current trial, the proposed online learning algorithm also tries to update the weight for one of the existing support vectors. We show that the mistake bound can be significantly improved by the proposed online learning method. Encouraging experimental results show that the proposed technique is in general considerably more effective than the state-of-the-art online learning algorithms. 1 Introduction Online learning has been extensively studied in the machine learning community (Rosenblatt, 1958; Freund & Schapire, 1999; Kivinen et al., 2001a; Crammer et al., 2006). Most online learning algorithms work by assigning a fixed weight to a new example when it is misclassified. As a result, the weights assigned to the misclassified examples, or support vectors, remain unchanged during the entire process of learning. This is clearly insufficient because when a new example is added to the pool of support vectors, we expect it to affect the weights assigned to the existing support vectors received in previous trials. Although several online algorithms are capable of updating the example weights as the learning process goes, most of them are designed for the purposes other than improving the classification accuracy and reducing the mistake bound. For instance, in (Orabona et al., 2008; Crammer et al., 2003; Dekel et al., 2005), online learning algorithms are proposed to adjust the example weights in order to fit in the constraint of fixed number of support vectors; in (Cesa-Bianchi & Gentile, 2006), example weights are adjusted to track the drifting concepts. In this paper, we propose a new formulation for online learning that aims to dynamically update the example weights in order to improve the classification accuracy as well as the mistake bound. Instead of only assigning a weight to the misclassified example that is received in current trial, the proposed online learning algorithm also updates the weight for one of the existing support vectors. As a result, the example weights are dynamically updated as learning goes. We refer to the proposed approach as Double Updating Online Learning, or DUOL for short. The key question in the proposed online learning approach is which one of the existing support vectors should be selected for weight updating. To this end, we employ an analysis for double updating online learning that is based on the recent work of online convex programming by incremental dual ascent (Shalev-Shwartz & Singer, 2006). Our analysis shows that under certain conditions, the proposed online learning algorithm can significantly reduce the mistake bound of the existing online algorithms. This result is further verified empirically by extensive experiments and comparison to the state-of-the-art algorithms for online learning. 1 The rest of this paper is organized as follows. Section 2 reviews the related work for online learning. Section 3 presents the proposed “double updating” approach to online learning. Section 4 gives our experimental results. Section 5 sets out the conclusion and addresses some future work. 2 Related Work Online learning has been extensively studied in machine learning (Rosenblatt, 1958; Crammer & Singer, 2003; Cesa-Bianchi et al., 2004; Crammer et al., 2006; Fink et al., 2006; Yang et al., 2009). One of the most well-known online approaches is the Perceptron algorithm (Rosenblatt, 1958; Freund & Schapire, 1999), which updates the learning function by adding a new example with a constant weight into the current set of support vectors when it is misclassified. Recently a number of online learning algorithms have been developed based on the criterion of maximum margin (Crammer & Singer, 2003; Gentile, 2001; Kivinen et al., 2001b; Crammer et al., 2006; Li & Long, 1999). One example is the Relaxed Online Maximum Margin algorithm (ROMMA) (Li & Long, 1999), which repeatedly chooses the hyper-planes that correctly classify the existing training examples with the maximum margin. Another representative example is the Passive-Aggressive (PA) method (Crammer et al., 2006). It updates the classification function when a new example is misclassified or its classification score does not exceed some predefined margin. Empirical studies showed that the maximum margin based online learning algorithms are generally more effective than the Perceptron algorithm. However, despite the difference, most online learning algorithms only update the weight of the newly added support vector, and keep the weights of the existing support vectors unchanged. This constraint could significantly limit the effect of online learning. Besides the studies for regular online learning, several algorithms are proposed for online learning with fixed budget. In these studies, the total number of support vectors is required to be bounded either by a theoretical bound or by a manually fixed budget. Example algorithms for fixed budget online learning include (Weston & Bordes, 2005; Crammer et al., 2003; Cavallanti et al., 2007; Dekel et al., 2008). The key idea of these algorithms is to dynamically update the weights of the existing support vectors as a new support vector is added, and the support vector with the least weight will be discarded when the number of support vectors exceeds the budget. The idea of discarding support vectors is also used in studies (Kivinen et al., 2001b) and (Cheng et al., 2006). In a very recently proposed method (Orabona et al., 2008), a new “projection” approach is proposed for online learning that ensures the number of support vectors is bounded. Besides, in (Cesa-Bianchi & Gentile, 2006), an online learning algorithm is proposed to handle the drifting concept, in which the weights of the existing support vectors are reduced whenever a new support vector is added. Although these online learning algorithms are capable of dynamically adjusting the weights of support vectors, they are designed to either fit in the budget of the number of support vectors or to handle drifting concepts, not to improve the classification accuracy and the mistake bound. The proposed online learning algorithm is closely related to the recent work of online convex programming by incremental dual ascent (Shalev-Shwartz & Singer, 2006). Although the idea of simultaneously updating the weights of multiple support vectors was mentioned in (Shalev-Shwartz & Singer, 2006), no efficient updating algorithm was explicitly proposed. As will be shown later, the online algorithm proposed in this work shares the same computational cost as that of conventional online learning algorithms, despite the need of updating weights of two support vectors. 3 Double Updating to Online Learning 3.1 Motivation We consider an online learning trial t with an incoming example that is misclassified. Let κ(·, ·) : Rd × Rd →R be the kernel function used in our classifier. Let D = {(xi, yi), i = 1, . . . , n} be the collection of n misclassified examples received before the trial t, where xi ∈Rd and yi ∈ {−1, +1}. We also refer to these misclassified training examples as “support vectors”. We denote by α = (α1, . . . , αn) ∈[0, C]n the weights assigned to the support vectors in D, where C is a predefined constant. The resulting classifier, denoted by f(x), is expressed as f(x) = n X i=1 αiyiκ(x, xi) (1) Let (xa, ya) be the misclassified example received in the trial t, i.e., yaf(xa) ≤0. In the conventional approach for online learning, we simply assign a constant weight, denoted by β, to (xa, ya), 2 and the resulting classifier becomes f ′(x) = βyaκ(x, xa) + n X i=1 αiyiκ(x, xi) = βyaκ(x, xa) + f(x) (2) The shortcoming with the conventional online learning approach is that the introduction of the new support vector (xa, ya) may harm the classification of existing support vectors in D, which is revealed by the following proposition. Proposition 1. Let (xa, ya) be an example misclassified by the current classifier f(x) = Pn i=1 αiyiκ(x, xi), i.e., yaf(xa) < 0. Let f ′(x) = βyaκ(x, xa) + f(x) be the updated classifier with β > 0. There exists at least one support vector xi ∈D such that yif(xi) > yif ′(xi). Proof. It follows from the fact that: ∃xi ∈D, yiyaκ(xi, xa) < 0 when yaf(xa) < 0. As indicated by the above proposition, when a new misclassified example is added to the classifier, the classification confidence of at least one support vector will be reduced. In the case when yaf(xa) ≤−γ, it is easy to verify that there exists some support vector (xb, yb) who satisfies βyaybk(xa, xb) ≤−γ/n; at the meantime, it can be shown that when the classification confidence of (xb, yb) is less than γ/n, i.e., ybf(xb) ≤γ/n, such support vector will be misclassified after the classifier is updated with the example (xa, ya). In order to alleviate this problem, we propose to update the weight for the existing support vector whose classification confidence is significantly affected by the new misclassified example. In particular, we consider a support vector (xb, yb) ∈D for weight updating if it satisfies the following two conditions • ybf(xb) ≤0, i.e., support vector (xb, yb) is misclassified by the current classifier f(x) • k(xb, xa)yayb ≤−ρ where ρ ≥0 is a predefined threshold, i.e., support vector (xb, yb) “conflicts” with the new misclassified example (xa, ya). We refer to the support vector satisfying the above conditions as auxiliary example. It is clear that by adding the misclassified example (xa, ya) to classifier f(x) with weight β, the classification score of (xb, yb) will be reduced by at least βρ, which could lead to the misclassification of the auxiliary example (xb, yb). To avoid such a mistake, we propose to update the weights for both (xa, ya) and (xb, yb) simultaneously. In the next section, we show the details of the double updating algorithm for online learning, and the analysis for mistake bound. Our analysis follows closely the previous work on the relationship between online learning and the dual formulation of SVM (Shalev-Shwartz & Singer, 2006), in which the online learning is interpreted as an efficient updating rule for maximizing the objective function in the dual form of SVM. We denote by ∆t the improvement of the objective function in dual SVM when adding a new misclassified example to the classification function in the t-th trial. If an online learning algorithm A is designed to ensure that all ∆t is bounded from the below by a positive constant ∆, then the number of mistakes made by A when trained over a sequence of trials (x1, y1), . . . , (xT , yT ), denoted by M, is upper bounded by: M ≤1 ∆ Ã min f∈Hκ 1 2∥f∥2 Hκ + C T X i=1 ℓ(yif(xi)) ! (3) where ℓ(yif(xi)) = max(0, 1 −yif(xi)) is the hinge loss function. In our analysis, we will show that ∆, which is referred to as the bounding constant for the improvement in the objective function, could be significantly improved when updating the weight for both the newly misclassified example and the auxiliary example. For the remaining part of this paper, we denote by (xb, yb) an auxiliary example that satisfies the two conditions specified before. We slightly abuse the notation by using α = (α1, . . . , αn−1)) ∈Rn−1 to denote the weights assigned to all the support vectors in D except (xb, yb). Similarly, we denote by y = (y1, . . . , yn−1) ∈[−1, 1]n−1 the class labels assigned to all the examples in D except for (xb, yb). We define sa = κ(xa, xa), sb = κ(xb, xb), sab = κ(xa, xb), wab = yaybsab. (4) According to the assumption of auxiliary example, we have wab = sabyayb ≤−ρ. Finally, we denote by bγb the weight for the auxiliary example (xb, yb) that is used in the current classifier f(x), and by γa and γb the updated weights for (xa, ya) and (xb, yb), respectively. Throughout the analysis, we assume κ(x, x) ≤1 for any example x. 3 3.2 Double Updating Online Learning Recall an auxiliary example (xb, yb) should satisfy two conditions (I) ybf(xb) ≤0, and (II) wab ≤ −ρ. In addition, the new example (xa, ya) received in the current iteration t is misclassified, i.e., yaf(xa) ≤0. Following the framework of dual formulation for online learning, the following lemma shows how to compute ∆t, i.e., the improvement in the objective function of dual SVM by adjusting weights for (xa, ya) and (xb, yb). Lemma 1. The maximal improvement in the objective function of dual SVM by adjusting weights for (xa, ya) and (xb, yb), denoted by ∆t, is computed by solving the following optimization problem: ∆t = max γa,∆γb {h(γa, ∆γb) : 0 ≤γa ≤C, 0 ≤∆γb ≤C −bγb} (5) where h(γa, ∆γb) = γa(1 −yaf(xa)) + ∆γb(1 −ybf(xb)) −sa 2 γ2 a −sb 2 ∆γ2 b −wabγa∆γb (6) Proof. It is straightforward to verify that the dual function of min ft∈Hκ 1 2∥ft∥2 Hκ +C Pt i=1 ℓ(yift(xi)), denoted by Dt(γ1, . . . , γt), is computed as follows, Dt(γ1, . . . , γt) = t X i=1 γi − t X i=1 γiyift(xi) + 1 2∥ft∥2 Hκ (7) where 0 ≤γi ≤C, i = 1, . . . , t and ft(·) = Pt i=1 γiyiκ(·, xi) is the current classifier. Thus, h(γa, ∆γb) = Dt(γ1, . . . , bγb + ∆γb, . . . , γt−1, γa) −Dt−1(γ1, . . . , bγb, . . . , γt−1) = t−1 X i=1 γi + ∆γb + γa − Ãt−1 X i=1 γiyift(xi) + ∆γbybft(xb) + γayaft(xa) ! + 1 2∥ft∥2 Hκ − Ãt−1 X i=1 γi − t−1 X i=1 γiyift−1(xi) + 1 2∥ft−1∥2 Hκ ! Using the relation ft(x) = ft−1(x) + ∆γbybκ(x, xb) + γayaκ(x, xa), we have h(γa, ∆γb) = γa(1 −yaft−1(xa)) + ∆γb(1 −ybft−1(xb)) −sa 2 γ2 a −sb 2 ∆γ2 b −wabγa∆γb Finally, we need to show ∆γb ≥0. Note that this constraint does not come directly from the box constraint that the weight for example (xb, yb) is in the range [0, C], i.e., bγb + ∆γb ∈[0, C]. To this end, we consider the part of h(γa, ∆γb) that is related to ∆γb, i.e., g(∆γb) = ∆γb(1 −ybft−1(xb) −wabγa) −sb 2 ∆γ2 b Since wab ≤−ρ and ybft−1(xb) ≤0, it is clear that ∆γb ≥0 when maximizing g(∆γb), which results in the constraint ∆γb ≥0. The following theorem shows the bound for ∆when C is sufficiently large. Theorem 1. Assume C > bγb + 1/(1 −ρ) for the selected auxiliary example (xb, yb). We have the following bound for ∆ ∆≥ 1 1 −ρ (8) Proof. Using the fact sa, sb ≤1, γa, ∆γb ≥0, yaf(xa) ≤0, ybf(xb) ≤0, and wa,b ≤−ρ, we have h(γa, ∆γb) ≥γa + ∆γb −1 2γ2 a −1 2∆γ2 b + ργa∆γb Thus, ∆is bounded as ∆≥ max γb∈[0,C],∆γb∈[0,C−bγ] γa + ∆γb −1 2(γ2 a + ∆γ2 b ) + ργa∆γb Under the condition that C > ˆγb + 1/(1 −ρ), it is easy to verify that the optimal solution for the above problem is γa = ∆γb = 1/(1 −ρ), which leads to the result in the theorem. 4 We now consider the general case, where we only assume C ≥1. The following theorem shows the bound for ∆in the general case. Theorem 2. Assume C ≥1. We have the following bound for ∆, when updating the weights for the new example (xa, ya) and the auxiliary example (xb, yb) ∆≥1 2 + 1 2 min ¡ (1 + ρ)2, (C −bγ)2¢ Proof. By setting γa = 1, we have h(γa, ∆γb) computed as h(γa = 1, ∆γb) ≥1 2 + (1 + ρ)∆γb −1 2∆γ2 b Hence, ∆is lower bounded by ∆≥1 2 + max ∆γb∈[0,C−bγ] µ (1 + ρ)∆γb −1 2∆γ2 b ¶ ≥1 2 + 1 2 min ¡ (1 + ρ)2, (C −bγ)2¢ Since we only have ∆≥1/2 if we only update the weight for the new misclassified example (xa, ya), the result in theorem 2 indicates an increase in ∆when updating the weight for both (xa, ya) and the auxiliary example (xb, yb). Furthermore, when C is sufficiently large, as indicated by Theorem 1, the improvement in ∆can be very significant. The final remaining question is how to identify the auxiliary example (xb, yb) efficiently, which requires efficiently updating the classification score yif(xi) for all the support vectors. To this end, we introduce a variable for each support vector, denoted by f i t, to keep track the classification score. When a new support vector (xa, ya) with weight γa is added to the classifier, we update the classification score f i t−1 by f i t ←f i t−1 + yiγayaκ(xi, xa), and when the weight of an auxiliary example (xb, yb) is updated from ˆγb to γb, we update the classification score f i t−1 by f i t ←f i t−1 +yi(γb −ˆγb)ybκ(xi, xb).This updating procedure ensures that the computational cost of double updating online learning is O(n), where n is the number of support vectors, similar to that of the kernel online learning algorithm. Figure 1 shows the details of the DUOL algorithm. Finally, we show a bound on the number of mistakes by assuming C is sufficiently large. Theorem 3. Let (x1, y1), . . . , (xT , yT ) be a sequence of examples, where xt ∈Rn, yt ∈{−1, +1} and κ(xt, xt) ≤1 for all t. And assume C is sufficiently large. Then for any function f in Hκ, the number of prediction mistakes M made by DUOL on this sequence of examples is bounded by: M ≤2 Ã min f∈Hκ 1 2∥f∥2 Hκ + C T X i=1 ℓ(yif(xi)) ! −1 + ρ 1 −ρMd(ρ) (9) where Md(ρ) is the number of mistakes when there is an auxiliary example, which depends on the threshold ρ and the dataset (Md(ρ) is actually a decreasing function with ρ). Proof. We denote by Ms the number of mistakes when we made a single update without finding appropriate auxiliary example. Using Theorem 1, we have the following inequality, 1 2Ms + 1 1 −ρMd(ρ) ≤ Ã min f∈Hκ 1 2∥f∥2 Hκ + C T X i=1 ℓ(yif(xi)) ! (10) Plugging M = Ms + Md into the equation above, we can get M ≤2 Ã min f∈Hκ 1 2∥f∥2 Hκ + C T X i=1 ℓ(yif(xi)) ! −1 + ρ 1 −ρMd(ρ) (11) It is worthwhile pointing out that although according to Theorem 3, it seems that the larger the value of ρ the smaller the mistake bound will be. This however is not true since Md(ρ) is in general a monotonically decreasing function in ρ. As a result, it is unclear if Md(ρ) × (1 + ρ)/(1 −ρ) will increase when ρ is increased. 5 Algorithm 1 The DUOL Algorithm (DUOL) PROCEDURE 1: Initialize S0 = ∅, f0 = 0; 2: for t=1,2,...,T do 3: Receive new instance xt 4: Predict ˆyt = sign(ft−1(xt)); 5: Receive label yt; 6: lt = max{0, 1 −ytft−1(xt)} 7: if lt > 0 then 8: wmin = 0 9: for ∀i ∈St−1 do 10: if (fi t−1 ≤0) then 11: if (yiytk(xi, xt) < wmin) then 12: wmin = yiytk(xi, xt); 13: (xb, yb) = (xi, yi);/*auxiliary example*/ 14: end if 15: end if 16: end for 17: ft t−1 = ytft−1(xt); 18: St = St−1 ∪{t}; 19: if (wmin ≤−ρ) then 20: γt = min(C, 1 1−ρ ); 21: γb = min(C, ˆγb + 1 1−ρ ); 22: for ∀i ∈St do 23: fi t ←fi t−1 + yiγtytk(xi, xt) + yi(γb −ˆγb)ybk(xi, xb); 24: end for 25: ft = ft−1 + γtytk(xt, ·) + (γb −ˆγb)ybk(xb, ·); 26: else /* no auxiliary example found */ 27: γt = min(C, 1); 28: for ∀i ∈St do 29: fi t ←fi t−1 + yiγtytk(xi, xt); 30: end for 31: ft = ft−1 + γtytk(xt, ·); 32: end if 33: else 34: ft = ft−1; St = St−1; 35: for ∀i ∈St do 36: fi t ←fi t−1; 37: end for 38: end if 39: end for Figure 1: The Algorithm of Double Updating Online Learning (DUOL). 4 Experimental Results 4.1 Experimental Testbed and Setup We now evaluate the empirical performance of the proposed double updating online learning (DUOL) algorithm. We compare DUOL with a number of state-of-the-art techniques, including Perceptron (Rosenblatt, 1958; Freund & Schapire, 1999), the “ROMMA” algorithm and its aggressive version “agg-ROMMA” (Li & Long, 1999), the ALMAp(α) algorithm (Gentile, 2001), and the Passive-Aggressive algorithms (“PA”) (Crammer et al., 2006). The original Perceptron algorithm was proposed for learning linear models. In our experiments, we follow (Kivinen et al., 2001b) by adapting it to the kernel case. Two versions of PA algorithms (PA-I and PA-II) were implemented as described in (Crammer et al., 2006). Finally, as an ideal yardstick, we also implement a full online SVM algorithm (“Online-SVM”) (Shalev-Shwartz & Singer, 2006), which updates all the support vectors in each trial, and is thus computationally extremely intensive as will be revealed in our study. To extensively examine the performance, we test all the algorithms on a number of benchmark datasets from web machine learning repositories. All of the datasets can be downloaded from LIBSVM website 1, UCI machine learning repository 2 and MIT CBCL face datasets 3 . Due to space limitation, we randomly choose six of them in our discussions, including “german”, “splice”, “spambase”, “MITFace”, “a7a”, and “w7a”. To make a fair comparison, all algorithms adopt the same experimental setup. In particular, for all the compared algorithms, we set the penalty parameter C = 5, and employ the same Gaussian kernel with σ = 8. For the ALMAp(α) algorithm, parameter p and α are set to be 2 and 0.9, respectively, based on our experience. For the proposed DUOL algorithm, we fix ρ to be 0.2 for all cases. All the experiments were conducted over 20 random permutations for each dataset. All the results were reported by averaging over these 20 runs. We evaluate the online learning performance by measuring mistake rate, i.e., the ratio of the number of mistakes made by the online learning algorithm over the total number of examples received for predictions. In addition, to examine the sparsity of the resulting classifiers, we also evaluate the number of support vectors produced by each online learning algorithm. Finally, we also evaluate computational efficiency of all the algorithms by their running time (in seconds). All experiments were run in Matlab over a machine of 2.3GHz CPU. 4.2 Performance Evaluation Table 1 to 6 summarize the performance of all the compared algorithms over the six datasets4, respectively. Figure 2 to 6 show the mistake rates of all online learning algorithms in comparison over trials. We observe that Online-SVM yields considerably better performance than the other online learning algorithms for dataset “german”, “splice”, “spambase”, and “MITFace”, however, at the price of extremely high computational cost. For most cases, the running time of Online-SVM is two order, sometimes three order, higher than the other online learning algorithms, making it 1http://www.csie.ntu.edu.tw/˜cjlin/libsvmtools/datasets/ 2http://www.ics.uci.edu/˜mlearn/MLRepository.html 3http://cbcl.mit.edu/software-datasets 4Due to huge computational cost, we are unable to obtain the results of Online-SVM on two large datasets. 6 unsuitable for online learning. For the remaining part of this section, we restrict our discussion to the other six baseline online learning algorithms. First, among the six baseline algorithms in comparison, we observe that the agg-ROMMA and two PA algorithms (PA-I and PA-II) perform considerably better than the other three algorithms (i.e., Perceptron, ROMMA, and ALMA) in most cases. We also notice that the agg-ROMMA and the two PA algorithms consume considerably larger numbers of support vectors than the other three algorithms. We believe this is because the agg-ROMMA and the two PA algorithms adopt more aggressive strategies than the other three algorithms, resulting more updates and better classification performance. For the convenience of discussion, we refer to agg-ROMMA and two PA algorithms as aggressive algorithms, and the three algorithms as non-aggressive ones. Second, comparing with all six competing algorithms, we observe that DUOL achieves significantly smaller mistake rates than the other single-updating algorithms in all cases. This shows that the proposed double updating approach is effective in improving the online prediction performance. By examining the sparsity of resulting classifiers, we observed that DUOL results in sparser classifiers than the three aggressive online learning algorithms, and denser classifiers than the three non-aggressive algorithms. Third, according to the results of running time, we observe that DUOL is overall efficient compared to the state-of-the-art online learning algorithms. Among all the compared algorithms, Perceptron, for its simplicity, is clearly the most efficient algorithm, and the agg-ROMMA algorithm is significantly slower than the others (except for “Online-SVM”). Although DUOL requires double updating, its efficiency is comparable to the PA and ROMMA algorithms. Table 1: Evaluation on german (n=1000, d=24). Algorithm Mistake (%) Support Vectors (#) Time (s) Perceptron 35.305 ± 1.510 353.05 ± 15.10 0.018 ROMMA 35.105 ± 1.189 351.05 ± 11.89 0.154 agg-ROMMA 33.350 ± 1.287 643.25 ± 12.31 1.068 ALMA2(0.9) 34.025 ± 0.910 402.00 ± 7.33 0.225 PA-I 33.670 ± 1.278 732.60 ± 9.74 0.029 PA-II 33.175 ± 1.229 757.00 ± 10.02 0.030 Online-SVM 28.860 ± 0.651 646.10 ± 5.00 16.097 DUOL 29.990 ± 1.033 682.50 ± 12.87 0.089 Table 2: Evaluation on splice (n=1000, d=6). Algorithm Mistakes (%) Support Vectors (#) Time (s) Perceptron 27.120 ± 0.975 271.20 ± 9.75 0.016 ROMMA 25.560 ± 0.814 255.60 ± 8.14 0.055 agg-ROMMA 22.980 ± 0.780 602.95 ± 7.43 0.803 ALMA2(0.9) 26.040 ± 0.965 314.95 ± 9.41 0.075 PA-I 23.815 ± 1.042 665.60 ± 5.60 0.028 PA-II 23.515 ± 1.005 689.00 ± 7.85 0.028 Online-SVM 17.455 ± 0.518 614.90 ± 2.92 12.243 DUOL 20.560 ± 0.566 577.85 ± 8.93 0.076 Table 3: Evaluation on spambase (n=4601, d=57). Algorithm Mistake (%) Support Vectors (#) Time (s) Perceptron 24.987 ± 0.525 1149.65 ± 24.17 0.204 ROMMA 23.953 ± 0.510 1102.10 ± 23.44 10.128 agg-ROMMA 21.242 ± 0.384 2550.60 ± 27.32 95.028 ALMA2(0.9) 23.579 ± 0.411 1550.15 ± 15.65 25.294 PA-I 22.112 ± 0.374 2861.50 ± 24.36 0.490 PA-II 21.907 ± 0.340 3029.10 ± 24.69 0.505 Online-SVM 17.138 ± 0.321 2396.95 ± 10.57 2521.665 DUOL 19.438 ± 0.432 2528.55 ± 20.57 0.985 Table 4: Evaluation on MITFace (n=6977, d=361). Algorithm Mistake (%) Support Vectors (#) Time (s) Perceptron 4.665 ± 0.192 325.50 ± 13.37 0.164 ROMMA 4.114 ± 0.155 287.05 ± 10.84 0.362 agg-ROMMA 3.137 ± 0.093 1121.15 ± 24.18 11.074 ALMA2(0.9) 4.467 ± 0.169 400.10 ± 10.53 0.675 PA-I 3.190 ± 0.128 1155.45 ± 14.53 0.356 PA-II 3.108 ± 0.112 1222.05 ± 13.73 0.370 Online-SVM 1.142 ± 0.073 520.05 ± 4.55 7238.105 DUOL 2.409 ± 0.161 768.65 ± 16.18 0.384 Table 5: Evaluation on a7a (n=16100, d=123). Algorithm Mistake (%) Support Vectors (#) Time (s) Perceptron 22.022 ± 0.202 3545.50 ± 32.49 2.043 ROMMA 21.297 ± 0.272 3428.85 ± 43.77 306.793 agg-ROMMA 20.832 ± 0.234 4541.30 ± 109.39 661.632 ALMA2(0.9) 20.096 ± 0.214 3571.05 ± 40.38 338.609 PA-I 21.826 ± 0.239 6760.70 ± 47.89 4.296 PA-II 21.478 ± 0.237 7068.40 ± 51.32 4.536 DUOL 19.389 ± 0.227 7089.85 ± 38.93 10.122 Table 6: Results on w7a (n=24292, d=300). Algorithm Mistake (%) Support Vectors (#) Time (s) Perceptron 4.027 ± 0.095 994.40 ± 23.57 1.233 ROMMA 4.158 ± 0.087 1026.75 ± 21.51 13.860 agg-ROMMA 3.500 ± 0.061 2317.70 ± 58.92 137.975 ALMA2(0.9) 3.518 ± 0.071 1031.05 ± 15.33 13.245 PA-I 3.701 ± 0.057 2839.60 ± 41.57 3.732 PA-II 3.571 ± 0.053 3391.50 ± 51.94 4.719 DUOL 2.771 ± 0.041 1699.80 ± 22.78 2.677 5 Conclusions This paper presented a novel “double updating” approach to online learning named as “DUOL”, which not only updates the weight of the newly added support vector, but also adjusts the weight of one existing support vector that seriously conflicts with the new support vector. We show that the mistake bound for an online classification task can be significantly reduced by the proposed DUOL algorithms. We have conducted an extensive set of experiments by comparing with a number of competing algorithms. Promising empirical results validate the effectiveness of our technique. Future work will address issues of multi-class double updating online learning. Acknowledgements This work was supported in part by MOE tier-1 Grant (RG67/07), NRF IDM Grant (NRF2008IDM-IDM-004018), National Science Foundation (IIS-0643494), and US Navy Research Office (N00014-09-1-0663). 7 0 200 400 600 800 1000 0.25 0.3 0.35 0.4 0.45 0.5 Number of samples Online average rate of mistakes Perceptron ROMMA agg−ROMMA ALMA2(0.9) PA−I PA−II Online−SVM DUOL 0 200 400 600 800 1000 0 100 200 300 400 500 600 700 800 Number of samples Online average number of support vectors Perceptron ROMMA agg−ROMMA ALMA2(0.9) PA−I PA−II Online−SVM DUOL 0 200 400 600 800 1000 −3 −2 −1 0 1 2 3 Number of samples average time cost (log10 t) Perceptron ROMMA agg−ROMMA ALMA2(0.9) PA−I PA−II Online−SVM DUOL (a) average rate of mistakes (b) average number of support vectors (c) average time cost (log10 t) Figure 2: Evaluation on the german dataset. The data size is 1000 and the dimensionality is 24. 0 200 400 600 800 1000 0.2 0.25 0.3 0.35 0.4 0.45 0.5 Number of samples Online average rate of mistakes Perceptron ROMMA agg−ROMMA ALMA2(0.9) PA−I PA−II Online−SVM DUOL 0 200 400 600 800 1000 0 100 200 300 400 500 600 700 Number of samples Online average number of support vectors Perceptron ROMMA agg−ROMMA ALMA2(0.9) PA−I PA−II Online−SVM DUOL 0 200 400 600 800 1000 −3 −2 −1 0 1 2 3 Number of samples average time cost (log10 t) Perceptron ROMMA agg−ROMMA ALMA2(0.9) PA−I PA−II Online−SVM DUOL (a) average rate of mistakes (b) average number of support vectors (c) average time cost (log10 t) Figure 3: Evaluation on the splice dataset. The data size is 1000 and the dimensionality is 60. 0 1000 2000 3000 4000 5000 0.16 0.18 0.2 0.22 0.24 0.26 0.28 0.3 0.32 0.34 0.36 Number of samples Online average rate of mistakes Perceptron ROMMA agg−ROMMA ALMA2(0.9) PA−I PA−II Online−SVM DUOL 0 1000 2000 3000 4000 5000 0 500 1000 1500 2000 2500 3000 3500 Number of samples Online average number of support vectors Perceptron ROMMA agg−ROMMA ALMA2(0.9) PA−I PA−II Online−SVM DUOL 0 1000 2000 3000 4000 5000 −3 −2 −1 0 1 2 3 4 5 6 7 8 Number of samples average time cost (log10 t) Perceptron ROMMA agg−ROMMA ALMA2(0.9) PA−I PA−II Online−SVM DUOL (a) average rate of mistakes (b) average number of support vectors (c) average time cost (log10 t) Figure 4: Evaluation on the spambase dataset. The data size is 4601 and the dimensionality is 57. 0 2000 4000 6000 8000 10000 12000 14000 16000 0.19 0.2 0.21 0.22 0.23 0.24 0.25 0.26 0.27 0.28 Number of samples Online average rate of mistakes Perceptron ROMMA agg−ROMMA ALMA2(0.9) PA−I PA−II DUOL 0 2000 4000 6000 8000 10000 12000 14000 16000 0 1000 2000 3000 4000 5000 6000 7000 8000 Number of samples Online average number of support vectors Perceptron ROMMA agg−ROMMA ALMA2(0.9) PA−I PA−II DUOL 0 2000 4000 6000 8000 10000 12000 14000 16000 −2 −1 0 1 2 3 4 Number of samples average time cost (log10 t) Perceptron ROMMA agg−ROMMA ALMA2(0.9) PA−I PA−II DUOL (a) average rate of mistakes (b) average number of support vectors (c) average time cost (log10 t) Figure 5: Evaluation on the a7a dataset. The data size is 16100 and the dimensionality is 123. 0 0.5 1 1.5 2 2.5 x 10 4 0.025 0.03 0.035 0.04 0.045 0.05 0.055 0.06 Number of samples Online average rate of mistakes Perceptron ROMMA agg−ROMMA ALMA2(0.9) PA−I PA−II DUOL 0 0.5 1 1.5 2 2.5 x 10 4 0 500 1000 1500 2000 2500 3000 3500 Number of samples Online average number of support vectors Perceptron ROMMA agg−ROMMA ALMA2(0.9) PA−I PA−II DUOL 0 0.5 1 1.5 2 2.5 x 10 4 −2 −1.5 −1 −0.5 0 0.5 1 1.5 2 2.5 3 3.5 Number of samples average time cost (log10 t) Perceptron ROMMA agg−ROMMA ALMA2(0.9) PA−I PA−II DUOL (a) average rate of mistakes (b) average number of support vectors (c) average time cost (log10 t) Figure 6: Evaluation on the w7a dataset. The data size is 24292 and the dimensionality is 300. 8 References Cavallanti, G., Cesa-Bianchi, N., & Gentile, C. (2007). Tracking the best hyperplane with a simple budget perceptron. Machine Learning, 69, 143–167. Cesa-Bianchi, N., Conconi, A., & Gentile, C. (2004). On the generalization ability of on-line learning algorithms. IEEE Trans. on Inf. Theory, 50, 2050–2057. Cesa-Bianchi, N., & Gentile, C. (2006). Tracking the best hyperplane with a simple budget perceptron. COLT (pp. 483–498). Cheng, L., Vishwanathan, S. V. N., Schuurmans, D., Wang, S., & Caelli, T. (2006). Implicit online learning with kernels. NIPS (pp. 249–256). Crammer, K., Dekel, O., Keshet, J., Shalev-Shwartz, S., & Singer, Y. (2006). Online passiveaggressive algorithms. JMLR, 7, 551–585. Crammer, K., Kandola, J. S., & Singer, Y. (2003). Online classification on a budget. NIPS. Crammer, K., & Singer, Y. (2003). Ultraconservative online algorithms for multiclass problems. JMLR, 3, 951–991. Dekel, O., Shalev-Shwartz, S., & Singer, Y. (2005). The forgetron: A kernel-based perceptron on a fixed budget. NIPS. Dekel, O., Shalev-Shwartz, S., & Singer, Y. (2008). The forgetron: A kernel-based perceptron on a budget. SIAM J. Comput., 37, 1342–1372. Fink, M., Shalev-Shwartz, S., Singer, Y., & Ullman, S. (2006). Online multiclass learning by interclass hypothesis sharing. ICML (pp. 313–320). Freund, Y., & Schapire, R. E. (1999). Large margin classification using the perceptron algorithm. Mach. Learn., 37, 277–296. Gentile, C. (2001). A new approximate maximal margin classification algorithm. JMLR, 2, 213–242. Kivinen, J., Smola, A. J., & Williamson, R. C. (2001a). Online learning with kernels. NIPS (pp. 785–792). Kivinen, J., Smola, A. J., & Williamson, R. C. (2001b). Online learning with kernels. NIPS (pp. 785–792). Li, Y., & Long, P. M. (1999). The relaxed online maximum margin algorithm. NIPS (pp. 498–504). Orabona, F., Keshet, J., & Caputo, B. (2008). The projectron: a bounded kernel-based perceptron. ICML (pp. 720–727). Rosenblatt, F. (1958). The perceptron: A probabilistic model for information storage and organization in the brain. Psychological Review, 65, 386–407. Shalev-Shwartz, S., & Singer, Y. (2006). Online learning meets optimization in the dual. COLT (pp. 423–437). Weston, J., & Bordes, A. (2005). Online (and offline) on an even tighter budget. AISTATS (pp. 413–420). Yang, L., Jin, R., & Ye, J. (2009). Online learning by ellipsoid method. ICML (p. 145). 9
2009
2
3,703
Differential Use of Implicit Negative Evidence in Generative and Discriminative Language Learning Anne S. Hsu Thomas L. Griffiths Department of Psychology University of California, Berkeley Berkeley, CA 94720 {showen,tom griffiths}@berkeley.edu Abstract A classic debate in cognitive science revolves around understanding how children learn complex linguistic rules, such as those governing restrictions on verb alternations, without negative evidence. Traditionally, formal learnability arguments have been used to claim that such learning is impossible without the aid of innate language-specific knowledge. However, recently, researchers have shown that statistical models are capable of learning complex rules from only positive evidence. These two kinds of learnability analyses differ in their assumptions about the distribution from which linguistic input is generated. The former analyses assume that learners seek to identify grammatical sentences in a way that is robust to the distribution from which the sentences are generated, analogous to discriminative approaches in machine learning. The latter assume that learners are trying to estimate a generative model, with sentences being sampled from that model. We show that these two learning approaches differ in their use of implicit negative evidence – the absence of a sentence – when learning verb alternations, and demonstrate that human learners can produce results consistent with the predictions of both approaches, depending on how the learning problem is presented. 1 Introduction Languages have a complex structure, full of general rules with idiosyncratic exceptions. For example, the causative alternation in English allows a class of verbs to take both the transitive form, “I opened the door”, and the intransitive form, “The door opened”. With other verbs, alternations are restricted, and they are grammatical in only one form. For example, “The rabbit disappeared” is grammatical whereas “I disappeared the rabbit” is ungrammatical. There is a great debate over how children learn language, related to the infamous “poverty of the stimulus” argument [1, 2, 3, 4]. A central part of the debate arises from the fact that a child mostly learns language only by hearing adults speak grammatical sentences, known as positive evidence. Children are believed to learn language mostly from positive evidence because research has found that children rarely receive indications from parents that a sentence is not grammatical, and they ignore these indications when they do recieve them. An explicit indication that a sentence is not grammatical is known as negative evidence [5, 6, 7]. Yet, speaking a language speaking involves the generalization of linguistic patterns into novel combinations of phrases that have never been heard before. This presents the following puzzle: How do children eventually learn that certain novel linguistic generalizations are not allowed if they are not explicitly told? There have been two main lines of analyses addressing this question. These analyses have taken two different perspectives on the basic task involved in language learning, and have yielded quite different results. One perspective is that language is acquired by learning rules for identifying grammatically acceptable and unacceptable sentences in a way that is robust to the actual distribution of observed sentences. From this perspective, Gold’s theorem [8] asserts that languages with infinite recursion, such as most human languages, are impossible to learn from positive evidence alone. In particular, linguistic exceptions, such as the restrictions on verb alternations mentioned above, are cited as being impossible to learn empirically. More recent analyses yield similar results, while making weaker assumptions about the desired outcome of learning (for a review, see [9]). In light of this, it has been argued that child language learning abilities can only be explained by the presence of innate knowledge specific to language [3, 4, 10]. On the other side of the debate, results indicating that relatively sophisticated linguistic representations such as probabilistic context-free grammars can be learned from positive evidence have been obtained by viewing language acquisition as a process of forming a probabilistic model of the linguistic input, under the assumption that the observed data are sampled from this model [11, 12, 13]. In addition to these general theoretical results, statistical learning models have been shown to be capable of learning exceptions in language from positive examples only in a variety of domains, including verb alternations [14, 15, 16, 17, 18, 19]. Furthermore, previous experimental work has shown that humans are capable of learning linguistic exceptions in an artificial language without negative evidence [20], bearing out the predictions of some of these models. One key difference between these two perspectives on learning is in the assumptions that they make about how observed sentences are generated. In the former approach, the goal is to learn to identify grammatical sentences without making assumptions about the distribution from which they are drawn. In the latter approach, the goal is to learn a probability distribution over sentences, and the observed sentences are assumed to be drawn from that distribution. This difference is analogous to the distinction between discriminative and generative models in machine learning (e.g., [21]). The stronger distributional assumptions made in the generative approach result in a less robust learner, but make it possible to learn linguistic exceptions without negative evidence. In particular, generative models can exploit the “implicit negative evidence” provided by the absence of a sentence: the assumption that sentences are generated from the target probability distribution means that not observing a sentence provides weak evidence that it does not belong to the language. In contrast, discriminative models that seek to learn a function for labelling sentences as grammatical or ungrammatical are more robust to the distribution from which the sentences are drawn, but their weaker assumptions about this distribution mean that they are unable to exploit implicit negative evidence. In this paper, we explore how these two different views of learning are related to human language acquisition. Here we focus on the task of learning an artifical language containing both alternating and non-alternating verbs. Our goal is to use modeling and human experiments to demonstrate that the opposing conclusions from the two sides of the language acquisition debate can be explained by a difference in learning approach. We compare the learning performance of a hierarchical Bayesian model [15], which takes a generative approach, with a logistic regression model, which takes a discriminative approach. We show that without negative evidence, the generative model will judge a verb structure that is absent in the input to be ungrammatical, while the discriminative model will judge it to be grammatical. We then conduct an experiment designed to encourage human participants to adopt either a generative or discriminative language learning perspective. The experimental results indicate that human learners behave in accordance with model predictions: absent verb structures are rejected as ungrammatical under a generative learning perspective and accepted as grammatical under a discriminative one. Our modeling comparisons and experimental results contribute to the language acquisition debate in the following ways: First, our results lend credence to conclusions from both sides of the debate by showing that linguistic exceptions appear either unlearnable or learnable, depending on the learning perspective. Second, our results indicate that the opposing conclusions about learnability can indeed be attributed to whether one assumes a discriminative or a generative learning perspective. Finally, because our generative learning condition is much more similar to actual child language learning, our results lend weight to the argument that children can learn language empirically from positive input. 2 Models of language learning: Generative and discriminative Generative approaches seek to infer the probability distribution over sentences that characterizes the language, while discriminative models seek to identify a function that indicates whether a sentence is grammatical. General results exist that characterize the learnability of languages from these two α, ββββ λ, µ θ4 θ3 θ2 θ1 y4 y3 y2 y1 S1 S1 S2 S2 S2 S1 S1 S2… S2 S2 S2 S2 S2 S2 S2 S2 … S1 S1 S1 S1 S1 S1 S1 S1 … S1 S1 S1 S1 S1 S1 S1 S1 … Figure 1: A hierarchical Bayesian model for learning verb alternations. Figure adapted from [15]. perspectives, but there are few direct comparisons of generative and discriminative approaches to the same specific language learning situation. Here, we compare a simple generative and discriminative model’s predictions of how implicit negative evidence is used to learn verb alternations. 2.1 Generative model: Hierarchical Bayes In the generative model, the problem of learning verb alternations is formulated as follows. Assume we have a set of m verbs, which can occur in up to k different sentence structures. Restricting ourself to positive examples for the moment, we observe a total of n sentences x1, . . . xn. The ni sentences containing verb i can be summarized in a k-dimensional vector yi containing the verb occurrence frequency in each of the k sentence structures. For example if we had three possible sentence structure types and verb i occurred in the first type two times, the second type four times and the third type zero times, yi would be [2, 4, 0] and ni would be 6. We model these data using a hierarchical Bayesian model (HBM) originally introduced in [15], also known to statisticians as a Dirichlet-Multinomial model [22]. In statistical notation the HBM is θi ∼ Dirichlet(αβ) α ∼ Exponential(λ) yi|ni ∼ Multinomial(θi) β ∼ Dirichlet(µ) where yi is the data (i.e. the observed frequency of different grammatical sentence structures for verb i) given ni occurrences of that verb, as summarized above. θi captures the distribution over sentence structures associated with verb i, assuming that sentences are generated independently and structure k is generated with probability θi k. The hyperparameters α and β represent generalizations about the kinds of sentence structures that typically occur. More precisely, β represents the distribution of sentence structures across all verbs, with βk being the mean probability of sentence structure k, while α represents the extent to which verbs tends to appear in only one sentence structure type. In this model, the number of verbs and the number of possible sentence structures are both fixed. The hyperparameters α and β are learned, and the prior on these hyperparameters is fixed by setting λ = 1 and µ = 1 for all i. This prior asserts a weak expectation that the range of α and β do not contain extreme values. The model is fit to the data by computing the posterior distribution p(θi|yi) = R α,β p(θi|α, β, y)p(α, β|y) dα dβ. The posterior can be estimated using a Markov Chain Monte Carlo (MCMC) algorithm. Following [15], we use Gaussian proposals on log(α), and draw proposals for β from a Dirichlet distribution with the current β as its mean. 2.2 Discriminative model: Logistic regression For our discriminative model we use logistic regression. A logistic regression model can be used to learn a function that classifies observations into two classes. In the context of language learning, the observations are sentences and the classification problem is deciding whether each sentence is grammatical. As above, we observe n sentences, x1, . . . xn, but now each sentence xj is associated with a variable cj indicating whether the sentence is grammatical (cj = +1) or ungrammatical (cj = −1). Each sentence is associated with a feature vector f(xj) that uses dummy variables to encode the verb, the sentence structure, and the interaction of the two (ie. each sentence’s particular verb and sentence structure combination). With m verbs and k sentence structures, this results in m verb features, k sentence structure features, and mk interaction features, each of which take the value 1 when they match the sentence and 0 when they do not. For example, a sentence containing the second of four verbs in the first of three sentence structures would be encoded with the binary feature vector 0100100000100000000. The logistic regression model learns which features of sentences are predictive of grammaticality. This is done by defining the probability of grammaticality to be p(cj = +1|xj, w, b) = 1/(1 + exp{−wT f(xj) −b}) (1) where w and b are the parameters of the model. w and b are estimated by maximizing the log likelihood Pn j=1 log p(cj|xj, w, b). Features for which the likelihood is uninformative (e.g. features that are not observed) have weights that are set to zero. 3 Testing the models on an artificial language To examine the predictions that these two models make about the use of implicit negative evidence in learning verb alternations, we applied them to a simple artificial language based on that used in [20]. This language has four transitive verbs and three possible sentence structures. Three of the verbs only appear in one sentence structure (non-alternating), while one verb appears in two possible sentence structures (alternating). The language consisted of three-word sentences, each containing a subject (N1), object (N2) and verb (V), with the order depending on the particular sentence structure. 3.1 Vocabulary The vocabulary was a subset of that used in [20]. There were three two-syllable nouns, each beginning with a different consonant, referring to three cartoon animals: blergen (lion), nagid (elephant), tombat (giraffe). Noun referents are fixed across participants. The four one-syllable verbs were: gund, flern, semz, and norg, corresponding to the four transitive actions: eclipse, push-to-side, explode and jump on. While the identity of the nouns and verbs is irrelevant to the models, we developed this language with the intent of also examining human learning, as described below. With human learners, the mapping of verbs to actions was randomly selected for each participant. 3.2 Syntax and grammar In our language of three-word sentences, a verb could appear in 3 different positions (as the 1st, 2nd or 3rd word). We constrained the possible sentences such that the subject, N1, always appeared before the object, N2. This leaves us with three possible sentence structures, S1,S2, and S3, each of which corresponded to one of the following word orders: N1-N2-V, N1-V-N2 and V-N1-N2. In our experiment, the mapping from sentence structure to word order was randomized among participants. For example, S1 might correspond to N1-N2-V for one participant or it might correspond to V-N1N2 for another participant. There was always one sentence structure, which we denote S3, that was never grammatical for any of the verbs. For S1 and S2, grammaticality varied depending on the verb. We designed our language to have 1 alternating verb and 3 non-alternating verbs. One of the three non-alternating verbs was only grammatical in S1. The other two non-alternating verbs were only grammatical in S2. For example, let’s consider the situation where S1 is N1-V-N2, S2 is N1-N2-V and S3 is V-N1-N2. If flern was an alternating verb, both nagid flern tombat and nagid tombat flern would be allowed. If semz was non-alternating, and only allowed in S2, nagid tombat semz would be grammatical and nagid tombat semz would be ungrammatical. In this example, flern nagid tombat and semz nagid tombat are both ungrammatical. The language is summarized in Table 1. 3.3 Modeling results The generative hierarchical Bayesian model and the discriminative logistic regression model outlined in the previous section were applied to a corpus of sentences generated from this language. Sentence Structure Verb S1 S2 S3 V1 +(9) +(9) -(9) V2 -(3) +(18) -(3) V3 +(18) -(3) -(3) V4 +(18) ?(0) -(6) Table 1: Grammaticality of verbs. + and - indicate grammatical and ungrammatical respectively, while ? indicates that grammaticality is underdetermined by the data. The number in parentheses is the frequency with which each sentence was presented to model and human learners in our experiment. Verb V4 was never shown in sentence structure S2. Grammaticality predictions for sentences containing this verb were used to explore the interpretation of implicit negative evidence. S1 S2 S3 0 0.5 1 a) V1 (S1,S2) Grammaticality S1 S2 S3 0 0.5 1 b) V2 (S2) S1 S2 S3 0 0.5 1 c) V3 (S1) S1 S2 S3 0 0.5 1 d) V4 (S1) generative discriminative Figure 2: Predicted grammaticality judgments from generative and discriminative models. In parentheses next to the verb index in the title of each plot is the sentence structure(s) that were shown to be grammatical for that verb in the training corpus. The frequencies of each verb and sentence structure combination are also shown in Table 1. We were particularly interested in the predictions that the two models made about the grammaticality of verb V4 in sentence structure S2, since this combination of verb and sentence structure never occurs in the data. As a consequence, a generative learner receives implicit negative evidence that S2 is not grammatical for V4, while a discriminative learner receives no information. We trained the HBM on the grammatical instances of the sentences, using 10,000 iterations of MCMC. The results indicate that V1 is expected to occur in both S1 and S2 50% of the time, while all other verbs are expected to occur 100% of the time in the one sentence structure for which they are grammatical, accurately reflecting the distribution in our language input. Predictions for grammaticality are extracted from the HBM model as follows: The ith verb is grammatical in sentence structure k if the probability of sentence structure k, θi k is greater than or equal to ǫ and ungrammatical otherwise, where ǫ is a small number. Theoretically, ǫ should be set so that any sentence observed once will be considered grammatical. Here, posterior values of θi k were highly peaked about 0.5 for V1 in S1 and S2, and either 0 or 1 for other verb and sentence structure combinations, resulting in clear grammaticality predictions. These are shown in Figure 2. Critically, the model predicts that V4 in S2 is not grammatical. Logistic regression was performed using all sentences in our corpus, both grammatical and ungrammatical. Predictions for grammaticality from the logistic regression model were read out directly from p(cj = +1|xj, w, b). The results are shown in Figure 2. While the model has not seen V4 in S2, and has consequently not estimated a weight for the feature that uniquely identifies this sentence, it has seen 27 grammatical and 3 ungrammatical instances of S2, and 18 grammatical and 6 ungrammatical instances of V4, so it has learned positive weights for both of these features of sentences. As a consequence, it predicts that V4 in S2 is grammatical. 4 Generative and discriminative learning in humans The simulations above illustrate how generative and discriminative approaches to language learning differ in their treatment of implicit negative evidence. This raises the question of whether a similar difference can be produced in human learners by changing the nature of the language learning task. We conducted an experiment to explore whether this is the case. In our experiment, participants learned the artificial language used to generate the model predictions in the previous section by watching computer animated scenes accompanied by spoken and written sentences describing each scene. Participants were also provided with information about whether the sentence was grammatical or ungrammatical. Participants were assigned to one of two conditions, which prompted either generative or discriminative learning. Participants in both conditions were exposed to exactly the same sentences and grammaticality information. The two conditions differed only in how grammaticality information presented. 4.1 Participants A total of 22 participants were recruited from the community at the University of California, Berkeley. 4.2 Stimuli As summarized in Table 1, participants viewed each of the 4 verbs 24 times, 18 grammatical sentences and 6 ungrammatical sentences. The alternating verb was shown 9 times each in S1 and S2 and 6 times in S3. The non-alternating verbs were shown 18 times each in their respectively grammatical sentence structures and 3 times each in the 2 ungrammatical structures. Presentation of sentences was ordered as follows: Two chains of sentences were constructed, one grammatical and one ungrammatical. The grammatical chain consisted of 72 sentences (18 for each verb) and the ungrammatical chain consisted of 24 sentences (6 for each verb). For each sentence chain, verbs were presented cyclically and randomized within cycles. For the grammatical chain, V1 occurrences of S1 and S2 were cycled through in semi-random order (verbs V2-V4 appeared grammatically in only one sentence construction). Similarly, for the ungrammatical chain, V2 and V3 cycled semirandomly through occurrences of S1 and S3 and S2 and S3 respectively (verbs V1 and V4 only appeared ungrammatically in S3). While participants were being trained on the language, presentation of one sentence from the ungrammatical chain was randomly interleaved within every three presentations of sentences from the grammatical chain. Subject-object noun pairs were randomized for each verb across presentations. There were a total of 96 training sentences. 4.3 Procedure Participants in both conditions underwent pre-training trials to acquaint them with the vocabulary. During pre-training they heard and saw each word along with pictures of each noun and scenes corresponding to each verb along with spoken audio of each noun/verb. All words were cycled through three times during pre-training. During the main experiment, all participants were told they were to learn an artificial language. They all saw a series of sentences describing animated scenes where a subject noun performed an action on an object noun. All sentences were presented in both spoken and written form. 4.3.1 Generative learning condition In the generative learning condition, participants were told that they would listen to an adult speaker who was always spoke grammatical sentences and a child speaker who always spoke ungrammatically. Cartoon pictures of either the adult or child speaker accompanied each scene. The child speaker’s voice was low-pass filtered to create a believably child-like sound. We hypothesized that participants in this condition would behave similarly to a generative model: they would build a probabilistic representation of the language from the grammatical sentences produced by the adult speaker. 4.3.2 Discriminative learning condition In the discriminative learning condition, participants were presented with spoken and written sentences describing each scene and asked to choose whether each of the presented sentences were grammatical or not. They were assured that only relevant words were used and they only had to figure out if the verb occurred in a grammatical location. Participants then received feedback on their choice. For example, if a participant answered that the sentence was grammatical, they would see either “Yes, you were correct. This sentence is grammatical!” or “Sorry, you were incorrect. This S1 S2 S3 0 0.5 1 a) V1 (S1,S2) Proportion grammatical S1 S2 S3 0 0.5 1 b) V2 (S2) S1 S2 S3 0 0.5 1 c) V3 (S1) S1 S2 S3 0 0.5 1 d) V4 (S1) generative discriminative Figure 3: Human grammar judgments, showing proportion grammatical for each sentence structure. sentence is ungrammatical!” The main difference from the generative condition is that in the discriminative condition, the presented sentences are assumed to be chosen at random, whereas in the generative learning condition, sentences from the adult speaker are assumed to have been sampled from the language distribution. We hypothesized that participants in the discriminative condition would behave similarly to a discriminative model: they would use feedback about both grammatical and ungrammatical sentences to formulate rules about what made sentences grammatical. 4.3.3 Testing After the language learning phase, participants in both conditions were subjected to a grammar test. In this testing phase, participants were shown a series of written sentences and asked to rate the sentence as either grammatical or ungrammatical. Here, all sentences had blergen as the subject and nagid as the object. All verb-sentence structure combinations were shown twice. Additionally the verb V4 was shown an extra two times in S2 as this was the crucial generalization that we were testing. Participants also underwent a production test in which they were shown a scene and asked to type in a sentence describing that scene. Because we did not want this to be a memory test, we displayed the relevant verb on the top of the screen. Pictures of all the nouns, with their respective names below, were also available on the bottom of the screen for reference. Four scenes were presented for each verb, using subject-object noun pairs that were cycled through random. Verbs were also cycled through at random. 4.4 Results Our results show that participants in both conditions were largely able to learn much of the grammar structure. Hoewever, there were significant differences between the generative and discriminative conditions (see Figure 3). Most notably, the generative learners overwhelmingly judged verb V4 to be ungrammatical in S2, while the majority of discriminative learners deemed V4 in to be grammatical in S2 (see Figure 3d). This difference between conditions was highly statistically significant by a Pearson’s χ2 test (χ2(1) = 7.28, p = 0.007). This difference aligned with the difference in the predictions of the HBM (generative) model and the logistic regression (discriminative) model discussed earlier. Our results strongly suggest participants in the generative condition were learning language with a probabilistic perspective that allowed them to learn restrictions on verb alternations by using implicit negative evidence whereas participants in the discriminative condition made sampling assumptions that did not allow them to learn the alternation restriction. Another difference we found between the two conditions was that discriminative learners were more willing to consider verbs to be alternating (i.e. allow those verbs to be grammatical in two sentence structures.) This is evidenced by the fact that participants in the generative condition rated occurrences of V1 (the alternating verb) in S1 and S2 as grammatical only 68% and 72% of the time. This is because many participants judged V1 to be grammatical in either S1 or S2 and not both. On the other hand, participants in the discriminative condition rated occurrences of V1 in S1 and S2 grammatical 100% of the time (see Figure 3a). Pearson’s χ2 tests for the difference between conditions for grammaticality of V1 in S1 and S2 were marginally significant, with χ2(1) = 4.16, p = .04 and χ2(1) = 3.47, p = 0.06 respectively. From post-experiment questioning, we learned that many participants in the generative condition did not think verbs would occur in two possible sentence S1 S2 S3other 0 0.5 1 d) V4 (S1) Production S1 S2 S3other 0 0.5 1 b) V2 (S2) S1 S2 S3other 0 0.5 1 c) V3 (S1) S1 S2 S3other 0 0.5 1 d) V4 (S1) generative discriminative Figure 4: Human production data, showing proportion of productions in each sentence structure. structures. None of the participants in the discriminative condition were constrained by this assumption. Why the two conditions prompted significantly different prior assumptions about the prevalence of verb alternations will be a question for future research, but is particularly interesting in the context of the HBM, which can learn a prior expressing similar constraints. Production test results showed that participants tended to use verbs in the sentences structure that they heard them in (see Figure 4). Notably, even though the majority of the learners in the discriminative condition rated verb V4 in S2 as grammatical, only 20% of the productions of V4 were in S2. This is in line with previous results that show that how often a sentence structure is produced is proportional to how often that structure is heard, and rarely heard structures are rarely produced, even if they are believed to be grammatical [20]. 5 Discussion We have shown that artificial language learners may or may not learn restrictions on verb alternations, depending on the learning context. Our simulations of generative and discriminative learners made predictions about how these approaches deal with implicit negative evidence, and these predictions were borne out in an experiment with human learners. Participants in both experimental conditions viewed exactly the same sentences and were told whether each sentence was grammatical or ungrammatical. What varied between conditions was the way the the grammaticality information was presented. In the discriminative condition, participants were given yes/no grammaticality feedback on sentences presumed to be sampled at random. Because of the random sampling assumption, the absence of a verb in a given sentence structure did not provide implicit negative evidence against the grammaticality of that construction. In contrast, participants in the generative condition judged the unseen verb-sentence structure to be ungrammatical. This is in line with the idea that they had sought to estimate a probability distribution over sentences, under the assumption that the sentences they observed were drawn from that distribution. Our simulations and behavioral results begin to clarify the connection between theoretical analyses of language learnability and human behavior. In showing that people learn differently under different construals of the learning problem, we are able to examine how well normal language learning corresponds to the learning behavior we see in these two cases. Participants in our generative condition heard sentences spoken by a grammatical speaker, similar to the way children learn by listening to adult speech. In post-experiment questioning, generative learners also stated that they ignored all negative evidence from the ungrmamatical child speaker, similar to the way children ignore negative evidence in real language acquisition. These observations support the idea that human language learning is better characterized by the generative approach. Establishing this connection to the generative approach helps to identify the strengths and limitations of human language learning, leading to the expectation that human learners can use implicit negative evidence to identify their language, but will not be as robust to variation in the distribution of observed sentences as a discriminative learner might be. Acknowledgments. This work was supported by grant SES-0631518 from the National Science Foundation. References [1] C. L. Baker. Syntactic theory and the projection problem. Linguistic Inquiry, 10:533–538, 1979. [2] C. L. Baker and J. J. McCarthy. The logical problem of language acquisition. MIT Press, 1981. [3] N. Chomsky. Aspects if the theories of syntax. MIT Press, 1965. [4] S. Pinker. Learnability and Cognition: The acquisition of argument structure. MIT Press, 1989. [5] M. Bowerman. The ’No Negative Evidence’ Problem: How do children avoid constructing an overly general grammar? In J. Hawkins, editor, Explaining Language Universals, pages 73–101. Blackwell, New York, 1988. [6] R. Brown and C. Hanlon. Derivational complexity and order of acquisition in child speech. Wiley, 1970. [7] G. F. Marcus. Negative evidence in language acquisition. Cognition, 46:53–85, 1993. [8] E. M. Gold. Language identification in the limit. Information and Control, 16:447–474, 1967. [9] M. A. Nowak, N. L. Komarova, and P. Niyogi. Computational and evolutionary aspects of language. Nature, 417:611–617, 2002. [10] S. Crain and L. D. Martin. An introduction to linguistic theory and language acquisition. Blackwell, 1999. [11] D. Angluin. Identifying languages from stochastic examples. Technical Report YALEU/DCS/RR-614, Yale University, Department of Computer Science, 1988. [12] J. J. Horning. A study of grammatical inference. PhD thesis, Stanford University, 1969. [13] N. Chater and P. Vitanyi. “Ideal learning” of natural language: Positive results about learning from positive evidence. Journal of Mathematical Psychology, 51:135–163, 2007. [14] M. Dowman. Addressing the learnability of verb subcategorizations with Bayesian inference. In Proceedings of the 22nd Annual Conference of the Cognitive Science Society, 2005. [15] D. Kemp, A. Perfors, and J. Tenenbaum. Learning overhypothesis with hierarchical Bayesian models. Developmental Science, 10:307–321, 2007. [16] P. Langley and S. Stromsten. Learning context-free grammars with a simplicity bias. In Proceedings of the 11th European Conference on Machine Learning, 2000. [17] L. Onnis, M. Roberts, and N. Chater. Simplicity: A cure for overgeneralizations in language acquisition? In Proceedings of the 24th Annual Conference of the Cognitive Science Society, pages 720–725, 2002. [18] A. Perfors, J. Tenenbaum, and T. Regier. Poverty of the stimulus: A rational approach? In Proceedings of the 28th Annual Conference of the Cognitive Science Society, pages 664–668, 2006. [19] A. Stolcke. Bayesian learning of probabilistic language models. PhD thesis, UC Berkeley, 1994. [20] E. Wonnacott, E. Newport, and M. Tanenhaus. Acquiring and processing verb argument structure: Distributional learning in a miniature language. Cognitive Psychology, 56:165–209, 2008. [21] A. Y. Ng and M. Jordan. On discriminative vs. generative classifiers: A comparison of logistic regression and naive Bayes. In Advances in Neural Information Processing Systems 17, 2001. [22] A. Gelman, J. B. Carlin, H. S. Stern, and D. B. Rubin. Bayesian data analysis. Chapman Hall, 2003.
2009
20
3,704
Unsupervised Feature Selection for the k-means Clustering Problem Christos Boutsidis Department of Computer Science Rensselaer Polytechnic Institute Troy, NY 12180 boutsc@cs.rpi.edu Michael W. Mahoney Department of Mathematics Stanford University Stanford, CA 94305 mmahoney@cs.stanford.edu Petros Drineas Department of Computer Science Rensselaer Polytechnic Institute Troy, NY 12180 drinep@cs.rpi.edu Abstract We present a novel feature selection algorithm for the k-means clustering problem. Our algorithm is randomized and, assuming an accuracy parameter ϵ ∈(0, 1), selects and appropriately rescales in an unsupervised manner Θ(k log(k/ϵ)/ϵ2) features from a dataset of arbitrary dimensions. We prove that, if we run any γ-approximate k-means algorithm (γ ≥1) on the features selected using our method, we can find a (1 + (1 + ϵ)γ)-approximate partition with high probability. 1 Introduction Clustering is ubiquitous in science and engineering, with numerous and diverse application domains, ranging from bioinformatics and medicine to the social sciences and the web [15]. Perhaps the most well-known clustering algorithm is the so-called “k-means” algorithm or Lloyd’s method [22], an iterative expectation-maximization type approach, which attempts to address the following objective: given a set of points in a Euclidean space and a positive integer k (the number of clusters), split the points into k clusters so that the total sum of the (squared Euclidean) distances of each point to its nearest cluster center is minimized. This optimization objective is often called the k-means clustering objective. (See Definition 1 for a formal discussion of the k-means objective.) The simplicity of the objective, as well as the good behavior of the associated algorithm (Lloyd’s method [22, 28]), have made k-means enormously popular in applications [32]. In recent years, the high dimensionality of the modern massive datasets has provided a considerable challenge to k-means clustering approaches. First, the curse of dimensionality can make algorithms for k-means clustering very slow, and, second, the existence of many irrelevant features may not allow the identification of the relevant underlying structure in the data [14]. Practitioners addressed such obstacles by introducing feature selection and feature extraction techniques. It is worth noting that feature selection selects a small subset of actual features from the data and then runs the clustering algorithm only on the selected features, whereas feature extraction constructs a small set of artificial features and then runs the clustering algorithm on the constructed features. Despite the significance of the problem, as well as the wealth of heuristic methods addressing it (see Section 3), there exist no provably accurate feature selection methods and extremely few provably accurate feature extraction methods for the k-means clustering objective (see Section 3.1 for the later case). 1 Our work here addresses this shortcoming by presenting the first provably accurate feature selection algorithm for k-means clustering. Our algorithm constructs a probability distribution for the feature space, and then selects a small number of features (roughly k log(k), where k is the number of clusters) with respect to the computed probabilities. (See Section 2 for a detailed description of our algorithm.) Then, we argue that running k-means clustering algorithms on the selected features returns a constant-factor approximate partition to the optimal. (See Theorem 1 in Section 2.) We now formally define the k-means clustering problem using the so-called cluster indicator matrix. Also, recall that the Frobenius norm of a matrix (denoted by ∥·∥F ) is equal to the square root of the sum of the squares of its elements. (See also Section 4.1 for useful notation.) Definition 1 [THE K-MEANS CLUSTERING PROBLEM] Given a matrix A ∈Rn×d (representing n points – rows – described with respect to d features – columns) and a positive integer k denoting the number of clusters, find the n × k indicator matrix Xopt such that Xopt = arg min X∈X A −XXT A 2 F . (1) The optimal value of the k-means clustering objective is Fopt = min X∈X A −XXT A 2 F = A −XoptXT optA 2 F . (2) In the above X denotes the set of all n × k indicator matrices X. We briefly expand on the notion of an n × k indicator matrix X. Such matrices have exactly one non-zero element per row, which denotes cluster membership. Equivalently, for all i = 1, . . . , n and j = 1, . . . , k, the i-th row (point) of A belongs to the j-th cluster if and only if Xij is non-zero; in particular Xij = 1/√sj, where sj is the number of points in the corresponding cluster (i.e. the number of non-zero elements in the j-th column of X). Note that the columns of X are normalized and pairwise orthogonal so that their Euclidean norm is equal to one, and XT X = Ik, where Ik is the k × k identity matrix. An example of such an indicator matrix X representing three points (rows in X) belonging to two different clusters (columns in X) is given below; note that the points corresponding to the first two rows of X belong to the first cluster (s1 = 2) and the other point to the second cluster (s2 = 1): X =   1/ √ 2 0 1/ √ 2 0 0 1/ √ 1  . The above definition of the k-means objective is exactly equivalent with the standard definition of k-means clustering [28]. To see this notice that A −XXT A 2 F = ∑n i=1 ||A(i) −X(i)XT A||2 2, while for i = 1, ..., n, X(i)XT A denotes the centroid of the cluster the i-th point belongs to. In the above, A(i) and X(i) denote the i-th rows of A and X, respectively. 2 The feature selection algorithm and the quality-of-clustering results Algorithm 1 takes as inputs the matrix A ∈Rn×d, the number of clusters k, and an accuracy parameter ϵ ∈(0, 1). It first computes the top-k right singular vectors of A (columns of Vk ∈Rd×k). Using these vectors, it computes the so-called (normalized) leverage scores [4, 24]; for i = 1, ..., d the i-th leverage score equals the square of the Euclidian norm of the i-th row of Vk (denoted by (Vk)(i)). The i-th leverage score characterizes the importance of the i-th feature with respect to the k-means objective. Notice that these scores (see the definition of p′ is in step 2 of Algorithm 1) form a probability distribution over the columns of A since ∑n i=1 pi = 1. Then, the algorithm chooses a sampling parameter r that is equal to the number of (rescaled) features that we want to select. In order to prove our theoretical bounds, r should be fixed to r = Θ(k log(k/ϵ)/ϵ2) at this step (see section 4.4). In practice though, a small value of r, for example r = 10k, seems suficient (see section 5). Having r fixed, Algorithm 1 performs r i.i.d random trials where in each trial one column of A is selected by the following random process: we throw a biased die with d faces with each face corresponding to a column of A, where for i = 1, ..., d the i-th face occurs with probability pi. We select the column of A that corresponds to the face we threw in the current trial. Finally, note that the running time of Algorithm 1 is dominated by the time required to compute the top-k right singular vectors of the matrix A, which is at most O ( min{nd2, n2d} ) . 2 Input: n × d matrix A (n points, d features), number of clusters k, parameter ϵ ∈(0, 1). 1. Compute the top-k right singular vectors of A, denoted by Vk ∈Rd×k. 2. Compute the (normalized) leverage scores pi, for i = 1, . . . , d, pi = (Vk)(i) 2 2 /k. 3. Fix a sampling parameter r = Θ(k log(k/ϵ)/ϵ2). 4. For t = 1, . . . , r i.i.d random trials: • keep the i-th feature with probability pi and multiply it by the factor (rpi)−1/2. 5. Return the n × r matrix ˜A containing the selected (rescaled) features. Output: n × r matrix ˜A, with r = Θ(k log(k/ϵ)/ϵ2). Algorithm 1: A randomized feature selection algorithm for the k-means clustering problem. In order to theoretically evaluate the accuracy of our feature selection algorithm, and provide some a priori guarantees regarding the quality of the clustering after feature selection is performed, we chose to report results on the optimal value of the k-means clustering objective (the Fopt of Definition 1). This metric of accuracy has been extensively used in the Theoretical Computer Science community in order to analyze approximation algorithms for the k-means clustering problem. In particular, existing constant factor or relative error approximation algorithms for k-means (see, for example, [21, 1] and references therein) invariably approximate Fopt. Obviously, Algorithm 1 does not return a partition of the rows of A. In a practical setting, it would be employed as a preprocessing step. Then, an approximation algorithm for the k-means clustering problem would be applied on ˜A in order to determine the partition of the rows of A. In order to formalize our discussion, we borrow a definition from the approximation algorithms literature. Definition 2 [K-MEANS APPROXIMATION ALGORITHM] An algorithm is a “γ-approximation” for the k-means clustering problem (γ ≥1) if it takes inputs A and k, and returns an indicator matrix Xγ that satisfies with probability at least 1 −δγ, A −XγXT γ A 2 F ≤γ min X∈X A −XXT A 2 F . (3) In the above δγ ∈[0, 1) is the failure probability of the algorithm. Clearly, when γ = 1, then Xγ is the optimal partition, which is a well-known NP-hard objective. If we allow γ > 1, then many approximation algorithms exist in the literature. For example, the work of [21], achieves γ = 1 + ϵ, for some ϵ ∈(0, 1] in time linear on the size of the input. Similarly, the k-means++ method of [1] achieves γ = O(log(k)) using the popular Lloyd’s algorithm and a sophisticated randomized seeding. Theorem 1 (see Section 4 for its proof) is our main quality-ofapproximation result for our feature selection algorithm. Theorem 1 Let the n×d matrix A and the positive integer k be the inputs of the k-means clustering problem. Let ϵ ∈(0, 1), and run Algorithm 1 with inputs A, k, and ϵ in order to construct the n × r matrix ˜A containing the selected features, where r = Θ(k log(k/ϵ)/ϵ2). If we run any γ-approximation algorithm (γ ≥1) for the k-means clustering problem, whose failure probability is δγ, on inputs ˜A and k, the resulting cluster indicator matrix X˜γ satisfies with probability at least 0.5 −δγ, A −X˜γXT ˜γ A 2 F ≤(1 + (1 + ϵ)γ) min X∈X A −XXT A 2 F . (4) The failure probability of the above theorem can be easily reduced using standard boosting methods. 3 3 Related work Feature selection has received considerable attention in the machine learning and data mining communities. A large number of different techniques appeared in prior work, addressing the feature selection within the context of both clustering and classification. Surveys include [13], as well as [14], which reports the results of the NIPS 2003 challenge in feature selection. Popular feature selection techniques include the Laplacian scores [16], the Fisher scores [9], or the constraint scores [33]. In this section, we opt to discuss only a family of feature selection methods that are closely related to the leverage scores of our algorithm. To the best of our knowledge, all previous feature selection methods come with no theoretical guarantees of the form that we describe here. Given as input an n×d object-feature matrix A and a positive integer k, feature selection for Principal Components Analysis (PCA) corresponds to the task of identifying a subset of k columns from A that capture essentially the same information as do the top k principal components of A. Jolliffe [18] surveys various methods for the above task. Four of them (called B1, B2, B3, and B4 in [18]) employ the Singular Value Decomposition of A in order to identify columns that are somehow correlated with its top k left singular vectors. In particular, B3 employs exactly the leverage scores in order to greedily select the k columns corresponding to the highest scores; no theoretical results are reported. An experimental evaluation of the methods of [18] on real datasets appeared in [19]. Another approach employing the matrix of the top k right singular vectors of A and a Procrustes-type criterion appeared in [20]. From an applications perspective, [30] employed the methods of [18] and [20] for gene selection in microarray data analysis. From a complementary viewpoint, feature selection for clustering seeks to identify those features that have the most discriminative power among the set of all features. Continuing the aforementioned line of research, many recent papers present methods that somehow employ the SVD of the input matrix in order to select discriminative features; see, for example, [23, 5, 25, 26]. Finally, note that employing the leverage scores in a randomized manner similar to Algorithm 1 has already been proven to be accurate for least-squares regression [8] and PCA [7, 2]. 3.1 Connections with the SVD A well-known property connects the SVD of a matrix and k-means clustering. Recall Definition 1, and notice that XoptXT optA is a matrix of rank at most k. From the SVD optimality [11], we immediately get that (see section 4.1 for useful notation) ∥Aρ−k∥2 F = ∥A −Ak∥2 F ≤ A −XoptXT optA 2 F = Fopt. (5) A more interesting connection between the SVD and k-means appeared in [6]. If the n × d matrix A is projected on the subspace spanned by its top k left singular vectors, then the resulting n × k matrix ˆA = UkΣk corresponds to a mapping of the original d-dimensional space to the optimal k-dimensional space. This process is equivalent to feature extraction: the top k left singular vectors (the columns of Uk) correspond to the constructed features (Σk is a simple rescaling operator). Prior to the work of [6], it was empirically known that running k-means clustering algorithms on the low-dimensional matrix ˆA was a viable alternative to clustering the high-dimensional matrix A. The work of [6] formally argued that if we let the cluster indicator matrix ˆXopt denote the optimal k-means partition on ˆA, i.e., ˆXopt = arg min X∈X ˆA −XXT ˆA 2 F , (6) then using this partition on the rows of the original matrix A is a 2-approximation to the optimal partition, a.k.a., A −ˆXopt ˆXT optA 2 F ≤2 min X∈X A −XXT A 2 F . (7) The above result is the starting point of our work here. Indeed, we seek to replace the k artificial features that are extracted via the SVD with a small number (albeit slightly larger than k) of actual features. On the positive side, an obvious advantage of feature selection vs. feature extraction is the immediate interpretability of the former. On the negative side, our approximation accuracy is slightly worse (2 + ϵ, see Theorem 1 with γ = 1) and we need slightly more than k features. 4 4 The proof of Theorem 1 This section gives the proof of Theorem 1. We start by introducing useful notation; then, we present a preliminary lemma and the proof itself. 4.1 Notation Given an n × d matrix A, let Uk ∈Rn×k (resp. Vk ∈Rd×k) be the matrix of the top k left (resp. right) singular vectors of A, and let Σk ∈Rk×k be a diagonal matrix containing the top k singular values of A. If we let ρ be the rank of A, then Aρ−k is equal to A −Ak, with Ak = UkΣkV T k . ∥A∥F and ∥A∥2 denote the Frobenius and the spectral norm of a matrix A, respectively. A+ denotes the pseudo-inverse of A and ||A+||2 = σmax(A+) = 1/σmin(A), where σmax(X) and σmin(X) denote the largest and the smallest non-zero singular values of a matrix X, respectively. A useful property of matrix norms is that for any two matrices X and Y , ∥XY ∥F ≤∥X∥F ∥Y ∥2 and ∥XY ∥F ≤∥X∥2 ∥Y ∥F ; this is a stronger version of the standard submultiplicavity property for matrix norms. We call P a projector matrix if it is square and P 2 = P. We use E[y] to take the expectation of a random variable y and Pr[e] to take the probability of a random event e. Finally, we abbreviate “independent identically distributed” to “i.i.d” and “with probability” to “w.p”. 4.2 Sampling and rescaling matrices We introduce a simple matrix formalism in order to conveniently represent the sampling and rescaling processes of Algorithm 1. Let S be a d × r sampling matrix that is constructed as follows: S is initially empty. For all t = 1, . . . , r, in turn, if the i-th feature of A is selected by the random sampling process described in Algorithm 1, then ei (a column vector of all-zeros, except for its i-th entry which is set to one) is appended to S. Also, let D be a r × r diagonal rescaling matrix constructed as follows: D is initially an all-zeros matrix. For all t = 1, . . . , r, in turn, if the i-th feature of A is selected, then the next diagonal entry of D is set to 1/√rpi. Thus, by using the notation of this paragraph, Algorithm 1 outputs the matrix ˜A = ASD ∈Rn×r. 4.3 A preliminary lemma and sufficient conditions Lemma 1 presented below gives upper and lower bounds for the largest and the smallest singular values of the matrix V T k SD, respectively. This also implies that V T k SD has full rank. Finally, it argues that the matrix ASD can be used to provide a very accurate approximation to the matrix Ak. Lemma 1 provides four sufficient conditions for designing provably accurate feature selection algorithms for k-means clustering. To see this notice that, in the proof of eqn. (4) given below, the results of Lemma 1 are sufficient to prove our main theorem; the rest of the arguments apply to all sampling and rescaling matrices S and D. Any feature selection algorithm, i.e. any sampling matrix S and rescaling matrix D, that satisfy bounds similar to those of Lemma 1, can be employed to design a provably accurate feature selection algorithm for k-means clustering. The quality of such an approximation will be proportional to the tightness of the bounds of the three terms of Lemma 1 (||V T k SD||2, ||(V T k SD)+||2, and ||E||F ). Where no rescaling is allowed in the selected features, the bottleneck in the approximation accuracy of a feature selection algorithm would be to find a sampling matrix S such that only ||(V T k S)+||2 is bounded from above. To see this notice that, in Lemma 1, for any S, ||V T k S||2 ≤1, and (after applying the submultiplicavity property of Section 4.1 in eqn. 13) ||E||F ≤||(V T k S)+||2||A −Ak||. It is worth emphasizing that the same factor ||(V T k S)+||2 appeared to be the bottleneck in the design of provably accurate column-based lowrank approximations (see, for example, Theorem 1.5 in [17] and eqn. (3.19) in [12]). It is evident from the above observations that other column sampling methods (see, for example, [17, 3, 2] and references therein), satisfying similar bounds to those of Lemma 1, immediately suggest themselves for the design of provably accurate feature selection algorithms for k-means clustering. Finally, equations (101) and (102) of Lemma 4.4 in [31] suggest that a sub-sampled randomized Fourier transform can be used for the design of a provably accurate feature extraction algorithm for k-means clustering, since they provide bounds similar to those of Lemma 1 by replacing the matrices S and D of our algorithm with a sub-sampled randomized Fourier transform matrix (see the matrix R of eqn. (6) in [31]). 5 Lemma 1 Assume that the sampling matrix S and the rescaling matrix D are constructed using Algorithm 1 (see also Section 4.2) with inputs A, k, and ϵ ∈(0, 1). Let co and c1 be absolute constants that will be specified later. If the sampling parameter r of Algorithm 1 satisfies r ≥2c1c2 ok log(c1c2 ok/ϵ2)/ϵ2, then all four statements below hold together with probability at least 0.5: 1. V T k SD 2 = σmax(V T k SD) ≤ √ 1 + λ. 2. (V T k SD)+ 2 = 1/σmin(V T k SD) ≤ √ 1/(1 −λ. 3. V T k SD is a full rank matrix, i.e. rank(V T k SD) = k. 4. Ak = (ASD)(V T k SD)+V T k + E, with ∥E∥F ≤µ ∥A −Ak∥F . To simplify notation, we set λ = ϵ √ 36/c1 and µ = ϵ √ 6/(2c1c2o log(c1c2ok/ϵ2)) + √ 6λ2/(1 −λ). Proof: First, we will apply Theorem 3.1 of [29] for an appropriate random vector y. Toward that end, for i = 1, ..., d, the i-th column of the matrix V T k is denoted by (V T k )(i). We define the random vector y ∈Rk as follows: for i = 1, ..., d Pr[y = yi] = pi, where yi = (1/√pi)(V T k )(i) is a realization of y. This definition of y and the definition of the sampling and rescaling matrices S and D imply that V T k SDDST Vk = 1 r ∑d i=1 yiyT i . Our choice of pi = ||(V T k )(i)||2/k implies that ||y||2 ≤ √ k. Note also that E[yyT ] = ∑d i=1 pi 1 √pi (V T k )(i) 1 √pi (V T k )(i))T = V T k Vk = Ik. Obviously, ||E[yyT ]||2 = 1. Our choice of r allows us to apply Theorem 3.1 of [29], which, combined with the Markov’s inequality on the random variable z = V T k SDDST Vk −Ik 2 implies that w.p at least 1 −1/6, V T k SDDST Vk −Ik 2≤6c0 √ k log(r)/r, for a sufficiently large (unspecified in [29]) constant co. Standard matrix perturbation theory results [11] imply that for i = 1, ..., k V T k SDDST Vk −Ik 2 = σ2 i ( V T k SD ) −1 ≤6co √ k log(r)/r. Our choice of r and simple algebra suffices to show that log(r)/r ≤ϵ2/(c1c2 ok), which implies that the first two statements of the Lemma hold w.p at least 1 −5/6. To prove the third statement, we only need to show that the k-th singular value of V T k SD is positive. Our choice of ϵ ∈(0, 1) and the second condition of the Lemma imply that σk(V T k SD) > 0. To prove the fourth statement: Ak −ASD(V T k SD)+V T k F = Ak −AkSD(V T k SD)+V T k −Aρ−kSD(V T k SD)+V T k F (8) ≤ Ak −AkSD(V T k SD)+V T k F | {z } θ1 + Aρ−kSD(V T k SD)+V T k F | {z } θ2 . (9) In the above, in eqn. (8) we replaced A by Ak+Aρ−k, and in eqn. (9) we used the triangle inequality. The first term of eqn. (9) is bounded by θ1 = Ak −UkΣkV T k SD(V T k SD)+V T k F (10) = Ak −UkΣkIkV T k F = 0. (11) In the above, in eqn. (10) we replaced Ak by UkΣkV T k , and in eqn. (11) we set (V T k SD)(V T k SD)+ = Ik, since V T k SD is a rank-k matrix w.p 1 −5/6. The second term of eqn. (9) is bounded by θ2 = Uρ−kΣρ−kV T ρ−kSD(V T k SD)+V T k F (12) ≤ Σρ−kV T ρ−kSD(V T k SD)+ F . (13) In the above, in eqn. (12) we replaced Aρ−k by Uρ−kΣρ−kV T ρ−k, and in eqn. (13) Uρ−k and V T k can be dropped without increasing a unitarily invariant norm such as the Frobenius matrix norm. If the first three statements of the lemma hold w.p at least 1 −5/6, then w.p at least 1 −1/3, Σρ−kV T ρ−kSD(V T k SD)+ F ≤(ϵ √ 6/(2c1c2o log(c1c2ok/ϵ2)) + √ 6λ2/(1 −λ)) ∥A −Ak∥F . (The proof of this last argument is omitted from this extended abstract.) Finally, notice that the first three statements have the same failure probability 1/6 and the fourth statement fails w.p 1/3; the union bound implies that all four statements hold together with probability at least 0.5. ⋄ 6 4.4 The proof of eqn. (4) of Theorem 1 We assume that Algorithm 1 fixes r to the value specified in Lemma 1; note that this does not violate the asymptotic notation used in Algorithm 1. We start by manipulating the term A −X˜γXT ˜γ A 2 F in eqn. (4). Replacing A by Ak +Aρ−k, and using the Pythagorean theorem (the subspaces spanned by the components Ak −X˜γXT ˜γ Ak and Aρ−k −X˜γXT ˜γ Aρ−k are perpendicular) we get A −X˜γXT ˜γ A 2 F = (I −X˜γXT ˜γ )Ak 2 F | {z } θ2 3 + (I −X˜γXT ˜γ )Aρ−k 2 F | {z } θ2 4 . (14) We first bound the second term of eqn. (14). Since I−X˜γXT ˜γ is a projector matrix, it can be dropped without increasing a unitarily invariant norm. Now eqn. (5) implies that θ2 4 ≤Fopt. (15) We now bound the first term of eqn. (14): θ3 ≤ (I −X˜γXT ˜γ )ASD(VkSD)+V T k F + ∥E∥F (16) ≤ (I −X˜γXT ˜γ )ASD F (VkSD)+ 2 + ∥E∥F (17) ≤ √γ (I −XoptXT opt)ASD F (VkSD)+ 2 + ∥E∥F (18) ≤ √γ (I −XoptXT opt)ASD(VkSD)+ F ∥(VkSD)∥2 (VkSD)+ 2 + ∥E∥F (19) = √γ (I −XoptXT opt)ASD(VkSD)+V T k F | {z } θ5 ∥(VkSD)∥2 (VkSD)+ 2 + ∥E∥F (20) In eqn. (16) we used Lemma 1, the triangle inequality, and the fact that I −˜Xγ ˜XT γ is a projector matrix and can be dropped without increasing a unitarily invariant norm. In eqn. (17) we used submultiplicativity (see Section 4.1) and the fact that V T k can be dropped without changing the spectral norm. In eqn. (18) we replaced X˜γ by Xopt and the factor √γ appeared in the first term. To better understand this step, notice that X˜γ gives a γ-approximation to the optimal k-means clustering of the matrix ASD, and any other n × k indicator matrix (for example, the matrix Xopt) satisfies ( I −X˜γXT ˜γ ) ASD 2 F ≤γ min X∈X (I −XXT )ASD 2 F ≤γ ( I −XoptXT opt ) ASD 2 F . In eqn. (19) we first introduced the k × k identity matrix Ik = (V T k SD)+(V T k SD) (rank(V T k SD) = k) and then we used submultiplicativity (see Section 4.1). In eqn. (20) we introduced V T k without changing the Frobenius norm. We further manipulate the term θ5 of eqn. (20): θ5 ≤ (I −XoptXT opt)Ak F + (I −XoptXT opt)E F (21) ≤ (I −XoptXT opt)AVkV T k F + ||E||F (22) ≤ (1 + µ) √ Fopt (23) In eqn. (21) we used Lemma 1 and the triangle inequality. In eqn. (22) we replaced Ak by AVkV T k and dropped I −XoptXT opt from the second term (I −XoptXT opt is a projector matrix and does not increase the Frobenius norm). In eqn. (23) we dropped the projector matrix VkV T k and used eqn. (5) and Definition 1. Combining equations (20), (23), (5), Lemma 1, and the fact that γ ≥1, we get θ3 ≤√γ ( √ 1 + λ 1 −λ(1 + µ) + µ) | {z } θ6 √ Fopt. Simple algebra suffices to show that for any ϵ ∈(0, 1), for any positive integer k ≥1, and for some sufficiently large constant c1, it is θ6 ≤ √ 1 + ϵ, thus θ2 3 ≤γ(1 + ϵ)Fopt. (24) Combining eqn. (24) with eqns. (14) and (15) concludes the proof of eqn. (4). Using asymptotic notation our choice of r satisfies r = Ω(k log(k/ϵ)/ϵ2). Note that Theorem 1 fails only if Lemma 1 or the γ-approximation k-means clustering algorithm fail, which happens w.p at most 0.5 + δγ. 7 NIPS (k = 3) Bio (k = 3) r = 5k P F .847 .758 .742 .764 r = 10k P F .847 .751 .935 0.726 r = 20k P F .859 .749 1 .709 All P F .881 .747 1 .709 Table 1: Numerics from our experiments (Leverage scores). 0 1000 2000 3000 4000 5000 6000 7000 0 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 features Leverage Scores NIPS all leverage scores best set ( r = 30 ) ruyter hand information code universality sources tishby naftali hebrew neural center Figure 1: Leverage scores for the NIPS dataset. 5 Empirical study We present an empirical evaluation of Algorithm 1 on two real datasets. We show that it selects the most relevant features (Figure 1) and that the clustering obtained after feature selection is performed is very accurate (Table 1). It is important to note that the choice of r in the description of Algorithm 1 is a sufficient - not necessary - condition to prove our theoretical bounds. Indeed, a much smaller choice of r, for example r = 10k, is often sufficient for good empirical results. We first experimented with a NIPS documents dataset (see http://robotics.stanford. edu/˜gal/ and [10]). The data consist of a 184 × 6314 document-term matrix A, with Aij denoting the number of occurrences of the j-th term in the i-th document. Each document is a paper that appeared in the proceedings of NIPS 2001, 2002, or 2003, and belongs to one of the following three topic categories: (i) Neuroscience, (ii) Learning Theory, and (iii) Control and Reinforcement Learning. Each term appeared at least once in one of the 184 documents. We evaluated the accuracy of Algorithm 1 by running the Lloyd’s heuristic1 on the rescaled features returned by our method. In order to drive down the failure probability of Algorithm 1, we repeated it 30 times (followed by the Lloyd’ heuristic each time) and kept the partition that minimized the objective value. We report the percentage of correctly classified objects (denoted by P, 0 ≤P ≤1), as well as the value of the k-means objective (i.e., the value F = ||A −X˜γXT ˜γ A||2 F /||A||2 F of Theorem 1; the division by the ||A||2 F is for normalization). Results are depicted in Table 1. Notice that only a small subset of features suffices to approximately reproduce the partition obtained when all features were kept. In Figure 1 we plotted the distribution of the leverage scores for the 6314 terms (columns) of A; we also highlighted the features returned by Algorithm 1 when the sampling parameter r is set to 10k. We observed that terms corresponding to the largest leverage scores had significant discriminative power. In particular, ruyter appeared almost exclusively in documents of the first and third categories, hand appeared in documents of the third category, information appeared in documents of the first category, and code appeared in documents of the second and third categories only. We also experimented with microarray data showing the expression levels of 5520 genes (features) for 31 patients (objects) having three different cancer types [27]: 10 patients with gastrointestinal stromal tumor, 12 with leiomyosarcoma, and 9 with synovial sarcoma. Table 1 depicts the results from our experiments by choosing k = 3. Note that the Lloyd’s heuristic worked almost perfectly when r was set to 10k and perfectly when r was set to 20k. Experimental parameters set to the same values as in the first experiment. 1We ran 30 iterations of the E-M step with 30 different random initializations and returned the partition that minimized the k-means objective function, i.e. we ran kmeans(A, k, ’Replicates’, 30, ’Maxiter’, 30) in MatLab. 8 References [1] D. Arthur and S. Vassilvitskii. k-means++: the advantages of careful seeding. In Proceedings of the 18th Annual ACM-SIAM Symposium on Discrete algorithms (SODA), pages 1027–1035, 2007. [2] C. Boutsidis, M. W. Mahoney, and P. Drineas. Unsupervised feature selection for Principal Components Analysis. In Proceedings of the 14th Annual ACM SIGKDD Conference (KDD), pages 61–69, 2008. [3] S. Chandrasekaran and I. Ipsen. On rank-revealing factorizations. SIAM Journal on Matrix Analysis and Applications, 15:592–622, 1994. [4] S. Chatterjee and A. S. Hadi. Influential observations, high leverage points, and outliers in linear regression. Statistical Science, 1:379– 393, 1986. [5] Y. Cui and J. G. Dy. Orthogonal principal feature selection. manuscript. [6] P. Drineas, A. Frieze, R. Kannan, S. Vempala, and V. Vinay. Clustering in large graphs and matrices. In Proceedings of the 10th Annual ACM-SIAM Symposium on Discrete Algorithms (SODA), pages 291–299, 1999. [7] P. Drineas, M. Mahoney, and S. Muthukrishnan. Relative-Error CUR Matrix Decompositions. SIAM Journal on Matrix Analysis and Applications, 30:844–881, 2008. [8] P. Drineas, M. Mahoney, and S. Muthukrishnan. Sampling algorithms for ℓ2 regression and applications. In Proceedings of the 17th Annual ACM-SIAM Symposium on Discrete Algorithms (SODA), pages 1127–1136, 2006. [9] D. Foley and J. Sammon, J.W. An optimal set of discriminant vectors. IEEE Transactions on Computers, C-24(3):281–289, March 1975. [10] A. Globerson, G. Chechik, F. Pereira, and N. Tishby. Euclidean Embedding of Co-occurrence Data. The Journal of Machine Learning Research, 8:2265–2295, 2007. [11] G. Golub and C. V. Loan. Matrix Computations. Johns Hopkins University Press, Baltimore, 1989. [12] S. A. Goreinov, E. E. Tyrtyshnikov, and N. L. Zamarashkin A theory of pseudoskeleton approximations. Linear Algebra and Its Applications, 261:1-21, 1997. [13] I. Guyon and A. Elisseeff. An introduction to variable and feature selection. Journal of Machine Learning Research, 3:1157–1182, 2003. [14] I. Guyon, S. Gunn, A. Ben-Hur, and G. Dror. Result analysis of the NIPS 2003 feature selection challenge. In Advances in Neural Information Processing Systems (NIPS) 17, pages 545–552, 2005. [15] J.A. Hartigan. Clustering algorithms. John Wiley & Sons, Inc. New York, NY, USA, 1975. [16] X. He, D. Cai, and P. Niyogi. Laplacian score for feature selection. In Advances in Neural Information Processing Systems (NIPS) 18, pages 507–514. 2006. [17] Y.P. Hong and C.T. Pan. Rank-revealing QR factorizations and the singular value decomposition. Mathematics of Computation, 58:213232, 1992. [18] I. Jolliffe. Discarding variables in a principal component analysis. I: Artificial data. Applied Statistics, 21(2):160–173, 1972. [19] I. Jolliffe. Discarding variables in a principal component analysis. II: Real data. Applied Statistics, 22(1):21–31, 1973. [20] W. Krzanowski. Selection of variables to preserve multivariate data structure, using principal components. Applied Statistics, 36(1):22– 33, 1987. [21] A. Kumar, Y. Sabharwal, and S. Sen. A simple linear time (1 + ϵ)-approximation algorithm for k-means clustering in any dimensions. In Proceedings of the 45th Annual IEEE Symposium on Foundations of Computer Science (FOCS), pages 454–462, 2004. [22] S.P. Lloyd. Least squares quantization in PCM. Unpublished Bell Lab. Tech. Note, portions presented at the Institute of Mathematical Statistics Meeting Atlantic City, NJ, September 1957. Also, IEEE Trans Inform Theory (Special Issue on Quantization), vol IT-28, pages 129-137, March 1982. [23] Y. Lu, I. Cohen, X. S. Zhou, and Q. Tian. Feature selection using principal feature analysis. In Proceedings of the 15th international conference on Multimedia, pages 301–304, 2007. [24] M. W. Mahoney and P. Drineas. CUR Matrix Decompositions for Improved Data Analysis. In Proceedings of the National Academy of Sciences, USA (PNAS), 106, pages 697-702, 2009. [25] A. Malhi and R. Gao. PCA-based feature selection scheme for machine defect classification. IEEE Transactions on Instrumentation and Measurement, 53(6):1517–1525, Dec. 2004. [26] K. Mao. Identifying critical variables of principal components for unsupervised feature selection. IEEE Transactions on Systems, Man, and Cybernetics, 35(2):339–344, April 2005. [27] T. Nielsen et al. Molecular characterisation of soft tissue tumors: A gene expression study. Lancet, 359:1301–1307, 2002. [28] R. Ostrovsky, Y. Rabani, L. J. Schulman, and C. Swamy. The effectiveness of Lloyd-type methods for the k-means problem. In Proceedings of the 47th Annual IEEE Symposium on Foundations of Computer Science (FOCS), pages 165–176, 2006. [29] M. Rudelson, and R. Vershynin, Sampling from large matrices: An approach through geometric functional analysis. Journal of the ACM (JACM), 54(4), July 2007. [30] A. Wang and E. A. Gehan. Gene selection for microarray data analysis using principal component analysis. Stat Med, 24(13):2069–2087, July 2005. [31] F. Woolfe, E. Liberty, V. Rokhlin, and M. Tygert. A fast randomized algorithm for the approximation of matrices. Applied and Computational Harmonic Analysis, 25 (3): 335-366, 2008. [32] X. Wu et al. Top 10 algorithms in data mining analysis. Knowl. Inf. Syst., 14(1):1–37, 2007. [33] D. Zhang, S. Chen, and Z.-H. Zhou. Constraint score: A new filter method for feature selection with pairwise constraints. Pattern Recognition, 41(5):1440–1451, 2008. 9
2009
200
3,705
Multi-step Linear Dyna-style Planning Hengshuai Yao Department of Computing Science University of Alberta Edmonton, AB, Canada T6G2E8 Shalabh Bhatnagar Department of Computer Science and Automation Indian Institute of Science Bangalore, India 560012 Dongcui Diao School of Economics and Management South China Normal University Guangzhou, China 518055 Abstract In this paper we introduce a multi-step linear Dyna-style planning algorithm. The key element of the multi-step linear Dyna is a multi-step linear model that enables multi-step projection of a sampled feature and multi-step planning based on the simulated multi-step transition experience. We propose two multi-step linear models. The first iterates the one-step linear model, but is generally computationally complex. The second interpolates between the one-step model and the infinite-step model (which turns out to be the LSTD solution), and can be learned efficiently online. Policy evaluation on Boyan Chain shows that multi-step linear Dyna learns a policy faster than single-step linear Dyna, and generally learns faster as the number of projection steps increases. Results on Mountain-car show that multi-step linear Dyna leads to much better online performance than single-step linear Dyna and model-free algorithms; however, the performance of multi-step linear Dyna does not always improve as the number of projection steps increases. Our results also suggest that previous attempts on extending LSTD for online control were unsuccessful because LSTD looks infinite steps into the future, and suffers from the model errors in non-stationary (control) environments. 1 Introduction Linear Dyna-style planning extends Dyna to linear function approximation (Sutton, Szepesv´ari, Geramifard & Bowling, 2008), and can be used in large-scale applications. However, existing Dyna and linear Dyna-style planning algorithms are all single-step, because they only simulate sampled features one step ahead. This is many times insufficient as one does not exploit in such a case all possible future results. We extend linear Dyna architecture by using a multi-step linear model of the world, which gives what we call the multi-step linear Dyna-style planning. Multi-step linear Dyna-style planning is more advantageous than existing linear Dyna, because a multi-step model of the world can project a feature multiple steps into the future and give more steps of results from the feature. For policy evaluation we introduce two multi-step linear models. The first is generated by iterating the one-step linear model, but is computationally complex when the number of features is large. The second, which we call the λ-model, interpolates between the one-step linear model and an infinitestep linear model of the world, and is computationally efficient to compute online. Our multi-step linear Dyna-style planning for policy evaluation, Dyna(k), uses the multi-step linear models to generate k-steps-ahead prediction of the sampled feature, and applies a generalized TD (temporal dif1 ference, e.g., see (Sutton & Barto, 1998)) learning on the imaginary multi-step transition experience. When k is equal to 1, we recover the existing linear Dyna-style algorithm; when k goes to infinity, we actually use the LSTD (Bradtke & Barto, 1996; Boyan, 1999) solution for planning. For the problem of control, related work include least-squares policy iteration (LSPI) (Lagoudakis & Parr, 2001; Lagoudakis & Parr, 2003; Li, Littman & Mansley, 2009), and linear Dyna-style planning for control. LSPI is an offline algorithm, that learns a greedy policy out of a data set of experience, through a number of iterations, each of which sweeps the data set and alternates between LSTD and policy improvement. Sutton et al. (2008) explored the use of linear function approximation with Dyna for control, which does planning using a set of linear action models built from state to state. In this paper, we first build a one-step model from state-action pair to state-action pair through tracking the greedy policy. Using this tracking model for planning is in fact another way of doing single-step linear Dyna-style planning. In a similar manner to policy evaluation, we also have two multi-step models for control. We build the iterated multi-step model by iterating the one-step tracking model. Also, we build a λ-model for control by interpolating the one-step tracking model and the infinite-step model (also built through tracking). As the infinite-step model coincides with the LSTD solution, we actually propose an online LSTD control algorithm. Policy evaluation on Boyan Chain shows that multi-step linear Dyna learns a policy faster than single-step linear Dyna. Results on the Mountain-car experiment show that multi-step linear Dyna can find the optimal policy faster than single-step linear Dyna; however, the performance of multistep linear Dyna does not always improve as the number of projection steps increases. In fact, LSTD control and the infinite-step linear Dyna for control are both unstable, and some intermediate value of k makes the k-step linear Dyna for control perform the best. 2 Backgrounds Given a Markov decision process (MDP) with a state space S = {1, 2, . . ., N}, the problem of policy evaluation is to predict the long-term reward of a policy π for every state s ∈ S: V π(s) = ∞ X t=0 γtrt, 0 < γ < 1, s0 = s, where rt is the reward received by the agent at time t. Given n (n ≤N) feature functions ϕj : S 7→ R, j = 1, . . . , n, the feature of state i is φ(i) = [ϕ1(i), ϕ2(i), . . . , ϕn(i)]T . Now V π can be approximated using ˆV π = Φθ, where θ is the weight vector, and Φ is the feature matrix whose entries are Φi,j = ϕj(i), i = 1, . . . , N; j = 1, . . . , n. At time t, linear TD(0) updates the weights as θt+1 = θt + αtδtφt, δt = rt + γθT t φt+1 −θT t φt, where αt is a positive step-size and φt corresponds to φ(st). Most of earlier work on Dyna uses a lookup table representation of states (Sutton, 1990; Sutton & Barto, 1998). Modern Dyna is more advantageous in the use of linear function approximation, which is called linear Dyna-style planning (Sutton et al., 2008). We denote the state transition probability matrix of policy π by P π, whose (i, j)th component is P π i,j = Eπ{st+1 = j|st = i}; and denote the expected reward vector of policy π by Rπ, whose ith component is the expected reward of leaving state i in one step. Linear Dyna tries to estimate a compressed model of policy π: (F π)T = (ΦT DπΦ)−1 · ΦT DπP πΦ; f π = (ΦT DπΦ)−1 · ΦT DπRπ, where Dπ is the N ×N matrix whose diagonal entries correspond to the steady distribution of states under policy π. F π and f π constitute the world model of linear Dyna for policy evaluation, and are estimated online through gradient descent: F π t+1 = F π t + βt(φt+1 −F π t φt)φT t ; f π t+1 = f π t + βt(rt −φT t f π t )φt, (1) respectively, where the features and reward are all from real world experience and βt is the modeling step-size. Dyna repeats some steps of planning in each of which it samples a feature, projects it using the world model, and plans using linear TD(0) based on the imaginary experience. For policy evaluation, the 2 fixed-point of linear Dyna is the same as that of linear TD(0) under some assumptions (Tsitsiklis & Van Roy, 1997; Sutton et al., 2008), that satisfies Aπθ∗+ bπ = 0 : Aπ = ΦT Dπ(γP π −I)Φ; bπ = ΦT DπRπ, where IN×N is the identity matrix. 3 The Multi-step Linear Model In the lookup table representation, (P π)T and Rπ constitute the one-step world model. The k-step transition model of the world is obtained by iterating (P π)T , k times with discount (Sutton, 1995): P (k) = (γ(P π)T )k, ∀k = 1, 2, . . . At the same time we accumulate the rewards generated in the process of this iterating: R(k) = k−1 X j=0 (γP π)jRπ, ∀k = 1, 2, . . . , where R(k) is called the k-step reward model. P (k) and R(k) predict a feature k steps into the future. In particular, P (k)φ is the feature of the expected state after k steps from φ, and (R(k))T φ is the expected accumulated rewards in k steps from φ. Notice that V π = R(k) + (P (k))T V π, ∀k = 1, 2, . . . , (2) which is a generalization of the Bellman equation, V π = Rπ + γP πV π. 3.1 The Iterated Multi-step Linear Model In the linear function approximation, F π and f π constitute the one-step linear model. Similar to the lookup table representation, we can iterate F π, k times, and accumulate the approximated rewards along the way: F (k) = (γF π)k; f (k) = k−1 X j=0 (γ(F π)T )jf π. We call (F (k), f (k)) the iterated multi-step linear model. By this definition, we extend (2) to the k-step linear Bellman equation: ˆV π = Φθ∗= Φf (k) + Φ(F (k))T θ∗, ∀k = 1, 2, . . . , (3) where θ∗is the linear TD(0) solution. 3.2 The λ-model The quantities F (k) and f (k) require powers of F π. One can first estimate F π and f π, and then estimate F (k) and f (k) using powers of the estimated F π. However, real life tasks require a lot of features. Generally (F π)k requires O((k −1)n3) computation, which is too complex when the number of features (n) is large. Rather than using F (k) and f (k), we would like to explore some other multi-step model that is cheap in computation but is still meaningful in some sense. First let us see how F (k) and f (k) are used if they can be computed. Given an imaginary feature ˜φτ, we look k steps ahead to see our future feature by applying F (k): ˜φ(k) τ = F (k) ˜φτ. As k grows, F (k) diminishes and thus ˜φ(k) τ converges to 0. 1 This means that the more steps we look into the future from a given feature, the more ambiguous is our resulting feature. It suggests that we 1This is because γF π has a spectral radius smaller than one, cf. Lemma 9.2.2 of (Bertsekas, Borkar & Nedich, 2004). 3 can use a decayed one-step linear model to approximate the effects of looking multiple steps into the future: L(k) = (λγ)k−1γF π, parameterized by a factor λ ∈(0, 1]. To guarantee that the optimality (3) still holds, we define l(k) = (I −(L(k))T )(I −γ(F π)T )−1f π. We call (L(k), l(k)) the λ-model. When k = 1, we have L(1) = F (1) = γF π and l(1) = f (1) = f π, recovering the one-step model used by existing linear Dyna. Notice that L(k) diminishes as k grows, which is consistent with the fact that F (k) also diminishes as k grows. Finally, the infinite-step model reduces to a single vector, l(∞) = f (∞) = θ∗. The intermediate k interpolates between the single-step model and infinite-step model. For intermediate k, computation of L(k) has the same complexity as the estimation of F π. Interestingly, all l(k) can be obtained by shifting from l(∞) by an amount that shrinks l(∞) itself: 2 l(k) = (I −(L(k))T )(I −γ(F π)T )−1f π, = l(∞) −(L(k))T l(∞). (4) The case of k = 1 is interesting. The linear Dyna algorithm (Sutton et al., 2008) takes advantage of the fact that l(1) = f π and estimates it through gradient descent. On the other hand, in our Dyna algorithm, we use (4) and estimate all l(k) from the estimation of l(∞), which is generally no longer a gradient-descent estimate. 4 Multi-step Linear Dyna-style Planning for Policy Evaluation The architecture of multi-step linear Dyna-style planning, Dyna(k), is shown in Algorithm 1. Generally any valid multi-step model can be used in the architecture. For example, in the algorithm we can take M (k) = F (k) and m(k) = f (k), giving us a linear Dyna architecture using the iterated multi-step linear model, which we call the Dyna(k)-iterate. In the following we present the family of Dyna(k) planning algorithms that use the λ-model. We first develop a planning algorithm for the infinite-step model, and based on it we then present Dyna(k) planning using the λ-model for any finite k. 4.1 Dyna(∞): Planning using the Infinite-step Model The infinite-step model is preferable in computation because F (∞) diminishes and the model reduces to f (∞). It turns out that f (∞) can be further simplified to allow an efficient online estimation: f (∞) = (I −γ(F π)T )−1f π = (ΦT DπΦ −γΦT DπP πΦ)−1 · ΦT DπΦf π = −(Aπ)−1bπ. We can accumulate Aπ and bπ online like LSTD (Bradtke & Barto, 1996; Boyan, 1999; Xu et al., 2002) and solve f (∞) by matrix inversion methods or recursive least-square methods. As with traditional Dyna, we initially sample a feature ˜φ from some distribution µ. We then apply the infinite-step model to get the expected future features and all the possible future rewards: ˜φ(∞) = F (∞) ˜φ; ˜r(∞) = (f (∞))T ˜φ. Next, a generalized linear TD(0) is applied on this simulated experience. ˜θ := ˜θ + α(˜r(∞) + ˜θT ˜φ(∞) −˜θT ˜φ)˜φ. Because ˜φ(∞) = 0, this simplifies into ˜θ := ˜θ + α(˜r(∞) −˜θT ˜φ)˜φ. We call this algorithm Dyna(∞), which actually uses the LSTD solution for planning. 2Similarly f (k) can be obtained by shifting from f (∞) by an amount that shrinks itself. 4 Algorithm 1 Dyna(k) algorithm for evaluating policy π (using any valid k-step model). Initialize θ0 and some model Select an initial state for each time step do Take an action a according to π, observing rt and φt+1 θt+1 = θt + αt(rt + γφT t+1θt −φT t θt)φt /* linear TD(0) */ Update M (k) and m(k) Set ˜θ0 = θt+1 repeat τ = 1 to p /*Planning*/ Sample ˜φτ ∼µ(·) ˜φ(k) = M (k) ˜φτ /* ˜φ(∞) = 0*/ ˜r(k) = (m(k))T ˜φτ ˜θτ+1 := ˜θτ +ατ(˜r(k) τ + ˜θT τ ˜φ(k) τ −˜θT τ ˜φτ)˜φτ /*Generalized k-step linear TD(0) learning */ Set θt+1 = ˜θτ+1 end for 4.2 Planning using the λ-model The k-step λ-model is efficient to estimate, and can be directly derived from the single-step and infinite-step models: L(k) = (λγ)k−1γF π t+1; l(k) = f (∞) −(L(k))T f (∞), respectively, where the infinite-step model is estimated by f (∞) = (Aπ t+1)−1bπ t+1. Given an imaginary feature ˜φ, we look k steps ahead to see the future features and rewards: ˜φ(k) = L(k) ˜φ; ˜r(k) = (l(k))T ˜φ. Thus we obtain an imaginary k-step transition experience ˜φ →(˜φ(k), ˜r(k)), on which we apply a k-step version of linear TD(0): ˜θτ+1 = ˜θτ + α(˜r(k) + ˜θT τ ˜φ(k) −˜θT τ ˜φ)˜φ. We call this algorithm the Dyna(k)-lambda planning algorithm. When k = 1, we obtain another single-step Dyna, Dyna(1). Notice that Dyna(1) uses f (∞) while the linear Dyna uses f π. When k →∞, we obtain the Dyna(∞) algorithm. 5 Planning for Control Planning for control is more difficult than that for policy evaluation because in control the policy changes from time step to time step. Linear Dyna uses a separate model for each action, and these action models are from state to state (Sutton et al., 2008). Our model for control is different in that it is from state-action pair to state-action pair. However, rather than building a model for all stateaction pairs, we build only one state-action model that tracks the sequence of greedy actions. Using this greedy-tracking model is another way of doing linear Dyna-style planning. In the following we first build the single-step greedy-tracking model and the infinite-step greedy-tracking model, and based on these tracking models we build the iterated model and the λ-model. Our extension of linear Dyna to control contains a TD control step (we use Q-learning), and we call it the linear Dyna-Q architecture. In the Q-learning step, the next feature is already implicitly selected. Recall that Q-learning selects the largest next Q-function as the target for TD learning, which is maxa′ ˆQt+1(st+1, a′) = maxa′ φ(st+1, a′)T θt. Alternatively, the greedy next state-action feature ⃗φt+1 = arg max φ′=φ(st+1,·) φ′T θt is selected by Q-learning. We build a single-step projection matrix between state-action pairs, F, by moving its projection of the current feature towards the greedy next state-action feature (tracking): Ft+1 = Ft + βt(⃗φt+1 −Ftφt)φT t . (5) 5 Algorithm 2 Dyna-Q(k)-lambda: k-step linear Dyna-Q algorithm for control (using the λ-model). Initialize F0, A0, b0 and θ0 Select an initial state for each time step do Take action a at st (using ǫ-greedy), observing rt and st+1 Choose a′ that leads to the largest ˆQ(st+1, a′) Set φ = φ(st, a), ⃗φ = φ(st+1, a′) θt+1 = θt + αt(rt + γ⃗φT θt −φT θt)φ /*Q-learning*/ At+1 = At + φt(γ⃗φT −φ)T , bt+1 = bt + φtrt f (∞) = −(At+1)−1bt+1 /*Using matrix inversion or recursive least-squares */ Ft+1 = Ft + αt(⃗φ −Ftφ)φT , L(k) = (λγ)k−1γFt+1 l(k) = f (∞) −(L(k))T f (∞) Set ˜θ0 = θt+1 repeat τ times /*Planning*/ Sample ˜φτ ∼µ ˜φ(k) = L(k) ˜φτ ˜r(k) = (l(k))T ˜φτ ˜θτ+1 := ˜θτ + ατ(˜r(k) τ + ˜θT τ ˜φ(k) τ −˜θT τ ˜φτ)˜φτ Set θt+1 = ˜θτ+1 end for Estimation of the single-step reward model, f, is the same as in policy evaluation. In a similar manner, in the infinite-step model, matrix A is updated using the greedy next feature, while vector b is updated in the same way as in LSTD. Given A and b, we can solve them and get f (∞). Once the one-step model and the infinite-step model are available, we interpolate them and compute the λ-model in a similar manner to policy evaluation. The complete multi-step Dyna-Q control algorithm using the λ-model is shown in Algorithm 2. We noticed that f (∞) can be directly used for control, giving an online LSTD control algorithm. We can also extend the iterated multi-step model and Dyna(k)-iterate to control. Given the singlestep greedy-tracking model, we can iterate it and get the iterated multi-step linear model in a similar way to policy evaluation. The linear Dyna for control using the iterated greedy-tracking model (which we call Dyna-Q(k)-iterate) is straightforward and thus not shown. 6 Experimental Results 6.1 Boyan Chain Example The problem we consider is exactly the same as that considered by Boyan (1999). The root mean square error (RMSE) of the value function is used as a criterion. Previously it was shown that linear Dyna can learn a policy faster than model-free TD methods in the beginning episodes (Sutton et al., 2008). However, after some episodes, their implementation of linear Dyna became poorer than TD. A possible reason leading to their results may be that the step-sizes of learning, modeling and planning were set to the same value. Also, their step-size diminishes according to 1/(traj#)1.1, which does not satisfy the standard step-size rule required for stochastic approximation. In our linear Dyna algorithms, we used different step-sizes for learning, modeling and planning. (1) Learning step-size. We used here the same step-size rule for TD as Boyan (1999), where α = 0.1(1 + 100)/(traj# + 100) was found to be the best in the class of step-sizes and also used it for TD in the learning sub-procedure of all linear Dyna algorithms. (2) Modeling step-size. For Dyna(k)-lambda, we used βT = 0.5(1+10)/(10+T ) for estimation of F π, where T is the number of state visits across episodes. For linear Dyna, the estimation of F π and f π also used the same βT . (3) Planning step-size. In our experiments all linear Dyna algorithms simply used ατ = 0.1. 6 10 0 10 1 10 2 0.1 1 10 15 Episodes (Log) RMSE (Log) LSTD, A0=−0.1I LSTD, A0=−I LSTD, A0=−10I Dyna(3)−iterate Dyna(5)−iterate Dyna(10)−iterate Linear Dyna 10 0 10 1 10 2 0.1 1 10 15 Episodes (Log) RMSE(Log) TD LSTD, A0=−0.1I Dyna(∞) Dyna(1) Dyna(10)−lambda Figure 1: Results on Boyan Chain. Left: comparison of RMSE of Dyna(k)-iterate with LSTD. Right: comparison of RMSE of Dyna(k)-lambda with TD and LSTD. The weights of various learning algorithms, f π for the linear Dyna, and bπ for Dyna(k) were all initialized to zero. No eligibility trace is used for any algorithm. In the planning step, all Dyna algorithms sampled a unit basis vector whose nonzero component was in a uniformly random location. In the following we report the results of planning only once. All RMSEs of algorithms were averaged over 30 (identical) sets of trajectories. Figure 1 (left) shows the performance of Dyna(k)-iterate and LSTD, and Figure 1 (right) shows the performance of Dyna(k)-lambda, LSTD and TD. All linear Dyna algorithms were found to be significantly and consistently faster than TD. Furthermore, multi-step linear Dyna algorithms were much faster than single-step linear Dyna algorithms. Matrix A of LSTD and Dyna(k)-lambda needs perturbation in initialization, which has a great impact on the performances of two algorithms. For LSTD, we tried initialization of Aπ 0 to −10I, −I, −0.1I, and showed their effects in Figure 1 (left), in which Aπ 0 = −0.1I was the best for LSTD. Similar to LSTD, Dyna(k)-lambda is also sensitive to Aπ 0 . Linear Dyna and Dyna(k)-iterate do not use Aπ and thus do not have to tune Aπ 0. F π was initialized to 0 for Dyna(k) (k < ∞) and linear Dyna. In Figure 1 (right) LSTD and Dyna(k)-lambda were compared under the same setting (Dyna(k)-lambda also used A0 = −0.1I). Dyna(k)-lambda used λ = 0.9. 6.2 Mountain-car We used the same Mountain-car environment and tile coding as in the linear Dyna paper (Sutton et al., 2008). The state feature has a dimension of 10, 000. The state-action feature is shifted from the state feature, and has a dimension of 30, 000 because there are three actions of the car. Because the feature and matrix are really large, we were not able to compute the iterated model, and hence we only present here the results of Dyna-Q(k)-lambda. Experimental setting. (1)Step-sizes. The Q-learning step-size was chosen to be 0.1, in both the independent algorithm and the sub-procedure of Dyna-Q(k)-lambda. The planning step-size was 0.1. The matrix F is much more dense than A and leads to a very slow online performance. To tackle this problem, we avoided computing F explicitly, and used a least-squares computation of the projection, given in the supplementary material. In this implementation, there is no modeling step-size. (2)Initialization. The parameters θ and b were both initialized to 0. A was initialized to −I. (3)Other setting. The λ value for Dyna-Q(k)-lambda was 0.9. We recorded the state-action pairs online and replayed the feature of a past state-action pair in planning. We also compared the linear Dyna-style planning for control (with state features) (Sutton et al., 2008), which has three sets of action models for this problem. In linear Dyna-style planning for control we replayed a state feature of a past time step, and projected it using the model of the action that was selected at that time step. No eligibility trace or exploration was used. Results reported below were all averaged over 30 independent runs, each of which contains 20 episodes. 7 5 10 15 20 −350 −300 −250 −200 −150 −100 Episode Online Return Linear Dyna Q−learning Dyna−Q(5)−lambda Dyna−Q(10)−lambda Dyna−Q(1) Dyna−Q(∞) Dyna−Q(20)−lambda Figure 2: Results on Mountain-car: comparison of online return of Dyna-Q(k)-lambda, Q-learning and linear Dyna for control. Results are shown in Figure 2. Linear Dyna-style planning algorithms were found to be significantly faster than Q-learning. Multi-step planning algorithms can be still faster than single-step planning algorithms. The results also show that planning too many steps into the future is harmful, e.g., Dyna-Q(20)-lambda and Dyna-Q(∞) gave poorer performance than Dyna-Q(5)-lambda and DynaQ(10)-lambda. This shows that some intermediate values of k trade off the model accuracy and the depth of looking ahead, and performed best. In fact, Dyna-Q(∞) and LSTD control algorithm were both unstable, and typically failed once or twice in 30 runs. The intuition is that in control the policy changes from time step to time step and the model is highly non-stationary. By solving the model and looking infinite steps into the future, LSTD and Dyna-Q(∞) magnify the errors in the model. 7 Conclusion and Future Work We have taken important steps towards extending linear Dyna-style planning to multi-step planning. Multi-step linear Dyna-style planning uses multi-step linear models to project a simulated feature multiple steps into the future. For control, we proposed a different way of doing linear Dyna-style planning, that builds a model from state-action pair to state-action pair, and tracks the greedy action selection. Experimental results show that multi-step linear Dyna-style planning leads to better performance than existing single-step linear Dyna-style planning on Boyan chain and Mountaincar problems. Our experimental results show that linear Dyna-style planning can achieve a better performance by using different step-sizes for learning, modeling, and planning than using a uniform step-size for the three sub-procedures. While it is not clear from previous work, our results fully demonstrate the advantages of linear Dyna over TD/Q-learning for both policy evaluation and control. Our work also sheds light on why previous attempts on developing independent online LSTD control were not successful (e.g., forgetting strategies (Sutton et al., 2008)). LSTD and Dyna-Q(∞) can become unstable because they magnify the model errors by looking infinite steps into the future. Current experiments do not include comparisons with any other LSTD control algorithm because we did not find in the literature an independent LSTD control algorithm. LSPI is usually off-line, and its extension to online control has to deal with online exploration (Li et al., 2009). Some researchers have combined LSTD in critic within the Actor-Critic framework (Xu et al., 2002; Peters & Schaal, 2008); however, LSTD there is still not an independent control algorithm. Acknowledgements The authors received many feedbacks from Dr. Rich Sutton and Dr. Csaba Szepesv´ari. We gratefully acknowledge their help in improving the paper in many aspects. We also thank Alborz Geramifard for sending us Matlab code of tile coding. This research was supported by iCORE, NSERC and the Alberta Ingenuity Fund. 8 References Bertsekas, D. P., Borkar, V., & Nedich, A. (2004). Improved temporal difference methods with linear function approximation. Learning and Approximate Dynamic Programming (pp. 231–255). IEEE Press. Boyan, J. A. (1999). Least-squares temporal difference learning. ICML-16. Bradtke, S., & Barto, A. G. (1996). Linear least-squares algorithms for temporal difference learning. Machine Learning, 22, 33–57. Li, L., Littman, M. L., & Mansley, C. R. (2009). Online exploration in least-squares policy iteration. AAMAS-8. Peters, J., & Schaal, S. (2008). Natural actor-critic. Neurocomputing, 71, 1180–1190. Sutton, R. S. (1990). Integrated architectures for learning, planning, and reacting based on approximating dynamic programming. ICML-7. Sutton, R. S. (1995). TD models: modeling the world at a mixture of time scales. ICML-12. Sutton, R. S., & Barto, A. G. (1998). Reinforcement learning: An introduction. MIT Press. Sutton, R. S., Szepesv´ari, C., Geramifard, A., & Bowling, M. (2008). Dyna-style planning with linear function approximation and prioritized sweeping. UAI-24. Tsitsiklis, J. N., & Van Roy, B. (1997). An analysis of temporal-difference learning with function approximation. IEEE Transactions on Automatic Control, 42, 674–690. Xu, X., He, H., & Hu, D. (2002). Efficient reinforcement learning using recursive least-squares methods. Journal of Artificial Intelligence Research, 16, 259–292. 9
2009
201
3,706
Variational Inference for the Nested Chinese Restaurant Process Chong Wang Computer Science Department Princeton University chongw@cs.princeton.edu David M. Blei Computer Science Department Princeton University blei@cs.princeton.edu Abstract The nested Chinese restaurant process (nCRP) is a powerful nonparametric Bayesian model for learning tree-based hierarchies from data. Since its posterior distribution is intractable, current inference methods have all relied on MCMC sampling. In this paper, we develop an alternative inference technique based on variational methods. To employ variational methods, we derive a tree-based stick-breaking construction of the nCRP mixture model, and a novel variational algorithm that efficiently explores a posterior over a large set of combinatorial structures. We demonstrate the use of this approach for text and hand written digits modeling, where we show we can adapt the nCRP to continuous data as well. 1 Introduction For many application areas, such as text analysis and image analysis, learning a tree-based hierarchy is an appealing approach to illuminate the internal structure of the data. In such settings, however, the combinatoric space of tree structures makes model selection unusually daunting. Traditional techniques, such as cross-validation, require us to enumerate all possible model structures; this kind of methodology quickly becomes infeasible in the face of the set of all trees. The nested Chinese restaurant process (nCRP) [1] addresses this problem by specifying a generative probabilistic model for tree structures. This model can then be used to discover structure from data using Bayesian posterior computation. The nCRP has been applied to several problems, such as fitting hierarchical topic models [1] and discovering taxonomies of images [2, 3]. The nCRP is based on the Chinese restaurant process (CRP) [4], which is closely linked to the Dirichlet process in its application to mixture models [5]. As a complicated Bayesian nonparametric model, posterior inference in an nCRP-based model is intractable, and previous approaches all rely Gibbs sampling [1, 2, 3]. While powerful and flexible, Gibbs sampling can be slow to converge and it is difficult to assess the convergence [6, 7]. Here, we develop an alternative for posterior inference for nCRP-based models. Our solution is to use the optimization-based variational methods [8]. The idea behind variational methods is to posit a simple distribution over the latent variables, and then to fit this distribution to be close to the posterior of interest. Variational methods have been successfully applied to several Bayesian nonparametric models, such as Dirichlet process (DP) mixtures [9, 10, 11], hierarchical Dirichlet processes (HDP) [12], Pitman-Yor processes [13] and Indian buffet processes (IBP) [14]. The work presented here is unique in that our optimization of the variational distribution searches the combinatorial space of trees. Similar to Gibbs sampling, our method includes an exploration of a latent structure associated with the free parameters in addition to their values. First, we describe the tree-based stick-breaking construction of nCRP, which is needed for variational inference. Second, we develop our variational inference algorithm, which explores the infinite tree space associated with the nCRP. Finally, we study the performance of our algorithm on discrete and continuous data sets. 1 2 Nested Chinese restaurant process mixtures The nested Chinese restaurant process (nCRP) is a distribution over hierarchical partitions [1]. It generalizes the Chinese restaurant process (CRP), which is a distribution over partitions. The CRP can be described by the following metaphor. Imagine a restaurant with an infinite number of tables, and imagine customers entering the restaurant in sequence. The dth customer sits at a table according to the following distribution, p(cd = k|c1:(d−1)) ∝  mk if k is previous occupied γ if k is a new table, (1) where mk is the number of previous customers sitting at table k and γ is a positive scalar. After D customers have sat down, their seating plan describes a partition of D items. In the nested CRP, imagine now that tables are organized in a hierarchy: there is one table at the first level; it is associated with an infinite number of tables at the second level; each second-level table is associated with an infinite number of tables at the third level; and so on until the Lth level. Each customer enters at the first level and comes out at the Lth level, generating a path with L tables as she sits in each restaurant. Moving from a table at level ℓto one of its subtables at level ℓ+ 1, the customer draws following the CRP using Equation 1. (This description is slightly different from the metaphor in [1], but leads to the same distribution.) The nCRP mixture model can be derived by analogy to the CRP mixture model [15]. (From now on, we will use the term “nodes” instead of “tables.”) Each node is associated with a parameter w, where w ∼G0 and G0 is called the base distribution. Each data point is drawn by first choosing a path in the tree according to the nCRP, and then choosing its value from a distribution that depends on the parameters in that path. An additional hidden variable x represents other latent quantities that can be used in this distribution. This is a generalization of the model described in [1]. For data D = {tn}N n=1, the nCRP mixture assumes that the nth data point tn is drawn as follows: 1. Draw a path cn|c1:(n−1) ∼nCRP(γ, c1:(n−1)), which contains L nodes from the tree. 2. Draw a latent variable xn ∼p(xn|λ). 3. Draw an observation tn ∼p(tn|Wcn, xn, τ). The parameters λ and τ are associated with the latent variables x and data generating distribution, respectively. Note that Wcn contains the wis selected by the path cn. Specific applications of the nCRP mixture depend on the particular forms of p(w), p(x) and p(t|Wc, x). The corresponding posterior of the latent variables decomposes the data into a collection of paths, and provides distributions of the parameters attached to each node in those paths. Even though the nCRP assumes an “infinite” tree, the paths associated with the data will only populate a portion of that tree. Through this posterior, the nCRP mixture can be used as a flexible tree-based mixture model that does not assume a particular tree structure in advance of the data. Hierarchical topic models. The nCRP mixture described above includes the hierarchical topic model of [1] as a special case. In that model, observed data are documents, i.e., a list of N words from a fixed vocabulary. The nodes of the tree are associated with distributions over words (“topics”), and each document is associated with both a path in the tree and with a vector of proportions over its levels. Given a path, a document is generated by repeatedly generating level assignments from the proportions and then words from the corresponding topics. In the notation above, p(w) is a Dirichlet distribution over the vocabulary simplex, p(x) is a joint distribution of level proportions (from a Dirichlet) and level assignments (N draws from the proportions), and p(t|Wc, x) are the N draws from the topics (for each word) associated with x. Tree-based hierarchical component analysis. For continuous data, if p(w), p(x) and p(t|Wc, x) are appropriate Gaussian distributions, we obtain hierarchical component analysis, a generalization of probabilistic principal component analysis (PPCA) [16, 17]. In this model, w is the component parameter for the node it belongs to. Each path c can be thought as a PPCA model with factor loading Wc specified by that path. Then each data point chooses a path (also a PPCA model specified by that path) and draw the factors x. This model can also be thought as an infinite mixtures of PPCA model, 2 Figure 1: Left. A possible tree structure in a 3-level nCRP. Right. The tree-based stick-breaking construction of a 3-level nCRP. where each PPCA can share components. In addition, we can incorporate the general exponential family PCA [18, 19] into the nCRP framework.1 2.1 Tree-based stick-breaking construction CRP mixtures can be equivalently formulated using the Dirichlet process (DP) as a distribution over the distribution of each data point’s random parameter [21, 4]. An advantage of expressing the CRP mixture with a DP is that the draw from the DP can be explicitly represented using the stick-breaking construction [22]. The DP bundles the scaling parameter γ and base distribution G0. A draw from a DP(γ, G0) is described as vi ∼Beta(1, γ), πi = vi Qi−1 j=1(1 −vj), wi ∼G0, i ∈{1, 2, · · · }, G = P∞ i=1 πiδwi, where π are the stick lengths, and P∞ i=1 πi = 1 almost surely. This representation also illuminates the discreteness of a distribution drawn from a DP. For the nCRP, we develop a similar stick-breaking construction. At the first level, the root node’s stick length is π1 = v1 ≡1. For all the nodes at the second level, their stick lengths are constructed as for the DP, i.e., π1i = π1v1i Qi−1 j=1(1 −v1j) for i = {1, 2, · · · , ∞} and P∞ i=1 π1i = π1 = 1. The stick-breaking construction is then applied to each of these stick segments at the second level. For example, the π11 portion of the stick is divided up into an infinite number of pieces according to the stick-breaking process. For the segment π1k, the stick lengths of its children are π1ki = π1kv1ki Qi−1 j=1(1 −v1kj), for i = {1, 2, · · · , ∞} and P∞ i=1 π1ki = π1k. The whole process continues for L levels. This construction is best understood by Figure 1 (Right). Although this stick represents an infinite tree, the nodes are countable and each node is uniquely identified by a sequence of L numbers. We will denote all Beta draws as V , each of which are independent draws from Beta(1, γ) (except for the root v1, which is equal to one). The tree-based stick-breaking construction lets us calculate the conditional probability of a path given V . Let the path c = [1, c2, · · · , cL], p(c|V ) = QL ℓ=1 π1,c2,··· ,cℓ= QL ℓ=1 v1,c2,··· ,cℓ Qcℓ−1 j=1 (1 −v1,c2,··· ,j). (2) By integrating out V in Equation 2, we recover the nCRP. Given Equation 2, the joint probability of a data set under the nCRP mixture is p(t1:N, x1:N, c1:N, V , W ) = p(V )p(W ) QN n=1 p(cn|V )p(xn)p(tn|Wcn, xn). (3) This representation is the basis for variational inference. 3 Variational inference for the nCRP mixture The central computational problem in Bayesian modeling is posterior inference: Given data, what is the conditional distribution of the latent variables in the model? In the nCRP mixture, these latent variables provide the tree structure and node parameters. 1We note that Bach and Jordan [20] studied tree-dependent component analysis, a generalization of independent component analysis where the components are organized in a tree. This model expresses a different philosophy: Their tree reflects the actual conditional dependencies among the components. Data are not generated by choosing a path first, but by a linear transformation of all components in the tree. 3 Posterior inference in an nCRP mixture has previously relied on Gibbs sampling, in which we sample from a Markov chain whose stationary distribution is the posterior [1, 2, 3]. Variational inference provides an alternative methodology: Posit a simple (e.g., factorized) family of distributions over the latent variables indexed by free parameters (called “variational parameters”). Then fit those parameters to be close in KL divergence to the true posterior of interest [8, 23]. Variational inference for Bayesian nonparametric models uses a truncated stick-breaking representation in the variational distribution [9] – free variational parameters are allowed only up to the truncation level. If the truncation is too large, the variational algorithm will still isolate only a subset of components; if the truncation is too small, methods have been developed to expand the truncated stick as part of the variational algorithm [10]. In the nCRP mixture, however, the challenge is that the tree structure is too large even to effectively truncate. We will address this by defining search criteria for adaptively adjusting the structure of the variational distribution, searching over the set of trees to best accommodate the data. 3.1 Variational inference based on the tree-based stick-breaking construction We first address the problem of variational inference with a truncated tree of fixed structure. Suppose that we have a truncated tree T and let MT be the set of all nodes in T. Our family of variational distributions is defined as follows, q(W , V , x1:N, c1:N) = Q i/∈MT q(wi)q(vi) Q i∈MT p(wi)p(vi) QN n=1 q(cn)q(xn), (4) where: (1) Distributions p(wi) and p(vi) for i /∈MT , are the prior distributions, containing no variational parameters; (2) Distributions q(wi) and q(vi) for i ∈MT contain the variational parameters that we want to optimize for the truncated tree T; (3) Distribution q(cn) is the variational multinomial distribution over all the possible paths, not just those in the truncated tree T. Note that there are infinite number of paths. We will address this issue below; (4) Distribution q(xn) is the variational distribution for the latent variable xn and it is in the same family of distribution, as p(xn). In summary, this family of distributions retains the infinite tree structure. Moreover, this family is nested [10, 11]: If a truncated tree T1 is a subtree of a truncated tree T2 then variational distributions defined over T1 are a special case of those defined over T2. Theoretically, the solution found using T2 is at least as good as the one found using T1. This allows us to use greedy search to find a better tree structure. With the variational distributions (Equation 4) and the joint distributions (Equation 3), we turn to the details of posterior inference. Equivalent to minimizing KL is tightening the bound on the likelihood of the observations D = {tn}N n=1 given by Jensen’s inequality [8], log p(t1:N) ≥Eq [log p(t1:N, V , W , x1:N, c1:N)] −Eq [log q(V , W , x1:N, c1:N)] = P i∈MT Eq h log p(wi)p(vi) q(wi)q(vi) i + PN n=1 Eq h log p(xn) q(xn) i + PN n=1 Eq h log p(tn|xn,Wcn)p(cn|V ) q(cn) i ≜L(q). (5) We optimize L(q) using coordinate ascent. First we isolate the terms that only contain q(cn), L (q(cn)) = Eq [log p(tn|xn, Wcn)p(cn|V )] −Eq [log q(cn)] . (6) Then we find the optimal solution for q(cn) by setting the gradient to zero: q(cn = c) ∝Sn,c ≜exp {Eq [log p(cn = c|V )] + Eq [log p(tn|xn, Wc)]} . (7) Since the values of q(cn = c) is infinite, operating coordinate ascent over q(cn = c) is difficult. We plug the optimal q(cn) (Equation 7) into Equation 6 to obtain the lower bound L (q(cn)) = log P c Sn,c. (8) Two issues arise: 1) the variational distribution q(cn) has infinite number of values, and we need to find an efficient way to manipulate this. 2) the lower bound log P c Sn,c (Equation 8) contains infinite sum, which pose a problem in evaluation. In the appendix, we show that all the operations can be done only via the truncated tree T. We summarize the results as follows. Let ¯c be a path in T, either an inner path (a path ending at an inner node) or a full path (a path ending at a leaf node). Note that the inner path is only defined for the truncated tree T. The number of such ¯c is finite. In the 4 nCRP tree, denote child(¯c) as the set of all full paths that are not in T but include ¯c as a sub path. As a special case, if ¯c is a full path, child(¯c) just contains itself. As shown in the appendix, we can compute these quantities efficiently: q(cn = ¯c) ≜P c:c∈child(¯c) q(cn = c) and Sn,¯c ≜P c:c∈child(¯c) Sn,c. (9) Consequently iterating over the truncated tree T using ¯c is the same as iterating all the full paths in the nCRP tree. And these are all we need for doing variational inference. Next, we move to optimize q(vi|ai, bi) for i ∈MT , where ai and bi are variational parameters for Beta distribution q(vi). Let the path containing vi be [1, c2, · · · , cℓ0], where ℓ0 ≤L. We isolate the term that only contains vi from the lower bound (Equation 5), L (q(vi)) = Eq [log p(vi) −log q(vi)] + PN n=1 P c q(cn = c) log p(cn = c|V ). (10) After plugging Equation 2 into 10 and setting the gradient to be zero, we obtain the optimal q(vi), q(vi) ∝va∗ i −1 i (1 −vi)b∗ i −1, a∗ i = 1 + PN n=1 P cℓ0+1,··· ,cL q(cn = [1, c2, · · · , cℓ0, cℓ0+1, · · · , cL]), b∗ i = γ + PN n=1 P j,cℓ0+1,··· ,cL:j>cℓ0 q(cn = [1, c2, · · · , cℓ0−1, j, cℓ0+1, · · · , cL]), (11) where the infinite sum involved can be solved using Equations 9. The variational update functions for W and x depend on the actual distributions we use, and deriving them is straightforward. If they include an infinite sum then we apply similar techniques as we did for q(vi). 3.2 Refining the tree structure during variational inference Since our variational distribution is nested, a larger truncated tree will always (theoretically) achieve a lower bound at least as tight as a smaller truncated tree. This allows us to search the infinite tree space until a certain criterion is satisfied (e.g., relative change of the lower bound). To achieve this, we present several heuristics to guide us to do so. All these operations are performed on the truncated tree T. Grow. This operation is similar to what Gibbs sampling does in searching the tree space. We implement two heuristics: 1) Randomly choose several data points, and for each of them sample a path ¯c according to q(cn = ¯c). If it is an inner path, expand it a full path; 2) For every inner path in T, first compute the quantity g(¯c) = PN n=1 q(cn = ¯c). Then sample an inner path (say ¯c∗) according to g(¯c), and expand it to full path. Prune. If a certain path gets very little probability assignments from all data points, we eliminate this path – for path c, the criterion is PN n=1 q(cn = c) < δ, where δ is a small number. We use δ = 10−6). This mimics Gibbs sampling in the sense that for nCRP (or CRP), if a certain path (table) gets no assignments in the sampling process, it will never get any assignment any more according to Equation 1. Merge. If paths i and j give almost equal posterior distributions, merging these two paths is employed [24]. The measure is J(i, j) = P T i Pj/|Pi||Pj|, where Pi = [q(c1 = i), · · · , q(cN = i)]T . We use 0.95 as the threshold in our experiments. In theory, Prune and Merge may decrease the lower bound. Empirically, we found even sometime it does, the effect is negligible. (but reduced the size of the tree). For continuous data settings, we additionally implement the Split method used in [24]. 4 Experiments In this section, we demonstrate variational inference for the nCRP. We analyze both discrete and continuous data using the two applications discussed in Section 2. 5 Per-word test set likelihood Method JACM Psy. Review PNAS Gibbs sampling −5.3922 ± 0.0052 −5.7834 ± 0.0149 −6.4961 ± 0.0068 Var. inference −5.4331 ± 0.0100 −5.8430 ± 0.0153 −6.5736 ± 0.0050 Var. inference (G) −5.4495 ± 0.0118 −5.8593 ± 0.0157 −6.5996 ± 0.0153 Table 1: Test set likelihood comparison on three datasets. Var. inference (G): variational inference initialized from the initialization of Gibbs sampling. Variational inference can give competitive performance on test set likelihood. 4.1 Hierarchical topic modeling For discrete data, we compare variational inference compared with Gibbs sampling for hierarchical topic modeling. Three corpora are used in the experiments: (1) JACM: a collection of 536 abstracts from the Journal of the ACM from years 1987 to 2004 with a vocabulary size of 1,539 and around 68K words; (2) Psy. Review: a collection of 1,272 psychology abstracts from Psychological Review from years 1967 to 2003, with a vocabulary size of 1,971 and around 137K words; (3) PNAS: a collection of 5,000 abstracts from the Proceedings of the National Academy of Sciences from years 1991 to 2001, with a vocabulary size of 7762 and around 895K words. Those terms occurring in fewer than 5 documents were removed. Local maxima can be a problem for both Gibbs sampling and variational inference. To avoid them in Gibbs sampling, we randomly restart the sampler 200 times and take the trajectory with the highest average posterior likelihood. We run the Gibbs sampling for 10000 iterations and collect the results for post analysis. For variational inference, we use two types of initializations 1) similar to Gibbs sampling, we gradually add data points during the variational inference as well – add a new path for each document in the initialization; 2) we initialize the variational inference from the initialization for Gibbs sampling – using the MAP estimate using one Gibbs sample. We set L = 3 for all the experiments and use the same hyperparameters in both algorithms. Specifically, the stick-breaking prior parameter γ is set to 1.0; the symmetric Dirichlet prior parameter for the topics is set to 1.0; the prior for level proportions is skewed to favor high levels (50, 20, 10). (This is suggested in [1].) We run the variational inference until the relative change of log-likelihood is less than 0.001. Per-word test set likelihood. We use test set likelihood as a measure of performance. The procedure is to divide the corpus into a training set Dtrain and a test set Dtest, and approximate the likelihood of Dtest given Dtrain. We use the same method in Teh et al. [12] to approximate it. Specifically, we use posterior means ˆθ and ˆβ to represent the estimated topic mixture proportions over L levels and topic multinomial parameters. For the variational method, we use p({t1, · · · , tN}test) = QN n=1 P c q(cn = c) Q j P n,ℓˆθn,ℓˆβcℓ,tnj, where ˆθ and ˆβ are estimated using mean values from the variational distributions. For Gibbs sampling, we use S samples and compute p({t1, · · · , tN}test) = QN n=1 1 S PS s=1 P c δcs n Q j P n,ℓˆθs n,ℓˆβs cℓ,tnj, where ˆθs and ˆβs are estimated using sample s [25, 12]. We use 30 samples collected at a lag of 10 after a 200-sample burn-in for a document in test set. Actually, 1/S PS s=1 P c δcs n gives the empirical estimation of p(cn), where in variational inference, we approximate it using q(cn). Table 1 shows the test likelihood comparison using five-fold cross validation. This shows our model can give competitive performance in term of the test set likelihood. This discrepancy is similar to that in [12] when variational inference is compared the collapsed Gibbs sampling for HDP. Topic visualizations. Figures 2 and 3 show the tree-based topic visualizations from JACM and PNAS datasets. These are quite similar to those obtained by Gibbs sampling (see [1]). 4.2 Modeling handwritten digits using hierarchical component analysis For continuous data, we use the hierarchical component analysis for modeling handwritten digits (http://archive.ics.uci.edu/ml). This dataset contains 3823 handwritten digits as a training set and 6 of a and is in networks network distributed parallel processors programs logic rules resolution program queries formulas complexity query classes routing network communication sorting distributed queuing closed trees spanning productform logarithmic improves upon worstcase o atomic concurrent waitfree control shared methods tree decomposition compression greedy functions polynomial boolean compression input building edges desired efficiency together planar graphs maximum component essentially Figure 2: A sub network discovered on JACM dataset, each topic represented by top 5 terms. The whole tree has 30 nodes, with an average branching factor 2.64. the in and a to dna rna replication strand recombination species evolution based time visual cardiac mice er ar heart rad dna telomerase brca recombination hot ra cox pcna spot girk channels gag exchanger currents dye coupling tnf plus gap species populations years population genetic sleep fa orfs maize haplotype leptin gh age mice cardiac fk dimerization erythropoietin reversibly interleukin Figure 3: A sub network discovered on PNAS dataset, each topic represented by top 5 terms. The whole tree has 45 nodes, with an average branching factor 2.93. 1797 as a testing set. Each digit contains 64 integer attributes, ranging from 0-16. As described in section 2, we use PPCA [16] as the basic model for each path. We use a global mean parameter µ for all paths, although a model with an individual mean parameter for each path can be similarly derived. We put broad priors over the parameters similar to those in variational Bayesian PCA [17]. The stick-breaking prior parameter γ = 1 is set to be 1.0; for each node, w ∼N(0, 103); µ ∼N(0, 103); the inverse of the variance for the noise model in PPCA is τ and τ ∼Gamma(10−3, 10−3). Again, we run the variational inference until the relative change of log-likelihood is less than 0.001. We compare the reconstruction error with PCA. To compute the reconstruction error for our model, we first select the path for each data point using its MAP estimation by ˆcn = arg maxc q(cn = c). Then we use the similar approach [26, 24] to reconstruct tn, ˆtn = Wˆcn(Wˆcn T Wˆcn)−1Wˆcn T (tn −ˆµ) + ˆµ. We test our model using depth L = 2, 3, 4, 5. All of our models run within 2 minutes. The reconstruction errors for both the training and testing set are shown in Table 2. Our model gives lower reconstruction errors than PCA. 5 Conclusions In this paper, we presented the variational inference algorithm for the nested Chinese restaurant process based on its tree-based stick-breaking construction. Our result indicates that the variational 7 Reconstruction error on handwritten digits #Depth HCA (tr) PCA (tr) HCA (te) PCA (te) 2(9) 631.6 863.0 699.4 878.5 3(14) 559.8 722.3 585.6 727.7 4(18) 463.4 621.0 506.1 633.0 5(22) 384.8 553.0 461.8 564.2 Table 2: Reconstruction error comparison (Tr: train; Te: test). HCA stands for hierarchical component analysis. PCA uses L largest components. In the first column, 2(9) means L = 2 with 9 nodes inferred using our model. Others are similarly defined. HCA gives lower reconstruction errors. inference is a powerful alternative method for the widely used Gibbs sampling. We also adapt the nCRP to model continuous data, e.g. in hierarchical component analysis. Acknowledgements. We thank anonymous reviewers for insightful suggestions. David M. Blei is supported by ONR 175-6343, NSF CAREER 0745520, and grants from Google and Microsoft. Appendix: efficiently manipulating Sn,c and q(cn = c) Case 1: All nodes of the path are in T, c ⊂MT . Let Z0 ≜Eq [log p(tn|xn, Wc)]. We have Sn,c = exp n Eq hPL ℓ=1(log(v1,c2,··· ,cℓ) + Pcℓ−1 j=1 log(1 −v1,c2,··· ,j)) i + Z0 o . (12) Case 2: At least one node is not in T, c ̸⊂MT . Although c ̸⊂MT , c must have some nodes in MT . Then c can be written as c = [¯c, cℓ0+1, · · · , cL], where ¯c ≜[1, c2, · · · , cℓ0] ⊂MT and [¯c, cℓ0+1, · · · , cℓ] ̸⊂MT for any ℓ> ℓ0. In the truncated tree T, let j0 be the maximum index for the child node whose parent path is ¯c, then we know if cℓ0+1 > j0, [¯c, cℓ0+1, · · · , cL] ̸⊂MT . Now we fix the sub path ¯c and let [cℓ0+1, · · · , cL] vary (satisfying cℓ0+1 > j0). All these possible paths constitute a set: child(¯c) ≜{[¯c, cℓ0+1, · · · , cL] : cℓ0+1 > j0}. According to Equation 4, for any c ∈child(¯c) , Z0 ≜Eq [log p(tn|xn, Wc)] is constant, since the variational distribution for w outside the truncated tree is the same prior distribution. We have P c∈child(¯c) Sn,c = P c∈child(¯c) exp n Z0 + Eq hPL ℓ=1(log(v1,··· ,cℓ) + Pcℓ−1 j=1 log(1 −v1,c2,··· ,j)) io = exp(Z0+(L−ℓ0)Ep[log(v)]) (1−exp(Ep[log(1−v)]))L−ℓ0 exp n Eq hPℓ0 ℓ=1(log(v1,c2,··· ,cℓ) + Pcℓ−1 j=1 log(1 −v1,c2,··· ,j)) io × exp  Eq hPj0 j=1 log(1 −v1,c2,··· ,cℓ0,j) i , (13) where v ∼Beta(1, γ). Such cases contain all inner nodes in the truncated tree T. Note that Case 1 is a special case of Case 2 by setting ℓ0 = L. Given all these, P c Sn,c can be computed efficiently. Furthermore, given Equations 13 and Equation 7, we define q(cn = ¯c) ≜P c∈child(¯c) q(cn = c) ∝P c∈child(¯c) Sn,c, (14) which corresponds the sum of probabilities from all paths in child(¯c). We note that this organization only depends on the truncated tree T and is sufficient for variational inference. 8 References [1] Blei, D. M., T. L. Griffiths, M. I. Jordan, et al. Hierarchical topic models and the nested Chinese restaurant process. In NIPS. 2003. [2] Bart, E., I. Porteous, P. Perona, et al. Unsupervised learning of visual taxonomies. In CVPR. 2008. [3] Sivic, J., B. C. Russell, A. Zisserman, et al. Unsupervised discovery of visual object class hierarchies. In CVPR. 2008. [4] Aldous, D. Exchangeability and related topics. In Ecole d’Ete de Probabilities de Saint-Flour XIII 1983, pages 1–198. Springer, 1985. [5] Ferguson, T. S. A Bayesian analysis of some nonparametric problems. The Annals of Statistics, 1(2):209– 230, 1973. [6] Neal, R. Probabilistic inference using Markov chain Monte Carlo methods. Tech. Rep. CRG-TR-93-1, Department of Computer Science, University of Toronto, 1993. [7] Robert, C., G. Casella. Monte Carlo Statistical Methods. Springer-Verlag, New York, NY, 2004. [8] Jordan, M. I., Z. Ghahramani, T. S. Jaakkola, et al. An introduction to variational methods for graphical models. Learning in Graphical Models, 1999. [9] Blei, D. M., M. I. Jordan. Variational methods for the Dirichlet process. In ICML. 2004. [10] Kurihara, K., M. Welling, N. A. Vlassis. Accelerated variational Dirichlet process mixtures. In NIPS. 2006. [11] Kurihara, K., M. Welling, Y. W. Teh. Collapsed variational Dirichlet process mixture models. In IJCAI. 2007. [12] Teh, Y. W., K. Kurihara, M. Welling. Collapsed variational inference for HDP. In NIPS. 2008. [13] Sudderth, E. B., M. I. Jordan. Shared segmentation of natural scenes using dependent Pitman-Yor processes. In NIPS. 2008. [14] Doshi, F., K. T. Miller, J. Van Gael, et al. Variational inference for the Indian buffet process. In AISTATS, vol. 12. 2009. [15] Escobar, M. D., M. West. Bayesian density estimation and inference using mixtures. Journal of the American Statistical Association, 90:577–588, 1995. [16] Tipping, M. E., C. M. Bishop. Probabilistic principal component analysis. Journal of the Royal Statistical Society, Series B, 61:611–622, 1999. [17] Bishop, C. M. Variational principal components. In ICANN. 1999. [18] Collins, M., S. Dasgupta, R. E. Schapire. A generalization of principal components analysis to the exponential family. In NIPS. 2001. [19] Mohamed, S., K. A. Heller, Z. Ghahramani. Bayesian exponential family PCA. In NIPS. 2008. [20] Bach, F. R., M. I. Jordan. Beyond independent components: Trees and clusters. JMLR, 4:1205–1233, 2003. [21] Antoniak, C. E. Mixtures of Dirichlet processes with applications to Bayesian nonparametric problems. The Annals of Statistics, 2(6):1152–1174, 1974. [22] Sethuraman, J. A constructive definition of Dirichlet priors. Statistica Sinica, 4:639–650, 1994. [23] Wainwright, M., M. Jordan. Variational inference in graphical models: The view from the marginal polytope. In Allerton Conference on Control, Communication and Computation. 2003. [24] Ueda, N., R. Nakano, Z. Ghahramani, et al. SMEM algorithm for mixture models. Neural Computation, 12(9):2109–2128, 2000. [25] Griffiths, T. L., M. Steyvers. Finding scientific topics. Proc Natl Acad Sci USA, 101 Suppl 1:5228–5235, 2004. [26] Tipping, M. E., C. M. Bishop. Mixtures of probabilistic principal component analysers. Neural Computation, 11(2):443–482, 1999. 9
2009
202
3,707
A Biologically Plausible Model for Rapid Natural Image Identification S. Ghebreab, A. W.M. Smeulders Intelligent Sensory Information Systems Group University of Amsterdam, The Netherlands s.ghebreab@uva.nl H. S. Schoite, V.A.F. Lamme Cognitive Neuroscience Group University of Amsterdam, The Netherlands h.s.scholte@uva.nl Abstract Contrast statistics of the majority of natural images conform to a Weibull distribution. This property of natural images may facilitate efficient and very rapid extraction of a scene's visual gist. Here we investigated whether a neural response model based on the Wei bull contrast distribution captures visual information that humans use to rapidly identify natural scenes. In a learning phase, we measured EEG activity of 32 subjects viewing brief flashes of 700 natural scenes. From these neural measurements and the contrast statistics of the natural image stimuli, we derived an across subject Wei bull response model. We used this model to predict the EEG responses to 100 new natural scenes and estimated which scene the subject viewed by finding the best match between the model predictions and the observed EEG responses. In almost 90 percent of the cases our model accurately predicted the observed scene. Moreover, in most failed cases, the scene mistaken for the observed scene was visually similar to the observed scene itself. Similar results were obtained in a separate experiment in which 16 other subjects where presented with artificial occlusion models of natural images. Together, these results suggest that Weibull contrast statistics of natural images contain a considerable amount of visual gist information to warrant rapid image identification. 1 Introduction Natural images, although apparently diverse, have a surprisingly regular statistical regularity. There is a strong correlation between adjacent image points in terms of local features such as luminance [1]. These second-order correlations decrease with distance between image points, giving rise to the typical 1/12 power spectra of natural images. On account of this power-law characteristic, natural images compromise a very small and distinguishable subset of the space of all possible images, with specific scene categories occupying different parts of this subspace. For example, white noise images can be distinguished from natural images because of their deviation from the power law statistics, while street scenes and beach scenes can be separated from each other on the basis of differences in ensemble power spectra [2]. Thus, the power spectra of natural images contain an indeterminate amount of the visual gist of these images. The similarity structure among nearby image points, however, represents only part of the statistical structure in natural images. There are also higher-order correlations, which introduce structure in the phase spectra of natural images. This structure is assumed to carry perceptually important image features such as edges and has been measured in terms of kurtosis in the contrast distribution of natural images [3, 4, 5]. Geusebroek and Smeulders [6] showed that the two-parameter Weibull distribution adequately captures the variance and kurtosis in the contrast distribution of the majority of natural images. In fact, the two parameters of the Weibull contrast distribution tum out to organize the space of all possible natural scenes in a perceptually meaningful manner [7] and thus are likely to provide additional information about a scene's visual gist. Scholte et al. [7] have further shown that the two parameters of the Weibull contrast distribution match biologically realistic computations of Lateral Geniculate Nucleus (LGN) cells. Specifically, they simulated X-cell responses by filtering images with a difference of Gaussians (DoG), rectifying the filtered images and transforming the pixel values of the resulting images with a contrast gain function adequate for P-cells. To simulate Y-cell responses, the rectified images were passed through a Gaussian smoothing function and resulting pixel values were subsequently transformed with a contrast gain function adequate for M-cells. The sum of the resulting X-cell responses turned out to correlate highly with one Wei bull parameter (r=0.95), whereas the sum of the resulting Y-cell responses correlated highly with the other Weibull parameter (r=0.70). Moreover, the two Wei bull parameters correlated highly with EEG activity (r2=0.5) at the occipital part of the brain. The findings of Scholte et al. [7] show that our brain is capable of approximating the Wei bull contrast distribution of an image on the basis of filters that are biologically realistic in shape, sensitivity, and SIze. Here we hypothesized that if Wei bull contrast distributions of natural images carry perceptually important information, a neural response model based on the Weibull contrast distribution will predict brain responses to brief flashes of natural images. We tested this hypothesis with two experiments in which we rapidly presented a large set of natural or artificial images to multiple subjects while measuring EEG activity across the entire cortex. In each experiment, we constructed a neural response model from the Weibull statistics of the presented images and corresponding EEG data, which we then applied to predict EEG responses to a new collection of natural or artificial images. To validate the constructed neural response models, we used the approach of Kay et al. [8]: predicted and measured EEG responses were compared to determine whether the observed image was correctly identified. 2 Methods We first describe how we filter images locally with a set of biologically-realistic filters. Then we address a local contrast response selection mechanism with which we construct a contrast magnitude map for a given input image (a detailed description is in submission [12]). Subsequently, Weibull contrast statistics are estimated from such maps and the relation between image statistics and neural activity modeled. The section ends with an explanation of a performance measure for EEG-based image identification. 2.1 Local contrasts values in natural images As in [7], we use contrast filters that have spatial characteristics and contrast response properties closely mirroring well-known characteristic receptive-fields of LGN neurons [9]. Specifically, we use a bank of second-order Gaussian derivative filters that span multiple octaves in spatial scale, that have peak sensitivity approximately inverse to filter size and that have contrast gain properties independent of size. We represent contrast gain using an established non-linear response model that divides input contrast by the sum of the input and a semi-saturation constant [10]. In this model a low value of the semi-saturation parameter indicates high non-linear contrast gain whereas higher values result in a linear mapping and thus will not lead to saturation. Given an image, we process each image location with a bank of 5 contrast filters covering 5 octaves in spatial scale and, subsequently, subject the output of each scale-tuned filter to 5 different gain controls (5 semi-saturation values). This results, for each image location, in 25 contrast response values. We applied each of the 5 scale-specific filters, combined with each of the 5 contrast gain controls, to 800 natural images. Figure 1 shows average responses over all image locations. Contrast is high at small scale and low semi-saturation. It decreases exponentially with scale owing to the peak sensitivity of the filters, which is inversely related to spatial scale. That contrast also decreases with semi-saturation is explained by the fact that the amount of contrast suppression is proportional to the semi-saturation value. From these summary statistics it follows that, although natural image contrast varies considerable within and across scale and contrast gain, the fast majority of natural image contrasts falls above a lower threshold. It is reasonable to assume that the LGN considers contrast below this statistical threshold as noise and only processes contrasts above it, i.e. only processes reliable contrast outputs. 0.3 0.05 0.04 0.25 0.04 0.03 0.2 003 0.15 U.UL 002 0.1 0.05 0.01 0.01 0 Semisaturation Figure 1: Approximation of the typical range of contrasts generated by LGN neurons tuned to different spatial frequencies (5 octave scales) and with different contrast gain properties (5 semi-saturation constants). Shown are the average of local contrast (dark gray), plus and minus two standard deviations, in the gray level (left), blue-yellow (middle) and red-green (right) color components of 800 natural images. 2.2 Natural image statistics-based selection of unique local image contrast values What spatial scale and contrast gain does the LGN use to process local image contrast? It is unlikely that the LGN (linearly) integrates the output of a population of spatially overlapping filters to determine local image contrast as this would make it sensitive to receptive field clutter [II]. Here we depart from the view that LGN aims to minimize receptive clutter by selecting a single output from a population of scale and gain specific contrast filters [12]. Specifically, in order to determine contrast at an image location, we apply the smallest filter with boosted contrast output above what can be expected to be noise for that particular filter. We define local contrast as the amount of contrast exceeding the noise threshold, which for a given scale and gain is set here to half standard deviation of contrasts in 800 natural images (see figure 1). This contrast response selection mechanism produces a contrast magnitude map in ways similar to the scale selection model in [13]. We apply the local contrast selection mechanism separately to the individual color components of an image. From a single color image, the three color components are extracted using the Gaussian color model [14], resulting in a gray-scale, blue-yellow and red-green image representations. Each of these representations is convolved with the 25 scale and gain specific contrast filters and subsequently subjected to our local contrast selection mechanism. For each color component a dedicated scale and gain dependent noise threshold is used (see figure I). As a result, for each color image we get three contrast magnitude maps, which we linearly sum to arrive at a single contrast magnitude map. 2.3 Weibull statistics of local image contrast The contrast magnitude map of an image is summarized in a histogram, representing the distribution of local contrast values of that image. Note that the histogram does not preserve information about spatial structure in the contrast magnitude map: a scrambling the contrast magnitude map will not affect the histogram. We subsequently fit a three-parameter Weibull distribution to the contrast histogram. The three-parameter Wei bull distribution is given by f(x) = cexpc';tY (I) The parameters of this distribution are indicative for the spatial structure in a natural scene (see figure 2) and can be put in a biologically plausible framework [7]. The scale parameter f3 describes the width of the histogram. Hence, it varies roughly with the variation in local image contrasts. The shape parameter y describes the shape of the histogram. It varies with the amount of scene clutter. The J1 parameter, represents the origin of the distribution. Its position is influenced by uneven illumination. The three Weibull parameters are estimated using a maximum likelihood estimator (MLE). To achieve illumination invariance, the J1 parameter is normalized out. Edge Strength 13=5.0,]'=1.6 ~ I:: "". GJ ::::lI cGJ .... u.. GJ Cl "'C W Edge Strength 13 = 0 .9,]'= 0.8 Figure 2: Two arbitrary natural images from the Corel Photo Library with varying degrees of details and varying degrees of scene clutter. The details in the upper image are chaotic. They range from large for the bird to small for partially occluded tree branches. In contrast, the second picture depicts a single coherent object, the eagle, against a highly uniform background. The image gradient at each image location shows the contrast strength. All gradients accumulated in a histogram reveal the distribution of local contrasts. The scale and shape parameters of the Weibull distribution are estimated from the fit to the histogram by maximum likelihood estimation. 2.4 Model Estimation We use EEG response signals from C channels (electrodes) covering the entire cortex, to develop a Wei bull response model that predicts neuronal responses to natural images. EEG signals are measured for S subjects watching N natural images. We average these signals across subjects to obtain a more robust response signal per channel and per image. This results in an N x C matrix F(t) of response signals fne(t). We construct a linear Wei bull response model for each channel separately. Our rationale for combining the two Weibull parameters in a linear fashion is that these two parameters can be suitably extracted from the X and Y units in the LGN model (as shown in Scholte et al [7]) and as such the linear combination reflects linear pooling at the LGN level. Functional data analysis [15] provides a natural framework for modeling continuous stochastic brain processes. We use a point-wise multivariate functional linear model to establish the relation between Weibull parameters X = [,81, ... ,i3N;YI, ···,YNf and the EEG response feCt) = Line, ... ,jNeF. The values i3n, Yn are the Wei bull parameters of image nand lne is the across subject average response to that image at channel c. Wei bull response model estimation for channel c then reduces to solving feet) = XwCt) + E(t) (2) where wet) is 2 x I vector of regression functions and ECt) = [EICt), .... , Es(t)f is the vector ofresidual functions. Under the assumption that the residual functions E(t) are independent and normally distributed with zero mean, the regression function is estimated by least squares minimization such that weCt) = min f11fe(t) - XW*(t)11 2dt. W'(i) t (3) A roughness penalty, based on the second derivative of wCt), regularize the estimate we(t). The estimated regression function provides the best estimate of feCt) in least squares sense: (4) We use we(t) to predict the EEG responses to a new set of M images represented by their Weibull distribution. The EEG responses to these new images are predicted using the Wei bull response model: (5) where the M X 2 data matrix Y contains the two Weibull parameters for each of the new images and the M-vector of functions ge(t) denotes the predicted neural responses for channel c. 2.5 Image Identification How well does the Wei bull response model predict EEG responses to natural images? We answer this question in terms of EEG-based identification of individual images. Given a set of M new images and their Weibull parameters Y, the Weibull response model provides the EEG prediction ge(t). The match between prediction ge(t) and true, measured EEG activity ge(t) = [gl, ... ,gM] provides a means for image identification. More specifically, an M X M similarity matrix S is constructed, where each element contains the Pearson's correlation coefficient R between measured gem(t) and predicted gcm(t) response. The similarity matrix shows for each individual image, the amount of EEG correlation with the other images. The image whose predicted activity pattern is most correlated with the measured activity pattern is selected. A similarity matrix is constructed separately for each of the C channels. These similarity matrices are squared in order to allow averaging of similarity matrices across channels. Hence, the square of the correlation coefficient r2 rather than r itself is used as a measure of similarity between true and predicted response. 3 Experiments and Results 3.1 Stimulus and EEG Data In our experiments we used 800 color images with a resolution 345 x 217 pixels and a bit-depth of 24. Of these, 400 were pictures of animals in their natural habitat and 400 pictures of natural landscapes, city scenes, indoor scenes and man-made objects. These images were taken from a larger set of images used in Fabre-Thorpe [16]. This subset of images was reasonably balanced in terms of Michelson contrast, spatial frequency and orientation properties. The Weibull properties of these images nevertheless covered a wide range of real-world images. The data set did not contain near duplicates. The images were presented to 32 subjects on a 19" I1yama monitor with a resolution of 1024*768 pixels and a frame-rate of 100 Hz. Subjects were seated 90 cm from the monitor. During EEG acquisition a stimulus was presented, on average every 1500 ms (range 1000-2000 ms) for 100 ms. Each stimulus was presented 2 times for a total of 1600 presentations. Recordings were made with a Biosemi 52-channel Active Two EEG system (Biosemi Instrumentation BV, Amsterdam, The Netherlands). Data was sampled at 256 Hz. Data analysis was identical to [17] with the exception that the high-pass filter was placed at 0.1 Hz (12 db/octave) and the pre-stimulus baseline activity was taken between -100 and 0 ms with regard to stimulus onset. Trials were averaged over subject per individual stimulus resulting in 800 averages of 20 to 32 averages per individual image. 3.2 Experiments The experiments were carried out with the following parameters settings. Two banks of Gaussian second-order derivative filters were used to determine image contrast for each image location. The first set consisted of filters with octave spatial scales 1.5, 3, 6, 12, 24 (std. in pixels). This set was used to determine the Wei bull scale parameter [3. The other filter bank, with scales 3, 6, 12, 24, 48, was used for the estimation of Wei bull shape parameter y. The spatial properties of the two sets were determined experimentally and roughly correspond to receptive field sizes of small X and large Y Ganglion cells in the early visual system of the human brain [18]. We used 5 semi-saturation constants between 0.15 and 1.6 to cover the spectrum from linear to non-linear contrast gain control in the LGN. A cross validation study was performed to obtain reliable performance measurements. We repeated the same experiment 50 times, each time randomly selecting 700 images for model estimation and 100 images for image identification. Performance was measured in terms of the percentage of correctly identified images for each of the 50 experiments. The 50 measures were then averaged to 0.' <£. 0.7 ~ .~ O.B ~ 0.5 ." 1- 0.4Jij 0.3 B 00 . .2 i <f 0.1 O.B r£ 0.8 ~ .~ ~ ffi 0.4 ~ • ;n 0.2 ' °0L---'~0--~--~~~4~ O ---5~0----60--~ro -10~2--~~~~~~~~~=4~M~--~M~0~ Electrcx:hu. jsorted) Time kom onset (m s) Figure 3: Total explained variance in ERP signals by the two Wei bull parameters. The peak of the total explained variance is highest (75 percent) for the IZ electrode overlying the early visual cortex and gradually decays at higher brain areas. The time course of explained variance for the IZ electrode reveals that the peak occurs at 113 ms after stimulus onset. arrive at a single performance outcome. Hence, accuracy was defined as the fraction of images for which the predicted activity pattern and measured activity pattern produced the highest r2. As accuracy does not reflect how close the correct image was to being selected, we also ranked the correlation coefficients and determined within which percentage of the ranked M images the correct one was. 3.3 Results We first present correlations between ERP signals from across the entire brain and the two parameters of the Weibull fit to the sum of selected local contrast values in the gray-level, blue-yellow and red-green components of each image. Correlations are strikingly high at electrode Iz overlying the early visual cortex. The peak r2 (square of the correlation coefficient) over time for that electrode is 75 percent (r = 0.8691; p = 0). The peak r2 over time slowly decays away from the occipital part of the head as can be seen from the topographic plots in figure 3. The Wei bull parameters explain most variance in the ERP signal very early in visual processing at 113 ms after stimulus onset (3) and continue to explain variance up to about 200 ms. This suggests that the two Wei bull parameters are probably only relevant to the brain in the early phases of visual processing. Accuracy results are shown in figure 4. The topographic plots show image identification accuracy for single channels (electrodes). Channel IZ produces the highest accuracy with 5 percent. This means that based on ERP signal at the IZ electrode, 5 out of 100 images are on average correctly identified from the similarity matrix. Then follow channel Oz with 4.3 percent, 02 with 4.1 and so on. Image identification based on multiple channels strikingly improves performance as shown in figure 4. When the similarity matrices from the 20 most contributive channels are averaged, accuracy of almost 90 percent is obtained. This means that, with a Wei bull response model of only two parameters, almost every image can be correctly identified from the neural activity that this image triggers. As an aside we note that this implies that the different parts of the early visual system process different types of images (in terms of the two Wei bull parameters) in different ways. To test the individual contribution of the Weibull parameters, we performed principal component analysis on the beta and gamma parameters and used the principal component scores separately for image identification. A Weibull response model based only on one of the two principal component scores performs significantly less as can be seen in figure 4. Moreover, there is large difference in accuracy performance between the two projected Wei bull parameters. These results demonstrate 1 00 ~ 90 ~ 1!, "" '" ~ i ~ 1 0 0 0 --~---------------------------­ ,-r r 2 0 30 -- Full model (natural im ages) Partial model 1 . - - P a rtial mod el 2 F u ll m odel (artificia l images) 40 5 0 E lectrodes ( ra nked according to individual perfoman ce ) 6 0 Figure 4: Accuracy performance for the full (two-parameter) and partial (orthogonal projection of one of the two parameters) Weibull response model. Accuracy is based on the accumulation of image identification at multiple channels. The topographic plots show the accuracy performance for the individual channels. that the two Weibull parameters indeed capture two different perceptual aspects of natural scenes, which together constitutes an important part of early neural processing of natural images. Accuracy results in figure 4 only show how often the correct image is ranked first, not where it is ranked. We therefore analyzed the image rankings (data not shown). For the first most contributive channel (41), the correct image is always ranked within the top 13 percent of the images. The ranking slightly worsens (top 15 percent) for the second most contributive channel (Oz) and for the third (02, top 16 percent). From the fourth channel and beyond there is a clear but steady drop in ranking. The ranking data show an overall pattern similar to the one seen in the accuracy data and indicate that, even in cases where an image is not correctly identified, the misidentification is limited. When does identification fail? We extracted frequently confused image pairs from all similarity matrices of all 50 cross validation steps for all 64 channels. These image pairs reveal that identification errors tend to occur when the selected image is visually similar to the correct image. The upper row of figure 5 shows 4 images from our data set and the images with which these have been confused frequently. The first set of 2 images, containing grazing cows and a packed donkey, have been confused 6 times across the 50 cross validation experiments, the second, and third set 5 times and the fourth set 4 times. The overall similarity between the confused images is evident and remarkable considering the variety of images we have used. These findings suggest that the Wei bull model captures aspect of a scene's visual gist that the brain possibly uses for perception at a glance. We further scrutinized image identification performance on occlusion models of natural images. Following [19], we created 24 types of dead leave images containing disks of various sizes (large, medium and small), size distributions (Power law and exponential), intensities (equal intensity versus decaying intensity) and opacities (occluding versus transparent). For each image type, 16 instances were composed resulting in a total of 384 dead leave images. We presented 16 subjects with the 384 dead leaves images while recording their EEG activity. As with our natural images, the beta and gamma parameter values of the Weibull contrast distributions underlying the 364 dead leave images correlated highly with EEG activity (r2 = 0.83). A cross validation experiment in which we used 284 dead leaves images for building a Wei bull response model and 100 for image identification resulted in an average image identification performance of 94 percent (see figure 4). Confusion analysis revealed that dead leave images with clear disks were well identified, whereas dead leaves images composed of transparent and thus indistinguishable disks were confused frequently (figure Figure 5: Most confused image pairs during cross-validation. Note the global similarity in spatial configuration between the natural image pairs. Similarity between most confused dead leave image pairs is also apparent: except for the fourth pair, they are all images with transparent disk (but with different disk sizes and disk intensity patterns). Dead leave images with small, opaque and equal intensity disks (as in the lower right example) were least confused. 5). Apparently, the information in the EEG signal that facilitates image identification is related to clear object-background differences. 4 Discussion and Conclusion To determine local image contrasts, we have applied a bank of biologically-motivated contrast filters to each image location and selected a single filter output based on receptive field size and response reliability. The statistics of locally selected image contrasts, appropriately captured by the Weibull distribution, explain up to 75 percent of occipital EEG activity for natural images and almost 83 for artificial dead leave images. We have used Wei bull contrast statistics of these images and corresponding EEG activity to construct a Weibull response model for EEG-based rapid image identification. Using this model, we have obtained image identification performance of 90 percent for natural images and 94 percent for dead leave images, which is remarkable considering the simplicity of the two-parameter Weibull image model and the limited spatial resolution of EEG data. We attribute this success to the ability of the Weibull parameters to structure the space of natural images in a highly meaningful and compact way, invariant to a large class of accidental or trivial scene features. Both the scale and shape parameters contribute to the meaningful organization of natural images and appear to play an important role in the early neural processing of natural images. Kay et. al [8] report similar image identification performance using an other biologically plausible model. In this model, a natural image is represented by a large set of Gabor wavelets differing in size, position, orientation, spatial frequency and phase. Haemodynaymic responses in the visual cortex are integrally modeled as a linear function of the contrast energy contained in quadrature wavelet pairs. In a repeated trial experiment involving 1700 training images, 120 test images, and fMRI data of 2 subjects, 92 percent of the test images were correctly identified for one subject and 72 for a second subject. In a single trial experiment, the reported performances are 52 and 31 percent respectively. We note that in contrast to [8], our neural response model is based on (summary) statistics of filter outputs, rather than on filter outputs themselves. This may explain our models ability to compactly describe a scene's visual gist. In conclusion, we embrace the view that common factors of natural images imprinted in the brain daily, underlie rapid image identification by humans. Departing from this view, we establish a relationship between natural image statistics and neural processing through the Weibull response model. Results with EEG-based image identification using the Wei bull response model, together with the biological plausibility of the Weibull response model, supports the idea that the human visual system evolved, among others, to estimate the Weibull statistics of natural images for rapid extraction of their visual gist [7]. References [1] E.P. Simoncelli and Olshausen. B. Natural image statistics and neural representation. Annu. Rev. Neurosci., 24:11931216, 200l. [2] A. Oliva and A. Torralba. Building the gist of a scene: The role of global image features in recognition. Visual Perception, Progress in Brain Research, 155,2006. [3] S. G. Mallat. A theory for multiresolution signal decomposition: The wavelet representation. IEEE Trans. Pattern Anal. Mach. Intell., 11(7):674-693, 1989. [4] M.A. Thomson. Higher-order structure in natural scenes. 1. Opt. Soc. Am. A, 16:15491553, 1999. [5] E.P. Simoncelli, A. Srivastava, A.B. Lee, and S-C Zhu. On advances in statistical modeling of natural images. Journal o.f Mathematical Imaging and Vision, 18(1), 2003. [6] J. M. Geusebroek and A. W. M. Smeulders. A six-stimulus theory for stochastic texture. International Journal o.f Computer Vision, 62(1/2):7-16, 2005. [7] H. S. Scholte, S. Ghebreab, A. Smeulders, and V. Lamme. Brain responses strongly correlate with wei bull image statistics when processing natural images. Journal of Vision, 9(4):1-15, 2009. [8] K.N. Kay, T. Naselaris, R.J. Prenger, and J.L. Gallant. Identifying natural images from human brain activity. Nature, 452:352-355, 2008. [9] L.J. Croner and E. Kaplan. Receptive fields of p and m ganglion cells across the primate retina. Vision Research, 35(11):7-24, 1995. [10] V. Bonin, V. Mante, and M. Carandini. The suppressive field of neurons in lateral geniculate nucleus. Journal of Neuroscience, 25: 10844-10856, 2005. [11] M. Riesenhuber and T. Poggio. Hierarchical models of object recognition in cortex. Nature Neuroscience, 2(11): 1 019-1025, November 1999. [12] S.Ghebreab, H.S Scholte, V.A.F. Lamme, and A.W.M. Smeulders. Neural adaption to the spatial distribution of multi-scale contrast in natural images. Submitted. [13] J.H. Elder and S.W. Zucker. Local scale control for edge detection and blur estimation. IEEE Transactions on Pattern Analysis and Machine intelligence, 20:699-716,1998. [14] J. M. Geusebroek, R. van den Boomgaard, A. W. M. Smeulders, and H. Geerts. Color invariance. IEEE Transactions on Pattern Analysis and Machine intelligence, 23(12): 1338-1350, 2001. [15] J. Ramsay and B. Silverman. Functional Data Analysis. Springer-Verlag, 1997. [16] M. Fabre-Thorpe, A. Delorme, C. Marlot, and S.J. Thorpe. A limit to the speed of processing in ultra-rapid visual categorisation of novel natural scenes. Journal Cognitive Neuroscience, 13:171-180, 2001. [17] J.J. Fahrenfort, H.S. Scholte, and V.A.F. Lamme. The spatiotemporal profile of cortical processing leading up to visual perception. Journal o.f Vision, 8(1): 1-12, 2008. [18] L. Watanabe and R.W. Rodieck. Parasol and midget ganglion cells of the primate retina. Journal of Computational Neurology, 289:434-454, 1989. [19] W.H. Hsiao and R.P. Millane. Effects of occlusion, edges, and scaling on the power spectra of natural images. J. Opt. Soc. Am. A, 22:1789-1797, 2005.
2009
203
3,708
Learning from Neighboring Strokes: Combining Appearance and Context for Multi-Domain Sketch Recognition Tom Y. Ouyang Randall Davis Computer Science and Artificial Intelligence Laboratory Massachusetts Institute of Technology Cambridge, MA 02139 USA {ouyang,davis}@csail.mit.edu Abstract We propose a new sketch recognition framework that combines a rich representation of low level visual appearance with a graphical model for capturing high level relationships between symbols. This joint model of appearance and context allows our framework to be less sensitive to noise and drawing variations, improving accuracy and robustness. The result is a recognizer that is better able to handle the wide range of drawing styles found in messy freehand sketches. We evaluate our work on two real-world domains, molecular diagrams and electrical circuit diagrams, and show that our combined approach significantly improves recognition performance. 1 Introduction Sketches are everywhere. From flow charts to chemical structures to electrical circuits, people use them every day to communicate information across many different domains. They are also be an important part of the early design process, helping us explore rough ideas and solutions in an informal environment. However, despite their ubiquity, there is still a large gap between how people naturally interact with sketches and how computers can interpret them today. Current authoring programs like ChemDraw (for chemical structures) and Visio (for general diagrams) still rely on the traditional point-click-drag style of interaction. While popular, they simply do not provide the ease of use, naturalness, or speed of drawing on paper. We propose a new framework for sketch recognition that combines a rich representation of low level visual appearance with a probabilistic model for capturing higher level relationships. By “visual appearance” we mean an image-based representation that preserves the pictoral nature of the ink. By “higher level relationships” we mean the spatial relationships between different symbols. Our combined approach uses a graphical model that classifies each symbol jointly with its context, allowing neighboring interpretations to influence each other. This makes our method less sensitive to noise and drawing variations, significantly improving robustness and accuracy. The result is a recognizer that is better able to handle the range of drawing styles found in messy freehand sketches. Current work in sketch recognition can, very broadly speaking, be separated into two groups. The first group focuses on the relationships between geometric primitives like lines, arcs, and curves, specifying them either manually [1, 4, 5] or learning them from labeled data [16, 20]. Recognition is then posed as a constraint satisfaction problem, as in [4, 5], or as an inference problem on a graphical model, as in [1, 16, 17, 20]. However, in many real-world sketches, it is difficult to extract these primitives reliably. Circles may not always be round, line segments may not be straight, and stroke artifacts like pen-drag (not lifting the pen between strokes), over-tracing (drawing over a 1 previously drawn stroke), and stray ink may introduce false primitives that lead to poor recognition. In addition, recognizers that rely on extracted primitives often discard potentially useful information contained in the appearance of the original strokes. The second group of related work focuses on the visual appearance of shapes and symbols. These include parts-based methods [9, 18], which learn a set of discriminative parts or patches for each symbol class, and template-based methods [7, 11], which compare the input symbol to a library of learned prototypes. The main advantage of vision-based approaches is their robustness to many of the drawing variations commonly found in real-world sketches, including artifacts like over-tracing and pen drag. However, these methods do not model the spatial relationships between neighboring shapes, relying solely on local appearance to classify a symbol. In the following sections we describe our approach, which combines both appearance and context. It is divided into three main stages: (1) stroke preprocessing: we decompose strokes (each stroke is defined as the set of points collected from pen-down to pen-up) into smaller segments, (2) symbol detection: we search for potential symbols (candidates) among groups of segments, and (3) candidate selection: we select a final set of detections from these candidates, taking into account their spatial relationships. 2 Preprocessing The first step in our recognition framework is to preprocess the sketch into a set of simple segments, as shown in Figure 1(b). The purpose for this step is twofold. First, like superpixels in computer vision [14], segments are much easier to work with than individual points or pixels; the number of points can be large even in moderate-sized sketches, making optimization intractable. Second, in the domains we evaluated, the boundaries between segments effectively preserve the boundaries between symbols. This is not the case when working with the strokes directly, so preprocessing allows us to handle strokes that contain more than one symbol (e.g., when a wire and resistor are drawn together without lifting the pen). Our preprocessing algorithm divides strokes into segments by splitting them at their corner points. Previous approaches to corner detection focused primarily on local pen speed and curvature [15], but these measures are not always reliable in messy real-world sketches. Our corner detection algorithm, on the other hand, tries to find the set of vertices that best approximates the original stroke as a whole. It repeatedly discards the vertex vi that contributes the least to the quality of fit measure q, which we define as: q(vi) = (MSE(v \ vi, s) −MSE(v, s)) ∗curvature(vi) (1) where s is the set of points in the original stroke, v is the current set of vertices remaining in the line segment approximation, curvature(vi) is a measure of the local stroke curvature1, and (MSE(v \ vi, s) −MSE(v, s)) is the increase in mean squared error caused by removing vertex vi from the approximation. Thus, instead of immediately trying to decide which point is a corner, our detector starts by making the simpler decision about which point is not a corner. The process ends when q(vi) is greater than a predefined threshold2. At the end of the preprocessing stage, the system records the length of the longest segment L (after excluding the top 5% as outliers). This value is used in subsequent stages as a rough estimate for the overall scale of the sketch. 3 Symbol Detection Our algorithm searches for symbols among groups of segments. Starting with each segment in isolation, we generate successively larger groups by expanding the group to include the next closest segment3. This process ends when either the size of the group exceeds 2L (a spatial constraint) or 1Defined as the distance between vi and the line segment formed by vi−1 and vi+1 2In our experiments, we set the threshold to 0.01 times the diagonal length of the stroke’s bounding box. 3Distance defined as mindist(s, g) + bbdist(s, g), where mindist(s, g) is the distance at the nearest point between segment s and group g and bbdist(s, g) is the diagonal length of the bounding box containing s and g. 2 (b) Segments after preprocessing (c) Candidate groups (a) Original Strokes (d) G hi l d l ( ) Fi l d i (d) Graphical model (e) Final detections Figure 1: Our recognition framework. (a) An example sketch of a circuit diagram and (b) the segments after preprocessing. (c) A subset of the candidate groups extracted from the sketch (only those with an appearance potential > 0.25 are shown). (d) The resulting graphical model: nodes represent segment labels, dark blue edges represent group overlap potentials, and light blue edges represent context potentials. (e) The final set of symbol detections after running loopy belief propagation. when the group spans more strokes than the temporal window specified for the domain4. Note that we allow temporal gaps in the detection region, so symbols do not need to be drawn with consecutive strokes. An illustration of this process is shown in Figure 1(c). We classify each candidate group using the symbol recognizer we described in [11], which converts the on-line stroke sequences into a set of low resolution feature images (see Figure 2(a)). This emphasis on visual appearance makes our method less sensitive to stroke level differences like overtracing and pen drag, improving accuracy and robustness. Since [11] was designed for classifying isolated shapes and not for detecting symbols in messy sketches, we augment its output with five geometric features and a set of local context features: stroke count: The number of strokes in the group. segment count: The number of segments in the group. diagonal length: The diagonal length of the group’s bounding box, normalized by L. group ink density: The total length of the strokes in the group divided by the diagonal length. This feature is a measure of the group’s ink density. stroke separation: Maximum distance between any stroke and its nearest neighbor in the group. local context: A set of four feature images that captures the local context around the group. Each image filters the local appearance at a specific orientation: 0, 45, 90, and 135 degrees. The images are centered at the middle of the group’s bounding box and scaled so that each dimension is equal to the group’s diagonal length, as shown in Figure 2(b). The initial 12x12 images are smoothed using a Gaussian filter, down-sampled by a factor of 4. The symbol detector uses a linear SVM [13] to classify each candidate group, labeling it as one of the symbols in the domain or as mis-grouped “clutter”. The training data includes both valid symbols and clutter regions. Because the classifier needs to distinguish between more than two classes, we 4The temporal window is 8 strokes for chemistry diagrams and 20 strokes for the circuit diagrams. These parameters were selected empirically, and can be customized by the system designer for each new domain. 3 (a) Isolated recognizer features (b) Local context features 0 45 90 135 end (c) Local context features 0 45 90 135 0 45 90 135 Figure 2: Symbol Detection Features. (a) The set of five 12x12 feature images used by the isolated appearance-based classifier. The first four images encode stroke orientation at 0, 45, 90, and 135 degrees; the fifth captures the locations of stroke endpoints. (b) The set of four local context images for multi-segment symbol. (c) The set of four local context images for single-segment symbols. use the one-vs-one strategy for combining binary classifiers. Also, to generate probability estimates, we fit a logistic regression model to the outputs of the SVM [12]. Many of the features above are not very useful for groups that contain only one segment. For example, an isolated segment always looks like a straight line, so its visual appearance is not very informative. Thus, we use a different set of features to classify candidates that contain only a single segment: (e.g., wires in circuits and straight bonds in chemistry): orientation: The orientation of the segment, discretized into evenly space bins of size π/4. segment length: The length of the segment, normalized by L. segment count: The total number of segments extracted from the parent stroke. segment ink density: The length of the substroke matching the start and end points of the segment divided by the length of the segment. This is a measure of the segment’s curvature and is higher for more curved segments. stroke ink density: The length of the parent stroke divided by the diagonal length of the parent stroke’s bounding box. local context: Same as the local context for multi-segment symbols, except these images are centered at the midpoint of the segment, oriented in the same direction as the segment, and scaled so that each dimension is equal to two times the length of the segment. An example is shown in 2(c). 4 Improving Recognition using Context The final task is to select a set of symbol detections from the competing candidate groups. Our candidate selection algorithm has two main objectives. First, it must avoid selecting candidates that conflict with each other because they share one or more segments. Second, it should select candidates that are consistent with each other based on what the system knows about the likely spatial relationships between symbols. We use an undirected graphical model to encode the relationships between competing candidates. Under our formulation, each segment (node) in the sketch needs to be assigned to one of the candidate groups (labels). Thus, our candidate selection problem becomes a segment labeling problem, where the set of possible labels for a given segment is the set of candidate groups that contain that segment. This allows us to incorporate local appearance, group overlap consistency, and spatial context into a single unified model. 4 vi vij vi v vi vij vi Spatial relationships: θ1=angle(vi , vj) θ2=angle(vi , vij) θ3=abs(|vi| - |vj|) vj vj vj vj 1 i j 2 i ij 3 i j Figure 3: Spatial relationships: The three measurements used to calculate the context potential ψc(ci, cj, xi, xj), where vi and vj are vector representing segment xi and xj and vij is a vector from the center of vi to the center of vj. The joint probability function over the entire graph is given by: log P(c|x) = X i appearance z }| { ψa(ci, x) + X ij overlap z }| { ψo(ci, cj) + context z }| { ψc(ci, cj, xi, xj) −log(Z) (2) where x is the set of segments in the sketch, c is the set of segment labels, and Z is a normalizing constant. Appearance potential. The appearance potential ψa measures how well the candidate group’s appearance matches that of its predicted class. It uses the output of the isolated symbol classifier in section 4 and is defined as: ψa(ci, x) = log Pa(ci|x) (3) where Pa(ci|x) is the likelihood score for candidate ci returned by the isolated symbol classifier. Group overlap potential. The overlap potential ψo(ci, cj) is a pairwise compatibility that ensures the segment assignments do not conflict with each other. For example, if segments xi and xj are both members of candidate c and xi is assigned to c, then xj must also be assigned to c. ψo(ci, cj) =  −100, if ((xi ∈cj) or (xj ∈ci)) and (ci ̸= cj) 0, otherwise (4) To improve efficiency, instead of connecting every pair of segments that are jointly considered in c, we connect the segments into a loop based on temporal ordering. This accomplishes the same constraint with fewer edges. An example is shown in Figure 1(d). Joint Context Potential. The context potential ψc(ci, cj, xi, xj) represents the spatial compatibility between segments xi and xj, conditioned on their predicted class labels (e.g., resistor-resistor, resistor-wire, etc). It is encoded as a conditional probability table that counts the number of times each spatial relationship (θ1, θ2, θ3) occurred for a given class pair (see Figure 3). ψc(ci, cj, xi, xj) = log Pc(θ(xi, xj) | class(ci), class(cj)) (5) where class(ci) is the predicted class for candidate ci and θ(xi, xj) is the set of three spatial relationships (θ1, θ2, θ3) between segments xi and xj. This potential is active only for pairs of segments whose distance at the closest point is less than L/2. To build the probability table we discretize θ1 and θ2 into bins of size π/8 and θ3 into bins of size L/4. The entries in the conditional probability table are defined as: Pc(θ | li, lj) = Nθ,classi,classj + α P θ′ Nθ′,classi,classj + α (6) 5 where Nθ,classi,classj is the number of times we observed a pair of segments with spatial relationship θ and class labels (classi, classj) and α is a weak prior (α = 10 in our experiments). Inference. We apply the max-product belief propagation algorithm [22] to find the configuration that maximizes Equation 2. Belief propagation works by iteratively passing messages around the connected nodes in the graph; each message from node i to node j contains i’s belief for each possible state of j. In our implementation we use an “accelerated” message passing schedule [21] that propagates messages immediately without waiting for other nodes to finish. The procedure alternates between forward and backward passes through the nodes based on the temporal ordering of the segments, running for a total of 100 iterations. 5 Evaluation One goal of our research is to build a system that can handle the range of drawings styles found in natural, real world diagrams. As a result, our data collection program was designed to behave like a piece of paper, i.e., capturing the sketch but providing no recognition or feedback. Using the data we collected, we evaluated five versions of our system: Appearance uses only the isolated appearance-based recognizer from [11]. Appearance+Geometry uses isolated appearance and geometric features. Appearance+Geometry+Local uses isolated appearance, geometric features, and local context. Complete is the complete framework described in this paper, using our corner detector. Complete (corner detector from [15]) is the complete framework, using the corner detector in [15]. (We include this comparison to evaluate the effectiveness of our corner detection algorithm.) Note that the first three versions still use the group overlap potential to select the best set of consistent candidates. Chemistry For this evaluation we recruited 10 participants who were familiar with organic chemistry and asked each of them to draw 12 real world organic compounds (e.g., Aspirin, Penicillin, Sildenafil, etc) on a Tablet PC. We performed a set of user-independent performance evaluations, testing our system on one user while using the examples from the other 9 users as training data. By leaving out sketches from the same participant, this evaluation demonstrates how well our system would perform on a new user. For this domain we noticed that users almost never drew multiple symbols using a single stroke, with the exception of multiple connected straight bonds (e.g., rings). Following this observation, we optimized our candidate extractor to filter out multi-segment candidates that break stroke boundaries. Method Accuracy Complete (corner detector from [15]) 0.806 Appearance 0.889 Appearance+Geometry 0.947 Appearance+Geometry+Local 0.958 Complete 0.971 Table 1: Overall recognition accuracy for the chemistry dataset. Note that for this dataset we report only accuracy (recall), because, unlike traditional object detection, there are no overlapping detections and every stroke is assigned to a symbol. Thus, a false positive always causes a false negative, so recall and precision are redundant: e.g., misclassifying one segment in a three-segment “H” makes it impossible to recognize the original “H” correctly. The results in Table 1 show that our method was able to recognize 97% of the symbols correctly. To be considered a correct recognition, a predicted symbol needs to match both the segmentation and class of the ground truth label. By modeling joint context, the complete framework was able to reduce the error rate by 31% compared to the next best method. Figure 4 (top) shows several sketches interpreted by our system. We can see that the diagrams in this dataset can be very messy, 6 and exhibit a wide range of drawing styles. Notice that in the center diagram, the system made two errors because the author drew hash bonds differently from all the other users, enclosing them inside a triangle. Circuits The second dataset is a collection of circuit diagrams collected by Oltmans and Davis [9]. The examples were from 10 users who were experienced in basic circuit design. Each user drew ten or eleven different circuits, and every circuit was required to include a pre-specified set of components. We again performed a set of user-independent performance evaluations. Because the exact locations of the ground truth labels are somewhat subjective (i.e., it is not obvious whether the resistor label should include the short wire segments on either end), we adopt the same evaluation metric used in the Pascal Challenge [2] and in [9]: a prediction is considered correct if the area of overlap between its bounding box and the ground truth label’s bounding box is greater than 50% of the area of their union. Also, since we do not count wire detections for this dataset (as in [9]), we report precision as well as recall. Method Precision Recall Oltmans 2007 [9] 0.257 0.739 Complete (corner detector from [15]) 0.831 0.802 Appearance 0.710 0.824 Appearance+Geometry 0.774 0.832 Appearance+Geometry+Local 0.879 0.874 Complete 0.908 0.912 Table 2: Overall recognition accuracy for the circuit diagram dataset. Table 2 shows that our method was able to recognize over 91% of the circuit symbols correctly. Compared to the next best method, the complete framework was able to reduce the error rate by 30%. On this dataset Oltmans and Davis [9] were able to achieve a best recall of 73.9% at a precision of 25.7%. Compared to their reported results, we reduced the error rate by 66% and more than triple the precision. As Figure 4 (bottom) shows, this is a very complicated and messy corpus with significant drawing variations like overtracing and pen drag. Runtime In the evaluations above, it took on average 0.1 seconds to process a new stroke in the circuits dataset and 0.02 seconds for the chemistry dataset (running on a 3.6 GHz machine, single-thread). With incremental interpretation, the system should be able to easily keep up in real time. Related Work Sketch recognition is a relatively new field, and we did not find any publicly available benchmarks for the domains we evaluated. In this section, we summarize the performance of existing systems that are similar to ours. Alvarado and Davis [1] proposed using dynamically constructed Bayesian networks to represent the contextual relationships between geometric primitives. They achieved an accuracy of 62% on a circuits dataset similar to ours, but needed to manually segment any strokes that contained more than one symbol. Gennari et al [3] developed a system that searches for symbols in high density regions of the sketch and uses domain knowledge to correct low level recognition errors. They reported an accuracy of 77% on a dataset with 6 types of circuit components. Sezgin and Davis [16] proposed using an HMM to model the temporal patterns of geometric primitives, and reported an accuracy of 87% on a dataset containing 4 types of circuit components. Shilman et. al. [17] proposed an approach that treats sketch recognition as a visual parsing problem. Our work differs from theirs in that we use a rich model of low-level visual appearance and do not require a pre-defined spatial grammar. Ouyang and Davis [10] developed a sketch recognition system that uses domain knowledge to refine its interpretation. Their work focused on chemical diagrams, and detection was limited to symbols drawn using consecutive strokes. Outside of the sketch recognition community, there is also a great deal of interest in combining appearance and context for problems in computer vision [6, 8, 19]. 7 Figure 4: Examples of chemical diagrams (top) and circuit diagrams (bottom) recognized by our system (complete framework). Correct detections are highlighted in green (teal for hash and wedge bonds), false detections in red, and missed symbols in orange. 6 Discussion We have proposed a new framework that combines a rich representation of low level visual appearance with a probabilistic model for capturing higher level relationships. To our knowledge this is the first paper to combine these two approaches, and the result is a recognizer that is better able to handle the range of drawing styles found in messy freehand sketches. To preserve the familiar experience of using pen and paper, our system supports the same symbols, notations, and drawing styles that people are already accustomed to. In our initial evaluation we apply our method on two real-world domains, chemical diagrams and electrical circuits (with 10 types of components), and achieve accuracy rates of 97% and 91% respectively. Compared to existing benchmarks in literature, our method achieved higher accuracy even though the other systems supported fewer symbols [3, 16], trained on data from the same user [3, 16], or required manual pre-segmentation [1]. Acknowledgements This research was supported in part by a DHS Graduate Research Fellowship and a grant from Pfizer, Inc. We thank Michael Oltmans for kindly making his dataset available to us. 8 References [1] C. Alvarado and R. Davis. Sketchread: A multi-domain sketch recognition engine. In Proc. ACM Symposium on User Interface Software and Technology, 2004. [2] M. Everingham, L. Van Gool, C. Williams, J. Winn, and A. Zisserman. The pascal visual object classes challenge 2008 results, 2008. [3] L. Gennari, L. Kara, T. Stahovich, and K. Shimada. Combining geometry and domain knowledge to interpret hand-drawn diagrams. Computers & Graphics, 29(4):547–562, 2005. [4] M. Gross. The electronic cocktail napkina computational environment for working with design diagrams. Design Studies, 17(1):53–69, 1996. [5] T. Hammond and R. Davis. Ladder: a language to describe drawing, display, and editing in sketch recognition. In Proc. International Conference on Computer Graphics and Interactive Techniques, 2006. [6] X. He, R. Zemel, and M. Carreira-Perpinan. Multiscale conditional random fields for image labeling. In Proc. IEEE Conference on Computer Vision and Pattern Recognition, 2004. [7] L. Kara and T. Stahovich. An image-based, trainable symbol recognizer for hand-drawn sketches. Computers & Graphics, 29(4):501–517, 2005. [8] K. Murphy, A. Torralba, and W. Freeman. Using the forest to see the trees: a graphical model relating features, objects and scenes. Advances in Neural Information Processing Systems, 2003. [9] M. Oltmans. Envisioning Sketch Recognition: A Local Feature Based Approach to Recognizing Informal Sketches. PhD thesis, Massachusetts Institute of Technology, Cambridge, MA, May 2007. [10] T. Y. Ouyang and R. Davis. Recognition of hand drawn chemical diagrams. In Proc. AAAI Conference on Artificial Intelligence, 2007. [11] T. Y. Ouyang and R. Davis. A visual approach to sketched symbol recognition. In Proc. International Joint Conferences on Artificial Intelligence, 2009. [12] J. Platt. Probabilities for sv machines. Advances in Neural Information Processing Systems, 1999. [13] J. Platt. Sequential minimal optimization: A fast algorithm for training support vector machines. Advances in Kernel Methods-Support Vector Learning, 1999. [14] X. Ren and J. Malik. Learning a classification model for segmentation. In Proc. IEEE International Conference on Computer Vision, pages 10–17, 2003. [15] T. Sezgin and R. Davis. Sketch based interfaces: Early processing for sketch understanding. In Proc. International Conference on Computer Graphics and Interactive Techniques. ACM New York, NY, USA, 2006. [16] T. Sezgin and R. Davis. Sketch recognition in interspersed drawings using time-based graphical models. Computers & Graphics, 32(5):500–510, 2008. [17] M. Shilman, H. Pasula, S. Russell, and R. Newton. Statistical visual language models for ink parsing. Proc. AAAI Spring Symposium on Sketch Understanding, 2002. [18] M. Shilman, P. Viola, and K. Chellapilla. Recognition and grouping of handwritten text in diagrams and equations. In Proc. International Workshop on Frontiers in Handwriting Recognition, 2004. [19] J. Shotton, J. Winn, C. Rother, and A. Criminisi. Textonboost: Joint appearance, shape and context modeling for multi-class object recognition and segmentation. Lecture Notes in Computer Science, 3951:1, 2006. [20] M. Szummer. Learning diagram parts with hidden random fields. In Proc. International Conference on Document Analysis and Recognition, 2005. [21] M. Tappen and W. Freeman. Comparison of graph cuts with belief propagation for stereo, using identical mrf parameters. In Proc. IEEE International Conference on Computer Vision, 2003. [22] J. Yedidia, W. Freeman, and Y. Weiss. Understanding belief propagation and its generalizations. Exploring Artificial Intelligence in the New Millennium, pages 239–269, 2003. 9
2009
204
3,709
Relax then Compensate: On Max-Product Belief Propagation and More Arthur Choi Computer Science Department University of California, Los Angeles Los Angeles, CA 90095 aychoi@cs.ucla.edu Adnan Darwiche Computer Science Department University of California, Los Angeles Los Angeles, CA 90095 darwiche@cs.ucla.edu Abstract We introduce a new perspective on approximations to the maximum a posteriori (MAP) task in probabilistic graphical models, that is based on simplifying a given instance, and then tightening the approximation. First, we start with a structural relaxation of the original model. We then infer from the relaxation its deficiencies, and compensate for them. This perspective allows us to identify two distinct classes of approximations. First, we find that max-product belief propagation can be viewed as a way to compensate for a relaxation, based on a particular idealized case for exactness. We identify a second approach to compensation that is based on a more refined idealized case, resulting in a new approximation with distinct properties. We go on to propose a new class of algorithms that, starting with a relaxation, iteratively seeks tighter approximations. 1 Introduction Relaxations are a popular approach for tackling intractable optimization problems. Indeed, for finding the maximum a posteriori (MAP) assignment in probabilistic graphical models, relaxations play a key role in a variety of algorithms. For example, tree-reweighted belief propagation (TRW-BP) can be thought of as a linear programming relaxation of an integer program for a given MAP problem [1, 2]. Branch-and-bound search algorithms for finding optimal MAP solutions, such as [3, 4], rely on structural relaxations, such as mini-bucket approximations, to provide upper bounds [4, 5]. Whether a relaxation is used as an approximation on its own, or as a guide for finding optimal solutions, a trade-off is typically made between the quality of an approximation and the complexity of computing it. We illustrate here instead how it is possible to tighten a given relaxation itself, without impacting its structural complexity. More specifically, we propose here an approach to approximating a given MAP problem by performing two steps. First, we relax the structure of a given probabilistic graphical model, which results in a simpler model whose MAP solution provides an upper bound on that of the original. Second, we compensate for the relaxation by introducing auxiliary parameters, which we use to restore certain properties, leading to a tighter approximation. We shall in fact propose two distinct properties on which a compensation can be based. The first is based on a simplified case where a compensation can be guaranteed to yield exact results. The second is based on a notion of an ideal compensation, that seeks to correct for a relaxation more directly. As we shall see, the first approach leads to a new semantics for the max-product belief propagation algorithm. The second approach leads to another approximation that further yields upper bounds on the MAP solution. We further propose an algorithm for finding such a compensation, that starts with a relaxation and iteratively provides monotonically decreasing upper bounds on the MAP solution (at least empirically). Proofs of results are given in the auxiliary Appendix. 1 2 MAP Assignments Let M be a factor graph over a set of variables X, inducing a distribution Pr(x) ∝Q a ψa(xa) where x = {X1 =x1, . . . , Xn =xn} is an assignment of factor graph variables Xi to states xi, and where a is an index to the factor ψa(Xa) over the domain Xa ⊆X. We seek the maximum a posteriori (MAP) assignment x⋆= argmaxx Q a ψa(xa). We denote the log of the value of a MAP assignment x⋆by: map⋆= log max x Y a ψa(xa) = max x X a log ψa(xa) which we refer to more simply as the MAP value. Note that there may be multiple MAP assignments x⋆, so we may refer to just the value map⋆when the particular assignment is not relevant. Next, if z is an assignment over variables Z ⊆X, then let x ∼z denote that x and z are compatible assignments, i.e., they set their common variables to the same states. Consider then the MAP value under a partial assignment z: map(z) = max x∼z X a log ψa(xa). We will, in particular, be interested in the MAP value map(X =x) where we assume a single variable X is set to a particular state x. We shall also refer to these MAP values more generally as map(.), without reference to any particular assignment. 3 Relaxation The structural relaxations that we consider here are based on the relaxation of equivalence constraints from a model M, where an equivalence constraint Xi ≡Xj is a factor ψeq(Xi, Xj) over two variables Xi and Xj that have the same states. Further, ψeq(xi, xj) is 1 if xi = xj and 0 otherwise. We call an assignment x valid, with respect to an equivalence constraint Xi ≡Xj, if it sets variables Xi and Xj to the same state, and invalid otherwise. Note that when we remove an equivalence constraint from a model M, the values map(x) for valid configurations x do not change, since log 1 = 0. However, the values map(x) for invalid configurations can increase, since they are −∞ prior to the removal. In fact, they could overtake the optimal value map⋆. Thus, the MAP value after relaxing an equivalence constraint in M is an upper bound on the original MAP value. It is straightforward to augment a model M to another where equivalence constraints can be relaxed. Consider, for example, a factor ψ1(A, B, C). We can replace the variable C in this factor with a clone variable C′, resulting in a factor ψ′ 1(A, B, C′). When we now add the factor ψ2(C, C′) for the equivalence constraint C ≡C′, we have a new model M′ which is equivalent to the original model M, in that an assignment x in M corresponds to an assignment x′ in M′, where assignment x′ sets a variable and its clone to the same state. Moreover, the value map(x) in model M is the same as the value map′(x′) in model M′. We note that a number of structural relaxations can be reduced to the removal of equivalence constraints, including relaxations found by deleting edges [6, 7], as well as mini-bucket approximations [5, 4]. In fact, the example above can be considered a relaxation where we delete a factor graph edge C →ψ1, substituting clone C′ in place of variable C. Note that mini-bucket approximations in particular have enabled algorithms for solving MAP problems via branch-and-bound search [3, 4]. 4 Compensation Suppose that we have a model M with MAP values map(.). Say that we remove the equivalence constraints in M, resulting in a relaxed model with MAP values r-map(.). Our goal is to identify a compensated model M′ with MAP values c-map(.) that is as tractable to compute as the values r-map(.), but yielding tighter approximations of the original values map(.). To this end, we introduce into the relaxation additional factors ψij;i(Xi) and ψij;j(Xj) for each equivalence constraint Xi ≡Xj that we remove. Equivalently, we can introduce the log factors θ(Xi) = log ψij;i(Xi) and θ(Xj) = log ψij;j(Xj) (we omit the additional factor indices, as they 2 will be unambiguous from the context). These new factors add new parameters into the approximation, which we shall use to recover a weaker notion of equivalence into the model. More specifically, given a set of equivalence constraints Xi ≡Xj to relax, we have the original MAP values map(.), the relaxation r-map(.) and the compensation c-map(.), where: • map(z) = maxx∼z P a log ψa(xa) + P Xi≡Xj log ψeq(Xi =xi, Xj =xj) • r-map(z) = maxx∼z P a log ψa(xa) • c-map(z) = maxx∼z P a log ψa(xa) + P Xi≡Xj θ(Xi =xi) + θ(Xj =xj) Note that the auxiliary factors θ of the compensation do not introduce additional complexity to the relaxation, in the sense that the treewidth of the resulting model is the same as that of the relaxation. Consider then the case where an optimal assignment x⋆for the relaxation happens to set variables Xi and Xj to the same state x, for each equivalence constraint Xi ≡Xj that we relaxed. In this case, the optimal solution for the relaxation is also an optimal solution for the original model, i.e., r-map⋆= map⋆. On the other hand, if a relaxation’s optimal assignment sets Xi and Xj to different states, then it is not a valid assignment for the original model M, as it violates the equivalence constraint and thus has log probability −∞. Consider, for a given equivalence constraint Xi ≡Xj, the relaxation’s MAP values r-map(Xi =x) and r-map(Xj =x) when we set, respectively, a single variable Xi or Xj to a state x. If for all states x we find that r-map(Xi =x) ̸= r-map(Xj =x), then we can infer that the MAP assignment sets variables Xi and Xj to different states: the MAP value when we set Xi to a state x is different than the MAP value when we set Xj to the same state. We can then ask of a compensation, for all states x, that c-map(Xi =x) = c-map(Xj =x), enforcing a weaker notion of equivalence. In this case, if there is a MAP assignment that sets variable Xi to a state x, then there is at least a MAP assignment that sets variable Xj to the same state, even if there is no MAP assignment that sets both Xi and Xj to the same state at the same time. We now want to identify parameters θ(Xi) and θ(Xj) to compensate for a relaxation in this manner. We propose two approaches: (1) based on a condition for exactness in a special case, and (2) based on a notion of ideal compensations. To get the intuitions behind these approaches, we consider first the simplified case where a single equivalence constraint is relaxed. 4.1 Intuitions: Splitting a Model into Two Consider the case where relaxing a single equivalence constraint Xi ≡Xj splits a model M into two independent sub-models, Mi and Mj, where sub-model Mi contains variable Xi and sub-model Mj contains variable Xj. Intuitively, we would like the parameters added in one sub-model to summarize the relevant information about the other sub-model. In this way, each sub-model could independently identify their optimal sub-assignments. For example, we can use the parameters: θ(Xi =x) = mapj(Xj =x) and θ(Xj =x) = mapi(Xi =x). Since sub-models Mi and Mj become independent after relaxing the single equivalence constraint Xi ≡Xj, computing these parameters is sufficient to reconstruct the MAP solution for the original model M. In particular, we have that θ(Xi =x) + θ(Xj =x) = map(Xi =x, Xj =x), and further that map⋆= maxx[θ(Xi =x) + θ(Xj =x)]. We propose then that the parameters of a compensation, with MAP values c-map(.), should satisfy the following condition: c-map(Xi =x) = c-map(Xj =x) = θ(Xi =x) + θ(Xj =x) + γ (1) for all states x. Here γ is an arbitrary normalization constant, but the choice γ = 1 2c-map⋆results in simpler semantics. The following proposition confirms that this choice of parameters does indeed reflect our earlier intuitions, showing that this choice allows us to recover exact solutions in the idealized case when a model is split into two. Proposition 1 Let map(.) denote the MAP values of a model M, and let c-map(.) denote the MAP values of a compensation that results from relaxing an equivalence constraint Xi ≡Xj that split M into two independent sub-models. Then the compensation has parameters satisfying Equation 1 iff c-map(Xi =x) = c-map(Xj =x) = map(Xi =x, Xj =x) + γ. 3 Note that the choice γ = 1 2c-map⋆implies that θ(Xi =x) + θ(Xj =x) = map(Xi =x, Xj =x) in the case where relaxing an equivalent constraint splits a model into two. In the case where relaxing an equivalence constraint does not split a model into two, a compensation satisfying Equation 1 at least satisfies a weaker notion of equivalence. We might expect that such a compensation may lead to more meaningful, and hopefully more accurate, approximations than a relaxation. Indeed, this compensation will eventually lead to a generalized class of belief propagation approximations. Thus, we call a compensation satisfying Equation 1 a REC-BP approximation. 4.2 Intuitions: An Ideal Compensation In the case where a single equivalence constraint Xi ≡Xj is relaxed, we may imagine the possibility of an “ideal” compensation where, as far as computing the MAP solution is concerned, a compensated model is as good as a model where the equivalence constraint was not relaxed. Consider then the following proposal of an ideal compensation, which has the following two properties. First, it has valid configurations: c-map(Xi =x) = c-map(Xj =x) = c-map(Xi =x, Xj =x) for all states x. Second it has scaled values for valid configurations: c-map(Xi =x, Xj =x) = κ · map(Xi =x, Xj =x). for all states x, and for some κ > 1. If a compensation has valid configurations, then its optimal solution sets variables Xi and Xj to the same state, and is thus a valid assignment for the original instance (it satisfies the equivalence constraint). Moreover, if it has scaled values, then the compensation further allows us to recover the MAP value as well. A compensation having valid configurations and scaled values is thus ideal as it is sufficient for us to recover the exact solution. It may not always be possible to find parameters that lead to an ideal compensation. However, we propose that a compensation’s parameters should satisfy: c-map(Xi =x) = c-map(Xj =x) = 2 · [θ(Xi =x) + θ(Xj =x)] (2) for all states x, where we choose κ = 2. As the following proposition tells us, if a compensation is an ideal one, then it must at least satisfy Equation 2. Proposition 2 Let map(.) denote the MAP values of a model M, and let c-map(.) denote the MAP values of a compensation that results from relaxing an equivalence constraint Xi ≡Xj in M. If c-map(.) has valid configurations and scaled values, then c-map(.) satisfies Equation 2. We thus call a compensation satisfying Equation 2 a REC-I compensation. We note that other values of κ > 1 can be used, but the choice κ = 2 given above results in simpler semantics. In particular, if a compensation happens to satisfy c-map(Xi =x) = c-map(Xj =x) = c-map(Xi =x, Xj =x) for some state x, we have that θ(Xi =x) + θ(Xj =x) = map(Xi =x, Xj =x) (i.e., the parameters alone can recover an original MAP value). Before we discuss the general case where we relax multiple equivalence constraints, we highlight first a few properties shared by both REC-BP and REC-I compensations, that shall follow from more general results that we shall present. First, if the optimal assignment x⋆for a compensation sets the variables Xi and Xj to the same state, then: (1) the assignment x⋆is also optimal for the original model M; and (2) 1 2c-map⋆= map⋆. In the case where x⋆does not set variables Xi and Xj to the same state, the value c-map⋆gives at least an upper bound that is no worse than the bound given by the relaxation alone. In particular: map⋆≤1 2c-map⋆≤r-map⋆. Thus, at least in the case where a single equivalence constraint is relaxed, the compensations implied by Equations 1 and 2 do indeed tighten a relaxation (see the auxiliary Appendix for further details). 4.3 General Properties In this section, we identify the conditions that compensations should satisfy in the more general case where multiple equivalence constraints are relaxed, and further highlight some of their properties. 4 Suppose that k equivalence constraints Xi ≡Xj are relaxed from a given model M. Then compensations REC-BP and REC-I seek to recover into the relaxation two weaker notions of equivalence. First, a REC-BP compensation has auxiliary parameters satisfying: c-map(Xi =x) = c-map(Xj =x) = θ(Xi =x) + θ(Xj =x) + γ (3) where γ = k 1+kc-map⋆. We then approximate the exact MAP value map⋆by the value 1 1+kc-map⋆. The following theorem relates REC-BP to max-product belief propagation. Theorem 1 Let map(.) denote the MAP values of a model M, and let c-map(.) denote the MAP values of a compensation that results from relaxing enough equivalence constraints Xi ≡Xj in M to render it fully disconnected. Then a compensation whose parameters satisfy Equation 3 has values exp{c-map(Xi =x)} that correspond to the max-marginals of a fixed-point of max-product belief propagation run on M, and vice-versa. Loopy max-product belief propagation is thus the degenerate case of a REC-BP compensation, when the approximation is fully disconnected (by deleting every factor graph edge, as defined in Section 3). Approximations need not be this extreme, and more structured approximations correspond to instances in the more general class of iterative joingraph propagation approximations [8, 6]. Next, a REC-I compensation has parameters satisfying: c-map(Xi =x) = c-map(Xj =x) = (1 + k)[θ(Xi =x) + θ(Xj =x)] (4) We again approximate the exact MAP value map⋆with the value 1 1+kc-map⋆. In both compensations, it is possible to determine if the optimal assignment x⋆of a compensation is an optimal assignment for the original model M: we need only check that it is a valid assignment. Theorem 2 Let map(.) denote the MAP values of a model M, and let c-map(.) denote the MAP values of a compensation that results from relaxing k equivalence constraints Xi ≡Xj. If the compensation has parameters satisfying either Eqs. 3 or 4, and if x⋆is an optimal assignment for the compensation that is also valid, then: (1) x⋆is optimal for the model M, and (2) 1 1+kc-map⋆= map⋆. This result is analogous to results for max-product BP, TRW-BP, and related algorithms [9, 2, 10]. A REC-I compensation has additional properties over a REC-BP compensation. First, a REC-I compensation yields upper bounds on the MAP value, whereas REC-BP does not yield a bound in general. Theorem 3 Let map(.) denote the MAP values of a model M, and let c-map(.) denote the MAP values of a compensation that results from relaxing k equivalence constraints Xi ≡Xj. If the compensation has parameters satisfying Equation 4, then map⋆≤ 1 1+kc-map⋆. We remark now that a relaxation alone has analogous properties. If an assignment x⋆is optimal for a relaxation with MAP values r-map(.), and it is also a valid assignment for a model M (i.e., it does not violate the equivalence constraints Xi ≡Xj), then x⋆is also optimal for M, where r-map(x⋆) = map(x⋆) (since they are composed of the same factor values). If an assignment x⋆of a relaxation is not valid for model M, then the MAP value of the relaxation is an upper bound on the original MAP value. On the other hand, REC-I compensations are tighter approximations than the corresponding relaxation, at least in the case when a single equivalence constraint is relaxed: map⋆≤ 1 2c-map⋆≤r-map⋆. When we relax multiple equivalence constraints we find, at least empirically, that REC-I bounds are never worse than relaxations, although we leave this point open. The following theorem has implications for MAP solvers that rely on relaxations for upper bounds. Theorem 4 Let map(.) denote the MAP values of a model M, and let c-map(.) denote the MAP values of a compensation that results from relaxing k equivalence constraints Xi ≡Xj. If the compensation has parameters satisfying Eq. 4, and if z is a partial assignment that sets the same sign to variables Xi and Xj, for any equivalence constraint Xi ≡Xj relaxed, then: map(z) ≤ 1 1+kc-map(z). Algorithms, such as those in [3, 4], perform a depth-first branch-and-bound search to find an optimal MAP solution. They rely on upper bounds of a MAP solution, under partial assignments, in order to prune the search space. Thus, any method capable of providing upper bounds tighter than those of a relaxation, can potentially have an impact in the performance of a branch-and-bound MAP solver. 5 Algorithm 1 RelaxEq-and-Compensate (REC) input: a model M with k equivalence constraints Xi ≡Xj output: a compensation M′ main: 1: M′ 0 ←result of relaxing all Xi ≡Xj in M 2: add to M′ 0 the factors θ(Xi), θ(Xj), for each Xi ≡Xj 3: initialize all parameters θ0(Xi =x), θ0(Xj =x), e.g., to 1 2r-map⋆ 4: t ←0 5: while parameters have not converged do 6: t ←t + 1 7: for each equivalence constraint Xi ≡Xj do 8: update parameters θ(Xi =x)t, θ(Xj =x)t, computed using compensation M′ t−1, by: 9: for REC-BP: Equations 5 & 6 10: for REC-I: Equations 7 & 8 11: θt(Xi) ←q · θt(Xi) + (1 −q) · θt−1(Xi) and θt(Xj) ←q · θt(Xj) + (1 −q) · θt−1(Xj) 12: return M′ t 5 An Algorithm to Find Compensations Up to this point, we have not discussed how to actually find the auxiliary parameters θ(Xi =x) and θ(Xj =x) of a compensation. However, Equations 3 and 4 naturally suggest iterative algorithms for finding REC-BP and REC-I compensations. Consider, for the case of REC-BP, the fact that parameters satisfy Equation 3 iff they satisfy: θ(Xi =x) = c-map(Xj =x) −θ(Xj =x) −γ θ(Xj =x) = c-map(Xi =x) −θ(Xi =x) −γ This suggests an iterative fixed-point procedure for finding the parameters of a compensation that satisfy Equation 3. First, we start with an initial compensation with MAP values c-map0(.), where parameters have been initialized to some value. For an iteration t > 0, we can update our parameters using the compensation from the previous iteration: θt(Xi =x) = c-mapt−1(Xj =x) −θt−1(Xj =x) −γt−1 (5) θt(Xj =x) = c-mapt−1(Xi =x) −θt−1(Xi =x) −γt−1 (6) where γt−1 = k 1+kc-map⋆ t−1. If at some point, the parameters of one iteration do not change in the next, then we can say that the iterations have converged, and that the compensation satisfies Equation 3. Similarly, for REC-I compensations, we use the update equations: θt(Xi =x) = 1 1+kc-mapt−1(Xj =x) −θt−1(Xj =x) (7) θt(Xj =x) = 1 1+kc-mapt−1(Xi =x) −θt−1(Xi =x) (8) to identify compensations that satisfy Equation 4. Algorithm 1 summarizes our proposal to compensate for a relaxation, using the iterative procedures for REC-BP and REC-I. We refer to this algorithm more generically as RelaxEq-and-Compensate (REC). Note that in Line 11, we further damp the updates by q, which is typical for such algorithms (we use q = 1 2). Note also that in Line 3, we suggest that we initialize parameters by 1 2r-map⋆. The consequence of this is that our initial compensation has the MAP value 1 1+kc-map⋆ 0 = r-map⋆.1 That is, the initial compensation is equivalent to the relaxation, for both REC-BP and REC-I. Typically, both algorithms tend to have compensations with decreasing MAP values. REC-BP may eventually have MAP values that oscillate however, and may not converge. On the other hand, by Theorem 3, we know that a REC-I compensation must yield an upper bound on the true MAP value map⋆. Starting with an initial upper bound r-map⋆from the relaxation, REC-I yields, at least empirically, monotonically decreasing upper bounds on the true MAP value from iteration to iteration. We explore this point further in the following section. 1c-map⋆ 0 = maxx c-map0(x) = maxx[r-map(x) + P Xi≡Xj θ(Xi =x) + θ(Xj =x)] = maxx[r-map(x) + k · r-map⋆] = r-map⋆+ k · r-map⋆ 6 0 5000 iterations 0.0 0.2 0.4 0.6 0.8 1.0 approximation error random grid (REC-BP) 0 5000 iterations 0.0 0.2 0.4 0.6 0.8 1.0 approximation error random frustrated grid (REC-I) 0 5000 iterations 0.0 0.2 0.4 0.6 0.8 1.0 approximation error random frustrated grid (REC-BP) 0 5000 iterations 0.0 0.2 0.4 0.6 0.8 1.0 approximation error random grid (REC-I) 0 5000 iterations 0.0 0.2 0.4 0.6 0.8 1.0 approximation error random frustrated grid (REC-I) 0 5000 iterations 0.0 0.2 0.4 0.6 0.8 1.0 approximation error random frustrated grid (REC-I) Figure 1: The REC algorithm in 10 × 10 grids. Left column: random grids, using REC-BP (top) and REC-I (bottom). Center column: frustrated grids, using REC-I with p = 1 2 (top), p = 1 3 (bottom). Right column: frustrated grids, using REC-BP (top) with a fully disconnected relaxation, and REC-I (bottom) with a relaxation with max cluster size 3. 6 Experiments Our goal in this section is to highlight the degree to which different types of compensations can tighten a relaxation, as well as to highlight the differences in the iterative algorithms to find them. We evaluated our compensations using randomly parametrized 10×10 grid networks. We judge the quality of an approximation by the degree to which a compensation is able to improve a relaxation. In particular, we measured the error E = 1 1+k c-map⋆−map⋆ r-map⋆−map⋆ which is zero when the compensation is exact, and one when the compensation is equivalent to the relaxation (remember that we initialize the REC algorithm, for both types of compensations, with parameters that led to an initial compensation with an optimal MAP value 1 1+kc-map⋆ 0 = r-map⋆). Note also that we use no instances where the error E is undefined, i.e., r-map⋆−c-map⋆= 0, where the relaxation alone was able to recover the exact solution. We first consider grid networks where factors ψa(xi, xj) were assigned to grid edges (i, j), with values drawn uniformly at random from 0 to 1 (we assigned no factors to nodes). We assumed first the coarsest possible relaxation, one that results in a fully disconnected approximation, and where the MAP value is found by maximizing factors independently.2 We expect a relaxation’s upper bound to be quite loose in this case. Consider first Figure 1 (left), where we generated ten random grid networks (we plotted only ten for clarity) and plotted the compensation errors (y-axis) as they evolved over iterations (x-axis). At iteration 0, the MAP value of each compensation is equivalent to that of the relaxation (by design). We see that, once we start iterating, that both methods of compensation can tighten the approximation of our very coarse relaxation. For REC-BP, we do so relatively quickly (in fewer iterations), and to exact or near-exact levels (note that the 10 instances plotted behave similarly). For REC-I, convergence is slower, but the compensation is still a significant improvement over the relaxation. Moreover, it is apparent that further iterations would benefit the compensation further. We next generated random grid networks with frustrated interactions. In particular, each edge was given either an attractive factor or repulsive factor, at random each with probability 1 2. An attractive factor ψa(Xi, Xj) was given a value at random from 1 −p to 1 if xi = xj and a value from 0 to 2For each factor ψa and for each variable X in ψa, we replaced variable X with a unique clone ˆ X and introduced the equivalence constraint X ≡ˆ X. When we then relax all equivalence constraints, the resulting factor graph is fully disconnected. This corresponds to deleting all factor graph edges, as described in Section 3. 7 p if xi ̸= xj, which favors configurations xi = xj when p ≤1 2. Similarly for repulsive factors, which favors instead configurations where xi ̸= xj. It is well known that belief propagation tends to not converge in networks with frustrated interactions [11]. Non-convergence is the primary failure mode for belief propagation, and in such cases, we may try to use instead REC-I. We generated 10 random grid networks with p = 1 2 and another 10 networks with p = 1 3. Although the frustration in these networks is relatively mild, REC-BP did not converge in any of these cases. On the other hand, REC-I compensations were relatively well behaved, and produced monotonically decreasing upper bounds on the MAP value; see Figure 1 (center). Although the degree of compensation is not as dramatic, we note that we are compensating for a very coarse relaxation (fully disconnected). In Figure 1 (right), we considered frustrated grid networks where p = 1 10, where REC-BP converged in only one of 10 networks generated. Moreover, we can see in that one instance, REC-BP converges below the true MAP value; remember that by Theorem 3, REC-I compensations always yield upper bounds. In the case of REC-I, the compensations did not improve significantly on the fully disconnected relaxations (not shown). It is, however, straightforward to try less extreme relaxations. For example, we used the mini-buckets-based approach to relaxation proposed in [4], and identified relaxed models M′ with jointrees that had a maximum cluster size of 3 (c.f., [12] which re-introduced constraints over triples). Surprisingly, this was enough for REC-I to compensate for the relaxation completely (to within 10−8) in 7 of the 10 instances plotted. REC-BP benefits from added structure as well, converging and compensating completely (to within 10−4) in 9 of 10 instances (not plotted). 7 Discussion There are two basic concepts underlying our proposed framework. The first is to relax a problem by dropping equivalence constraints. The second is that of compensating for a relaxation in ways that can capture existing algorithms as special cases, and in ways that allow us to design new algorithms. The idea of using structural relaxations for upper-bounding MAP solutions in probabilistic graphical models goes back to mini-bucket approximations [13], which can be considered to be a particular way of relaxing equivalence constraints from a model [4]. In this paper, we propose further a way to compensate for these relaxations, by restoring a weaker notion of equivalence. One approach to compensation identified a generalized class of max-product belief propagation approximations. We then identified a second approach that led to another class of approximations that we have observed to yield tighter upper bounds on MAP solutions as compared to a relaxation alone. An orthogonal approach to upper-bounding MAP solutions is based on linear programming (LP) relaxations, which has seen significant interest in recent years [1, 2]. This perspective is based on formulating MAP problems as integer programs, whose solutions are upper-bounded by tractable LP relaxations. A related approach based on Lagrangian relaxations is further capable of incorporating structural simplifications [14]. Indeed, there has been significant interest in identifying a precise connection between belief propagation and LP relaxations [2, 10]. In contrast to the above approaches, compensations further guarantee, in Theorem 4, upper bounds on MAP solutions under any partial assignment (without rerunning the algorithm). This property has the potential to impact algorithms, such as [3, 4], that rely on such upper bounds, under partial assignments, to perform a branch-and-bound search for optimal MAP solutions.3 Further, as we approximate MAP by computing it exactly in a compensated model, we avoid the difficulties that algorithms such as max-product BP and related algorithms face, which infer MAP assignments using max-marginals (which may not have unique maximal states), which is based on local information only [1]. The perspective that we propose further allows us to identify the intuitive differences between belief propagation and an upper-bound approximation, namely that they arise from different notions of compensation. We hope that this perspective will enable the design of new approximations, especially in domains where specific notions of compensation may suggest themselves. Acknowledgments This work has been partially supported by NSF grant #IIS-0916161. 3We investigated the use of REC-I approximations in depth-first branch-and-bound search for solving weighted Max-SAT problems, where we were able to use a more specialized iterative algorithm [15]. 8 References [1] Martin J. Wainwright, Tommi Jaakkola, and Alan S. Willsky. MAP estimation via agreement on trees: message-passing and linear programming. IEEE Transactions on Information Theory, 51(11):3697–3717, 2005. [2] Amir Globerson and Tommi Jaakkola. Fixing max-product: Convergent message passing algorithms for MAP LP-relaxations. In NIPS, pages 553–560, 2008. [3] Radu Marinescu, Kalev Kask, and Rina Dechter. Systematic vs. non-systematic algorithms for solving the MPE task. In UAI, pages 394–402, 2003. [4] Arthur Choi, Mark Chavira, and Adnan Darwiche. Node splitting: A scheme for generating upper bounds in Bayesian networks. In UAI, pages 57–66, 2007. [5] Rina Dechter and Irina Rish. Mini-buckets: A general scheme for bounded inference. J. ACM, 50(2):107–153, 2003. [6] Arthur Choi and Adnan Darwiche. An edge deletion semantics for belief propagation and its practical impact on approximation quality. In AAAI, pages 1107–1114, 2006. [7] Arthur Choi and Adnan Darwiche. Approximating the partition function by deleting and then correcting for model edges. In UAI, pages 79–87, 2008. [8] Rina Dechter, Kalev Kask, and Robert Mateescu. Iterative join-graph propagation. In UAI, pages 128–136, 2002. [9] Martin J. Wainwright, Tommi Jaakkola, and Alan S. Willsky. Tree consistency and bounds on the performance of the max-product algorithm and its generalizations. Statistics and Computing, 14:143–166, 2004. [10] Yair Weiss, Chen Yanover, and Talya Meltzer. MAP estimation, linear programming and belief propagation with convex free energies. In UAI, 2007. [11] Gal Elidan, Ian McGraw, and Daphne Koller. Residual belief propagation: Informed scheduling for asynchronous message passing. In UAI, 2006. [12] David Sontag, Talya Meltzer, Amir Globerson, Tommi Jaakkola, and Yair Weiss. Tightening LP relaxations for MAP using message passing. In UAI, pages 503–510, 2008. [13] Rina Dechter. Mini-buckets: a general scheme for approximation in automated reasoning. In Proc. International Joint Conference on Artificial Intelligence (IJCAI), pages 1297–1302, 1997. [14] Jason K. Johnson, Dmitry M. Malioutov, and Alan S. Willsky. Lagrangian relaxation for MAP estimation in graphical models. In Proceedings of the 45th Allerton Conference on Communication, Control and Computing, pages 672–681, 2007. [15] Arthur Choi, Trevor Standley, and Adnan Darwiche. Approximating weighted Max-SAT problems by compensating for relaxations. In Proceedings of the 15th International Conference on Principles and Practice of Constraint Programming (CP), pages 211–225, 2009. 9
2009
205
3,710
Non-Parametric Bayesian Dictionary Learning for Sparse Image Representations Mingyuan Zhou, Haojun Chen, John Paisley, Lu Ren, 1Guillermo Sapiro and Lawrence Carin Department of Electrical and Computer Engineering Duke University, Durham, NC 27708-0291, USA 1Department of Electrical and Computer Engineering University of Minnesota, Minneapolis, MN 55455, USA {mz1,hc44,jwp4,lr,lcarin}@ee.duke.edu, {guille}@umn.edu Abstract Non-parametric Bayesian techniques are considered for learning dictionaries for sparse image representations, with applications in denoising, inpainting and compressive sensing (CS). The beta process is employed as a prior for learning the dictionary, and this non-parametric method naturally infers an appropriate dictionary size. The Dirichlet process and a probit stick-breaking process are also considered to exploit structure within an image. The proposed method can learn a sparse dictionary in situ; training images may be exploited if available, but they are not required. Further, the noise variance need not be known, and can be nonstationary. Another virtue of the proposed method is that sequential inference can be readily employed, thereby allowing scaling to large images. Several example results are presented, using both Gibbs and variational Bayesian inference, with comparisons to other state-of-the-art approaches. 1 Introduction There has been significant recent interest in sparse signal expansions in several settings. For example, such algorithms as the support vector machine (SVM) [1], the relevance vector machine (RVM) [2], Lasso [3] and many others have been developed for sparse regression (and classification). A sparse representation has several advantages, including the fact that it encourages a simple model, and therefore over-training is often avoided. The inferred sparse coefficients also often have biological/physical meaning, of interest for model interpretation [4]. Of relevance for the current paper, there has recently been significant interest in sparse representations in the context of denoising, inpainting [5–10], compressive sensing (CS) [11,12], and classification [13]. All of these applications exploit the fact that most images may be sparsely represented in an appropriate dictionary. Most of the CS literature assumes “off-the-shelf” wavelet and DCT bases/dictionaries [14], but recent denoising and inpainting research has demonstrated the significant advantages of learning an often over-complete dictionary matched to the signals of interest (e.g., images) [5–10, 12, 15]. The purpose of this paper is to perform dictionary learning using new non-parametric Bayesian technology [16,17], that offers several advantages not found in earlier approaches, which have generally sought point estimates. This paper makes four main contributions: • The dictionary is learned using a beta process construction [16, 17], and therefore the number of dictionary elements and their relative importance may be inferred non-parametrically. • For the denoising and inpainting applications, we do not have to assume a priori knowledge of the noise variance (it is inferred within the inversion). The noise variance can also be non-stationary. • The spatial inter-relationships between different components in images are exploited by use of the Dirichlet process [18] and a probit stick-breaking process [19]. 1 • Using learned dictionaries, inferred off-line or in situ, the proposed approach yields CS performance that is markedly better than existing standard CS methods as applied to imagery. 2 Dictionary Learning with a Beta Process In traditional sparse coding tasks, one considers a signal x ∈ℜn and a fixed dictionary D = (d1, d2, . . . , dM) where each dm ∈ℜn. We wish to impose that any x ∈ℜn may be represented approximately as ˆx = Dα, where α ∈ℜM is sparse, and our objective is to also minimize the ℓ2 error ∥ˆx −x∥2. With a proper dictionary, a sparse α often manifests robustness to noise (the model doesn’t fit noise well), and the model also yields effective inference of α even when x is partially or indirectly observed via a small number of measurements (of interest for inpainting, interpolation and compressive sensing [5,7]). To the authors’ knowledge, all previous work in this direction has been performed in the following manner: (i) if D is given, the sparse vector α is estimated via a point estimate (without a posterior distribution), typically based on orthogonal matching pursuits (OMP), basis pursuits or related methods, for which the stopping criteria is defined by assuming knowledge (or off-line estimation) of the noise variance or the sparsity level of α; and (ii) when the dictionary D is to be learned, the dictionary size M must be set a priori, and a point estimate is achieved for D (in practice one may infer M via cross-validation, with this step avoided in the proposed method). In many applications one may not know the noise variance or an appropriate sparsity level of α; further, one may be interested in the confidence of the estimate (e.g., “error bars” on the estimate of α). To address these goals, we propose development of a non-parametric Bayesian formulation to this problem, in terms of the beta process, this allowing one to infer the appropriate values of M and ∥α∥0 (sparsity level) jointly, also manifesting a full posterior density function on the learned D and the inferred α (for a particular x), yielding a measure of confidence in the inversion. As discussed further below, the non-parametric Bayesian formulation also allows one to relax other assumptions that have been made in the field of learning D and α for denoising, inpainting and compressive sensing. Further, the addition of other goals are readily addressed within the non-parametric Bayesian paradigm, e.g. designing D for joint compression and classification. 2.1 Beta process formulation We desire the model x = Dα+ϵ, where x ∈ℜn and D ∈ℜn×M, and we wish to learn D and in so doing infer M. Toward this end, we consider a dictionary D ∈ℜn×K, with K →∞; by inferring the number of columns of D that are required for accurate representation of x, the appropriate value of M is implicitly inferred (work has been considered in [20, 21] for the related but distinct application of factor analysis). We wish to also impose that α ∈ℜK is sparse, and therefore only a small fraction of the columns of D are used for representation of a given x. Specifically, assume that we have a training set D = {xi, yi}i=1,N, where xi ∈ℜn and yi ∈{1, 2, . . . , Nc}, where Nc ≥2 represents the number of classes from which the data arise; when learning the dictionary we ignore the class labels yi, and later discuss how they may be considered in the learning process. The two-parameter beta process (BP) was developed in [17], to which the reader is referred for further details; we here only provide those details of relevance for the current application. The BP with parameters a > 0 and b > 0, and base measure H0, is represented as BP(a, b, H0), and a draw H ∼BP(a, b, H0) may be represented as H(ψ) = K X k=1 πkδψk(ψ) πk ∼Beta(a/K, b(K −1)/K) ψk ∼H0 (1) with this a valid measure as K →∞. The expression δψk(ψ) equals one if ψ = ψk and is zero otherwise. Therefore, H(ψ) represents a vector of K probabilities, with each associated with a respective atom ψk. In the limit K →∞, H(ψ) corresponds to an infinite-dimensional vector of probabilities, and each probability has an associated atom ψk drawn i.i.d. from H0. Using H(ψ), we may now draw N binary vectors, the ith of which is denoted zi ∈{0, 1}K, and the kth component of zi is drawn zik ∼Bernoulli(πk). These N binary column vectors are used to constitute a matrix Z ∈{0, 1}K×N, with ith column corresponding to zi; the kth row of Z is associated with atom ψk, drawn as discussed above. For our problem the atoms ψk ∈ℜn will correspond to candidate members of our dictionary D, and the binary vector zi defines which members of the dictionary are used to represent sample xi ∈D. 2 Let Ψ = (ψ1, ψ2, . . . , ψK), and we may consider the limit K →∞. A naive form of our model, for representation of sample xi ∈D, is xi = Ψzi + ϵi. However, this is highly restrictive, as it imposes that the coefficients of the dictionary expansion must be binary. To address this, we draw weights wi ∼N(0, γ−1 w IK), where γw is the precision or inverse variance; the dictionary weights are now αi = zi ◦wi, and xi = Ψαi + ϵi, where ◦represents the Hadamard (element-wise) multiplication of two vectors. Note that, by construction, α is sparse; this imposition of sparseness is distinct from the widely used Laplace shrinkage prior [3], which imposes that many coefficients are small but not necessarily exactly zero. For simplicity we assume that the dictionary elements, defined by the atoms ψk, are drawn from a multivariate Gaussian base H0, and the components of the error vectors ϵi are drawn i.i.d. from a zero-mean Gaussian. The hierarchical form of the model may now be expressed as xi = Ψαi + ϵi , αi = zi ◦wi Ψ = (ψ1, ψ2, . . . , ψK) , ψk ∼N(0, n−1In) wi ∼ N(0, γ−1 w IK) , ϵi ∼N(0, γ−1 ϵ In) zi ∼ K Y k=1 Bernoulli(πk) , πk ∼Beta(a/K, b(K −1)/K) (2) Non-informative gamma hyper-priors are typically placed on γw and γϵ. Consecutive elements in the above hierarchical model are in the conjugate exponential family, and therefore inference may be implemented via a variational Bayesian [22] or Gibbs-sampling analysis, with analytic update equations (all inference update equations, and the software, can be found at http://people.ee.duke.edu/∼lihan/cs/). After performing such inference, we retain those columns of Ψ that are used in the representation of the data in D, thereby inferring D and hence M. To impose our desire that the vector of dictionary weights α is sparse, one may adjust the parameters a and b. Particularly, as discussed in [17], in the limit K →∞, the number of elements of zi that are non-zero is a random variable drawn from Poisson(a/b). In Section 3.1 we discuss the fact that these parameters are in general non-informative and the sparsity is intrinsic to the data. 2.2 Accounting for a classification task There are problems for which it is desired that x is sparsely rendered in D, and the associated weight vector α may be employed for other purposes beyond representation. For example, one may perform a classification task based on α. If one is interested in joint compression and classification, both goals should be accounted for when designing D. For simplicity, we assume that the number of classes is NC = 2 (binary classification), with this readily extended [23] to NC > 2. Following [9], we may define a linear or bilinear classifier based on the sparse weights α and the associated data x (in the bilinear case), with this here implemented in the form of a probit classifier. We focus on the linear model, as it is simpler (has fewer parameters), and the results in [9] demonstrated that it was often as good or better than the bilinear classifier. To account for classification, the model in (2) remains unchanged, and the following may be added to the top of the hierarchy: yi = 1 if θT ˆα + ν > 0, yi = 2 if θT ˆα + ν < 0, θ ∼N(0, γ−1 θ IK+1), and ν ∼N(0, γ−1 0 ), where ˆα ∈ℜK+1 is the same as α ∈ℜK with an appended one, to account for the classifier bias. Again, one typically places (non-informative) gamma hyper-priors on γθ and γ0. With the added layers for the classifier, the conjugate-exponential character of the model is retained, sustaining the ability to perform VB or MCMC inference with analytic update equations. Note that the model in (2) may be employed for unlabeled data, and the extension above may be employed for the available labeled data; consequently, all data (labeled and unlabeled) may be processed jointly to infer D. 2.3 Sequential dictionary learning for large training sets In the above discussion, we implicitly assumed all data D = {xi, yi}i=1,N are used together to infer the dictionary D. However, in some applications N may be large, and therefore such a “batch” approach is undesirable. To address this issue one may partition the data as D = D1 ∪D2 ∪ . . . DJ−1 ∪DJ, with the data processed sequentially. This issue has been considered for point estimates of D [8], in which considerations are required to assure algorithm convergence. It is of interest to briefly note that sequential inference is handled naturally via the proposed Bayesian analysis. 3 Specifically, let p(D|D, Θ) represent the posterior on the desired dictionary, with all other model parameters marginalized out (e.g., the sample-dependent coefficients α); the vector Θ represents the model hyper-parameters. In a Bayesian analysis, rather than evaluating p(D|D, Θ) directly, one may employ the same model (prior) to infer p(D|D1, Θ). This posterior may then serve as a prior for D when considering next D2, inferring p(D|D1 ∪D2, Θ). When doing variational Bayesian (VB) inference we have an analytic approximate representation for posteriors such as p(D|D1, Θ), while for Gibbs sampling we may use the inferred samples. When presenting results in Section 5, we discuss additional means of sequentially accelerating a Gibbs sampler. 3 Denoising, Inpainting and Compressive Sensing 3.1 Image Denoising and Inpainting Assume we are given an image I ∈ℜNy×Nx with additive noise and missing pixels; we here assume a monochrome image for simplicity, but color images are also readily handled, as demonstrated when presenting results. As is done typically [6, 7], we partition the image into NB = (Ny − B + 1) × (Nx −B + 1) overlapping blocks {xi}i=1,NB, for each of which xi ∈ℜB2 (B = 8 is typically used). If there is only additive noise but no missing pixels, then the model in (2) can be readily applied for simultaneous dictionary learning and image denoising. If there are both noise and missing pixels, instead of directly observing xi, we observe a subset of the pixels in each xi. Note that here Ψ and {αi}i=1,NB, which are used to recover the original noise-free and complete image, are directly inferred from the data under test; one may also employ an appropriate training set D with which to learn a dictionary D offline, or for initialization of in situ learning. In denoising and inpainting studies of this type (see for example [6, 7] and references therein), it is often assumed that either the variance is known and used as a “stopping” criteria, or that the sparsity level is pre-determined and fixed for all i ∈{1, NB}. While these may be practical in some applications, we feel it is more desirable to not make these assumptions. In (2) the noise precision (inverse variance), γϵ, is assumed drawn from a non-informative gamma distribution, and a full posterior density function is inferred for γϵ (and all other model parameters). In addition, the problems of addressing spatially nonuniform noise as well as nonuniform noise across color channels are of interest [7]; they are readily handled in the proposed model by drawing a separate precision γϵ for each color channel in each B × B block, each of which is drawn from a shared gamma prior. The sparsity level of the representation in our model, i.e., {∥αi∥0}i=1,N, is influenced by the parameters a and b in the beta prior in (2). Examining the posterior p(πk|−) ∼Beta(a/K + PN i=1 zik, b(K −1)/K + N −PN i=1 zik), conditioned on all other parameters, we find that most settings of a and b tend to be non-informative, especially in the case of sequential learning (discussed further in Section 5). Therefore, the average sparsity level of the representation is inferred by the data itself and each sample xi has its own unique sparse representation based on the posterior, which renders much more flexibility than enforcing the same sparsity level for each sample. 3.2 Compressive sensing We consider CS in the manner employed in [12]. Assume our objective is to measure an image I ∈ℜNy×Nx, with this image constituting the 8 × 8 blocks {xi}i=1,NB. Rather than measuring the xi directly, pixel-by-pixel, in CS we perform the projection measurement vi = Φxi, where vi ∈ℜNp, with Np representing the number of projections, and Φ ∈ℜNp×64 (assuming that xi is represented by a 64-dimensional vector). There are many (typically random) ways in which Φ may be constructed, with the reader referred to [24]. Our goal is to have Np ≪64, thereby yielding compressive measurements. Based on the CS measurements {vi}i=1,NB, our objective is to recover {xi}i=1,NB. Consider a potential dictionary Ψ, as discussed in Section 2. It is assumed that for each of the {xi}i=1,NB from the image under test xi = Ψαi + ϵi, for sparse αi and relatively small error ∥ϵi∥2. The number of required projections Np needed for accurate estimation of αi is proportional to ∥αi∥0 [11], with this underscoring the desirability of learning a dictionary in which very sparse representations are manifested (as compared to using an “off-the-shelf” wavelets or DCT basis). For CS inversion, the model in (2) is employed, and therefore the appropriate dictionary D is learned jointly while performing CS inversion, in situ on the image under test. When performing CS analy4 sis, in (2), rather than observing xi, we observe vi = ΦDαi +ϵi, for i = 1, . . . , NB (the likelihood function is therefore modified slightly). As discussed when presenting results, one may also learn the CS dictionary in advance, off-line, with appropriate training images (using the model in (2)). However, the unique opportunity for joint CS inversion and learning of an appropriate parsimonious dictionary is deemed to be a significant advantage, as it does not presuppose that one would know an appropriate training set in advance. The inpainting problem may be viewed as a special case of CS, in which each row of Φ corresponds to a delta function, locating a unique pixel on the image at which useful (unobscured) data are observed. Those pixels that are unobserved, or that are contaminated (e.g., by superposed text [7]) are not considered when inferring the αi and D. A CS camera designed around an inpainting construction has several advantages, from the standpoint of simplicity. As observed from the results in Section 5, an inpainting-based CS camera would simply observe a subset of the usual pixels, selected at random. 4 Exploiting Spatial Structure For the applications discussed above, the {xi}i=1,NB come from the single image under test, and consequently there is underlying (spatial) structure that should ideally be exploited. Rather than re-writing the entire model in (2), we focus on the following equations in the hierarchy: zi ∼ QK k=1 Bernoulli(πk), and π ∼QK k=1 Beta(a/K, b(K −1)/K). Instead of having a single vector π = {π1, . . . , πK} that is shared for all {xi}i=1,NB, it is expected that there may be a mixture of π vectors, corresponding to different segments in the image. Since the number of mixture components is not known a priori, this mixture model is modeled via a Dirichlet process [18]. We may therefore employ, for i = 1, . . . , NB, zi ∼ K Y k=1 Bernoulli(πik) πi ∼G G ∼DP(β, K Y k=1 Beta(a/K, b(K −1)/K)) (3) Alternatively, we may cluster the zi directly, yielding zi ∼G, G ∼DP(β, QK k=1 Bernoulli(πk)), π ∼QK k=1 Beta(a/K, b(K −1)/K), where the zi are drawn i.i.d. from G. In practice we implement such DP constructions via a truncated stick-breaking representation [25], again retaining the conjugate-exponential structure of interest for analytic VB or Gibbs inference. In such an analysis we place a non-informative gamma prior on the precision β. The construction in (3) clusters the blocks, and therefore it imposes structure not constituted in the simpler model in (2). However, the DP still assumes that the members of {xi}i=1,NB are exchangeable. Space limitations preclude discussing this matter in detail here, but we have also considered replacement of the DP framework above with a probit stick-breaking process (PSBP) [19], which explicitly imposes that it is more likely for proximate blocks to be in the same cluster, relative to distant blocks. When presenting results, we show examples in which PSBP has been used, with its relative effectiveness compared to the simpler DP construction. The PSBP again retains full conjugate-exponential character within the hierarchy, of interest for efficient inference, as discussed above. 5 Example Results For the denoising and inpainting results, we observed that the Gibbs sampler provided better performance than associated variational Bayesian inference. For denoising and inpainting we may exploit shifted versions of the data, which accelerates convergence substantially (discussed in detail below). Therefore, all denoising and inpainting results are based on efficient Gibbs sampling. For CS we cannot exploit shifted images, and therefore to achieve fast inversion variational Bayesian (VB) inference [22] is employed; for this application VB has proven to be quite effective, as discussed below. The same set of model hyper-parameters are used across all our denoising, inpainting and CS examples (no tuning was performed): all gamma priors are set as Gamma(10−6, 10−6), along the lines suggested in [2], and the beta distribution parameters are set with a = K and b = N/8 (many other settings of a and b yield similar results). 5 5.1 Denoising We consider denoising a 256×256 image, with comparison of the proposed approach to K-SVD [6] (for which the noise variance is assumed known and fixed); the true noise standard deviation is set at 15, 25 and 50 in the examples below. We show results for three algorithms: (i) mismatched K-SVD (with noise standard deviation of 30), (ii) K-SVD when the standard deviation is properly matched, and (iii) the proposed BP approach. For (iii) a non-informative prior is placed on the noise precision, and the same BP model is run for all three noise levels (with the underlying noise levels inferred). The BP and K-SVD employed no a priori training data. In Figure 1 are shown the noisy images at the three different noise levels, as well as the reconstructions via BP and KSVD. A preset large dictionary size K = 256 is used for both algorithms, and for the BP results we inferred that approximately M = 196, 128, and 34 dictionary elements were important for noise standard deviations 15, 25, and 50, respectively; the remaining elements of the dictionary were used less than 0.1% of the time. As seen within the bottom portion of the right part of Figure 1, the unused dictionary elements appear as random draws from the prior, since they are not used and hence influenced by the data. Note that K-SVD works well when the set noise variance is at or near truth, but the method is undermined by mismatch. The proposed BP approach is robust to changing noise levels. Quantitative performance is summarized in Table 1. The BP denoiser estimates a full posterior density function on the noise standard deviation; for the examples considered here, the modes of the inferred standard-deviation posteriors were 15.57, 25.35, and 48.12, for true standard deviations 15, 25, and 50, respectively. To achieve these BP results, we employ a sequential implementation of the Gibbs sampler (a batch implementation converges to the same results but with higher computational cost); this is discussed in further detail below, when presenting inpainting results. Figure 1: Left: Representative denoising results, with the top through bottom rows corresponding to noise standard deviations of 15, 25 and 50, respectively. The second and third columns represent K-SVD [6] results with assumed standard deviation equal to 30 and the ground truth, respectively. The fourth column represents the proposed BP reconstructions. The noisy images are in the first column. Right: Inferred BP dictionary elements for noise standard deviation 25, in order of importance (probability to be used) from the top-left. Table 1: Peak signal-to-reconstructed image measure (PSNR) for the data in Figure 1, for K-SVD [6] and the proposed BP method. The true standard deviation was 15, 25 and 50, respectively, from the top to the bottom row. For the mismatched K-SVD results, the noise stand deviation was fixed at 30. Original Noisy K-SVD Denoising K-SVD Denoising Beta Process Image (dB) mismatched variance (dB) matched variance (dB) Denoising (dB) 24.58 30.67 34.32 34.44 20.19 31.52 32.15 32.17 14.56 19.60 27.95 28.08 5.2 Inpainting Our inpainting and denoising results were achieved by using the following sequential procedure. Consider any pixel [p, j], where p, j ∈[1, B], and let this pixel constitute the left-bottom pixel in a new B × B block. Further, consider all B × B blocks with left-bottom pixels at {p + ℓB, j + 6 0 8 16 24 32 40 48 56 64 5 10 15 20 25 30 Learning round PSNR Figure 2: Inpainting results. The curve shows the PSNR as a function of the B2 = 64 Gibbs learning rounds. The left figure is the test image, with 80% of the RGB pixels missing, the middle figure is the result after 64 after Gibbs rounds (final result), and the right figure is the original uncontaminated image. mB} ∪δ(p −1){Ny −B + 1, j + mB} ∪δ(j −1){p + ℓB, Nx −B + 1} for ℓand m that satisfy p + ℓB ≤Ny −B + 1 and j + mB ≤Nx −B + 1. This set of blocks is denoted data set Dpj, and considering 1 ≤p ≤B and 1 ≤j ≤B, there are a total of B2 such shifted data sets. In the first iteration of learning Ψ, we employ the blocks in D11, and for this first round we initialize Ψ and αi based on a singular value decomposition (SVD) of the blocks in D11 (we achieved similar results when Ψ was initialized randomly). We do several Gibbs iterations with D11 and then stop the Gibbs algorithm, retaining the last sample of Ψ and αi from the previous step. These Ψ and αi are then used to initialize the Gibbs sampler in the second round, now applied to the B × B blocks in D11 ∪D21 (for D21 the neighboring αi is used for initialization). The Gibbs sampler is now run on this expanded data for several iterations, the last sample is retained, and the data set is augmented again. This is done B2 = 64 times until at the end all shifted blocks are processed simultaneously. This sequential process may be viewed as a sequential Gibbs burn in, after which all of the shifted blocks are processed. Theoretically, one would expect to need thousands of Gibbs iterations to achieve convergence. However, our experience is that even a single iteration in each of the above B2 rounds yields good results. In Figure 2 we show the PSNR as a function of each of the B2 = 64 rounds discussed above. For Gibbs rounds 16, 32 and 64 the corresponding PSNR values were 26.78 dB, 28.46 dB and 29.31 dB. For this example we used K = 256. This example was considered in [7] (we obtained similar results for the “New Orleans” image, also considered in [7]); the best results reported there were a PSNR of 29.65 dB. However, to achieve those results a training data set was employed for initialization [7]; the BP results are achieved with no a priori training data. Concerning computational costs, the inpainting and denoising algorithms scale linearly as a function of the block size, the dictionary size, the sparsity level, and the number of training samples; all results reported here were run efficiently in Matlab on PCs, with comparable costs as K-SVD. 5.3 Compressive sensing We consider a CS example, in which the image is divided into 8 × 8 patches, with these constituting the underlying data {xi}i=1,NB to be inferred. For each of the NB blocks, a vector of CS measurements vi = Φxi is measured, where the number of projections per patch is Np, and the total number of CS projections is NpNB. In this example the elements of Φ were constructed randomly as draws from N(0, 1), but many other projection classes may be considered [11, 24]. Each xi is assumed represented in terms of a dictionary xi = Dαi +ϵi, and three constructions for D were considered: (i) a DCT expansion; (ii) learning of D using the beta process construction, using training images; (iii) using the beta process to perform joint CS inversion and learning of D. For (ii), the training data consisted of 4000 8×8 patches chosen at random from 100 images selected from the Microsoft database (http://research.microsoft.com/en-us/projects/objectclassrecognition). The dictionary was set to K = 256, and the offline beta process inferred a dictionary of size M = 237. Representative CS reconstruction results are shown in Figure 3, for a gray-scale version of the “castle” image. The inversion results at left are based on a learned dictionary; except for the “online BP” results, all of these results employ the same dictionary D learned off-line as above, and the algorithms are distinguished by different ways of estimating {αi}i=1,NB. A range of CS-inversion 7 algorithms are considered from the literature, and several BP-based constructions are considered as well for CS inversion. The online BP results are quite competitive with those inferred off-line. One also notes that the results based on a learned dictionary (left in Figure 3) are markedly better than those based on the DCT (right in Figure 3); similar results were achieved when the DCT was replaced by a wavelet representation. For the DCT-based results, note that the DP- and PSBP-based BP CS inversion results are significantly better than those of all other CS inversion algorithms. The results reported here are consistent with tests we performed using over 100 images from the aforementioned Microsoft database, not reported here in detail for brevity. Note that CS inversion using the DP-based BP algorithm (as discussed in Section 4) yield the best results, significantly better than BP results not based on the DP, and better than all competing CS inversion algorithms (for both learned dictionaries and the DCT). The DP-based results are very similar to those generated by the probit stick-breaking process (PSBP) [19], which enforces spatial information more explicitly; this suggests that the simpler DP-based results are adequate, at least for the wide class of examples considered. Note that we also considered the DP and PSBP for the denoising and inpaiting examples above (those results were omitted, for brevity). The DP and PSBP denoising and inpainting results were similar to BP results without DP/PSBP (those presented above); this is attributed to the fact that when performing denoising/inpainting we may consider many shifted versions of the same image (as discussed when presenting the inpainting results). Concerning computational costs, all CS inversions were run efficiently on PCs, with the specifics computational times dictated by the detailed Matlab implementation and the machine run on. A rough ranking of the computational speeds, from fastest to slowest, is as follows: StOMP-CFAR, Fast BCS, OMP, BP, LARS/Lasso, Online BP, DP BP, PSBP BP, VB BCS, Basis Pursuit; in this list, algorithms BP through Basis Pursuits have approximately the same computational costs. The DP-based BP CS inversion algorithm scales as O(NB · Np · B2). 3 3.5 4 4.5 5 5.5 6 6.5 7 7.5 x 10 4 0 0.05 0.1 0.15 0.2 0.25 0.3 Number of Measurements Relative Reconstruction Error PSBP BP DP BP Online BP BP BCS Fast BCS Basis Pursuit LARS/Lasso OMP STOMP-CFAR Number of CS Measurements (x 104) Relative Reconstruction Error 3 3.5 4 4.5 5 5.5 6 6.5 7 7.5 x 10 4 0.2 0.25 0.3 0.35 0.4 0.45 0.5 Number of Measurements Relative Reconstruction Error PSBP BP DP BP BP BCS Fast BCS Basis Pursuit LARS/Lasso OMP STOMP-CFAR Number of CS Measurements (x 104) Relative Reconstruction Error Figure 3: CS performance (fraction of ℓ2 error) based on learned dictionaries (left) and based on the DCT (right). For the left results, the “Online BP” results simultaneously learned the dictionary and did CS inversion; the remainder of the left results are based on a dictionary learned offline on a training set. A DCT dictionary is used for the results on the right. The underlying image under test is shown at right. Matlab code for Basis Pursuit, LARS/Lasso, OMP, STOMP are available at http://sparselab.stanford.edu/, and code for BCS and Fast BCS are available at http://people.ee.duke.edu/∼lihan/cs/. The horizontal axis represents the total number of CS projections, NpNB. The total number of pixels in the image is 480 × 320 = 153, 600. 99.9% of the signal energy is contained in 33, 500 DCT coefficients. 6 Conclusions The non-parametric beta process has been presented for dictionary learning with the goal of image denoising, inpainting and compressive sensing, with very encouraging results relative to the state of the art. The framework may also be applied to joint compression-classification tasks. In the context of noisy underlying data, the noise variance need not be known in advance, and it need not be spatially uniform. The proposed formulation also allows unique opportunities to leverage known structure in the data, such as relative spatial locations within an image; this framework was used to achieve marked improvements in CS-inversion quality. Acknowledgement The research reported here was supported in part by ARO, AFOSR, DOE, NGA and ONR. 8 References [1] N. Cristianini and J. Shawe-Taylor. An Introduction to Support Vector Machines. Cambridge University Press, 2000. [2] M. Tipping. Sparse Bayesian learning and the relevance vector machine. Journal of Machine Learning Research, 1, 2001. [3] R. Tibshirani. Regression shrinkage and selection via the lasso. Journal of the Royal Statistical Society, Series B, 58, 1994. [4] B.A. Olshausen and D. J. Field. Sparse coding with an overcomplete basis set: A strategy employed by V1? Vision Research, 37, 1998. [5] M. Aharon, M. Elad, and A. M. Bruckstein. K-SVD: An algorithm for designing overcomplete dictionaries for sparse representation. IEEE Trans. Signal Processing, 54, 2006. [6] M. Elad and M. Aharon. Image denoising via sparse and redundant representations over learned dictionaries. IEEE Trans. Image Processing, 15, 2006. [7] J. Mairal, M. Elad, and G. Sapiro. Sparse representation for color image restoration. IEEE Trans. Image Processing, 17, 2008. [8] J. Mairal, F. Bach, J. Ponce, and G. Sapiro. Online dictionary learning for sparse coding. In Proc. International Conference on Machine Learning, 2009. [9] J. Mairal, F. Bach, J. Ponce, G. Sapiro, and A. Zisserman. Supervised dictionary learning. In Proc. Neural Information Processing Systems, 2008. [10] M. Ranzato, C. Poultney, S. Chopra, and Y. Lecun. Efficient learning of sparse representations with an energy-based model. In Proc. Neural Information Processing Systems, 2006. [11] E. Cand`es and T. Tao. Near-optimal signal recovery from random projections: universal encoding strategies? IEEE Trans. Information Theory, 52, 2006. [12] J.M. Duarte-Carvajalino and G. Sapiro. Learning to sense sparse signals: Simultaneous sensing matrix and sparsifying dictionary optimization. IMA Preprint Series 2211, 2008. [13] J. Wright, A.Y. Yang, A. Ganesh, S.S. Sastry, and Y. Ma. Robust face recognition via sparse representation. IEEE Trans. Pattern Analysis Machine Intelligence, 31, 2009. [14] S. Ji, Y. Xue, and L. Carin. Bayesian compressive sensing. IEEE Trans. Signal Processing, 56, 2008. [15] R. Raina, A. Battle, H. Lee, B. Packer, and A.Y. Ng. Self-taught learning: transfer learning from unlabeled data. In Proc. International Conference on Machine Learning, 2007. [16] R. Thibaux and M.I. Jordan. Hierarchical beta processes and the indian buffet process. In Proc. International Conference on Artificial Intelligence and Statistics, 2007. [17] J. Paisley and L. Carin. Nonparametric factor analysis with beta process priors. In Proc. International Conference on Machine Learning, 2009. [18] T. Ferguson. A Bayesian analysis of some nonparametric problems. Annals of Statistics, 1, 1973. [19] A. Rodriguez and D.B. Dunson. Nonparametric bayesian models through probit stickbreaking processes. Univ. California Santa Cruz Technical Report, 2009. [20] D. Knowles and Z. Ghahramani. Infinite sparse factor analysis and infinite independent components analysis. In Proc. International Conference on Independent Component Analysis and Signal Separation, 2007. [21] P. Rai and H. Daum´e III. The infinite hierarchical factor regression model. In Proc. Neural Information Processing Systems, 2008. [22] M.J. Beal. Variational Algorithms for Approximate Bayesian Inference. PhD thesis, Gatsby Computational Neuroscience Unit, University College London, 2003. [23] M. Girolami and S. Rogers. Variational Bayesian multinomial probit regression with Gaussian process priors. Neural Computation, 18, 2006. [24] R.G. Baraniuk. Compressive sensing. IEEE Signal Processing Magazine, 24, 2007. [25] J. Sethuraman. A constructive definition of Dirichlet priors. Statistica Sinica, 4, 1994. 9
2009
206
3,711
Discrete MDL Predicts in Total Variation Marcus Hutter RSISE @ ANU and SML @ NICTA Canberra, ACT, 0200, Australia marcus@hutter1.net www.hutter1.net Abstract The Minimum Description Length (MDL) principle selects the model that has the shortest code for data plus model. We show that for a countable class of models, MDL predictions are close to the true distribution in a strong sense. The result is completely general. No independence, ergodicity, stationarity, identifiability, or other assumption on the model class need to be made. More formally, we show that for any countable class of models, the distributions selected by MDL (or MAP) asymptotically predict (merge with) the true measure in the class in total variation distance. Implications for non-i.i.d. domains like time-series forecasting, discriminative learning, and reinforcement learning are discussed. 1 Introduction The minimum description length (MDL) principle recommends to use, among competing models, the one that allows to compress the data+model most [Gr¨u07]. The better the compression, the more regularity has been detected, hence the better will predictions be. The MDL principle can be regarded as a formalization of Ockham’s razor, which says to select the simplest model consistent with the data. Multistep lookahead sequential prediction. We consider sequential prediction problems, i.e. having observed sequence x≡(x1,x2,...,xℓ)≡x1:ℓ, predict z≡(xℓ+1,...,xℓ+h)≡xℓ+1:ℓ+h, then observe xℓ+1 ∈X for ℓ≡ℓ(x) = 0,1,2,.... Classical prediction is concerned with h = 1, multi-step lookahead with 1 < h < ∞, and total prediction with h = ∞. In this paper we consider the last, hardest case. An infamous problem in this category is the Black raven paradox [Mah04, Hut07]: Having observed ℓblack ravens, what is the likelihood that all ravens are black. A more computer science problem is (infinite horizon) reinforcement learning, where predicting the infinite future is necessary for evaluating a policy. See Section 6 for these and other applications. Discrete MDL. Let M = {Q1,Q2,...} be a countable class of models=theories=hypotheses= probabilities over sequences X ∞, sorted w.r.t. to their complexity=codelength K(Qi)=2log2i (say), containing the unknown true sampling distribution P. Our main result will be for arbitrary measurable spaces X, but to keep things simple in the introduction, let us illustrate MDL for finite X. In this case, we define Qi(x) as the Qi-probability of data sequence x∈X ℓ. It is possible to code x in logP(x)−1 bits, e.g. by using Huffman coding. Since x is sampled from P, this code is optimal (shortest among all prefix codes). Since we do not know P, we could select the Q∈M that leads to the shortest code on the observed data x. In order to be able to reconstruct x from the code we need to know which Q has been chosen, so we also need to code Q, which takes K(Q) bits. Hence x can be coded in minQ∈M{−logQ(x)+K(Q)} bits. MDL selects as model the minimizer MDLx := arg min Q∈M{−log Q(x) + K(Q)} Main result. Given x, the true predictive probability of some “future” event A is P[A|x], e.g. A could be xℓ+1:ℓ+h or any other measurable set of sequences (see Section 3 for proper definitions). 1 We consider the sequence of predictive measures MDLx[·|x] for ℓ=0,1,2,... selected by MDL. Our main result is that MDLx[·|x] converges to P[·|x] in total variation distance for ℓ→∞with P-probability 1 (see Theorem 1). The analogous result for Bayesian prediction is well-known, and an immediate corollary of Blackwell&Dubin’s celebrated merging-of-opinions theorem [BD62]. Our primary contribution is to prove the analogous result for MDL. A priori it is not obvious that it holds at all, and indeed the proof turns out to be much more complex. Motivation. The results above hold for completely arbitrary countable model classes M. No independence, ergodicity, stationarity, identifiability, or other assumption need to be made. The bulk of previous results for MDL are for continuous model classes [Gr¨u07]. Much has been shown for classes of independent identically distributed (i.i.d.) random variables [BC91, Gr¨u07]. Many results naturally generalize to stationary-ergodic sequences like (kth-order) Markov. For instance, asymptotic consistency has been shown in [Bar85]. There are many applications violating these assumptions, some of them are presented below and in Section 6. For MDL to work, P needs to be in M or at least close to some Q∈M, and there are interesting environments that are not even close to being stationary-ergodic or i.i.d. Non-i.i.d. data is pervasive [AHRU09]; it includes all time-series prediction problems like weather forecasting and stock market prediction [CBL06]. Indeed, these are also perfect examples of nonergodic processes. Too much green house gases, a massive volcanic eruption, an asteroid impact, or another world war could change the climate/economy irreversibly. Life is also not ergodic; one inattentive second in a car can have irreversible consequences. Also stationarity is easily violated in multi-agent scenarios: An environment which itself contains a learning agent is non-stationary (during the relevant learning phase). Extensive games and multi-agent reinforcement learning are classical examples [WR04]. Often it is assumed that the true distribution can be uniquely identified asymptotically. For nonergodic environments, asymptotic distinguishability can depend on the realized observations, which prevent a prior reduction or partitioning of M. Even if principally possible, it can be practically burdensome to do so, e.g. in the presence of approximate symmetries. Indeed this problem is the primary reason for considering predictive MDL. MDL might never identify the true distribution, but our main result shows that the sequentially selected models become predictively indistinguishable. For arbitrary countable model classes, the following results are known: The MDL one-step lookahead predictor (i.e. h = 1) of three variants of MDL converges to the true predictive distribution. The proof technique used in [PH05] is inherently limited to finite h. Another general consistency result is presented in [Gr¨u07, Thm.5.1]. Consistency is shown (only) in probability and the predictive implications of the result are unclear. A stronger almost sure result is alluded to, but the given reference to [BC91] contains only results for i.i.d. sequences which do not generalize to arbitrary classes. So existing results for discrete MDL are far less satisfactory than the elegant Bayesian merging-of-opinions result. The countability of M is the severest restriction of our result. Nevertheless the countable case is useful. A semi-parametric problem class S∞ d=1Md with Md = {Qθ,d : θ ∈IRd} (say) can be reduced to a countable class M = {Pd} for which our result holds, where Pd is a Bayes or NML or other estimate of Md [Gr¨u07]. Alternatively, S dMd could be reduced to a countable class by considering only computable parameters θ. Essentially all interesting model classes contain such a countable topologically dense subset. Under certain circumstances MDL still works for the noncomputable parameters [Gr¨u07]. Alternatively one may simply reject non-computable parameters on philosophical grounds [Hut05]. Finally, the techniques for the countable case might aid proving general results for continuous M, possibly along the lines of [Rya09]. Contents. The paper is organized as follows: In Section 2 we provide some insights how MDL works in restricted settings, what breaks down for general countable M, and how to circumvent the problems. The formal development starts with Section 3, which introduces notation and our main result. The proof for finite M is presented in Section 4 and for denumerable M in Section 5. In Section 6 we show how the result can be applied to sequence prediction, classification and regression, discriminative learning, and reinforcement learning. Section 7 discusses some MDL variations. 2 2 Facts, Insights, Problems Before starting with the formal development, we describe how MDL works in some restricted settings, what breaks down for general countable M, and how to circumvent the problems. For deterministic environments, MDL reduces to learning by elimination, and results can easily be understood. Consistency of MDL for i.i.d. (and stationary-ergodic) sources is also intelligible. For general M, MDL may no longer converge to the true model. We have to give up the idea of model identification, and concentrate on predictive performance. Deterministic MDL = elimination learning. For a countable class M = {Q1,Q2,...} of deterministic theories=models=hypotheses=sequences, sorted w.r.t. to their complexity=codelength K(Qi) = 2log2i (say) it is easy to see why MDL works: Each Q is a model for one infinite sequence xQ 1:∞, i.e. Q(xQ)=1. Given the true observations x≡xP 1:ℓso far, MDL selects the simplest Q consistent with xP 1:ℓand for h=1 predicts xQ ℓ+1. This (and potentially other) Q becomes (forever) inconsistent if and only if the prediction was wrong. Assume the true model is P = Qm. Since elimination occurs in order of increasing index i, and Qm never makes any error, MDL makes at most m−1 prediction errors. Indeed, what we have described is just classical Gold style learning by elimination. For 1 < h< ∞, the prediction xQ ℓ+1:ℓ+h may be wrong only on xQ ℓ+h, which causes h wrong predictions before the error is revealed. (Note that at time ℓonly xP ℓis revealed.) Hence the total number of errors is bounded by h·(m−1). The bound is for instance attained on the class consisting of Qi = 1ih0∞, and the true sequence switches from 1 to 0 after having observed m·h ones. For h = ∞, a wrong prediction gets eventually revealed. Hence each wrong Qi (i < m) gets eventually eliminated, i.e. P gets eventually selected. So for h=∞we can (still/only) show that the number of errors is finite. No bound on the number of errors in terms of m only is possible. For instance, for M={Q1 =1∞,Q2 =P =1n0∞}, it takes n time steps to reveal that prediction 1∞is wrong, and n can be chosen arbitrarily large. Comparison of deterministic↔probabilistic and MDL↔Bayes. The flavor of results carries over to some extent to the probabilistic case. On a very abstract level even the line of reasoning carries over, although this is deeply buried in the sophisticated mathematical analysis of the latter. So the special deterministic case illustrates the more complex probabilistic case. The differences are as follows: In the probabilistic case, the true P can in general not be identified anymore. Further, while the Bayesian bound trivially follows from the 1/2-century old classical merging of opinions result [BD62], the corresponding MDL bound we prove in this paper is more difficult to obtain. Consistency of MDL for stationary-ergodic sources. For an i.i.d. class M, the law of large numbers applied to the random variables Zt := log[P(xt)/Q(xt)] implies 1 ℓ Pℓ t=1Zt →KL(P||Q) := P x1P(x1)log[P(x1)/Q(x1)] with P-probability 1. Either the Kullback-Leibler (KL) divergence is zero, which is the case if and only if P =Q, or logP(x1:ℓ)−logQ(x1:ℓ)≡Pℓ t=1Zℓ∼KL(P||Q)ℓ→ ∞, i.e. asymptotically MDL does not select Q. For countable M, a refinement of this argument shows that MDL eventually selects P [BC91]. This reasoning can be extended to stationary-ergodic M, but essentially not beyond. To see where the limitation comes from, we present some troubling examples. Trouble makers. For instance, let P be a Bernoulli(θ0) process, but let the Q-probability that xt = 1 be θt, i.e. time-dependent (still assuming independence). For a suitably converging but “oscillating” (i.e. infinitely often larger and smaller than its limit) sequence θt →θ0 one can show that log[P(x1:t)/Q(x1:t)] converges to but oscillates around K(Q)−K(P) w.p.1, i.e. there are nonstationary distributions for which MDL does not converge (not even to a wrong distribution). One idea to solve this problem is to partition M, where two distributions are in the same partition if and only if they are asymptotically indistinguishable (like P and Q above), and then ask MDL to only identify a partition. This approach cannot succeed generally, whatever particular criterion is used, for the following reason: Let P(x1)>0 ∀x1. For x1 =1, let P and Q be asymptotically indistinguishable, e.g. P =Q on the remainder of the sequence. For x1=0, let P and Q be asymptotically distinguishable distributions, e.g. different Bernoullis. This shows that for non-ergodic sources like this one, asymptotic distinguishability depends on the drawn sequence. The first observation can lead to totally different futures. Predictive MDL avoids trouble. The Bayesian posterior does not need to converge to a single (true or other) distribution, in order for prediction to work. We can do something similar for MDL. At 3 each time we still select a single distribution, but give up the idea of identifying a single distribution asymptotically. We just measure predictive success, and accept infinite oscillations. That’s the approach taken in this paper. 3 Notation and Main Result The formal development starts with this section. We need probability measures and filters for infinite sequences, conditional probabilities and densities, the total variation distance, and the concept of merging (of opinions), in order to formally state our main result. Measures on sequences. Let (Ω:= X ∞,F,P) be the space of infinite sequences with natural filtration and product σ-field F and probability measure P. Let ω ∈Ωbe an infinite sequence sampled from the true measure P. Except when mentioned otherwise, all probability statements and expectations refer to P, e.g. almost surely (a.s.) and with probability 1 (w.p.1) are short for with P-probability 1 (w.P.p.1). Let x=x1:ℓ=ω1:ℓbe the first ℓsymbols of ω. For countable X, the probability that an infinite sequence starts with x is P(x):=P[{x}×X ∞]. The conditional distribution of an event A given x is P[A|x]:=P[A∩({x}×X ∞)]/P(x), which exists w.p.1. For other probability measures Q on Ω, we define Q(x) and Q[A|x] analogously. General X are considered at the end of this section. Convergence in total variation. P is said to be absolutely continuous relative to Q, written P ≪Q :⇔ [Q[A] = 0 implies P[A] = 0 for all A ∈F] P and Q are said to be mutually singular, written P⊥Q, iff there exists an A∈F for which P[A]=1 and Q[A]=0. The total variation distance (tvd) between Q and P given x is defined as d(P, Q|x) := sup A∈F Q[A|x] −P[A|x] (1) Q is said to predict P in tvd (or merge with P) if d(P,Q|x) →0 for ℓ(x) →∞with P-probability 1. Note that this in particular implies, but is stronger than one-step predictive on- and off-sequence convergence Q(xℓ+1 = aℓ+1|x1:ℓ)−P(xℓ+1 = aℓ+1|x1:ℓ) →0 for any a, not necessarily equal ω [KL94]. The famous Blackwell and Dubins convergence result [BD62] states that if P is absolutely continuous relative to Q, then (and only then [KL94]) Q merges with P: If P ≪Q then d(P, Q|x) →0 w.p.1 for ℓ(x) →∞ Bayesian prediction. This result can immediately be utilized for Bayesian prediction. Let M := {Q1,Q2,Q3,...} be a countable (finite or infinite) class of probability measures, and Bayes[A] := P Q∈MQ[A]wQ with wQ >0 ∀Q and P Q∈MwQ =1. If the model assumption P ∈M holds, then obviously P ≪Bayes, hence Bayes merges with P, i.e. d(P,Bayes|x) →0 w.p.1 for all P ∈M. Unlike many other Bayesian convergence and consistency theorems, no (independence, ergodicity, stationarity, identifiability, or other) assumption on the model class M need to be made. The analogous result for MDL is as follows: Theorem 1 (MDL predictions) Let M be a countable class of probability measures on X ∞containing the unknown true sampling distribution P. No (independence, ergodicity, stationarity, identifiability, or other) assumptions need to be made on M. Let MDLx := arg min Q∈M{−log Q(x) + K(Q)} with X Q∈M 2−K(Q) < ∞ be the measure selected by MDL at time ℓgiven x∈X ℓ. Then the predictive distributions MDLx[·|x] converge to P[·|x] in the sense that d(P, MDLx|x) ≡sup A∈F MDLx[A|x] −P[A|x] →0 for ℓ(x) →∞ w.p.1 K(Q) is usually interpreted and defined as the length of some prefix code for Q, in which case P Q2−K(Q) ≤1. If K(Q) := log2w−1 Q is chosen as complexity, by Bayes rule Pr(Q|x) = Q(x)wQ/Bayes(x), the maximum a posteriori estimate MAPx:=argmaxQ∈M{Pr(Q|x)}≡MDLx. Hence the theorem also applies to MAP. The proof of the theorem is surprisingly subtle and complex compared to the analogous Bayesian case. One reason is that MDLx(x) is not a measure on X ∞. 4 Arbitrary X. For arbitrary measurable spaces X, definitions are more subtle, essentially because point probabilities Q(x) have to be replaced by probability densities relative to some base measure M, usually Lebesgue for X = IRd, counting measure for countable X, and e.g. M[·] = Bayes[·] for general X. We have taken care of that all results and proofs are valid unchanged for general X, with Q(·) defined as a version of the Radon-Nikodym derivative relative to M. We spare the reader the details, since they are completely standard and do not add any value to this paper, and space is limited. The formal definitions of Q(x) and Q[A|x] can be found e.g. in [Doo53, BD62]. Note that MDLx is independent of the particular choice of M. 4 Proof for Finite Model Class We first prove Theorem 1 for finite model classes M. For this we need the following Definition and Lemma: Definition 2 (Relations between Q and P) For any probability measures Q and P, let • Qr+Qs=Q be the Lebesgue decomposition of Q relative to P into an absolutely continuous non-negative measure Qr ≪P and a singular non-negative measure Qs⊥P. • g(ω) := dQr/dP = limℓ→∞[Q(x1:ℓ)/P(x1:ℓ)] be (a version of) the Radon-Nikodym derivative, i.e. Qr[A]= R Ag dP. • Ω◦:= {ω:Q(x1:ℓ)/P(x1:ℓ)→0} ≡{ω:g(ω)=0}. • ⃗Ω:= {ω:d(P,Q|x)→0 for ℓ(x)→∞}. It is well-known that the Lebesgue decomposition exists and is unique. The representation of the Radon-Nikodym derivative as a limit of local densities can e.g. be found in [Doo53, VII§8]: Zr/s ℓ (ω) := Qr/s(x1:ℓ)/P(x1:ℓ) for ℓ= 1,2,3,... constitute two martingale sequences, which converge w.p.1. Qr ≪P implies that the limit Zr ∞is the Radon-Nikodym derivative dQr/dP. (Indeed, Doob’s martingale convergence theorem can be used to prove the Radon-Nikodym theorem.) Qs⊥P implies Zr ∞=0 w.p.1. So g is uniquely defined and finite w.p.1. Lemma 3 (Generalized merging of opinions) For any Q and P, the following holds: (i) P ≪Q if and only if P[Ω◦]=0 (ii) P[Ω◦]=0 implies P[⃗Ω]=1 [(i)+[BD62]] (iii) P[Ω◦∪⃗Ω]=1 [generalizes (ii)] (i) says that Q(x)/P(x) converges almost surely to a strictly positive value if and only if P is absolutely continuous relative to Q, (ii) says that an almost sure positive limit of Q(x)/P(x) implies that Q merges with P. (iii) says that even if P ̸≪Q, we still have d(P,Q|x) →0 on almost every sequence that has a positive limit of Q(x)/P(x). Proof. Recall Definition 2. (i⇐) Assume P[Ω◦]=0: P[A]>0 implies Q[A]≥Qr[A]= R Ag dP >0, since g>0 a.s. by assumption P[Ω◦]=0. Therefore P ≪Q. (i⇒) Assume P ≪Q: Choose a B for which P[B]=1 and Qs[B]=0. Now Qr[Ω◦]= R Ω◦g dP =0 implies 0 ≤Q[B∩Ω◦] ≤Qs[B]+Qr[Ω◦] = 0+0. By P ≪Q this implies P[B∩Ω◦] = 0, hence P[Ω◦]=0. (ii) That P ≪Q implies P[⃗Ω] = 1 is Blackwell-Dubins’ celebrated result. The result now follows from (i). (iii) generalizes [BD62]. For P[Ω◦] = 0 it reduces to (ii). The case P[Ω◦] = 1 is trivial. Therefore we can assume 0<P[Ω◦]<1. Consider measure P ′[A]:=P[A|B] conditioned on B :=Ω\Ω◦. Assume Q[A]=0. Using R Ω◦g dP =0, we get 0=Qr[A]= R Ag dP = R A\Ω◦g dP. Since g>0 outside Ω◦, this implies P[A\Ω◦]=0. So P ′[A]=P[A∩B]/P[B]=P[A\Ω◦]/P[B]=0. Hence P ′ ≪Q. Now (ii) implies d(P ′,Q|x) →0 with P ′ probability 1. Since P ′ ≪P we also get d(P ′,P|x) →0 w.P ′.p.1. Together this implies 0≤d(P,Q|x)≤d(P ′,P|x)+d(P ′,Q|x)→0 w.P ′.p.1, i.e. P ′[⃗Ω]=1. The claim now follows from 5 P[Ω◦∪⃗Ω] = P ′[Ω◦∪⃗Ω]P[Ω\ Ω◦] + P[Ω◦∪⃗Ω|Ω◦]P[Ω◦] = 1 · P[Ω\ Ω◦] + 1 · P[Ω◦] = P[Ω] = 1 The intuition behind the proof of Theorem 1 is as follows. MDL will asymptotically not select Q for which Q(x)/P(x)→0. Hence for those Q potentially selected by MDL, we have ω ̸∈Ω◦, hence ω ∈⃗Ω, for which d(P,Q|x)→0 (a.s.). The technical difficulties are for finite M that the eligible Q depend on the sequence ω, and for infinite M to deal with non-uniformly converging d, i.e. to infer d(P,MDLx|x)→0. Proof of Theorem 1 for finite M. Recall Definition 2, and let gQ,Ω◦Q,⃗ΩQ refer to some Q∈M≡ {Q1,...,Qm}. The set of sequences ω for which some gQ for some Q ∈M is undefined has Pmeasure zero, and hence can be ignored. Fix some sequence ω ∈Ωfor which gQ(ω) is defined for all Q∈M, and let Mω :={Q∈M:gQ(ω)=0}. MDLx := arg min Q∈M LQ(x), where LQ(x) := −log Q(x) + K(Q). Consider the difference LQ(x) −LP (x) = −log Q(x) P(x) + K(Q) −K(P) ℓ→∞ −→−log gQ(ω) + K(Q) −K(P) For Q∈Mω, the r.h.s. is +∞, hence ∀Q∈Mω ∃ℓQ∀ℓ>ℓQ : LQ(x) > LP (x) Since M is finite, this implies ∀ℓ>ℓ0 ∀Q∈Mω : LQ(x) > LP (x), where ℓ0 := max{ℓQ : Q ∈Mω} < ∞ Therefore, since P ∈M, we have MDLx ̸∈Mω ∀ℓ> ℓ0, so we can safely ignore all Q ∈Mω and focus on Q∈Mω :=M\Mω. Let Ω1 :=T Q∈Mω(Ω◦Q∪⃗ΩQ). Since P[Ω1]=1 by Lemma 3(iii), we can also assume ω∈Ω1. Q ∈Mω ⇒ gQ(ω) > 0 ⇒ ω ̸∈Ω◦ Q ⇒ ω ∈⃗ΩQ ⇒ d(P, Q|x) →0 This implies d(P, MDLx|x) ≤ sup Q∈Mω d(P, Q|x) →0 where the inequality holds for ℓ> ℓ0 and the limit holds, since M is finite. Since the set of ω excluded in our considerations has measure zero, d(P,MDLx|x) →0 w.p.1, which proves the theorem for finite M. 5 Proof for Countable Model Class The proof in the previous Section crucially exploited finiteness of M. We want to prove that the probability that MDL asymptotically selects “complex” Q is small. The following Lemma establishes that the probability that MDL selects a specific complex Q infinitely often is small. Lemma 4 (MDL avoids complex probability measures Q) For any Q and P we have P[Q(x)/P(x)≥c infinitly often]≤1/c. Proof. P[∀ℓ0∃ℓ>ℓ0 : Q(x) P(x) ≥c] (a) = P[ lim ℓ→∞ Q(x) P(x) ≥c] ≤ (b) ≤1 c E[lim ℓ Q(x) P(x)] (c) = 1 c E[lim ℓ Q(x) P(x)] (d) ≤ 1 c lim ℓ E[Q(x) P(x)] (e) ≡1 c (a) is true by definition of the limit superior lim, (b) is Markov’s inequality, (c) exploits the fact that the limit of Q(x)/P(x) exists w.p.1, (d) uses Fatou’s lemma, and (e) is obvious. For sufficiently complex Q, Lemma 4 implies that LQ(x)>LP (x) for most x. Since convergence is non-uniform in Q, we cannot apply the Lemma to all (infinitely many) complex Q directly, but need to lump them into one ¯Q. 6 Proof of Theorem 1 for countable M. Let the Q ∈M = {Q1,Q2,...} be ordered somehow, e.g. in increasing order of complexity K(Q), and P = Qn. Choose some (large) m ≥n and let f M:={Qm+1,Qm+2,...} be the set of “complex” Q. We show that the probability that MDL selects infinitely often complex Q is small: P[MDLx ∈f M infinitely often] ≡P[∀ℓ0∃ℓ>ℓ0 : MDLx ∈f M] ≤ P[∀ℓ0∃ℓ>ℓ0 ∧Q ∈f M : LQ(x) ≤LP (x)] = P[∀ℓ0∃ℓ>ℓ0 : sup i>m Qi(x) P (x) 2K(P )−K(Qi) ≥1] (a) ≤ P[∀ℓ0∃ℓ>ℓ0 : ¯ Q(x) P (x) δ 2K(P ) ≥1] (b) ≤δ 2K(P ) (c) ≤ε The first three relations follow immediately from the definition of the various quantities. Bound (a) is the crucial “lumping” step. First we bound sup i>m Qi(x) P(x) 2−K(Qi) ≤ ∞ X i=m+1 Qi(x) P(x) 2−K(Qi) = δ ¯Q(x) P(x), δ := X i>m 2−K(Qi) < ∞, ¯Q(x) := 1 δ X i>m Qi(x)2−K(Qi), While MDL·[·] is not a (single) measure on Ωand hence difficult to deal with, ¯Q is a proper probability measure on Ω. In a sense, this step reduces MDL to Bayes. Now we apply Lemma 4 in (b) to the (single) measure ¯Q. The bound (c) holds for sufficiently large m = mε(P), since δ →0 for m→∞. This shows that for the sequence of MDL estimates {MDLx1:ℓ:ℓ> ℓ0} ⊆{Q1, ..., Qm} with probability at least 1 −ε Hence the already proven Theorem 1 for finite M implies that d(P,MDLx|x) →0 with probability at least 1−ε. Since convergence holds for every ε>0, it holds w.p.1. 6 Implications Due to its generality, Theorem 1 can be applied to many problem classes. We illustrate some immediate implications of Theorem 1 for time-series forecasting, classification, regression, discriminative learning, and reinforcement learning. Time-series forecasting. Classical online sequence prediction is concerned with predicting xℓ+1 from (non-i.i.d.) sequence x1:ℓfor ℓ= 1,2,3,.... Forecasting farther into the future is possible by predicting xℓ+1:ℓ+h for some h>0. Hence Theorem 1 implies good asymptotic (multi-step) predictions. Offline learning is concerned with training a predictor on x1:ℓfor fixed ℓin-house, and then selling and using the predictor on xℓ+1:∞without further learning. Theorem 1 shows that for enough training data, predictions “post-learning” will be good. Classification and Regression. In classification (discrete X) and regression (continuous X), a sample is a set of pairs D = {(y1,x1),...,(yℓ,xℓ)}, and a functional relationship ˙x = f( ˙y)+noise, i.e. a conditional probability P( ˙x| ˙y) shall be learned. For reasons apparent below, we have swapped the usual role of ˙x and ˙y. The dots indicate ˙x ∈X and ˙y ∈Y), while x = x1:ℓ∈X ℓand y = y1:ℓ∈Yℓ. If we assume that also ˙y follows some distribution, and start with a countable model class M of joint distributions Q( ˙x, ˙y) which contains the true joint distribution P( ˙x, ˙y), our main result implies that MDLD[( ˙x, ˙y)|D] converges to the true distribution P( ˙x, ˙y). Indeed since/if samples are assumed i.i.d., we don’t need to invoke our general result. Discriminative learning. Instead of learning a generative [Jeb03] joint distribution P( ˙x, ˙y), which requires model assumptions on the input ˙y, we can discriminatively [LSS07] learn P(·| ˙y) directly without any assumption on y (not even i.i.d). We can simply treat y1:∞as an oracle to all Q, define M′ = {Q′} with Q′(x) := Q(x|y1:∞), and apply our main result to M′, leading to MDL′x[A|x] → P ′[A|x], i.e. MDLx|y1:∞[A|x,y1:∞] →P[A|x,y1:∞]. If y1,y2,... are conditionally independent, or more generally for any causal process, we have Q(x|y) = Q(x|y1:∞). Since the x given y are not identically distributed, classical MDL consistency results for i.i.d. or stationary-ergodic sources do not apply. The following corollary formalizes our findings: Corollary 5 (Discriminative MDL) Let M ∋P be a class of discriminative causal distributions Q[·|y1:∞], i.e. Q(x|y1:∞) = Q(x|y), where x = x1:ℓand y = y1:ℓ. Regression and classification are 7 typical examples. Further assume M is countable. Let MDLx|y := argminQ∈M{−logQ(x|y)+ K(Q)} be the discriminative MDL measure (at time ℓgiven x,y). Then supA MDLx|y[A|x,y]− P[A|x,y] →0 for ℓ(x)→∞, P[·|y1:∞] almost surely, for every sequence y1:∞. For finite Y and conditionally independent x, the intuitive reason how this can work is as follows: If ˙y appears in y1:∞only finitely often, it plays asymptotically no role; if it appears infinitely often, then P(·| ˙y) can be learned. For infinite Y and deterministic M, the result is also intelligible: Every ˙y might appear only once, but probing enough function values xt = f(yt) allows to identify the function. Reinforcement learning (RL). In the agent framework [RN03], an agent interacts with an environment in cycles. At time t, an agent chooses an action yt based on past experience x<t ≡ (x1,...,xt−1) and past actions y<t with probability π(yt|x<ty<t) (say). This leads to a new perception xt with probability µ(xt|x<ty1:t) (say). Then cycle t + 1 starts. Let P(xy) = Qℓ t=1µ(xt|x<ty1:t)π(yt|x<ty<t) be the joint interaction probability. We make no (Markov, stationarity, ergodicity) assumption on µ and π. They may be POMDPs or beyond. Corollary 6 (Single-agent MDL) For a fixed policy=agent π, and a class of environments {ν1,ν2,...} ∋µ, let M = {Qi} with Qi(x|y) = Qℓ t=1νi(xt|x<ty1:t). Then d(P[·|y],MDLx|y) →0 with joint P-probability 1. The corollary follows immediately from the previous corollary and the facts that the Qi are causal and that with P[·|y1:∞]-probability 1 ∀y1:∞implies w.P.p.1 jointly in x and y. In reinforcement learning [SB98], the perception xt := (ot,rt) consists of some regular observation ot and a reward rt ∈[0,1]. Goal is to find a policy which maximizes accrued reward in the long run. The previous corollary implies Corollary 7 (Fixed-policy MDL value function convergence) Let VP [xy] := EP [·|xy][rℓ+1 + γrℓ+2+γ2rℓ+3+...] be the future γ-discounted P-expected reward sum (true value of π), and similarly VQi[xy] for Qi. Then the MDL value converges to the true value, i.e. VMDLx|y[xy]−VP [xy]→0, w.P.p.1. for any policy π. Proof. The corollary follows from the general inequality |EP [f]−EQ[f]| ≤sup|f|·supA|P[A]− Q[A]| by inserting f := rℓ+1+γrℓ+2+γ2rℓ+3+... and P = P[·|xy] and Q = MDLx|y[·|xy], and using 0≤f ≤1/(1−γ) and Corollary 6. Since the value function probes the infinite future, we really made use of our convergence result in total variation. Corollary 7 shows that MDL approximates the true value asymptotically arbitrarily well. The result is weaker than it may appear. Following the policy that maximizes the estimated (MDL) value is often not a good idea, since the policy does not explore properly [Hut05]. Nevertheless, it is a reassuring non-trivial result. 7 Variations MDL is more a general principle for model selection than a uniquely defined procedure. For instance, there are crude and refined MDL [Gr¨u07], the related MML principle [Wal05], a static, a dynamic, and a hybrid way of using MDL for prediction [PH05], and other variations. For our setup, we could have defined multi-step lookahead prediction as a product of single-step predictions: MDLI(x1:ℓ):= Qℓ t=1MDLx<t(xt|x<t) and MDLI(z|x)=MDLI(xz)/MDLI(x), which is a more incremental MDL version. Both, MDLx and MDLI are ‘static’ in the sense of [PH05], and each allows for a dynamic and a hybrid version. Due to its incremental nature, MDLI likely has better predictive properties than MDLx, and conveniently defines a single measure over X ∞, but inconveniently is ̸∈M. One reason for using MDL is that it can be computationally simpler than Bayes. E.g. if M is a class of MDPs, then MDLx is still an MDP and hence tractable, but MDLI like Bayes are a nightmare to deal with. Acknowledgements. My thanks go to Peter Sunehag for useful discussions. 8 References [AHRU09] M.-R. Amini, A. Habrard, L. Ralaivola, and N. Usunier, editors. Learning from non-IID data: Theory, Algorithms and Practice (LNIDD’09), Bled, Slovenia, 2009. [Bar85] A. R. Barron. Logically Smooth Density Estimation. PhD thesis, Stanford University, 1985. [BC91] A. R. Barron and T. M. Cover. Minimum complexity density estimation. IEEE Transactions on Information Theory, 37:1034–1054, 1991. [BD62] D. Blackwell and L. Dubins. Merging of opinions with increasing information. Annals of Mathematical Statistics, 33:882–887, 1962. [CBL06] N. Cesa-Bianchi and G. Lugosi. Prediction, Learning, and Games. Cambridge University Press, 2006. [Doo53] J. L. Doob. Stochastic Processes. Wiley, New York, 1953. [Gr¨u07] P. D. Gr¨unwald. The Minimum Description Length Principle. The MIT Press, Cambridge, 2007. [Hut03] M. Hutter. Convergence and loss bounds for Bayesian sequence prediction. IEEE Transactions on Information Theory, 49(8):2061–2067, 2003. [Hut05] M. Hutter. Universal Artificial Intelligence: Sequential Decisions based on Algorithmic Probability. Springer, Berlin, 2005. 300 pages, http://www.hutter1.net/ai/uaibook.htm. [Hut07] M. Hutter. On universal prediction and Bayesian confirmation. Theoretical Computer Science, 384(1):33–48, 2007. [Jeb03] T. Jebara. Machine Learning: Discriminative and Generative. Springer, 2003. [KL94] E. Kalai and E. Lehrer. Weak and strong merging of opinions. Journal of Mathematical Economics, 23:73–86, 1994. [LSS07] P. Long, R. Servedio, and H. U. Simon. Discriminative learning can succeed where generative learning fails. Information Processing Letters, 103(4):131–135, 2007. [Mah04] P. Maher. Probability captures the logic of scientific confirmation. In C. Hitchcock, editor, Contemporary Debates in Philosophy of Science, chapter 3, pages 69–93. Blackwell Publishing, 2004. [PH05] J. Poland and M. Hutter. Asymptotics of discrete MDL for online prediction. IEEE Transactions on Information Theory, 51(11):3780–3795, 2005. [RN03] S. J. Russell and P. Norvig. Artificial Intelligence. A Modern Approach. Prentice-Hall, Englewood Cliffs, NJ, 2nd edition, 2003. [Rya09] D. Ryabko. Characterizing predictable classes of processes. In Proc. 25th Conference on Uncertainty in Artificial Intelligence (UAI’09), Montreal, 2009. [SB98] R. S. Sutton and A. G. Barto. Reinforcement Learning: An Introduction. MIT Press, Cambridge, MA, 1998. [Wal05] C. S. Wallace. Statistical and Inductive Inference by Minimum Message Length. Springer, Berlin, 2005. [WR04] M. Weinberg and J. S. Rosenschein. Best-response multiagent learning in non-stationary environments. In Proc. 3rd International Joint Conf. on Autonomous Agents & Multi Agent Systems (AAMAS’04), pages 506–513, 2004. 9
2009
207
3,712
Efficient and Accurate ℓp-Norm Multiple Kernel Learning Marius Kloft University of California Berkeley, USA Ulf Brefeld Yahoo! Research Barcelona, Spain S¨oren Sonnenburg Technische Universit¨at Berlin Berlin, Germany Pavel Laskov Universit¨at T¨ubingen T¨ubingen, Germany Klaus-Robert M¨uller Technische Universit¨at Berlin Berlin, Germany Alexander Zien LIFE Biosystems GmbH Heidelberg, Germany Abstract Learning linear combinations of multiple kernels is an appealing strategy when the right choice of features is unknown. Previous approaches to multiple kernel learning (MKL) promote sparse kernel combinations to support interpretability. Unfortunately, ℓ1-norm MKL is hardly observed to outperform trivial baselines in practical applications. To allow for robust kernel mixtures, we generalize MKL to arbitrary ℓp-norms. We devise new insights on the connection between several existing MKL formulations and develop two efficient interleaved optimization strategies for arbitrary p > 1. Empirically, we demonstrate that the interleaved optimization strategies are much faster compared to the traditionally used wrapper approaches. Finally, we apply ℓp-norm MKL to real-world problems from computational biology, showing that non-sparse MKL achieves accuracies that go beyond the state-of-the-art. 1 Introduction Sparseness is being regarded as one of the key features in machine learning [15] and biology [16]. Sparse models are appealing since they provide an intuitive interpretation of a task at hand by singling out relevant pieces of information. Such automatic complexity reduction facilitates efficient training algorithms, and the resulting models are distinguished by small capacity. The interpretability is one of the main reasons for the popularity of sparse methods in complex domains such as computational biology, and consequently building sparse models from data has received a significant amount of recent attention. Unfortunately, sparse models do not always perform well in practice [7, 15]. This holds particularly for learning sparse linear combinations of data sources [15], an abstraction of which is known as multiple kernel learning (MKL) [10]. The data sources give rise to a set of (possibly correlated) kernel matrices K1, . . . , KM, and the task is to learn the optimal mixture K = P m θmKm for the problem at hand. Previous MKL research aims at finding sparse mixtures to effectively simplify the underlying data representation. For instance, [10] study semi-definite matrices K ⪰0 inducing sparseness by bounding the trace tr(K) ≤c; unfortunately, the resulting semi-definite optimization problems are computationally too expensive for large-scale deployment. Recent approaches to MKL promote sparse solutions either by Tikhonov regularization over the mixing coefficients [25] or by incorporating an additional constraint ∥θ∥≤1 [18, 27] requiring solutions on the standard simplex, known as Ivanov regularization. Based on the one or the other, efficient optimization strategies have been proposed for solving ℓ1-norm MKL using semi-infinite linear programming [21], second order approaches [6], gradient-based optimization [19], and levelset methods [26]. Other variants of ℓ1-norm MKL have been proposed in subsequent work addressing practical algorithms for multi-class [18, 27] and multi-label [9] problems. 1 Previous approaches to MKL successfully identify sparse kernel mixtures, however, the solutions found, frequently suffer from poor generalization performances. Often, trivial baselines using unweighted-sum kernels K = P m Km are observed to outperform the sparse mixture [7]. One reason for the collapse of ℓ1-norm MKL is that kernels deployed in real-world tasks are usually highly sophisticated and effectively capture relevant aspects of the data. In contrast, sparse approaches to MKL rely on the assumption that some kernels are irrelevant for solving the problem. Enforcing sparse mixtures in these situations may lead to degenerate models. As a remedy, we propose to sacrifice sparseness in these situations and deploy non-sparse mixtures instead. After submission of this paper, we learned about a related approach, in which the sum of an ℓ1- and an ℓ2-regularizer are used [12]. Although non-sparse solutions are not as easy to interpret, they account for (even small) contributions of all available kernels to live up to practical applications. In this paper, we first show the equivalence of the most common approaches to ℓ1-norm MKL [18, 25, 27]. Our theorem allows for a generalized view of recent strands of multiple kernel learning research. Based on the detached view, we extend the MKL framework to arbitrary ℓp-norm MKL with p ≥1. Our approach can either be motivated by additionally regularizing over the mixing coefficients ∥θ∥p p, or equivalently by incorporating the constraint ∥θ∥p p ≤1. We propose two alternative optimization strategies based on Newton descent and cutting planes, respectively. Empirically, we demonstrate the efficiency and accuracy of none-sparse MKL. Large-scale experiments on gene start detection show a significant improvement of predictive accuracy compared to ℓ1- and ℓ∞-norm MKL. The rest of the paper is structured as follows. We present our main contributions in Section 2, the theoretical analysis of existing approaches to MKL, our ℓp-norm MKL generalization with two highly efficient optimization strategies, and relations to ℓ1-norm MKL. We report on our empirical results in Section 3 and Section 4 concludes. 2 Generalized Multiple Kernel Learning 2.1 Preliminaries In the standard supervised learning setup, a labeled sample D = {(xi, yi)}i=1...,n is given, where the x lie in some input space X and y ∈Y ⊂R. The goal is to find a hypothesis f ∈H, that generalizes well on new and unseen data. Applying regularized risk minimization returns the minimizer f ∗, f ∗= argminf Remp(f) + λΩ(f), where Remp(f) = 1 n Pn i=1 V (f(xi), yi) is the empirical risk of hypothesis f w.r.t. to the loss V : R × Y →R, regularizer Ω: H →R, and trade-off parameter λ > 0. In this paper, we focus on Ω(f) = 1 2∥˜w∥2 2 and on linear models of the form f ˜w,b(x) = ˜w⊤ψ(x) + b, (1) together with a (possibly non-linear) mapping ψ : X →H to a Hilbert space H [20]. We will later make use of kernel functions K(x, x′) = ⟨ψ(x), ψ(x′)⟩H to compute inner products in H. 2.2 Learning with Multiple Kernels When learning with multiple kernels, we are given M different feature mappings ψm : X → Hm, m = 1, . . . M, each giving rise to a reproducing kernel Km of Hm. Approaches to multiple kernel learning consider linear kernel mixtures Kθ = P θmKm, θm ≥0. Compared to Eq. (1), the primal model for learning with multiple kernels is extended to f ˜w,b,θ(x) = ˜w⊤ψθ(xi) + b = M X m=1 p θm ˜w⊤ mψm(x) + b, (2) where the weight vector ˜w and the composite feature map ψθ have a block structure ˜w = ( ˜w⊤ 1 , . . . , ˜w⊤ M)⊤and ψθ = √θ1ψ1 × . . . × √θMψM, respectively. The idea in learning with multiple kernels is to minimize the loss on the training data w.r.t. to optimal kernel mixture P θmKm in addition to regularizing θ to avoid overfitting. Hence, in terms 2 of regularized risk minimization, the optimization problem becomes inf ˜w,b,θ≥0 1 n n X i=1 V (fw,b,θ(xi), yi) + λ 2 M X m=1 ∥˜wm∥2 2 + ˜µ˜Ω[θ]. (3) Previous approaches to multiple kernel learning employ regularizers of the form ˜Ω(θ) = ||θ||1 to promote sparse kernel mixtures. By contrast, we propose to use smooth convex regularizers of the form ˜Ω(θ) = ||θ||p p, 1 < p < ∞, allowing for non-sparse solutions. The non-convexity of the resulting optimization problem is not inherent and can be resolved by substituting wm ←√θm ˜wm. Furthermore, regularization parameter and sample size can be decoupled by introducing ˜C = 1 nλ (and adjusting µ ←˜µ λ) which has favorable scaling properties in practice. We obtain the following convex optimization problem [5] that has also been considered by [25] for hinge loss and p = 1, inf w,b,θ≥0 ˜C n X i=1 V M X m=1 w⊤ mψm(xi) + b, yi ! + 1 2 M X m=1 ∥wm∥2 2 θm + µ||θ||p p, (4) where we use the convention that t 0 = 0 if t = 0 and ∞otherwise. An alternative approach has been studied by [18, 27] (again using hinge loss and p = 1). They upper bound the value of the regularizer ∥θ∥1 ≤1 and incorporate the latter as an additional constraint into the optimization problem. For C > 0, they arrive at inf w,b,θ≥0 C n X i=1 V M X m=1 w⊤ mψm(xi) + b, yi ! + 1 2 M X m=1 ||wm||2 2 θm s.t. ||θ||p p ≤1. (5) Our first contribution shows that both, the Tikhonov regularization in Eq. (4) and the Ivanov regularization in Eq. (5), are equivalent. Theorem 1 Let be p ≥1. For each pair ( ˜C, µ) there exists C > 0 such that for each optimal solution (w∗, b∗, θ∗) of Eq. (4) using ( ˜C, µ), we have that (w∗, b∗, κ θ∗) is also an optimal solution of Eq. (5) using C, and vice versa, where κ > 0 is some multiplicative constant. Proof. The proof is shown in the supplementary material for lack of space. Sketch of the proof: We incorporate the regularizer of (4) into the constraints and show that the resulting upper bound is tight. A variable substitution completes the proof. 2 Zien and Ong [27] showed that the MKL optimization problems by Bach et al. [3], Sonnenburg et al. [21], and their own formulation are equivalent. As a main implication of Theorem 1 and by using the result of Zien and Ong it follows that the optimization problem of Varma and Ray [25] and the ones from [3, 18, 21, 27] all are equivalent. In addition, our result shows the coupling between trade-off parameter C and the regularization parameter µ in Eq. (4): tweaking one also changes the other and vice versa. Moreover, Theorem 1 implies that optimizing C in Eq. (5) implicitly searches the regularization path for the parameter µ of Eq. (4). In the remainder, we will therefore focus on the formulation in Eq. (5), as a single parameter is preferable in terms of model selection. Furthermore, we will focus on binary classification problems with Y = {−1, +1}, equipped with the hinge loss V (f(x), y) = max{0, 1 −yf(x)}. However note, that all our results can easily be transferred to regression and multi-class settings using appropriate convex loss functions and joint kernel extensions. 2.3 Non-Sparse Multiple Kernel Learning We now extend the existing MKL framework to allow for non-sparse kernel mixtures θ, see also [13]. Let us begin with rewriting Eq. (5) by expanding the hinge loss into the slack variables as follows min θ,w,b,ξ 1 2 M X m=1 ||wm||2 2 θm + C∥ξ∥1 (6) s.t. ∀i : yi M X m=1 w′ mψm(xi) + b ! ≥1 −ξi ; ξ ≥0 ; θ ≥0 ; ∥θ∥p p ≤1. 3 Applying Lagrange’s theorem incorporates the constraints into the objective by introducing nonnegative Lagrangian multipliers α, β ∈Rn, γ ∈RM, δ ∈R (including a pre-factor of 1 p for the δ-Term). Resubstitution of optimality conditions w.r.t. to w, b, ξ, and θ removes the dependency of the Lagrangian on the primal variables. After some additional algebra (e.g., the terms associated with γ cancel), the Lagrangian can be written as L = 1⊤α −1 pδ −p −1 p δ− 1 p−1 M X m=1 1 2α⊤Qmα  p p−1 ! , (7) where Qm = diag(y)Kmdiag(y). Eq. (7) now has to be maximized w.r.t. to the dual variables α, δ, subject to α⊤y = 0, 0 ≤αi ≤C for 1 ≤i ≤n, and δ ≥0. Let us ignore for a moment the non-negativity δ ≥0 and solve ∂L/∂δ = 0 for the unbounded δ. Setting the partial derivative to zero yields δ = M X m=1 1 2α⊤Qmα  p p−1 ! p−1 p . (8) Interestingly, at optimality, we always have δ ≥0 because the quadratic term in α is non-negative. Plugging the optimal δ into Eq. (7), we arrive at the following optimization problem which solely depends on α. max α 1⊤α −1 2 M X m=1 α⊤Qmα  p p−1 ! p−1 p s.t. 0 ≤α ≤C1; α⊤y = 0. (9) In the limit p →∞, the above problem reduces to the SVM dual (with Q = P m Qm), while p →1 gives rise to a QCQP ℓ1-MKL variant. However, optimizing the dual efficiently is difficult and will cause numerical problems in the limits p →1 and p →∞. 2.4 Two Efficient Second-Order Optimization Strategies Many recent MKL solvers (e.g., [19, 24, 26]) are based on wrapping linear programs around SVMs. From an optimization standpoint, our work is most closely related to the SILP approach [21] and the simpleMKL method [19, 24]. Both of these methods also aim at efficient large-scale MKL algorithms. The two alternative approaches proposed for ℓp-norm MKL proposed in this paper are largely inspired by these methods and extend them in two aspects: customization to arbitrary norms and a tight coupling with minor iterations of an SVM solver, respectively. Our first strategy interleaves maximizing the Lagrangian of (6) w.r.t. α with minor precision and Newton descent on θ. For the second strategy, we devise a semi-infinite convex program, which we solve by column generation with nested sequential quadratically constrained linear programming (SQCLP). In both cases, the maximization step w.r.t. α is performed by chunking optimization with minor iterations. The Newton approach can be applied without a common purpose QCQP solver, however, convergence can only be guaranteed for the SQCLP [8]. 2.4.1 Newton Descent For a Newton descent on the mixing coefficients, we first compute the partial derivatives ∂L ∂θm = −1 2 w⊤ mwm θ2m + δθp−1 m | {z } =:∇θm and ∂2L ∂2θm = w⊤ mwm θ3m + (p −1)δθp−2 m | {z } =:hm of the original Lagrangian. Fortunately, the Hessian H is diagonal, i.e. given by H = diag(h). The m-th element sm of the corresponding Netwon step, defined as s := −H−1∇θ, is thus computed by sm = 1 2θm||wm||2 −δθp+2 m ||wm||2 + (p −1)δθp+1 m , 4 where δ is defined in Eq. (8). However, a Newton step θt+1 = θt + s might lead to non-positive θ. To avoid this awkward situation, we take the Newton steps in the space of log(θ) by adjusting the derivatives according to the chain rule. We obtain log(θt+1 m ) = log(θt m) − ∇t θm/θt m htm/(θtm)2 −∇t θm/(θtm)2 , (10) which corresponds to multiplicative update of θ: θt+1 m = θt m · exp ∇t θmθt m ∇t θm −htm ! . (11) Furthermore we additionally enhance the Newton step by a line search. 2.4.2 Cutting Planes In order to obtain an alternative optimization strategy, we fix θ and build the partial Lagrangian w.r.t. all other primal variables w, b, ξ. The derivation is analogous to [18, 27] and we omit details for lack of space. The resulting dual problem is a min-max problem of the form min θ max α 1⊤α −1 2α⊤ M X m=1 θmQmα s.t. 0 ≤α ≤C1; y⊤α = 0; θ ≥0; ∥θ∥p p ≤1. The above optimization problem is a saddle point problem and can be solved by alternating α and θ optimization step. While the former can simply be carried out by a support vector machine for a fixed mixture θ, the latter has been optimized for p = 1 by reduced gradients [18]. We take a different approach and translate the min-max problem into an equivalent semi-infinite program (SIP) as follows. Denote the value of the target function by t(α, θ) and suppose α∗is optimal. Then, according to the max-min inequality [5], we have t(α∗, θ) ≥t(α, θ) for all α and θ. Hence, we can equivalently minimize an upper bound η on the optimal value and arrive at min η,θ η s.t. η ≥1⊤α −1 2α⊤ M X m=1 θmQmα (12) for all α ∈Rn with 0 ≤α ≤C1, and y⊤α = 0 as well as ∥θ∥p p ≤1 and θ ≥0. [21] optimize the above SIP for p ≥1 with interleaving cutting plane algorithms. The solution of a quadratic program (here the regular SVM) generates the most strongly violated constraint for the actual mixture θ. The optimal (θ∗, η) is then identified by solving a linear program with respect to the set of active constraints. The optimal mixture is then used for computing a new constraint and so on. Unfortunately, for p > 1, a non-linearity is introduced by requiring ∥θ∥p p ≤1 and such constraint is unlikely to be found in standard optimization toolboxes that often handle only linear and quadratic constraints. As a remedy, we propose to approximate ∥θ∥p p ≤1 by sequential second-order Taylor expansion of the form ||θ||p p ≈1 + p(p −3) 2 − M X m=1 p(p −2)(˜θm)p−1 θm + p(p −1) 2 M X m=1 ˜θp−2 m θ2 m, where θp is defined element-wise, that is θp := (θp 1, ..., θp M). The sequence (θ0, θ1, · · · ) is initialized with a uniform mixture satisfying ∥θ0∥p p = 1 as a starting point. Successively θt+1 is computed using ˜θ = θt. Note that the quadratic term in the approximation is diagonal wherefore the subsequent quadratically constrained problem can be solved efficiently. Finally note, that this approach can be further sped-up by an additional projection onto the level-sets in the θ-optimization phase similar to [26]. In our case, the level-set projection is a convex quadratic problem with ℓp-norm constraints and can again be approximated by successive second-order Taylor expansions. 5 10 2 10 3 10 −2 10 −1 10 0 10 1 10 2 sample size time in seconds 10 1 10 2 10 3 10 −1 10 0 10 1 10 2 number of kernels time in seconds Figure 1: Execution times of SVM Training, ℓp-norm MKL based on interleaved optimization via the Newton, the cutting plane algorithm (CPA), and the SimpleMKL wrapper. (left) Training using fixed number of 50 kernels varying training set size. (right) For 500 examples and varying numbers of kernels. Our proposed Newton and CPA obtain speedups of over an order of magnitude. Notice the tiny error bars. 3 Computational Experiments In this section we study non-sparse MKL in terms of efficiency and accuracy.1 We apply the method of [21] for ℓ1-norm results as it is contained as a special case of our cutting plane strategy. We write ℓ∞-norm MKL for a regular SVM with the unweighted-sum kernel K = P m Km. 3.1 Execution Time We demonstrate the efficiency of our implementations of non-sparse MKL. We experiment on the MNIST data set where the task is to separate odd vs. even digits. We compare our ℓp-norm MKL with two methods for ℓ1-norm MKL, simpleMKL [19] and SILP-based chunking [21], and to SVMs using the unweighted-sum kernel (ℓ∞-norm MKL) as additional baseline. We optimize all methods up to a precision of 10−3 for the outer SVM-ε and 10−5 for the “inner” SIP precision and computed relative duality gaps. To provide a fair stopping criterion to simpleMKL, we set the stopping criterion of simpleMKL to the relative duality gap of its ℓ1-norm counterpart. This way, the deviations of relative objective values of ℓ1-norm MKL variants are guaranteed to be smaller than 10−4. SVM trade-off parameters are set to C = 1 for all methods. Figure 1 (left) displays the results for varying sample sizes and 50 precomputed Gaussian kernels with different bandwidths. Error bars indicate standard error over 5 repetitions. Unsurprisingly, the SVM with the unweighted-sum kernel is the fastest method. Non-sparse MKL scales similarly as ℓ1-norm chunking; the Newton strategy (Section 2.4.1) is slightly faster than the cutting plane variant (Section 2.4.2) that needs additional Taylor expansions within each θ-step. SimpleMKL suffers from training an SVM to full precision for each gradient evaluation and performs worst.2 Figure 1 (right) shows the results for varying the number of precomputed RBF kernels for a fixed sample size of 500. The SVM with the unweighted-sum kernel is hardly affected by this setup and performs constantly. The ℓ1-norm MKL by [21] handles the increasing number of kernels best and is the fastest MKL method. Non-sparse approaches to MKL show reasonable run-times, the Newtonbased ℓp-norm MKL being again slightly faster than its peer. Simple MKL performs again worst. Overall, our proposed Newton and cutting plane based optimization strategies achieve a speedup of often more than one order of magnitude. 3.2 Protein Subcellular Localization The prediction of the subcellular localization of proteins is one of the rare empirical success stories of ℓ1-norm-regularized MKL [17, 27]: after defining 69 kernels that capture diverse aspects of 1Available at http://www.shogun-toolbox.org/ 2SimpleMKL could not be evaluated for 2000 instances (ran out of memory on a 4GB machine). 6 Table 1: Results for Protein Subcellular Localization ℓp-norm 1 32/31 16/15 8/7 4/3 2 4 ∞ 1 - MCC [%] 9.13 9.12 9.64 9.84 9.56 10.18 10.08 10.41 protein sequences, ℓ1-norm-MKL could raise the predictive accuracy significantly above that of the unweighted sum of kernels (thereby also improving on established prediction systems for this problem). Here we investigate the performance of non-sparse MKL. We download the kernel matrices of the dataset plant3 and follow the experimental setup of [17] with the following changes: instead of a genuine multiclass SVM, we use the 1-vs-rest decomposition; instead of performing cross-validation for model selection, we report results for the best models, as we are only interested in the relative performance of the MKL regularizers. Specifically, for each C ∈{1/32, 1/8, 1/2, 1, 2, 4, 8, 32, 128}, we compute the average Mathews correlation coefficient (MCC) on the test data. For each norm, the best average MCC is recorded. Table 1 shows the averages over several splits of the data. The results indicate that, indeed, with proper choice of a non-sparse regularizer, the accuracy of ℓ1-norm can be recovered. This is remarkable, as this dataset is particular in that it fullfills the rare condition that ℓ1-norm MKL performs better than ℓ∞-norm MKL. In other words, selecting these data may imply a bias towards ℓ1-norm. Nevertheless our novel non-sparse MKL can keep up with this, essentially by approximating ℓ1-norm. 3.3 Gene Start Recognition This experiment aims at detecting transcription start sites (TSS) of RNA Polymerase II binding genes in genomic DNA sequences. Accurate detection of the transcription start site is crucial to identify genes and their promoter regions and can be regarded as a first step in deciphering the key regulatory elements in the promoter region that determine transcription. For our experiments we use the dataset from [22] which contains a curated set of 8,508 TSS annotated genes built from dbTSS version 4 [23] and refseq genes. These are translated into positive training instances by extracting windows of size [−1000, +1000] around the TSS. Similar to [4], 85,042 negative instances are generated from the interior of the gene using the same window size. Following [22], we employ five different kernels representing the TSS signal (weighted degree with shift), the promoter (spectrum), the 1st exon (spectrum), angles (linear), and energies (linear). Optimal kernel parameters are determined by model selection in [22]. Every kernel is normalized such that all points have unit length in feature space. We reserve 13,000 and 20,000 randomly drawn instances for holdout and test sets, respectively, and use the remaining 60,000 as the training pool. Figure 2 shows test errors for varying training set sizes drawn from the pool; training sets of the same size are disjoint. Error bars indicate standard errors of repetitions for small training set sizes. Regardless of the sample size, ℓ1-MKL is significantly outperformed by the sum-kernel. On the contrary, non-sparse MKL significantly achieves higher AUC values than the ℓ∞-MKL for sample sizes up to 20k. The scenario is well suited for ℓ2-norm MKL which performs best. Finally, for 60k training instances, all methods but ℓ1-norm MKL yield the same performance. Again, the superior performance of non-sparse MKL is remarkable, and of significance for the application domain: the method using the unweighted sum of kernels [22] has recently been confirmed to be the leading in a comparison of 19 state-of-the-art promoter prediction programs [1], and our experiments suggest that its accuracy can be further elevated by non-sparse MKL. 4 Conclusion and Discussion We presented an efficient and accurate approach to non-sparse multiple kernel learning and showed that our ℓp-norm MKL can be motivated as Tikhonov and Ivanov regularization of the mixing coefficients, respectively. Applied to previous MKL research, our result allows for a unified view as so far seemingly different approaches turned out to be equivalent. Furthermore, we devised two efficient approaches to non-sparse multiple kernel learning for arbitrary ℓp-norms, p > 1. The resulting 3from http://www.fml.tuebingen.mpg.de/raetsch/suppl/protsubloc/ 7 0 10K 20K 30K 40K 50K 60K 0.88 0.89 0.9 0.91 0.92 0.93 sample size AUC 1−norm MKL 4/3−norm MKL 2−norm MKL 4−norm MKL SVM 1−norm n=5k 4/3−norm 2−norm 4−norm unw.−sum n=20k n=60k Figure 2: Left: Area under ROC curve (AUC) on test data for TSS recognition as a function of the training set size. Notice the tiny bars indicating standard errors w.r.t. repetitions on disjoint training sets. Right: Corresponding kernel mixtures. For p = 1 consistent sparse solutios are obtained while the optimal p = 2 distributes wheights on the weighted degree and the 2 spectrum kernels in good agreement to [22]. optimization strategies are based on semi-infinite programming and Newton descent, both interleaved with chunking-based SVM training. Execution times moreover revealed that our interleaved optimization vastly outperforms commonly used wrapper approaches. We would like to note that there is a certain preference/obsession for sparse models in the scientific community due to various reasons. The present paper, however, shows clearly that sparsity by itself is not the ultimate virtue to be strived for. Rather on the contrary: non-sparse model may improve quite impressively over sparse ones. The reason for this is less obvious and its theoretical exploration goes well beyond the scope of its submissions. We remark nevertheless that some interesting asymptotic results exist that show model selection consistency of sparse MKL (or the closely related group lasso) [2, 14], in other words in the limit n →∞MKL is guaranteed to find the correct subset of kernels. However, also the rate of convergence to the true estimator needs to be considered, thus we conjecture that the rate slower than √n which is common to sparse estimators [11] may be one of the reasons for finding excellent (nonasymptotic) results in non-sparse MKL. In addition to the convergence rate the variance properties of MKL estimators may play an important role to elucidate the performance seen in our various simulation experiments. Intuitively speaking, we observe clearly that in some cases all features even though they may contain redundant information are to be kept, since putting their contributions to zero does not improve prediction. I.e. all of them are informative to our MKL models. Note however that this result is also class specific, i.e. for some classes we may sparsify. Cross-validation based model building that includes the choice of p will however inevitably tell us which classes should be treated sparse and which non-sparse. Large-scale experiments on TSS recognition even raised the bar for ℓ1-norm MKL: non-sparse MKL proved consistently better than its sparse counterparts which were outperformed by an unweightedsum kernel. This exemplifies how the unprecedented combination of accuracy and scalability of our MKL approach and methods paves the way for progress in other real world applications of machine learning. Authors’ Contributions The authors contributed in the following way: MK and UB had the initial idea. MK, UB, SS, and AZ each contributed substantially to both mathematical modelling, design and implementation of algorithms, conception and execution of experiments, and writing of the manuscript. PL had some shares in the initial phase and KRM contributed to the text. Most of the work was done at previous affiliations of several authors: Fraunhofer Institute FIRST (Berlin), Technical University Berlin, and the Friedrich Miescher Laboratory (T¨ubingen). Acknowledgments This work was supported in part by the German BMBF grant REMIND (FKZ 01-IS07007A) and by the European Community under the PASCAL2 Network of Excellence (ICT-216886). 8 References [1] T. Abeel, Y. V. de Peer, and Y. Saeys. Towards a gold standard for promoter prediction evaluation. Bioinformatics, 2009. [2] F. R. Bach. Consistency of the group lasso and multiple kernel learning. J. Mach. Learn. Res., 9:1179– 1225, 2008. [3] F. R. Bach, G. R. G. Lanckriet, and M. I. Jordan. Multiple kernel learning, conic duality, and the smo algorithm. In Proc. 21st ICML. ACM, 2004. [4] V. B. Bajic, S. L. Tan, Y. Suzuki, and S. Sugano. Promoter prediction analysis on the whole human genome. Nature Biotechnology, 22(11):1467–1473, 2004. [5] S. Boyd and L. Vandenberghe. Convex Optimization. Cambrigde University Press, Cambridge, UK, 2004. [6] O. Chapelle and A. Rakotomamonjy. Second order optimization of kernel parameters. In Proc. of the NIPS Workshop on Kernel Learning: Automatic Selection of Optimal Kernels, 2008. [7] C. Cortes, A. Gretton, G. Lanckriet, M. Mohri, and A. Rostamizadeh. Proceedings of the NIPS Workshop on Kernel Learning: Automatic Selection of Optimal Kernels, 2008. [8] R. Hettich and K. O. Kortanek. Semi-infinite programming: theory, methods, and applications. SIAM Rev., 35(3):380–429, 1993. [9] S. Ji, L. Sun, R. Jin, and J. Ye. Multi-label multiple kernel learning. In Advances in Neural Information Processing Systems, 2009. [10] G. Lanckriet, N. Cristianini, L. E. Ghaoui, P. Bartlett, and M. I. Jordan. Learning the kernel matrix with semi-definite programming. JMLR, 5:27–72, 2004. [11] H. Leeb and B. M. P¨otscher. Sparse estimators and the oracle property, or the return of hodges’ estimator. Journal of Econometrics, 142:201–211, 2008. [12] C. Longworth and M. J. F. Gales. Combining derivative and parametric kernels for speaker verification. IEEE Transactions in Audio, Speech and Language Processing, 17(4):748–757, 2009. [13] C. A. Micchelli and M. Pontil. Learning the kernel function via regularization. Journal of Machine Learning Research, 6:1099–1125, 2005. [14] Y. Nardi and A. Rinaldo. On the asymptotic properties of the group lasso estimator for linear models. Electron. J. Statist., 2:605–633, 2008. [15] S. Olhede, M. Pontil, and J. Shawe-Taylor. Proceedings of the PASCAL2 Workshop on Sparsity in Machine Learning and Statistics, 2009. [16] B. A. Olshausen and D. J. Field. Emergence of simple-cell receptive field properties by learning a sparse code for natural images. Nature, 381:607–609, 1996. [17] C. S. Ong and A. Zien. An Automated Combination of Kernels for Predicting Protein Subcellular Localization. In Proc. of the 8th Workshop on Algorithms in Bioinformatics, 2008. [18] A. Rakotomamonjy, F. Bach, S. Canu, and Y. Grandvalet. More efficiency in multiple kernel learning. In ICML, pages 775–782, 2007. [19] A. Rakotomamonjy, F. Bach, S. Canu, and Y. Grandvalet. SimpleMKL. Journal of Machine Learning Research, 9:2491–2521, 2008. [20] B. Sch¨olkopf and A. Smola. Learning with Kernels. MIT Press, Cambridge, MA, 2002. [21] S. Sonnenburg, G. R¨atsch, C. Sch¨afer, and B. Sch¨olkopf. Large Scale Multiple Kernel Learning. Journal of Machine Learning Research, 7:1531–1565, July 2006. [22] S. Sonnenburg, A. Zien, and G. R¨atsch. ARTS: Accurate Recognition of Transcription Starts in Human. Bioinformatics, 22(14):e472–e480, 2006. [23] Y. Suzuki, R. Yamashita, K. Nakai, and S. Sugano. dbTSS: Database of human transcriptional start sites and full-length cDNAs. Nucleic Acids Research, 30(1):328–331, 2002. [24] M. Szafranski, Y. Grandvalet, and A. Rakotomamonjy. Composite kernel learning. In Proceedings of the International Conference on Machine Learning, 2008. [25] M. Varma and D. Ray. Learning the discriminative power-invariance trade-off. In IEEE 11th International Conference on Computer Vision (ICCV), pages 1–8, 2007. [26] Z. Xu, R. Jin, I. King, and M. Lyu. An extended level method for efficient multiple kernel learning. In D. Koller, D. Schuurmans, Y. Bengio, and L. Bottou, editors, Advances in Neural Information Processing Systems 21, pages 1825–1832. 2009. [27] A. Zien and C. S. Ong. Multiclass multiple kernel learning. In Proceedings of the 24th international conference on Machine learning (ICML), pages 1191–1198. ACM, 2007. 9
2009
208
3,713
Occlusive Components Analysis J¨org L¨ucke Frankfurt Institute for Advanced Studies Goethe-University Frankfurt, Germany luecke@fias.uni-frankfurt.de Richard Turner Gatsby Computational Neuroscience Unit, UCL 17 Queen Square, London WC1N 3AR, UK turner@gatsby.ucl.ac.uk Maneesh Sahani Gatsby Computational Neuroscience Unit, UCL 17 Queen Square, London WC1N 3AR, UK maneesh@gatsby.ucl.ac.uk Marc Henniges Frankfurt Institute for Advanced Studies Goethe-University Frankfurt, Germany henniges@fias.uni-frankfurt.de Abstract We study unsupervised learning in a probabilistic generative model for occlusion. The model uses two types of latent variables: one indicates which objects are present in the image, and the other how they are ordered in depth. This depth order then determines how the positions and appearances of the objects present, specified in the model parameters, combine to form the image. We show that the object parameters can be learnt from an unlabelled set of images in which objects occlude one another. Exact maximum-likelihood learning is intractable. However, we show that tractable approximations to Expectation Maximization (EM) can be found if the training images each contain only a small number of objects on average. In numerical experiments it is shown that these approximations recover the correct set of object parameters. Experiments on a novel version of the bars test using colored bars, and experiments on more realistic data, show that the algorithm performs well in extracting the generating causes. Experiments based on the standard bars benchmark test for object learning show that the algorithm performs well in comparison to other recent component extraction approaches. The model and the learning algorithm thus connect research on occlusion with the research field of multiple-causes component extraction methods. 1 Introduction A long-standing goal of unsupervised learning on images is to be able to learn the shape and form of objects from unlabelled scenes. Individual images usually contain only a small subset of all possible objects. This observation has motivated the construction of algorithms—such as sparse coding (SC; [1]) or non-negative matrix factorization (NMF; [2]) and its sparse variants—based on learning in latent-variable models, where each possible object, or part of an object, is associated with a variable controlling its presence or absence in a given image. Any individual “hidden cause” is rarely active, corresponding to the small number of objects present in any one image. Despite this plausible motivation, these algorithms make severe approximations. Perhaps the most crucial is that in the underlying latent variable models, objects or parts thereof, combine linearly to form the image. In real images the combination of individual objects depends on their relative distance from the camera or eye. If two objects occupy the same region in planar space, the nearer one occludes the other, i.e., the hidden causes non-linearly compete to determine the pixel values in the region of overlap. In this paper we extend multiple-causes models such as SC or NMF to handle occlusion. The idea of using many hidden “cause” variables to control the presence or absence of objects is retained, but these variables are augmented by another set of latent variables which determine the relative 1 depth of the objects, much as in the z-buffer employed by computer graphics. In turn, this enables the simplistic linear combination rule to be replaced by one in which nearby objects occlude those that are more distant. One of the consequences of moving to a richer, more complex model is that inference and learning become correspondingly harder. One of the main contributions of this paper is to show how to overcome these difficulties. The problem of occlusion has been addressed in different contexts [3, 4, 5, 6]. Prominent probabilistic approaches [3, 4] assign pixels in multiple images taken from the same scene to a fixed number of image layers. The approach is most frequently applied to automatically remove foreground and background objects. Those models are in many aspects more general than the approach discussed here. However, they model, in contrast to our approach, data in which objects maintain a fixed position in depth relative to the other objects. 2 A Generative Model for Occlusion The occlusion model contains three important elements. The first is a set of variables which controls the presence or absence of objects in a particular image (this part will be analogous, e.g., to NMF). The second is a variable which controls the relative depths of the objects that are present. The third is the combination rule which describes how closer active objects occlude more distant ones. To model the presence or absence of an object we use H binary hidden variables s1, . . . , sH. We assume that the presence of one object is independent of the presence of the others and assume, for simplicity, equal probabilities π for objects to be present: p(⃗s | π) = QH h=1 Bernoulli(sh; π) = QH h=1 πsh (1 −π)1−sh. (1) Objects in a real image can be ordered by their depth and it is this ordering which determines which of two overlapping objects occludes the other. The depth-ordering is captured in the model by randomly and uniformly choosing a member ˆσ of the set G(|⃗s|) which contains all permutation functions ˆσ : {1, . . . , |⃗s|} →{1, . . . , |⃗s|}, with |⃗s| = P h sh. More formally, the probability of ˆσ given ⃗s is defined by: p(ˆσ |⃗s) = 1 |⃗s|! with ˆσ ∈G(|⃗s|) . (2) Note that we could have defined the order in depth independently of ⃗s, by choosing from G(H) with p(ˆσ) = 1 H!. But then, because the depth of absent objects (sh = 0) is irrelevant, no more than |⃗s|! distinct choices of ˆσ would have resulted in different images. object permutation image objects B A Figure 1: A Illustration of how two object masks and features combine to generate an image (generation without noise). B Graphical model of the generation process with hidden permutation variable ˆσ. The final stage of the generative model describes how to produce the image given a selection of active causes and an ordering in relative depth of these causes. One approach would be to choose the closest object and to set the image equal to the feature vector associated with this object. However, this would mean that every image generated from the model would comprise just one object; the closest. What is missing from this description is a notion of the extent of an object and the fact that it might only contribute to a local selection of pixels in an image. For this reason, our model contains two sets of parameters. One set of parameters, W ∈ RH×D, describes what contribution an object makes to each pixel (D is the number of pixels). The vector (Wh1, . . . , WhD) is therefore described as the mask of object h. If an object is highly localized, this vector will contain many zero elements. The other set of paramenters, T ∈ RH×C, represent the features of the objects. A feature vector ⃗Th ∈ RC describing object h might, for instance, be the object’s rgb-color (C = 3 in that case). Fig. 1A illustrates the combination of masks and features, and Fig. 1B shows the graphical model of the generation process. Let us formalize how an image is generated given the parameters Θ = (W, T) and given the hidden variables S = (⃗s, ˆσ). Before we consider observation noise, we define the generation of a noiseless 2 image ⃗T (S, Θ) to be given by: ⃗T d(S, Θ) = Whod ⃗Tho where ho = argmaxh{τ(S, h) Whd} , τ(S, h) =      0 if sh = 0 3 2 if sh = 1 and |⃗s| = 1 ˆσ(h)−1 |⃗s|−1 + 1 otherwise (3) In (3) the order in depth is represented by the mapping τ whose specific form will facilitate later algebraic steps. To illustrate the combination rule (3) and the mapping τ consider Fig. 1A and Fig. 2. Let us assume that the mask values Whd are zero or one (although we will later also allow for continuous values). As depicted in Fig. 1A an object h with sh = 1 occupies all image pixels with Whd = 1 and does not occupy pixels with Whd = 0. For all pixels with Whd = 1 the vector ⃗Th sets the pixels’ values to a specific feature, e.g., to a specific color. The function τ maps all causes h with sh = 0 to zero while all other causes are mapped to values within the interval [1, 2] (see Fig. 2). τ assigns a proximity value τ(S, h) > 0 to each present object. For a given pixel d the A B C sh h τ(S, h) τ sh h τ(S, h) τ sh h τ(S, h) τ Figure 2: Visualization of the mapping τ. A and B show the two possible mappings for two causes, and C shows one possible mapping for four causes. combination rule (3) simply states that of all objects with Whd = 1, the most proximal is used to set the pixel property. Given the latent variables and the noiseless image ⃗T (S, Θ), we take the observed variables Y = (⃗y1, . . . , ⃗yD) to be drawn independently from a Gaussian distribution (which is the usual choice for component extraction systems): p(Y | S, Θ) = QD d=1 p(⃗yd | ⃗T d(S, Θ)), p(⃗y |⃗t) = N(⃗y;⃗t, σ2 1) . (4) Equations (1) to (4) represent a generative model for occlusion. 3 Maximum Likelihood One approach to learning the parameters Θ = (W, T) of this model from data Y = {Y (n)}n=1,...,N is to use Maximum Likelihood learning, that is, Θ∗ = argmaxΘ{L(Θ)} with L(Θ) = log p(Y (1), . . . , Y (N) | Θ)  . (5) However, as there is usually a large number of objects that can potentially be present in the training images, and as the likelihood involves summing over all combinations of objects and associated orderings, the computation of (5) is typically intractable. Moreover, even if it were tractably computable, optimization of the likelihood is made problematic by an analytical intractability arising from the fact that the occlusion non-linearity is non-differentiable. The following section describes how to side-step the computational intractability within the standard Expectation Maximisation (EM) formalism for maximum likelihood learning, using a truncated expansion of sums for the sufficient statistics. Furthermore, as the M-Step of EM requires gradients to be computed, the section also describes how to side-step the analytical intractability by an approximate version of the model’s non-linearity. To find the parameters Θ∗at least approximately, we use the variational EM formalism (e.g., [7]) and introduce the free-energy function F(Θ, q) which is a function of Θ and an unknown distribution q(S(1), . . . , S(N)) over the hidden variables. F(Θ, q) is a lower bound of the likelihood L(Θ). Approximations introduced later on can be interpreted as choosing specific functions q, although (for brevity) we will not make this relation explicit. In the model described above, in which each image is drawn independently and identically, q(S(1), . . . , S(N)) = Q n qn(S(n), Θ′) which is taken to be parameterized by Θ′. The free-energy can thus be written as: F(Θ, q) = N X n=1  X S qn(S , Θ′) h log p(Y (n) | S, Θ)  + log p(S | Θ) i  + H(q) , (6) 3 where the function H(q) = −P n P S qn(S , Θ′) log(qn(S , Θ′)) (the Shannon entropy) is independent of Θ. Note that P S in (6) sums over all possible states of S = (⃗s, ˆσ), i.e., over all binary vectors and all associated permutations in depth. This is the source of the computational intractability. In the EM scheme F(Θ, q) is maximized alternately with respect to the distribution, q, in the E-step (while the parameters, Θ, are kept fixed) and with respect to parameters, Θ, in the M-step (while q is kept fixed). It can be shown that an EM iteration increases the likelihood or leaves it unchanged. In practical applications EM is found to increase the likelihood to likelihood maxima, although these can be local. M-Step. The M-Step of EM, in which the free-energy, F, is optimized with respect to the parameters, is canonically derived by taking derivatives of F with respect to the parameters. Unfortunately, this standard procedure is not directly applicable because of the non-linear nature of occlusion as reflected by the combination rule (3). However, it is possible to approximate the combination rule by the differentiable function, ⃗T ρ d(S, Θ) := PH h=1(τ(S, h) Whd)ρ Whd ⃗Th PH h=1(τ(S, h) Whd)ρ . (7) Note that for ρ →∞the function ⃗T ρd(S, Θ) is equal to the combination rule in (3). ⃗T ρd(S, Θ) is differentiable w.r.t. the parameters Whd and T c h (c ∈{1, . . . , C}) and it applies for large ρ: ∂ ∂Wid ⃗T ρd(S, Θ) ≈Aρ id(S, W) ⃗Ti, ∂ ∂T c i ⃗T ρd(S, Θ) ≈Aρ id(S, W) Wid ⃗ec, with Aρ id(S, W) := (τ(S,i) Wid)ρ PH h=1(τ(S,h) Whd)ρ , Aid(S, W) := lim ρ→∞Aρ id(S, W) , (8) where ⃗ec is a unit vector in feature space with entry 1 at position c and zero elsewhere (the approximations on the left-hand-side above become equalities for ρ →∞). We can now compute approximations to the derivatives of F(Θ, q). For large values of ρ the following holds: ∂ ∂Wid F(Θ, q) ≈ N X n=1  X S qn(S , Θ′)  ∂ ∂Wid ⃗T ρ d(S, Θ) T ⃗f  ⃗y (n), ⃗T ρ d(S, Θ)   , (9) ∂ ∂T c i F(Θ, q) ≈ N X n=1  X S qn(S , Θ′) D X d=1  ∂ ∂T c i ⃗T ρ d(S, Θ) T ⃗f  ⃗y (n), ⃗T ρ d(S, Θ)   , (10) where ⃗f(⃗y (n),⃗t ) := ∂ ∂⃗t log  p(⃗y (n) |⃗t )  = −σ−2 (⃗y (n) −⃗t ). Setting the derivatives (9) and (10) to zero and inserting equations (8) yields the following necessary conditions for a maximum of the free energy that hold in the limit ρ →∞: Wid = X n ⟨Aid(S, W)⟩qn ⃗T T i ⃗y (n) d X n ⟨Aid(S, W)⟩qn ⃗T T i ⃗Ti , ⃗Ti = X n X d ⟨Aid(S, W)⟩qn Wid ⃗y (n) d X n X d ⟨Aid(S, W)⟩qn (Wid)2 . (11) Note that equations (11) are not straight-forward update rules. However, we can use them in the fixed-point sense and approximate the parameters which appear on the right-hand-side of the equations using the values from the previous iteration. Equations (11), together with the exact posterior qn(S, Θ′) = p(S | ⃗y (n), Θ′), represent a maximumlikelihood based learning algorithm for the generative model (1) to (4). Note, however, that due to the multiplication of the weights and the mask, Whd ⃗Th in (3), there is degeneracy in the parameters: given h the combination ⃗Td remains unchanged for the operation ⃗Th →α⃗Th and Whd →Whd/α with α ̸= 0. To remove the degeneracy we set after each iteration: W new hd = Whd / W h , ⃗T new h = W h ⃗Th , where W h = X d∈I Whd with I = {d | Wid > 0.5}. (12) For reasons that will briefly be discussed later, the use of W h instead of, e.g., W max h = maxd{Whd} is advantageous for some data, although for many other types of data W max h works equally well. 4 E-Step. The crucial entities that have to be computed for update equations (11) are the sufficient statistics ⟨Aid(S, W)⟩qn, i.e., the expectation of the function Aid(S, W) in (8) over the distribution of hidden states S. In order to derive a computationally tractable learning algorithm the expectation ⟨Aid(S, W)⟩qn is re-written and approximated as follows, ⟨Aid(S, W)⟩qn = X S p(S, Y (n) | Θ′) Aid(S, W) X ˜S p( ˜S, Y (n) | Θ′) ≈ X S,(|⃗s|≤χ) p(S, Y (n) | Θ′) Aid(S, W) X ˜S,(|˜⃗s|≤χ) p( ˜S, Y (n) | Θ′) . (13) That is, in order to approximate (13), the problematic sums in the numerator and denominator have been truncated. We only sum over states ⃗s with less or equal χ non-zero entries. Approximation (13) replaces the intractable exact E-step by one whose computational cost scales only polynomially with H (roughly cubically for χ = 3). As for other approximate EM approaches, there is no guarantee that this approximation will always result in an increase of the data likelihood. For data points that were generated by a small number of causes on average we can, however, expect the approximation to match an exact E-step with increasing accuracy the closer we get to the optimum. For reasons highlighted earlier, such data will be typical in image modelling. A truncation approach similar to (13) has successfully been used in the context of the maximal causes generative model in [8]. Also in the case of occlusion we will later see that in numerical experiments using approximation (13) the true generating causes are indeed recovered. 4 Experiments In order to evaluate the algorithm it has been applied to artificial data, where its performance can be compared to ground truth, and to more realistic visual data. In all the experiments we use image pixels as input variables ⃗yd. The entries of the observed variables ⃗yd are set by the pixels’ rgb-color vector, ⃗yd ∈[0, 1]3. In all trials of all experiments the initial values of the mask parameters Whd and the feature parameters T c h were independently and uniformly drawn from the interval [0, 1]. Learning and annealing. The free-energy landscape traversed by EM algorithms is often multimodal. Therefore EM algorithms can converge to local optima. However, this problem can be alleviated using deterministic annealing as described in [9, 10]. For the model under consideration here annealing amounts to the substitutions π →πβ, (1 −π) →(1 −π)β, and (1/σ2) →(β/σ2), with β = 1/ ˆT in the E-step equations. During learning, the ‘temperature’ parameter ˆT is decreased from an initial value ˆT init to 1. To update the parameters W and T we applied the M-step equations (11). For the sufficient statistics ⟨Aid(S, W)⟩qn we used approximation (13) with Aρ id(S, W) in (8) instead of Aid(S, W) and with χ = 3 if not stated otherwise. The parameter ρ was increased during learning with ρ = 1 1−β (with a maximum of ρ = 20 to avoid numerical instabilities). In all experiments we used 100 EM iterations and decreased ˆT linearly except for 10 initial iterations at ˆT = ˆT init and 20 final iterations at ˆT = 1. In addition to annealing, a small amount of independent and identically distributed Gaussian noise (standard deviation 0.01) was added to the masks and the features, Whd and T c d, to help escape local optima. This parameter noise was linearly decreased to zero during the last 20 iterations of each trial. The colored bars test. The component extraction capabilities of the model were tested using the colored bars test. This test is a generalization of the classical bars test [11] which has become a popular benchmark task for non-linear component extraction. In the standard bars test with H = 8 bars the input data are 16-dimensional vectors, representing a 4 × 4 grid of pixels, i.e., D = 16. The single bars appear at the 4 vertical and 4 horizontal positions. For the colored bars test, the bars have colors ⃗T gen h which are independently and uniformly drawn from the rgb-color-cube [0, 1]3. Once chosen, they remain fixed for the generation of the data set. For each image a bar appears independently with a probability π = 2 8 which results in two bars per image on average (the standard value in the literature). For the bars active in an image, a ranking in depth is randomly and uniformly chosen from the permutation group. The color of each pixel is determined by the least distant bar and is black if the pixel is occupied by no bar. N = 500 images were generated for learning and Fig. 3A shows a random selection of 13 examples. The learning algorithms were applied to the colored bars test with H = 8 hidden units and D = 16 input units. The observation noise was set 5 C 100 20 40 1 A B iteration W T Figure 3: Application to the colored bars test. A Selection of 13 of the N = 500 data points used for learning. B Changes of the parameters W and T for the algorithm with H = 8 hidden units. Each row shows W and T for the specified EM iteration. C Feature vectors at the iterations in B displayed as points in color space (for visualization we used the 2-D hue and saturation plane of the HSV color space). Crosses are the real generating values, black circles the current model values ⃗Th, and grey circles those of the previous iterations. to σ = 0.05 and learning was initialized with ˆT init = 1 2D. The inferred approximate maximumlikelihood parameters converged to values close to the generating parameters in 44 of 50 trials. In 6 trials the algorithm represented 7 of the 8 causes. Its success rate, or reliability, is thus 88%. Fig. 3B shows the time-course of a typical trial during learning. As can be observed, the mask value W and the feature values T converged to values close to the generating ones. For data with added Gaussian pixel noise (σgen=σ=0.05) the algorithms converges to values representing all causes in 48 of 50 trials (96% reliability). A higher average number of causes per input reduced reliability. A maximum of three causes (on average) were used for the noiseless bars test. This is considered a difficult task in the standard bars test. With otherwise the same parameters our algorithm had a reliability of 26% (50 trials) on this data. Performance seemed limited by the difficulty of the data rather than by the limitations of the used approximation. We could not increase the reliability of the algorithm when we increased the accuracy of (13) by setting χ = 4 (instead of χ = 3). Reliability seemed much more affected by changes to parameters for annealing and parameter noise, i.e., by changes to those parameters that affect the additional mechanisms to avoid local optima. The standard bars test. Instead of choosing the bar colors randomly as above, they can also be set to specific values. In particular, if all bar colors are white, ⃗T = (1, 1, 1)T , the classical version of the bars test is recovered. Note that the learning algorithms can be applied to this standard form without modification. When the generating parameters were as above (eight bars, probability of a bar to be present 2 8, N = 500), all bars were successfully extracted in 42 of 50 trials (84% reliability). For a bars test with ten bars, D = 5 × 5, a probability of 2 10 for each bar to be present, and N = 500 data points, the algorithm with model parameters as above extracted all bars in 43 of 50 trials (86% reliability; mean number of extracted bars 9.5). Reliability for this test increased when we increased the number of training images. For N = 1000 instead of 500 reliability increased to 94% (50 trials; mean number of extracted bars 9.9). The bars test with ten bars is probably the one most frequently found in the literature. Linear and non-linear component extraction approaches are compared, e.g., in [12, 8] and usually achieve lower reliability values than the presented algorithm. Classical ICA and PCA algorithms investigated in [13] never succeeded in extracting all bars. Relatively recent approaches can achieve reliability values higher than 90% but often only by introducing additional constraints (compare R-MCA [8], or constrained forms of NMF [14]). More realistic input. One possible criticism of the bars tests above is that the bars are relatively simple objects. The purpose of this section is, therefore, to demonstrate the performance of the algorithm when images contain more complicated objects. Sized objects were taken from the COIL100 dataset [15] with relatively uniform color distribution (objects 2, 4, 47, 78, 94, 97; all with zero degree rotation). The images were scaled down to 15 × 15 pixels and randomly placed on a black background image of 25 × 25 pixels. Downscaling introduced blurred object edges and to remove this effect dark pixels were set to black. The training images were generated with each object being 6 B W T iteration A C 1 10 25 100 50 Figure 4: Application to images of cluttered objects. A Selection of 14 of the N = 500 data points. B Parameter change displayed as in Fig. 3. C Change of feature vectors displayed as in Fig. 3. present with probability 2 6 and at a random depth. N = 500 such images were generated. Example images1 are given in Fig. 4A. We applied the learning algorithm with H = 6, an initial temperature for annealing of ˆT init = 1 4D, and parameters as above otherwise. Fig. 4B shows the development of parameter values during learning. As can be observed, the mask values converged to represent the different objects, and the feature vectors converged to values representing the mean object color. Note that the model is not matched to the dataset as each object has a fixed distribution of color values which is a poor match to a Gaussian distribution with a constant color mean. The model reacted by assigning part of the real color distribution to the mask values which are responsible for the 3-dimensional appearance of the masks (see Fig. 4B). Note that the normalization (12) was motivated by this observation because it can better tolerate high mask value variances. We ran 50 trials using different sets of N = 500 images generated as above. In 42 of the trials (84%) the algorithm converged to values representing all six objects together with appropriate values for their mean colors. In seven trials the algorithm converged to a local optima (average number of extracted objects was 5.8). In 50 trials with 8 objects (we added objects 36 and 77 of the COIL-100 database) an algorithm with same parameters but H = 8 extracted all objects in 40 of the trials (reliability 80%, average number of extracted objects 7.7). 5 Discussion We have studied learning in the generative model of occlusion (1) to (4). Parameters can be optimized given a collection of N images in which different sets of causes are present at different positions in depth. As briefly discussed earlier, the problem of occlusion has been addressed by other system before. E.g., the approach in [3, 4] uses a fixed number of layers, so called sprites, to model an order in depth. The approach assigns, to each pixel, probabilities that it has been generated by a specific sprite. Typically, the algorithms are applied to data which consist of images that have a small number of foreground objects (usually one or two) on a static or slowly changing background. Typical applications of the approach are figure-ground separation and the automatic removal of the background or foreground objects. The approach using sprites is in many aspects more general than the model presented in this paper. It includes, for instance, variable estimation for illumination and, importantly, addresses the problem of invariance by modeling object transformations. Regarding the modelling of object arrangements, our approach is, however, more general. The additional hidden variable used for object arrangements allows our model to be applied to images of cluttered scenes. The approach in [3, 4] assumes a fixed object arrangement, i.e., it assumes that each object has the same depth position in all training images. Our approach therefore addresses an aspect of visual data that is complementary to the aspects modeled in [3, 4]. Models that combine the advantages of 1Note that this appears much easier for a human observer because he/she can also make use of object knowlege, e.g., of the gestalt law of proximity. The difficulty of the data would become obvious if all pixels in each image of the data set were permuted by a fixed permutation map. 7 both approaches thus promise interesting advancements, e.g., towards systems that can learn from video data in which objects change their positions in depth. Another interesting aspect of the model presented in this work is its close connection to component extraction methods. Algorithms such as SC, NMF or maximal causes analysis (MCA; [8]) use superpositions of elementary components to explain the data. ICA and SC have prominently been applied to explain neural response properties, and NMF is a popular approach to learn components for visual object recognition [e.g. 14, 16]. Our model follows these multiple-causes methods by assuming the data to consist of independently generated components. It distinguishes itself, however, by the way in which these components are assumed to combine. ICA, SC, NMF and many other models assume linear superposition, MCA uses a max-function instead of the sum, and other systems use noisy-or combinations. In the class of multiple-causes approaches our model is the first to generalize the combination rule to one that models occlusion explicitly. This required an additional variable for depth and the introduction of two sets of parameters: masks and features. Note that in the context of multiple-causes models, masks have recently been introduced in conjunction with ICA [17] in order to model local contrast correlation in image patches. For our model, the combination of masks and vectorial feature parameters allow for applications to more general sets of data than those used for classical component extraction. In numerical experiments we have used color images for instance. However, we can apply our algorithm also to grey-level data such as used for other algorithms. This allows for a direct quantitative comparison of the novel algorithm with state-of-the-art component extraction approaches. The reported results for the standard bars test show the competitiveness of our approach despite its larger set of parameters [compare, e.g., 12, 8]. A limitation of the training method used is its assumption of relatively sparsely active hidden causes. This limitation is to some extent shared, e.g., with SC or sparse versions of NMF. Experiments with higher χ values in (13) indicate, however, that the performance of the algorithm is not so much limited by the accuracy of the E-step, but rather by the more challenging likelihood landscape for less sparse data. For applications to visual data, color is the most straight-forward feature to model. Possible alternatives are, however, Gabor feature vectors which model object textures (see, e.g., [18] and references therein), SWIFT features [19], or vectors using combinations of color and texture [e.g. 6]. Depending on the choice of feature vectors and the application domain, it might be necessary to generalize the model. It is, for instance, straight-forward to introduce more complex feature vectors. Although one feature, e.g. one color, per cause can represent a suitable model for many applications, it can for other applications also make sense to use multiple feature vectors per cause. In the extreme case as many feature vectors as pixels could be used, i.e., ⃗Th →⃗Thd. The derivation of update rules for such features would proceed along the same lines as the derivations for single features ⃗Th. Furthermore, individual prior parameters for the frequency of object appearances could be introduced. Such parameters could be trained with an approach similar to the one in [8]. Additional parameters could also be introduced to model different prior probabilities for different arrangements in depth. An easy alteration would be, for instance, to always map one specific hidden unit to the most distant position in depth in order to model a background. Finally, the most interesting, but also most challenging generalization direction would be the inclusion of invariance principles. In its current form the model has, in common with state-of-the-art component extraction algorithms, the assumption that the component locations are fixed. Especially for images of objects, changes in planar component positions have to be addressed in general. Possible approaches that have been used in the literature can, for instance, be found in [3, 4] in the context of occlusion modeling, in [20] in the context of NMF, and in [18] in the context of object recognition. Potential future application domains for our approach would, however, also include data sets for which component positions are fixed. E.g., in many benchmark databases for face recognition, faces are already in a normalized position. For component extraction, faces can be regarded as combinations of a background faces ‘occluded’ by mouth, nose, and eye textures which can themselves be occluded by beards, sunglasses, or hats. In summary, the studied occlusion model advances generative modeling approaches to visual data by explicitly modeling object arrangements in depth. The approach complements established approaches of occlusion modeling in the literature by generalizing standard approaches to multiplecauses component extraction. Acknowledgements. We gratefully acknowledge funding by the German Federal Ministry of Education and Research (BMBF) in the project 01GQ0840 (Bernstein Focus Neurotechnology Frankfurt), the Gatsby Charitable Foundation, and the Honda Research Institute Europe GmbH. 8 References [1] B. A. Olshausen and D. J. Field. Emergence of simple-cell receptive field properties by learning a sparse code for natural images. Nature, 381:607 – 609, 1996. [2] D. D. Lee and H. S. Seung. Learning the parts of objects by non-negative matrix factorization. Nature, 401(6755):788–91, 1999. [3] N. Jojic and B. Frey. Learning flexible sprites in video layers. Conf. on Computer Vision and Pattern Recognition, 1:199–206, 2001. [4] C. K. I. Williams and M. K. Titsias. Greedy learning of multiple objects in images using robust statistics and factorial learning. Neural Computation, 16(5):1039–1062, 2004. [5] K. Fukushima. Restoring partly occluded patterns: a neural network model. Neural Networks, 18(1):33–43, 2005. [6] C. Eckes, J. Triesch, and C. von der Malsburg. Analysis of cluttered scenes using an elastic matching approach for stereo images. Neural Computation, 18(6):1441–1471, 2006. [7] R. M. Neal and G. E. Hinton. A view of the EM algorithm that justifies incremental, sparse, and other variants. In M. I. Jordan, editor, Learning in Graphical Models. Kluwer, 1998. [8] J. L¨ucke and M. Sahani. Maximal causes for non-linear component extraction. Journal of Machine Learning Research, 9:1227 – 1267, 2008. [9] N. Ueda and R. Nakano. Deterministic annealing EM algorithm. Neural Networks, 11(2):271– 282, 1998. [10] M. Sahani. Latent variable models for neural data analysis, 1999. PhD Thesis, Caltech. [11] P. F¨oldi´ak. Forming sparse representations by local anti-Hebbian learning. Biol Cybern, 64:165 – 170, 1990. [12] M. W. Spratling. Learning image components for object recognition. Journal of Machine Learning Research, 7:793 – 815, 2006. [13] S. Hochreiter and J. Schmidhuber. Feature extraction through LOCOCODE. Neural Computation, 11:679 – 714, 1999. [14] P. O. Hoyer. Non-negative matrix factorization with sparseness constraints. Journal of Machine Learning Research, 5:1457–1469, 2004. [15] S. A. Nene, S. K. Nayar, and H. Murase. Columbia object image library (COIL-100). Technical report, cucs-006-96, 1996. [16] H. Wersing and E. K¨orner. Learning optimized features for hierarchical models of invariant object recognition. Neural Computation, 15(7):1559–1588, 2003. [17] U. K¨oster, J. T. Lindgren, M. Gutmann, and A. Hyv¨arinen. Learning natural image structure with a horizontal product model. In Int. Conf. on Independent Component Analysis and Signal Separation (ICA), pages 507–514, 2009. [18] P. Wolfrum, C. Wolff, J. L¨ucke, and C. von der Malsburg. A recurrent dynamic model for correspondence-based face recognition. Journal of Vision, 8(7):1–18, 2008. [19] D. G. Lowe. Distinctive image features from scale-invariant keypoints. International Journal of Computer Vision, 60(2):91–110, 2004. [20] J. Eggert, H. Wersing, and E. K¨orner. Transformation-invariant representation and NMF. In Int. J. Conf. on Neural Networks (IJCNN), pages 2535–2539, 2004. 9
2009
209
3,714
Non-stationary continuous dynamic Bayesian networks Marco Grzegorczyk Department of Statistics, TU Dortmund University, 44221 Dortmund, Germany grzegorczyk@statistik.tu-dortmund.de Dirk Husmeier Biomathematics & Statistics Scotland (BioSS) JCMB, The King’s Buildings, Edinburgh EH93JZ, United Kingdom dirk@bioss.ac.uk Abstract Dynamic Bayesian networks have been applied widely to reconstruct the structure of regulatory processes from time series data. The standard approach is based on the assumption of a homogeneous Markov chain, which is not valid in many realworld scenarios. Recent research efforts addressing this shortcoming have considered undirected graphs, directed graphs for discretized data, or over-flexible models that lack any information sharing among time series segments. In the present article, we propose a non-stationary dynamic Bayesian network for continuous data, in which parameters are allowed to vary among segments, and in which a common network structure provides essential information sharing across segments. Our model is based on a Bayesian multiple change-point process, where the number and location of the change-points is sampled from the posterior distribution. 1 Introduction There has recently been considerable interest in structure learning of Bayesian networks. Examples from the topical field of systems biology are the reconstruction of transcriptional regulatory networks from gene expression data [1], the inference of signal transduction pathways from protein concentrations [2], and the identification of neural information flow operating in the brains of songbirds [3]. In particular, dynamic Bayesian networks (DBNs) have been applied, as they allow feedback loops and recurrent regulatory structures to be modelled while avoiding the ambiguity about edge directions common to static Bayesian networks. The standard assumption underpinning DBNs is that of stationarity: time-series data are assumed to have been generated from a homogeneous Markov process. However, regulatory interactions and signal transduction processes in the cell are usually adaptive and change in response to external stimuli. Likewise, neural information flow slowly adapts via Hebbian learning to make the processing of sensory information more efficient. The assumption of stationarity is therefore too restrictive in many circumstances, and can potentially lead to erroneous conclusions. In the recent past, various research efforts have addressed this issue and proposed models that relax the stationarity assumption. Talih and Hengartner [4] proposed a time-varying Gaussian graphical model (GGM), in which the time-varying variance structure of the data was inferred with reversible jump (RJ) Markov chain Monte Carlo (MCMC). A limitation of this approach is that changes of the network structure between different segments are restricted to changing at most a single edge, and the total number of segments is assumed known a priori. Xuan and Murphy [5] developed a related non-stationary GGM based on a product partition model. The method allows for separate structures 1 Proposed Robinson & L`ebre Grzegorcyk Ko et al. here Hartemink (2009) (2008) et al. (2008) (2007) Score Marginal Marginal Marginal Marginal BIC Likelihood Likelihood Likelihood Likelihood Changenode whole node whole node points specific network specific network specific Structure Yes No No Yes Yes constant Data format Continuous Discrete Continuous Continuous Continuous Latent Change-point Change-point Change-point Free Free variables process process process allocation allocation Table 1: Overview of how our model compares with various related, recently published models. in different segments, where the number of structures is inferred from the data. The inference algorithm iterates between a convex optimization for determining the graph structure and a dynamic programming algorithm for calculating the segmentation. The latter aspect imposes restrictions on the graph structure (decomposability), though. Moreover, both the models of [4] and [5] are based on undirected graphs, whereas most processes in systems biology, like neural information flow, signal transduction and transcriptional regulation, are intrinsically of a directed nature. To address this shortcoming, Robinson and Hartemink [6] and L´ebre [7] proposed a non-stationary dynamic Bayesian network. Both methods allow for different network structures in different segments of the time series, where the location of the change-points and the total number of segments are inferred from the data with RJMCMC. The essential difference between the two methods is that the model proposed in [6] is a non-stationary version of the BDe score [8], which requires the data to be discretized. The method proposed in [7] is based on the Bayesian linear regression model of [9], which avoids the need for data discretization. Allowing the network structure to change between segments leads to a highly flexible model. However, this approach faces a conceptual and a practical problem. The practical problem is potential model over-flexibility1. Owing to the high costs of postgenomic high-throughput experiments, time series in systems biology are typically rather short. Modelling short time series segments with separate network structures will almost inevitably lead to inflated inference uncertainty, which calls for some information sharing between the segments. The conceptual problem is related to the very premise of a flexible network structure. This assumption is reasonable for some scenarios, like morphogenesis, where the different segments are e.g. associated with the embryonic, larval, pupal, and adult stages of fruit fly (as discussed in [6]). However, for most cellular processes on a shorter time scale, it is questionable whether it is the structure rather than just the strength of the regulatory interactions that changes with time. To use the analogy of the traffic flow network invoked in [6]: it is not the road system (the network structure) that changes between off-peak and rush hours, but the intensity of the traffic flow (the strength of the interactions). In the same vein, it is not the ability of a transcription factor to potentially bind to the promoter of a gene and thereby initiate transcription (the interaction structure), but the extent to which this happens (the interaction strength). The objective of the present work is to propose and assess a non-stationary continuous-valued DBN that introduces information sharing among different time series segments via a constrained structure. Our model is non-stationary with respect to the parameters, while the network structure is kept fixed among segments. Our model complements the one proposed in [6] in two other aspects: the score is a non-stationary generalization of the BGe [10] rather than the BDe score, thus avoiding the need for data discretization, and the patterns of non-stationarity are node-specific, thereby providing extra model flexibility. Our work is based on [11], [12], and [13]. Like [11], our model is effectively a mixture of BGe models. We replace the free allocation model of [11] by a change-point process to incorporate our prior notion that adjacent time points in a time series are likely to be governed by similar distributions. We borrow from [12] the concept of node-specific change-points to enable greater model flexibility. However, as opposed to [12], we do not approximate the scoring function by BIC [14], but compute the proper marginal likelihood. The objective of inference is to infer the 1Note that as opposed to [7], [6] partially addresses this issue via a prior distribution that discourages changes in the network structure. 2 location and the node-specific number of change-points from the posterior distribution. An overview of how our method is related to various recently published related models is provided in Table 1. 2 Methodology 2.1 The dynamic BGe network DBNs are flexible models for representing probabilistic relationships between interacting variables (nodes) X1, . . . , XN via a directed graph G. An edge pointing from Xi to Xj indicates that the realization of Xj at time point t, symbolically: Xj(t), is conditionally dependent on the realization of Xi at time point t−1, symbolically: Xi(t−1). The parent node set of node Xn in G, πn = πn(G), is the set of all nodes from which an edge points to node Xn in G. Given a data set D, where Dn,t and D(πn,t) are the tth realizations Xn(t) and πn(t) of Xn and πn, respectively, and 1 ≤t ≤m represents time, DBNs are based on the following homogeneous Markov chain expansion: P(D|G, θ) = N Y n=1 m Y t=2 P  Xn(t) = Dn,t|πn(t −1) = D(πn,t−1), θn  (1) where θ is the total parameter vector, composed of node-specific subvectors θn, which specify the local conditional distributions in the factorization. From Eq. (1) and under the assumption of parameter independence, P(θ|G) = Q n P(θn|G), the marginal likelihood is given by P(D|G) = Z P(D|G, θ)P(θ|G)dθ = N Y n=1 Ψ(Dπn n , G) (2) Ψ(Dπn n , G) = Z m Y t=2 P  Xn(t) = Dn,t|πn(t −1) = D(πn,t−1), θn  P(θn|G)dθn (3) where Dπn n := {(Dn,t, Dπn,t−1) : 2 ≤t ≤m} is the subset of data pertaining to node Xn and parent set πn. We choose a linear Gaussian distribution for the local conditional distribution P(Xn|πn, θn) in Eq.(1). Under fairly weak regularity conditions discussed in [10] (parameter modularity and conjugacy of the prior2), the integral in Eq. (3) has a closed form solution, given by Eq. (24) in [10]. The resulting expression is called the BGe score3. 2.2 The non-stationary dynamic change-point BGe model (cpBGe) To obtain a non-stationary DBN, we generalize Eq. (1) with a node-specific mixture model: P(D|G, V, K, θ) = N Y n=1 m Y t=2 Kn Y k=1 P  Xn(t) = Dn,t|πn(t −1) = D(πn,t−1), θk n δVn(t),k (4) where δVn(t),k is the Kronecker delta, V is a matrix of latent variables Vn(t), Vn(t) = k indicates that the realization of node Xn at time t, Xn(t), has been generated by the kth component of a mixture with Kn components, and K = (K1, . . . , Kn). Note that the matrix V divides the data into several disjoined subsets, each of which can be regarded as pertaining to a separate BGe model with parameters θk n. The vectors Vn are node-specific, i.e. different nodes can have different breakpoints. The probability model defined in Eq.(4) is effectively a mixture model with local probability distributions P(Xn|πn, θk n) and it can hence, under a free allocation of the latent variables, approximate any probability distribution arbitrarily closely. In the present work, we change the assignment of data points to mixture components from a free allocation to a change-point process. This effectively reduces the complexity of the latent variable space and incorporates our prior belief that, in a 2The conjugate prior is a normal-Wishart distribution. For the present study, we chose the hyperparameters of this distribution maximally uninformative subject to the regularity conditions discussed in [10]. 3The score equivalence aspect of the BGe model is not required for DBNs, because edge reversals are not permissible. However, formulating our method in terms of the BGe score is advantageous when adapting the proposed framework to non-linear static Bayesian networks along the lines of [12]. 3 time series, adjacent time points are likely to be assigned to the same component. From Eq. (4), the marginal likelihood conditional on the latent variables V is given by P(D|G, V, K)= Z P(D|G, V, K, θ)P(θ)dθ = N Y n=1 Kn Y k=1 Ψ(Dπn n [k, Vn], G) (5) Ψ(Dπn n [k, Vn], G)= Z m Y t=2 P  Xn(t) = Dn,t|πn(t −1) = D(πn,t−1), θk n δVn(t),kP(θk n|G)dθk n(6) Eq. (6) is similar to Eq. (3), except that it is restricted to the subset Dπn n [k, Vn] := {(Dn,t, Dπn,t−1) : Vn(t) = k, 2 ≤t ≤m}. Hence when the regularity conditions defined in [10] are satisfied, then the expression in Eq.(6) has a closed-form solution: it is given by Eq. (24) in [10] restricted to the subset of the data that has been assigned to the kth mixture component (or kth segment). The joint probability distribution of the proposed cpBGe model is given by: P(G, V, K, D) = P(D|G, V, K) · P(G) · P(V|K) · P(K) = P(G) · N Y n=1 ( {P(Vn|Kn) · P(Kn) · Kn Y k=1 Ψ(Dπn n [k, Vn], G) ) (7) In the absence of genuine prior knowledge about the regulatory network structure, we assume for P(G) a uniform distribution on graphs, subject to a fan-in restriction of |πn| ≤3. As prior probability distributions on the node-specific numbers of mixture components Kn, P(Kn), we take iid truncated Poisson distributions with shape parameter λ = 1, restricted to 1 ≤Kn ≤KMAX (we set KMAX = 10 in our simulations). The prior distribution on the latent variable vectors, P(V|K) = QN n=1{P(Vn|Kn), is implicitly defined via the change-point process as follows. We identify Kn with Kn −1 change-points bn = {bn,1, . . . , bn,Kn−1} on the continuous interval [2, m]. For notational convenience we introduce the pseudo change-points bn,0 = 2 and bn,Kn = m. For node Xn the observation at time point t is assigned to the kth component, symbolically Vn(t) = k, if bn,k−1 ≤t < bn,k. Following [15] we assume that the change-points are distributed as the evennumbered order statistics of L := 2(Kn −1) + 1 points u1, . . . , uL uniformly and independently distributed on the interval [2, m]. The motivation for this prior, instead of taking Kn uniformly distributed points, is to encourage a priori an equal spacing between the change-points, i.e. to discourage mixture components (i.e. segments) that contain only a few observations. The evennumbered order statistics prior on the change-point locations bn induces a prior distribution on the node-specific allocation vectors Vn. Deriving a closed-form expression is involved. However, the MCMC scheme we discuss in the next section does not sample Vn directly, but is based on local modifications of Vn based on birth, death and reallocation moves. All that is required for the acceptance probabilities of these moves are P(Vn|Kn) ratios, which are straightforward to compute. 2.3 MCMC inference We now describe an MCMC algorithm to obtain a sample {Gi, Vi, Ki}i=1,...,I from the posterior distribution P(G, V, K|D) ∝P(G, V, K, D) of Eq. (7). We combine the structure MCMC algorithm4 [17, 18] with the change-point model used in [15], and draw on the fact that conditional on the allocation vectors V, the model parameters can be integrated out to obtain the marginal likelihood terms Ψ(Dπn n [k, Vn], G) in closed form, as shown in the previous section. Note that this approach is equivalent to the idea underlying the allocation sampler proposed in [13]. The resulting algorithm is effectively an RJMCMC scheme [15] in the discrete space of network structures and latent allocation vectors, where the Jacobian in the acceptance criterion is always 1 and can be omitted. With probability pG = 0.5 we perform a structure MCMC move on the current graph Gi and leave the latent variable matrix and the numbers of mixture components unchanged, symbolically: Vi+1 = Vi and Ki+1 = Ki. A new candidate graph Gi+1 is randomly drawn out of the set of graphs N(Gi) that can be reached from the current graph Gi by deletion or addition of a single edge. The proposed graph Gi+1 is accepted with probability: A(Gi+1|Gi) = min  1, P(D|Gi+1, Vi, Ki) P(D|Gi, Vi, Ki) P(Gi+1) P(Gi) |N(Gi)| |N(Gi+1)|  (8) 4An MCMC algorithm based on Eq.(10) in [16] is computationally less efficient than when applied to static Bayesian networks or stationary DBNs, since the local scores would have to be re-computed every time the positions of the change-points change. 4 (a) (b) (c) jnk pip3 raf pkc p38 akt mek pka pip2 plcg erk (d) Figure 1: Networks from which synthetic data were generated. Panels (a-c) show elementary network motifs [20]. Panel (d) shows a protein signal transduction network studied in [2], with an added feedback loop on the root node. where |.| is the cardinality, and the marginal likelihood terms have been specified in Eq. (5). The graph is left unchanged, symbolically Gi+1 := Gi, if the move is not accepted. With the complementary probability 1 −pG we leave the graph Gi unchanged and perform a move on (Vi, Ki), where Vi n is the latent variable vector of Xn in Vi, and Ki = (Ki 1, . . . , Ki N). We randomly select a node Xn and change its current number of components Ki n via a change-point birth or death move, or its latent variable vector Vi n by a change-point re-allocation move. The change-point birth (death) move increases (decreases) Ki n by 1 and may also have an effect on Vi n. The change-point reallocation move leaves Ki n unchanged and may have an effect on Vi n. Under fairly mild regularity conditions (ergodicity), the MCMC sampling scheme converges to the desired posterior distribution if the acceptance probabilities for the three change-point moves (Ki n, Vi n) → (Ki+1 n , Vi+1 n ) are chosen of the form min(1, R), see [15], with R = QKi+1 n k=1 Ψ(Dπn n [k, Vi+1 n ], G) QKi n k=1 Ψ(Dπn n [k, Vin], G) × A × B (9) where A = P(Vi+1 n |Ki+1 n )P(Ki+1 n )/P(Vi n|Ki n)P(Ki n) is the prior probability ratio, and B is the inverse proposal probability ratio. The exact form of these factors depends on the move type and is provided in the supplementary material. We note that the implementation of the dynamic programming scheme proposed in [19] has the prospect to improve the convergence and mixing of the Markov chain, which we will investigate in our future work. 3 Results on synthetic data To assess the performance of the proposed model, we applied it to a set of synthetic data generated from different networks, as shown in Figure 1. The structures in Figure panels 1a-c constitute elementary network motifs, as studied e.g. in [20]. The network in Figure 1d was extracted from the systems biology literature [2] and represents a well-studied protein signal transduction pathway. We added an extra feedback loop on the root node to allow the generation of a Markov chain with non-zero autocorrelation; note that this modification is not biologically implausible [21]. We generated data with a mixture of piece-wise linear processes and sinusoidal transfer functions. The advantage of the first approach is the exact knowledge of the true process change-points; the second approach is more realistic (smooth function) with a stronger mismatch between model and data-generation mechanism. For example, the network in Figure 1c was modelled as X(t + 1) = φX(t); Y (t + 1) = φY (t); W(t + 1) = W(t) + 2π m + cW · φW (t) Z(t + 1) = cX · X(t) + cY · Y (t) + ·sin(W(t)) + cZ · φZ(t + 1) (10) where the φ.(.) are iid standard Normally distributed. We employed different values cX = cY ∈ {0.25, 0.5} and cZ, cW ∈{0.25, 0.5, 1} to vary the signal-to-noise ratio and the amount of autocorrelation in W. For each parameter configuration, 25 time series with 41 time points where independently generated. For the other networks, data were generated in a similar way. Owing to space restrictions, the complete model specifications have to be relegated to the supplementary material. 5 0.4 0.6 0.8 1 0.4 0.6 0.8 1 Grz. et al. Ko et al. BGe BDe ref. line (a) 0.4 0.6 0.8 1 0.4 0.6 0.8 1 (b) 0.4 0.6 0.8 1 0.4 0.6 0.8 1 (c) 0.4 0.6 0.8 1 0.4 0.6 0.8 1 (d) cpBGe vs. . . . (a) (b) (c) (d) . . . vs. Grz. et al. 0.753 <0.0001 <0.0001 0.013 . . . vs. Ko et al. <0.0001 0.074 <0.0001 0.002 . . . vs. BGe <0.0001 <0.0001 <0.0001 0.060 . . . vs. BDe <0.0001 <0.0001 <0.0001 <0.0001 Figure 2: Comparison of AUC scores on the synthetic data. The panels (a-d) correspond to those of Figure 1. The horizontal axis in each panel represents the proposed cpBGe model. The vertical axis represents the following competing models: BDe (△), BGe (⊔), the method of Ko et al. [12] (⃝), and the method of Grzegorczyk et al. [11] (⋆), adapted as described in the text. Different symbols of the same shape correspond to different signal-to-noise ratios (SNR) and autocorrelation times (ACT). Each symbol shows a comparison of two average AUC scores, averaged over 25 (panels ac) or 5 (panel d) time series independently generated for a given SNR/ACT setting. The diagonal line indicates equal performance; symbols below this lines indicate that the proposed cpBGe model outperforms the competing model. The table in the bottom shows an overview of the corresponding p-values obtained from a two-sided paired t-test with Bonferroni correction. For all but three cases the cpBGe model outperforms the competing model at the standard 5% significance level. To each data set, we applied the proposed cpBGe model as described in Section 2. We compared its performance with four alternative schemes. We chose the classical stationary DBNs based on BDe [8] and BGe [10]. Note that for these models the parameters can be integrated out analytically, and only the network structure has to be learned. The latter was sampled from the posterior distribution with structure MCMC [17, 18]. Note that the BDe model requires discretized data, which we effected with the information bottleneck algorithm [22]. Our comparative evaluation also included two non-linear/non-stationary models with a clearly defined network structure (for the sake of comparability with our approach). We chose the method of Ko et al. [12] for its flexibility and comparative ease of implementation. The inference scheme is based on the application of the EM algorithm [23] to a node-specific mixture model subject to a BIC penalty term [14]. We implemented this algorithm according to the authors’ specification in MATLAB c⃝, using the software package NETLAB [24]. We also compared our model with the approach proposed by Grzegorczyk et al. [11]. We applied the software available from the authors’ website. We replaced the authors’ free allocation model by the change-point process used for our model. This was motivated by the fact that for a fair comparison, the same prior knowledge about the data structure (time series) should be used. In all other aspects we applied the method as described in [11]. All MCMC simulations were divided into a burn-in and a sampling phase, where the length of the burn-in phase was chosen such that standard convergence criteria based on potential scale reduction factors [25] were met. The software implementations of all methods used in our study are available upon request. For lack of space, further details have to be relegated to the supplementary material. To assess the network reconstruction accuracy, various criteria have been proposed in the literature. In the present study, we chose receiver-operator-characteristic (ROC) curves computed from the marginal posterior probabilities of the edges (and the ranking thereby induced). Owing to the large number of simulations – for each network and parameter setting the simulations were repeated on 25 (Figures 2a-c) or 5 (Figures 2d) independently generated time series – we summarized the performance by the area under the curve (AUC), ranging between 0.5 (expected random predictor) to 1.0 (perfect predictor). The results are shown in Figure 2 and suggest that the proposed cpBGe model tends to significantly outperform the competing models. A more detailed analysis with an 6 0 10 20 30 40 0 0.3 0.6 0 10 20 30 40 0 0.3 0.6 0 10 20 30 40 0 0.3 0.6 20 5 40 5 20 40 5 20 40 5 20 40 Figure 3: Results on the Arabidopsis gene expression time series. Top panels: Average posterior probability of a change-point (vertical axis) at a specific transition time plotted against the transition time (horizontal axis) for two selected circadian genes (left: LHY, centre: TOC1) and averaged over all 9 genes (right). The vertical dotted lines indicate the boundaries of the time series segments, which are related to different entrainment conditions and time intervals. Bottom left and centre panels: Co-allocation matrices for the two selected genes LHY and TOC1. The axes represent time. The grey shading indicates the posterior probability of two time points being assigned to the same mixture component, ranging from 0 (black) to 1 (white). Bottom right panel: Predicted regulatory network of nine circadian genes in Arabidopsis thaliana. Empty circles represent morning genes. Shaded circles represent evening genes. Edges indicate predicted interactions with a marginal posterior probability greater than 0.5. investigation of how the signal-to-noise ratio and the autocorrelation parameters effect the relative performance of the methods has to be relegated to the supplementary material for lack of space. 4 Results on Arabidopsis gene expression time series We have applied our method to microarray gene expression time series related to the study of circadian regulation in plants. Arabidopsis thaliana seedlings, grown under artificially controlled Tehour-light/Te-hour-dark cycles, were transferred to constant light and harvested at 13 time points in τ-hour intervals. From these seedlings, RNA was extracted and assayed on Affymetrix GeneChip oligonucleotide arrays. The data were background-corrected and normalized according to standard procedures5, using the GeneSpring c⃝software (Agilent Technologies). We combined four time series, which differed with respect to the pre-experiment entrainment condition and the time intervals: Te ∈{10h, 12h, 14h}, and τ ∈{2h, 4h}. The data, with detailed information about the experimental protocols, can be obtained from [27], [11], and [28]. We focused our analysis on 9 circadian genes6 (i.e. genes involved in circadian regulation). We combined all four time series into a single set. The objective was to test whether the proposed cpBGe model would detect the different experimental phases. Since the gene expression values at the first time point of a time series segment have no relation with the expression values at the last time point of the preceding segment, the corresponding boundary time points were appropriately removed from the data7. This ensures that for all pairs of consecutive time points a proper conditional dependence relation determined by the nature of the regulatory cellular processes is given. The top panel of Figure 3 shows the marginal posterior 5We used RMA rather than GCRMA for reasons discussed in [26]. 6These 9 circadian genes are LHY, TOC1, CCA1, ELF4, ELF3, GI, PRR9, PRR5, and PRR3. 7A proper mathematical treatment is given in Section 3 of the supplementary material. 7 probability of a change-point for two selected genes (LHY and TOC1), and averaged over all genes. It is seen that the three concatenation points are clearly detected. There is a slight difference between the heights of the posterior probability peaks for LHY and TOC1. This behaviour is also captured by the co-allocation matrices in the bottom row of Figure 3. This deviation indicates that the two genes are effected by the changing experimental conditions (entrainment, time interval) in different ways and thus provides a useful tool for further exploratory analysis. The bottom right panel of Figure 3 shows the gene interaction network that is predicted when keeping all edges with marginal posterior probability above 0.5. There are two groups of genes. Empty circles in the figure represent morning genes (i.e. genes whose expression peaks in the morning), shaded circles represent evening genes (i.e. genes whose expression peaks in the evening). There are several directed edges pointing from the group of morning genes to the evening genes, mostly originating from gene CCA1. This result is consistent with the findings in [29], where the morning genes were found to activate the evening genes, with CCA1 being a central regulator. Our reconstructed network also contains edges pointing into the opposite direction, from the evening genes back to the morning genes. This finding is also consistent with [29], where the evening genes were found to inhibit the morning genes via a negative feedback loop. In the reconstructed network, the connectivity within the group of evening genes is sparser than within the group of morning genes. This finding is consistent with the fact that following the light-dark cycle entrainment, the experiments were carried out in constant-light condition, resulting in a higher activity of the morning genes overall. Within the group of evening genes, the reconstructed network contains an edge between GI and TOC1. This interaction has been confirmed in [30]. Hence while a proper evaluation of the reconstruction accuracy is currently unfeasible – like [6] and many related studies, we lack a gold-standard owing to the unknown nature of the true interaction network – our study suggests that the essential features of the reconstructed network are biologically plausible and consistent with the literature. 5 Discussion We have proposed a continuous-valued non-stationary dynamic Bayesian network, which constitutes a non-stationary generalization of the BGe model. This complements the work of [6], where a non-stationary BDe model was proposed. We have argued that a flexible network structure can lead to practical and conceptual problems, and we therefore only allow the parameters to vary with time. We have presented a comparative evaluation of the network reconstruction accuracy on synthetic data. Note that such a study is missing from recent related studies on this topic, like [6] and [7], presumably because their overall network structure is not properly defined. Our findings suggest that the proposed non-stationary BGe model achieves a clear performance improvement over the classical stationary models BDe and BGe as well as over the non-linear/non-stationary models of [12] and [11]. The application of our model to gene expression time series from circadian clock-regulated genes in Arabidopsis thaliana has led to a plausible data segmentation, and the reconstructed network shows features that are consistent with the biological literature. The proposed model is based on a multiple change-point process. This scheme provides the approximation of a non-linear regulation process by a piecewise linear process under the assumption that the temporal processes are sufficiently smooth. A straightforward modification would be the replacement of the change-point process by the allocation model of [13] and [11]. This modification would result in a fully-flexible mixture model, which is preferable if the smoothness assumption for the temporal processes is violated. It would also provide a non-linear Bayesian network for static rather than time series data. While the algorithmic implementation is straightforward, the increased complexity of the latent variable configuration space would introduce additional challenges for the mixing and convergence properties of the MCMC sampler. The development of more effective proposal moves, as well as a comparison with alternative non-linear Bayesian network models, like [31], is a promising subject for future research. Acknowledgements Marco Grzegorczyk is supported by the Graduate School “Statistische Modellbildung” of the Department of Statistics, University of Dortmund. Dirk Husmeier is supported by the Scottish Government Rural and Environment Research and Analysis Directorate (RERAD). 8 References [1] N. Friedman, M. Linial, I. Nachman, and D. Pe’er. Using Bayesian networks to analyze expression data. Journal of Computational Biology, 7:601–620, 2000. [2] K. Sachs, O. Perez, D. Pe’er, D. A. Lauffenburger, and G. P. Nolan. Protein-signaling networks derived from multiparameter single-cell data. Science, 308:523–529, 2005. [3] V. A. Smith, J. Yu, T. V. Smulders, A. J. Hartemink, and E. D. Jarvi. Computational inference of neural information flow networks. PLoS Computational Biology, 2:1436–1449, 2006. [4] M. Talih and N. Hengartner. Structural learning with time-varying components: Tracking the crosssection of financial time series. Journal of the Royal Statistical Society B, 67(3):321–341, 2005. [5] X. Xuan and K. Murphy. Modeling changing dependency structure in multivariate time series. In Zoubin Ghahramani, editor, Proceedings of the 24th Annual International Conference on Machine Learning (ICML 2007), pages 1055–1062. Omnipress, 2007. [6] J. W. Robinson and A. J. Hartemink. Non-stationary dynamic Bayesian networks. In D. Koller, D. Schuurmans, Y. Bengio, and L. Bottou, editors, Advances in Neural Information Processing Systems 21, pages 1369–1376. Morgan Kaufmann Publishers, 2009. [7] S. L`ebre. Analyse de processus stochastiques pour la g´enomique : ´etude du mod`ele MTD et inf´erence de r´eseaux bay´esiens dynamiques. PhD thesis, Universit´e d‘Evry-Val-d‘Essonne, 2008. [8] D. Heckerman, D. Geiger, and D. M. Chickering. Learning Bayesian networks: The combination of knowledge and statistical data. Machine Learning, 20:245–274, 1995. [9] C. Andrieu and A. Doucet. Joint Bayesian model selection and estimation of noisy sinusoids via reversible jump MCMC. IEEE Transactions on Signal Processing, 47(10):2667–2676, 1999. [10] D. Geiger and D. Heckerman. Learning Gaussian networks. In Proceedings of the Tenth Conference on Uncertainty in Artificial Intelligence, pages 235–243, San Francisco, CA., 1994. Morgan Kaufmann. [11] M. Grzegorczyk, D. Husmeier, K. Edwards, P. Ghazal, and A. Millar. Modelling non-stationary gene regulatory processes with a non-homogeneous Bayesian network and the allocation sampler. Bioinformatics, 24(18):2071–2078, 2008. [12] Y. Ko, C. Zhai, and S.L. Rodriguez-Zas. Inference of gene pathways using Gaussian mixture models. In BIBM International Conference on Bioinformatics and Biomedicine, pages 362–367. Fremont, CA, 2007. [13] A. Nobile and A.T. Fearnside. Bayesian finite mixtures with an unknown number of components: The allocation sampler. Statistics and Computing, 17(2):147–162, 2007. [14] G. Schwarz. Estimating the dimension of a model. Annals of Statistics, 6:461–464, 1978. [15] P. Green. Reversible jump Markov chain Monte Carlo computation and Bayesian model determination. Biometrika, 82:711–732, 1995. [16] N. Friedman and D. Koller. Being Bayesian about network structure. Machine Learning, 50:95–126, 2003. [17] P. Giudici and R. Castelo. Improving Markov chain Monte Carlo model search for data mining. Machine Learning, 50:127–158, 2003. [18] D. Madigan and J. York. Bayesian graphical models for discrete data. International Statistical Review, 63:215–232, 1995. [19] P. Fearnhead. Exact and efficient Bayesian inference for multiple changepoint problems. Statistics and Computing, 16:203–213, 2006. [20] S. S. Shen-Orr, R. Milo, S. Mangan, and U. Alon. Network motifs in the transcriptional regulation network of Escherichia coli. Nature Genetics, 31:64–68, 2002. [21] M. K. Dougherty, J. Muller, D. A. Ritt, M. Zhou, X. Z. Zhou, T. D. Copeland, T. P. Conrads, T. D. Veenstra, K. P. Lu, and D. K. Morrison. Regulation of Raf-1 by direct feedback phosphorylation. Molecular Cell, 17:215–224, 2005. [22] A. J. Hartemink. Principled Computational Methods for the Validation and Discovery of Genetic Regulatory Networks. PhD thesis, MIT, 2001. [23] 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, B39(1):1–38, 1977. [24] I. T. Nabney. NETLAB: Algorithms for Pattern Recognition. Springer Verlag, New York, 2004. [25] A. Gelman and D. B. Rubin. Inference from iterative simulation using multiple sequences. Statistical Science, 7:457–472, 1992. [26] W.K. Lim, K. Wang, C. Lefebvre, and A. Califano. Comparative analysis of microarray normalization procedures: effects on reverse engineering gene networks. Bioinformatics, 23(13):i282–i288, 2007. [27] K. D. Edwards, P. E. Anderson, A. Hall, N. S. Salathia, J. C.W. Locke, J. R. Lynn, M. Straume, J. Q. Smith, and A. J. Millar. Flowering locus C mediates natural variation in the high-temperature response of the Arabidopsis circadian clock. The Plant Cell, 18:639–650, 2006. [28] T.C. Mockler, T.P. Michael, H.D. Priest, R. Shen, C.M. Sullivan, S.A. Givan, C. McEntee, S.A. Kay, and J. Chory. The diurnal project: Diurnal and circadian expression profiling, model-based pattern matching and promoter analysis. Cold Spring Harbor Symposia on Quantitative Biology, 72:353–363, 2007. [29] C. R. McClung. Plant circadian rhythms. Plant Cell, 18:792–803, 2006. [30] J.C.W. Locke, M.M. Southern, L. Kozma-Bognar, V. Hibberd, P.E. Brown, M.S. Turner, and A.J. Millar. Extension of a genetic network model by iterative experimentation and mathematical analysis. Molecular Systems Biology, 1:(online), 2005. [31] S. Imoto, S. Kim, T. Goto, , S. Aburatani, K. Tashiro, Satoru Kuhara, and Satoru Miyano. Bayesian networks and nonparametric heteroscedastic regression for nonlinear modeling of genetic networks. Journal of Bioinformatics and Computational Biology, 1(2):231–252, 2003. 9
2009
21
3,715
Distribution-Calibrated Hierarchical Classification Ofer Dekel Microsoft Research One Microsoft Way, Redmond, WA 98052, USA oferd@microsoft.com Abstract While many advances have already been made in hierarchical classification learning, we take a step back and examine how a hierarchical classification problem should be formally defined. We pay particular attention to the fact that many arbitrary decisions go into the design of the label taxonomy that is given with the training data. Moreover, many hand-designed taxonomies are unbalanced and misrepresent the class structure in the underlying data distribution. We attempt to correct these problems by using the data distribution itself to calibrate the hierarchical classification loss function. This distribution-based correction must be done with care, to avoid introducing unmanageable statistical dependencies into the learning problem. This leads us off the beaten path of binomial-type estimation and into the unfamiliar waters of geometric-type estimation. In this paper, we present a new calibrated definition of statistical risk for hierarchical classification, an unbiased estimator for this risk, and a new algorithmic reduction from hierarchical classification to cost-sensitive classification. 1 Introduction Multiclass classification is the task of assigning labels from a predefined label-set to instances in a given domain. For example, consider the task of assigning a topic to each document in a corpus. If a training set of labeled documents is available, then a multiclass classifier can be trained using a supervised machine learning algorithm. Often, large label-sets can be organized in a taxonomy. Examples of popular label taxonomies are the ODP taxonomy of web pages [2], the gene ontology [6], and the LCC ontology of book topics [1]. A taxonomy is a hierarchical structure over labels, where some labels define very general concepts, and other labels define more specific specializations of those general concepts. A taxonomy of document topics could include the labels MUSIC, CLASSICAL MUSIC, and POPULAR MUSIC, where the last two are special cases of the first. Some label taxonomies form trees (each label has a single parent) while others form directed acyclic graphs. When a label taxonomy is given alongside a training set, the multiclass classification problem is often called a hierarchical classification problem. The label taxonomy defines a structure over the multiclass problem, and this structure should be used both in the formal definition of the hierarchical classification problem, and in the design of learning algorithms to solve this problem. Most hierarchical classification learning algorithms treat the taxonomy as an indisputable definitive model of the world, never questioning its accuracy. However, most taxonomies are authored by human editors and subjective matters of style and taste play a major role in their design. Many arbitrary decisions go into the design of a taxonomy, and when multiple editors are involved, these arbitrary decisions are made inconsistently. Figure 1 shows two versions of a simple taxonomy, both equally reasonable; choosing between them is a matter of personal preference. Arbitrary decisions that go into the taxonomy design can have a significant influence on the outcome of the learning algorithm [19]. Ideally, we want learning algorithms that are immune to the arbitrariness in the taxonomy. 1 The arbitrary factor in popular label taxonomies is a well-known phenomenon. [17] gives the example of the Library of Congress Classification system (LCC), a widely adopted and constantly updated taxonomy of “all knowledge”, which includes the category WORLD HISTORY and four of its direct subcategories: ASIA, AFRICA, NETHERLANDS, and BALKAN PENINSULA. There is a clear imbalance between the the level of granularity of ASIA versus its sibling BALKAN PENINSULA. The Dewey Decimal Classification (DDC), another widely accepted taxonomy of “all knowledge”, defines ten main classes, each has exactly ten subclasses, and each of those again has exactly ten subclasses. The rigid choice of a decimal fan-out is an arbitrary one, and stems from an aesthetic ideal rather than a notion of informativeness. Incidentally, the ten subclasses of RELIGION in the DDC include six categories about Christianity and the additional category OTHER RELIGIONS, demonstrating the editor’s clear subjective predilection for Christianity. The ODP taxonomy of web-page topics is optimized for navigability rather than informativeness, and is therefore very flat and often unbalanced. As a result, two of the direct children of the label GAMES are VIDEO GAMES (with over 42, 000 websites listed) and PAPER AND PENCIL GAMES (with only 32 websites). These examples are not intended to show that these useful taxonomies are flawed, they merely demonstrate the arbitrary subjective aspect of their design. Our goal is to define the problem such that it is invariant to many of these subjective and arbitrary design choices, while still exploiting much of the available information. Some older approaches to hierarchical classification do not use the taxonomy in the definition of the classification problem [12, 13, 18, 9, 16]. Namely, these approaches consider all classification mistakes to be equally bad, and use the taxonomy only to the extent that it reduces computational complexity and the number of classification mistakes. More recent approaches [3, 8, 5, 4] exploit the label taxonomy more thoroughly, by using it to induce a hierarchy-dependent loss function, which captures the intuitive idea that not all classification mistakes are equally bad: incorrectly classifying a document as CLASSICAL MUSIC when its true topic is actually JAZZ is not nearly as bad as classifying that document as COMPUTER HARDWARE. When this interpretation of the taxonomy can be made, ignoring it is effectively wasting a valuable signal in the problem input. For example, [8] define the loss of predicting a label u when the correct label is y as the number of edges along the path between the two labels in the taxonomy graph. Additionally, a taxonomy provides a very natural framework for balancing the tradeoff between specificity and accuracy in classification. Ideally, we would like our classifier to assign the most specific label possible to an instance, and the loss function should reward it adequately for doing so. However, when a specific label cannot be assigned with sufficiently high confidence, it is often better to fall-back on a more general correct label than it is to assign an incorrect specific label. For example, classifying a document on JAZZ as the broader topic MUSIC is better than classifying it as the more specific yet incorrect topic COUNTRY MUSIC. A hierarchical classification problem should be defined in a way that penalizes both over-confidence and under-confidence in a balanced way. The graph-distance based loss function introduced by [8] captures both of the ideas mentioned above, but it is very sensitive to arbitrary choices that go into the taxonomy design. Once again consider the example in Fig. 1: each hierarchy would induce a different graph-distance, which would lead to a different outcome of the learning algorithm. We can make the difference between the two outcomes arbitrarily large by making some regions of the taxonomy very deep and other regions very flat. Additionally, we note that the simple graph-distance based loss works best when the taxonomy is balanced, namely, when all of the splits in the taxonomy convey roughly the same amount of information. For example, in the taxonomy of Fig. 1, the children of CLASSICAL MUSIC are VIVALDI and NON-VIVALDI, where the vast majority of classical music falls in the latter. If the correct label is NON-VIVALDI and our classifier predicts the more general label CLASSICAL MUSIC, the loss should be small, since the two labels are essentially equivalent. On the other hand, if the correct label is VIVALDI then predicting CLASSICAL MUSIC should incur a larger loss, since important detail was excluded. A simple graph-distance based loss will penalize both errors equally. On one hand, we want to use the hierarchy to define the problem. On the other hand, we don’t want arbitrary choices and unbalanced splits in the taxonomy to have a significant effect on the outcome. Can we have our cake and eat it too? Our proposed solution is to leave the taxonomy structure as-is, and to stick with a graph-distance based loss, but to introduce non-uniform edge weights. Namely, the loss of predicting u when the true label is y is defined as the sum of edge-weights along the shortest path from u to y. We use the underlying distribution over labels to set the edge 2 Figure 1: Two equally-reasonable label taxonomies. Note the subjective decision to include/exclude the label ROCK, and note the unbalanced split of CLASSICAL to the small class VIVALDI and the much larger class NON-VIVALDI. weights in a way that adds balance to the taxonomy and compensates for certain arbitrary design choices. Specifically, we set edge weights using the information-theoretic notion of conditional selfinformation [7]. The weight of an edge between a label u and its parent u′ is the log-probability of observing the label u given that the example is also labeled by u′. Others [19] have previously tried to use the training data to “fix” the hierarchy, as a preprocessing step to classification. However, it is unclear whether it is statistically permissible to reuse the training data twice: once to fix the hierarchy and then again in the actual learning procedure. The problem is that the preprocessing step may introduce strong statistical dependencies into our problem. These dependencies could prove detrimental to our learning algorithm, which expects to see a set of independent examples. The key to our approach is that we can estimate our distribution-dependent loss using the same data used to define it, without introducing any significant bias. It turns out that to accomplish this, we must deviate from the prevalent binomial-type estimation scheme that currently dominates machine learning and turn to a more peculiar geometric-distribution-type estimator. A binomial-type estimator essentially counts things (such as mistakes), while a geometric-type estimator measures the amount of time that passes before something occurs. Geometric-type estimators have the interesting property that they might occasionally fail, which we investigate in detail below. Moreover, we show how to control the variance of our estimate without adding bias. Since empirical estimation is the basis of supervised machine learning, we can now extrapolate hierarchical learning algorithms from our unbiased estimation technique. Specifically, we present a reduction from hierarchical classification to cost-sensitive multiclass classification, which is based on our new geometric-type estimator. This paper is organized as follows. We formally set the problem in Sec. 2 and present our new distribution-dependent loss function in Sec. 3. In Sec. 4 we discuss how to control the variance of our empirical estimates, which is a critical step towards the learning algorithm described in Sec. 5. We conclude with a discussion in Sec. 6. We omit technical proofs due to space constraints. 2 Problem Setting We now define our problem more formally. Let X be an instance space and let T be a taxonomy of labels. For simplicity, we focus on tree hierarchies. T is formally defined as the pair (U, π), where U is a finite set of labels and π is the function that specifies the parent of each label in U. U contains both general labels and specific labels. Specifically, we assume that U contains the special label ALL, and that all other labels in U are special cases of ALL. π : U →U is a function that defines the structure of the taxonomy by assigning a parent π(u) to each label u ∈U. Semantically, π(u) is a more general label than u that contains u as a special case. In other words, we can say that “u is a specific type of π(u)”. For completeness, we define π(ALL) = ALL. The n’th generation parent function πn : U →U is defined by recursively applying π to itself n times. Formally πn(u) = π(π(. . . π | {z } n (u) . . .)) . For completeness, define π0 as the identity function over U. T is acyclic, namely, for all u ̸= ALL and for all n ≥1 it holds that πn(u) ̸= u. The ancestor function π⋆, maps each label to its set of ancestors, and is defined as π⋆(u) = S∞ n=0{πn(u)}. In other words, π⋆(u) includes u, its parent, its parent’s parent, and so on. We assume that T is connected and specifically that ALL is an ancestor 3 of all labels, meaning that ALL ∈π⋆(u) for all u ∈U. The inverse of the ancestor function is the descendent function τ, which maps u ∈U to the subset {u′ ∈U : u ∈π⋆(u′)}. In other words, u is a descendent of u′ if and only if u′ is an ancestor of u. Graphically, we can depict T as a rooted tree: U defines the tree nodes, ALL is the root, and { u, π(u)  : u ∈U \ ALL} is the set of edges. In this graphical representation, τ(u) includes the nodes in the subtree rooted at u. Using this representation, we define the graph distance between any two labels d(u, u′) as the number of edges along the path between u and u′ in the tree. The lowest common ancestor function λ : U × U →U maps any pair of labels to their lowest common ancestor in the taxonomy, where “lowest” is in the sense of tree depth. Formally, λ(u, u′) = πj(u) where j = min{i : πi(u) ∈π⋆(u′)}. In words, λ(u, u′) is the closest ancestor of u that is also an ancestor if u′. It is straightforward to verify that λ(u, u′) = λ(u′, u). The leaves of a taxonomy are the labels that are not parents of any other labels. We denote the set of leaves by Y and note that Y ⊂U. Now, let D be a distribution on the product space X × Y. In other words, D is a joint distribution over instances and their corresponding labels. Note that we assume that the labels that occur in the distribution are always leaves of the taxonomy T . This assumption can be made without loss of generality: if this is not the case then we can always add a leaf to each interior node, and relabel all of the examples accordingly. More formally, for each label u ∈U \ Y, we add a new node y to U with π(y) = u, and whenever we sample (x, u) from D then we replace it with (x, y). Initially, we do not know anything about D, other than the fact that it is supported on X × Y. We sample m independent points from D, to obtain the sample S = {(xi, yi)}m i=1. A classifier is a function f : X →U that assigns a label to each instance of X. Note that a classifier is allowed to predict any label in U, even though it knows that only leaf labels are ever observed in the real world. We feel that this property captures a fundamental characteristic of hierarchical classification: although the truth is always specific, a good hierarchical classifier will fall-back to a more general label when it cannot confidently give a specific prediction. The quality of f is measured using a loss function ℓ: U × Y →R+. For any instance-label pair (x, y), the loss ℓ(f(x), y) should be interpreted as the penalty associated with predicting the label f(x) when the true label is y. We require ℓto be weakly monotonic, in the following sense: if u′ lies along the path from u to y then ℓ(u′, y) ≤ℓ(u, y). Although the error indicator function, ℓ(u, y) = 1u̸=y satisfies our requirements, it is not what we have in mind. Another fundamental characteristic of hierarchical classification problems is that not all prediction errors are equally bad, and the definition of the loss should reflect this. More specifically, if u′ lies along the path from u to y and u is not semantically equivalent to u′, we actually expect that ℓ(u′, y) < ℓ(u, y). 3 A Distribution-Calibrated Loss for Hierarchical Classification As mentioned above, we want to calibrate the hierarchical classification loss function using the distribution D, through its empirical proxy S. In other words, we want D to differentiate between informative splits in the taxonomy and redundant ones. We follow [8] in using graph-distance to define the loss function, but instead of setting all of the edge weights to 1, we define edge weights using D. For each y ∈Y, let p(y) be the marginal probability of the label y in the distribution D. For each u ∈U, define p(u) = P y∈Y∩τ(u) p(y). In words, for any u ∈U, p(u) is the probability of observing any descendent of u. We assume henceforth that p(u) > 0 for all u ∈U. With these definitions handy, define the weight of the edge between u and π(u) as log p(π(u))/p(u)  . This weight is essentially the definition of conditional self information from information theory [7]. The nice thing about this definition is that the weighted graph-distance between labels u and y telescopes between u and λ(u, y) and between u and λ(u, y), and becomes ℓ(u, y) = 2 log p(λ(u, y))  −log p(u)  −log p(y)  . (1) Since this loss function depends only on u, y, and λ(u, y), and their frequencies according to D, it is completely invariant to the the number of labels along the path from u or y. It is also invariant to inconsistent degrees of flatness of the taxonomy in different regions. Finally, it is even invariant to the addition or subtraction of new leaves or entire subtrees, so long as the marginal distributions p(u), p(y), and p(λ(u, y)) remain unchanged. This loss also balances uneven splits in the taxonomy. 4 Recalling the example in Fig. 1 where CLASSICAL is split into VIVALDI and NON-VIVALDI, the edge to the former will have a very high weight, whereas the edge to the latter will have a weight close to zero. Now, define the risk of a classifier h as R(f) = E(X,Y )∼D[ℓ(f(X), Y )], the expected loss over examples sampled from D. Our goal is to obtain a classifier with a small risk. However, before we tackle the problem of finding a low risk classifier, we address the intermediate task of estimating the risk of a given classifier f using the sample S. The solution is not straightforward since we cannot even compute the loss on an individual example, ℓ(f(xi), yi), as this requires knowledge of D. A naive way to estimate ℓ(f(xi), yi) using the sample S is to first estimate each p(y) by Pm i=1 1yi=y, and to plug these values into the definition of ℓ. This estimator tends to suffer from a strong bias, due to the non-linearity of the logarithm, and is considered to be unreliable1. Instead, we want an unbiased estimator. First, we write the definition of risk more explicitly using the definition of the loss function in Eq. (1). Define q(f, u) = Pr(f(X) = u), the probability that f outputs u when X is drawn according to the marginal distribution of D over X. Also define r(f, u) = Pr(λ(f(X), Y ) = u), the probability that the lowest common ancestor of f(X) and Y is u, when (X, Y ) is drawn from D. R(f) can be rewritten as R(f) = X u∈U 2r(f, u) −q(f, u)  log(p(u)) − X y∈Y p(y) log p(y)  . (2) Notice that the second term in the definition of risk is a constant, independent of f. This constant is simply H(Y ), the Shannon entropy [7] of the label distribution. Our ultimate goal is to compare the risk values of different classifiers and to choose the best one, so we don’t really care about this constant, and we can discard it henceforth. From here on, we focus on estimating the augmented risk ¯R(f) = R(f) −H(Y ). The main building block of our estimator is the estimation technique presented in [14]. Assume for a moment that the sample S is infinite. Recall that the harmonic number hn is defined as Pn i=1 1 i , with h0 = 0. Define the random variables Ai and Bi as follows Ai = min{j ∈N : yi+j ∈τ(f(xi))} −1 Bi = min  j ∈N : yi+j ∈τ λ(f(xi), yi)  −1 For example, A1 + 2 is the index of the first example after (x1, y1) whose label is contained in the subtree rooted at f(x1), and B1 + 2 is the index of the first example after (x1, y1) whose label is contained in the subtree rooted at λ(f(x1), y1). Note that Bi ≤Ai, since λ(u, y) is, by definition, an ancestor of u, so y′ ∈τ(u) implies y′ ∈τ(λ(u, y)). Next, define the random variable L1 = hA1 −2hB1. Theorem 1. L1 is an unbiased estimator of ¯R(f). Proof. We have that E  L1 f(X1) = u, Y1 = y  = p(u) ∞ X j=0 hj 1 −p(u) j−2p λ(u, y)  ∞ X j=0 hj 1 −p(λ(u, y)) j . Using the fact that for any α ∈[0, 1) it holds that P∞ n=0 hnαn = −log(1−α) 1−α we get, E[L1|f(X1) = u, Y1 = y] = −log p(u)  + 2 log p(λ(u, y))  . Therefore, E[L1] = P u∈U P y∈Y Pr(f(X) = u, Y = y) E[L1|f(X1) = u, Y1 = y] = P u∈U 2r(f, u) −q(f, u)  log p(u)  = ¯R(f) . We now recall that our sample S is actually of finite size m. The problem that now occurs is that A1 and B1 are not well defined when f(X1) does not appear anywhere in Y2, . . . , Ym. When this happens, we say that the estimator L1 fails. If f outputs a label u with p(u) = 0 then L1 will fail 1The interested reader is referred to the extensive literature on the closely related problem of estimating the entropy of a distribution from a finite sample. 5 with probability 1. On the other hand, the probability of failure is negligible when m is large enough, and when f does not output labels with tiny probabilities. Formally, let β(f) = minu:q(f,u)>0 p(u) be the smallest probability of any label that f outputs. Theorem 2. The probability of failure is at most e−(m−1)β(f). The estimator E[L1|no-fail] is no longer an unbiased estimator of ¯R(f), but the bias is small. Specifically, since we are after a classifier f with a small risk, we prove an upper-bound on ¯R(f). Theorem 3. It holds that E  L1 no-fail  ≥¯R(f) −(m−1)e−β(f)(m−1) β2(f) . For example, with β = 0.01 and m = 2500, the bias term in Thm. 3 is less than 0.0004. With m = 5000 it is already less than 10−14. 4 Decreasing the Variance of the Estimator Say that we have k classifiers and we want to choose the best one. The estimator L1 suffers from an unnecessarily high variance because it typically uses a short prefix of the sample S and wastes the remaining examples. To reliably compare k empirical risk estimates, we need to reduce the variance of each estimator. The exact value of Var(L1) depends on the distributions p, q, and r in a non-trivial way, but we can give a simple upper-bound on Var(L1) in terms of β(f). Theorem 4. Var(L1) ≤−9 log β(f)  + 9 log2 β(f)  . We reduce the variance of the estimator by repeating the estimation multiple times, without reusing any sample points. Formally, define S1 = 1, and define for all i ≥2 the random variables Si = Si−1 + ASi−1 + 2, and Li = hASi −2hBSi. In words: the first estimator L1 starts at S1 = 1 and uses A1 + 2 examples, namely, the examples 1, . . . , (A1 + 2). Now, S2 = A1 + 3 is the first untouched example in the sequence. The second estimator, L2 starts at example S2 and uses AS2 +2 examples, namely, the examples S2, . . . , (S2 +AS2 +1), and so on. If we had an infinite sample and chose some threshold t, the random variables L1, . . . , Lt would all be unbiased estimators of ¯R(f), and therefore the aggregate estimator L = 1 t Pt i=1 Li would also be an unbiased estimate of ¯R(f). Since L1, . . . , Lt are also independent, the variance of the aggregate estimator would be 1 t Var(L1). In the finite-sample case, aggregating multiple estimators is not as straightforward. Again, the event where the estimation fails introduces a small bias. Additionally, the number of independent estimations that fit in a sample of fixed size m is itself a random variable T . Moreover, the value of T depends on the value of the risk estimators. In other words, if L1, L2, . . . take large values then T will take a small value. The precise definition of T should be handled with care, to ensure that the individual estimators remain independent and that the aggregate estimator maintains a small bias. For example, the first thing that comes to mind is to set T to be the largest number t such that St ≤m - this is a bad idea. To see why, note that if T = 2 and A1 = m −4 then we know with certainty that AS2 = 0. This clearly demonstrates a strong statistical dependence between L1, L2 and T , which both interferes with the variance reduction and introduces a bias. Instead, we define T as follows: choose a positive integer l ≤m and set T using the last l examples in S, as follows, set T = min {t ∈N : St+1 ≥m −l} . (3) In words, we think of the last l examples in S as the “landing strip” of our procedure: we keep jumping forward in the sequence of samples, from S1 to S2, to S3, and so on, until the first time we land on the landing strip. Our new failure scenario occurs when our last jump overshoots the strip, and no Si falls on any one of the last l examples. If L does not fail, define the aggregate estimator as L = PT i=1 Li. Note that we are summing Li rather than averaging them; we explain this later on. Theorem 5. The probability of failure of the estimator L is at most e−lβ(f). We now prove that our definition of T indeed decreases the variance without adding bias. We give a simplified version of the analysis, assuming that S is infinite, and assuming that the limit m is merely a recommendation. In other words, T is still defined as before, but estimation never fails, even in the rare case where ST + AST + 1 > m (the index of the last example used in the estimation exceeds the predefined limit m). We note that a very similar theorem can be stated in the finite-sample case, 6 INPUTS: a training set S = {(xi, yi)}m i=1, a label taxonomy T . 1 for i = 1, . . . , m 2 generate random permutation ψ : {1, . . ., (m −1)} →{1, . . . , (i −1), (i + 1), . . . , m}. 3 for u = 1, . . . , d 4 a = −1 + min n j ∈{1, . . . , (m −1)} : yψ(j) ∈τ(u) o 5 b = −1 + min n j ∈{1, . . . , (m −1)} : yψ(j) ∈τ λ(u, yi) o 6 M(i, u) = 1 b+1 + 1 b+2 + · · · + 1 a OUTPUT: M Figure 2: A reduction from hierarchical multiclass to cost-sensitive multiclass. at the price of a significantly more complicated analysis. The complication stems from the fact that we are estimating the risk of k classifiers simultaneously, and the failure of one estimator depends on the values of the other estimators. We allow ourselves to ignore failures because they occur with such small probability, and because they introduce an insignificant bias. Theorem 6. Assuming that S is infinite, but T is still defined as in Eq. (3), it holds that E  L] = E  T ] ¯R(f) and Var(L) ≤E[T ]σ2, where σ2 = Var Li). The proof follows from variations on Wald’s theorem [15]. Recall that we have k competing classifiers, f1, . . . , fk, and we want to choose one with a small risk. We overload our notation to support multiple concurrent estimations, and define T (fj) as the stopping time (previously defined as T in Eq. (3)) of the estimation process for ¯R(fj). Also let Li(fj) be the i’th unbiased estimator of ¯R(fj). To conduct a fair comparison of the k classifiers, we redefine T = minj=1,...,k T (fj), and let L(fj) = PT i=1 Li(fj). In other words, we aggregate the same number of estimators for each classifier. We then choose the classifier with the smallest risk estimate, arg min L(Fj). Theorem 6 still holds for each individual classifier because the new definition of T remains a stopping time for each of the individual estimation processes. Although we may not know the exact value of E[T ], it is just a number that we can use to reason about the bias and the variance of L. We note that finding j that minimizes L(fj) is equivalent to finding j that minimizes L(fj)/E[T ]. The latter, according to Thm. 6, is an unbiased estimate of ¯R(f). Moreover, the variance of each L(fj)/E[T ] is Var (L(fj)/E[T ]) = σ2/E[T ], so the effective variance of our unbiased estimate decreases like 1/E[T ], which is what we would expect. Using the one-tailed Chebyshev inequality [11], we get that for any ǫ > 0, Pr ¯R(fj) ≥L(fj) + ǫ  < σ2/(σ2+E[T ]ǫ2). The bound holds uniformly for all k classifiers with probability kσ2/(σ2 +E[T ]ǫ2) (using the union bound). The variance of the estimation depends on E[T ], and we expect E[T ] to grow linearly with m. For example we can prove the following crude lower-bound. Theorem 7. E[T ] ≥(m −l)/c, where c = k + Pk j=1 1/β(fj). 5 Reducing Hierarchical Classification to Cost-Sensitive Classification In this section, we propose a method for learning low-risk hierarchical classifiers, using our new definition of risk. More precisely, we describe a reduction from hierarchical classification to costsensitive multiclass classification. The appeal of this approach is the abundance of existing costsensitive learning algorithms. This reduction is itself an algorithm whose input is a training set of m examples and a taxonomy over d labels, and whose output is a d × m matrix of non-negative reals, denoted by M. Entry M(i, j) is the cost of classifying example i with label j. This cost matrix, and the original training set, are given to a cost-aware multiclass learning algorithm, which attempts to find a classifier f with a small empirical loss Pm i=1 M(i, f(xi)). 7 For example, a common approach to multiclass problems is to train a model fu : X →R for each label u ∈U and to define the classifier f(x) = arg maxu∈U fu(x). An SVM-flavored way to train a cost sensitive classifier is to assume that the functions fu live in a Hilbert space, and to minimize d X u=1 ∥fu∥2 + C m X i=1 X u̸=yi h M(i, u) + fu(xi) −fyi(xi) i + , (4) where C > 0 is a parameter and [α]+ = max{0, α}. The first term is a regularizer and the second is an empirical loss, justified by the fact that M(i, f(xi)) ≤P u̸=yi  M(i, u) + fu(xi) −fyi(xi)  +. Coming back to the reduction algorithm, we generate M using the procedure outlined in Fig. 2. Based on the analysis of the previous sections, it is easy to see that, for all i, M(i, f(xi)) is an unbiased estimator of the risk ¯R(f). This holds even if ψ (as defined in Fig. 2) is a fixed function, because the training set is assumed to be i.i.d. Therefore, 1 m P M(i, f(xi)) is also an unbiased estimator of ¯R(f). The cost-sensitive learning algorithm will try to minimize this empirical estimate. The purpose of the random permutation at each step is to hopefully decrease the variance of the overall estimate, by decreasing the dependencies between the different individual estimators. We profess that a rigorous analysis of the variance of this estimator is missing from this work. Ideally, we would like to show that, with high probability, the empirical estimate 1 m P M(i, f(xi)) is ǫ-close to its expectation of ¯R(f), uniformly for all classifiers f in our function class. This is a challenging problem due to the complex dependencies in the estimator. The learning algorithm used to solve this problem can (and should) use the hierarchical structure to guide its search for a good classifier. Our reduction to an unstructured cost-sensitive problem should not be misinterpreted as a recommendation not to use the structure in the learning process. For example, following [10, 8], we could augment the SVM approach described in Eq. (4) by replacing the unstructured regularizer Pd u=1 ∥fu∥2 with the structured regularizer Pd u=1 ∥fu−fπ(u)∥2, where π(u) is the parent label of u. [8] showed significant gains on hierarchical problems using this regularizer. 6 Discussion We started by taking a step back from the typical setup of a hierarchical classification machine learning problem. As a consequence, our focus was on the fundamental aspects of the hierarchical problem definition, rather than on the equally important algorithmic issues. Our discussion was restricted to the simplistic model of single-label hierarchical classification with single-linked taxonomies, and our first goal going forward is to relax these assumptions. We point out that many of the theorems proven in this paper depend on the value of β(f), which is defined as minu:q(u)>0 p(u). Specifically, if f occasionally outputs a very rare label, then β(f) is tiny and much of our analysis breaks down. This provides a strong indication that an empirical estimate of β(f) would make a good regularization term in a hierarchical learning scheme. In other words, we should deter the learning algorithm from choosing a classifier that predicts very rare labels. As mentioned in the introduction, the label taxonomy provides the perfect mechanism for backing off and predicting a more common and less risky ancestor of that label. We believe that our work is significant in the broader context of structured learning. Most structured learning algorithms blindly trust the structure that they are given, and arbitrary design choices are likely to appear in many types of structured learning. The idea of using the data distribution to calibrate, correct, and balance the side-information extends to other structured learning scenarios. The geometric-type estimation procedure outlined in this paper may play an important role in those settings as well. Acknowledgment The author would like to thank Paul Bennett for his suggestion of the loss function for its information theoretic properties, reduction to a tree-weighted distance, and ability to capture other desirable characteristics of hierarchical loss functions like weak monotonicity. The author also thanks Ohad Shamir, Chris Burges, and Yael Dekel for helpful discussions. 8 References [1] The Library of Congress Classification. http://www.loc.gov/aba/cataloging/classification/. [2] The Open Directory Project. http://www.dmoz.org/about.html. [3] L. Cai and T. Hofmann. Hierarchical document categorization with support vector machines. In 13th ACM Conference on Information and Knowledge Management, 2004. [4] N. Cesa-Bianchi, C. Gentile, and L. Zaniboni. Hierarchical classification: combining bayes with svm. In Proceedings of the 23rd International Conference on Machine Learning, 2006. [5] N. Cesa-Bianchi, C. Gentile, and L. Zaniboni. Incremental algorithms for hierarchical classification. Journal of Machine Learning Research, 7:31–54, 2007. [6] The Gene Ontology Consortium. Gene ontology: tool for the unification of biology. Nature Genetics, 25:25–29, 2000. [7] T. M. Cover and J. A. Thomas. Elements of Information Theory. Wiley, 1991. [8] O. Dekel, J. Keshet, and Y. Singer. Large margin hierarchical classification. In Proceedings of the Twenty-First International Conference on Machine Learning, 2004. [9] S. T. Dumais and H. Chen. Hierarchical classification of Web content. In Proceedings of SIGIR-00, pages 256–263, 2000. [10] T. Evgeniou, C.Micchelli, and M. Pontil. Learning multiple tasks with kernel methods. Journal of Machine Learning Research, 6:615–637, 2005. [11] W. Feller. An Introduction to Probability and its Applications, volume 2. John Wiley and Sons, second edition, 1970. [12] D. Koller and M. Sahami. Hierarchically classifying docuemnts using very few words. In Machine Learning: Proceedings of the Fourteenth International Conference, pages 171–178, 1997. [13] A. K. McCallum, R. Rosenfeld, T. M. Mitchell, and A. Y. Ng. Improving text classification by shrinkage in a hierarchy of classes. In Proceedings of ICML-98, pages 359–367, 1998. [14] S. Montgomery-Smith and T. Schurmann. Unbiased estimators for entropy and class number. [15] S.M. Ross and E.A. Pekoz. A second course in probability theory. 2007. [16] E. Ruiz and P. Srinivasan. Hierarchical text categorization using neural networks. Information Retrieval, 5(1):87–118, 2002. [17] C. Shirky. Ontology is overrated: Categories, links, and tags. In O’Reilly Media Emerging Technology Conference, 2005. [18] A. S. Weigend, E. D. Wiener, and J. O. Pedersen. Exploiting hierarchy in text categorization. Information Retrieval, 1(3):193–216, 1999. [19] J. Zhang, L. Tang, and H. Liu. Automatically adjusting content taxonomies for hierarchical classification. In Proceedings of the Fourth Workshop on Text Mining, SDM06, 2006. 9
2009
210
3,716
A Smoothed Approximate Linear Program Vijay V. Desai IEOR, Columbia University vvd2101@columbia.edu Vivek F. Farias MIT Sloan vivekf@mit.edu Ciamac C. Moallemi GSB, Columbia University ciamac@gsb.columbia.edu Abstract We present a novel linear program for the approximation of the dynamic programming cost-to-go function in high-dimensional stochastic control problems. LP approaches to approximate DP naturally restrict attention to approximations that are lower bounds to the optimal cost-to-go function. Our program – the ‘smoothed approximate linear program’ – relaxes this restriction in an appropriate fashion while remaining computationally tractable. Doing so appears to have several advantages: First, we demonstrate superior bounds on the quality of approximation to the optimal cost-to-go function afforded by our approach. Second, experiments with our approach on a challenging problem (the game of Tetris) show that the approach outperforms the existing LP approach (which has previously been shown to be competitive with several ADP algorithms) by an order of magnitude. 1 Introduction Many dynamic optimization problems can be cast as Markov decision problems (MDPs) and solved, in principle, via dynamic programming. Unfortunately, this approach is frequently untenable due to the ‘curse of dimensionality’. Approximate dynamic programming (ADP) is an approach which attempts to address this difficulty. ADP algorithms seek to compute good approximations to the dynamic programing optimal cost-to-go function within the span of some pre-specified set of basis functions. The approximate linear programming (ALP) approach to ADP [1, 2] is one such well-recognized approach. The program employed in the ALP approach is identical to the LP used for exact computation of the optimal cost-to-go function, with further constraints limiting solutions to the low-dimensional subspace spanned by the basis functions used. The resulting low dimensional LP implicitly restricts attention to approximations that are lower bounds on the optimal cost-to-go function. While the structure of this program appears crucial in establishing approximation guarantees for the approach, the restriction to lower bounds leads one to ask whether the ALP is the ‘right’ LP. In particular, could an appropriate relaxation of the feasible region of the ALP allow for better approximations to the cost-to-go function while remaining computationally tractable? Motivated by this question, the present paper presents a new linear program for ADP we call the ‘smoothed’ ALP (or SALP). The SALP may be viewed as a relaxation of the ALP wherein one is allowed to violate the ALP constraints for any given state. A user defined ‘violation budget’ parameter controls the ‘expected’ violation across states; a budget of 0 thus yields the original ALP. We specify a choice of this violation budget that yields a relaxation with attractive properties. In particular, we are able to establish strong approximation guarantees for the SALP; these guarantees are substantially stronger than the corresponding guarantees for the ALP. The number of constraints and variables in the SALP scale with the size of the MDP state space. We nonetheless establish sample complexity bounds that demonstrate that an 1 appropriate ‘sampled’ SALP provides a good approximation to the SALP solution with a tractable number of sampled MDP states. This sampled program is no more complex than the ‘sampled’ ALP and, as such, we demonstrate that the SALP is essentially no harder to solve than the ALP. We present a computational study demonstrating the efficacy of our approach on the game of Tetris. The ALP has been demonstrated to be competitive with several ADP approaches for Tetris (see [3]). In detailed comparisons with the ALP, we estimate that the SALP provides an order of magnitude improvement over controllers designed via that approach for the game of Tetris. 2 Problem Formulation Our setting is that of a discrete-time, discounted infinite-horizon, cost-minimizing MDP with a finite state space X and finite action space A. Given the state and action at time t, xt and at, a per-stage cost g(xt, at) is incurred. The subsequent state xt+1 is determined according to the transition probability kernel Pat(xt, ·). A stationary policy µ : X →A is a mapping that determines the action at each time as a function of the state. Given each initial state x0 = x, the expected discounted cost (cost-to-go function) of the policy µ is given by Jµ(x) ≜Eµ " ∞ X t=0 αtg(xt, µ(xt)) x0 = x # . where, α ∈(0, 1) is the discount factor. Denote by Pµ ∈RX×X the transition probability matrix for the policy µ, whose (x, x′)th entry is Pµ(x)(x, x′). Denote by gµ ∈RX the vector whose xth entry is g(x, µ(x)). Then, the cost-to-go function Jµ is the unique solution to the equation TµJ = J, where the operator Tµ is defined by TµJ = gµ + αPµJ. The Bellman operator T can be defined according to TJ = minµ TµJ. Bellman’s equation is then the fixed point equation, TJ = J. It is readily shown that the optimal cost-to-go function J∗is the unique solution to Bellman’s equation and that a corresponding optimal policy µ∗is greedy with respect to J∗; i.e., µ∗satisfies TJ∗= Tµ∗J∗. Bellman’s equation may be solved exactly via the following linear program: (1) maximize J ν⊤J subject to J ≤TJ. Here, ν ∈RX is a vector with positive components that are known as the state-relevance weights. The above program is indeed an LP since the constraint J(x) ≤(TJ)(x) is equivalent to the set of linear constraints J(x) ≤g(x, a) + α P x′∈X Pa(x, x′)J(x′), ∀a ∈A. We refer to (1) as the exact LP. Note that if a vector J satisfies J ≤TJ, then J ≤T kJ (by monotonicity of the Bellman operator), and thus J ≤J∗(since the Bellman operator is a contraction with unique fixed point J∗). Then, every feasible point for (1) is a component-wise lower bound to J∗, and J∗is the unique optimal solution to the exact LP (1). For problems where X is prohibitively large, an ADP algorithm seeks to find a good approximation to J∗. Specifically, one considers a collection of basis functions {φ1, . . . , φK} where each φi : X →R. Defining Φ ≜[φ1φ2 . . . φK] to be a matrix with columns consisting of basis functions, one seeks an approximation of the form Jr = Φr, with the hope that Jr ∼J∗. The ALP for this task is then simply (2) maximize r ν⊤Φr subject to Φr ≤TΦr. The geometric intuition behind the ALP is illustrated in Figure 1(a). Supposed that rALP is a vector that is optimal for the ALP. Then the approximate value function ΦrALP will lie on the subspace spanned by the columns of Φ, as illustrated by the orange line. ΦrALP 2 will also satisfy the constraints of the exact LP, illustrated by the dark gray region; this implies that ΦrALP ≤J∗. In other words, the approximate cost-to-go function is necessarily a point-wise lower bound to the true cost-to-go function in the span of Φ. J = Φr ΦrALP J∗ ν J(1) J(2) (a) ALP case. J = Φr ΦrSALP J∗ ν J(1) J(2) (b) SALP case. Figure 1: A cartoon illustrating the feasible set and optimal solution for the ALP and SALP, in the case of a two-state MDP. The axes correspond to the components of the value function. A careful relaxation from the feasible set of the ALP to that of the SALP can yield an improved approximation. 3 The Smoothed ALP The J ≤TJ constraints in the exact LP, which carry over to the ALP, impose a strong restriction on the cost-to-go function approximation: in particular they restrict us to approximations that are lower bounds to J∗at every point in the state space. In the case where the state space is very large, and the number of basis functions is (relatively) small, it may be the case that constraints arising from rarely visited or pathological states are binding and influence the optimal solution. In many cases, our ultimate goal is not to find a lower bound on the optimal cost-to-go function, but rather a good approximation to J∗. In these instances, it may be the case that relaxing the constraints in the ALP so as not to require a uniform lower bound may allow for better overall approximations to the optimal cost-to-go function. This is also illustrated in Figure 1. Relaxing the feasible region of the ALP in Figure 1(b) to the light gray region in Figure 1(b) would yield the point ΦrSALP as an optimal solution. The relaxation in this case is clearly beneficial; it allows us to compute a better approximation to J∗than the point ΦrSALP. Can we construct a fruitful relaxation of this sort in general? The smoothed approximate linear program (SALP) is given by: (3) maximize r,s ν⊤Φr subject to Φr ≤TΦr + s, π⊤s ≤θ, s ≥0. Here, a vector s ∈RX of additional decision variables has been introduced. For each state x, s(x) is a non-negative decision variable (a slack) that allows for violation of the corresponding ALP constraint. The parameter θ ≥0 is a non-negative scalar. The parameter π ∈RX is a probability distribution known as the constraint violation distribution. The parameter θ is thus a violation budget: the expected violation of the Φr ≤TΦr constraint, under the distribution π, must be less than θ. The balance of the paper is concerned with establishing that the SALP forms the basis of a useful ADP algorithm in large scale problems: • We identify a concrete choice of violation budget θ and an idealized constraint violation distribution π for which the SALP provides a useful relaxation in that the optimal solution can be a better approximation to the optimal cost-to-go function. This brings the cartoon improvement in Figure 1 to fruition for general problems. 3 • We show that the SALP is tractable (i.e it is well approximated by an appropriate ‘sampled’ version) and present computational experiments for a hard problem (Tetris) illustrating an order of magnitude improvement over the ALP. 4 Analysis This section is dedicated to a theoretical analysis of the SALP. The overarching objective of this analysis is to provide some assurance of the soundness of the proposed approach. In addition, our analysis will serve as a crucial guide to practical implementation of the SALP. Our analysis will present two types of results: First, we prove approximation guarantees (Sections 4.1 and 4.2) that will indicate that the SALP computes approximations that are of comparable quality to the projection of J∗on the linear span of Φ. Second, we show (Section 4.3) that an implementable ‘sampled’ version of the SALP may be used to approximate the SALP with a tractable number of samples. All proofs can be found in the technical appendix. Idealized Assumptions: Given the broad scope of problems addressed by ADP algorithms, analyses of such algorithms typically rely on an ‘idealized’ assumption of some sort. In the case of the ALP, one either assumes the ability to solve a linear program with as many constraints as there are states, or absent that, knowledge of a certain idealized sampling distribution, so that one can then proceed with solving a ‘sampled’ version of the ALP. Our analysis of the SALP in this section is predicated on the knowledge of an idealized constraint violation distribution, which is this same idealized sampling distribution. In particular, we will require access to samples drawn according to the distribution πµ∗,ν given by π⊤ µ∗,ν ≜(1 −α)ν⊤(I −αPµ∗)−1. Here ν is an arbitrary initial distribution over states. The distribution πµ∗,ν may be interpreted as yielding the discounted expected frequency of visits to a given state when the initial state is distributed according to ν and the system runs under the optimal policy µ∗. We note that the ‘sampled’ ALP introduced by de Farias and Van Roy [2] requires access to states sampled according to precisely this distribution. 4.1 A Simple Approximation Guarantee We present a first, simple approximation guarantee for the following specialization of the SALP in (3): (4) maximize r,s ν⊤Φr subject to Φr ≤TΦr + s, π⊤ µ∗,νs ≤θ, s ≥0. Before we proceed to state our result, we define a useful function: (5) ℓ(r, θ) ≜ minimize s,γ γ subject to Φr −TΦr ≤s + γ1, π⊤ µ∗,νs ≤θ, s ≥0. ℓ(r, θ) is the minimum translation (in the direction of the vector 1) of an arbitrary weight vector r so as to result in a feasible vector for (4). We will denote by s(r, θ) the s component of the solution to (5). The following Lemma characterizes l(r, θ): Lemma 1. For any r ∈RK and θ ≥0: (i) ℓ(r, θ) is a bounded, decreasing, piecewise linear, convex function of θ. (ii) ℓ(r, θ) ≤(1 + α)∥J∗−Φr∥∞. (iii) ∂ ∂rℓ(r, 0) = − 1 P x∈Ω(r) πµ∗,ν(x), where Ω(r) = argmaxx∈X Φr(x) −TΦr(x). Armed with this definition, we are now in a position to state our first, crude approximation guarantee: 4 Theorem 1. Let 1 be in the span of Φ and ν be a probability distribution. Let ¯r be an optimal solution to the SALP (4). Moreover, let r∗satisfy r∗∈argminr ∥J∗−Φr∥∞. Then, ∥J∗−Φ¯r∥1,ν ≤∥J∗−Φr∗∥∞+ l(r∗, θ) + 2θ 1 −α . The above theorem allows us to interpret ℓ(r∗,θ)+2θ 1−α as the approximation error associated with the SALP solution ¯r. Consider setting θ = 0, in which case (4) is identical to the ALP. In this case, we have from Lemma 1 that ℓ(r∗, 0) ≤(1 + α)∥J∗−Φr∗∥∞, so that the right hand side of our bound is at most 2 1−α∥J∗−Φr∗∥∞. This is precisely Theorem 2 in de Farias and Van Roy [1]; we recover their approximation guarantee for the ALP. Next observe that, from (iii), if the set Ω(r∗) is of small probability according to the distribution πµ∗,ν, we expect that ℓ(r∗, θ) will decrease dramatically as θ is increased from 0. In the event that Φr∗(x) −TΦr∗(x) is large for only a small number of states (that is, the Bellman error of the approximation produced by r∗is large for only a small number of states), we thus expect to have a choice of θ for which l(r∗, θ) + 2θ ≪l(r∗, 0). Thus, Theorem 1 reinforces the intuition (shown via Figure 1) that the SALP will permit closer approximations to J∗ than the ALP. The bound in Theorem 1 leaves room for improvement: 1. The right hand side of our bound measures projection error, ∥J∗−Φr∗∥∞in the L∞-norm. Since it is unlikely that the basis functions Φ will provide a uniformly good approximation over the entire state space, the right hand side of our bound could be quite large. 2. The choice of state relevance weights can significantly influence the solution. While we do not show this here, this choice allows us to choose regions of the state space where we would like a better approximation of J∗. The right hand side of our bound, however, is independent of ν. 3. Our guarantee does not suggest a concrete choice of the violation budget, θ. The next section will present a substantially refined approximation bound. 4.2 A Better Approximation Guarantee With the intent of deriving stronger approximation guarantees, we begin this section by introducing a ‘nicer’ measure of the quality of approximation afforded by Φ. In particular, instead of measuring ∥J∗−Φr∗∥in the L∞norm as we did for our previous bounds, we will use a weighted max norm defined according to: ∥J∥∞,1/ψ ≜maxx∈X |J(x)|/ψ(x), where ψ : X →[1, ∞) is a given weighting function. The weighting function ψ allows us to weight approximation error in a non-uniform fashion across the state space and in this manner potentially ignore approximation quality in regions of the state space that ‘don’t matter’. In addition to specifying the constraint violation distribution π as we did for our previous bound, we will specify (implicitly) a particular choice of the violation budget θ. In particular, we will consider solving the following SALP: (6) maximize r,s ν⊤Φr − 2π⊤ µ∗,νs 1−α subject to Φr ≤TΦr + s, s ≥0. It is clear that (6) is equivalent to (4) for a specific choice of θ. We then have: Theorem 2. Let Ψ ≜{y ∈R|X| : y ≥1}. For every ψ ∈Ψ, let β(ψ) = maxµ Pµψ ψ ∞. Then, for an optimal solution (rSALP, ¯s) to (6), we have: ∥J∗−ΦrSALP∥1,ν ≤ inf r,ψ∈Ψ ∥J∗−Φr∥∞,1/ψ ν⊤ψ + 2(π⊤ µ∗,νψ + 1)(αβ(ψ) + 1) 1 −α ! . 5 It is worth placing the result in context to understand its implications. For this, we recall a closely related result shown by de Farias and Van Roy [1] for the ALP. In particular, de Farias and Van Roy [1] showed that given an appropriate weighting (or in their context, ‘Lyapunov’) function ψ, one may solve an ALP, with ψ in the span of the basis functions Φ; the solution to such an ALP then satisfies: ∥J∗−Φ¯r∥1,ν ≤inf r ∥J∗−Φr∥∞,1/ψ 2ν⊤ψ 1 −αβ(ψ) provided β(ψ) ≤1/α. Selecting an appropriate ψ in their context is viewed to be an important task for practical performance and often requires a good deal of problem specific analysis; de Farias and Van Roy [1] identify appropriate ψ for several queueing models (note that this is equivalent to identifying a desirable basis function). In contrast, the guarantee we present optimizes over all possible ψ1. Thus, the approximation guarantee of Theorem 2 allows us to view the SALP as automating the critical procedure of identifying a good Lyapunov function for a given problem. 4.3 Sample Complexity Our analysis thus far has assumed we have the ability to solve the SALP, a program with a potentially intractable number of constraints and variables. As it turns out, a solution to the SALP is well approximated by the solution to a certain ‘sampled’ program which we now describe: Let ˆ X = {x1, x2, . . . , xS} be an ordered collection of S states drawn independently from X according to the distribution πµ∗,ν. Let us consider solving the following program which we call the sampled SALP: (7) maximize r,s ν⊤Φr − 2 (1−α)S P x∈ˆ X s(x) subject to (Φr)(x) ≤(TΦr)(x) + s(x), ∀x ∈ˆ X, r ∈N, s ≥0. Here N ∈Rm is a parameter set chosen to contain the optimal solution to the SALP (6), rSALP. Notice that (7) is a linear program with S variables and S|A| constraints. For a moderate number of samples S, this is is easily solved. We will provide a sample complexity bound that indicates that for a number of samples S that scales linearly with the dimension of Φ, K, and that need not depend on the size of the state space, the solution to the sampled SALP satisfies, with high probability, the approximation guarantee presented for the SALP solution in Theorem 2. Let us define the constant B ≜supr∈N ∥(Φr −TΦr)+∥∞. This quantity is closely related to the diameter of the region N. We then have: Theorem 3. Under the conditions of Theorem 2, let rSALP be an optimal solution to the SALP (6), and let ˆrSALP be an optimal solution to the sampled SALP (7). Assume that rSALP ∈N. Further, given ϵ ∈(0, B] and δ ∈(0, 1/2], suppose that the number of sampled states S satisfies S ≥64B2 ϵ2  2(K + 2) log 16eB ϵ + log 8 δ  . Then, with probability at least 1 −δ −2−383δ128, ∥J∗−ΦˆrSALP∥1,ν ≤inf r∈N ψ∈Ψ ∥J∗−Φr∥∞,1/ψ ν⊤ψ + 2(π⊤ µ∗,νψ + 1)(αβ(ψ) + 1) 1 −α ! + 4ϵ 1 −α. Theorem 3 establishes that the sampled SALP provides a close approximation to the solution of the SALP, in the sense that the approximation guarantees we established for the SALP are approximately valid for the solution to the sampled version with high probability. The number of samples we require to accomplish this task is specified precisely via the theorem. This number depends linearly on the number of basis functions and the diameter of the 1This includes those ψ that do not satisfy the Lyapunov condition β(ψ) ≤1/α. 6 feasible region, but is otherwise independent of the size of the state space for the MDP under consideration. It is worth juxtaposing our sample complexity result with that available for the ALP. In particular, we recall that the ALP has a large number of constraints but a small number of variables; the SALP is thus, at least superficially, a significantly more complex program. Exploiting the fact that the ALP has a small number of variables, de Farias and Van Roy [2] establish a sample complexity bound for a sampled version of the ALP analogous (7). The number of samples required for this sampled ALP to produce a good approximation to the ALP can be shown to depend on the same problem parameters we have identified here, viz. B and the number of basis functions K. The sample complexity in that case is identical to the sample complexity bound established here up to constants and an additional multiplicative factor of B/ϵ (for the sampled SALP). Thus, the two sample complexity bounds are within polynomial terms of each other and we have established that the SALP is essentially no harder to solve than the ALP. This section places the SALP on solid theoretical ground by establishing strong approximation guarantees for the SALP that represent a substantial improvement over those available for the ALP and sample complexity results that indicated that the SALP was implementable via sampling. We next present a computational study that tests the SALP relative to other ADP methods (including the ALP) on a hard problem (the game of Tetris). 5 Case Study: Tetris Our interest in Tetris as a case study for the SALP algorithm is motivated by several facts. Theoretical results suggest that design of an optimal Tetris player is a difficult problem [4–6]. Tetris represents precisely the kind of large and unstructured MDP for which it is difficult to design heuristic controllers, and hence policies designed by ADP algorithms are particularly relevant. Moreover, Tetris has been employed by a number of researchers as a testbed problem [3, 7–9]. We follow the formulation of Tetris as a MDP presented by Farias and Van Roy [3]. The SALP methodology was applied as follows: Basis functions. We employed the 22 basis functions originally introduced in [7]. State sampling. Given a sample size S, a collection ˆ X ⊂X of S states was sampled. These samples were generated in an IID fashion from the stationary distribution of a (rather poor) baseline policy2. Optimization. Given the collection ˆ X of sampled states, an increasing sequence of choices of the violation budget θ ≥0 is considered. For each choice of θ, the optimization program (8) maximize r,s 1 S P x∈ˆ X (Φr)(x) subject to Φr(x) ≤TΦr(x) + s(x), ∀x ∈ˆ X, 1 S P x∈ˆ X s(x) ≤θ, s(x) ≥0, ∀x ∈ˆ X, was solved. This program is a version of the original SALP (3), but with sampled empirical distributions in place of the state-relevance weights ν and the constraint violation distribution π. Note that (8) has K + S decision variables and S|A| linear constraints. Because of the sparsity structure of the constraints, however, it is amenable to efficient solution via barrier methods, even for large values of S. Evaluation. Given a vector of weights obtained by solving (8), the performance of the corresponding policy is evaluated via Monte Carlo simulation over 3, 000 games of Tetris. Performance is measured in terms of the average number of lines cleared in a single game. For each pair (S, θ), the resulting average performance (averaged over 10 different sets of sampled states) is shown in Figure 2. It provides experimental evidence for the intuition expressed in Section 3 and the analytic result of Theorem 1: Relaxing the constraints of the ALP by allowing for a violation budget allows for better policy performance. As the violation budget θ is increased from 0, performance dramatically improves. At θ = 0.16384, the performance peaks, and we get policies that is an order of magnitude better than ALP, and beyond that the performance deteriorates. 2Our baseline policy had an average performance of 113 points. 7 50 100 150 200 250 300 ×103 0 2 4 ×103 Sample Size S Average Performance θ = 0.65536 θ = 0.16384 θ = 0.02048 θ = 0.01024 θ = 0.00256 θ = 0 (ALP) Figure 2: Average performance of SALP for different values of the number of sampled states S and the violation budget θ. Table 1 summarizes the performance of best policies obtained by various ADP algorithms. Note that all of these algorithms employ the same basis function architecture. The ALP and SALP results are from our experiments, while the other results are from the literature. The best performance results of SALP is better by a factor of 2 in comparison to the competitors. Algorithm Best Performance CPU Time ALP 897 hours TD-Learning [7] 3,183 minutes ALP with bootstrapping [3] 4,274 hours TD-Learning [8] 4,471 minutes Policy gradient [9] 5,500 days SALP 10,775 hours Table 1: Comparison of the performance of the best policy found with various ADP methods. Note that significantly better policies are possible with this basis function architecture than any of the ADP algorithms in Table 1 discover. Using a heuristic optimization method, Szita and L˝orincz [10] report policies with a remarkable average performance of 350,000. Their method is computationally intensive, however, requiring one month of CPU time. In addition, the approach employs a number of rather arbitrary Tetris specific ‘modifications’ that are ultimately seen to be critical to performance - in the absence of these modifications, the method is unable to find a policy for Tetris that scores above a few hundred points. 6 Future Directions There are a number of interesting directions that remain to be explored. First, note that the bounds derived in Sections 4.1 and 4.2 are approximation guarantees, which provide bounds on the approximation error given by the SALP approach versus the best approximation possible with the particular set of basis functions. In preliminary work, we have also developed performance guarantees. These provide bounds on the performance of the resulting SALP policies, as a function of the basis architecture. Second, note that sample path variations of the SALP are possible. Rather than solving a large linear program, such an algorithm would optimize a policy in an online fashion along a single system trajectory. This would be in a manner reminiscent of stochastic approximation algorithms like TD-learning. However, a sample path SALP variation would inherit all of the theoretical bounds developed here. The design and analysis of such an algorithm is an exciting future direction. 8 References [1] D. P. de Farias and B. Van Roy. The linear programming approach to approximate dynamic programming. Operations Research, 51(6):850–865, 2003. [2] D. P. de Farias and B. Van Roy. On constraint sampling in the linear programming approach to approximate dynamic programming. Mathematics of Operations Research, 293(3):462–478, 2004. [3] V. F. Farias and B. Van Roy. Tetris: A study of randomized constraint sampling. In Probabilistic and Randomized Methods for Design Under Uncertainty. Springer-Verlag, 2006. [4] J. Brzustowski. Can you win at Tetris? Master’s thesis, University of British Columbia, 1992. [5] H. Burgiel. How to lose at Tetris. Mathematical Gazette, page 194, 1997. [6] E. D. Demaine, S. Hohenberger, and D. Liben-Nowell. Tetris is hard, even to approximate. In Proceedings of the 9th International Computing and Combinatorics Conference, 2003. [7] D. P. Bertsekas and S. Ioffe. Temporal differences–based policy iteration and applications in neuro–dynamic programming. Technical Report LIDS–P–2349, MIT Laboratory for Information and Decision Systems, 1996. [8] D. P. Bertsekas and J. N. Tsitsiklis. Neuro-Dynamic Programming. Athena Scientific, Belmont, MA, 1996. [9] S. Kakade. A natural policy gradient. In Advances in Neural Information Processing Systems 14, Cambridge, MA, 2002. MIT Press. [10] I. Szita and A. L˝orincz. Learning Tetris using the noisy cross-entropy method. Neural Computation, 18:2936–2941, 2006. [11] D. Haussler. Decision theoretic generalizations of the PAC model for neural net and other learning applications. Information and Computation, 100:78–150, 1992. 9
2009
211
3,717
Explaining human multiple object tracking as resource-constrained approximate inference in a dynamic probabilistic model Edward Vul, Michael C. Frank, and Joshua B. Tenenbaum Department of Brain and Cognitive Sciences Massachusetts Institute of Technology Cambridge, MA 02138 {evul, mcfrank, jbt}@mit.edu George Alvarez Department of Psychology Harvard University Cambridge, MA 02138 alvarez@wjh.harvard.edu Abstract Multiple object tracking is a task commonly used to investigate the architecture of human visual attention. Human participants show a distinctive pattern of successes and failures in tracking experiments that is often attributed to limits on an object system, a tracking module, or other specialized cognitive structures. Here we use a computational analysis of the task of object tracking to ask which human failures arise from cognitive limitations and which are consequences of inevitable perceptual uncertainty in the tracking task. We find that many human performance phenomena, measured through novel behavioral experiments, are naturally produced by the operation of our ideal observer model (a Rao-Blackwelized particle filter). The tradeoff between the speed and number of objects being tracked, however, can only arise from the allocation of a flexible cognitive resource, which can be formalized as either memory or attention. 1 Introduction Since William James first described the phenomenology of attention [11], psychologists have been struggling to specify the cognitive architecture of this process, how it is limited, and how it helps information processing. The study of visual attention specifically has benefited from rich, simple paradigms, and of these multiple object tracking (MOT) [16] has recently gained substantial popularity. In a typical MOT task (Figure 1), subjects see a number of objects, typically colorless circles, moving onscreen. Some subset of the objects are marked as targets before the trial begins, but during the trial all objects turn to a uniform color and move haphazardly for several seconds. The task is to keep track of which objects were marked as targets at the start of the trial so that they can be identified at the end of the trial when the objects stop moving. The pattern of results from MOT experiments is complicated. Participants can only track a finite number of objects [16], but more objects can be tracked when they move slower [1], suggesting a limit on attentional speed. If objects are moved far apart in the visual field, however, they can be tracked at high speeds, suggesting that spatial crowding also limits tracking [9]. When tracking, participants seem to maintain information about the velocity of objects [19] and this information is sometimes helpful in tracking [8]. More frequently, however, velocity is not used to track, suggesting limitations on the kinds of information available to the tracking system [13]. Finally, although participants can track objects using features like color and orientation [3], some features seem to hurt tracking [15], and tracking is primarily considered to be a spatial phenomenon. These results and others have left researchers puzzled: What limits tracking performance? 1 Figure 1: Left: A typical multiple object tracking experiment. Right: The generative model underlying our probabilistic tracker (see text for details). Proposed limitations on MOT performance may be characterized along the dimensions of discreteness and flexibility. A proposal positing fixed number of slots (each holding one object) describes a discrete limitation, while proposals positing limits on attention speed or resolution are more continuous. Attention and working memory are canonical examples of flexible limitations: Based on the task, we decide where to attend and what to remember. Such cognitive limitations may be framed either as a discrete number of slots or as a continuous resource. In contrast, visual acuity and noise in velocity perception are low-level, task-independent limitations: Regardless of the task we are doing, the resolution of our retina is limited and our motion-discrimination thresholds are stable. Such perceptual limitations tend only to be continuous. We aim to determine which MOT effects reflect perceptual, task-independent uncertainty, and which reflect flexible, cognitive limitations. Our approach is to describe the minimal computations that an ideal observer must undertake to track objects and combine available information. To the extent that an effect is not naturally explained at the computational level given only perceptual sources of uncertainty, it is more likely to reflect flexible cognitive limitations. We propose that humans track objects in a manner consistent with the Bayesian multi-target tracking framework common in computer vision [10, 18]. We implement a variant of this tracking model using Rao-Blackwellized particle filtering and show how it can be easily adapted for a wide range of MOT experiments. This unifying model allows us to design novel experiments that interpolate between seemingly disparate phenomena. We argue that, since the effects of speed, spacing, and features arise naturally in an ideal observer with no limits on attention, memory, or number of objects that can be tracked, these phenomena can be explained by optimal object tracking given low-level, perceptual sources of uncertainty. We identify a subset of MOT phenomena that must reflect flexible cognitive resources, however: effects that manipulate the number of objects that can be tracked. To account for tradeoffs between object speed and number, a task-dependent resource constraint must be added to our model. This constraint can be interpreted as either limited attentional resolution or limited short term memory. 2 Optimal multiple object tracking To track objects in a typical MOT experiment (Figure 1), at each point in time the observer must determine which of many observed objects corresponds to which of the objects that were present in the display in the last frame. Here we will formalize this procedure using a classical tracking algorithm in computer vision[10, 18]. 2.1 Dynamics Object tracking requires some assumptions about how objects evolve over time. Since there is no consensus on how to generate object tracking displays in the visual attention literature, we will assume simple linear dynamics, which can approximate prior experimental manipulations. Specifically, we assume that the true state of the world St contains information about each object being tracked (i): to start we consider objects defined by position (xt(i)) and velocity (vt(i)), but we will later consider tracking objects through more complicated feature-spaces. Although we refer to position and velocity, the state actually contains two position and two velocity dimensions: one of each for x and y. 2 St evolves according to linear dynamics with noise. Position and velocity for x and y evolve independently according to an Ornstein-Uhlenbeck (mean-reverting) process, which can be thought of as Brownian motion on a spring, and can be most clearly spelled out as a series of equations: xt = xt−1 +vt, vt = λvt−1 −kxt−1 +wt, wt ∼N(0,σw) (1) where x and v are the position and velocity at time t; λ is an inertia parameter constrained to be between 0 and 1; k is a spring constant which produces the mean-reverting properties of the dynamics; and wt is random acceleration noise added at each time point which is distributed as a zero-mean Gaussian with standard deviation σw. In two dimensions, this stochastic process describes a randomly moving cloud of objects; the spring constant assures that the objects will not drift off to infinity, and the friction parameter assures that they will not accelerate to infinity. Within the range of parameters we consider, this process converges to a stable distribution of positions and velocities both of which will be normally distributed around zero. We can solve for the standard deviations for position (σx) and velocity (σv), by assuming that the expected values of σx, σv and their covariance will not change through an update step; thus obtaining: σx = s (1+λ)σ2w k(λ−1)(2λ−k −2) , and σv = s 2σ2w k(λ−1)(2λ−k +2), (2) respectively. Because these terms are familiar in the human multiple object tracking literature, for the rest of this paper we will describe the dynamics in terms of the spatial extent of the cloud of moving dots (σx), the standard deviation of the velocity distribution (σv ), and the inertia parameter (λ; solving for k and σw to generate dynamics and track objects). 2.2 Probabilistic model The goal of an object tracking model is to track the set of n objects in S over a fixed period from t0 to tm. For our model, we assume observations (mt) at each time t are noisy measurements of the true state of the world at that time (St). In other words, our tracking model is a stripped-down simplification of tracking models commonly used in computer vision because we do not track from noisy images, but instead, from extracted position and velocity estimates. The observer must estimate St based on the current, and previous measurements, thus obtaining ˆSt. However, this task is complicated by the fact that the observer obtains an unlabeled bag of observations (mt), and does not know which observations correspond to which objects in the previous state estimate ˆSt−1. Thus, the observer must not only estimate St, but must also determine the data assignment of observations to objects — which can be described by a permutation vector γt. Since we assume independent linear dynamics for each individual object, then conditioned on γ, we can track each individual object via a Kalman filter. That is, what is a series of unlabeled bags of observations when data assignments were unknown, becomes a set of individuated time-series — one for each object — in which each point in time contains only a single observation when conditioned on the data assignment. The Kalman filter will be updated via transition matrix A, according to St = ASt−1 +Wt, and state perturbations W are distributed with covariance Q (A and Q can be derived straight-forwardly from the dynamics in Eq. 1; see Supplementary Materials). Inference about both the state estimate and the data assignment can proceed by predicting the current location for each object, which will be a multivariate normal distribution with mean predicted state ˆSt|t−1 = A ˆSt−1 and predicted estimate covariance Gt|t−1 = AGt−1A′ +Q. From these predictions, we can define the probability of a particular data assignment permutation vector as: P(γt|St,Gt,Mt) = ∏ i P(γt(i)| ˆSt|t−1(i),Gt|t−1(i),Mt(i)), where P(γi| ˆSt|t−1(i),Gt|t−1(i)) = N(mt(γ(i)); ˆSt|t−1(i),Gt|t−1(i)+Mt(γ(i))) (3) where the posterior probability of a particular γ value is determined by the Gaussian probability density, and Mt(j) is the covariance of measurement noise for mt(j). Because an observation can 3 arise from only one object, mutual exclusivity is built into this conditional probability distribution — this complication makes analytical solutions impossible, and the data assignment vector, γ, must be sampled. However, given an estimate of γ, an estimate of the current state of the object is given by the Kalman state update ([12]; see Supplementary Materials). 2.3 Inference To infer the state of the tracking model described above, we must sample the data-association vector, γ, and then the rest of the tracking may proceed analytically. Thus, we implement a RaoBlackwelized particle filter [6]: each particle corresponds to one sampled γ vector and contains the analytically computed state estimates for each of the objects, conditioned on that sampled γ vector. Thus, taken together, the particles used for tracking (in our case we use 50, but see Section 3.4 for discussion) approximate the joint probability distribution over γ and S. In practice, we sample γ with the following iterative procedure. First, we sample each component of γ independently of all other γ components (as in PMHT [18]). Then, if the resulting γ vector contains conflicts that violate the mutual exclusivity of data assignments, a subset of γ is resampled. If this resampling procedure fails to come up with an assignment vector that meets the mutual exclusivity, we compute the combinatoric expansion of the permutation of the conflicted subset of γ and sample assignments within that subset from the combinatoric space. This procedure is very fast when tracking is easy, but can slow down when tracking is hard and the combinatoric expansion is necessary. 2.4 Perceptual uncertainty In order to determine the limits on optimal tracking in our model, we must know what information human observers have access to. We assume that observers know the summary statistics of the cloud of moving dots (their spatial extent, given by σx, and their velocity distribution, σv). We also start with the assumption that they know the inertia parameter (λ; however, this assumption will be questioned in section 3.2). Given a perfect measurement of σx, σv, and λ, observers will thus know the dynamics by which the objects evolve. We must also specify the low-level, task-independent noise for human observers. We assume that noise in observing the positions of objects (σmx) is given by previously published eccentricity scaling parameters, σmx(x) = c(1 + 0.42x) (from [5]), where c is uncertainty in position. We use c = 0.08 (standard deviation in degrees visual angle) throughout this paper. We also assume that observations of speed are corrupted by Weber-scaled noise with some irreducible uncertainty (a): σmv(v) = a+bv, setting a = 0.01 and b = 0.05 (b is the weber fraction as measured in [17]). 3 Results 3.1 Tracking through space When objects move faster, tracking them is harder [1], suggesting to researchers that an attentional speed limit may be limiting tracking. However, when objects cover a wider area of space (when they move on a whole field display), they can be tracked more easily at a given speed, suggesting that crowding rather than speed is the limiting factor [9]. Both of these effects are predicted by our model: both the speed and spatial separation of objects alter the uncertainty inherent in the tracking task. When objects move faster (greater σv) predictions about about where objects will be on the next time-step have greater uncertainty: the covariance of the predicted state (Gt|t−1) has greater entropy and inference about which observation arose from which object (γ) is less certain and more prone to errors. Additionally, even at a given speed and inertia, when the spatial extent (σx) is smaller, objects are closer together. Even given a fixed uncertainty about where in space an object will end up, the odds of another object appearing therein is greater, again limiting our ability to infer γ. Thus, both increasing velocity variance and decreasing spatial variance will make tracking harder, and to achieve a particular level of performance the two must trade off. 4 Figure 2: Top: Stimuli and data from [9] — when objects are tracked over the whole visual field, they can move at greater speed to achieve a particular level of accuracy. Bottom-Left: Our own experimental data in which subjects set a “comfortable” spacing for tracking 3 of 6 objects at a particular speed. Bottom-Middle: Model accuracy for tracking 3 of 6 objects as a function of speed and spacing. Bottom-Right: Model “settings” — (85% accuracy) threshold spacing for a particular speed. See text for details. We show the speed-space tradeoff in both people and our ideal tracking model. We asked 10 human observers to track 3 of 6 objects moving according to the dynamics described earlier. Their goal was to adjust the difficulty of the tracking task so that they could track the objects for 5 seconds. We told them that sometimes tracking would be too hard and sometimes too easy, and they could adjust the difficulty by hitting one button to make the task easier and another button to make it harder.1 Making the task easier or harder amounted to moving the objects farther apart or closer together by adjusting σx of the dynamics, while the speed (σv) stayed constant. We parametrically varied σv between 0.01 and 0.4, and could thus obtain an iso-difficulty curve for people making settings of σx as a function of σv (2). To elicit predictions from our model on this task we simulated 5 second trials where the model had to track 3 of 6 objects, and measured accuracy across 15 spacing intervals (σx between 0.5 and 4.0 degrees visual angle), crossed with 11 speeds (σv between 0.01 and 0.4). At each point in this speedspace grid, we simulated 250 trials, to measure mean tracking accuracy for the model. The resulting accuracy surface is shown in Figure 2 — an apparent tradeoff can be seen, when objects move faster, they must be farther apart to achieve the same level of accuracy as when they move slower. To make the model generate thresholds of σx for a particular σv, as we had human subjects do, we fit psychometric functions to each cross-section through the accuracy surface, and used the psychometric function to predict settings that would achieve a particular level of accuracy (one such psychometric function is shown in red on the surface in Figure2).2 The plot in Figure 2 shows the model setting for the 0.85 accuracy mark; the upper and lower error bounds represent the settings to achieve an accuracy of 0.8 and 0.9, respectively (in subsequent plots we show only the 0.85 threshold for simplicity). As in the human performance, there is a continuous tradeoff: when objects are faster, spacing must be wider to achieve the same level of difficulty. 1The correlation of this method with participants’ objective tracking performance was validated by [1]. 2We used the Weibull cumulative density as our psychometric function p = 1 −exp(x/xcrit)s, where x is the stimulus dimension which, which covaries positively with performance (either σx, or 1/σv), xcrit is the location term, and s is the scale, or slope, parameter. We obtained the MAP estimate of both parameters of the Weibull density function, and predicted the model’s 85% threshold (blue plane in Figure 2) from the inverse of the psychometric function: x = −xcrit ln(1−p)1/s. 5 Figure 3: Left: Human speed-space tradeoff settings do not vary for different physical inertias. Middle panels: This is the case for the ideal model with no knowledge of inertia, but not so for the ideal model with perfect knowledge of inertia. Right: This may be the case because it is safer to assume a lower inertia: tracking is worse if inertia is assumed to be higher than it is (red) than vice versa (green). 3.2 Inertia It is disputed whether human observers use velocity to track[13]. Nonetheless, it is clear that adults, and even babies, know something about object velocity [19]. The model we propose can reconcile these conflicting findings. In our model, knowing object velocity means having an accurate σv term for the object: an estimate of how much distance it might cover in a particular time step. Using velocity trajectories to make predictions about future states also requires that people know the inertia term. Thus, the degree to which trajectories are used to track is a question about the inertia parameter (λ) that best matches human performance. Thus far we have assumed that people know λ perfectly and use it to predict future states, but this need not be the case. Indeed, while the two other parameters of the dynamics — the spatial extent (σx) and velocity distribution (σv) — may be estimated quickly and efficiently from a brief observation of the tracking display, inertia is more difficult to estimate. Thus, observers may be more uncertain about the inertia, and may be more likely to guess it incorrectly. (Under our model, a guess of λ = 0 corresponds to tracking without any velocity information.) We ran an experiment to assess what inertia parameter best fits human observers. We asked subjects to set iso-difficulty contours as a function of the underlying inertia (λ) parameter, by using the same difficulty-setting procedure described earlier. An ideal observer who knows the inertia perfectly will greatly benefit from displays with high inertia in which uncertainty will be low, and will be able to track with the same level of accuracy at greater speeds given a particular spacing. However, if inertia is incorrectly assumed to be zero, high- and low-inertia iso-difficulty contours will be quite similar (Figure 3). We find that in human observers, iso-difficulty contours for λ = 0.7, λ = 0.8, and λ = 0.9, are remarkably similar — consistent with observers assuming a single, low, inertia term. Although these results corroborate previous findings that human observers do not seem to use trajectories to track, there is evidence that sometime people do use trajectories. These variations in observers’ assumptions about inertia may be attributable to two factors. First, most MOT experiments including rather sudden changes in velocity from objects bouncing off the walls or simply as a function of their underlying dynamics. Second, under uncertainty about the inertia underlying a particular display, an observer is better off underestimating rather than overestimating. Figure 3 shows the decrement in performance as a function of a mismatch of the observers’ assumed inertia to that of the tracking display. 3.3 Tracking through feature space In addition to tracking through space, observers can also track objects through feature domains. For example, experimental participants can track two spatially superimposed gratings based on their slowly varying colors, orientations or spatial frequencies [3]. We can modify our model to track in feature space by adding new dimensions corresponding to the features being tracked. Linear feature dimensions like the log of spatial frequency can be treated exactly like position and velocity. Circular features like hue angle and orientation require a slight 6 Figure 4: Left: When object color drifts more slowly over time (lower σc), people can track objects more effectively. Right: Our tracking model does so as well (observation noise for color σmc in the model was set to 0.02π) modification: we pre-process the state estimates and observations via modulus to preserve their circular relationship and the linear the Kalman update. With this modification, the linear Kalman state update can operate on circular variables, and our basic tracking model can track colored objects with a high level of accuracy when they are superimposed (σx = σv = 0, Figure 4). We additionally tested the novel prediction from our model that human observers can combine the information available from space and features for tracking. Nine human observers made iso-difficulty settings as described above; however, this time each object had a color and we varied the color drift rate (σc) on hue angle. Figure 4 shows subjects’ settings of σx as a function of σv and σc. When color changes slowly, observers can track objects in a smaller space at a given velocity. Figure 4 also shows that the pattern of thresholds from the model in the same task match those of the experimental participants. Thus, not only can human observers track objects in feature space, they can combine both spatial location and featural information, and additional information in the feature domain allows people to track successfully with less spatial information, as argued by [7]. 3.4 Cognitive limitations Thus far we have shown that many human failures in multiple object tracking do not reflect cognitive limitations on tracking, but are instead a consequence of the structure of the task and the limits on available perceptual information. However, a limit on the number of objects that may be tracked [16] cannot be accounted for in this way. Observers can more easily track 4 of 16 objects at a higher speed than 8 of 16 objects (Figure 5), even though the stimulus presentation is identical in both cases [1]. Thus, this limitation must be a consequence of uncertainty that may be modulated by task — a flexible resource [2]. Within our model, there are two plausible alternatives for what such a limited resource may be: visual attention, which improves the fidelity of measurements; or memory, which enables more or less noiseless propagation of state estimates through time3. In both cases, when more objects are tracked, less of the resource is available for each object, resulting in an increase of noise and uncertainty. At a superficial level, both memory and attention resources amount to a limited amount of gain to be used to reduce noise. Given the linear Kalman filtering computation we have proposed as underlying tracking, equal magnitude noise in either will have the same effects. Thus, to avoid the complexities inherent in allocating attention to space, we will consider memory limitations, but this resource limitation can be thought of as “attention gain” as well (though some of our work suggests that memory may be a more appropriate interpretation). We must decide on a linking function between the covariance U of the memory noise, and the number of objects tracked. It is natural to propose that covariance scales positively with the number of objects tracked – that is U for n objects would be equal to Un = U1n. This expression captures the idea that task modulated noise should follow the σ ∝√n rule, as would be the case if the state for a given object were stored or measured with a finite number of samples. With more samples, 3One might suppose that limiting the number of particles used for tracking as in [4] and [14], might be a likely resource capacity; however, in object tracking, having more particles produces a benefit only insofar as future observations might disambiguate previous inferences. In multiple object tracking with uniform dots (as is the case in most human experiments) once objects have been mis-associated, no future observations can provide evidence of a mistake having been made in the past; and as such, having additional particles to keep track of low-probability data associations carries no benefit. 7 Figure 5: Left: When more objects are tracked (out of 16) they must move at a slower speed to reach a particular level of accuracy [1]. Right: Our model exhibits this effect only if task-dependent uncertainty is introduced (see text). precision would increase; however, because the number of samples available is fixed at c, the number of samples per object would be c/n, giving rise to the scaling rule described above. In Figure 5 we add such a noise-term to our model and measure performance (threshold speed — σv — for a given number of targets nt, when spacing is fixed, σx = 4, and the total number of objects is also fixed n = 16). The characteristic tradeoff between the number of targets, and the speed with which they may be tracked is clearly evident. Thus, while many results in MOT arise as consequences of the information available for the computational task, the speed-number tradeoff seems to be the result of a flexibly-allocated resource such as memory or attention. 4 Conclusions We investigated what limitations are responsible for human failures in multiple object tracking tasks. Are such limitations discrete (like a fixed number of objects) or continuous (like memory)? Are they flexible with task (cognitive resources such as memory and attention), or are they task-independent (like perceptual noise)? We modified a Bayes-optimal tracking solution for typical MOT experiments and implemented this solution using a Rao-Blackwellized particle filter. Using novel behavioral experiments inspired by the model, we showed that this ideal observer exhibits many of the classic phenomena in multiple object tracking given only perceptual uncertainty (a continuous, task-independent source of limitation). Just as for human observers, tracking in our model is harder when objects move faster or are closer together; inertia information is available, but may not be used; and objects can be tracked in features as well as space. However, effects of the number of objects tracked do not arise from perceptual uncertainty alone. To account for the tradeoff between the number of objects tracked and their speed, a task-dependent resource must be introduced – we introduce this resource as a memory constraint, but it may well be attentional gain. Although the dichotomy of flexible, cognitive resources and task-independent, low-level uncertainty is a convenient distinction to start our analysis, it is misleading. When engaging in any real world task this distinction is blurred: people will use whatever resources they have to facilitate performance; even perceptual uncertainty as basic as the resolution of the retina becomes a flexible resource when people are allowed to move their eyes (they were not allowed to do so in our experiments). Connecting resource limitations measured in controlled experiments to human performance in the real world requires that we address not only what the structure of the task may be, but also how human agents allocate resources to accomplish this task. Here we have shown that a computational model of the multiple object tracking task can unify a large set of experimental findings on human object tracking, and most importantly, determine how these experimental findings map onto cognitive limitations. Because our findings implicate a flexible cognitive resource, the next necessary step is to investigate how people allocate such a resource, and this question will be pursued in future work. Acknowledgments: This work was supported by ONR MURI: Complex Learning and Skill Transfer with Video Games N00014-07-1-0937 (PI: Daphne Bavelier); NDSEG fellowship to EV and NSF DRMS Dissertation grant to EV. 8 References [1] G. Alvarez and S. Franconeri. How many objects can you attentively track?: Evidence for a resourcelimited tracking mechanism. Journal of Vision, 7(13):1–10, 2007. [2] P. Bays and M. Husain. Dynamic shifts of limited working memory resources in human vision. Science, 321(5890):851, 2008. [3] E. Blaser, Z. Pylyshyn, and A. Holcombe. Tracking an object through feature space. Nature, 408(6809):196 – 199, 2000. [4] S. Brown and M. Steyvers. Detecting and predicting changes. Cognitive Psychology, 58:49–67, 2008. [5] M. Carrasco and K. Frieder. Cortical magnification neutralizes the eccentricity effect in visual search. Vision Research, 37(1):63–82, 1997. [6] A. Doucet, N. de Freitas, K. Murphy, and S. Russell. Rao-Blackwellised particle filtering for dynamic Bayesian networks. In Proceedings of Uncertainty in AI, volume 00, 2000. [7] J. Feldman and P. Tremoulet. Individuation of visual objects over time. Cognition, 99:131–165, 2006. [8] D. E. Fencsik, J. Urrea, S. S. Place, J. M. Wolfe, and T. S. Horowitz. Velocity cues improve visual search and multiple object tracking. Visual Cognition, 14:92–95, 2006. [9] S. Franconeri, J. Lin, Z. Pylyshyn, B. Fisher, and J. Enns. Evidence against a speed limit in multiple object tracking. Psychonomic Bulletin & Review, 15:802–808, 2008. [10] F. Gustafsson, F. Gunnarsson, N. Bergman, U. Forssell, J. Jansson, R. Karlsson, and P. Nordlund. Particle filters for positioning, navigation, and tracking. In IEEE Transactions on Signal Processing, volume 50, 2002. [11] W. James. The Principles of Psychology. Harvard University Press, Cambridge, 1890. [12] R. Kalman. A new approach to linear filtering and prediction problems. J. of Basic Engineering, 82D:35– 45, 1960. [13] B. P. Keane and Z. W. Pylyshyn. Is motion extrapolation employed in multiple object tracking? Tracking as a low-level non-predictive function. Cognitive Psychology, 52:346 – 368, 2006. [14] R. Levy, F. Reali, and T. Griffiths. Modeling the effects of memory on human online sentence processing with particle filters. In Advances in Neural Information Processing Systems, volume 21, 2009. [15] T. Makovski and Y. Jiang. Feature binding in attentive tracking of distinct objects. Visual Cognition, 17:180 – 194, 2009. [16] Z. W. Pylyshyn and R. W. Storm. Tracking multiple independent targets: Evidence for a parallel tracking mechanism. Spatial Vision, 3:179–197, 1988. [17] R. Snowden and O. Braddick. The temporal integration and resolution of velocity signals. Vision Research, 31(5):907–914, 1991. [18] R. Streit and Luginbuhl. Probabilistic multi-hypothesis tracking. Technical report 10428, NUWC, Newport, Rhode Island, USA, 1995. [19] S. P. Tripathy and B. T. Barrett. Severe loss of positional information when detecting deviations in multiple trajectories. Journal of Vision, 4(12):1020 – 1043, 2004. 9
2009
212
3,718
Graph-based Consensus Maximization among Multiple Supervised and Unsupervised Models Jing Gao†, Feng Liang†, Wei Fan‡, Yizhou Sun†, and Jiawei Han† †University of Illinois at Urbana-Champaign, IL USA ‡IBM TJ Watson Research Center, Hawthorn, NY USA †{jinggao3,liangf,sun22,hanj}@illinois.edu, ‡weifan@us.ibm.com Abstract Ensemble classifiers such as bagging, boosting and model averaging are known to have improved accuracy and robustness over a single model. Their potential, however, is limited in applications which have no access to raw data but to the meta-level model output. In this paper, we study ensemble learning with output from multiple supervised and unsupervised models, a topic where little work has been done. Although unsupervised models, such as clustering, do not directly generate label prediction for each individual, they provide useful constraints for the joint prediction of a set of related objects. We propose to consolidate a classification solution by maximizing the consensus among both supervised predictions and unsupervised constraints. We cast this ensemble task as an optimization problem on a bipartite graph, where the objective function favors the smoothness of the prediction over the graph, as well as penalizing deviations from the initial labeling provided by supervised models. We solve this problem through iterative propagation of probability estimates among neighboring nodes. Our method can also be interpreted as conducting a constrained embedding in a transformed space, or a ranking on the graph. Experimental results on three real applications demonstrate the benefits of the proposed method over existing alternatives1. 1 Introduction We seek to integrate knowledge from multiple information sources. Traditional ensemble methods such as bagging, boosting and model averaging are known to have improved accuracy and robustness over a single model. Their potential, however, is limited in applications which have no access to raw data but to the meta-level model output. For example, due to privacy, companies or agencies may not be willing to share their raw data but their final models. So information fusion needs to be conducted at the decision level. Furthermore, different data sources may have different formats, for example, web video classification based on image, audio and text features. In these scenarios, we have to combine incompatible information sources at the coarser level (predicted class labels) rather than learn the joint model from raw data. In this paper, we consider the general problem of combining output of multiple supervised and unsupervised models to improve prediction accuracy. Although unsupervised models, such as clustering, do not directly generate label predictions, they provide useful constraints for the classification task. The rationale is that objects that are in the same cluster should be more likely to receive the same class label than the ones in different clusters. Furthermore, incorporating the unsupervised clustering models into classification ensembles improves the base model diversity, and thus has the potential of improving prediction accuracy. 1More information, data and codes are available at http://ews.uiuc.edu/∼jinggao3/nips09bgcm.htm 1 1 5 2 4 3 6 7 1 5 2 4 3 6 7 1 2 3 7 9 8 Figure 1: Groups g1 …... [0 0 1] M1 Classifier [1 0 0] [0 0 1] …... …... …... [1 0 0] g3 g4 g6 g7 g9 g10 g12 x1 x2 x3 x4 x5 x6 x7 M2 Classifier M3 Clustering M4 Clustering Figure 2: Bipartite Graph Single Models Ensemble at Raw Data Ensemble at Output Level K-means, Spectral Clustering, …... Semi-supervised, Transductive Learning SVM, Logistic Regression, …... Multi-view Learning Bagging, Boosting, Bayesian model averaging, …... Unsupervised Learning Supervised Learning Semisupervised Learning Clustering Ensemble Consensus Maximization Majority Voting Mixture of Experts, Stacked Generalization Figure 3: Position of Consensus Maximization Suppose we have a set of data points X = {x1, x2, . . . , xn} from c classes. There are m models that provide information about the classification of X, where the first r of them are (supervised) classifiers, and the remaining are (unsupervised) clustering algorithms. Consider an example where X = {x1, . . . , x7}, c = 3 and m = 4. The output of the four models are: M1 = {1, 1, 1, 2, 3, 3, 2} M2 = {1, 1, 2, 2, 2, 3, 1} M3 = {2, 2, 1, 3, 3, 1, 3} M4 = {1, 2, 3, 1, 2, 1, 1} where M1 and M2 assign each object a class label, whereas M3 and M4 simply partition the objects into three clusters and assign each object a cluster ID. Each model, no matter it is supervised or unsupervised, partitions X into groups, and objects in the same group share either the same predicted class label or the same cluster ID. We summarize the data, models and the corresponding output by a bipartite graph. In the graph, nodes at the left denote the groups output by the m models with some labeled ones from the supervised models, nodes at the right denote the n objects, and a group and an object are connected if the object is assigned to the group by one of the models. For the aforementioned toy example, we show the groups obtained from a classifier M1 and a clustering model M3 in Figure 1, as well as the group-object bipartite graph in Figure 2. The objective is to predict the class label of xi ∈X, which agrees with the base classifiers’ predictions, and meanwhile, satisfies the constraints enforced by the clustering models, as much as possible. To reach maximum consensus among all the models, we define an optimization problem over the bipartite graph whose objective function penalizes deviations from the base classifiers’ predictions, and discrepancies of predicted class labels among nearby nodes. In the toy example, the consensus label predictions for X should be {1, 1, 1, 2, 2, 3, 2}. Related Work. We summarize various learning problems in Figure 3, where one dimension represents the goal – from unsupervised to supervised, and the other dimension represents the method – single models, ensembles at the raw data, or ensembles at the output level. Our proposed method is a semi-supervised ensemble working at the output level, where little work has been done. Many efforts have been devoted to develop single-model learning algorithms, such as Support Vector Machines and logistic regression for classification, K-means and spectral clustering for clustering. Recent studies reveal that unsupervised information can also be utilized to improve the accuracy of supervised learning, which leads to semi-supervised [29, 8] and transductive learning [21]. Although our proposed algorithm works in a transductive setting, existing semi-supervised and transductive learning methods cannot be easily applied to our problem setting and we discuss this in more detail at the end of Section 2. Note that all methods listed in Figure 3 are for single task learning. On the contrary, multi-task learning [6, 9] deals with multiple tasks simultaneously by exploiting dependence among tasks, which has a different problem setting and thus is not discussed here. In Figure 3, we divide ensemble methods into two categories depending on whether they require access to raw data. In unsupervised learning, many clustering ensemble methods [12, 17, 25, 26] have been developed to find a consensus clustering from multiple partitionings without accessing the features. In supervised learning, however, only majority voting type algorithms work on the model output level, and most well-known classification ensemble approaches [2, 11, 19] (eg. bagging, boosting, bayesian model averaging) involve training diversified classifiers from raw data. Methods such as mixture of experts [20] and stacked generalization [27] try to obtain a meta-learner on top of the model output, however, they still need the labels of the raw data as feedbacks, so we position them as an intermediate between raw data ensemble and output ensemble. In multi-view 2 learning [4, 13], a joint model is learnt from both labeled and unlabeled data from multiple sources. Therefore, it can be regarded as a semi-supervised ensemble requiring access to the raw data. Summary. The proposed consensus maximization problem is a challenging problem that cannot be solved by simple majority voting. To achieve maximum agreement among various models, we must seek a global optimal prediction for the target objects. In Section 2, we formally define the graph-based consensus maximization problem and propose an iterative algorithm to solve it. The proposed solution propagates labeled information among neighboring nodes until stabilization. We also present two different interpretations of the proposed method in Section 3, and discuss how to incorporate feedbacks obtained from a few labeled target objects into the framework in Section 4. An extensive experimental study is carried out in Section 5, where the benefits of the proposed approach are illustrated on 20 Newsgroup, Cora research papers, and DBLP publication data sets. 2 Methodology Suppose we have the output of r classification algorithms and (m −r) clustering algorithms on a data set X. For the sake of simplicity, we assume that each point is assigned to only one class or cluster in each of the m algorithms, and the number of clusters in each clustering algorithm is c, same as the number of classes. Note that cluster ID z may not be related to class z. So each base algorithm partitions X into c groups and there are totally v = mc groups, where the first s = rc groups are generated by classifiers and the remaining v −s groups are from clustering algorithms. Before proceeding further, we introduce some notations that will be used in the following discussion: Bn×m denotes an n×m matrix with bij representing the (ij)-th entry, and⃗bi· and⃗b·j denote vectors of row i and column j, respectively. See Table 1 for a summary of important symbols. We represent the objects and groups in a bipartite graph as shown in Figure 2, where the object nodes x1, . . . , xn are on the right, the group nodes g1, . . . , gv are on the left. The affinity matrix An×v of this graph summarizes the output of m algorithms on X: aij = 1, if xi is assigned to group gj by one of the algorithms; 0, otherwise. We aim at estimating the conditional probability of each object node xi belonging to c classes. As a nuisance parameter, the conditional probabilities at each group node gj are also estimated. These conditional probabilities are denoted by Un×c for object nodes and Qv×c for group nodes: uiz = ˆP(y = z|xi) and qjz = ˆP(y = z|gj). Since the first s = rc groups are obtained from supervised learning models, they have some initial class label estimates denoted by Yv×c where yjz = 1, if gj’s predicted label is z, j = 1, . . . , s; 0, otherwise. Let kj = Pc z=1 yjz, and we formulate the consensus agreement as the following optimization problem on the graph: min Q,U f(Q, U) = min Q,U ³ n X i=1 v X j=1 aij||⃗ui· −⃗qj·||2 + α v X j=1 kj||⃗qj· −⃗yj·||2´ (1) s.t. ⃗ui· ≥⃗0, |⃗ui·| = 1, i = 1 : n ⃗qj· ≥⃗0, |⃗qj·| = 1, j = 1 : v where ||.|| and |.| denote a vector’s L2 and L1 norm respectively. The first term ensures that if an object xi is assigned to group gj by one of the algorithm, their conditional probability estimates must be close. When j = 1, . . . , s, the group node gj is from a classifier, so kj = 1 and the second term puts the constraints that a group gj’s consensus class label estimate should not deviate much from its initial class label prediction. α is the shadow price payment for violating the constraints. When j = s + 1, . . . , v, gj is a group from an unsupervised model with no such constraints, and thus kj = 0 and the weight of the constraint is 0. Finally, ⃗ui· and ⃗qj· are probability vectors, and therefore each component must be greater than or equal to 0 and the sum equals to 1. We propose to solve this problem using block coordinate descent methods as shown in Algorithm 1. At the t-th iteration, if we fix the value of U, the objective function is a summation of v quadratic components with respect to ⃗qj·. The corresponding Hessian matrix is diagonal with entries equal to 3 Algorithm 1 BGCM algorithm Input: group-object affinity matrix A, initial labeling matrix Y ; parameters α and ϵ; Output: consensus matrix U; Algorithm: Initialize U 0,U 1 randomly t ←1 while ||U t −U t−1|| > ϵ do Qt = (Dv+αKv)−1(AT U t−1+αKvY ) U t = D−1 n AQt return U t Table 1: Important Notations Symbol Definition 1, . . . , c class indexes 1, . . . , n object indexes 1, . . . , s indexes of groups from supervised models s + 1, . . . , v indexes of groups from unsupervised models An×v = [aij] aij-indicator of object i in group j Un×c = [uiz] uiz-probability of object i wrt class z Qv×c = [qjz] qjz-probability of group j wrt class z Yv×c = [yjz] yjz-indicator of group j predicted as class z Pn i=1 aij + αkj > 0. Therefore it is strictly convex and ∇⃗qj·f(Q, U (t−1)) = 0 gives the unique global minimum of the cost function with respect to ⃗qj· in Eq. (2). Similarly, fixing Q, the unique global minimum with respect to ⃗ui· is also obtained. ⃗q (t) j· = Pn i=1 aij⃗u (t−1) i· + αkj⃗yj· Pn i=1 aij + αkj ⃗u (t) i· = Pv j=1 aij⃗q (t) j· Pv j=1 aij (2) The update formula in matrix forms are given in Algorithm 1. Dv = diag © (Pn i=1 aij) ª v×v and Dn = diag © (Pv j=1 aij) ª n×n act as the normalization factors. Kv = diag © (Pc z=1 yjz) ª v×v indicates the existence of constraints on the group nodes. During each iteration, the probability estimate at each group node (i.e., Q) receives the information from its neighboring object nodes while retains its initial value Y , and in return the updated probability estimates at group nodes propagate the information back to its neighboring object nodes when updating U. It is straightforward to prove that (Q(t), U (t)) converges to a stationary point of the optimization problem [3]. In [14], we proposed a heuristic method to combine heterogeneous information sources. In this paper, we bring up the concept of consensus maximization and solve the problem over a bipartite graph representation. Our proposed method is related to graph-based semi-supervised learning (SSL). But existing SSL algorithms only take one supervised source (i.e., the labeled objects) and one unsupervised source (i.e., the similarity graph) [29, 8], and thus cannot be applied to combine multiple models. Some SSL methods [16] can incorporate results from an external classifier into the graph, but obviously they cannot handle multiple classifiers and multiple unsupervised sources. To apply SSL algorithms on our problem, we must first fuse all supervised models into one by some ensemble approach, and fuse all unsupervised models into one by defining a similarity function. Such a compression may lead to information loss, whereas the proposed method retains all the information and thus consensus can be reached among all the based model output. 3 Interpretations In this part, we explain the proposed method from two independent perspectives. Constrained Embedding. Now we focus on the “hard” consensus solution, i.e., each point is assigned to exactly one class. So U and Q are indicator matrices: uiz = 1 if the ensemble assigns xi to class z, and 0 otherwise; similar for qjz’s. For group nodes from classification algorithms, we will treat their entries in Q as known since they have been assigned a class label by one of the classifiers, that is, qjz = yjz for 1 ≤j ≤s. Because U represents the consensus, we should let group gj correspond to class z if majority of the objects in group gj correspond to class z in the consensus solution. The optimization is thus: min Q,U v X j=1 c X z=1 ¯¯¯¯qjz − Pn i=1 aijuiz Pn i=1 aij ¯¯¯¯ (3) s.t. c X z=1 uiz = 1∀i ∈{1, . . . , n} c X z=1 qjz = 1∀j ∈{s+1, . . . , v} uiz ∈{0, 1} qjz ∈{0, 1} (4) qjz = 1 ∀j ∈{1, . . . , s} if gj’s label is z qjz = 0 ∀j ∈{1, . . . , s} if gj’s label is not z (5) 4 Here, the two indicator matrices U and Q can be viewed as embedding x1, . . . , xn (object nodes) and g1, . . . , gv (group nodes) into a c-dimensional cube. Due to the constraints in Eq. (4), ⃗ui· and ⃗qj· reside on the boundary of the (c −1)-dimensional hyperplane in the cube. ⃗a·j denotes the objects group gj contains, ⃗qj· can be regarded as the group representative in this new space, and thus it should be close to the group mean: P n i=1 aij⃗ui· P n i=1 aij . For the s groups obtained from classification algorithms, we know their “ideal” embedding, as represented in the constraints in Eq. (5). We now relate this problem to the optimization framework discussed in Section 2. aij can only take value of 0 or 1, and thus Eq. (3) just depends on the cases when aij = 1. When aij = 1, no matter qjz is 1 or 0, we have |qjz Pn i=1 aij −Pn i=1 aijuiz| = Pn i=1 |aij(qjz −uiz)|. Therefore, X j:aij=1 c X z=1 ¯¯¯¯qjz − Pn i=1 aijuiz Pn i=1 aij ¯¯¯¯ = X j:aij=1 c X z=1 ¯¯qjz Pn i=1 aij −Pn i=1 aijuiz ¯¯ Pn i=1 aij = X j:aij=1 c X z=1 Pn i=1 |aij(qjz −uiz)| Pn i=1 aij Suppose the groups found by the base models have balanced size, i.e., Pn i=1 aij = γ where γ is a constant for ∀j. Then the objective function can be approximated as: X j:aij=1 c X z=1 n X i=1 |aij(qjz −uiz)| = n X i=1 X j:aij=1 aij c X z=1 |qjz −uiz| = n X i=1 v X j=1 aij c X z=1 |qjz −uiz| Therefore, when the classification and clustering algorithms generate balanced groups, with the same set of constraints in Eq. (4) and Eq. (5), the constrained embedding problem in Eq. (3) is equivalent to: min Q,U Pn i=1 Pv j=1 aij Pc z=1 |qjz −uiz|. It is obvious that this is the same as the optimization problem we propose in Section 2 with two relaxations: 1) We transform hard constraints in Eq. (5) to soft constraints where the ideal embedding is expressed in the initial labeling matrix Y and the price for violating the constraints is set to α. 2) uiz and qjz are relaxed to have values between 0 and 1, instead of either 0 or 1, and quadratic cost functions replace the L1 norms. So they are probability estimates rather than class membership indicators, and we can embed them anywhere on the plane. Though with these relaxations, we build connections between the constrained embedding framework as discussed in this section with the one proposed in Section 2. Therefore, we can view our proposed method as embedding both object nodes and group nodes into a hyperlane so that object nodes are close to the group nodes they link to. The constraints are put on the group nodes from supervised models to penalize the embedding that are far from the “ideal” ones. Ranking on Consensus Structure. Our method can also be viewed as conducting ranking with respect to each class on the bipartite graph, where group nodes from supervised models act as queries. Suppose we wish to know the probability of any group gj belonging to class 1, which can be regarded as the relevance score of gj with respect to example queries from class 1. Let wj = Pn i=1 aij. In Algorithm 1, the relevance scores of all the groups are learnt using the following equation: ⃗q·1 = (Dv + αKv)−1(AT D−1 n A⃗q·1 + αKv⃗y·1) = Dλ(D−1 v AT D−1 n A)⃗q·1 + D1−λ⃗y·1 where the v × v diagonal matrices Dλ and D1−λ have (j, j) entries as wj wj+αkj and αkj wj+αkj . Consider collapsing the original bipartite graph into a graph with group nodes only, then AT A is its affinity matrix. After normalizing it to be a probability matrix, we have pij in P = D−1 v AT D−1 n A represent the probability of jumping to node j from node i. The groups that are predicted to be in class 1 by one of the supervised models have 1 at the corresponding entries in ⃗y·1, therefore these group nodes are “queries” and we wish to rank the group nodes according to their relevance to them. Comparing our ranking model with PageRank model [24], there are the following relationships: 1) In PageRank, a uniform vector with entries all equal to 1 replaces ⃗y·1. In our model, we use ⃗y·1 to show our preference towards the query nodes, so the resulting scores would be biased to reflect the relevance regarding class 1. 2) In PageRank, the weights Dλ and D1−λ are fixed constants λ and 1 −λ, whereas in our model Dλ and D1−λ give personalized damping factors, where each group has a damping factor λj = wj wj+αkj . 3) In PageRank, the value of link-votes are normalized by the number of outlinks at each node, whereas our ranking model does not normalize pij on its outlinks, and thus can be viewed as an un-normalized version of personalized PageRank [18, 28]. When each base model generates balanced groups, both λj and outlinks at each node become constants, and the proposed method simulates the standard personalized PageRank. 5 Table 2: Data Sets Description Data ID Category Labels #target #labeled 1 comp.graphics comp.os.ms-windows.misc sci.crypt sci.electronics 1408 160 2 rec.autos rec.motorcycles rec.sport.baseball rec.sport.hockey 1428 160 Newsgroup 3 sci.cypt sci.electronics sci.med sci.space 1413 160 4 misc.forsale rec.autos rec.motorcycles talk.politics.misc 1324 160 5 rec.sport.baseball rec.sport.hockey sci.crypt sci.electronics 1424 160 6 alt.atheism rec.sport.baseball rec.sport.hockey soc.religion.christian 1352 160 1 Operating Systems Programming Data Structures Algorithms and Theory 603 60 2 Databases Hardware and Architecture Networking Human Computer Interaction 897 80 Cora 3 Distributed Memory Management Agents Vision and Pattern Recognition 1368 100 4 Graphics and Virtual Reality Object Oriented Planning Robotics Compiler Design Software Development 875 100 DBLP 1 Databases Data Mining Machine Learning Information Retrieval 3836 400 The relevance scores with respect to class 1 for group and object nodes will converge to ⃗q·1 = (Iv −DλD−1 v AT D−1 n A)−1D1−λ⃗y·1 ⃗u·1 = (In −D−1 n ADλD−1 v AT )−1D−1 n AD1−λ⃗y·1 respectively. Iv and In are identity matrices with size v × v and n × n. The above arguments hold for the other classes as well, and thus each column in U and Q represents the ranking of the nodes with respect to each class. Because each row sums up to 1, they are conditional probability estimates of the nodes belonging to one of the classes. 4 Incorporating Labeled Information Thus far, we propose to combine the output of supervised and unsupervised models by consensus. When the true labels of the objects are unknown, this is a reliable approach. However, incorporating labels from even a small portion of the objects may greatly refine the final hypothesis. We assume that labels of the first l objects are known, which is encoded in an n × c matrix F: fiz = 1, xi’s observed label is z, i = 1, . . . , l; 0, otherwise. We modify the objection function in Eq. (1) to penalize the deviation of ⃗ui· of labeled objects from the observed label: f(Q, U) = n X i=1 v X j=1 aij||⃗ui· −⃗qj·||2 + α v X j=1 kj||⃗qj· −⃗yj·||2 + β n X i=1 hi||⃗ui· −⃗fi·||2 (6) where hi = Pc z=1 fiz. When i = 1, . . . , l, hi = 1, so we enforce the constraints that an object xi’s consensus class label estimate should be close to its observed label with a shadow price β. When i = l + 1, . . . , n, xi is unlabeled. Therefore, hi = 0 and the constraint term is eliminated from the objective function. To update the condition probability for the objects, we incorporate their prior labeled information: ⃗u t i· = Pv j=1 aij⃗q t j· + βhi ⃗fi· Pv j=1 aij + βhi (7) In matrix forms, it would be U t = (Dn + βHn)−1(AQt + βHnF) with Hn = diag © (Pc z=1 fiz) ª n×n. Note that the initial conditional probability of a labeled object is 1 at its observed class label, and 0 at all the others. However, this optimistic estimate will be changed during the updates, with the rationale that the observed labels are just random samples from some multinomial distribution. Thus we only use the observed labels to bias the updating procedure, instead of totally relying on them. 5 Experiments We evaluate the proposed algorithms on eleven classification tasks from three real world applications. In each task, we have a target set on which we wish to predict class labels. Clustering algorithms are performed on this target set to obtain the grouping results. On the other hand, we learn classification models from some training sets that are in the same domain or a relevant domain with respect to the target set. These classification models are applied to the target set as well. The proposed algorithm generates a consolidated classification solution for the target set based on both classification and clustering results. We elaborate details of each application in the following. 6 Table 3: Classification Accuracy Comparison on a Series of Data Sets 20 Newsgroups Cora DBLP Methods 1 2 3 4 5 6 1 2 3 4 1 M1 0.7967 0.8855 0.8557 0.8826 0.8765 0.8880 0.7745 0.8858 0.8671 0.8841 0.9337 M2 0.7721 0.8611 0.8134 0.8676 0.8358 0.8563 0.7797 0.8594 0.8508 0.8879 0.8766 M3 0.8056 0.8796 0.8658 0.8983 0.8716 0.9020 0.7779 0.8833 0.8646 0.8813 0.9382 M4 0.7770 0.8571 0.8149 0.8467 0.8543 0.8578 0.7476 0.8594 0.7810 0.9016 0.7949 MCLA 0.7592 0.8173 0.8253 0.8686 0.8295 0.8546 0.8703 0.8388 0.8892 0.8716 0.8953 HBGF 0.8199 0.9244 0.8811 0.9152 0.8991 0.9125 0.7834 0.9111 0.8481 0.8943 0.9357 BGCM 0.8128 0.9101 0.8608 0.9125 0.8864 0.9088 0.8687 0.9155 0.8965 0.9090 0.9417 2-L 0.7981 0.9040 0.8511 0.8728 0.8830 0.8977 0.8066 0.8798 0.8932 0.8951 0.9054 3-L 0.8188 0.9206 0.8820 0.9158 0.8989 0.9121 0.8557 0.9086 0.9202 0.9141 0.9332 BGCM-L 0.8316 0.9197 0.8859 0.9240 0.9016 0.9177 0.8891 0.9181 0.9246 0.9206 0.9480 STD 0.0040 0.0038 0.0037 0.0040 0.0027 0.0030 0.0096 0.0027 0.0052 0.0044 0.0020 20 Newsgroup categorization. We construct six learning tasks, each of which involves four classes. The objective is to classify newsgroup messages according to topics. We used the version [1] where the newsgroup messages are sorted by date, and separated into training and test sets. The test sets are our target sets. We learn logistic regression [15] and SVM models [7] from the training sets, and apply these models, as well as K-means and min-cut clustering algorithms [22] on the target sets. Cora research paper classification. We aim at classifying a set of research papers into their areas [23]. We extract four target sets, each of which includes papers from around four areas. The training sets contain research papers that are different from those in the target sets. Both training and target sets have two views, the paper abstracts, and the paper citations. We apply logistic regression classifiers and K-means clustering algorithms on the two views of the target sets. DBLP data. We retrieve around 4,000 authors from DBLP network [10], and try to predict their research areas. The training sets are drawn from a different domain, i.e., the conferences in each research field. There are also two views for both training and target sets, the publication network, and the textual content of the publications. The amount of papers an author published in the conference can be regarded as link feature, whereas the pool of titles that an author published is the text feature. Logistic regression and K-means clustering algorithms are used to derive the predictions on the target set. We manually label the target set for evaluation. The details of each learning task are summarized in Table 2. On each target set, we apply four models M1 to M4, where the first two are classification models and the remaining two are clustering models. We denote the proposed method as Bipartite Graph-based Consensus Maximization (BGCM), which combines the output of the four models. As shown in Figure 3, only clustering ensembles, majority voting methods, and the proposed BGCM algorithm work at the meta output level where raw data are discarded and only prediction results from multiple models are available. However, majority voting can not be applied when there are clustering models because the correspondence between clusters and classes is unknown. Therefore, we compare BGCM with two clustering ensemble approaches (MCLA [26] and HBGF [12]), which ignore the label information from supervised models, regard all the base models as unsupervised clustering, and integrate the output of the base models. So they only give clustering solutions, not classification results. To evaluate classification accuracy, we map the output of all the clustering algorithms (the base models, and the ensembles) to the best possible class predictions with the help of hungarian method [5], where cluster IDs are matched with class labels. Actually, it is “cheating” because the true class labels are used to do the mapping, and thus it should be able to generate the best accuracy from these unsupervised models. As discussed in Section 4, we can incorporate a few labeled objects, which are drawn from the same domain of the target set, into the framework and improve accuracy. This improved version of the BGCM algorithm is denoted as BGCM-L, and the number of labeled objects used in each task is shown in Table 2. On each task, we repeat the experiments 50 times, each of which has randomly chosen target and labeled objects, and report the average accuracy. Due to space limit, we only show the standard deviation (STD) for BGCM-L method. The baselines share very similar standard deviation with the reported one on each task. Accuracy. In Table 3, we summarized the classification accuracy of all the baselines and the proposed approach on the target sets of eleven tasks. The two single classifiers (M1 and M2), and the two clustering single models (M3 and M4) usually have low accuracy. By combining all the base models, the clustering ensemble approaches (MCLA and HBGF) can improve the performance over each single model. However, these two methods are not designed for classification, and the reported 7 0 5 10 15 20 0.8 0.85 0.9 0.95 1 α Accuracy (a) Performance w.r.t. α Newsgroup1 Cora1 DBLP1 0 5 10 15 20 0.8 0.85 0.9 0.95 1 β Accuracy (b) Performance w.r.t. β Newsgroup1 Cora1 DBLP1 0 0.02 0.04 0.06 0.08 0.1 0.8 0.85 0.9 0.95 1 % Labeled Objects Accuracy (c) Performance w.r.t. % Labeled Objects Newsgroup1 Cora1 DBLP1 Figure 4: Sensitivity Analysis accuracy is the upper bound of their “true” accuracy. The proposed BGCM method always outperforms the base models, and achieves better or comparable performances compared with the upper bound of the baseline ensembles. By incorporating a small portion (around 10%) of labeled objects, the BGCM-L method further improves the performances. The consistent increase in accuracy can be observed in all the tasks, where the margin between the accuracy of the best single model and that of the BGCM-L method is from 2% to 10%. Even when taking variance into consideration, the results demonstrate the power of consensus maximization in accuracy improvements. Sensitivity. As shown in Figure 4 (a) and (b), the proposed BGCM-L method is not sensitive to the parameters α and β. To make the plots clear, we just show the performance on the first task of each application. α and β are the shadow prices paid for deviating from the estimated labels of groups and observed labels of objects, so they should be greater than 0. α and β represent the confidence of our belief in the labels of the groups and objects compared with 1. The labels of group nodes are obtained from supervised models and may not be correct, therefore, a smaller α usually achieves better performance. On the other hand, the labels of objects can be regarded as groundtruths, and thus the larger β the better. In experiments, we find that when α is below 4, and β greater than 4, good performance can be achieved. We let α = 2 and β = 8 to get the experimental results shown in Table 3. Also, we fix the target set as 80% of all the objects, and use 1% to 20% as the labeled objects to see how the performance varies, and the results are summarized in Figure 4 (c). In general, more labeled objects would help the classification task where the improvements are more visible on Cora data set. When the percentage reaches 10%, BGCM-L’s performance becomes stable. Number of Models. We vary the number of base models incorporated into the consensus framework. The BGCM-L method on two models is denoted as 2-L, where we average the performance of the combined model obtained by randomly choosing one classifier and one clustering algorithm. Similarly, the BGCM-L method on three models is denoted as 3-L. From Table 3, we can see that BGCM-L method using all the four models outperforms the method incorporating only two or three models. When the base models are independent and each of them obtains reasonable accuracy, combining more models would benefit more because the chances of reducing independent errors increase. However, when the new model cannot provide additional information to the current pool of models, incorporating it may not improve the performance anymore. In the future, we plan to identify this upper bound through experiments with more input sources. 6 Conclusions In this work, we take advantage of the complementary predictive powers of multiple supervised and unsupervised models to derive a consolidated label assignment for a set of objects jointly. We propose to summarize base model output in a group-object bipartite graph, and maximize the consensus by promoting smoothness of label assignment over the graph and consistency with the initial labeling. The problem is solved by propagating labeled information between group and object nodes through their links iteratively. The proposed method can be interpreted as conducting an embedding of object and group nodes into a new space, as well as an un-normalized personalized PageRank. When a few labeled objects are available, the proposed method uses them to guide the propagation and refine the final hypothesis. In the experiments on 20 newsgroup, Cora and DBLP data, the proposed consensus maximization method improves the best base model accuracy by 2% to 10%. Acknowledgement The work was supported in part by the U.S. National Science Foundation grants IIS-08-42769, IIS-09-05215 and DMS-07-32276, and the Air Force Office of Scientific Research MURI award FA9550-08-1-0265. 8 References [1] 20 Newsgroups Data Set. http://people.csail.mit.edu/jrennie/20Newsgroups/. [2] E. Bauer and R. Kohavi. An Empirical Comparison of Voting Classification Algorithms: Bagging, Boosting, and Variants. Machine Learning, 36:105–139, 2004. [3] Dimitri P. Bertsekas. Non-Linear Programming (2nd Edition). Athena Scientific, 1999. [4] A. Blum and T. Mitchell. Combining Labeled and Unlabeled Data with Co-training. In Proc. of COLT’ 98, pages 92–100, 1998. [5] N. Borlin. Implementation of Hungarian Method. http://www.cs.umu.se/∼niclas/matlab/assignprob/. [6] R. Caruana. Multitask Learning. Machine Learning, 28:41–75, 1997. [7] C.-C. Chang and C.-J. Lin. LibSVM: a Library for Support Vector Machines, 2001. Software available at http://www.csie.ntu.edu.tw/∼cjlin/libsvm. [8] O. Chapelle, B. Sch¨olkopf and A. Zien (eds). Semi-Supervised Learning. MIT Press, 2006. [9] K. Crammer, M. Kearns and J. Wortman. Learning from Multiple Sources. Journal of Machine Learning Research, 9:1757-1774 , 2008. [10] DBLP Bibliography. http://www.informatik.uni-trier.de/∼ley/db/. [11] T. Dietterich. Ensemble Methods in Machine Learning. In Proc. of MCS ’00, pages 1–15, 2000. [12] X. Z. Fern and C. E. Brodley. Solving Cluster Ensemble Problems by Bipartite Graph Partitioning. In Proc. of ICML’ 04, pages 281–288, 2004. [13] K. Ganchev, J. Graca, J. Blitzer, and B. Taskar. Multi-view Learning over Structured and Non-identical Outputs. In Proc. of UAI’ 08, pages 204–211, 2008. [14] J. Gao, W. Fan, Y. Sun, and J. Han. Heterogeneous source consensus learning via decision propagation and negotiation. In Proc. of KDD’ 09, pages 339–347, 2009. [15] A. Genkin, D. D. Lewis, and D. Madigan. BBR: Bayesian Logistic Regression Software. http://stat.rutgers.edu/∼madigan/BBR/. [16] A. Goldberg and X. Zhu. Seeing stars when there aren’t many stars: Graph-based semi-supervised learning for sentiment categorization. In HLT-NAACL 2006 Workshop on Textgraphs. [17] A. Gionis, H. Mannila, and P. Tsaparas. Clustering Aggregation. ACM Transactions on Knowledge Discovery from Data, 1(1), 2007. [18] T. Haveliwala. Topic-Sensitive PageRank: A Context-Sensitive Ranking Algorithm for Web Search. IEEE Transactions on Knowledge and Data Engineering, 15(4):1041-4347, 2003. [19] J. Hoeting, D. Madigan, A. Raftery, and C. Volinsky. Bayesian Model Averaging: a Tutorial. Statistical Science, 14:382–417, 1999. [20] R. Jacobs, M. Jordan, S. Nowlan, and G. Hinton. Adaptive Mixtures of Local Experts. Neural Computation, 3:79-87, 1991. [21] T. Joachims. Transductive Learning via Spectral Graph Partitioning. In Proc. of ICML’ 03, pages 290– 297, 2003. [22] G. Karypis. CLUTO – Family of Data Clustering Software Tools. http://glaros.dtc.umn.edu/gkhome/views/cluto. [23] A. McCallum, K. Nigam, J. Rennie, and K. Seymore. Automating the Construction of Internet Portals with Machine Learning. Information Retrieval Journal, 3:127–163, 2000. [24] L. Page, S. Brin, R. Motwani, and T. Winograd. The PageRank Citation Ranking: Bringing Order to the Web. Technical Report, Stanford InfoLab, 1999. [25] V. Singh, L. Mukherjee, J. Peng, and J. Xu. Ensemble Clustering using Semidefinite Programming. In Proc. of NIPS’ 07, 2007. [26] A. Strehl and J. Ghosh. Cluster Ensembles – a Knowledge Reuse Framework for Combining Multiple Partitions. Journal of Machine Learning Research, 3:583–617, 2003. [27] D. Wolpert. Stacked Generalization. Neural Networks, 5:241–259, 1992. [28] D. Zhou , J. Weston, A. Gretton, O. Bousquet and B. Scholkopf. Ranking on Data Manifolds. In Proc. of NIPS’ 03, pages 169–176, 2003. [29] X. Zhu. Semi-supervised Learning Literature Survey. Technical Report 1530, Computer Sciences, University of Wisconsin-Madison, 2005. 9
2009
213
3,719
Efficient Large-Scale Distributed Training of Conditional Maximum Entropy Models Gideon Mann Google gmann@google.com Ryan McDonald Google ryanmcd@google.com Mehryar Mohri Courant Institute and Google mohri@cims.nyu.edu Nathan Silberman Google nsilberman@google.com Daniel D. Walker∗ NLP Lab, Brigham Young University danl4@cs.byu.edu Abstract Training conditional maximum entropy models on massive data sets requires significant computational resources. We examine three common distributed training methods for conditional maxent: a distributed gradient computation method, a majority vote method, and a mixture weight method. We analyze and compare the CPU and network time complexity of each of these methods and present a theoretical analysis of conditional maxent models, including a study of the convergence of the mixture weight method, the most resource-efficient technique. We also report the results of large-scale experiments comparing these three methods which demonstrate the benefits of the mixture weight method: this method consumes less resources, while achieving a performance comparable to that of standard approaches. 1 Introduction Conditional maximum entropy models [1, 3], conditional maxent models for short, also known as multinomial logistic regression models, are widely used in applications, most prominently for multiclass classification problems with a large number of classes in natural language processing [1, 3] and computer vision [12] over the last decade or more. These models are based on the maximum entropy principle of Jaynes [11], which consists of selecting among the models approximately consistent with the constraints, the one with the greatest entropy. They benefit from a theoretical foundation similar to that of standard maxent probabilistic models used for density estimation [8]. In particular, a duality theorem for conditional maxent model shows that these models belong to the exponential family. As shown by Lebanon and Lafferty [13], in the case of two classes, these models are also closely related to AdaBoost, which can be viewed as solving precisely the same optimization problem with the same constraints, modulo a normalization constraint needed in the conditional maxent case to derive probability distributions. While the theoretical foundation of conditional maxent models makes them attractive, the computational cost of their optimization problem is often prohibitive for data sets of several million points. A number of algorithms have been described for batch training of conditional maxent models using a single processor. These include generalized iterative scaling [7], improved iterative scaling [8], gradient descent, conjugate gradient methods, and second-order methods [15, 18]. This paper examines distributed methods for training conditional maxent models that can scale to very large samples of up to 1B instances. Both batch algorithms and on-line training algorithms such ∗This work was conducted while at Google Research, New York. 1 as that of [5] or stochastic gradient descent [21] can benefit from parallelization, but we concentrate here on batch distributed methods. We examine three common distributed training methods: a distributed gradient computation method [4], a majority vote method, and a mixture weight method. We analyze and compare the CPU and network time complexity of each of these methods (Section 2) and present a theoretical analysis of conditional maxent models (Section 3), including a study of the convergence of the mixture weight method, the most resource-efficient technique. We also report the results of large-scale experiments comparing these three methods which demonstrate the benefits of the mixture weight method (Section 4): this method consumes less resources, while achieving a performance comparable to that of standard approaches such as the distributed gradient computation method.1 2 Distributed Training of Conditional Maxent Models In this section, we first briefly describe the optimization problem for conditional maximum entropy models, then discuss three common methods for distributed training of these models and compare their CPU and network time complexity. 2.1 Conditional Maxent Optimization problem Let X be the input space, Y the output space, and Φ: X ×Y→H a (feature) mapping to a Hilbert space H, which in many practical settings coincides with RN, N = dim(H) < ∞. We denote by ∥·∥the norm induced by the inner product associated to H. Let S =((x1, y1), . . . , (xm, ym)) be a training sample of m pairs in X×Y. A conditional maximum entropy model is a conditional probability of the form pw[y|x]= 1 Z(x) exp(w·Φ(x, y)) with Z(x)= ! y∈Y exp(w·Φ(x, y)), where the weight or parameter vector w∈H is the solution of the following optimization problem: w = argmin w∈H FS(w) = argmin w∈H λ∥w∥2 −1 m m " i=1 log pw[yi|xi]. (1) Here, λ ≥0 is a regularization parameter typically selected via cross-validation. The optimization problem just described corresponds to an L2 regularization. Many other types of regularization have been considered for the same problem in the literature, in particular L1 regularization or regularizations based on other norms. This paper will focus on conditional maximum entropy models with L2 regularization. These models have been extensively used and studied in natural language processing [1, 3] and other areas where they are typically used for classification. Given the weight vector w, the output y predicted by the model for an input x is: y = argmax y∈Y pw[y|x] = argmax y∈Y w · Φ(x, y). (2) Since the function FS is convex and differentiable, gradient-based methods can be used to find a global minimizer w of FS. Standard training methods such as iterative scaling, gradient descent, conjugate gradient, and limited-memory quasi-Newton all have the general form of Figure 1, where the update function Γ: H →H for the gradient ∇FS(w) depends on the optimization method selected. T is the number of iterations needed for the algorithm to converge to a global minimum. In practice, convergence occurs when FS(w) differs by less than a constant ϵ in successive iterations of the loop. 2.2 Distributed Gradient Computation Method Since the points are sampled i.i.d., the gradient computation in step 3 of Figure 1 can be distributed across p machines. Consider a sample S = (S1, . . . , Sp) of pm points formed by p subsamples of 1A batch parallel estimation technique for maxent models based on their connection with AdaBoost is also described by [5]. This algorithm is quite different from the distributed gradient computation method, but, as for that method, it requires a substantial amount of network resources, since updates need to be transferred to the master at every iteration. 2 1 w ←0 2 for t ←1 to T do 3 ∇FS(w) ←GRADIENT(FS(w)) 4 w ←w +Γ( ∇FS(w)) 5 return w Figure 1: Standard Training 1 w ←0 2 for t ←1 to T do 3 ∇FS(w) ←DISTGRADIENT(FSk(w) ∥p machines) 4 w ←w +Γ( ∇FS(w)) 5 UPDATE(w ∥p machines) 6 return w Figure 2: Distributed Gradient Training m points drawn i.i.d., S1, . . . , Sp. At each iteration, the gradients ∇FSk(w) are computed by these p machines in parallel. These separate gradients are then summed up to compute the exact global gradient on a single machine, which also performs the optimization step and updates the weight vector received by all other machines (Figure 2). Chu et al. [4] describe a map-reduce formulation for this computation, where each training epoch consists of one map (compute each ∇FSk(w)) and one reduce (update w). However, the update method they present is that of Newton-Raphson, which requires the computation of the Hessian. We do not consider such strategies, since Hessian computations are often infeasible for large data sets. 2.3 Majority Vote Method The ensemble methods described in the next two paragraphs are based on mixture weights µ∈Rp. Let ∆p ={µ ∈Rp : µ≥0∧!p k=1 µk = 1} denote the simplex of Rp and let µ∈∆p. In the absence of any prior knowledge, µ is chosen to be the uniform mixture µ0 =(1/p, . . ., 1/p) as in all of our experiments. Instead of computing the gradient of the global function in parallel, a (weighted) majority vote method can be used. Each machine receives one subsample Sk, k ∈[1, p], and computes wk = argminw∈H FSk(w) by applying the standard training of Figure 1 to Sk. The output y predicted by the majority vote method for an input x is y = argmax y∈Y p " k=1 µk I(argmax y′∈Y pwk[y′|x] = y), (3) where I is an indicator function of the predicate it takes as argument. Alternatively, the conditional class probabilities could be used to take into account the uncertainty of each classifier: y=argmaxy !p k=1 µk pwk[y|x]. 2.4 Mixture Weight Method The cost of storing p weight vectors can make the majority vote method unappealing. Instead, a single mixture weight wµ can be defined form the weight vectors wk, k∈[1, p]: wµ = p " k=1 µkwk. (4) The mixture weight wµ can be used directly for classification. 2.5 Comparison of CPU and Network Times This section compares the CPU and network time complexity of the three training methods just described. Table 1 summarizes these results. Here, we denote by N the dimension of H. User CPU represents the CPU time experienced by the user, cumulative CPU the total amount of CPU time for the machines participating in the computation, and latency the experienced runtime effects due to network activity. The cumulative network usage is the amount of data transferred across the network during a distributed computation. For a training sample of pm points, both the user and cumulative CPU times are in Ocpu(TpmN) when training on a single machine (Figure 1) since at each of the T iterations, the gradient computation must iterate over all pm training points and update all the components of w. 3 Training Training Training Prediction User CPU + Latency Cum. CPU Cum. Network User CPU Single Machine Ocpu(pmNT) Ocpu(pmNT) N/A Ocpu(N) Distributed Gradient Ocpu(mNT) + Olat(NT) Ocpu(pmNT) Onet(pNT) Ocpu(N) Majority Vote Ocpu(mNTmax) + Olat(N) Pp k=1 Ocpu(mNTk) Onet(pN) Ocpu(pN) Mixture Weight Ocpu(mNTmax) + Olat(N) Pp k=1 Ocpu(mNTk) Onet(pN) Ocpu(N) Table 1: Comparison of CPU and network times. For the distributed gradient method (Section 2.2), the worst-case user CPU of the gradient and parameter update computations (lines 3-4 of Figure 2) is Ocpu(mN +pN +N) since each parallel gradient calculation takes mN to compute the gradient for m instances, p gradients of size N need to be summed, and the parameters updated. We assume here that the time to compute Γ is negligible. If we assume that p≪m, then, the user CPU is in Ocpu(mNT ). Note that the number of iterations it takes to converge, T , is the same as when training on a single machine since the computations are identical. In terms of network usage, a distributed gradient strategy will incur a cost of Onet(pNT ) and a latency proportional to Olat(NT ), since at each iteration w must be transmitted to each of the p machines (in parallel) and each ∇FSk(w) returned back to the master. Network time can be improved through better data partitioning of S when Φ(x, y) is sparse. The exact runtime cost of latency is complicated as it depends on factors such as the physical distance between the master and each machine, connectivity, the switch fabric in the network, and CPU costs required to manage messages. For parallelization on massively multi-core machines [4], communication latency might be negligible. However, in large data centers running commodity machines, a more common case, network latency cost can be significant. The training times are identical for the majority vote and mixture weight techniques. Let Tk be the number of iterations for training the kth mixture component wk and let Tmax = max{T1, . . . , Tp}. Then, the user CPU usage of training is in Ocpu(mNTmax), similar to that of the distributed gradient method. However, in practice, Tmax is typically less than T since convergence is often faster with smaller data sets. A crucial advantage of these methods over the distributed gradient method is that their network usage is significantly less than that of the distributed gradient computation. While parameters and gradients are exchanged at each iteration for this method, majority vote and mixture weight techniques only require the final weight vectors to be transferred at the conclusion of training. Thus, the overall network usage is Onet(pN) with a latency in Olat(NT ). The main difference between the majority vote and mixture weight methods is the user CPU (and memory usage) for prediction which is in Ocpu(pN) versus Ocpu(N) for the mixture weight method. Prediction could be distributed over p machines for the majority vote method, but that would incur additional machine and network bandwidth costs. 3 Theoretical Analysis This section presents a theoretical analysis of conditional maxent models, including a study of the convergence of the mixture weight method, the most resource-efficient technique, as suggested in the previous section. The results we obtain are quite general and include the proof of several fundamental properties of the weight vector w obtained when training a conditional maxent model. We first prove the stability of w in response to a change in one of the training points. We then give a convergence bound for w as a function of the sample size in terms of the norm of the feature space and also show a similar result for the mixture weight wµ. These results are used to compare the weight vector wpm obtained by training on a sample of size pm with the mixture weight vector wµ. Consider two training samples of size m, S = (z1, . . . , zm−1, zm) and S′ = (z1, . . . , zm−1, z′ m), with elements in X ×Y, that differ by a single training point, which we arbitrarily set as the last one of each sample: zm = (xm, ym) and z′ m = (x′ m, y′ m). Let w denote the parameter vector returned by conditional maximum entropy when trained on sample S, w′ the vector returned when trained on S′, and let ∆w denote w′ −w. We shall assume that the feature vectors are bounded, that is there exists R > 0 such that for all (x, y) in X ×Y , ∥Φ(x, y)∥≤R. Our bounds are derived using 4 techniques similar to those used by Bousquet and Elisseeff [2], or other authors, e.g., [6], in the analysis of stability. In what follows, for any w ∈H and z = (x, y) ∈X ×Y , we denote by Lz(w) the negative log-likelihood -log pw[y|x]. Theorem 1. Let S′ and S be two arbitrary samples of size m differing only by one point. Then, the following stability bound holds for the weight vector returned by a conditional maxent model: ∥∆w∥≤2R λm. (5) Proof. We denote by BF the Bregman divergence associated to a convex and differentiable function F defined for all u, u′ by: BF (u′∥u) = F(u′)−F(u)−∇F(u)·(u′−u). Let GS denote the function u ,→1 m !m i=1 Lzi(u) and W the function u ,→λ∥u∥2. GS and W are convex and differentiable functions. Since the Bregman divergence is non-negative, BGS ≥0 and BFS = BW + BGS ≥BW. Similarly, BFS′ ≥BW . Thus, the following inequality holds: BW (w′∥w) + BW (w∥w′) ≤BFS(w′∥w) + BFS′ (w∥w′). (6) By the definition of w and w′ as the minimizers of FS and FS′, ∇FS(w) = ∇FS′(w′) = 0 and BFS(w′∥w) + BFS′ (w∥w′) = FS(w′) −FS(w) + FS′(w) −FS′(w′) = 1 m #$ Lzm(w′) −Lzm(w) % + $ Lz′m(w) −Lz′m(w′) %& ≤−1 m # ∇Lzm(w′) · (w −w′) + ∇Lz′ m(w) · (w′ −w) & = −1 m $ ∇Lz′m(w) −∇Lzm(w′) % · (w′ −w), where we used the convexity of Lz′m and Lzm. It is not hard to see that BW (w′∥w)+BW(w∥w′) = 2λ∥∆w∥2. Thus, the application of the Cauchy-Schwarz inequality to the inequality just established yields 2λ ∥∆w∥≤1 m∥∇Lzm(w′) −∇Lz′m(w)∥≤1 m # ∥∇Lzm(w′)∥+ ∥∇Lz′m(w)∥ & . (7) The gradient of w ,→Lzm(w) = log ! y∈Y ew·Φ(xm,y)−w · Φ(xm, ym) is given by ∇Lzm(w) = ! y∈Y ew·Φ(xm,y)Φ(xm, y) ! y′∈Y ew·Φ(xm,y′) −Φ(xm, ym) = E y∼pw[·|xm] $ Φ(xm, y) −Φ(xm, ym) % . Thus, we obtain ∥∇Lzm(w′)∥≤Ey∼pw′[·|xm] $ ∥Φ(xm, y) −Φ(xm, ym)∥ % ≤2R and similarly ∥∇Lz′m(w)∥≤2R, which leads to the statement of the theorem. Let D denote the distribution according to which training and test points are drawn and let F ⋆be the objective function associated to the optimization defined with respect to the true log loss: F ⋆(w) = argmin w∈H λ∥w∥2 + E z∼D $ Lz(w) % . (8) F ⋆is a convex function since ED[Lz] is convex. Let the solution of this optimization be denoted by w⋆= argminw∈H F ⋆(w). Theorem 2. Let w ∈H be the weight vector returned by conditional maximum entropy when trained on a sample S of size m. Then, for any δ > 0, with probability at least 1−δ, the following inequality holds: ∥w −w⋆∥≤ R λ ' m/2 ( 1 + ' log 1/δ ) . (9) Proof. Let S and S′ be as before samples of size m differing by a single point. To derive this bound, we apply McDiarmid’s inequality [17] to Ψ(S)=∥w −w⋆∥. By the triangle inequality and Theorem 1, the following Lipschitz property holds: |Ψ(S′) −Ψ(S)| = **∥w′ −w⋆∥−∥w −w⋆∥ ** ≤∥w′ −w∥≤2R λm. (10) 5 Thus, by McDiarmid’s inequality, Pr[Ψ−E[Ψ] ≥ϵ] ≤exp ( −2ϵ2m 4R2/λ2 ) . The following bound can be shown for the expectation of Ψ (see longer version of this paper): E[Ψ] ≤ 2R λ √ 2m. Using this bound and setting the right-hand side of McDiarmid’s inequality to δ show that the following holds Ψ ≤E[Ψ] + 2R λ + log 1 δ 2m ≤ 2R λ √ 2m ( 1 + ' log 1/δ ) , (11) with probability at least 1−δ. Note that, remarkably, the bound of Theorem 2 does not depend on the dimension of the feature space but only on the radius R of the sphere containing the feature vectors. Consider now a sample S = (S1, . . . , Sp) of pm points formed by p subsamples of m points drawn i.i.d. and let wµ denote the µ-mixture weight as defined in Section 2.4. The following theorem gives a learning bound for wµ. Theorem 3. For any µ ∈∆p, let wµ ∈H denote the mixture weight vector obtained from a sample of size pm by combining the p weight vectors wk, k∈[1, p], each returned by conditional maximum entropy when trained on the sample Sk of size m. Then, for any δ>0, with probability at least 1−δ, the following inequality holds: ∥wµ −w⋆∥≤E $ ∥wµ −w⋆∥ % + R∥µ∥ λ ' m/2 ' log 1/δ. (12) For the uniform mixture µ0 =(1/p, . . ., 1/p), the bound becomes ∥wµ −w⋆∥≤E $ ∥wµ −w⋆∥ % + R λ ' pm/2 ' log 1/δ. (13) Proof. The result follows by application of McDiarmid’s inequality to Υ(S) = ∥wµ −w⋆∥. Let S′ = (S′ 1, . . . , S′ p) denote a sample differing from S by one point, say in subsample Sk. Let w′ k denote the weight vector obtained by training on subsample S′ k and w′ µ the mixture weight vector associated to S′. Then, by the triangle inequality and the stability bound of Theorem 1, the following holds: |Υ(S′) −Υ(S)| = **∥w′ µ −w⋆∥−∥wµ −w⋆∥ ** ≤∥w′ µ −wµ∥= µk∥w′ k −wk∥≤2µkR λm . Thus, by McDiarmid’s inequality, Pr[Υ(S) −E[Υ(S)] ≥ϵ] ≤exp , −2ϵ2 !p k=1 m ( 2µkR λm )2 = exp ,−2λ2mϵ2 4R2∥µ∥2 , (14) which proves the first statement and the uniform mixture case since ∥µ0∥= 1/√p. Theorems 2 and 3 help us compare the mixture weight wpm obtained by training on a sample of size pm versus the mixture weight vector wµ0. The regularization parameter λ is a function of the sample size. To simplify the analysis, we shall assume that λ = O(1/m1/4) for a sample of size m. A similar discussion holds for other comparable asymptotic behaviors. By Theorem 2, ∥wpm −w⋆∥converges to zero in O(1/(λ√pm)) = O(1/(pm)1/4), since λ = O(1/(pm)1/4) in that case. But, by Theorem 3, the slack term bounding ∥wµ0 −w⋆∥converges to zero at the faster rate O(1/(λ√pm))=O(1/p1/2m1/4), since here λ=O(1/m1/4). The expectation term appearing in the bound on ∥wµ0 −w⋆∥, E[∥wµ0 −w⋆∥], does not benefit from the same convergence rate however. E[∥wµ0 −w⋆∥] converges always as fast as the expectation E[∥wm −w⋆∥] for a weight vector wm obtained by training on a sample of size m since, by the triangle inequality, the following holds: E[∥wµ −w⋆∥] = E[∥1 p p " k=1 (wk −w⋆)∥] ≤1 p p " k=1 E[∥wk −w⋆∥] = E[∥w1 −w⋆∥]. (15) By the proof of Theorem 2, E[∥w1−w⋆∥] ≤R/(λ ' m/2) = O(1/(λ√m)), thus E[∥wµ−w⋆∥] ≤ O(1/m1/4). In summary, wµ0 always converges significantly faster than wm. The convergence bound for wµ0 contains two terms, one somewhat more favorable, one somewhat less than its counterpart term in the bound for wpm. 6 pm |Y| |X | sparsity p English POS [16] 1 M 24 500 K 0.001 10 Sentiment 9 M 3 500 K 0.001 10 RCV1-v2 [14] 26 M 103 10 K 0.08 10 Speech 50 M 129 39 1.0 499 Deja News Archive 306 M 8 50 K 0.002 200 Deja News Archive 250K 306 M 8 250 K 0.0004 200 Gigaword [10] 1,000 M 96 10 K 0.001 1000 Table 2: Description of data sets. The column named sparsity reports the frequency of non-zero feature values for each data set. 4 Experiments We ran a number of experiments on data sets ranging in size from 1M to 1B labeled instances (see Table 2) to compare the three distributed training methods described in Section 2. Our experiments were carried out using a large cluster of commodity machines with a local shared disk space and a high rate of connectivity between each machine and between machines and disk. Thus, while the processes did not run on one multi-core supercomputer, the network latency between machines was minimized. We report accuracy, wall clock, cumulative CPU usage, and cumulative network usage for all of our experiments. Wall clock measures the combined effects of the user CPU and latency costs (column 1 of Table 1), and includes the total time for training, including all summations. Network usage measures the amount of data transferred across the network. Due to the set-up of our cluster, this includes both machine-to-machine traffic and machine-to-disk traffic. The resource estimates were calculated by point-sampling and integrating over the sampling time. For all three methods, we used the same base implementation of conditional maximum entropy, modified only in whether or not the gradient was computed in a distributed fashion. Our first set of experiments were carried out with “medium” scale data sets containing 1M-300M instances. These included: English part-of-speech tagging, generated from the Penn Treebank [16] using the first character of each part-of-speech tag as output, sections 2-21 for training, section 23 for testing and a feature representation based on the identity, affixes, and orthography of the input word and the words in a window of size two; Sentiment analysis, generated from a set of online product, service, and merchant reviews with a three-label output (positive, negative, neutral), with a bag of words feature representation; RCV1-v2 as described by [14], where documents having multiple labels were included multiple times, once for each label; Acoustic Speech Data, a 39dimensional input consisting of 13 PLP coefficients, plus their first and second derivatives, and 129 outputs (43 phones × 3 acoustic states); and the Deja News Archive, a text topic classification problem generated from a collection of Usenet discussion forums from the years 1995-2000. For all text experiments, we used random feature mixing [9, 20] to control the size of the feature space. The results reported in Table 3 show that the accuracy of the mixture weight method consistently matches or exceeds that of the majority vote method. As expected, the resource costs here are similar, with slight differences due to the point-sampling methods and the overhead associated with storing p models in memory and writing them to disk. For some data sets, we could not report majority vote results as all models could not fit into memory on a single machine. The comparison shows that in some cases the mixture weight method takes longer and achieves somewhat better performance than the distributed gradient method while for other data sets it terminates faster, at a slight loss in accuracy. These differences may be due to the performance of the optimization with respect to the regularization parameter λ. However, the results clearly demonstrate that the mixture weight method achieves comparable accuracies at a much decreased cost in network bandwidth – upwards of 1000x. Depending on the cost model assessed for the underlying network and CPU resources, this may make mixture weight a significantly more appealing strategy. In particular, if network usage leads to significant increases in latency, unlike our current experimental set-up of high rates of connectivity, then the mixture weight method could be substantially faster to train. The outlier appears to be the acoustic speech data, where both mixture weight and distributed gradient have comparable network usage, 158GB and 200GB, respectively. However, the bulk of this comes from the fact that the data set itself is 157GB in size, which makes the network 7 Training Method Accuracy Wall Clock Cumulative CPU Network Usage English POS Distributed Gradient 97.60% 17.5 m 11.0 h 652 GB (m=100k,p=10) Majority Vote 96.80% 12.5 m 18.5 h 0.686 GB Mixture Weight 96.80% 5 m 11.5 h 0.015 GB Sentiment Distributed Gradient 81.18% 104 m 123 h 367 GB (m=900k,p=10) Majority Vote 81.25% 131 m 168 h 3 GB Mixture Weight 81.30% 110 m 163 h 9 GB RCV1-v2 Distributed Gradient 27.03% 48 m 407 h 479 GB (m=2.6M,p=10) Majority Vote 26.89% 54 m 474 h 3 GB Mixture Weight 27.15% 56 m 473 h 0.108 GB Speech Distributed Gradient 34.95% 160 m 511 h 200 GB (m=100k,p=499) Mixture Weight 34.99% 130 m 534 h 158 GB Deja Distributed Gradient 64.74% 327 m 733 h 5,283 GB (m=1.5M,p=200) Mixture Weight 65.46% 316 m 707 h 48 GB Deja 250K Distributed Gradient 67.03% 340 m 698 h 17,428 GB (m=1.5M,p=200) Mixture Weight 66.86% 300 m 710 h 65 GB Gigaword Distributed Gradient 51.16% 240 m 18,598 h 13,000 GB (m=1M,p=1k) Mixture Weight 50.12% 215 m 17,998 h 21 GB Table 3: Accuracy and resource costs for distributed training strategies. usage closer to 1GB for the mixture weight and 40GB for distributed gradient method when we discard machine-to-disk traffic. For the largest experiment, we examined the task of predicting the next character in a sequence of text [19], which has implications for many natural language processing tasks. As a training and evaluation corpus we used the English Gigaword corpus [10] and used the full ASCII output space of that corpus of around 100 output classes (uppercase and lowercase alphabet characters variants, digits, punctuation, and whitespace). For each character s, we designed a set of observed features based on substrings from s−1, the previous character, to s−10, 9 previous characters, and hashed each into a 10k-dimensional space in an effort to improve speed. Since there were around 100 output classes, this led to roughly 1M parameters. We then sub-sampled 1B characters from the corpus as well as 10k testing characters and established a training set of 1000 subsets, of 1M instances each. For the experiments described above, the regularization parameter λ was kept fixed across the different methods. Here, we decreased the parameter λ for the distributed gradient method since less regularization was needed when more data was available, and since there were three orders of magnitude difference between the training size for each independent model and the distributed gradient. We compared only the distributed gradient and mixture weight methods since the majority vote method exceeded memory capacity. On this data set, the network usage is on a different scale than most of the previous experiments, though comparable to Deja 250, with the distributed gradient method transferring 13TB across the network. Overall, the mixture weight method consumes less resources: less bandwidth and less time (both wall clock and CPU). With respect to accuracy, the mixture weight method does only slightly worse than the distributed gradient method. The individual models in the mixture weight method ranged between 49.73% to 50.26%, with a mean accuracy of 50.07%, so a mixture weight model improves slightly over a random subsample models and decreases the overall variance. 5 Conclusion Our analysis and experiments give significant support for the mixture weight method for training very large-scale conditional maximum entropy models with L2 regularization. Empirical results suggest that this method achieves similar or better accuracies while reducing network usage by about three orders of magnitude and modestly reducing the wall clock time, typically by about 15% or more. In distributed environments without a high rate of connectivity, the decreased network usage of the mixture weight method should lead to substantial gains in wall clock as well. Acknowledgments We thank Yishay Mansour for his comments on an earlier version of this paper. 8 References [1] A. Berger, V. Della Pietra, and S. Della Pietra. A maximum entropy approach to natural language processing. Computational Linguistics, 22(1):39–71, 1996. [2] O. Bousquet and A. Elisseeff. Stability and generalization. Journal of Machine Learning Research, 2:499–526, 2002. [3] S. F. Chen and R. Rosenfeld. A survey of smoothing techniques for ME models. IEEE Transactions on Speech and Audio Processing, 8(1):37–50, 2000. [4] C. Chu, S. Kim, Y. Lin, Y. Yu, G. Bradski, A. Ng, and K. Olukotun. Map-Reduce for machine learning on multicore. In Advances in Neural Information Processing Systems, 2007. [5] M. Collins, R. Schapire, and Y. Singer. Logistic regression, AdaBoost and Bregman distances. Machine Learning, 48, 2002. [6] C. Cortes, M. Mohri, M. Riley, and A. Rostamizadeh. Sample selection bias correction theory. In Proceedings of ALT 2008, volume 5254 of LNCS, pages 38–53. Springer, 2008. [7] J. Darroch and D. Ratcliff. Generalized iterative scaling for log-linear models. The Annals of Mathematical Statistics, pages 1470–1480, 1972. [8] S. Della Pietra, V. Della Pietra, J. Lafferty, R. Technol, and S. Brook. Inducing features of random fields. IEEE transactions on pattern analysis and machine intelligence, 19(4):380– 393, 1997. [9] K. Ganchev and M. Dredze. Small statistical models by random feature mixing. In Workshop on Mobile Language Processing, ACL, 2008. [10] D. Graff, J. Kong, K. Chen, and K. Maeda. English gigaword third edition, linguistic data consortium, philadelphia, 2007. [11] E. T. Jaynes. Information theory and statistical mechanics. Physical Review, 106(4):620630, 1957. [12] J. Jeon and R. Manmatha. Using maximum entropy for automatic image annotation. In International Conference on Image and Video Retrieval, 2004. [13] G. Lebanon and J. Lafferty. Boosting and maximum likelihood for exponential models. In Advances in Neural Information Processing Systems, pages 447–454, 2001. [14] D. Lewis, Y. Yang, T. Rose, and F. Li. RCV1: A new benchmark collection for text categorization research. Journal of Machine Learning Research, 5:361–397, 2004. [15] R. Malouf. A comparison of algorithms for maximum entropy parameter estimation. In International Conference on Computational Linguistics (COLING), 2002. [16] M. Marcus, M. Marcinkiewicz, and B. Santorini. Building a large annotated corpus of English: The Penn Treebank. Computational linguistics, 19(2):313–330, 1993. [17] C. McDiarmid. On the method of bounded differences. In Surveys in Combinatorics, pages 148–188. Cambridge University Press, Cambridge, 1989. [18] J. Nocedal and S. Wright. Numerical optimization. Springer, 1999. [19] C. E. Shannon. Prediction and entropy of printed English. Bell Systems Technical Journal, 30:50–64, 1951. [20] K. Weinberger, A. Dasgupta, J. Langford, A. Smola, and J. Attenberg. Feature hashing for large scale multitask learning. In International Conference on Machine Learning, 2009. [21] T. Zhang. Solving large scale linear prediction problems using stochastic gradient descent algorithms. In International Conference on Machine Learning, 2004. 9
2009
214
3,720
On the Algorithmics and Applications of a Mixed-norm based Kernel Learning Formulation J. Saketha Nath Dept. of Computer Science & Engg., Indian Institute of Technology, Bombay. saketh@cse.iitb.ac.in G. Dinesh Dept. of Computer Science & Automation, Indian Institute of Science, Bangalore. dinesh@csa.iisc.ernet.in S. Raman Dept. of Computer Science & Automation, Indian Institute of Science, Bangalore. sraman@csa.iisc.ernet.in Chiranjib Bhattacharyya Dept. of Computer Science & Automation, Indian Institute of Science, Bangalore. chiru@csa.iisc.ernet.in Aharon Ben-Tal Faculty of Industrial Engg. & Management, Technion, Haifa. abental@ie.technion.ac.il K. R. Ramakrishnan Dept. of Electrical Engg., Indian Institute of Science, Bangalore. krr@ee.iisc.ernet.in Abstract Motivated from real world problems, like object categorization, we study a particular mixed-norm regularization for Multiple Kernel Learning (MKL). It is assumed that the given set of kernels are grouped into distinct components where each component is crucial for the learning task at hand. The formulation hence employs l∞regularization for promoting combinations at the component level and l1 regularization for promoting sparsity among kernels in each component. While previous attempts have formulated this as a non-convex problem, the formulation given here is an instance of non-smooth convex optimization problem which admits an efficient Mirror-Descent (MD) based procedure. The MD procedure optimizes over product of simplexes, which is not a well-studied case in literature. Results on real-world datasets show that the new MKL formulation is well-suited for object categorization tasks and that the MD based algorithm outperforms stateof-the-art MKL solvers like simpleMKL in terms of computational effort. 1 Introduction In this paper the problem of Multiple Kernel Learning (MKL) is studied where the given kernels are assumed to be grouped into distinct components and each component is crucial for the learning task in hand. The focus of this paper is to study the formalism, algorithmics of a specific mixed-norm regularization based MKL formulation suited for such tasks. Majority of existing MKL literature have considered employing a block l1 norm regularization leading to selection of few of the given kernels [8, 1, 16, 14, 20] . Such formulations tend to select the “best” among the given kernels and consequently the decision functions tend to depend only on the selected kernel. Recently [17] extended the framework of MKL to the case where kernels are partitioned into groups and introduces a generic mixed-norm regularization based MKL formulation in order to handle groups of kernels. Again the idea is to promote sparsity leading to low number of kernels. This paper differs from [17] by assuming that every component (group of kernels) is highly 1 crucial for success of the learning task. It is well known in optimization literature that l∞regularizations often promote combinations with equal preferences and l1 regularizations lead to selections. The proposed MKL formulation hence employs l∞regularization and promotes combinations of kernels at the component level. Moreover it employs l1 regularization for promoting sparsity among kernels in each component. The formulation studied here is motivated by real-world learning applications like object categorization where multiple feature representations need to be employed simultaneously for achieving good generalization. Combining feature descriptors using the framework of Multiple Kernel Learning (MKL) [8] for object categorization has been a topic of interest for many recent studies [19, 13]. For e.g., in the case of flower classification feature descriptors for shape, color and texture need to be employed in order to achieve good visual discrimination as well as significant within-class variation [12]. A key finding of [12] is the following: in object categorization tasks, employing few of the feature descriptors or employing a canonical combination of them often leads to sub-optimal solutions. Hence, in the framework of MKL, employing a l1 regularization, which is equivalent to selecting one of the given kernels, as well as employing a l2 regularization, which is equivalent to working with a canonical combination of the given kernels, may lead to sub-optimality. This important finding clearly motivates the use of l∞norm regularization for combining kernels generated from different feature descriptors and l1 norm regularization for selecting kernels generated from the same feature descriptor. Hence, by grouping kernels generated from the same feature descriptor together and employing the new MKL formulation, classifiers which are potentially well-suited for object categorization tasks can be built. Apart from the novel MKL formulation the main contribution of the paper is a highly efficient algorithm for solving it. Since the formulation is an instance of a Second Order Cone Program (SOCP), it can be solved using generic interior point algorithms. However it is impractical to work with such solvers even for moderately large number of data points and kernels. Also the generic wrapper approach proposed in [17] cannot be employed as it solves a non-convex variant of the proposed (convex) formulation. The proposed algorithm employs mirror-descent [3, 2, 9] leading to extremely scalable solutions. The feasibility set for the minimization problem tackled by Mirror-Descent (MD) turns out to be direct product of simplexes, which is not a standard set-up discussed in optimization literature. We employ a weighted version of the entropy function as the prox-function in the auxiliary problem solved by MD at each iteration and justify its suitability for the case of direct product of simplexes. The mirror-descent based algorithm presented here is also of independent interest to the MKL community as it can solve the traditional MKL problem; namely the case when the number of groups is unity. Empirically we show that the mirror-descent based algorithm proposed here scales better than the state-of-the-art steepest descent based algorithms [14]. The remainder of this paper is organized as follows: in section 2, details of the new MKL formulation and its dual are presented. The mirror-descent based algorithm which efficiently solves the dual is presented in section 3. This is followed by a summary of the numerical experiments carried for verifying the major claims of the paper. In particular, the empirical findings are a) the new MKL formulation is well-suited for object categorization tasks b) the MD based algorithm scales better than state-of-the-art gradient descent methods (e.g. simpleMKL) in solving the special case where number of components (groups) of kernels is unity. 2 Mixed-norm based MKL Formulation This section presents the novel mixed-norm regularization based MKL formulation and its dual. In the following text we concentrate on the case of binary classification. However many of the ideas presented here apply to other learning problems too. Let the training dataset be denoted by D = {(xi, yi), i = 1, . . . , m | xi ∈X, yi ∈{−1, 1}}. Here, xi represents the ith training data point with label yi. Let Y denote the diagonal matrix with entries as yi. Suppose the given kernels are divided into n groups (components) and the jth component has nj number of kernels. Let the feature-space mapping generated from the kth kernel of the jth component be φjk(·) and the corresponding gram-matrix of training data points be Kjk1. We are in search of a hyperplane clas1The gram-matrices are unit-trace normalized. 2 sifier of the form Pn j=1 Pnj k=1 w⊤ jkφjk(xi) −b = 0. As discussed above, we wish to perform a block l∞regularization over the model parameters wjk associated with distinct components and l1 regularization for those associated with the same component. Intuitively, such a regularization promotes combinations of kernels belonging to different components and selections among kernels of the same component. Following the framework of MKL and the mixed norm regularization detailed here, the following formulation is immediate: min wjk,b,ξi 1 2 h maxj Pnj k=1 ∥wjk∥2 2i + C P i ξi s.t. yi Pn j=1 Pnj k=1 w⊤ jkφjk(xi) −b  ≥1 −ξi, ξi ≥0 ∀i (1) Here, ξi variables measure the slack in correctly classifying the ith training data point and C is the regularization parameter controlling weightage given to the mixed-norm regularization term and the total slack. MKL formulation in (1) is convex and moreover an instance of SOCP. This formulation can also be realized as a limiting case of the generic CAP formulation presented in [17] (with γ = 1, γ0 →∞). However since the motivation of that work was to perform feature selection, this limiting case was neither theoretically studied nor empirically evaluated. Moreover, the generic wrapper approach of [17] is inappropriate for solving this limiting case as that approach would solve a non-convex variant of this (convex) formulation. In the following text, a dual of (1) is derived. Let a simplex of dimensionality d be represented by ∆d. Following the strategy of [14], one can introduce variables λj ≡  λj1 . . . λjnj ⊤∈∆nj and re-write (1) as follows: min wjk,b,ξi 1 2 h maxj  minλj∈∆nj Pnj k=1 ∥wjk∥2 2 λjk i + C P i ξi s.t. yi Pn j=1 Pnj k=1 w⊤ jkφjk(xi) −b  ≥1 −ξi, ξi ≥0 ∀i (2) This is because for any vector [a1 . . . an] ≥0, the following holds: minxi≥0,P i xi=1 P i a2 i xi = (P i ai)2. Notice that the max over j and min over λj can be interchanged. To see that rewrite maxj as mint t with constraints minλj∈∆nj Pnj k=1 ∥wjk∥2 2 λjk ≤t, where t is a new decision variable. This problem is feasible in both λjs and t and hence we can drop the minimization over individual constraints to obtain an equivalent problem: minλj∈∆nj ∀j,t t subject to Pnj k=1 ∥wjk∥2 2 λjk ≤t. One can now eliminate t by reintroducing the maxj and interchange the minλj∈∆nj ∀j with other variables to obtain: min λj∈∆nj ∀j min wjk,b,ξi 1 2 maxj Pnj k=1 ∥wjk∥2 2 λjk + C P i ξi s.t. yi Pn j=1 Pnj k=1 w⊤ jkφjk(xi) −b  ≥1 −ξi, ξi ≥0 ∀i (3) Now one can derive the standard dual of (3) wrt. to the variables wjk, b, ξi alone, leading to: min λj∈∆nj ∀j max α∈Sm(C), γ∈∆n 1⊤α −1 2α⊤   n X j=1 Pnj k=1 λjkQjk γj  α (4) where α, γ are Lagrange multipliers, Sm(C) ≡{x ∈Rm | 0 ≤x ≤C1, Pm i=1 xiyi = 0} and Qjk ≡YKjkY. The following points regarding (4) must to be noted: • (4) is equivalent to the well-known SVM [18] formulation with kernel Keff ≡ Pn j=1  Pnj k=1 λ∗ jkKjk γ∗ j  2. In other words, 1 γ∗ j is the weight given to the jth component and λ∗ jk is weight given to the kth kernel of the jth component. • It can be shown that none of γj, j = 1, . . . , n can be zero provided the given gram-matrices Kjk are positive definite3. 2Superscript ‘*’ represents the optimal value as per (4) 3Add a small ridge if positive semi-definite. 3 • By construction, most of the weights λjk are zero and at-least for one kernel in every component the weight is non-zero (see also [14]). These facts readily justify the suitability of the particular mixed norm regularization for object categorization. Indeed, in-sync with findings of [12], kernels from different feature descriptors (components) are combined using non-trivial weights (i.e. 1 γ∗ j ). Moreover, only the “best” kernels from each feature descriptor (component) are utilized by the model. This sparsity feature leads to better interpretability as well as computational benefits during the prediction stage. In the following section an efficient iterative algorithm for solving the dual (4) is presented. 3 Efficient Algorithm for Solving the Dual This section presents an efficient algorithm for solving the dual (4). Note that typically in object categorization or other such multi-modal learning tasks, the number of feature descriptors (i.e. number of groups of kernels, n) is low (< 10). However the kernels constructed from each feature descriptor can be very high in number i.e., nj ∀j can be quite high. Also, it is frequent to encounter datasets with huge number of training data points, m. Hence it is desirable to derive algorithms which scale well wrt. m and nj. We assume n is small and almost O(1). Consider the dual formulation (4). Using the minimax theorem [15], one can interchange the min over λjs and max over γ to obtain: min γ∈∆n −   min λj∈∆nj ∀j   max α∈Sm(C) 1⊤α −1 2α⊤   n X j=1 Pnj k=1 λjkQjk γj  α    | {z } gγ(λ1,...,λn)   | {z } f(γ) (5) We have restated the maximum over γ as a minimization problem by introducing a minus sign. The proposed algorithm performs alternate minimization over the variables γ and (λ1, . . . , λn, α). In other words, in one step the variables (λ1, . . . , λn, α) are assumed to be constant and (5) is optimized wrt. γ. This leads to the following optimization problem: min γ∈∆n n X j=1 Wj γj where Wj = α⊤Pnj k=1 λjkQjkα. This problem has an analytical solution given by: γj = p Wj P j p Wj (6) In the subsequent step γ is assumed to be fixed and (5) is optimized wrt. (λ1, . . . , λn, α). For this f(γ) needs to be evaluated by solving the corresponding optimization problem (refer (5) for definition of f). Now, the per-step computational complexity of the iterative algorithm will depend on how efficiently one evaluates f for a given γ. In the following we present a mirror-descent (MD) based algorithm which evaluates f to sufficient accuracy in O(log [maxj nj])O(SVMm). Here O(SVMm) represents the computational complexity of solving an SVM with m training data points. Neglecting the log term, the overall per-step computational effort for the alternate minimization can be assumed to be O(SVMm) and hence nearly-independent of the number of kernels. Alternatively, one can employ the strategy of [14] and compute f using projected steepest-descent (SD) methods. The following points highlight the merits and de-merits of these two methods: • In case of SD, the per-step auxiliary problem has no closed form solution and projections onto the feasibility set need to be done which are computationally intensive especially for problems with high dimensions. In case of MD, the auxiliary problem has an analytical solution (refer (8)). • The step size needs to be computed using 1-d line search in case of SD; whereas the stepsizes for MD can be easily computed using analytical expressions (refer (9)). 4 • The computational complexity of evaluating f using MD is nearly-independent of no. kernels. However no such statement can be made for SD (unless feasibility set is of Euclidean geometry, which is not so in our case). The MD based algorithm for evaluating f(γ) i.e. solving minλj∈∆nj ∀j gγ(λ1, . . . , λn) is detailed below. Let λ represent the vector [λ1 . . . λn]⊤. Also let values at iteration ‘t’ be indicated using the super-script ‘(t)’. Similar to any gradient-based method, at each step ‘t’ MD works with a linear approximation of gγ: ˆg(t) γ (λ) = gγ(λ(t)) + (λ −λ(t))⊤∇gγ(λ(t)) and follows the below update rule: λ(t+1) = argminλ∈∆n1×...×∆nn  ˆg(t) γ (λ) + 1 st ω(λ(t), λ)  (7) where, ω(x, y) ≡ω(y) −ω(x) −(y −x)⊤∇ω(x) is the Bregman-divergence (prox-function) associated with ω(x), a continuously differentiable strongly convex distance-generating function. st is a regularization parameter and also determines the step-size. (7) is usually known as the auxiliary problem and needs to be solved at each step. Intuitively (7) minimizes a weighted sum of the local linear approximation of the original objective and a regularization term that penalizes solutions far from the current iterate. It is easy to show that the update rule in (7) leads to the SD technique if ω(x) = 1 2∥x∥2 2 and step-size is chosen using 1-d line search. The key idea in MD is to choose the distance-generating function based on the feasibility set, which in our case is direct product of simplexes, such that (7) is very easy to solve. Note that for SD, with feasibility set as direct product of simplexes, (7) is not easy to solve especially in higher dimensions. We choose the distance-generating function as the following modified entropy function: ω(x) ≡ Pn j=1 Pnj k=1 xjkn−1 + δn−1nj−1 log xjkn−1 + δn−1nj−1 where δ is a small positive number (say, 10e −16). Now, let ˜gγ (t) ≡st∇gγ(λ(t)) −∇ω(λ(t)). Note that gγ is nothing but the optimal objective of SVM with kernel Keff. Since it is assumed that each given kernel is positive definite, the optimal of the SVM is unique and hence gradient of gγ wrt. λ exists [5]. Gradient of gγ can be computed using ∂gγ ∂λ(t) jk = −1 2 (α(t)) ⊤Qjkα(t) γj where α(t) is the optimal α obtained by solving an SVM with kernel as Pn j=1  Pnj k=1 λ(t) jk Kjk γj  . With this notation, it is easy to show that the optimal update (7) has the following analytical form4: λ(t+1) jk = exp n −˜gγ (t) jk n o Pnj k=1 exp n −˜gγ (t) jk n o (8) The following text discusses the convergence issues with MD. Let the modulus of strong convexity of ω wrt. ∥· ∥≡∥· ∥1 be σ. Also, let the ω-size of feasibility set be defined as follows: Θ ≡ maxu,v∈∆n1×...×∆nn ω(u, v). It is easy to verify that σ = O(1)n−2 and Θ = O (log [maxj nj]) in our case. The convergence and its efficiency follow from this result [3, 2, 9]: Result 1 With step-sizes:st = √ Θσ ∥∇gγ∥∗ √ t one has the following bound on error after iteration T:ϵT = mint≤T gγ(λ(t)) −gγ(λ∗) ≤O(1) √ ΘL∥·∥(gγ) √ σT where ∥·∥∗is the dual norm of the norm wrt. which the modulus of strong convexity was computed (in our case ∥· ∥∗= ∥· ∥∞) and L∥·∥(h) is Lipschitz constant of function h wrt. norm ∥· ∥(in our case ∥· ∥= ∥· ∥1 and it can be shown that the Lipschitz constant exists for gγ). Substituting the particular values for our case, we obtain st = p log [maxj nj] n∥∇gγ∥∞ √ t (9) and ϵT ∝ √ log[maxj nj] √ T . In other words, for reaching a reasonable approximation of the optimal, the number iterations required are O(log [maxj nj]), which is nearly-independent of the number 4Since the term involving δ is ≪λjk, it is neglected in this computation. 5 of kernels. Since the computations in each iteration are dominated by the SVM optimization, the overall complexity of MD is (nearly) O(SV Mm). Note that the iterative algorithm can be improved by improving the algorithm for solving the SVM problem. The overall algorithm is summarized in algorithm 15. The MKL formulation presented here exploits the special structure in the kernels and Algorithm 1: Mirror-descent based alternate minimization algorithm Data: Labels and gram-matrices of training eg., component-id of each kernel, regularization parameter (C) Result: Optimal values of α, γ, λ in (4) begin Set γ, λ to some initial feasible values. while stopping criteria for γ is not met do /* Alternate minimization loop */ while stopping criteria for λ is not met do /* Mirror-descent loop */ Solve SVM with current kernel weights and update α Compute ˜gγ (t) and update λ using (8) Compute Wj and update γ using (6) Return values of α, γ, λ end leads to non-trivial combinations of the kernels belonging to different components and selections among the kernels of the same component. Moreover the proposed iterative algorithm solves the formulation with a per-step complexity of (almost) O(SV Mm), which is the same as that with traditional MKL formulations (which do not exploit this structure). As discussed earlier, this efficiency is an outcome of employing state-of-the-art mirror-descent techniques. The MD based algorithm presented here is of independent interest to the MKL community. This is because, in the special case where number of components is unity (i.e. n = 1), the proposed algorithm solves the traditional MKL formulation. And clearly, owing to the merits of MD over SD discussed earlier, the new algorithm can potentially be employed to boost the performance of state-of-the-art MKL algorithms. Our empirical results confirm that the proposed algorithm (with n = 1) outperforms simpleMKL in terms of computational efficiency. 4 Numerical Experiments This section presents results of experiments which empirically verify the major claims of the paper: a) The proposed formulation is well-suited for object categorization b) In the case n = 1, the proposed algorithm outperforms simpleMKL wrt. computational effort. In the following, the experiments done on real-world object categorization datasets are summarized. The proposed MKL formulation is compared with state-of-the-art methodology for object categorization [19, 13] that employs a block l1 regularization based MKL formulation with additional constraints for including prior information regarding weights of kernels. Since such constraints lead to independent improvements with all formulations, the experiments here compare the following three MKL formulations without the additional constraints: MixNorm-MKL, the (l∞, l1) mixed-norm based MKL formulation studied in this paper; L1-MKL, the block l1 regularization based MKL formulation [14]; and L2-MKL, which is nothing but an SVM built using the canonical combination of all kernels i.e. Keff ≡Pn j=1 Pnj k=1 Kjk. In case of MixNorm-MKL, the MD based algorithm (section 3) was used to solve the formulation. The SVM problem arising at each step of mirror-descent is solved using the libsvm software6. L1-MKL is solved using simpleMKL7. L2-MKL is solved using libsvm and serves as a baseline for comparison. In all cases, the hyper-parameters of the various formulations were tuned using suitable cross-validation procedures and the accuracies reported denote testset accuracies achieved by the respective classifiers using the tuned set of hyper-parameters. 5Asymptotic convergence can be proved for the algorithm; details omitted due to lack of space. 6Available at www.csie.ntu.edu.tw/˜cjlin/libsvm 7Available at http://asi.insa-rouen.fr/enseignants/˜arakotom/code/mklindex. html 6 1 2 3 4 5 0 1 2 3 4 5 6 7 8 9 Object Categories Average gain wrt. L1−MKL (%) (a) Caltech-5 1 2 3 4 5 0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 Object Categories Average gain wrt. L2−MKL (%) (b) Caltech-5 0 2 4 6 8 10 12 14 16 18 −4 −2 0 2 4 6 8 10 12 Object Categories Average gain wrt. L1−MKL (%) (c) Oxford Flowers 0 2 4 6 8 10 12 14 16 18 0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 Object Categories Average gain wrt. L2−MKL (%) (d) Oxford flowers 0 20 40 60 80 100 −100 0 100 200 300 400 500 600 700 800 Object Categories Average gain wrt. L1−MKL (%) (e) Caltech-101 0 20 40 60 80 100 −100 0 100 200 300 400 500 600 Object Categories Average gain wrt. L2−MKL (%) (f) Caltech-101 Figure 1: Plot of average gain (%) in accuracy with MixNorm-MKL on the various real-world datasets. The following real-world datasets were used in the experiments: Caltech-5 [6], Caltech-101 [7] and Oxford Flowers [10]. The Caltech datasets contain digital images of various objects like faces, watches, ants etc.; whereas the Oxford dataset contains images of 17 varieties of flowers. The Caltech-101 dataset has 101 categories of objects whereas Caltech-5 dataset is a subset of the Caltech-101 dataset including images of Airplanes, Car sides, Faces, Leopards and Motorbikes alone. Most categories of objects in the Caltech dataset have 50 images. The number of images per category varies from 40 to 800. In the Oxford flowers dataset there are 80 images in each flower category. In order to make the results presented here comparable to others in literature we have followed the usual practice of generating training and test sets using a fixed number of pictures from each object category and repeating the experiments with different random selections of pictures. For the Caltech-5, Caltech-101 and Oxford flowers datasets we have used 50, 15, 60 images per object category as training images and 50, 15, 20 images per object category as testing images respectively. Also, in case of Caltech-5 and Oxford flowers datasets, the accuracies reported are the testset accuracies averaged over 10 such randomly sampled training and test datasets. Since the Caltech-101 dataset has large number of classes and the experiments are computationally intensive (100 choose 2 classifiers need to be built in each case), the results are averaged over 3 sets of training and test datasets only. In case of the Caltech datasets, five feature descriptors8 were employed: SIFT, OpponentSIFT, rgSIFT, C-SIFT, Transformed Color SIFT. Whereas in case of Oxford flowers dataset, following strategy of [11, 10], seven feature descriptors9 were employed. Using each feature descriptor, nine kernels were generated by varying the width-parameter of the Gaussian kernel. The kernels can be grouped based on the feature descriptor they were generated from and the proposed formulation can be employed to construct classifiers well-suited for object categorization. For eg. in case of the Caltech datasets, n = 5 and nj = 9 ∀j and in case of Oxford flowers dataset, n = 7 and nj = 9 ∀j. In all cases, the 1-vs-1 methodology was employed to handle the multi-class problems. The results of the experiments are summarized in figure 1. Each plot shows the % gain in accuracy achieved by MixNorm-MKL over L1-MKL and L2-MKL for each object category. Note that for 8Code at http://staff.science.uva.nl/˜ksande/research/colordescriptors/ 9Distance matrices available at http://www.robots.ox.ac.uk/˜vgg/data/flowers/17/ index.html 7 1.5 2 2.5 3 3.5 4 0 100 200 300 400 500 600 log10(Number of Kernels) Training Time (seconds) MixNorm−MKL L1−MKL 1.5 2 2.5 3 3.5 4 0 100 200 300 400 500 600 700 800 900 log10(Number of Kernels) Training Time (seconds) MixNorm−MKL L1−MKL Figure 2: Scaling plots comparing scalability of mirror-descent based algorithm and simpleMKL. most object categories, the gains are positive and moreover quite high. The best results are seen in case of the Caltech-101 dataset: the peak and avg. gains over L1-MKL are 800%, 37.57% respectively and over L2-MKL are 600%, 21.75% respectively. The gain in terms of numbers for the other two datasets are not as high merely because the baseline accuracies were themselves high. The baseline accuracies i.e., the average accuracy achieved by L2-MKL (over all categories) were 93.84%, 34.81% and 85.97% for the Caltech-5, Caltech-101 and Oxford flowers datasets respectively. The figures clearly show that the proposed formulation outperforms state-of-the-art object categorization techniques and is hence highly-suited for such tasks. Another observation was that the average sparsity (% of kernels with zero weightages) with the methods MixNorm-MKL, L1-MKL and L2-MKL is 57%, 96% and 0% respectively. Also, it was observed that L1-MKL almost always selected kernels from one or two components (feature descriptors) only whereas MixNorm-MKL (and ofcourse L2-MKL) selected kernels from all the components. These observations clearly show that the proposed formulation combines important kernels while eliminating redundant and noisy kernels using the information embedded in the group structure of the kernels. In the following, the results of experiments which compare the scalability of simpleMKL and the proposed mirror-descent based algorithm wrt. the number of kernels are presented. Note that in the special case, n = 1, the proposed formulation is exactly same as the l1 regularization based formulation. Hence the mirror-descent based iterative algorithm proposed here can also be employed for solving l1 regularization based MKL. Figure 2 shows plots of the training times as a function of number of kernels with the algorithms on two binary classification problems encountered in the object categorization experiments. The plots clearly show that the proposed algorithm outperforms simpleMKL in terms of computational effort. Interestingly, it was found in our experiments that, in most cases, the major computational effort at every iteration of SimpleMKL was in computing the projection onto the feasible set! On the contrary Mirror descent allows an easily computable closed form solution for the per-step auxiliary problem. We think this is the crucial advantage of the proposed iterative algorithm over the gradient-decent based algorithms which were traditionally employed for solving the MKL formulations. 5 Conclusions This paper makes two important contributions: a) a specific mixed-norm regularization based MKL formulation which is well-suited for object categorization and multi-modal tasks b) An efficient mirror-descent based algorithm for solving the new formulation. Empirical results on real-world datasets show that the new formulation achieves far better generalization than state-of-the-art object categorization techniques. In some cases, the average gain in testset accuracy compared to state-of-the-art was as high as 37%. The mirror-descent based algorithm presented in the paper not only solves the proposed formulation efficiently but also outperforms simpleMKL in solving the traditional l1 regularization based MKL. The speed-up was as high as 12 times in some cases. Application of proposed methodology to various other multi-modal tasks and study of improved variants of mirror-decent algorithm [4] for faster convergence are currently being explored by us. Acknowledgements CB was supported by grants from Yahoo! and IBM. 8 References [1] F. Bach, G. R. G. Lanckriet, and M. I. Jordan. Multiple Kernel Learning, Conic Duality, and the SMO Algorithm. In International Conference on Machine Learning, 2004. [2] Amir Beck and Marc Teboulle. Mirror descent and nonlinear projected subgradient methods for convex optimization. Operations Research Letters, 31:167–175, 2003. [3] Aharon Ben-Tal, Tamar Margalit, and Arkadi Nemirovski. The Ordered Subsets Mirror Descent Optimization Method with Applications to Tomography. SIAM Journal of Optimization, 12(1):79–108, 2001. [4] Aharon Ben-Tal and Arkadi Nemirovski. Non-euclidean Restricted Memory Level Method for Large-scale Convex Optimization. Mathematical Programming, 102(3):407–456, 2005. [5] O. Chapelle, V. Vapnik, O. Bousquet, and S. Mukerjhee. Choosing multiple parameters for SVM. Machine Learning, 46:131–159, 2002. [6] R. Fergus, P. Perona, and A. Zisserman. Object class recognition by unsupervised scaleinvariant learning. In IEEE Computer Society Conference on Computer Vision and Pattern Recognition, volume 2, 2003. [7] R. Fergus L. Fei-Fei and P. Perona. Learning generative visual models from few training examples: an incremental bayesian approach tested on 101 object categories. In IEEE. CVPR 2004, Workshop on Generative-Model Based Vision., 2004. [8] G.R.G. Lanckriet, N. Cristianini, P. Bartlett, L. El Ghaoui, and M.I. Jordan. Learning the Kernel Matrix with Semidefinite Programming. Journal of Machine Learning Research, 5:27– 72, 2004. [9] Arkadi Nemirovski. Lectures on modern convex optimization (chp.5.4). Available at www2. isye.gatech.edu/˜nemirovs/Lect_ModConvOpt.pdf. [10] M-E. Nilsback and A. Zisserman. A visual vocabulary for flower classification. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, 2006. [11] M-E. Nilsback and A Zisserman. Automated flower classification over a large number of classes. In Proceedings of the Indian Conference on Computer Vision, Graphics and Image Processing, 2008. [12] Maria-Elena Nilsback and Andrew Zisserman. A Visual Vocabulary for Flower Classification. In Proceedings of the 2006 IEEE Computer Society Conference on Computer Vision and Pattern Recognition, volume 2, pages 1447–1454, 2006. [13] Maria-Elena Nilsback and Andrew Zisserman. Automated Flower Classification over a Large Number of Classes. In Proceedings of the Sixth Indian Conference on Computer Vision, Graphics & Image Processing, 2008. [14] A. Rakotomamonjy, F. Bach, S. Canu, and Y Grandvalet. SimpleMKL. Journal of Machine Learning Research, 9:2491–2521, 2008. [15] R. T. Rockafellar. Convex Analysis. Princeton University Press, 1970. [16] Soren Sonnenburg, Gunnar Ratsch, Christin Schafer, and Bernhard Scholkopf. Large Scale Multiple Kernel Learning. Journal of Machine Learning Research, 7:1531–1565, 2006. [17] M. Szafranski, Y. Grandvalet, and A. Rakotomamonjy. Composite Kernel Learning. In Proceedings of the Twenty-fifth International Conference on Machine Learning (ICML), 2008. [18] Vladimir Vapnik. Statistical Learning Theory. Wiley-Interscience, 1998. [19] M. Varma and D. Ray. Learning the Discriminative Power Invariance Trade-off. In Proceedings of the International Conference on Computer Vision, 2007. [20] Zenglin Xu, Rong Jin, Irwin King, and Michael R. Lyu. An Extended Level Method for Multiple Kernel Learning. In Advances in Neural Information Processing Systems, 2008. 9
2009
215
3,721
Estimating image bases for visual image reconstruction from human brain activity Yusuke Fujiwara1 Yoichi Miyawaki2,1 Yukiyasu Kamitani1 1ATR Computational Neuroscience Laboratories 2National Institute of Information and Communications Technology 2-2-2 Hikaridai, Seika-cho, Kyoto, Japan yureisoul@gmail.com yoichi m@atr.jp kmtn@atr.jp Abstract Image representation based on image bases provides a framework for understanding neural representation of visual perception. A recent fMRI study has shown that arbitrary contrast-defined visual images can be reconstructed from fMRI activity patterns using a combination of multi-scale local image bases. In the reconstruction model, the mapping from an fMRI activity pattern to the contrasts of the image bases was learned from measured fMRI responses to visual images. But the shapes of the images bases were fixed, and thus may not be optimal for reconstruction. Here, we propose a method to build a reconstruction model in which image bases are automatically extracted from the measured data. We constructed a probabilistic model that relates the fMRI activity space to the visual image space via a set of latent variables. The mapping from the latent variables to the visual image space can be regarded as a set of image bases. We found that spatially localized, multi-scale image bases were estimated near the fovea, and that the model using the estimated image bases was able to accurately reconstruct novel visual images. The proposed method provides a means to discover a novel functional mapping between stimuli and brain activity patterns. 1 Introduction The image basis is a key concept for understanding neural representation of visual images. Using image bases, we can consider natural scenes as a combination of simple elements corresponding to neural units. Previous works have shown that image bases similar to receptive fields of simple cells are learned from natural scenes by the sparse coding algorithm [4, 9]. A recent fMRI study has shown that visual images can be reconstructed using a linear combination of multi-scale image bases (1x1, 1x2, 2x1, and 2x2 pixels covering an entire image), whose contrasts were predicted from the fMRI activity pattern [6]. The multi-scale bases produced more accurate reconstruction than the pixel-by-pixel prediction, and each scale contributed to reconstruction in a way consistent with known visual cortical representation. However, the predefined shapes of image bases may not be optimal for image reconstruction. Here, we developed a method to automatically extract image bases from measured fMRI responses to visual stimuli, and used them for image reconstruction. We employed the framework of canonical correlation analysis (CCA), in which two multi-dimensional observations are related via a common coordinate system. CCA finds multiple correspondences between a weighted sum of voxels and a weighted sum of pixels. These correspondences provide an efficient mapping between the two observations. The pixel weights for each correspondence can be thought to define an image basis. As the early visual cortex is known to be organized in a retinotopic manner, one can assume that a small set of pixels corresponds to a small set of voxels. To facilitate the mapping between small 1 (a) (b) Figure 1: Model for estimating image bases. (a) Illustration of the model framework. The visual image I (pixels) and an fMRI activity pattern r (voxels) is linked by latent variables z. The links from each latent variable to image pixels define an image basis WI, and the links from each latent variable to fMRI voxels is called a weight vector Wr. (b) Graphical representation of the model. Circles indicate model parameters to be estimated and squares indicate observations. The matrices WI and Wr, the common latent variable z, and the inverse variances αI and αr are simultaneously estimated using the variational Bayesian method. Using the estimated parameters, the predictive distribution for a visual image given a new brain activity pattern is constructed (dashed line). sets of pixels and voxels, we extended CCA to Bayesian CCA [10] with sparseness priors. Bayesian CCA treats the multiple correspondences as latent variables with two transformation matrices to two sets of observations. The transformation matrix to the visual image can be regarded as a set of image bases. The matrices are assumed to be random variables with hyper-parameters. We introduced a sparseness prior into each element of the matrices, such that only small subsets of voxels and pixels are related with non-zero matrix elements. The Bayesian CCA model was applied to the data set of Miyawaki et al. [6]. We show that spatially localized image bases were extracted, especially around the foveal region, whose shapes were similar to those used in the previous work. We also demonstrate that the model using the estimated image bases produced accurate visual image reconstruction. 2 Method We constructed a model in which a visual image is related with an fMRI activity pattern via latent variables (Figure 1). Each latent variable has links to a set of pixels, which can be regarded as an image basis because links from a single latent variable construct an element of a visual image. The latent variable also has multiple links to a set of fMRI voxels, which we call a weight vector. This model is equivalent to CCA: each latent variable corresponds to a canonical coefficient [3] that bundles a subset of fMRI voxels responding to a specific visual stimulus. We then extended the CCA model to the Bayesian CCA model that can conduct a sparse selection of these links automatically. 2.1 Canonical Correlation Analysis We first consider the standard CCA for estimating image bases given visual images I and fMRI activity patterns r. Let I be an N × 1 vector and r be a K × 1 vector where N is the number of image pixels, K is the number of fMRI voxels and t is a sample index. Both data sets are independent identically distributed (i.i.d.) samples. CCA finds linear combinations u1(t) = a′ 1 ·I(t) and v1(t) = b′ 1 · r(t) such that the correlation between u1 and v1 is maximized. The variables u1 and v1 are called the first canonical variables and the vectors a1 and b1 are called the canonical coefficients. Then, the second canonical variables u2(t) = a′ 2 · I(t) and v2(t) = b′ 2 · r(t) are sought by maximizing the correlation of u2 and v2 while the second canonical variables are orthogonalized to the first canonical variables. This procedure is continued up to a pre-defined number of times M. The number M is conventionally set to the smaller dimension of the two sets of observations: in our case, M = N because the number of visual-image pixels is much smaller than that of the fMRI 2 voxels (N < K). The M sets of canonical variables are summarized as u(t) = A · I(t), (1) v(t) = B · r(t), (2) where u(t) and v(t) are M × 1 vectors, A is an M × N matrix, and B is a M × K matrix. The matrices A and B are obtained by solving the eigen problem of the covariance matrix between I and r [1]. The visual image can be reconstructed by I(t) = A−1 · B · r(t), (3) where each column vector of the inverse matrix A−1 is an image basis. 2.2 Bayesian CCA Bayesian CCA introduces common latent variables that relate a visual image I and the fMRI activity pattern r with image basis set WI and weight vector set Wr (Figure 1 (b)). These variables are treated as random variables and prior distributions are assumed for each variable. Hyper-prior distributions are also assumed for an inverse variance of each element of the image bases and the weight vectors. The image bases and the weight vectors are estimated as a posterior distribution by the variational Bayesian method [2]. After the parameters are determined, a predictive distribution for the visual image can be calculated. We assume two likelihood functions. One is for visual images that are generated from latent variables. The other is for fMRI activity patterns that are generated from the same latent variables. When observation noises for visual images and fMRI voxels are assumed to follow a Gaussian distribution with zero mean and spherical covariance, the likelihood functions of the visual image I and the fMRI activity pattern r are P(I|WI, z) ∝exp [ −1 2βI T ∑ t=1 ||I(t) −WI · z(t)||2 ] , (4) P(r|Wr, z) ∝exp [ −1 2βr T ∑ t=1 ||r(t) −Wr · z(t)||2 ] , (5) where WI is an N × M matrix representing M image bases, each of which consists of N pixels, Wr is a K ×M matrix representing M weight vectors, each of which consist of K voxels, z(t) is an M × 1 vector representing latent variables, β−1 I and β−1 r are scalar variables representing unknown noise variances of the visual image and fMRI activity pattern, and T is the number of observations. The latent variables are treated as the following Gaussian prior distribution, P0(z) ∝exp [ −1 2 T ∑ t=1 ||z(t)||2 ] . (6) The image bases and weight vectors are regarded as random variables, and the prior distributions of them are assumed as, P0(WI|αI) ∝exp [ −1 2 N ∑ n=1 M ∑ m=1 αI(n,m) ( WI(n,m) )2 ] , (7) P0(Wr|αr) ∝exp [ −1 2 K ∑ k=1 M ∑ m=1 αr(k,m) ( Wr(k,m) )2 ] , (8) where αI(n,m) and αr(k,m) are the inverse variances of the elements in WI and Wr, respectively, which are assumed to be mutually independent. We also assume hyper-prior distributions for the inverse variances αI(n,m) and αr(k,m), P0(αI) = ∏ n ∏ m G(αI(n,m)|¯αI(n,m), γI(n,m)), (9) P0(αr) = ∏ k ∏ m G(αI(k,m)|¯αr(k,m), γr(k,m)), (10) 3 where G(α|¯α, γ) represents the Gamma distribution with mean ¯α and confidence parameter γ. For our analysis, all the means ¯αI(n,m) and ¯αr(k,m) were set to 1 and all the confidence parameters γI(n,m) and γr(k,m) were set to 0. This configuration of the prior and hyper-prior settings is known as the automatic relevance determination (ARD), where non-effective parameters are automatically driven to zero [7]. In the current case, these priors and hyper-priors lead to a sparse selection of links from each latent variable to pixels and voxels. Prior distributions of observation noise are assumed as non-informative priors, which are described by the observation noise, P0(βI) = 1 βI , (11) P0(βr) = 1 βr . (12) 2.3 Parameter estimation by the variational Bayesian method The image bases and weight vectors are estimated as a posterior distribution P(WI, Wr|I, r), given the likelihood functions (Eqs. (4) and (5)), the prior distributions (Eqs. (6) - (8), (11) and (12)), and the hyper-prior distributions (Eqs. (9) and (10)). This posterior distribution is obtained by marginalizing the joint posterior distribution P(WI, Wr, z, αI, αr, βI, βr|I, r) with respect to latent variables and variance parameters, P(WI, Wr|I, r) = ∫ dzdαIdαrdβIdβrP(WI, Wr, z, αI, αr, βI, βr|I, r). (13) Since the joint posterior distribution cannot be calculated analytically, we approximate it using a trial distribution based on the variational Bayesian (VB) method [2]. In the VB method, a trial distribution Q(WI, Wr, z, αI, αr, βI, βr) with the following factorization is assumed, Q(WI, Wr, z, αI, αr, βI, βr) = Qw(WI)Qw(Wr)Qz(z)Qα(αI, αr, βI, βr). (14) The joint posterior distribution P(WI, Wr, z, αI, αr, βI, βr|I, r) is approximated by the factorized distribution (Eq. (14)). According to the standard calculation of the VB method, the trial distribution of the image bases Qw(WI) is derived as Qw(WI) = N ∏ n=1 M ∏ m=1 N(WI(n,m)|WI(n,m), σ−1 I(n,m)), (15) where WI(n,m) = ¯βIσ−1 I(n,m) T ∑ t=1 In(t)zm(t), (16) σI(n,m) = ¯βI ( T ∑ t=1 z2 m(t) + TΣ−1 z(m,m) ) + αI(n,m), (17) and N(x|¯x, σ−1) represents a Gaussian distribution with mean ¯x and variance σ−1. The trial distribution of the weight vectors Qw(Wr) is obtained in a similar way, by replacing I with r, n with k, and N with K in Eqs. (15-17). The trial distribution of the latent variables Qz(z) is obtained by Qz(z) = T ∏ t=1 N(z(t)|z(t), Σ−1 z ), (18) where z(t) = Σ−1 z (¯βIW ′ II(t) + ¯βrW ′ rr(t) ) , (19) Σz = ¯βI ( W ′ IWI + Σ−1 wI ) + ¯βr ( W ′ rWr + Σ−1 wr ) + E. (20) 4 In Eq. (20), E is an identity matrix, and ΣwI and Σwr are defined as ΣwI = diag ([ N ∑ n=1 σI(n,1), · · · , N ∑ n=1 σI(n,M) ]) , (21) Σwr = diag ([ K ∑ k=1 σr(k,1), · · · , K ∑ k=1 σr(k,M) ]) . (22) Finally, the distribution of the inverse variances Qα(αI, αr, βI, βr) is further factorized into Qα(αI)Qα(αr)Qα(βI)Qα(βr), each having a function form equivalent to a gamma distribution. The expectation of αI(n,m) is given by ¯αI(n,m) = (1 2 + γI0(n,m) )(1 2(WI(n,m))2 + 1 2σ−1 I(n,m) + γI0(n,m)α−1 I0(n,m) )−1 , (23) and that of βI is given by ¯βI = NT { T ∑ t=1 ||I(t) −WI¯z(t)||2 + Tr [ Σ−1 wI ( T ∑ t=1 z(t)z′(t) + TΣ−1 z ) + TΣ−1 z W ′ IWI ]}−1 . (24) The expectations of Qα(αr) and Qα(βr) are obtained in a similar way, by replacing I with r, n with k, and N with K in Eq. (23) and Eq. (24), respectively. The expectations of these distributions are used in the calculation of Qw(WI), Qw(Wr) and Qz(z) (Eqs. (15) - (20)). The algorithm estimates the joint posterior by successive calculations of 1) Qw(WI) and Qw(Wr), 2) Qz(z), and 3) Qα(αI, αr, βI, βr). After the algorithm converges, image bases WI are calculated by taking the expectation of Q(WI). 2.4 Predictive distribution for visual image reconstruction Using the estimated parameters, we can derive the predictive distribution for a visual image Inew given a new brain activity rnew (Figure 1 (b), dashed line). Note that Inew and rnew were taken from the data set reserved for testing the model, independent of the data set to estimate the model parameters. The predictive distribution P(Inew|rnew) is constructed from the likelihood of the visual image (Eq. (4)), the estimated distribution of image bases Q(WI) (Eqs. (15) - (17)), and a posterior distribution of latent variables P(znew|rnew) as follows, P(Inew|rnew) = ∫ dWIdznewP(Inew|WI, znew)Q(WI)P(znew|rnew). (25) Because the multiple integral over the random variable WI and znew is intractable, we replace the random variable WI with the estimated image bases WI to vanish the integral over WI. Then the predictive distribution becomes P(Inew|rnew) ≃ ∫ dznewP(Inew|znew)P(znew|rnew), (26) where P(Inew|znew) ∝exp [ −1 2 ¯βI||Inew −WIznew||2 ] . (27) Since P(znew|rnew) is an unknown distribution, we approximate P(znew|rnew) based on the trial distribution Q(z) (Eqs. (18) - (20)). We construct an approximate distribution eQz(znew), by omitting the terms related to the visual image in Eqs. (18) - (20), eQz(znew) = N(z|¯znew, Σ−1 znew), (28) where ¯znew = ¯βrΣ−1 znewW ′ rrnew, (29) Σznew = ¯βr ( W ′ rWr + Σ−1 wr ) + E. (30) 5 Finally, the predictive distribution is obtained by P(Inew|rnew) ≃ ∫ dznewP(Inew|znew) eQz(znew) = N(Inew|¯Inew, Σ−1 Inew), (31) where ¯Inew = ¯βrWIΣ−1 znewW ′ rrnew, (32) ΣInew = WIΣ−1 znewW ′ I + ¯β−1 I E. (33) The reconstructed visual image is calculated by taking the expectation of the predictive distribution. 2.5 fMRI data We used the data set from Miyawaki et al. [6], in which fMRI signals were measured while subjects viewed visual images consisting of contrast-defined 10 × 10 patches. The data set contained two independent sessions. One is a “random image session”, in which spatially random patterns were sequentially presented for 6 s followed by a 6 s rest period. A total of 440 different random patterns were presented for each subject. The other is a “figure image session”, in which alphabetical letters and simple geometric shapes were sequentially presented for 12 s followed by a 12 s rest period. Five alphabetical letters and five geometric shapes were presented six or eight times per subject. We used fMRI data from V1 for the analyses. See Miyawaki et al. [6] for details. 3 Results We estimated image bases and weight vectors using the data from the “random image session”. Then, reconstruction performance was evaluated with the data from the “figure image session”. 3.1 Estimated image bases Figure 2 (a) shows representative image bases estimated by Bayesian CCA (weight values are indicated by a gray scale). The estimation algorithm extracted spatially localized image bases whose shapes were consistent with those used in the previous study [6] (1 × 1, 1 × 2, and 2 × 1 shown in 1st and 2nd row of Figure 2 (a)). We also found image bases with other shapes (e.g., L-shape, 3 × 1 and 1 × 3, 3rd row of Figure 2 (a)) that were not assumed in the previous study. We repeated the estimation using data resampled from the random image session, and calculated the distribution of the image bases (defined by a pixel cluster with magnitudes over 3 SD of all pixel values) over eccentricity for different sizes (Figure 2 (a), right). The image bases of the smallest size (1 × 1) were distributed over the visual field, and most of them were within three degrees of eccentricity. The size of the image basis tended to increase with eccentricity. For comparison, we also performed the image basis estimation using CCA, but it did not produce spatially localized image bases (Figure 2 (b)). Estimated weight vectors for fMRI voxels had high values around the retinotopic region corresponding the location of the estimated basis (data not shown). 3.2 Visual image reconstruction using estimated image bases The reconstruction model with the estimated image bases was tested on five alphabet letters and five geometric shapes (Figure 3 (a), 1st row). The images reconstructed by Bayesian CCA captured the essential features of the presented images (Figure 3 (a), 2nd row). In particular, they showed fine reconstruction for figures consisting of thin lines such as small frames and alphabet letters. However, the peripheral reconstruction was poor and often lacked shapes of the presented images. This may be due to the lack of estimated image bases in the peripheral regions (Figure 2 (a), right). The standard CCA produced poorer reconstruction with noise scattered over the entire image (Figure 3 (a), 3rd row), as expected from the non-local image bases estimated by CCA (Figure 2 (b)). Reconstruction using fixed image bases [6] showed moderate accuracy for all image types (Figure 3 (a), 4th row). To evaluate the reconstruction performance quantitatively, we calculated the spatial correlation between the presented and reconstructed images (Figure 3 (b)). The correlation values 6 (a) Estimated image bases by Bayesian CCA 0 40 1 2 3 4 5 6 Frequency Eccentricity [deg] 3x1 1x2 L-shape 0 0.5 -0.5 (b) Estimated image bases by CCA 1x2 2x1 1x3 3-pixel basis 1-pixel basis 2-pixel basis 0 40 0 40 Figure 2: Image basis estimation: (a) Representative bases estimated by Bayesian CCA (left, sorted by the number of pixels), and their frequency as a function of eccentricity (right). 3-pixel bases (L-shape, 3x1 and 1x3) were not assumed in Miyawaki et al. [6]. Negative (dark) bases were often associated with negative voxel weights, thus equivalent to positive bases with positive voxel weights. (b) Examples of image bases estimated by the standard CCA. were not significantly different between Bayesian CCA and the fixed basis method when the alphabet letters and the geometric shapes were analyzed together. However, Bayesian CCA outperformed the fixed basis method for the alphabet letters, while the fixed basis method outperformed Bayesian CCA for the geometric shapes (p < .05). This is presumably because the alphabet letters consist of more foveal pixels, which overlap the region covered by the image bases estimated by Bayesian CCA. The reconstruction performance of CCA was lowest in all cases. 4 Discussion We have proposed a new method to estimate image bases from fMRI data and presented visual stimuli. Our model consists of the latent variables and two matrices relating the two sets of observations. The previous work used fixed image bases and estimated the weights between the image bases and fMRI voxels. This estimation was conducted by the sparse logistic regression that assumed sparsenes in the weight values, which effectively removed irrelevant voxels [8]. The proposed method introduced sparseness priors not only for fMRI voxels but also for image pixels. These priors lead to automatic extraction of images bases, and the mappings between a small number of fMRI voxels and a small number of image pixels. Using this model, we successfully extracted spatially localized image bases including those not used in the previous work [6]. Using the set of image bases, we were able to accurately reconstruct arbitrary contrast-defined visual images from fMRI activity patterns. The sparseness priors played an important role to estimate spatially localized image bases, and to improve reconstruction performance, as demonstrated by the comparison with the results from standard CCA (Figure 2 and 3). Our method has several limitations. First, as the latent variables were assumed to have an orthogonal Gaussian distribution, it may be difficult to obtain non-orthogonal image bases, which have been 7 Spatial Correlation Fixed bases (Miyawaki et al.) Bayesian CCA 0 0.4 0.8 Presented Reconstructed All Geometric shapes Alphabet Letters Geometric shapes Alphabet letters (a) (b) CCA Bayesian CCA Fixed bases (Miyawaki et al.) CCA Figure 3: Visual image reconstruction: (a) Presented images (1st row, alphabet letters and geometric shapes) and the reconstructed images obtained from Bayesian CCA, the standard CCA, and the fixed basis model (2nd - 4th rows). (b) Spatial correlation between presented and reconstructed images. shown to provide an effective image representation in the framework of sparse coding [4,9]. Different types of image bases could be generated by introducing non-orthogonality and/or non-lineality in the model. The shape of estimated image bases may also depend on the visual stimuli used for the training of the reconstruction model. Although we used random images as visual stimuli, other types of images including natural scenes may lead to more effective image bases that allow for accurate reconstruction. Finally, our method failed to estimate peripheral image bases, and as a result, only poor reconstruction was achieved for peripheral pixels. The cortical magnification factor of the visual cortex [5] suggests that a small number of voxels represent a large number of image pixels in the periphery. Elaborate assumptions about the degree of sparseness depending on eccentricity may help to improve basis estimation and image reconstruction in the periphery. Acknowledgments This study was supported by the Nissan Science Foundation, SCOPE (SOUMU) and SRPBS (MEXT). 8 References [1] Anderson, T.W. (2003). An Introduction to Multivariate Statistical Analysis. 3rd ed. Wiley Interscience. [2] Attias, H. (1999). Inferring parameters and structure of latent variable models by variational Bayes. Proc. 15th Conference on Uncertainty in Artificial Intelligence, 21-30. [3] Bach, F.R. and Jordan, M.I. (2005). A probabilistic interpretation of canonical correlation analysis. Dept. Statist., Univ. California, Berkeley, CA, Tech. Repo. 688. [4] Bell, A.J. and Sejnowski, T.J. (1997) The independent components of natural scenes are edge filter. Vision Res. 27(23), 3327-3338. [5] Engel, S.A., Glover, G.H. and Wandell, B.A. (1997) Retinotopic organization in human visual cortex and the spatial precision of functional MRI. Cereb. Cortex 7, 181-192. [6] Miyawaki, Y., Uchida, H., Yamashita, O., Sato, MA., Morito, Y., Tanabe, HC., Sadato, N. and Kamitani, Y. (2008). Visual image reconstruction from human brain activity using a combination of multiscale local image decoders. Neuron 60(5), 915-929. [7] Neal, R.M. (1996). Bayesian learning for Neural Networks. Springer-Verlag. [8] Yamashita, O., Sato, MA., Yoshioka, T., Tong, F., Kamitani, Y. (2008) Sparse estimation automatically selects voxels relevant for the decoding of fMRI activity patterns. Neuroimage. 42(4), 1414-29. [9] Olshausen ,B.A. and Field, D.J. (1996). Emergence of simple-cell receptive field properties by learning a sparse code for natural images. Nature 381, 607-609. [10] Wang, C. (2007). Variatonal Bayesian Approach to Canonical Correlation Analysis. IEEE Trans Neural Netw. 18(3), 905-910. 9
2009
216
3,722
A unified framework for high-dimensional analysis of M-estimators with decomposable regularizers Sahand Negahban Department of EECS UC Berkeley sahand n@eecs.berkeley.edu Pradeep Ravikumar Department of Computer Sciences UT Austin pradeepr@cs.utexas.edu Martin J. Wainwright Department of Statistics Department of EECS UC Berkeley wainwrig@eecs.berkeley.edu Bin Yu Department of Statistics Department of EECS UC Berkeley binyu@stat.berkeley.edu Abstract High-dimensional statistical inference deals with models in which the the number of parameters p is comparable to or larger than the sample size n. Since it is usually impossible to obtain consistent procedures unless p/n →0, a line of recent work has studied models with various types of structure (e.g., sparse vectors; block-structured matrices; low-rank matrices; Markov assumptions). In such settings, a general approach to estimation is to solve a regularized convex program (known as a regularized M-estimator) which combines a loss function (measuring how well the model fits the data) with some regularization function that encourages the assumed structure. The goal of this paper is to provide a unified framework for establishing consistency and convergence rates for such regularized Mestimators under high-dimensional scaling. We state one main theorem and show how it can be used to re-derive several existing results, and also to obtain several new results on consistency and convergence rates. Our analysis also identifies two key properties of loss and regularization functions, referred to as restricted strong convexity and decomposability, that ensure the corresponding regularized M-estimators have fast convergence rates. 1 Introduction In many fields of science and engineering (among them genomics, financial engineering, natural language processing, remote sensing, and social network analysis), one encounters statistical inference problems in which the number of predictors p is comparable to or even larger than the number of observations n. Under this type of high-dimensional scaling, it is usually impossible to obtain statistically consistent estimators unless one restricts to subclasses of models with particular structure. For instance, the data might be sparse in a suitably chosen basis, could lie on some manifold, or the dependencies among the variables might have Markov structure specified by a graphical model. In such settings, a common approach to estimating model parameters is is through the use of a regularized M-estimator, in which some loss function (e.g., the negative log-likelihood of the data) is regularized by a function appropriate to the assumed structure. Such estimators may also be interpreted from a Bayesian perspective as maximum a posteriori estimates, with the regularizer reflecting prior information. In this paper, we study such regularized M-estimation procedures, and attempt to provide a unifying framework that both recovers some existing results and provides 1 new results on consistency and convergence rates under high-dimensional scaling. We illustrate some applications of this general framework via three running examples of constrained parametric structures. The first class is that of sparse vector models; we consider both the case of “hard-sparse” models which involve an explicit constraint on the number on non-zero model parameters, and also a class of “weak-sparse” models in which the ordered coefficients decay at a certain rate. Second, we consider block-sparse models, in which the parameters are matrix-structured, and entire rows are either zero or not. Our third class is that of low-rank matrices, which arise in system identification, collaborative filtering, and other types of matrix completion problems. To motivate the need for a unified analysis, let us provide a brief (and hence necessarily incomplete) overview of the broad range of past and on-going work on high-dimensional inference. For the case of sparse regression, a popular regularizer is the ℓ1 norm of the parameter vector, which is the sum of the absolute values of the parameters. A number of researchers have studied the Lasso [15, 3] as well as the closely related Dantzig selector [2] and provided conditions on various aspects of its behavior, including ℓ2-error bounds [7, 1, 21, 2] and model selection consistency [22, 19, 6, 16]. For generalized linear models (GLMs) and exponential family models, estimators based on ℓ1-regularized maximum likelihood have also been studied, including results on risk consistency [18] and model selection consistency [11]. A body of work has focused on the case of estimating Gaussian graphical models, including convergence rates in Frobenius and operator norm [14], and results on operator norm and model selection consistency [12]. Motivated by inference problems involving block-sparse matrices, other researchers have proposed block-structured regularizers [17, 23], and more recently, high-dimensional consistency results have been obtained for model selection and parameter consistency [4, 8]. In this paper, we derive a single main theorem, and show how we are able to rederive a wide range of known results on high-dimensional consistency, as well as some novel ones, including estimation error rates for low-rank matrices, sparse matrices, and “weakly”-sparse vectors. Due to space constraints, many of the technical details are deferred to the full-length version of this conference paper. 2 Problem formulation and some key properties In this section, we begin with a precise formulation of the problem, and then develop some key properties of the regularizer and loss function. In particular, we define a notion of decomposability for regularizing functions r, and then prove that when it is satisfied, the error !∆= !θ −θ∗of the regularized M-estimator must satisfy certain constraints We use these constraints to define a notion of restricted strong convexity that the loss function must satisfy. 2.1 Problem set-up Consider a random variable Z with distribution P taking values in a set Z. Let Zn 1 := {Z1, . . . , Zn} denote n observations drawn in an i.i.d. manner from P, and suppose θ∗∈Rp is some parameter of this distribution. We consider the problem of estimating θ∗from the data Zn 1 , and in order to do so, we consider the following class of regularized M-estimators. Let L : Rp × Zn %→R be some loss function that assigns a cost to any parameter θ ∈Rp, for a given set of observations Zn 1 . Let r : Rp %→R denote a regularization function. We then consider the regularized M-estimator given by !θ ∈ arg min θ∈Rp " L(θ; Zn 1 ) + λnr(θ) # , (1) where λn > 0 is a user-defined regularization penalty. For ease of notation, in the sequel, we adopt the shorthand L(θ) for L(θ; Zn 1 ). Throughout the paper, we assume that the loss function L is convex and differentiable, and that the regularizer r is a norm. Our goal is to provide general techniques for deriving bounds on the error !θ−θ∗in some error metric d. A common example is the ℓ2-norm d(!θ−θ∗) := ∥!θ−θ∗∥2. As discussed earlier, high-dimensional parameter estimation is made possible by structural constraints on θ∗such as sparsity, and we will see that the behavior of the error is determined by how well these constraints are captured by the regularization function r(·). We now turn to the properties of the regularizer r and the loss function L that underlie our analysis. 2 2.2 Decomposability Our first condition requires that the regularization function r be decomposable, in a sense to be defined precisely, with respect to a family of subspaces. This notion is a formalization of the manner in which the regularization function imposes constraints on possible parameter vectors θ∗∈Rp. We begin with some abstract definitions, which we then illustrate with a number of concrete examples. Take some arbitrary inner product space H, and let ∥·∥2 denote the norm induced by the inner product. Consider a pair (A, B) of subspaces of H such that A ⊆B⊥. For a given subspace A and vector u ∈H, we let πA(u) := argminv∈A ∥u −v∥2 denote the orthogonal projection of u onto A. We let V = {(A, B) | A ⊆B⊥} be a collection of subspace pairs. For a given statistical model, our goal is to construct subspace collections V such that for any given θ∗from our model class, there exists a pair (A, B) ∈V with ∥πA(θ∗)∥2 ≈∥θ∗∥2, and ∥πB(θ∗)∥2 ≈0. Of most interest to us are subspace pairs (A, B) in which this property holds but the subspace A is relatively small and B is relatively large. Note that A represents the constraints underlying our model class, and imposed by our regularizer. For the bulk of the paper, we assume that H = Rp and use the standard Euclidean inner product (which should be assumed unless otherwise specified). As a first concrete (but toy) example, consider the model class of all vectors θ∗∈Rp, and the subspace collection T that consists of a single subspace pair (A, B) = (Rp, 0). We refer to this choice (V = T ) as the trivial subspace collection. In this case, for any θ∗∈Rp, we have πA(θ∗) = θ∗and πB(θ∗) = 0. Although this collection satisfies our desired property, it is not so useful since A = Rp is a very large subspace. As a second example, consider the class of s-sparse parameter vectors θ∗∈Rp, meaning that θ∗ i ̸= 0 only if i ∈S, where S is some s-sized subset of {1, 2, . . . , p}. For any given subset S and its complement Sc, let us define the subspaces A(S) = {θ ∈Rp | θSc = 0}, and B(S) = {θ ∈Rp | θS = 0}, and the s-sparse subspace collection S = {(A(S), B(S)) | S ⊂{1, . . . , p}, |S| = s}. With this set-up, for any s-sparse parameter vector θ∗, we are guaranteed that there exists some (A, B) ∈S such that πA(θ∗) = θ∗and πB(θ∗) = 0. In this case, the property is more interesting, since the subspaces A(S) are relatively small as long as |S| = s ≪p. With this set-up, we say that the regularizer r is decomposable with respect to a given subspace pair (A, B) if r(u + z) = r(u) + r(z) for all u ∈A and z ∈B. (2) In our subsequent analysis, we impose the following condition on the regularizer: Definition 1. The regularizer r is decomposable with respect to a given subspace collection V, meaning that it is decomposable for each subspace pair (A, B) ∈V. Note that any regularizer is decomposable with respect to the trivial subspace collection T = {(Rp, 0)}. It will be of more interest to us when the regularizer decomposes with respect to a larger collection V that includes subspace pairs (A, B) in which A is relatively small and B is relatively large. Let us illustrate with some examples. • Sparse vectors and ℓ1 norm regularization. Consider a model involving s-sparse regression vectors θ∗∈Rp, and recall the definition of the s-sparse subspace collection S discussed above. We claim that the ℓ1-norm regularizer r(u) = ∥u∥1 is decomposable with respect to S. Indeed, for any s-sized subset S and vectors u ∈A(S) and v ∈B(S), we have ∥u + v∥1 = ∥u∥1 + ∥v∥1, as required. • Group-structured sparse matrices and ℓ1,q matrix norms. Various statistical problems involve matrix-valued parameters Θ ∈Rk×m; examples include multivariate regression problems or (inverse) covariance matrix estimation. We can define an inner product on such matrices via ⟨⟨Θ, Σ⟩⟩= trace(ΘT Σ) and the induced (Frobenius) norm $k i=1 $m j=1 Θ2 i,j. Let us suppose that Θ satisfies a group sparsity condition, meaning that the ith row, denoted Θi, is non-zero only if i ∈S ⊆{1, . . . , k} and the cardinality of S is controlled. For a given subset S, we can define the subspace pair B(S) = " Θ ∈Rk×m | Θi = 0 for all i ∈Sc# , and A(S) = (B(S))⊥, For some fixed s ≤k, we then consider the collection V = {(A(S), B(S)) | S ⊂{1, . . . , k}, |S| = s}, 3 which is a group-structured analog of the s-sparse set S for vectors. For any q ∈[1, ∞], now suppose that the regularizer is the ℓ1/ℓq matrix norm, given by r(Θ) = $k i=1[$m j=1 |Θij|q]1/q, corresponding to applying the ℓq norm to each row and then taking the ℓ1-norm of the result. It can be seen that the regularizer r(Θ) = |||Θ|||1,q is decomposable with respect to the collection V. • Low-rank matrices and nuclear norm. The estimation of low-rank matrices arises in various contexts, including principal component analysis, spectral clustering, collaborative filtering, and matrix completion. In particular, consider the class of matrices Θ ∈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 a pair of subspaces A(U, V ) and B(U, V ) of Rk×m as follows: A(U, V ) := " Θ ∈Rk×m | row(Θ) ⊆V, col(Θ) ⊆U # , and (3a) B(U, V ) := " Θ ∈Rk×m | row(Θ) ⊆V ⊥, col(Θ) ⊆U ⊥# . (3b) Note that A(U, V ) ⊆B⊥(U, V ), as is required by our construction. We then consider the collection V = {(A(U, V ), B(U, V )) | U ⊆Rk, V ⊆Rm}, where (U, V ) range over all pairs of r-dimensional subspaces. Now suppose that we regularize with the nuclear norm r(Θ) = |||Θ|||1, corresponding to the sum of the singular values of the matrix Θ. It can be shown that the nuclear norm is decomposable with respect to V. Indeed, since any pair of matrices M ∈A(U, V ) and M ′ ∈B(U, V ) have orthogonal row and column spaces, we have |||M +M ′|||1 = |||M|||1 +|||M ′|||1 (e.g., see the paper [13]). Thus, we have demonstrated various models and regularizers in which decomposability is satisfied with interesting subspace collections V. We now show that decomposability has important consequences for the error !∆= !θ −θ∗, where !θ ∈Rp is any optimal solution of the regularized M-estimation procedure (1). In order to state a lemma that captures this fact, we need to define the dual norm of the regularizer, given by r∗(v) := supu∈Rp ⟨u,v⟩ r(u) . For the regularizers of interest, the dual norm can be obtained via some easy calculations. For instance, given a vector θ ∈Rp and r(θ) = ∥θ∥1, we have r∗(θ) = ∥θ∥∞. Similarly, given a matrix Θ ∈Rk×m and the nuclear norm regularizer r(Θ) = |||Θ|||1, we have r∗(Θ) = |||Θ|||2, corresponding to the operator norm (or maximal singular value). Lemma 1. Suppose !θ is an optimal solution of the regularized M-estimation procedure (1), with associated error ∆= !θ−θ∗. Furthermore, suppose that the regularization penalty is strictly positive with λn ≥2 r∗(∇L(θ∗)). Then for any (A, B) ∈V r(πB(!∆)) ≤3r(πB⊥(!∆)) + 4r(πA⊥(θ∗)). This property plays an essential role in our definition of restricted strong convexity and subsequent analysis. 2.3 Restricted Strong Convexity Next we state our assumption on the loss function L. In general, guaranteeing that L(!θ) −L(θ∗) is small is not sufficient to show that !θ and θ∗are close. (As a trivial example, consider a loss function that is identically zero.) The standard way to ensure that a function is “not too flat” is via the notion of strong convexity—in particular, by requiring that there exist some constant γ > 0 such that L(θ∗+∆)−L(θ∗)−⟨∇L(θ∗), ∆⟩≥γ d2(∆) for all ∆∈Rp. In the high-dimensional setting, where the number of parameters p may be much larger than the sample size, the strong convexity assumption need not be satisfied. As a simple example, consider the usual linear regression model y = Xθ∗+ w, where y ∈Rn is the response vector, θ∗∈Rp is the unknown parameter vector, X ∈Rn×p is the design matrix, and w ∈Rn is a noise vector, with i.i.d. zero mean elements. The least-squares loss is given by L(θ) = 1 2n∥y −Xθ∥2 2, and has the Hessian H(θ) = 1 nXT X. It is easy to check that the p × p matrix H(θ) will be rank-deficient whenever p > n, showing that the least-squares loss cannot be strongly convex (with respect to d(·) = ∥·∥2) when p > n. Herein lies the utility of Lemma 1: it guarantees that the error !∆must lie within a restricted set, so that we only need the loss function to be strongly convex for a limited set of directions. More precisely, we have: 4 Definition 2. Given some subset C ⊆Rp and error norm d(·), we say that the loss function L satisfies restricted strong convexity (RSC) (with respect to d(·)) with parameter γ(L) > 0 over C if L(θ∗+ ∆) −L(θ∗) −⟨∇L(θ∗), ∆⟩ ≥ γ(L) d2(∆) for all ∆∈C. (4) In the statement of our results, we will be interested in loss functions that satisfy RSC over sets C(A, B, ϵ) that are indexed by a subspace pair (A, B) and a tolerance ϵ ≥0 as follows: C(A, B, ϵ) := " ∆∈Rp | r(πB(∆)) ≤3r(πB⊥(∆)) + 4r(πA⊥(θ∗)), d(∆) ≥ϵ # . (5) In the special case of least-squares regression with hard sparsity constraints, the RSC condition corresponds to a lower bound on the sparse eigenvalues of the Hessian matrix XT X, and is essentially equivalent to a restricted eigenvalue condition introduced by Bickel et al. [1]. 3 Convergence rates We are now ready to state a general result that provides bounds and hence convergence rates for the error d(!θ −θ∗). Although it may appear somewhat abstract at first sight, we illustrate that this result has a number of concrete consequences for specific models. In particular, we recover the best known results about estimation in s-sparse models with general designs [1, 7], as well as a number of new results, including convergence rates for estimation under ℓq-sparsity constraints, estimation in sparse generalized linear models, estimation of block-structured sparse matrices and estimation of low-rank matrices. In addition to the regularization parameter λn and RSC constant γ(L) of the loss function, our general result involves a quantity that relates the error metric d to the regularizer r; in particular, for any set A ⊆Rp, we define Ψ(A) := sup {u∈Rp | d(u)=1} r(u), (6) so that r(u) ≤Ψ(A)d(u) for u ∈A. Theorem 1 (Bounds for general models). For a given subspace collection V, suppose that the regularizer r is decomposable, and consider the regularized M-estimator (1) with λn ≥2 r∗(∇L(θ∗)). Then, for any pair of subspaces (A, B) ∈V and tolerance ϵ ≥0 such that the loss function L satisfies restricted strong convexity over C(A, B, ϵ), we have d(!θ −θ∗) ≤ max % ϵ, 1 γ(L) & 2 Ψ(B⊥) λn + ' 2 λn γ(L) r(πA⊥(θ∗)) () . (7) The proof is motivated by arguments used in past work on high-dimensional estimation (e.g., [9, 14]); we provide the details in the full-length version. The remainder of this paper is devoted to illustrations of the consequences of Theorem 1 for specific models. In all of these uses of Theorem 1, we choose the regularization parameter as small as possible—namely, λn = 2 r∗(∇L(θ∗)). Although Theorem 1 allows for more general choices, in this conference version, we focus exclusively on the case when d(·) to be the ℓ2-norm, In addition, we choose a tolerance parameter ϵ = 0 for all of the results except for the weak-sparse models treated in Section 3.1.2. 3.1 Bounds for linear regression Consider the standard linear regression model y = Xθ∗+ w, where θ∗∈Rp is the regression vector, X ∈Rn×p is the design matrix, and w ∈Rn is a noise vector. Given the observations (y, X), our goal is to estimate the regression vector θ∗. Without any structural constraints on θ∗, we can apply Theorem 1 with the trivial subspace collection T = {(Rp, 0)} to establish a rate ∥!θ −θ∗∥2 = O(σ ' p/n) for ridge regression, which holds as long as X is full-rank (and hence requires n > p). Here we consider the sharper bounds that can be obtained when it is assumed that θ∗is an s-sparse vector. 5 3.1.1 Lasso estimates of hard sparse models More precisely, let us consider estimating an s-sparse regression vector θ∗by solving the Lasso program !θ ∈arg minθ∈Rp " 1 2n∥y −Xθ∥2 2 + λn∥θ∥1 # . The Lasso is a special case of our Mestimator (1) with r(θ) = ∥θ∥1, and L(θ) = 1 2n∥y −Xθ∥2 2. Recall the definition of the s-sparse subspace collection S from Section 2.2. For this problem, let us set ϵ = 0 so that the restricted strong convexity set (5) reduces to C(A, B, 0) = {∆∈Rp | ∥∆Sc∥1 ≤3∥∆S∥1}. Establishing restricted strong convexity for the least-squares loss is equivalent to ensuring the following bound on the design matrix: ∥Xθ∥2 2/n ≥γ(L) ∥θ∥2 2 for all θ ∈Rp such that ∥θS∥1 ≤3∥θS∥1. (8) As mentioned previously, this condition is essentially the same as the restricted eigenvalue condition developed by Bickel et al. [1]. In very recent work, Raskutti et al. [10] show that condition (8) holds with high probability for various random ensembles of Gaussian matrices with non-i.i.d. elements. In addition to the RSC condition, we assume that X has bounded column norms (specifically, ∥Xi∥2 ≤2√n for all i = 1, . . . , p), and that the noise vector w ∈Rn has i.i.d. elements with zero-mean and sub-Gaussian tails (i.e., there exists some constant σ > 0 such that P[|wi| > t] ≤exp(−t2/2σ2) for all t > 0). Under these conditions, we recover as a corollary of Theorem 1 the following known result [1, 7]. Corollary 1. Suppose that the true vector θ∗∈Rp is exactly s-sparse with support S, and that the design matrix X satisfies condition (8). If we solve the the Lasso with λ2 n = 16σ2 log p n , then with probability at least 1 −c1 exp(−c2nλ2 n), the solution satisfies ∥!θ −θ∗∥2 ≤ 8σ γ(L) * s log p n . (9) Proof. As noted previously, the ℓ1-regularizer is decomposable for the sparse subspace collection S, while condition (8) ensures that RSC holds for all sets C(A, B, 0) with (A, B) ∈S. We must verify that the given choice of regularization satisfies λn ≥2 r∗(∇L(θ∗)). Note that r∗(·) = ∥·∥∞, and moreover that ∇L(θ∗) = XT w/n. Under the column normalization condition on the design matrix X and the sub-Gaussian nature of the noise, it follows that ∥XT w/n∥∞≤ + 4σ2 log p n with high probability. The bound in Theorem 1 is thus applicable, and it remains to compute the form that its different terms take in this special case. For the ℓ1-regularizer and the ℓ2 error metric, we have Ψ(AS) = ' |S|. Given the hard sparsity assumption, r(θ∗ Sc) = 0, so that Theorem 1 implies that ∥!θ −θ∗∥2 ≤ 2 γ(L) √sλn = 8σ γ(L) + s log p n , as claimed. 3.1.2 Lasso estimates of weak sparse models We now consider models that satisfy a weak sparsity assumption. More concretely, suppose that θ∗ lies in the ℓq-“ball” of radius Rq—namely, the set Bq(Rq) := {θ ∈Rp | $p i=1 |θi|q ≤Rq} for some q ∈(0, 1]. Our analysis exploits the fact that any θ∗∈Bq(Rq) can be well approximated by an s-sparse vector (for an appropriately chosen sparsity index s). It is natural to approximate θ∗by a vector supported on the set S = {i | |θ∗ i | ≥τ}. For any choice of threshold τ > 0, it can be shown that |S| ≤Rqτ −q, and it is optimal to choose τ equal to the same regularization parameter λn from Corollary 1 (see the full-length version for details). Accordingly, we consider the s-sparse subspace collection S with subsets of size s = Rqλ−q n . We assume that the noise vector w ∈Rn is as defined above and that the columns are normalized as in the previous section. We also assume that the matrix X satisfies the condition ∥Xv∥2 ≥κ1∥v∥2 −κ2 ,log p n - 1 2 ∥v∥1 for constants κ1, κ2 > 0. (10) Raskutti et al. [10] show that this property holds with high probablity for suitable Gaussian random matrices. Under this condition, it can be verified that RSC holds with γ(L) = κ1/2 over the set C . A(S), B(S), ϵn), where ϵn = . 4/κ1 + ' 4/κ1)R 1 2q .+ 16 σ2 log p n /1−q/2. The following result, which we obtain by applying Theorem 1 in this setting, is new to the best of our knowledge: 6 Corollary 2. Suppose that the true vector θ∗∈Bq(Rq), and the design matrix X satisfies condition (10). If we solve the Lasso with λ2 n = 16σ2 log p n , then with probability 1 −c1 exp(−c2nλ2 n), the solution satisfies ∥!θ −θ∗∥2 ≤ R 1 2q 0* 16 σ2 log p n 11−q/2 2 2 γ(L) + √ 2 ' γ(L) 3 . (11) We note that both of the rates—for hard-sparsity in Corollary 1 and weak-sparsity in Corollary 2— are known to be optimal1 in a minimax sense [10]. 3.2 Bounds for generalized linear models Our next example is a generalized linear model with canonical link function, where the distribution of response y ∈Y based on a predictor x ∈Rp is given by p(y | x; θ∗) = exp(y⟨θ∗, x⟩− a(⟨θ∗, X⟩) + d(y)), for some fixed functions a : R %→R and d : Y %→R, where ∥x∥∞≤A, and |y| ≤B. We consider estimating θ∗from observations {(xi, yi)}n i=1 by ℓ1-regularized maximum likelihood !θ ∈arg minθ∈Rp " −1 n⟨θ, . $n i=1 yixi / ⟩+ 1 n $n i=1 a(⟨θ, xi⟩)+∥θ∥1 # . This is a special case of our M-estimator (1) with L(θ) = −⟨θ, . 1 n $n i=1 yixi / ⟩+ 1 n $n i=1 a(⟨θ, xi⟩), and r(θ) = ∥θ∥1. Let X ∈Rn×p denote the matrix with ith row xi. For analysis, we again use the s-sparse subspace collection S and ϵ = 0. With these choices, it can be verified that an appropriate version of the RSC will hold if the second derivative a′′ is strongly convex, and the design matrix X satisfies a version of the condition (8). Corollary 3. Suppose that the true vector θ∗∈Rp is exactly s-sparse with support S, and the model (a, X) satisfies an RSC condition. Suppose that we compute the ℓ1-regularized MLE with λ2 n = 32A2B2 log p n . Then with probability 1 −c1 exp(−c2nλ2 n), the solution satisfies ∥!θ −θ∗∥2 ≤ 16AB γ(L) * s log p n . (12) We defer the proof to the full-length version due to space constraints. 3.3 Bounds for sparse matrices In this section, we consider some extensions of our results to estimation of regression matrices. Various authors have proposed extensions of the Lasso based on regularizers that have more structure than the ℓ1 norm (e.g., [17, 20, 23, 5]). Such regularizers allow one to impose various types of block-sparsity constraints, in which groups of parameters are assumed to be active (or inactive) simultaneously. We assume that the observation model takes on the form Y = XΘ∗+ W, where Θ∗∈Rk×m is the unknown fixed set of parameters, X ∈Rn×k is the design matrix, and W ∈ Rn×m is the noise matrix. As a loss function, we use the Frobenius norm 1 nL(Θ) = |||Y −XΘ|||2 F , and as a regularizer, we use the ℓ1,q-matrix norm for some q ≥1, which takes the form |||Θ|||1,q = $k i=1 ∥(Θi1, . . . , Θim)∥q. We refer to the resulting estimator as the q-group Lasso. We define the quantity η(m; q) = 1 if q ∈(1, 2] and η(m; q) = m1/2−1/q if q > 2. We then set the regularization parameter as follows: λn = 4 4σ √n[η(m; q)√log k + Cqm1−1/q] if q > 1 4σ + log(km) n for q = 1. Corollary 4. Suppose that the true parameter matix Θ∗has non-zero rows only for indices i ∈S ⊆ {1, . . . , k} where |S| = s, and that the design matrix X ∈Rn×k satisfies condition (8). Then with probability at least 1 −c1 exp(−c2nλ2 n), the q-block Lasso solution satisfies |||!Θ −Θ∗|||F ≤ 2 γ(L)Ψ(S)λn. (13) 1Raskutti et al. [10] show that the rate (11) is achievable by solving the computationally intractable problem of minimizing L(θ) over the ℓq-ball. 7 The proof is provided in the full-length version; here we consider three special cases of the above result. A simple argument shows that Ψ(S) = √s if q ≥2, and Ψ(S) = m1/q−1/2 √s if q ∈[1, 2]. For q = 1, solving the group Lasso is identical solving a Lasso problem with sparsity sm and ambient dimension km, and the resulting upper bound 8σ γ(L) + s m log(km) n reflects this fact (compare to Corollary 1). For the case q = 2, Corollary 4 yields the upper bound 8σ γ(L) &+ s log k n + ' sm n ( , which also has a natural interpretation: the term s log k n captures the difficulty of finding the s nonzero rows out of the total k, whereas the term sm n captures the difficulty of estimating the sm free parameters in the matrix (once the non-zero rows have been determined). We note that recent work by Lounici et al. [4] established the bound O( σ γ(L) + c√m s log k n + sm n ), which is equivalent apart from a term √m. Finally, for q = ∞, we obtain the upper bound 8σ γ(L) &+ s log k n + m ' s n ( . 3.4 Bounds for estimating low rank matrices Finally, we consider the implications of our main result for the problem of estimating low-rank matrices. This structural assumption is a natural variant of sparsity, and has been studied by various authors (see the paper [13] and references therein). To illustrate our main theorem in this context, let us consider the following instance of low-rank matrix learning. Given a low-rank matrix Θ∗∈Rk×m, suppose that we are given n noisy observations of the form Yi = ⟨⟨Xi, Θ∗⟩⟩+ Wi, where Wi ∼N(0, 1) and ⟨⟨A, B⟩⟩:= trace(AT B). Such an observation model arises in system identification settings in control theory [13]. The following regularized M-estimator can be considered in order to estimate the desired low-rank matrix Θ∗: min Θ∈Rm×p 1 2n n 5 i=1 |Yi −⟨⟨Xi, Θ)⟩⟩|2 + |||Θ|||1, (14) where the regularizer, |||Θ|||1, is the nuclear norm, or the sum of the singular values of Θ. Recall the rank-r collection V defined for low-rank matrices in Section 2.2. Let Θ∗= UΣW T be the singular value decomposition (SVD) of Θ∗, so that U ∈Rk×r and W ∈Rm×r are orthogonal, and Σ ∈Rr×r is a diagonal matrix. If we let A = A(U, W) and B = B(U, W), then, πB(Θ∗) = 0, so that by Lemma 1 we have that |||πB(∆)|||1 ≤3 |||πB⊥(∆)|||1. Thus, for restricted strong convexity to hold it can be shown that the design matrices Xi must satisfy 1 n n 5 i=1 |⟨⟨Xi, ∆⟩⟩|2 ≥γ(L) |||∆|||2 F for all ∆such that |||πB(∆)|||1 ≤3 |||πB⊥(∆)|||1, (15) and satisfy the appropriate analog of the column-normalization condition. As with analogous conditions for sparse linear regression, these conditions hold w.h.p. for various non-i.i.d. Gaussian random matrices.2 Corollary 5. Suppose that the true matrix Θ∗has rank r ≪min(k, m), and that the design matrices {Xi} satisfy condition (15). If we solve the regularized M-estimator (14) with λn = 16 √ k+√m √n , then with probability at least 1 −c1 exp(−c2(k + m)), we have |||!Θ −Θ∗|||F ≤ 16 γ(L) 6* rk n + *rm n 7 . (16) Proof. Note that if rank(Θ∗) = r, then |||Θ∗|||1 ≤√r|||Θ∗|||F so that Ψ(B⊥) = √ 2r, since the subspace B(U, V )⊥consists of matrices with rank at most 2r. All that remains is to show that λn ≥2 r∗(∇L(Θ∗)). Standard analysis gives that the dual norm to ||| · |||1 is the operator norm, ||| · |||2. Applying this observation we may construct a bound on the operator norm of ∇L(Θ∗) = 1 n $n i=1 XiWi. Given unit vectors u ∈Rk and v ∈Rm, 1 n $n i=1 |⟨⟨Xi, vuT ⟩⟩|2 ≤|||vuT |||2 F = 1. Therefore, 1 n $n i=1(uT Xiv)Wi ∼N(0, 1 n). A standard argument shows that the supremum over all unit vectors u and v is bounded above by 8 √ k+√m √n with probability at least 1−c1 exp(−c2(k+m)), verifying that λn ≥2r∗(∇L(Θ∗)) with high probability. 2This claim involves some use of concentration of measure and Gaussian comparison inequalities analogous to arguments in Raskutti et al. [10]; see the full-length length version for details. 8 References [1] P. Bickel, Y. Ritov, and A. Tsybakov. Simultaneous analysis of Lasso and Dantzig selector. Submitted to Annals of Statistics, 2008. [2] E. Candes and T. Tao. The Dantzig selector: Statistical estimation when p is much larger than n. Annals of Statistics, 35(6):2313–2351, 2007. [3] S. Chen, D. L. Donoho, and M. A. Saunders. Atomic decomposition by basis pursuit. SIAM J. Sci. Computing, 20(1):33–61, 1998. [4] K. Lounici, M. Pontil, A. B. Tsybakov, and S. van de Geer. Taking advantage of sparsity in multi-task learning. Arxiv, 2009. [5] L. Meier, S. Van de Geer, and P. B¨uhlmann. The group lasso for logistic regression. Journal of the Royal Statistical Society, Series B, 70:53–71, 2008. [6] N. Meinshausen and P. B¨uhlmann. High-dimensional graphs and variable selection with the Lasso. Annals of Statistics, 34:1436–1462, 2006. [7] N. Meinshausen and B. Yu. Lasso-type recovery of sparse representations for high-dimensional data. Annals of Statistics, 37(1):246–270, 2009. [8] G. Obozinski, M. J. Wainwright, and M. I. Jordan. Union support recovery in high-dimensional multivariate regression. Technical report, Department of Statistics, UC Berkeley, August 2008. [9] S. Portnoy. Asymptotic behavior of M-estimators of p regression parameters when p2/n is large: I. consistency. Annals of Statistics, 12(4):1296–1309, 1984. [10] G. Raskutti, M. J. Wainwright, and B. Yu. Minimax rates of estimation for high-dimensional linear regression over ℓq-balls. Technical Report arXiv:0910.2042, UC Berkeley, Department of Statistics, 2009. [11] P. Ravikumar, M. J. Wainwright, and J. Lafferty. High-dimensional Ising model selection using ℓ1-regularized logistic regression. Annals of Statistics, 2008. To appear. [12] P. Ravikumar, M. J. Wainwright, G. Raskutti, and B. Yu. High-dimensional covariance estimation by minimizing ℓ1-penalized log-determinant divergence. Technical Report 767, Department of Statistics, UC Berkeley, September 2008. [13] B. Recht, M. Fazel, and P. A. Parrilo. Guaranteed minimum-rank solutions of linear matrix equations via nuclear norm minimization. Allerton Conference, 2007. [14] A.J. Rothman, P.J. Bickel, E. Levina, and J. Zhu. Sparse permutation invariant covariance estimation. Electron. J. Statist., 2:494–515, 2008. [15] R. Tibshirani. Regression shrinkage and selection via the lasso. Journal of the Royal Statistical Society, Series B, 58(1):267–288, 1996. [16] J. Tropp. Just relax: Convex programming methods for identifying sparse signals in noise. IEEE Trans. Info Theory, 52(3):1030–1051, March 2006. [17] B. Turlach, W.N. Venables, and S.J. Wright. Simultaneous variable selection. Technometrics, 27:349–363, 2005. [18] S. Van de Geer. High-dimensional generalized linear models and the lasso. Annals of Statistics, 36(2):614–645, 2008. [19] M. J. Wainwright. Sharp thresholds for high-dimensional and noisy sparsity recovery using ℓ1constrained quadratic programming (Lasso). IEEE Trans. Information Theory, 55:2183–2202, May 2009. [20] M. Yuan and Y. Lin. Model selection and estimation in regression with grouped variables. Journal of the Royal Statistical Society B, 1(68):49, 2006. [21] C. Zhang and J. Huang. Model selection consistency of the lasso selection in high-dimensional linear regression. Annals of Statistics, 36:1567–1594, 2008. [22] P. Zhao and B. Yu. On model selection consistency of Lasso. Journal of Machine Learning Research, 7:2541–2567, 2006. [23] P. Zhao, G. Rocha, and B. Yu. Grouped and hierarchical model selection through composite absolute penalties. Annals of Statistics, 37(6A):3468–3497, 2009. 9
2009
217
3,723
Group Orthogonal Matching Pursuit for Variable Selection and Prediction Aur´elie C. Lozano, Grzegorz ´Swirszcz, Naoki Abe IBM Watson Research Center, 1101 Kitchawan Road, Yorktown Heights NY 10598,USA {aclozano,swirszcz,nabe}@us.ibm.com Abstract We consider the problem of variable group selection for least squares regression, namely, that of selecting groups of variables for best regression performance, leveraging and adhering to a natural grouping structure within the explanatory variables. We show that this problem can be efficiently addressed by using a certain greedy style algorithm. More precisely, we propose the Group Orthogonal Matching Pursuit algorithm (Group-OMP), which extends the standard OMP procedure (also referred to as “forward greedy feature selection algorithm” for least squares regression) to perform stage-wise group variable selection. We prove that under certain conditions Group-OMP can identify the correct (groups of) variables. We also provide an upperbound on the l∞norm of the difference between the estimated regression coefficients and the true coefficients. Experimental results on simulated and real world datasets indicate that Group-OMP compares favorably to Group Lasso, OMP and Lasso, both in terms of variable selection and prediction accuracy. 1 Introduction We address the problem of variable selection for regression, where a natural grouping structure exists within the explanatory variables, and the goal is to select the correct group of variables, rather than the individual variables. This problem arises in many situations (e.g. in multifactor ANOVA, generalized additive models, time series data analysis, where lagged variables belonging to the same time series may form a natural group, gene expression analysis from microarrays data, where genes belonging to the same functional cluster may be considered as a group). In these settings, selecting the right groups of variables is often more relevant to the subsequent use of estimated models, which may involve interpreting the models and making decisions based on them. Recently, several methods have been proposed to address this variable group selection problem, in the context of linear regression [12, 15]. These methods are based on extending the Lasso formulation [8] by modifying the l1 penalty to account for the group structure. Specifically, Yuan & Lin [12] proposed the Group Lasso, which solves arg minβ 1 2 ³ ∥y −PJ j=1 XGjβGj∥2 + λ PJ j=1 ∥βGj∥2 ´ , where XG1, . . . , XGJ are the natural groupings within the variables of X and βGj are the coefficient vectors for variables in groups Gj. Zhao et al [15] considered a more general penalty class, the Composite Absolute Penalties family T(β) = PJ j=1 ∥βj∥l0 lj, of which the Group Lasso penalty is a special instance. This development opens up a new direction of research, namely that of extending the existing regression methods with variable selection to the variable group selection problem and investigating to what extent they carry over to the new scenario. The present paper establishes that indeed one recent advance in variable selection methods for regression, “forward greedy feature selection algorithm”, also known as the Orthogonal Matching 1 Pursuit (OMP) algorithm in the signal processing community [5], can be generalized to the current setting of group variable selection. Specifically we propose the “Group Orthogonal Matching Pursuit” algorithm (Group-OMP), which extends the OMP algorithm to leverage variable groupings, and prove that, under certain conditions, Group-OMP can identify the correct (groups of) variables when the sample size tends to infinity. We also provide an upperbound on the l∞norm of the difference between the estimated regression coefficients and the true coefficients. Hence our results generalize those of Zhang [13], which established consistency of the standard OMP algorithm. A key technical contribution of this paper is to provide a condition for Group-OMP to be consistent, which generalizes the “Exact Recovery Condition” of [9](Theorem 3.1) stated for OMP under the noiseless case. This result should also be of interest to the signal processing community in the context of block-sparse approximation of signals. We also conduct empirical evaluation to compare the performance of Group-OMP with existing methods, on simulated and real world datasets. Our results indicate that Group-OMP favorably compares to the Group Lasso, OMP and Lasso algorithms, both in terms of the accuracy of prediction and that of variable selection. Related work include [10, 3] using OMP for simultaneous sparse approximation, [11] showing that standard MP selects features from correct groups, and [4] that consider a more general setting than ours. The rest of the paper is organized as follows. Section 2 describes the proposed Group-OMP procedure. The consistency results are then stated in Section 3. The empirical evaluation results are presented in Section 4. We conclude the paper with some discussions in Section 5. 2 Group Orthogonal Matching Pursuit Consider the general regression problem y = X ¯β + ν, where y ∈Rn is the response vector, X = [f1, . . . , fd] ∈Rn×d is the matrix of feature (or variable) vectors fj ∈Rn, ¯β ∈Rd is the coefficient vector and ν ∈Rn is the noise vector. We assume that the noise components νi, i = 1, . . . , n, are independent Gaussian variables with mean 0 and variance σ2. For any G ⊂{1, . . . , d} let XG denote the restriction of X to the set of variables, {fj, j ∈G}, where the colums fj are arranged in ascending order. Similarly for any vector β ∈Rd of regression coefficients, denote βG its restriction to G, with reordering in ascending order. Suppose that a natural grouping structure exists within the variables of X consisting of J groups XG1, . . . , XGJ, where Gi ⊂{1, . . . , d}, Gi ∩Gj = ∅for i ̸= j and XGi ∈Rn×dj. Then, the above regression problem can be decomposed with respect to the groups, i.e. y = PJ j=1 XGj ¯βGj + ν, where ¯βGj ∈Rdj. Furthermore, to simplify the exposition, assume that each XGj is orthonormalized, i.e. X∗ GjXGj = Idj. Given β ∈Rd let supp(β) = {j : βj ̸= 0}. For any such G and v ∈Rn, denote by ˆβX(G, v) the coefficients resulting from applying ordinary least squares (OLS) with non-zero coefficients restricted to G, i.e., ˆβX(G, v)=arg minβ∈Rd ∥Xβ −v∥2 2 subject to supp(β) ⊂G. Given the above setup, the Group-OMP procedure we propose is described in Figure 1, which extends the OMP procedure to deal with group selection. Note that this procedure picks the best group in each iteration, with respect to reduction of the residual error, and it then re-estimates the coefficients, β(k), as in OMP. We recall that this re-estimation step is what distinguishes OMP, and our group version, from standard boosting-like procedures. • Input: The data matrix X = [f1, . . . , fd] ∈Rn×d, with group structure G1, . . . , GJ, such that X∗ GjXGj = Idj. The response y ∈Rn. Precision ϵ > 0 for the stopping criterion. • Output: The selected groups G(k), the regression coefficients β(k). • Initialization: G(0) = ∅, β(0) = 0. For k = 1, 2, . . . Let j(k) = arg maxj ∥X∗ Gj(Xβ(k−1) −y)∥2. (∗) If (∥X∗ Gj(k)(Xβ(k−1) −y)∥2 ≤ϵ) break Set G(k) = G(k−1) ∪Gj(k). Let β(k) = ˆβX(G(k), y). End Figure 1: Method Group-OMP 2 3 Consistency Results 3.1 Notation Let Ggood denote the set of all the groups included in the true model. We refer to the groups in Ggood as good groups. Similarly we call Gbad the set of all the groups which are not included. We let ggood and gbad denote the set of “good incides” and “bad indices”, i.e. ggood = S Gi∈Ggood Gi and gbad = S Gi∈Gbad Gi. When they are used to restrict index sets for matrix columns or vectors, they are assumed to be in canonical (ascending) order, as we did for G. Furthermore, the elements of Ggood are groups of indices, and |Ggood| is the number of groups in Ggood, while ggood is defined in terms of individual indices, i.e. ggood is the set of indices corresponding to the groups in Ggood. The same holds for Gbad and gbad. In this notation supp(¯β) ⊂ggood. We denote by ρX(Ggood) the smallest eigenvalue of X∗ ggoodXggood, i.e. ρX(Ggood) = infβ © ∥Xβ∥2 2/∥β∥2 2 : supp(β) ⊂ggood ª . Here and throughout the paper we let A∗denote the conjugation of the matrix A (which, for a real matrix A, coincides with its transpose) and A+ denote the Moore–Penrose pseudoinverse of the matrix A (c.f. [6, 7]). If rows of A are linearly independent A+ = A∗(AA∗)−1 and when columns of A are linearly independent A+ = (A∗A)−1A∗. Generally for u = {u1, . . . , u|ggood|}, v = {v1, . . . , v|gbad|} we define ∥u∥good (2,1) = P Gi∈Ggood r P j∈Gi u2 j, and ∥v∥bad (2,1) = P Gi∈Gbad r P j∈Gi v2 j and then for any matrix A ∈R|ggood|×|gbad|, let ∥A∥good/bad (2,1) = sup ∥v∥bad (2,1)=1 ∥Av∥good (2,1). Then we define µX(Ggood) = ∥X+ ggoodXgbad∥good/bad (2,1) . 3.2 The Noiseless Case We first focus on the noiseless case (i.e. ν ≡0). For all k, let rk = Xβ(k) −y. In the noiseless case, we have r0 = −y ∈Span(Ggood). So if Group-OMP has not made a mistake up to round k, we also have rk ∈Span(Ggood). The following theorem and its corollary provide a condition which guarantees that Group-OMP does not make a mistake at the next iteration, given that it has not made any mistakes up to that point. By induction on k, it implies that Group-OMP never makes a mistake. Theorem 1. Reorder the groups in such a way that Ggood = G1, . . . , Gm and Gbad = Gm+1, . . . , GJ. Let r ∈Span(Xggood). Then the following holds ∥(∥X∗ Gm+1r∥2, ∥X∗ Gm+2r∥2, . . . , ∥X∗ GJ r∥2)∥∞ ∥(∥X∗ G1r∥2, ∥X∗ G2r∥2, . . . , ∥X∗ Gmr∥2)∥∞ ≤µX(Ggood). (1) Proof of Theorem 1. Reorder the groups in such way that Ggood = {G1, . . . , Gm} and Gbad = {Gm+1, . . . , GJ}. Let Φ∗: Rn →Rd1 ⊕Rd2 ⊕. . . ⊕Rdm be defined as Φ∗(x) = ¡ (X∗ G1x)T , (X∗ G2x)T , . . . , (X∗ Gmx)T ¢T and analogously let Ψ∗: Rn →Rdm+1 ⊕Rdm+2 ⊕. . . ⊕RdJ be defined as Ψ∗(x) = ³ (X∗ Gm+1x)T , (X∗ Gm+2x)T , . . . , (X∗ GJx)T ´T . We shall denote V Φ = Rd1 ⊕Rd2 ⊕. . . ⊕Rdm with a norm ∥.∥Φ (2,∞) defined as: ∥(v1, v2, . . . , vm)∥Φ (2,∞) = ∥(∥v1∥2, ∥v2∥2, . . . , ∥vm∥2)∥∞for vi ∈ Rdi, i = 1, . . . , m. Analogously V Ψ = Rdm+1 ⊕Rdm+2 ⊕. . . ⊕RdJ with a norm ∥.∥Ψ (2,∞) defined as: ∥(v1, v2, . . . , vJ−m)∥Ψ (2,∞)=∥(∥v1∥2, ∥v2∥2, . . . , ∥vJ−m∥2)∥∞for vj ∈Rdm+j, j = 1, . . . , J −m. It is easy to verify that ∥.∥Φ (2,∞), ∥.∥Ψ (2,∞) are norms indeed.Now the condition expressed by Eq. (1) can be rephrased as ∥Ψ∗(r)∥Ψ (2,∞) ∥Φ∗(r)∥Φ (2,∞) ≤µX(Ggood) (2) 3 Lemma 1. The map Φ∗restricted to Span Sm i=1 XGi is a linear isomorphism onto its image. Proof of Lemma 1. By definition if Φ∗(x) = (0)VΦ then x must be orthogonal to each of the subspaces spanned by XGi, i = 1, . . . , m. Thus ker Φ∗∩Span Sm i=1 XGi = 0 Let (Φ∗)+ denote the inverse mapping whose existence was proved in Lemma 1. The choice of symbol is not coincident, the matrix of this mapping is indeed a pseudoinverse of the matrix (XG1|XG2| . . . |XGm)T .We have ∥Ψ∗(r)∥Ψ (2,∞) ∥Φ∗(r)∥Φ (2,∞) = ∥Ψ∗((Φ∗)+Φ∗(r))∥Ψ (2,∞) ∥Φ∗(r)∥Φ (2,∞) ≤∥Ψ∗◦(Φ∗)+∥(2,∞), where the last term is the norm of the operator Ψ∗◦(Φ∗)+ : V Φ →V Ψ. We are going to need the following Lemma 2. A dual space of V Φ is (V Φ)∗= Rd1 ⊕Rd2 ⊕. . . ⊕Rdm with a norm ∥.∥Φ (2,1) defined as: ∥(v1, v2, . . . , vm)∥Φ (2,1) = ∥(∥v1∥2, ∥v2∥2, . . . , ∥vm∥2)∥1 . A dual space of V Ψ is (V Ψ)∗= Rdm+1 ⊕Rdm+2 ⊕. . . ⊕RnJ with a norm ∥.∥Ψ (2,1) defined as: ∥(v1, v2, . . . , vJ−m)∥Ψ (2,1) = ∥(∥v1∥2, ∥v2∥2, . . . , ∥vJ−m∥2)∥1 . Proof of Lemma 2. We prove for V Ψ, the proof for V Φ is identical. Let v∗ = (v∗ 1, v∗ 2, . . . , v∗ J−m) ∈ Rdm+1 ⊕Rdm+2 ⊕. . . ⊕RdJ. We have ∥v∗∥= sup v∈V Ψ ∥v∥2,∞=1 |v∗(v)| = sup vi∈Rni ∥v∥2,∞=1 JP i=m+1 |⟨v∗ i , vi⟩| = JP i=m+1 sup vi∈Rni ∥vi∥2=1 |⟨v∗ i , vi⟩| = JP i=m+1 ∥v∗ i ∥2. The last equality follows from sup vi∈Rni ∥vi∥2=1 |⟨v∗ i , vi⟩| = ∥v∗ i ∥2 (as ℓ∗ 2 = ℓ2) and Schwartz inequality. A fundamental fact from Functional Analysis states that a (Hermitian) conjugation is an isometric isomorphism. Thus ∥Ψ∗◦(Φ∗)+∥(2,∞) = ∥(Φ)+ ◦Ψ∥(2,1). (3) We used here (A∗)∗= A and (A∗)+ = (A+)∗. The right hand side of (3) is equal to ∥X+ ggoodXgbad∥good/bad (2,1) in matrix notation. Thus the inequality (1) holds. This concludes the proof of Theorem 1. Corollary 1. Under the conditions of Theorem 1, if µX(Ggood) < 1 then the following holds ∥(∥X∗ Gm+1r∥2, ∥X∗ Gm+2r∥2, . . . , ∥X∗ GJ r∥2)∥∞ ∥(∥X∗ G1r∥2, ∥X∗ G2r∥2, . . . , ∥X∗ Gmr∥2)∥∞ <1. (4) Intuitively, the condition µX(Ggood) < 1 guarantees that no bad group “mimics” any good group too well. Note that Theorem 1 and Corollary 1 are the counterpart to Theorem 3.3 in [9] which states the Exact Recovery condition for the standard OMP algorithm, namely that ∥X+ ggoodXgbad∥(1,1) < 1, where ggood is not defined in terms of groups, but rather in terms of the variables present in the true model (since the notion of groups does not pertain to OMP in its original form). 3.3 The Noisy Case The following theorem extends the results of Theorem 1 to deal with the non-zero Gaussian noise ν. It shows that under certain conditions the Group-OMP algorithm does not select bad groups. A sketch of the proof is provided at the end of this section. Theorem 2. Assume that µX(Ggood) < 1 and 1 ≥ρX(Ggood) > 0. For any η ∈(0, 1/2), with probability at least 1 −2η, if the stopping criterion of the Group-OMP algorithm is such that ϵ > 1 1 −µX(Ggood)σ p 2d ln(2d/η), then when the algorithm stops all of the following hold: (C1)G(k−1) ⊂Ggood 4 (C2)∥β(k−1) −ˆβX(Ggood, y)∥2 ≤ϵ √ |Ggood\G(k−1)| ρX(Ggood) (C3)∥ˆβX(Ggood, y) −¯β∥∞≤σ q 2 ln(2|ggood|/η) ρX(Ggood) (C4)|Ggood \ G(k−1)| ≤2 ¯¯© Gj ∈Ggood : ∥¯βGj∥2 < √ 8ϵρX(Ggood)−1ª¯¯ . We thus obtain the following theorem which states the main consistency result for Group-OMP. Theorem 3. Assume that µX(Ggood) < 1 and 1 ≥ρX(Ggood) > 0. For any η ∈(0, 1/2), with probability at least 1 −2η, if the stopping criterion of the Group-OMP algorithm is such that ϵ > 1 1−µX(Ggood)σ p 2d ln(2d/η) and minGj∈Ggood ∥¯βGj∥2 ≥ √ 8ϵρX(Ggood)−1 then when the algorithm stops G(k−1) = Ggood and ∥β(k−1) −¯β∥∞≤σ p (2 ln(2|Ggood|/η))/ρX(Ggood). Except for the condition on µX(Ggood) (and the definition of µX(Ggood) itself), the conditions in Theorem 2 and Theorem 3 are similar to those required for the standard OMP algorithm [13], the main advantage being that for Group-OMP it is the l2 norm of the coefficient groups for the true model that need to be lower-bounded, rather than the amplitude of the individual coefficients.1 Proof Sketch of Theorem 2. To prove the theorem a series of lemmas are needed, whose proofs are omitted due to space constraint, as they can be derived using arguments similar to Zhang [13] for the standard OMP case. The following lemma gives a lower bound on the correlation between the good groups and the residuals from the OLS prediction where the coefficients have been restricted to a set of good groups. Lemma 3. Let G ⊂Ggood, i.e., G is a set of good groups. Let β = ˆβX(G, y), β′ = ˆβX(Ggood, y), f = Xβ and f ′ = Xβ′. Then maxGj∈Ggood ∥X∗ Gj(y −f)∥2 ≥ √ ρX(Ggood) √ |Ggood\G| ∥f −f ′∥2. The following lemma relates the parameter ˆβX(Ggood), which is estimated by OLS given that the set of good groups has been correctly identified, to the true parameter ¯β. Lemma 4. For all η ∈(0, 1), with probability at least 1 −η, we have ∥ˆβX(Ggood, y) −ˆβX(Ggood, Ey)∥∞≤σ q 2 ln(2|ggood|/η) ρX(Ggood) . The following lemma provides an upper bound on the correlation of the bad features to the residuals from the prediction by OLS given that the set of good groups has been correctly identified. Lemma 5. Let β′ = ˆβX(Ggood, y) and f ′ = Xβ′. We have P ³ maxGj̸∈Ggood ∥X∗ Gj(f ′ −y)∥2 ≤σ p 2d ln(2d/η) ´ ≥1 −η. We are now ready to prove Theorem 2. We first prove that for each iteration k before the GroupOMP algorithm stops, G(k−1) ⊂Ggood by induction on k. Now, suppose that the claim holds after k −1 iterations, where k ≥1. So at the beginning of the kth iteration, we have G(k−1) ⊂Ggood. We have max Gj̸∈Ggood ∥X∗ Gj(Xβ(k−1) −y)∥2 ≤ max Gj̸∈Ggood ∥X∗ GjX(β(k−1) −β′)∥2 + max Gj̸∈Ggood ∥X∗ Gj(Xβ′ −y)∥2 ≤ µX(Ggood) max Gj∈Ggood ∥X∗ GjX(β(k−1) −β′)∥2 + max Gj̸∈Ggood ∥X∗ Gj(Xβ′ −y)∥2 (5) = µX(Ggood) max Gj∈Ggood ∥X∗ Gj(Xβ(k−1) −y)∥2 + max Gj̸∈Ggood ∥X∗ Gj(Xβ′ −y)∥2 (6) 1The sample size n is explicitly part of the conditions in [13] while it is implicit here due to the different ways of normalizing the matrix X. One recovers the same dependency on n by considering X′ = √nX, β′(k) = β(k)/√n, ¯β′ = ¯β/√n, defining (as in [13]) ρ′ X′(Ggood) = inf β © 1 n∥X′β∥2 2/∥β∥2 2: supp(β) ⊂ggood ª , and noting that ρ′ X′(Ggood) = ρX(Ggood) and ˆβX′(Ggood, y) = ˆβX(Ggood, y)/√n. If X had i.i.d. entries, with mean 0, variance 1/n and finite 4th moment, ρX(Ggood) converges a.s. to (1 −√g)2 as n →∞and |ggood|/n →g ≤1 [2]. Hence the rates in C2-C4 are unaffected by ρX(Ggood). 5 Here Eq. 5 follows by applying Theorem 1, and Eq. 6 is due to the fact that for all Gj ∈Ggood X∗ Gj(Xβ′ −y) = 0(dj) holds. Lemma 5 together with the condition on ϵ of Theorem 2 implies that with probability at least 1 −η, max Gj̸∈Ggood ∥X∗ Gj(Xβ′ −y)∥2 ≤σ p 2d ln(2d/η) < (1 −µX(Ggood))ϵ. (7) Lemma 3 together with the definition of ρX(Ggood) implies max Gj∈Ggood ∥X∗ Gj(y −Xβ(k−1))∥2 ≥ ρX(Ggood) p |Ggood \ G(k−1)| ∥β(k−1) −β′∥2 (8) We then have to deal with the following cases. Case 1: ∥β(k−1) −β′∥2 > ϵ √ |Ggood\G(k−1)| ρX(Ggood) . It follows that max Gj∈Ggood ∥X∗ Gj(y −Xβ(k−1))∥2 > ϵ > max Gj̸∈G ∥X∗ Gj(Xβ′ −y)∥2/(1 −µX(Ggood)), (9) where the last inequality follows from Eq. 7. Then Eq. 6 implies that maxGj̸∈Ggood ∥X∗ Gj(Xβ(k−1) −y)∥2 < maxGj∈Ggood ∥X∗ Gj(Xβ(k−1) −y)∥2. So a good group is selected, i.e., Gi(k) ∈Ggood and Eq. 9 implies that the algorithm does not stop. Case 2: ∥β(k−1) −β′∥2 ≤ϵ √ |Ggood\G(k−1)| ρX(Ggood) . We then have three possibilities. Case 2.1: Gi(k) ∈Ggood and the procedure does not stop. Case 2.2: Gi(k) ∈Ggood and the procedure stops. Case 2.3: Gi(k) ̸∈Ggood in which case we have maxGj∈Ggood ∥X∗ Gj(Xβ(k−1) −y)∥2 ≤ maxGj̸∈Ggood ∥X∗ Gj(Xβ(k−1) −y)∥2 ≤ µX(Ggood) maxGj∈Ggood ∥X∗ Gj(Xβ(k−1) −y)∥2 + maxGj̸∈Ggood ∥X∗ Gj(Xβ′ −y)∥2 ≤ µX(Ggood) maxGj̸∈Ggood ∥X∗ Gj(Xβ(k−1) −y)∥2 + maxGj̸∈Ggood ∥X∗ Gj(Xβ′ −y)∥2, where the second inequality follows from Eq. 6 and the last follows from applying the first inequality once again. We thus obtain that maxGj̸∈Ggood ∥X∗ Gj(Xβ(k−1) −y)∥2 ≤ 1 1−µX(Ggood) maxGj̸∈Ggood ∥X∗ Gj(Xβ′ −y)∥2 < ϵ, where the last inequality follows by Eq. 7. Hence the algorithm stops. The above cases imply that if the algorithm does not stop we have Gi(k) ∈Ggood, and hence G(k) ⊆ Ggood and if the algorithm stops we have ∥β(k−1) −β′∥2 ≤ϵ √ |Ggood\G(k−1)| ρX(Ggood) . Thus by induction, if the Group-OMP algorithm stops at iteration k, we have that G(k−1) ⊆Ggood and ∥β(k−1) − β′∥2 ≤ϵ √ |Ggood\G(k−1)| ρX(Ggood) . So (C1) and (C2) are satisfied. Lemma 4 implies that (C3) holds, and together with the theorem’s condition on ϵ also implies that with probability at least 1 −η, we have ∥ˆβX(Ggood, y) −ˆβX(Ggood, Ey)∥∞≤σ p (2 ln(2|Ggood|/η))/ρX(Ggood) < ϵ/ p ρX(Ggood). This allows us to show that (C4) holds, using similar arguments as in [13], which we omit due to space constraints. This leads to Theorem 2. 4 Experiments 4.1 Simulation Results We empirically evaluate the performance of the proposed Group-OMP method, against comparison methods OMP, Group Lasso, Lasso and OLS (Ordinary Least Square). Comparison with OMP will test the effect of “grouping” OMP, while Group Lasso is included as a representative existing method of group variable selection. We compare the performance of these methods in terms of the accuracy of variable selection, variable group selection and prediction. As measure of variable (group) selection accuracy we use the F1 measure, which is defined as F1 = 2P R P +R, where P denotes the precision and R denotes the recall. For computing variable group F1 for a variable selection method, 6 we consider a group to be selected if any of the variables in the group is selected.2 As measure of prediction accuracy, we use the model error, defined as Model error = (ˆβ −¯β)∗E(X∗X)(ˆβ −¯β), where ¯β are the true model coefficients and ˆβ the estimated coefficients. Recall that Lasso solves arg minβ ¡ ∥Y −Xβ∥2 + λ∥β∥1 ¢ . So the tuning parameter for Lasso and Group Lasso is the penalty parameter λ. For Group-OMP and OMP rather than parameterizing the models according to precision ϵ, we do so using the iteration number (i.e. a stopping point). We consider two estimates: the “oracle estimate” and the “holdout validated estimate”. For the oracle estimate, the tuning parameter is chosen so as to minimize the model error. Note that such estimate can only be computed in simulations and not in practical situations, but it is useful for evaluating the relative performance of comparison methods, independently of the appropriateness of the complexity parameter. The holdout-validated estimate is a practical version of the oracle estimate, obtained by selecting the tuning parameter by minimizing the average squared error on a validation set. We now describe the experimental setup. Experiment 1: We use an additive model with categorical variables taken from [12](model I). Consider variables Z1, . . . , Z15, where Zi ∼N(0, 1)(i = 1, . . . , 15) and cov(Zi, Zj) = 0.5|i−j|. Let W1, . . . , W15 be such that Wi = 0 if Zi < Φ−1(1/3), Wi = 1 if Zi > Φ−1(2/3) and Wi = 2 if Φ−1(1/3) ≤Zi ≤Φ−1(2/3), where Φ−1 is the quantile function for the normal distribution. The responses in the data are generated using the true model: Y = 1.8I(W1 = 1)−1.2I(W1 = 0)+I(W3 = 1)+0.5I(W3 = 0)+I(W5 = 1)+I(W5 = 0)+ν, where I denote the indicator function and ν ∼N(0, σ = 1.476). Then let (X2(i−1)+1, X2i) = (I(Wi = 1), I(Wi = 0)), which are the variables that the estimation methods use as the explanatory variables, with the following variable groups: Gi = {2i −1, 2i}(i = 1, . . . , 15). We ran 100 runs, each with 50 observations for training and 25 for validation. Experiment 2: We use an additive model with continuous variables taken from [12](model III), where the groups correspond to the expansion of each variable into a third-order polynomial. . Consider variables Z1, . . . , Z17, with Zi i.i.d. ∼N(0, 1) (i = 1, . . . , 17). Let W1, . . . , W16 be defined as Wi = (Zi +Z17)/ √ 2. The true model is Y = W 3 3 +W 2 3 +W3 + 1 3W 3 6 −W 2 6 + 2 3W6 +ν, where ν ∼N(0, σ = 2). Then let the explanatory variables be (X3(i−1)+1, X3(i−1)+2, X3i) = ¡ W 3 i , W 2 i , Wi ¢ with the variable groups Gi = {3(i −1) + 1, 3(i −1) + 2, 3i}(i = 1, . . . , 16). We ran 100 runs, each with 100 observations for training and 50 for validation. Experiment 3: We use an additive model with continuous variables similar to that of [16]. Consider three independent hidden variables Z1, . . . , Z3 such that Zi ∼N(0, σ = 1). Consider 40 predictors defined as: Xi = Z⌊(i−1)/3⌋+1 + νi for i = 1, . . . , 15 and Xi ∼N(0, 1) for i = 16, . . . , 40, where νi i.i.d. ∼N(0, σ = 0.11/2). The true model is Y = 3 P5 i=1 Xi + 4 P10 i=6 Xi + 2 P15 i=11 Xi + ν, where ν ∼N(0, σ = 15) and the groups are Gk = {5(k −1) + 1, . . . , 5k}, for k = (1, . . . , 3), and Gk = k + 12, for k > 3. We ran 100 runs, each with 500 observations for training and 50 for validation. Experiment 4: We use an additive model with continuous variables taken from [15]. Consider five hidden variables Z1, . . . , Z5 such that Zi i.i.d. ∼N(0, σ = 1). Consider 10 measurements of each of these hidden variables such that Xi = (0.05)Z⌊(i−1)/10⌋+1 +(1−0.052)1/2νi, i=1,...,50, where νi ∼N(0, 1) and cov(νi, νj) = 0.5|i−j|. The true model is Y = X ¯β + ν, where ν ∼N(0, σ = 19.22), and ¯βi =      7 for i = 1, . . . , 10 2 for i = 11, . . . , 20 1 for i = 21, . . . , 30 0 for i = 31, . . . , 50 The groups are Gk = {10(k −1) + 1, . . . , 10k}, for k = (1, . . . , 5). We ran 100 runs, each with 300 observations for training and 50 for validation. The results of the four experiments are presented in Table 1. We note that F1 (Var) and F1 (Group) are identical for the grouped methods for Experiments 1, 2 and 4, since in these the groups have equal size. Overall, Group-OMP performs consistently better than all the comparison methods, with respect to all measures considered . In particular, Group-OMP does better than OMP not only for 2Other ways of translating variable selection to variable group selection are possible, but the F1 measure is relatively robust with respect to this choice. 7 F1 (Var) Exp 1 Exp 2 Exp 3 Exp 4 OLS 0.333 ± 0 0.222 ± 0 0.545 ± 0 0.750 ± 0 Lasso (Oracle) 0.483 ± 0.010 0.541 ± 0.010 0.771 ± 0.007 0.817 ± 0.004 Lasso (Holdout) 0.389 ± 0.012 0.528 ± 0.015 0.758 ± 0.015 0.810 ± 0.005 OMP (Oracle) 0.531 ± 0.019 0.787 ± 0.009 0.532 ± 0.004 0.781 ± 0.005 OMP (Holdout) 0.422 ± 0.014 0.728 ± 0.013 0.477 ± 0.006 0.741 ± 0.006 Group Lasso (Oracle) 0.545 ± 0.010 0.449 ± 0.011 0.693 ± 0.005 0.755 ± 0.002 Group Lasso (Holdout) 0.624 ± 0.017 0.459 ± 0.016 0.706 ± 0.013 0.794 ± 0.008 Group-OMP (Oracle) 0.730 ± 0.017 0.998 ± 0.002 0.999 ± 0.001 0.998 ± 0.002 Group-OMP (Holdout) 0.615 ± 0.020 0.921 ± 0.012 0.918 ± 0.011 0.890 ± 0.011 F1 (Group) Exp 1 Exp 2 Exp 3 Exp 4 OLS 0.333 ± 0 0.222 ± 0 0.194 ± 0 0.750 ± 0 Lasso (Oracle) 0.458 ± 0.012 0.346 ± 0.008 0.494 ± 0.011 0.751 ± 0.001 Lasso (Holdout) 0.511 ± 0.010 0.340 ± 0.014 0.547 ± 0.029 0.776 ± 0.006 OMP (Oracle) 0.687 ± 0.018 0.808 ± 0.020 0.224 ± 0.004 0.842 ± 0.010 OMP (Holdout) 0.621 ± 0.020 0.721 ± 0.025 0.421 ± 0.026 0.827 ± 0.010 Group Lasso (Oracle) 0.545 ± 0.010 0.449 ± 0.011 0.317 ± 0.006 0.755 ± 0.002 Group Lasso (Holdout) 0.624 ± 0.017 0.459 ± 0.016 0.364 ± 0.018 0.794 ± 0.008 Group-OMP (Oracle) 0.730 ± 0.017 0.998 ± 0.002 0.998 ± 0.001 0.998 ± 0.002 Group-OMP (Holdout) 0.615 ± 0.020 0.921 ± 0.012 0.782 ± 0.025 0.890 ± 0.011 ME Exp 1 Exp 2 Exp 3 Exp 4 OLS 3.184 ± 0.129 7.063 ± 0.251 19.592 ± 0.451 46.845 ± 0.985 Lasso (Oracle) 1.203 ± 0.078 1.099 ± 0.067 9.228 ± 0.285 30.343 ± 0.796 Lasso (Holdout) 2.536 ± 0.097 1.309 ± 0.080 12.987 ± 0.670 38.089 ± 1.353 OMP (Oracle) 0.711 ± 0.020 1.052 ± 0.061 19.006 ± 0.443 38.497 ± 0.926 OMP (Holdout) 0.945 ± 0.031 1.394 ± 0.102 28.246 ± 1.942 48.564 ± 1.957 Group Lasso (Oracle) 0.457 ± 0.021 0.867 ± 0.052 11.538 ± 0.370 31.053 ± 0.831 Group Lasso (Holdout) 1.279 ± 0.017 1.047 ± 0.075 14.979 ± 0.538 37.359 ± 1.260 Group-OMP (Oracle) 0.601 ± 0.0273 0.379 ± 0.035 6.727 ± 0.252 27.765 ± 0.703 Group-OMP (Holdout) 0.965 ± 0.050 0.605 ± 0.089 12.553 ± 1.469 35.989 ± 1.127 Table 1: Average F1 score at the variable level and group level, and model error for the models output by Ordinary Least Squares, Lasso, OMP, Group Lasso, and Group-OMP. Boston Housing OLS Lasso OMP Group Lasso Group-OMP Prediction Error 29.30 ± 3.25 17.82 ± 0.48 19.10 ± 0.78 18.45 ± 0.59 17.60 ± 0.51 Number of Original Variables 13 ± 0 12.82 ± 0.05 11.51 ± 0.20 12.50 ± 0.13 9.09 ± 0.31 Table 2: Average test set prediction error, average number of original variables, for the models output by OLS, Lasso, OMP, Group Lasso, and Group-OMP on the“ Boston Housing” dataset. variable group selection, but also for variable selection and predictive accuracy. Against GroupLasso, Group-OMP does better in all four experiments with respect to variable (group) selection when using Oracle, while it does worse in one case when using holdout validation. Group-OMP also does better than Group-Lasso with respect to the model error in three out of the four experiments. 4.2 Experiment on a real dataset We use the “Boston Housing” dataset (UCI Machine Learning Repository). The continuous variables appear to have non-linear effects on the target value, so for each such variable, say Xi, we consider its third-order polynomial expansion, i.e., Xi, X2 i and X3 i , and consider them as a variable group. We ran 100 runs, where for each run we select at random half of the instances as training examples, one quarter as validation set, and the remaining quarter as test examples. The penalty parameter was chosen with holdout validation for all methods. The average test set prediction error, the average number of selected original variables (i.e. groups) are reported in Table 2. These results confirm that Group-OMP has the highest prediction accuracy among the comparison methods, and also leads to the sparsest model. 5 Concluding Remarks In addition to its merits in terms of consistency and accuracy, Group-OMP is particulary attractive due to its computational efficiency (the entire path is computed in J rounds, where J is the number of groups). Interesting directions for future research include comparing the conditions for the consistency of Group-OMP to those for Group Lasso and the bounds on their respective accuracy in estimating the regression coefficients, evaluating modified versions of Group-OMP where the group selection step (∗) in Figure 1 includes a penalty to account for the group size, and considering a forward/backward extension that allows correcting for mistakes (similarly to [14]). 8 References [1] BACH, F.R., Consistency of the Group Lasso and Multiple Kernel Learning, J. Mach. Learn. Res., 9, 1179-1225, 2008. [2] BAI D., YIN Y.Q., Limit of the smallest eigenvalue of a large dimensional sample covariance matrix, Ann. Probab. 21, 1275-1294, 1993. [3] CHEN J., HUO X., Sparse representations for multiple measurement vectors (MMV) in an overcomplete dictionary, in Proc. of the 2005 IEEE Int. Conf. on Acoustics, Speech, and Signal Proc., 2005. [4] HUANG J., ZHANG T., METAXAS D., Learning with Structured Sparsity, in ICML’09, 2009. [5] MALLAT S., ZHANG Z., Matching pursuits with time-frequency dictionaries, IEEE Transactions on Signal Processing, 41, 3397-3415, 1993. [6] MOORE, E.H, On the reciprocal of the general algebraic matrix, Bulletin of the American Mathematical Society 26, 394-395, 1920. [7] PENROSE, R., A generalized inverse for matrices, Proceedings of the Cambridge Philosophical Society 51, 406-413, 1955. [8] TIBSHIRANI, R., Regression shrinkage and selection via the lasso, J. Royal. Statist. Soc B., 58(1), 267-288, 1996. [9] TROPP J.A., Greed is good: Algorithmic results for sparse approximation, IEEE Trans. Info. Theory, 50(10), 2231-2242, 2004. [10] TROPP J.A., GILBERT A.C. , STRAUSS M.J., Algorithms for simultaneous sparse approximation, Part I: greedy pursuit, Signal Proc. 86 (3), 572-588, 2006. [11] PEOTTA L., VANDERGHEYNST P., Matching Pursuit with Block Incoherent Dictionaries, Signal Proc. 55 (9), 2007. [12] YUAN, M., LIN, Y., Model selection and estimation in regression with grouped variables, J. R. Statist. Soc. B, 68, 4967, 2006. [13] ZHANG, T., On the consistency of feature selection using greedy least squares regression, J. Machine Learning Research, 2008. [14] ZHANG, T., Adaptive Forward-Backward Greedy Algorithm for Sparse Learning with Linear Models, in NIPS08, 2008. [15] ZHAO, P, ROCHA, G. AND YU, B., Grouped and hierarchical model selection through composite absolute penalties, Manuscript, 2006. [16] ZOU, H., HASTIE T., Regularization and variable selection via the Elastic Net., J. R. Statist. Soc. B, 67(2) 301-320, 2005. 9
2009
218
3,724
Rank-Approximate Nearest Neighbor Search: Retaining Meaning and Speed in High Dimensions Parikshit Ram, Dongryeol Lee, Hua Ouyang and Alexander G. Gray Computational Science and Engineering, Georgia Institute of Technology Atlanta, GA 30332 {p.ram@,dongryel@cc.,houyang@,agray@cc.}gatech.edu Abstract The long-standing problem of efficient nearest-neighbor (NN) search has ubiquitous applications ranging from astrophysics to MP3 fingerprinting to bioinformatics to movie recommendations. As the dimensionality of the dataset increases, exact NN search becomes computationally prohibitive; (1+휖) distance-approximate NN search can provide large speedups but risks losing the meaning of NN search present in the ranks (ordering) of the distances. This paper presents a simple, practical algorithm allowing the user to, for the first time, directly control the true accuracy of NN search (in terms of ranks) while still achieving the large speedups over exact NN. Experiments on high-dimensional datasets show that our algorithm often achieves faster and more accurate results than the best-known distance-approximate method, with much more stable behavior. 1 Introduction In this paper, we address the problem of nearest-neighbor (NN) search in large datasets of high dimensionality. It is used for classification (푘-NN classifier [1]), categorizing a test point on the basis of the classes in its close neighborhood. Non-parametric density estimation uses NN algorithms when the bandwidth at any point depends on the 푘푡ℎNN distance (NN kernel density estimation [2]). NN algorithms are present in and often the main cost of most non-linear dimensionality reduction techniques (manifold learning [3, 4]) to obtain the neighborhood of every point which is then preserved during the dimension reduction. NN search has extensive applications in databases [5] and computer vision for image search Further applications abound in machine learning. Tree data structures such as 푘푑-trees are used for efficient exact NN search but do not scale better than the na¨ıve linear search in sufficiently high dimensions. Distance-approximate NN (DANN) search, introduced to increase the scalability of NN search, approximates the distance to the NN and any neighbor found within that distance is considered to be “good enough”. Numerous techniques exist to achieve this form of approximation and are fairly scalable to higher dimensions under certain assumptions. Although the DANN search places bounds on the numerical values of the distance to NN, in NN search, distances themselves are not essential; rather the order of the distances of the query to the points in the dataset captures the necessary and sufficient information [6, 7]. For example, consider the two-dimensional dataset (1, 1), (2, 2), (3, 3), (4, 4), . . . with a query at the origin. Appending non-informative dimensions to each of the reference points produces higher dimensional datasets of the form (1, 1, 1, 1, 1, ....), (2, 2, 1, 1, 1, ...), (3, 3, 1, 1, 1, ...), (4, 4, 1, 1, 1, ...), . . .. For a fixed distance approximation, raising the dimension increases the number of points for which the distance to the query (i.e. the origin) satisfies the approximation condition. However, the ordering (and hence the ranks) of those distances remains the same. The proposed framework, rank-approximate nearestneighbor (RANN) search, approximates the NN in its rank rather than in its distance, thereby making the approximation independent of the distance distribution and only dependent on the ordering of the distances. 1 This paper is organized as follows: Section 2 describes the existing methods for exact NN and DANN search and the challenges they face in high dimensions. Section 3 introduces the proposed approach and provides a practical algorithm using stratified sampling with a tree data structure to obtain a user-specified level of rank approximation in Euclidean NN search. Section 4 reports the experiments comparing RANN with exact search and DANN. Finally, Section 5 concludes with discussion of the road ahead. 2 Related Work The problem of NN search is formalized as the following: Problem. Given a dataset 푆⊂푋of size 푁in a metric space (푋, 푑) and a query 푞∈푋, efficiently find a point 푝∈푆such that 푑(푝, 푞) = min 푟∈푆푑(푟, 푞). (1) 2.1 Exact Search The simplest approach of linear search over 푆to find the NN is easy to implement, but requires O(푁) computations for a single NN query, making it unscalable for moderately large 푁. Hashing the dataset into buckets is an efficient technique, but scales only to very low dimensional 푋. Hence data structures are used to answer queries efficiently. Binary spatial partitioning trees, like 푘푑-trees [9], ball trees [10] and metric trees [11] utilize the triangular inequality of the distance metric 푑(commonly the Euclidean distance metric) to prune away parts of the dataset from the computation and answer queries in expected O(log 푁) computations [9]. Non-binary cover trees [12] answer queries in theoretically bounded O(log 푁) time using the same property under certain mild assumptions on the dataset. Finding NNs for O(푁) queries would then require at least O(푁log 푁) computations using the trees. The dual-tree algorithm [13] for NN search also builds a tree on the queries instead of going through them linearly, hence amortizing the cost of search over the queries. This algorithm shows orders of magnitude improvement in efficiency and is conjectured to be O(푁) for answering O(푁) queries using the cover trees [12]. 2.2 Nearest Neighbors in High Dimensions The frontier of research in NN methods is high dimensional problems, stemming from common datasets like images and documents to microarray data. But high dimensional data poses an inherent problem for Euclidean NN search as described in the following theorem: Theorem 2.1. [8] Let 퐶be a 풟-dimensional hypersphere with radius 푎. Let 퐴and 퐵be any two points chosen at random in 퐶, the distributions of 퐴and 퐵being independent and uniform over the interior of 퐶. Let 푟be the Euclidean distance between 퐴and 퐵(푟∈[0, 2푎]). Then the asymptotic distribution of 푟is 푁(푎 √ 2, 푎2/2풟). This implies that in high dimensions, the Euclidean distances between uniformly distributed points lie in a small range of continuous values. This hypothesizes that the tree based algorithms perform no better than linear search since these data structures would be unable to employ sufficiently tight bounds in high dimensions. This turns out to be true in practice [14, 15, 16]. This prompted interest in approximation of the NN search problem. 2.3 Distance-Approximate Nearest Neighbors The problem of NN search is relaxed in the following form to make it more scalable: Problem. Given a dataset 푆⊂푋of size 푁in some metric space (푋, 푑) and a query 푞∈푋, efficiently find any point 푝′ ∈푆such that 푑(푝′, 푞) ≤(1 + 휖) min 푟∈푆푑(푟, 푞) (2) for a low value of 휖∈ℝ+ with high probability. This approximation can be achieved with 푘푑-trees, balls trees, and cover trees by modifying the search algorithm to prune more aggressively. This introduces the allowed error while providing some speedup over the exact algorithm [12]. Another approach modifies the tree data structures to 2 bound error with just one root-to-leaf traversal of the tree, i.e. to eliminate backtracking. Sibling nodes in 푘푑-trees or ball-trees are modified to share points near their boundaries, forming spill trees [14]. These obtain significant speed up over the exact methods. The idea of approximately correct (satisfying Eq. 2) NN is further extended to a formulation where the (1 + 휖) bound can be exceeded with a low probability 훿, thus forming the PAC-NN search algorithms [17]. They provide 1-2 orders of magnitude speedup in moderately large datasets with suitable 휖and 훿. These methods are still unable to scale to high dimensions. However, they can be used in combination with the assumption that high dimensional data actually lies on a lower dimensional subspace. There are a number of fast DANN methods that preprocess data with randomized projections to reduce dimensionality. Hybrid spill trees [14] build spill trees on the randomly projected data to obtain significant speedups. Locality sensitive hashing [18, 19] hashes the data into a lower dimensional buckets using hash functions which guarantee that “close” points are hashed into the same bucket with high probability and “farther apart” points are hashed into the same bucket with low probability. This method has significant improvements in running times over traditional methods in high dimensional data and is shown to be highly scalable. However, the DANN methods assume that the distances are well behaved and not concentrated in a small range. However, for example, if the all pairwise distances are within the range (100.0, 101.00), any distance approximation 휖≥0.01 will return an arbitrary point to a NN query. The exact treebased algorithms failed to be efficient because many datasets encountered in practice suffered the same concentration of pairwise distances. Using DANN in such a situation leads to the loss of the ordering information of the pairwise distances which is essential for NN search [6]. This is too large of a loss in accuracy for increased efficiency. In order to address this issue, we propose a model of approximation for NN search which preserves the information present in the ordering of the distances by controlling the error in the ordering itself irrespective of the dimensionality or the distribution of the pairwise distances in the dataset. We also provide a scalable algorithm to obtain this form of approximation. 3 Rank Approximation To approximate the NN rank, we formulate and relax NN search in the following way: Problem. Given a dataset 푆⊂푋of size 푁in a metric space (푋, 푑) and a query 푞∈푋, let 퐷= {퐷1, . . . , 퐷푁} be the set of distances between the query and all the points in the dataset 푆, such that 퐷푖= 푑(푟푖, 푞), 푟푖∈푆, 푖= 1, . . . , 푁. Let 퐷(푟) be the 푟푡ℎorder statistic of 퐷. Then the 푟∈푆: 푑(푟, 푞) = 퐷(1) is the NN of 푞in 푆. The rank-approximation of NN search would then be to efficiently find a point 푝′ ∈푆such that 푑(푝′, 푞) ≤퐷(1+휏) (3) with high probability for a given value of 휏∈ℤ+. RANN search may use any order statistics of the population 퐷, bounded above by the (1 + 휏)푡ℎ order statistics, to answer a NN query. Sedransk et.al. [20] provide a probability bound for the sample order statistics bound on the order statistics of the whole set. Theorem 3.1. For a population of size 푁with 푌values ordered as 푌(1) ≤푌(2) ⋅⋅⋅≤푌(푁), let 푦(1) ≤푦(2) ⋅⋅⋅≤푦(푛) be a ordered sample of size 푛drawn from the population uniformly without replacement. For 1 ≤푡≤푁and 1 ≤푘≤푛, 푃(푦(푘) ≤푌(푡)) = 푡−푘 ∑ 푖=0 ( 푡−푖−1 푘−1 ) ( 푁−푡+ 푖 푛−푘 ) / ( 푁 푛 ) . (4) We may find a 푝′ ∈푆satisfying Eq. 3 with high probability by sampling enough points {푑1, . . . 푑푛} from 퐷such that for some 1 ≤푘≤푛, rank error bound 휏, and a success probability 훼 푃(푑(푝′, 푞) = 푑(푘) ≤퐷(1+휏)) ≥훼. (5) Sample order statistic 푘= 1 minimizes the required number of samples; hence we substitute the values of 푘= 1 and 푡= 1 + 휏in Eq. 4 obtaining the following expression which can be computed in O(휏) time 푃(푑(1) ≤퐷(1+휏)) = 휏 ∑ 푖=0 ( 푁−휏+ 푖−1 푛−1 ) / ( 푁 푛 ) . (6) 3 The required sample size 푛for a particular error 휏with success probability 훼is computed using binary search over the range (1 + 휏, 푁]. This makes RANN search O(푛) (since now we only need to compute the first order statistics of a sample of size 푛) giving O(푁/푛) speedup. 3.1 Stratified Sampling with a Tree For a required sample size of 푛, we randomly sample 푛points from 푆and compute the RANN for a query 푞by going through the sampled set linearly. But for a tree built on 푆, parts of the tree would be pruned away for the query 푞during the tree traversal. Hence we can ignore the random samples from the pruned part of the tree, saving us some more computation. Hence let 푆be in the form of a binary tree (say 푘푑-tree) rooted at 푅푟표표푡. The root node has 푁 points. Let the left and right child have 푁푙and 푁푟points respectively. For a random query 푞∈푋, the population 퐷is the set of distances of 푞to all the 푁points in 푅푟표표푡. The tree stratifies the population 퐷into 퐷푙= {퐷푙1, . . . , 퐷푙푁푙} and 퐷푟= {퐷푟1, . . . , 퐷푟푁푟}, where 퐷푙and 퐷푟are the set of distances of 푞to all the 푁푙and 푁푟points respectively in the left and right child of the root node 푅푟표표푡. The following theorem provides a way to decide how much to sample from a particular node, subsequently providing a lower bound on the number of samples required from the unpruned part of the tree without violating Eq.5 Theorem 3.2. Let 푛푙and 푛푟be the number of random samples from the strata 퐷푙and 퐷푟respectively by doing a stratified sampling on the population 퐷of size 푁= 푁푙+ 푁푟. Let 푛samples be required for Eq.5 to hold in the population 퐷for a given value of 훼. Then Eq.5 holds for 퐷with the same value of 훼with the random samples of sizes 푛푙and 푛푟from the random strata 퐷푙and 퐷푟of 퐷respectively if 푛푙+ 푛푟= 푛and 푛푙: 푛푟= 푁푙: 푁푟. Proof. Eq. 5 simply requires 푛uniformly sampled points, i.e. for each distance in 퐷to have probability 푛/푁of inclusion. For 푛푙+ 푛푟= 푛and 푛푙: 푛푟= 푁푙: 푁푟, we have 푛푙= ⌈(푛/푁)푁푙⌉ and similarly 푛푟= ⌈(푛/푁)푁푟⌉, and thus samples in both 퐷푙and 퐷푟are included at the proper rate. Since the ratio of the sample size to the population size is a constant 훽= 푛/푁, Theorem 3.2 is generalizable to any level of the tree. 3.2 The Algorithm The proposed algorithm introduces the intended approximation in the unpruned portion of the 푘푑tree since the pruned part does not add to the computation in the exact tree based algorithms. The algorithm starts at the root of the tree. While searching for the NN of a query 푞in a tree, most of the computation in the traversal involves computing the distance of the query 푞to any tree node 푅(푑푖푠푡푡표푛표푑푒(푞, 푅)). If the current upperbound to the NN distance (푢푏(푞)) for the query 푞is greater than 푑푖푠푡푡표푛표푑푒(푞, 푅), the node is traversed and 푢푏(푞) is updated. Otherwise node 푅is pruned. The computations of distance of 푞to points in the dataset 푆occurs only when 푞reaches a leaf node it cannot prune. The NN candidate in that leaf is computed using the linear search (COMPUTEBRUTENN subroutine in Fig.2). The traversal of the exact algorithm in the tree is illustrated in Fig.1. To approximate the computation by sampling, traversal down the tree is stopped at a node which can be summarized with a small number of samples (below a certain threshold MAXSAMPLES). This is illustrated in Fig.1. The value of MAXSAMPLES giving maximum speedup can be obtained by crossvalidation. If a node is summarizable within the desired error bounds (decided by the CANAPPROXIMATE subroutine in Fig.2), required number of points are sampled from such a node and the nearest neighbor candidate is computed from among them using linear search (COMPUTEAPPROXNN subroutine of Fig.2). Single Tree. The search algorithm is presented in Fig.2. The dataset 푆is stored as a binary tree rooted at 푅푟표표푡. The algorithm starts as STRANKAPPROXNN(푞, 푆, 휏, 훼). During the search, if a leaf node is reached (since the tree is rarely balanced), the exact NN candidate is computed. In case a non-leaf node cannot be approximated, the child node closer to the query is always traversed first. The following theorem proves the correctness of the algorithm. Theorem 3.3. For a query 푞and a specified value of 훼and 휏, STRANKAPPROXNN(푞, 푆, 휏, 훼) computes a neighbor in 푆within (1 + 휏) rank with probability at least 훼. 4 Figure 1: The traversal paths of the exact and the rank-approximate algorithm in a 푘푑-tree Proof. By Eq.6, a query requires at least 푛samples from a dataset of size 푁to compute a neighbor within (1 + 휏) rank with a probability 훼. Let 훽= (푛/푁). Let a node 푅contain ∣푅∣points. In the algorithm, sampling occurs when a base case of the recursion is reached. There are three base cases: ∙Case 1 - Exact Pruning (if 푢푏(푞) ≤푑푖푠푡푡표푛표푑푒(푞, 푅)): Then number of points required to be sampled from the node is at least ⌈훽⋅∣푅∣⌉. However, since this node is pruned, we ignore these points. Hence nothing is done in the algorithm. ∙Case 2 - Exact Computation COMPUTEBRUTENN(푞, 푅)): In this subroutine, linear search is used to find the NN candidate. Hence number of points actually sampled is ∣푅∣≥ ⌈훽⋅∣푅∣⌉. ∙Case 3 - Approximate Computation (COMPUTEAPPROXNN(푞, 푅, 훽)): In this subroutine, exactly 훽⋅∣푅∣samples are made and linear search is performed over them. Let the total number of points effectively sampled from 푆be 푛′. From the three base cases of the algorithm, it is confirmed that 푛′ ≥⌈훽⋅푁⌉= 푛. Hence the algorithm computes a NN within (1+휏) rank with probability at least 훼. Dual Tree. The single tree algorithm in Fig.2 can be extended to the dual tree algorithm in case of O(푁) queries. The dual tree RANN algorithm (DTRANKAPPROXNN(푇, 푆, 휏, 훼)) is given in Fig.2. The only difference is that for every query 푞∈푇, the minimum required amount of sampling is done and the random sampling is done separately for each of the queries. Even though the queries do not share samples from the reference set, when a query node of the query tree prunes a reference node, that reference node is pruned for all the queries in that query node simultaneously. This work-sharing is a key feature of all dual-tree algorithms [13]. 4 Experiments and Results A meaningful value for the rank error 휏should be relative to the size of the reference dataset 푁. Hence for the experiments, the (1 + 휏)-RANN is modified to (1 + ⌈휀⋅푁⌉)-RANN where 1.0 ≥ 휀∈ℝ+. The Euclidean metric is used in all the experiments. Although the value of MAXSAMPLES for maximum speedup can be obtained by cross-validation, for practical purposes, any low value (≈ 20-30) suffices well, and this is what is used in the experiments. 4.1 Comparisons with Exact Search The speedups of the exact dual-tree NN algorithm and the approximate tree-based algorithm over the linear search algorithm is computed and compared. Different levels of approximations ranging from 0.001% to 10% are used to show how the speedup increases with increase in approximation. 5 STRANKAPPROXNN(푞, 푆, 휏, 훼) 푛←COMPUTESAMPLESIZE (∣푆∣, 휏, 훼) 훽←푛/∣푆∣ 푅푟표표푡←TREE(푆) STRANN(푞, 푅푟표표푡, 훽) STRANN(푞, 푅, 훽) if 푢푏(푞) > 푑푖푠푡푡표푛표푑푒(푞, 푅) then if ISLEAF(푅) then COMPUTEBRUTENN(푞, 푅) else if CANAPPROXIMATE(푅, 훽) then COMPUTEAPPROXNN (푞, 푅, 훽) else STRANN(푞, 푅푙, 훽), STRANN(푞, 푅푟, 훽) end if end if COMPUTEBRUTENN(푞, 푅) 푢푏(푞) ←min(min 푟∈푅푑(푞, 푟), 푢푏(푞)) COMPUTEBRUTENN(푄, 푅) for ∀푞∈푄do 푢푏(푞) ←min(min 푟∈푅푑(푞, 푟), 푢푏(푞)) end for 푛표푑푒푢푏(푄) ←max 푞∈푄푢푏(푞) COMPUTEAPPROXNN(푞, 푅, 훽) 푅′ ←⌈훽⋅∣푅∣⌉samples from 푅 COMPUTEBRUTENN(푞, 푅′) COMPUTEAPPROXNN(푄, 푅, 훽) for ∀푞∈푄do 푅′ ←⌈훽⋅∣푅∣⌉samples from 푅 COMPUTEBRUTENN(푞, 푅′) end for 푛표푑푒푢푏(푄) ←max 푞∈푄푢푏(푞) DTRANKAPPROXNN(푇, 푆, 휏, 훼) 푛←COMPUTESAMPLESIZE (∣푆∣, 휏, 훼) 훽←푛/∣푆∣ 푅푟표표푡←TREE(푆) 푄푟표표푡←TREE(푇) DTRANN(푄푟표표푡, 푅푟표표푡, 훽) DTRANN(푄, 푅, 훽) if 푛표푑푒푢푏(푄) > 푑푖푠푡푏푒푡푤푒푒푛푛표푑푒푠(푄, 푅) then if ISLEAF(푄) && ISLEAF(푅) then COMPUTEBRUTENN(푄, 푅) else if ISLEAF(푅) then DTRANN(푄푙, 푅, 훽), DTRANN(푄푟, 푅, 훽) 푛표푑푒푢푏(푄) ←max 푖={푙,푟} 푛표푑푒푢푏(푄푖) else if CANAPPROXIMATE(푅, 훽) then if ISLEAF(푄) then COMPUTEAPPROXNN (푄, 푅, 훽) else DTRANN(푄푙, 푅, 훽), DTRANN(푄푟, 푅, 훽) 푛표푑푒푢푏(푄) ←max 푖={푙,푟} 푛표푑푒푢푏(푄푖) end if else if ISLEAF(푄) then DTRANN(푄, 푅푙, 훽), DTRANN(푄, 푅푟, 훽) else DTRANN(푄푙, 푅푙, 훽), DTRANN(푄푙, 푅푟, 훽) DTRANN(푄푟, 푅푙, 훽), DTRANN(푄푟, 푅푟, 훽) 푛표푑푒푢푏(푄) ←max 푖={푙,푟} 푛표푑푒푢푏(푄푖) end if end if CANAPPROXIMATE(푅, 훽) return ⌈훽⋅∣푅∣⌉≤MAXSAMPLES Figure 2: Single tree (STRANKAPPROXNN) and dual tree (DTRANKAPPROXNN) algorithms and subroutines for RANN search for a query 푞(or a query set 푇) in a dataset 푆with rank approximation 휏and success probability 훼. 푅푙and 푅푟are the closer and farther child respectively of 푅from the query 푞(or a query node 푄) Different datasets drawn for the UCI repository (Bio dataset 300k×74, Corel dataset 40k×32, Covertype dataset 600k×55, Phy dataset 150k×78)[21], MNIST handwritten digit recognition dataset (60k×784)[22] and the Isomap “images” dataset (700×4096)[3] are used. The final dataset “urand” is a synthetic dataset of points uniform randomly sampled from a unit ball (1m×20). This dataset is used to show that even in the absence of a lower-dimensional subspace, RANN is able to get significant speedups over exact methods for relatively low errors. For each dataset, the NN of every point in the dataset is found in the exact case, and (1+⌈휀⋅푁⌉)-rank-approximate NN of every point in the dataset is found in the approximate case. These results are summarized in Fig.3. The results show that for even low values of 휀(high accuracy setting), the RANN algorithm is significantly more scalable than the exact algorithms for all the datasets. Note that for some of the datasets, the low values of approximation used in the experiments are equivalent to zero rank error (which is the exact case), hence are equally efficient as the exact algorithm. 6 bio corel covtype images mnist phy urand 10 0 10 1 10 2 10 3 10 4 speedup over linear search ε=0%(exact),0.001%,0.01%,0.1%,1%,10% α=0.95 Figure 3: Speedups(logscale on the Y-axis) over the linear search algorithm while finding the NN in the exact case or (1 + 휀푁)-RANN in the approximate case with 휀 = 0.001%, 0.01%, 0.1%, 1.0%, 10.0% and a fixed success probability 훼= 0.95 for every point in the dataset. The first(white) bar in each dataset in the X-axis is the speedup of exact dual tree NN algorithm, and the subsequent(dark) bars are the speedups of the approximate algorithm with increasing approximation. 4.2 Comparison with Distance-Approximate Search In the case of the different forms of approximation, the average rank errors and the maximum rank errors achieved in comparable retrieval times are considered for comparison. The rank errors are compared since any method with relatively lower rank error will obviously have relatively lower distance error. For DANN, Locality Sensitive Hashing (LSH) [19, 18] is used. Subsets of two datasets known to have a lower-dimensional embedding are used for this experiment - Layout Histogram (10k×30)[21] and MNIST dataset (10k×784)[22]. The approximate NN of every point in the dataset is found with different levels of approximation for both the algorithms. The average rank error and maximum rank error is computed for each of the approximation levels. For our algorithm, we increased the rank error and observed a corresponding decrease in the retrieval time. LSH has three parameters. To obtain the best retrieval times with low rank error, we fixed one parameter and changed the other two to obtain a decrease in runtime and did this for many values of the first parameter. The results are summarized in Fig. 4 and Fig. 5. The results show that even in the presence of a lower-dimensional embedding of the data, the rank errors for a given retrieval time are comparable in both the approximate algorithms. The advantage of the rank-approximate algorithm is that the rank error can be directly controlled, whereas in LSH, tweaking in the cross-product of its three parameters is typically required to obtain the best ranks for a particular retrieval time. Another advantage of the tree-based algorithm for RANN is the fact that even though the maximum error is bounded only with a probability, the actual maximum error is not much worse than the allowed maximum rank error since a tree is used. In the case of LSH, at times, the actual maximum rank error is extremely large, corresponding to LSH returning points which are very far from being the NN. This makes the proposed algorithm for RANN much more stable 7 0 500 1000 1500 2000 0 0.5 1 1.5 2 2.5 3 3.5 4 Average Rank Error Time (in sec.) Random Sample of size 10000 RANN LSH (a) Layout Histogram 0 500 1000 1500 2000 2500 3000 3500 4000 0 1 2 3 4 5 6 7 8 9 10 Average Rank Error Time (in sec.) Random Sample of size 10000 RANN LSH (b) Mnist Figure 4: Query times on the X-axis and the Average Rank Error on the Y-axis. 0 1000 2000 3000 4000 5000 6000 7000 8000 9000 10000 0 0.5 1 1.5 2 2.5 3 3.5 4 Maximum Rank Error Time (in sec.) Random Sample of size 10000 RANN LSH (a) Layout Histogram 0 1000 2000 3000 4000 5000 6000 7000 8000 9000 10000 0 1 2 3 4 5 6 7 8 9 10 Maximum Rank Error Time (in sec.) Random Sample of size 10000 RANN LSH (b) Mnist Figure 5: Query times on the X-axis and the Maximum Rank Error on the Y-axis. than LSH for Euclidean NN search. Of course, the reported times highly depend on implementation details and optimization tricks, and should be considered carefully. 5 Conclusion We have proposed a new form of approximate algorithm for unscalable NN search instances by controlling the true error of NN search (i.e. the ranks). This allows approximate NN search to retain meaning in high dimensional datasets even in the absence of a lower-dimensional embedding. The proposed algorithm for approximate Euclidean NN has been shown to scale much better than the exact algorithm even for low levels of approximation even when the true dimension of the data is relatively high. When compared with the popular DANN method (LSH), it is shown to be comparably efficient in terms of the average rank error even in the presence of a lower dimensional subspace of the data (a fact which is crucial for the performance of the distance-approximate method). Moreover, the use of spatial-partitioning tree in the algorithm provides stability to the method by clamping the actual maximum error to be within a reasonable rank threshold unlike the distance-approximate method. However, note that the proposed algorithm still benefits from the ability of the underlying tree data structure to bound distances. Therefore, our method is still not necessarily immune to the curse of dimensionality. Regardless, RANN provides a new paradigm for NN search which is comparably efficient to the existing methods of distance-approximation and allows the user to directly control the true accuracy which is present in ordering of the neighbors. 8 References [1] T. Hastie, R. Tibshirani, and J. H. Friedman. The Elements of Statistical Learning: Data Mining, Inference, and Prediction. Springer, 2001. [2] B. W. Silverman. Density Estimation for Statistics and Data Analysis. Chapman & Hall/CRC, 1986. [3] J. B. Tenenbaum, V. Silva, and J.C. Langford. A Global Geometric Framework for Nonlinear Dimensionality Reduction. Science, 290(5500):2319–2323, 2000. [4] S. T. Roweis and L. K. Saul. Nonlinear Dimensionality Reduction by Locally Linear Embedding. Science, 290(5500):2323–2326, December 2000. [5] A. N. Papadopoulos and Y. Manolopoulos. Nearest Neighbor Search: A Database Perspective. Springer, 2005. [6] N. Alon, M. B˘adoiu, E. D. Demaine, M. Farach-Colton, and M. T. Hajiaghayi. Ordinal Embeddings of Minimum Relaxation: General Properties, Trees, and Ultrametrics. 2008. [7] K. Beyer, J. Goldstein, R. Ramakrishnan, and U. Shaft. When Is “Nearest Neighbor” Meaningful? LECTURE NOTES IN COMPUTER SCIENCE, pages 217–235, 1999. [8] J. M. Hammersley. The Distribution of Distance in a Hypersphere. Annals of Mathematical Statistics, 21:447–452, 1950. [9] J. H. Freidman, J. L. Bentley, and R. A. Finkel. An Algorithm for Finding Best Matches in Logarithmic Expected Time. ACM Trans. Math. Softw., 3(3):209–226, September 1977. [10] S. M. Omohundro. Five Balltree Construction Algorithms. Technical Report TR-89-063, International Computer Science Institute, December 1989. [11] F. P. Preparata and M. I. Shamos. Computational Geometry: An Introduction. Springer, 1985. [12] A. Beygelzimer, S. Kakade, and J.C. Langford. Cover Trees for Nearest Neighbor. Proceedings of the 23rd international conference on Machine learning, pages 97–104, 2006. [13] A. G. Gray and A. W. Moore. ‘푁-Body’ Problems in Statistical Learning. In NIPS, volume 4, pages 521–527, 2000. [14] T. Liu, A. W. Moore, A. G. Gray, and K. Yang. An Investigation of Practical Approximate Nearest Neighbor Algorithms. In Advances in Neural Information Processing Systems 17, pages 825–832, 2005. [15] L. Cayton. Fast Nearest Neighbor Retrieval for Bregman Divergences. Proceedings of the 25th international conference on Machine learning, pages 112–119, 2008. [16] T. Liu, A. W. Moore, and A. G. Gray. Efficient Exact k-NN and Nonparametric Classification in High Dimensions. 2004. [17] P. Ciaccia and M. Patella. PAC Nearest Neighbor Queries: Approximate and Controlled Search in High-dimensional and Metric spaces. Data Engineering, 2000. Proceedings. 16th International Conference on, pages 244–255, 2000. [18] A. Gionis, P. Indyk, and R. Motwani. Similarity Search in High Dimensions via Hashing. pages 518–529, 1999. [19] P. Indyk and R. Motwani. Approximate Nearest Neighbors: Towards Removing the Curse of Dimensionality. In STOC, pages 604–613, 1998. [20] J. Sedransk and J. Meyer. Confidence Intervals for the Quantiles of a Finite Population: Simple Random and Stratified Simple Random sampling. Journal of the Royal Statistical Society, pages 239–252, 1978. [21] C. L. Blake and C. J. Merz. UCI Machine Learning Repository. http://archive.ics.uci.edu/ml/, 1998. [22] Y. LeCun. MNIST dataset, 2000. http://yann.lecun.com/exdb/mnist/. 9
2009
219
3,725
Learning Brain Connectivity of Alzheimer's Disease from Neuroimaging Data Shuai Huang1, Jing Li1, Liang Sun2,3, Jun Liu2,3, Teresa Wu1, Kewei Chen4, Adam Fleisher4, Eric Reiman4, Jieping Ye2,3 1Industrial Engineering, 2Computer Science and Engineering, and 3Center for Evolutionary Functional Genomics, The Biodesign Institute, Arizona State University, Tempe, USA {shuang31, jing.li.8, sun.liang, j.liu, teresa.wu, jieping.ye}@asu.edu 4Banner Alzheimer’s Institute and Banner PET Center, Banner Good Samaritan Medical Center, Phoenix, USA {kewei.chen, adam.fleisher, eric.reiman}@bannerhealth.com Abstract Recent advances in neuroimaging techniques provide great potentials for effective diagnosis of Alzheimer’s disease (AD), the most common form of dementia. Previous studies have shown that AD is closely related to the alternation in the functional brain network, i.e., the functional connectivity among different brain regions. In this paper, we consider the problem of learning functional brain connectivity from neuroimaging, which holds great promise for identifying image-based markers used to distinguish Normal Controls (NC), patients with Mild Cognitive Impairment (MCI), and patients with AD. More specifically, we study sparse inverse covariance estimation (SICE), also known as exploratory Gaussian graphical models, for brain connectivity modeling. In particular, we apply SICE to learn and analyze functional brain connectivity patterns from different subject groups, based on a key property of SICE, called the “monotone property” we established in this paper. Our experimental results on neuroimaging PET data of 42 AD, 116 MCI, and 67 NC subjects reveal several interesting connectivity patterns consistent with literature findings, and also some new patterns that can help the knowledge discovery of AD. 1 Introduction Alzheimer’s disease (AD) is a fatal, neurodegenerative disorder characterized by progressive impairment of memory and other cognitive functions. It is the most common form of dementia and currently affects over five million Americans; this number will grow to as many as 14 million by year 2050. The current knowledge about the cause of AD is very limited; clinical diagnosis is imprecise with definite diagnosis only possible by autopsy; also, there is currently no cure for AD, while most drugs only alleviate the symptoms. To tackle these challenging issues, the rapidly advancing neuroimaging techniques provide great potentials. These techniques, such as MRI, PET, and fMRI, produce data (images) of brain structure and function, making it possible to identify the difference between AD and normal brains. Recent studies have demonstrated that neuroimaging data provide more sensitive and consistent measures of AD onset and progression than conventional clinical assessment and neuropsychological tests [1]. Recent studies have found that AD is closely related to the alternation in the functional brain network, i.e., the functional connectivity among different brain regions [2]-[3]. Specifically, it has been shown that functional connectivity substantially decreases between the hippocampus and other regions of AD brains [3]-[4]. Also, some studies have found increased connectivity between the regions in the frontal lobe [6]-[7]. Learning functional brain connectivity from neuroimaging data holds great promise for identifying image-based markers used to distinguish among AD, MCI (Mild Cognitive Impairment), and normal aging. Note that MCI is a transition stage from normal aging to AD. Understanding and precise diagnosis of MCI have significant clinical value since it can serve as an early warning sign of AD. Despite all these, existing research in functional brain connectivity modeling suffers from limitations. A large body of functional connectivity modeling has been based on correlation analysis [2]-[3], [5]. However, correlation only captures pairwise information and fails to provide a complete account for the interaction of many (more than two) brain regions. Other multivariate statistical methods have also been used, such as Principle Component Analysis (PCA) [8], PCA-based Scaled Subprofile Model [9], Independent Component Analysis [10]-[11], and Partial Least Squares [12]-[13], which group brain regions into latent components. The brain regions within each component are believed to have strong connectivity, while the connectivity between components is weak. One major drawback of these methods is that the latent components may not correspond to any biological entities, causing difficulty in interpretation. In addition, graphical models have been used to study brain connectivity, such as structural equation models [14]-[15], dynamic causal models [16], and Granger causality. However, most of these approaches are confirmative, rather than exploratory, in the sense that they require a prior model of brain connectivity to begin with. This makes them inadequate for studying AD brain connectivity, because there is little prior knowledge about which regions should be involved and how they are connected. This makes exploratory models highly desirable. In this paper, we study sparse inverse covariance estimation (SICE), also known as exploratory Gaussian graphical models, for brain connectivity modeling. Inverse covariance matrix has a clear interpretation that the off-diagonal elements correspond to partial correlations, i.e., the correlation between each pair of brain regions given all other regions. This provides a much better model for brain connectivity than simple correlation analysis which models each pair of regions without considering other regions. Also, imposing sparsity on the inverse covariance estimation ensures a reliable brain connectivity to be modeled with limited sample size, which is usually the case in AD studies since clinical samples are difficult to obtain. From a domain perspective, imposing sparsity is also valid because neurological findings have demonstrated that a brain region usually only directly interacts with a few other brain regions in neurological processes [2]-[3]. Various algorithms for achieving SICE have been developed in recent year [17]-[22]. In addition, SICE has been used in various applications [17], [21], [23]-[26]. In this paper, we apply SICE to learn functional brain connectivity from neuroimaging and analyze the difference among AD, MCI, and NC based on a key property of SICE, called the “monotone property” we established in this paper. Unlike the previous study which is based on a specific level of sparsity [26], the monotone property allows us to study the connectivity pattern using different levels of sparsity and obtain an order for the strength of connection between pairs of brain regions. In addition, we apply bootstrap hypothesis testing to assess the significance of the connection. Our experimental results on PET data of 42 AD, 116 MCI, and 67 NC subjects enrolled in the Alzheimer’s Disease Neuroimaging Initiative project reveal several interesting connectivity patterns consistent with literature findings, and also some new patterns that can help the knowledge discovery of AD. 2 SICE: Background and the Monotone Property An inverse covariance matrix can be represented graphically. If used to represent brain connectivity, the nodes are activated brain regions; existence of an arc between two nodes means that the two brain regions are closely related in the brain's functional process. Let be all the brain regions under study. We assume that follows a multivariate Gaussian distribution with mean and covariance matrix . Let be the inverse covariance matrix. Suppose we have samples (e.g., subjects with AD) for these brain regions. Note that we will only illustrate here the SICE for AD, whereas the SICE for MCI and NC can be achieved in a similar way. We can formulate the SICE into an optimization problem, i.e., (1) where is the sample covariance matrix; , , and denote the determinant, trace, and sum of the absolute values of all elements of a matrix, respectively. The part “ ” in (1) is the log-likelihood, whereas the part “ ” represents the “sparsity” of the inverse covariance matrix . (1) aims to achieve a tradeoff between the likelihood fit of the inverse covariance estimate and the sparsity. The tradeoff is controlled by , called the regularization parameter; larger will result in more sparse estimate for . The formulation in (1) follows the same line of the -norm regularization, which has been introduced into the least squares formulation to achieve model sparsity and the resulting model is called Lasso [27]. We employ the algorithm in [19] in this paper. Next, we show that with going from small to large, the resulting brain connectivity models have a monotone property. Before introducing the monotone property, the following definitions are needed. Definition: In the graphical representation of the inverse covariance, if node is connected to by an arc, then is called a “neighbor” of . If is connected to though some chain of arcs, then is called a “connectivity component” of . Intuitively, being neighbors means that two nodes (i.e., brain regions) are directly connected, whereas being connectivity components means that two brain regions are indirectly connected, i.e., the connection is mediated through other regions. In other words, not being connectivity components (i.e., two nodes completely separated in the graph) means that the two corresponding brain regions are completely independent of each other. Connectivity components have the following monotone property: Monotone property of SICE: Let and be the sets of all the connectivity components of with and , respectively. If , then . Intuitively, if two regions are connected (either directly or indirectly) at one level of sparseness ( ), they will be connected at all lower levels of sparseness ( ). Proof of the monotone property can be found in the supplementary file [29]. This monotone property can be used to identify how strongly connected each node (brain region) to its connectivity components. For example, assuming that and , this means that is more strongly connected to than . Thus, by changing from small to large, we can obtain an order for the strength of connection between pairs of brain regions. As will be shown in Section 3, this order is different among AD, MCI, and NC. 3 Application in Brain Connectivity Modeling of AD 3.1 Data acquisition and preprocessing We apply SICE on FDG-PET images for 49 AD, 116 MCI, and 67 NC subjects downloaded from the ADNI website. We apply Automated Anatomical Labeling (AAL) [28] to extract data from each of the 116 anatomical volumes of interest (AVOI), and derived average of each AVOI for every subject. The AVOIs represent different regions of the whole brain. 3.2 Brain connectivity modeling by SICE 42 AVOIs are selected for brain connectivity modeling, as they are considered to be potentially related to AD. These regions distribute in the frontal, parietal, occipital, and temporal lobes. Table 1 list of the names of the AVOIs with their corresponding lobes. The number before each AVOI is used to index the node in the connectivity models. We apply the SICE algorithm to learn one connectivity model for AD, one for MCI, and one for NC, for a given . With different ’s, the resulting connectivity models hold a monotone property, which can help obtain an order for the strength of connection between brain regions. To show the order clearly, we develop a tree-like plot in Fig. 1, which is for the AD group. To generate this plot, we start at a very small value (i.e., the right-most of the horizontal axis), which results in a fully-connected connectivity model. A fully-connected connectivity model is one that contains no region disconnected with the rest of the brain. Then, we decrease by small steps and record the order of the regions disconnected with the rest of the brain regions. Table 1: Names of the AVOIs for connectivity modeling (“L” means that the brain region is located at the left hemisphere; “R” means right hemisphere.) For example, in Fig. 1, as decreases below (but still above ), region “Tempora_Sup_L” is the first one becoming disconnected from the rest of the brain. As decreases below (but still above ), the rest of the brain further divides into three disconnected clusters, including the cluster of “Cingulum_Post_R” and “Cingulum_Post_L”, the cluster of “Fusiform_R” up to “Hippocampus_L”, and the cluster of the other regions. As continuously decreases, each current cluster will split into smaller clusters; eventually, when reaches a very large value, there will be no arc in the IC model, i.e., each region is now a cluster of itself and the split will stop. The sequence of the splitting gives an order for the strength of connection between brain regions. Specifically, the earlier (i.e., smaller ) a region or a cluster of regions becomes disconnected from the rest of the brain, the weaker it is connected with the rest of the brain. For example, in Fig. 1, it can be known that “Tempora_Sup_L” may be the weakest region in the brain network of AD; the second weakest ones are the cluster of “Cingulum_Post_R” and “Cingulum_Post_L”, and the cluster of “Fusiform_R” up to “Hippocampus_L”. It is very interesting to see that the weakest and second weakest brain regions in the brain network include “Cingulum_Post_R” and “Cingulum_Post_L” as well as regions all in the temporal lobe, all of which have been found to be affected by AD early and severely [3]-[5]. Next, to facilitate the comparison between AD and NC, a tree-like plot is also constructed for NC, as shown in Fig. 2. By comparing the plots for AD and NC, we can observe the following two distinct phenomena: First, in AD, between-lobe connectivity tends to be weaker than within-lobe connectivity. This can be seen from Fig. 1 which shows a clear pattern that the lobes become disconnected with each other before the regions within each lobe become disconnected with each other, as goes from small to large. This pattern does not show in Fig. 2 for NC. Second, the same brain regions in the left and right hemisphere are connected much weaker in AD than in NC. This can be seen from Fig. 2 for NC, in which the same brain regions in the left and right hemisphere are still connected even at a very large for NC. However, this pattern does not show in Fig. 1 for AD. Furthermore, a tree-like plot is also constructed for MCI (Fig. 3), and compared with the plots for AD and NC. In terms of the two phenomena discussed previously, MCI shows similar patterns to AD, but these patterns are not as distinct from NC as AD. Specifically, in terms of the first 1 Frontal_Sup_L 13 Parietal_Sup_L 21 Occipital_Sup_L 27 Temporal_Sup_L 2 Frontal_Sup_R 14 Parietal_Sup_R 22 Occipital_Sup_R 28 Temporal_Sup_R 3 Frontal_Mid_L 15 Parietal_Inf_L 23 Occipital_Mid_L 29 Temporal_Pole_Sup_L 4 Frontal_Mid_R 16 Parietal_Inf_R 24 Occipital_Mid_R 30 Temporal_Pole_Sup_R 5 Frontal_Sup_Medial_L 17 Precuneus_L 25 Occipital_Inf_L 31 Temporal_Mid_L 6 Frontal_Sup_Medial_R 18 Precuneus_R 26 Occipital_Inf_R 32 Temporal_Mid_R 7 Frontal_Mid_Orb_L 19 Cingulum_Post_L 33 Temporal_Pole_Mid_L 8 Frontal_Mid_Orb_R 20 Cingulum_Post_R 34 Temporal_Pole_Mid_R 9 Rectus_L 35 Temporal_Inf_L 8301 10 Rectus_R 36 Temporal_Inf_R 8302 11 Cingulum_Ant_L 37 Fusiform_L 12 Cingulum_Ant_R 38 Fusiform_R 39 Hippocampus_L 40 Hippocampus_R 41 ParaHippocampal_L 42 ParaHippocampal_R Temporal lobe Frontal lobe Parietal lobe Occipital lobe phenomenon, MCI also shows weaker between-lobe connectivity than within-lobe connectivity, which is similar to AD. However, the degree of weakerness is not as distinctive as AD. For example, a few regions in the temporal lobe of MCI, including “Temporal_Mid_R” and “Temporal_Sup_R”, appear to be more strongly connected with the occipital lobe than with other regions in the temporal lobe. In terms of the second phenomenon, MCI also shows weaker between-hemisphere connectivity in the same brain region than NC. However, the degree of weakerness is not as distinctive as AD. For example, several left-right pairs of the same brain regions are still connected even at a very large , such as “Rectus_R” and “Rectus_L”, “Frontal_Mid_Orb_R” and “Frontal_Mid_Orb _L”, “Parietal_Sup_R” and “Parietal_Sup_L”, as well as “Precuneus_R” and “Precuneus_L”. All above findings are consistent with the knowledge that MCI is a transition stage between normal aging and AD. Fig 1: Order for the strength of connection between brain regions of AD Fig 2: Order for the strength of connection between brain regions of NC Small λ Large λ λ3 λ2 λ1 Small λ Large λ Fig 3: Order for the strength of connection between brain regions of MCI Furthermore, we would like to compare how within-lobe and between-lobe connectivity is different across AD, MCI, and NC. To achieve this, we first learn one connectivity model for AD, one for MCI, and one for NC. We adjust the in the learning of each model such that the three models, corresponding to AD, MCI, and NC, respectively, will have the same total number of arcs. This is to “normalize” the models, so that the comparison will be more focused on how the arcs distribute differently across different models. By selecting different values for the total number of arcs, we can obtain models representing the brain connectivity at different levels of strength. Specifically, given a small value for the total number of arcs, only strong arcs will show up in the resulting connectivity model, so the model is a model of strong brain connectivity; when increasing the total number of arcs, mild arcs will also show up in the resulting connectivity model, so the model is a model of mild and strong brain connectivity. For example, Fig. 4 shows the connectivity models for AD, MCI, and NC with the total number of arcs equal to 50 (Fig. 4(a)), 120 (Fig. 4(b)), and 180 (Fig. 4(c)). In this paper, we use a “matrix” representation for the SICE of a connectivity model. In the matrix, each row represents one node and each column also represents one node. Please see Table 1 for the correspondence between the numbering of the nodes and the brain region each number represents. The matrix contains black and white cells: a black cell at the -th row, -th column of the matrix represents existence of an arc between nodes and in the SICE-based connectivity model, whereas a white cell represents absence of an arc. According to this definition, the total number of black cells in the matrix is equal to twice the total number of arcs in the SICE-based connectivity model. Moreover, on each matrix, four red cubes are used to highlight the brain regions in each of the four lobes; that is, from top-left to bottom-right, the red cubes highlight the frontal, parietal, occipital, and temporal lobes, respectively. The black cells inside each red cube reflect within-lobe connectivity, whereas the black cells outside the cubes reflect between-lobe connectivity. While the connectivity models in Fig. 4 clearly show some connectivity difference between AD, MCI, and NC, it is highly desirable to test if the observed difference is statistically significant. Therefore, we further perform a hypothesis testing and the results are summarized in Table 2. Specifically, a P-value is recorded in the sub-table if it is smaller than 0.1, such a P-value is further highlighted if it is even smaller than 0.05; a “---” indicates that the corresponding test is not significant (P-value>0.1). We can observe from Fig. 4 and Table 2: Within-lobe connectivity: The temporal lobe of AD has significantly less connectivity than NC. This is true across different strength levels (e.g., strong, mild, and weak) of the connectivity; in other words, even the connectivity between some strongly-connected brain regions in the temporal lobe may be disrupted by AD. In particular, it is clearly from Fig. 4(b) that the regions “Hippocampus” and “ParaHippocampal” (numbered by 39-42, located at the right-bottom corner of Fig. 4(b)) are much more separated from other regions in AD than in NC. The decrease in connectivity in the temporal lobe of AD, especially between the Hippocampus and other regions, has been extensively reported in the literature [3]-[5]. Furthermore, the temporal lobe of MCI does not show a significant decrease in connectivity, compared with NC. This may be because MCI does not disrupt the temporal lobe as badly as AD. AD MCI NC Fig 4(a): SICE-based brain connectivity models (total number of arcs equal to 50) AD MCI NC Fig 4(b): SICE-based brain connectivity models (total number of arcs equal to 120) AD MCI NC Fig 4(c): SICE-based brain connectivity models (total number of arcs equal to 180) The frontal lobe of AD has significantly more connectivity than NC, which is true across different strength levels of the connectivity. This has been interpreted as compensatory reallocation or recruitment of cognitive resources [6]-[7]. Because the regions in the frontal lobe are typically affected later in the course of AD (our data are early AD), the increased connectivity in the frontal lobe may help preserve some cognitive functions in AD patients. Furthermore, the frontal lobe of MCI does not show a significant increase in connectivity, compared with NC. This indicates that the compensatory effect in MCI brain may not be as strong as that in AD brains. Table 2: P-values from the statistical significance test of connectivity difference among AD, MCI, and NC (a) Total number of arcs = 50 (b) Total number of arcs = 120 (c) Total number of arcs = 180 There is no significant difference among AD, MCI, and NC in terms of the connectivity within the parietal lobe and within the occipital lobe. Another interesting finding is that all the P-values in the third sub-table of Table 2(a) are insignificant. This implies that distribution of the strong connectivity within and between lobes for MCI is very similar to NC; in other words, MCI has not been able to disrupt the strong connectivity among brain regions (it disrupts some mild and weak connectivity though). Between-lobe connectivity: In general, human brains tend to have less between-lobe connectivity than within-lobe connectivity. A majority of the strong connectivity occurs within lobes, but rarely between lobes. These can be clearly seen from Fig. 4 (especially Fig. 4(a)) in which there are much more black cells along the diagonal direction than the off-diagonal direction, regardless of AD, MCI, and NC. The connectivity between the parietal and occipital lobes of AD is significantly more than NC which is true especially for mild and weak connectivity. The increased connectivity between the parietal and occipital lobes of AD has been previously reported in [3]. It is also interpreted as a compensatory effect in [6]-[7]. Furthermore, MCI also shows increased connectivity between the parietal and occipital lobes, compared with NC, but the increase is not as significant as AD. While the connectivity between the frontal and occipital lobes shows little difference between AD and NC, such connectivity for MCI shows a significant decrease especially for mild and weak connectivity. Also, AD may have less temporal-occipital connectivity, less frontal-parietal connectivity, but more parietal-temporal connectivity than NC. Between-hemisphere connectivity: Recall that we have observed from the tree-like plots in Figs. 3 and 4 that the same brain regions in the left and right hemisphere are connected much weaker in AD than in NC. It is desirable to test if this observed difference is statistically significant. To achieve this, we test the statistical significance of the difference among AD, MCI, and NC, in term of the number of connected same-region left-right pairs. Results show that when the total number of arcs in the connectivity models is equal to 120 or 90, none of the tests is significant. However, when the total number of arcs is equal to 50, the P-values of the tests for “AD vs. NC”, “AD vs. MCI”, and “MCI vs. NC” are 0.009, 0.004, and 0.315, respectively. We further perform tests for the total number of arcs equal to 30 and find the P-values to be 0. 0055, 0.053, and 0.158, respectively. These results indicate that AD disrupts the strong connectivity between the same regions of the left and right hemispheres, whereas this disruption is not significant in MCI. 4 Conclusion In the paper, we applied SICE to model functional brain connectivity of AD, MCI, and NC based on PET neuroimaging data, and analyze the patterns based on the monotone property of SICE. Our findings were consistent with the previous literature and also showed some new aspects that may suggest further investigation in brain connectivity research in the future. References [1] S. Molchan. (2005) The Alzheimer's disease neuroimaging initiative. Business Briefing: US Neurology Review, pp.30-32, 2005. [2] C.J. Stam, B.F. Jones, G. Nolte, M. Breakspear, and P. Scheltens. (2007) Small-world networks and functional connectivity in Alzheimer’s disease. Cerebral Corter 17:92-99. [3] K. Supekar, V. Menon, D. Rubin, M. Musen, M.D. Greicius. (2008) Network Analysis of Intrinsic Functional Brain Connectivity in Alzheimer's Disease. PLoS Comput Biol 4(6) 1-11. [4] K. Wang, M. Liang, L. Wang, L. Tian, X. Zhang, K. Li and T. Jiang. (2007) Altered Functional Connectivity in Early Alzheimer’s Disease: A Resting-State fMRI Study, Human Brain Mapping 28, 967978. [5] N.P. Azari, S.I. Rapoport, C.L. Grady, M.B. Schapiro, J.A. Salerno, A. Gonzales-Aviles. (1992) Patterns of interregional correlations of cerebral glucose metabolic rates in patients with dementia of the Alzheimer type. Neurodegeneration 1: 101–111. [6] R.L. Gould, B.Arroyo, R,G. Brown, A.M. Owen, E.T. Bullmore and R.J. Howard. (2006) Brain Mechanisms of Successful Compensation during Learning in Alzheimer Disease, Neurology 67, 1011-1017. [7] Y. Stern. (2006) Cognitive Reserve and Alzheimer Disease, Alzheimer Disease Associated Disorder 20, 69-74. [8] K.J. Friston. (1994) Functional and effective connectivity: A synthesis. Human Brain Mapping 2, 56-78. [9] G. Alexander, J. Moeller. (1994) Application of the Scaled Subprofile model: a statistical approach to the analysis of functional patterns in neuropsychiatric disorders: A principal component approach to modeling regional patterns of brain function in disease. Human Brain Mapping, 79-94. [10] V.D. Calhoun, T. Adali, G.D. Pearlson, J.J. Pekar. (2001) Spatial and temporal independent component analysis of functional MRI data containing a pair of task-related waveforms. Hum.Brain Mapp. 13, 43-53. [11] V.D. Calhoun, T. Adali, J.J. Pekar, G.D. Pearlson. (2003) Latency (in)sensitive ICA. Group independent component analysis of fMRI data in the temporal frequency domain. Neuroimage. 20, 1661-1669. [12] A.R. McIntosh, F.L. Bookstein, J.V. Haxby, C.L. Grady. (1996) Spatial pattern analysis of functional brain images using partial least squares. Neuroimage. 3, 143-157. [13] K.J. Worsley, J.B. Poline, K.J. Friston, A.C. Evans. (1997) Characterizing the response of PET and fMRI data using multivariate linear models. Neuroimage. 6, 305-319. [14] E. Bullmore, B. Horwitz, G. Honey, M. Brammer, S. Williams, T. Sharma. (2000) How good is good enough in path analysis of fMRI data? NeuroImage 11, 289–301. [15] A.R. McIntosh, C.L. Grady, L.G. Ungerieider, J.V. Haxby, S.I. Rapoport, B. Horwitz. (1994) Network analysis of cortical visual pathways mapped with PET. J. Neurosci. 14 (2), 655–666. [16] K.J. Friston, L. Harrison, W. Penny. (2003) Dynamic causal modelling. Neuroimage 19, 1273-1302. [17] O. Banerjee, L. El Ghaoui, and A. d’Aspremont. (2008) Model selection through sparse maximum likelihood estimation for multivariate gaussian or binary data. Journal of Machine Learning Research 9:485516. [18] J. Dahl, L. Vandenberghe, and V. Roycowdhury. (2008) Covariance selection for nonchordal graphs via chordal embedding. Optimization Methods Software 23(4):501-520. [19] J. Friedman, T.astie, and R. Tibsirani. (2007) Spares inverse covariance estimation with the graphical lasso, Biostatistics 8(1):1-10. [20] J.Z. Huang, N. Liu, M. Pourahmadi, and L. Liu. (2006) Covariance matrix selection and estimation via penalized normal likelihood. Biometrika, 93(1):85-98. [21] H. Li and J. Gui. (2005) Gradient directed regularization for sparse Gaussian concentration graphs, with applications to inference of genetic networks. Biostatistics 7(2):302-317. [22] Y. Lin. (2007) Model selection and estimation in the gaussian graphical model. Biometrika 94(1)19-35, 2007. [23] A. Dobra, C. Hans, B. Jones, J.R. Nevins, G. Yao, and M. West. (2004) Sparse graphical models for exploring gene expression data. Journal of Multivariate Analysis 90(1):196-212. [24] A. Berge, A.C. Jensen, and A.H.S. Solberg. (2007) Sparse inverse covariance estimates for hyperspectral image classification, Geoscience and Remote Sensing, IEEE Transactions on, 45(5):1399-1407. [25] J.A. Bilmes. (2000) Factored sparse inverse covariance matrices. In ICASSP:1009-1012. [26] L. Sun and et al. (2009) Mining Brain Region Connectivity for Alzheimer's Disease Study via Sparse Inverse Covariance Estimation. In KDD: 1335-1344. [27] R. Tibshirani. (1996) Regression shrinkage and selection via the lasso. Journal of the Royal Statistical Society Series B 58(1):267-288. [28] N. Tzourio-Mazoyer and et al. (2002) Automated anatomical labeling of activations in SPM using a macroscopic anatomical parcellation of the MNI MRI single subject brain. Neuroimage 15:273-289. [29] Supplemental information for “Learning Brain Connectivity of Alzheimer's Disease from Neuroimaging Data”. http://www.public.asu.edu/~jye02/Publications/AD-supplemental-NIPS09.pdf
2009
22
3,726
Online Learning of Assignments Matthew Streeter Google, Inc. Pittsburgh, PA 15213 mstreeter@google.com Daniel Golovin Carnegie Mellon University Pittsburgh, PA 15213 dgolovin@cs.cmu.edu Andreas Krause California Institute of Technology Pasadena, CA 91125 krausea@caltech.edu Abstract Which ads should we display in sponsored search in order to maximize our revenue? How should we dynamically rank information sources to maximize the value of the ranking? These applications exhibit strong diminishing returns: Redundancy decreases the marginal utility of each ad or information source. We show that these and other problems can be formalized as repeatedly selecting an assignment of items to positions to maximize a sequence of monotone submodular functions that arrive one by one. We present an efficient algorithm for this general problem and analyze it in the no-regret model. Our algorithm possesses strong theoretical guarantees, such as a performance ratio that converges to the optimal constant of 1 −1/e. We empirically evaluate our algorithm on two real-world online optimization problems on the web: ad allocation with submodular utilities, and dynamically ranking blogs to detect information cascades. 1 Introduction Consider the problem of repeatedly choosing advertisements to display in sponsored search to maximize our revenue. In this problem, there is a small set of positions on the page, and each time a query arrives we would like to assign, to each position, one out of a large number of possible ads. In this and related problems that we call online assignment learning problems, there is a set of positions, a set of items, and a sequence of rounds, and on each round we must assign an item to each position. After each round, we obtain some reward depending on the selected assignment, and we observe the value of the reward. When there is only one position, this problem becomes the well-studied multiarmed bandit problem [2]. When the positions have a linear ordering the assignment can be construed as a ranked list of elements, and the problem becomes one of selecting lists online. Online assignment learning thus models a central challenge in web search, sponsored search, news aggregators, and recommendation systems, among other applications. A common assumption made in previous work on these problems is that the quality of an assignment is the sum of a function on the (item, position) pairs in the assignment. For example, online advertising models with click-through-rates [6] make an assumption of this form. More recently, there have been attempts to incorporate the value of diversity in the reward function [16]. Intuitively, even though the best K results for the query “turkey” might happen to be about the country, the best list of K results is likely to contain some recipes for the bird as well. This will be the case if there are diminishing returns on the number of relevant links presented to a user; for example, if it is better to present each user with at least one relevant result than to present half of the users with no relevant results and half with two relevant results. We incorporate these considerations in a flexible way by providing an algorithm that performs well whenever the reward for an assignment is a monotone submodular function of its set of (item, position) pairs. Our key contributions are: (i) an efficient algorithm, TABULARGREEDY, that provides a (1 −1/e) approximation ratio for the problem of optimizing assignments under submodular utility functions, (ii) an algorithm for online learning of assignments, TGBANDIT, that has strong performance guarantees in the no-regret model, and (iii) an empirical evaluation on two problems of information gathering on the web. 1 2 The assignment learning problem We consider problems, where we have K positions (e.g., slots for displaying ads), and need to assign to each position an item (e.g., an ad) in order to maximize a utility function (e.g., the revenue from clicks on the ads). We address both the offline problem, where the utility function is specified in advance, and the online problem, where a sequence of utility functions arrives over time, and we need to repeatedly select a new assignment. The Offline Problem. In the offline problem we are given sets P1, P2, ..., PK, where Pk is the set of items that may be placed in position k. We assume without loss of generality that these sets are disjoint.1 An assignment is a subset S ⊆V, where V = P1 ∪P2 ∪· · · ∪PK is the set of all items. We call an assignment feasible, if at most one item is assigned to each position (i.e., for all k, |S ∩Pk| ≤1). We use P to refer to the set of feasible assignments. Our goal is to find a feasible assignment maximizing a utility function f : 2V →R≥0. As we discuss later, many important assignment problems satisfy submodularity, a natural diminishing returns property: Assigning a new item to a position k increases the utility more if few elements have been assigned yet, and less if many items have already been assigned. Formally, a utility function f is called submodular, if for all S ⊆S′ and s /∈S′ it holds that f(S∪{s})−f(S) ≥f(S′∪{s})−f(S′). We will also assume f is monotone (i.e., for all S ⊆S′, we have f(S) ≤f(S′)). Our goal is thus, for a given non-negative, monotone and submodular utility function f, to find a feasible assignment S∗of maximum utility, S∗= arg maxS∈P {f(S)}. This optimization problem is NP-hard. In fact, a stronger negative result holds: Theorem 1 ([14]). For any ϵ > 0, any algorithm guaranteed to obtain a solution within a factor of (1 −1/e + ϵ) of maxS∈P {f(S)} requires exponentially many evaluations of f in the worst case. In light of this negative result, we can only hope to efficiently obtain a solution that achieves a fraction of (1 −1/e) of the optimal value. In §3.2 we develop such an algorithm. The Online Problem. The offline problem is inappropriate to model dynamic settings, where the utility function may change over time, and we need to repeatedly select new assignments, trading off exploration (experimenting with ad display to gain information about the utility function), and exploitation (displaying ads which we believe will maximize utility). More formally, we face a sequential decision problem, where, on each round (which, e.g., corresponds to a user query for a particular term), we want to select an assignment St (ads to display). We assume that the sets P1, P2, .. ., PK are fixed in advance for all rounds. After we select the assignment we obtain reward ft(St) for some non-negative monotone submodular utility function ft. We call the setting where we do not get any information about ft beyond the reward the bandit feedback model. In contrast, in the full-information feedback model we obtain oracle access to ft (i.e., we can evaluate ft on arbitrary feasible assignments). Both models arise in real applications, as we show in §5. The goal is to maximize the total reward we obtain, namely P t ft(St). Following the multiarmed bandit literature, we evaluate our performance after T rounds by comparing our total reward against that obtained by a clairvoyant algorithm with knowledge of the sequence of functions ⟨f1, . . . , fT ⟩, but with the restriction that it must select the same assignment on each round. The difference between the clairvoyant algorithm’s total reward and ours is called our regret. The goal is then to develop an algorithm whose expected regret grows sublinearly in the number of rounds; such an algorithm is said to have (or be) no-regret. However, since sums of submodular functions remain submodular, the clairvoyant algorithm has to solve an offline assignment problem with f(S) = P t ft(S). Considering Theorem 1, no polynomial-time algorithm can possibly hope to achieve a no-regret guarantee. To accommodate this fact, we discount the reward of the clairvoyant algorithm by a factor of (1 −1/e): We define the (1 −1/e)-regret of a random sequence ⟨S1, . . . , ST ⟩as  1 −1 e  · max S∈P ( T X t=1 ft(S) ) −E " T X t=1 ft(St) # . Our goal is then to develop efficient algorithms whose (1 −1/e)-regret grows sublinearly in T. 1If the same item can be placed in multiple positions, simply create multiple distinct copies of it. 2 Subsumed Models. Our model generalizes several common models for sponsored search ad selection, and web search results. These include models with click-through-rates, in which it is assumed that each (ad, position) pair has some probability p(a, k) of being clicked on, and there is some monetary reward b(a) that is obtained whenever ad a is clicked on. Often, the click-throughrates are assumed to be separable, meaning p(a, k) has the functional form α(a) · β(k) for some functions α and β. See [7, 12] for more details on sponsored search ad allocation. Note that in both of these cases, the (expected) reward of a set S of (ad, position) pairs is P (a,k)∈S g(a, k) for some nonnegative function g. It is easy to verify that such a reward function is monotone submodular. Thus, we can capture this model in our framework by setting Pk = A × {k}, where A is the set of ads. Another subsumed model, for web search, appears in [16]; it assumes that each user is interested in a particular set of results, and any list of results that intersects this set generates a unit of value; all other lists generate no value, and the ordering of results is irrelevant. Again, the reward function is monotone submodular. In this setting, it is desirable to display a diverse set of results in order to maximize the likelihood that at least one of them will interest the user. Our model is flexible in that we can handle position-dependent effects and diversity considerations simultaneously. For example, we can handle the case that each user u is interested in a particular set Au of ads and looks at a set Iu of positions, and the reward of an assignment S is any monotoneincreasing concave function g of |S ∩(Au × Iu)|. If Iu = {1, 2, . . . , k} and g(x) = x, this models the case where the quality is the number of relevant result that appear in the first k positions. If Iu equals all positions and g(x) = min {x, 1} we recover the model of [16]. 3 An approximation algorithm for the offline problem 3.1 The locally greedy algorithm A simple approach to the assignment problem is the following greedy procedure: the algorithm steps through all K positions (according to some fixed, arbitrary ordering). For position k, it simply chooses the item that increases the total value as much as possible, i.e., it chooses sk = arg max s∈Pk {f({s1, . . . , sk−1} + s)} , where, for a set S and element e, we write S + e for S ∪{e}. Perhaps surprisingly, no matter which ordering over the positions is chosen, this so-called locally greedy algorithm produces an assignment that obtains at least half the optimal value [8]. In fact, the following more general result holds. We will use this lemma in the analysis of our improved offline algorithm, which uses the locally greedy algorithm as a subroutine. Lemma 2. Suppose f : 2V →R≥0 is of the form f(S) = f0(S) + PK k=1 fk(S ∩Pk) where f0 : 2V →R≥0 is monotone submodular, and fk : 2Pk →R≥0 is arbitrary for k ≥1. Let L be the solution returned by the locally greedy algorithm. Then f(L) + f0(L) ≥maxS∈P {f(S)}. The proof is given in an extended version of this paper [9]. Observe that in the special case where fk ≡0 for all k ≥1, Lemma 2 says that f(L) ≥1 2 maxS∈P f(S). In [9] we provide a simple example showing that this 1/2 approximation ratio is tight. 3.2 An algorithm with optimal approximation ratio We now present an algorithm that achieves the optimal approximation ratio of 1 −1/e, improving on the 1 2 approximation for the locally greedy algorithm. Our algorithm associates with each partition Pk a color ck from a palette [C] of C colors, where we use the notation [n] = {1, 2, . . . , n}. For any set S ⊆V × [C] and vector ⃗c = (c1, . . . , cK), define sample⃗c(S) = SK k=1 {x ∈Pk : (x, ck) ∈S}. Given a set S of (item, color) pairs, which we may think of as labeling each item with one or more colors, sample⃗c(S) returns a set containing each item x that is labeled with whatever color ⃗c assigns to the partition that contains x. Let F(S) denote the expected value of f(sample⃗c(S)) when each color ck is selected uniformly at random from [C]. Our TABULARGREEDY algorithm greedily optimizes F, as shown in the following pseudocode. Observe that when C = 1, there is only one possible choice for ⃗c, and TABULARGREEDY is simply the locally greedy algorithm from §3.1. In the limit as C →∞, TABULARGREEDY can intuitively be viewed as an algorithm for a continuous extension of the problem followed by a 3 Algorithm: TABULARGREEDY Input: integer C, sets P1, P2, ..., PK, function f : 2V →R≥0 (where V = SK k=1 Pk) set G := ∅. for c from 1 to C do /* For each color */ for k from 1 to K do /* For each partition */ set gk,c = arg maxx∈Pk×{c} {F(G + x)} /* Greedily pick gk,c */ set G := G + gk,c; for each k ∈[K], choose ck uniformly at random from [C]. return sample⃗c(G), where ⃗c := (c1, . . . , cK). rounding procedure, in the same spirit as Vondr´ak’s continuous-greedy algorithm [4]. In our case, the continuous extension is to compute a probability distribution Dk for each position k with support in Pk (plus a special “select nothing” outcome), such that if we independently sample an element xk from Dk, E [f({x1, . . . , xK})] is maximized. It turns out that if the positions individually, greedily, and in round-robin fashion, add infinitesimal units of probability mass to their distributions so as to maximize this objective function, they achieve the same objective function value as if, rather than making decisions in a round-robin fashion, they had cooperated and added the combination of K infinitesimal probability mass units (one per position) that greedily maximizes the objective function. The latter process, in turn, can be shown to be equivalent to a greedy algorithm for maximizing a (different) submodular function subject to a cardinality constraint, which implies that it achieves a 1 −1/e approximation ratio [15]. TABULARGREEDY represents a tradeoff between these two extremes; its performance is summarized by the following theorem. For now, we assume that the arg max in the inner loop is computed exactly. In the extended version [9], we bound the performance loss that results from approximating the arg max (e.g., by estimating F by repeated sampling). Theorem 3. Suppose f is monotone submodular. Then F(G) ≥β(K, C) · maxS∈P {f(S)}, where β(K, C) is defined as 1 −(1 −1 C )C − K 2  C−1. It follows that, for any ε > 0, TABULARGREEDY achieves a (1 −1/e −ε) approximation factor using a number of colors that is polynomial in K and 1/ε. The theorem will follow immediately from the combination of two key lemmas, which we now prove. Informally, Lemma 4 analyzes the approximation error due to the outer greedy loop of the algorithm, while Lemma 5 analyzes the approximation error due to the inner loop. Lemma 4. Let Gc = {g1,c, g2,c, . . . , gK,c}, and let G− c = G1 ∪G2 ∪. . . ∪Gc−1. For each color c, choose Ec ∈R such that F(G− c ∪Gc) ≥maxx∈Rc {F(G− c ∪x)} −Ec where Rc := {R : ∀k ∈[K] , |R ∩(Pk × {c})| = 1} is the set of all possible choices for Gc. Then F(G) ≥β(C) · max S∈P {f(S)} − C X c=1 Ec . (3.1) where β(C) = 1 − 1 −1 C C. Proof (Sketch). We will refer to an element R of Rc as a row, and to c as the color of the row. Let R[C] := SC c=1 Rc be the set of all rows. Consider the function H : 2R[C] →R≥0, defined as H(R) = F S R∈R R  . We will prove the lemma in three steps: (i) H is monotone submodular, (ii) TABULARGREEDY is simply the locally greedy algorithm for finding a set of C rows that maximizes H, where the cth greedy step is performed with additive error Ec, and (iii) TABULARGREEDY obtains the guarantee (3.1) for maximizing H, and this implies the same ratio for maximizing F. To show that H is monotone submodular, it suffices to show that F is monotone submodular. Because F(S) = E⃗c [f(sample⃗c(S))], and because a convex combination of monotone submodular functions is monotone submodular, it suffices to show that for any particular coloring ⃗c, the function f(sample⃗c(S)) is monotone submodular. This follows from the definition of sample and the fact that f is monotone submodular. The second claim is true by inspection. To prove the third claim, we note that the row colors for a set of rows R can be interchanged with no effect on H(R). For problems with this special property, it is 4 known that the locally greedy algorithm obtains an approximation ratio of β(C) = 1−(1−1 C )C [15]. Theorem 6 of [17] extends this result to handle additive error, and yields F(G) = H({G1, G2, . . . , GC}) ≥β(C) · max R⊆R[C]:|R|≤C {H(R)} − C X c=1 Ec . To complete the proof, it suffices to show that maxR⊆R[C]:|R|≤C {H(R)} ≥maxS∈P {f(S)}. This follows from the fact that for any assignment S ∈P, we can find a set R(S) of C rows such that sample⃗c(S R∈R(S) R) = S with probability 1, and therefore H(R(S)) = f(S). We now bound the performance of the the inner loop of TABULARGREEDY. Lemma 5. Let f ∗= maxS∈P {f(S)}, and let Gc, G− c , and Rc be defined as in the statement of Lemma 4. Then, for any c ∈[C], F(G− c ∪Gc) ≥maxR∈Rc {F(G− c ∪R)} − K 2  C−2f ∗. Proof (Sketch). Let N denote the number of partitions whose color (assigned by ⃗c) is c. For R ∈Rc, let ∆⃗c(R) := f(sample⃗c(G− c ∪R))−f(sample⃗c(G− c )), and let Fc(R) := F(G− c ∪R)−F(G− c ). By definition, Fc(R) = E⃗c [∆⃗c(R)] = P [N = 1] E⃗c [∆⃗c(R)|N = 1] + P [N ≥2] E⃗c [∆⃗c(R)|N ≥2], where we have used the fact that ∆⃗c(R) = 0 when N = 0. The idea of the proof is that the first of these terms dominates as C →∞, and that E⃗c [∆⃗c(R)|N = 1] can be optimized exactly simply by optimizing each element of Pk × {c} independently. Specifically, it can be seen that E⃗c [∆⃗c(R)|N = 1] = PK k=1 fk(R ∩(Pk × {c})) for suitable fk. Additionally, f0(R) = P [N ≥2] E⃗c [∆⃗c(R)|N ≥2] is a monotone submodular function of a set of (item, color) pairs, for the same reasons F is. Applying Lemma 2 with these {fk : k ≥0} yields Fc(Gc) + P [N ≥2] E⃗c [∆⃗c(Gc)|N ≥2] ≥maxR∈Rc {Fc(R)}. To complete the proof, it suffices to show P [N ≥2] ≤ K 2  C−2 and E⃗c [∆⃗c(Gc)|N ≥2] ≤f ∗. The first inequality holds because, if we let M be the number of pairs of partitions that are both assigned color c, we have P [N ≥2] = P [M ≥1] ≤E [M] = K 2  C−2. The second inequality follows from the fact that for any ⃗c we have ∆⃗c(Gc) ≤f(sample⃗c(G− c ∪Gc)) ≤f ∗. 4 An algorithm for online learning of assignments We now transform the offline algorithm of §3.2 into an online algorithm. The high-level idea behind this transformation is to replace each greedy decision made by the offline algorithm with a no-regret online algorithm. A similar approach was used in [16] and [18] to obtain an online algorithm for different (simpler) online problems. Algorithm: TGBANDIT (described in the full-information feedback model) Input: integer C, sets P1, P2, ..., PK for each k ∈[K] and c ∈[C], let Ek,c be a no-regret algorithm with action set Pk × {c}. for t from 1 to T do for each k ∈[K] and c ∈[C], let gt k,c ∈Pk × {c} be the action selected by Ek,c for each k ∈[K], choose ck uniformly at random from [C]. Define ⃗c = (c1, . . . , cK). select the set Gt = sample⃗c n gt k,c : k ∈[K] , c ∈[C] o observe ft, and let ¯Ft(S) := ft(sample⃗c(S)) for each k ∈[K], c ∈[C] do define Gt− k,c ≡ n gt k′,c′ : k′ ∈[K] , c′ < c o ∪ n gt k′,c : k′ < k o for each x ∈Pk × {c}, feed back ¯Ft(Gt− k,c + x) to Ek,c as the reward for choosing x The following theorem summarizes the performance of TGBANDIT. Theorem 6. Let rk,c be the regret of Ek,c, and let β(K, C) = 1 − 1 −1 C C − K 2  C−1. Then E " T X t=1 ft(Gt) # ≥β(K, C) · max S∈P ( T X t=1 ft(S) ) −E " K X k=1 C X c=1 rk,c # . 5 Observe that Theorem 6 is similar to Theorem 3, with the addition of the E [rk,c] terms. The idea of the proof is to view TGBANDIT as a version of TABULARGREEDY that, instead of greedily selecting single (element,color) pairs gk,c ∈Pk × {c}, greedily selects (element vector, color) pairs ⃗gk,c ∈P T k × {c} (here, P T k is the T th power of the set Pk). We allow for the case that the greedy decision is made imperfectly, with additive error rk,c; this is the source of the extra terms. Once this correspondence is established, the theorem follows along the lines of Theorem 3. For a proof, see the extended version [9]. Corollary 7. If TGBANDIT is run with randomized weighted majority [5] as the subroutine, then E " T X t=1 ft(Gt) # ≥β(K, C) · max S∈P ( T X t=1 ft(S) ) −O C K X k=1 p T log |Pk| ! . where β(K, C) = 1 − 1 −1 C C − K 2  C−1. Optimizing for C in Corollary 7 yields (1 −1 e)-regret ˜Θ(K3/2T 1/4√ OPT) ignoring logarithmic factors, where OPT := maxS∈P nPT t=1 ft(S) o is the value of the static optimum. Dealing with bandit feedback. TGBANDIT can be modified to work in the bandit feedback model. The idea behind this modification is that on each round we “explore” with some small probability, in such a way that on each round we obtain an unbiased estimate of the desired feedback values ¯Ft(Gt− k,c+ x) for each k ∈[K], c ∈[C], and x ∈Pk. This technique can be used to achieve a bound similar to the one stated in Corollary 7, but with an additive regret term of O  (T |V| CK) 2 3 (log |V|) 1 3  . Stronger notions of regret. By substituting in different algorithms for the subroutines Ek,c, we can obtain additional guarantees. For example, Blum and Mansour [3] consider online problems in which we are given time-selection functions I1, I2, . . . , IM. Each time-selection function I : [T] →[0, 1] associates a weight with each round, and defines a corresponding weighted notion of regret in the natural way. Blum and Mansour’s algorithm guarantees low weighted regret with respect to all M time selection functions simultaneously. This can be used to obtain low regret with respect to different (possibly overlapping) windows of time simultaneously, or to obtain low regret with respect to subsets of rounds that have particular features. By using their algorithm as a subroutine within TGBANDIT, we get similar guarantees, both in the full information and bandit feedback models. 5 Evaluation We evaluate TGBANDIT experimentally on two applications: Learning to rank blogs that are effective in detecting cascades of information, and allocating advertisements to maximize revenue. 5.1 Online learning of diverse blog rankings We consider the problem of ranking a set of blogs and news sources on the web. Our approach is based on the following idea: A blogger writes a posting, and, after some time, other postings link to it, forming cascades of information propagating through the network of blogs. More formally, an information cascade is a directed acyclic graph of vertices (each vertex corresponds to a posting at some blog), where edges are annotated by the time difference between the postings. Based on this notion of an information cascade, we would like to select blogs that detect big cascades (containing many nodes) as early as possible (i.e., we want to learn about an important event before most other readers). In [13] it is shown how one can formalize this notion of utility using a monotone submodular function that measures the informativeness of a subset of blogs. Optimizing the submodular function yields a small set of blogs that “covers” most cascades. This utility function prefers diverse sets of blogs, minimizing the overlap of the detected cascades, and therefore minimizing redundancy. The work by [13] leaves two major shortcomings: Firstly, they select a set of blogs rather than a ranking, which is of practical importance for the presentation on a web service. Secondly, they do not address the problem of sequential prediction, where the set of blogs must be updated dynamically over time. In this paper, we address these shortcomings. 6 1 2 4 6 6.5 7 7.5 8 x 10 4 Number of colors Performance Average Maximum (a) Blogs: Offline results 0 100 200 300 0 0.2 0.4 0.6 0.8 1 Number of rounds (days) Avg. normalized performance 1 color 4 colors (b) Blogs: Online results 10 2 10 4 10 6 10 3 10 5 10 6 0.68 0.69 0.7 0.71 0.72 0.73 0.74 0.75 Number of rounds Average Payoff 4 colors 2 colors 1 color (c) Ad display: Online results Figure 1: (a,b) Results for discounted blog ranking (γ = 0.8), in offline (a) and online (b) setting. (c) Performance of TGBANDIT with C = 1, 2, and 4 colors for the sponsored search ad selection problem (each round is a query). Note that C = 1 corresponds to the online algorithm of [16, 18]. Results on offline blog ranking. In order to model the blog ranking problem, we adopt the assumption that different users have different attention spans: Each user will only consider blogs appearing in a particular subset of positions. In our experiments, we assume that the probability that a user is willing to look at position k is proportional to γk, for some discount factor 0 < γ < 1. More formally, let g be the monotone submodular function measuring the informativeness of any set of blogs, defined as in [13]. Let Pk = B × {k}, where B is the set of blogs. Given an assignment S ∈P, let S[k] = S ∩{P1 ∪P2 ∪. . . ∪Pk} be the assignment of blogs to positions 1 through k. We define the discounted value of the assignment S as f(S) = PK k=1 γk g(S[k]) −g(S[k−1])  . It can be seen that f : 2V →R≥0 is monotone submodular. For our experiments, we use the data set of [13], consisting of 45,192 blogs, 16,551 cascades, and 2 million postings collected during 12 months of 2006. We use the population affected objective of [13], and use a discount factor of γ = 0.8. Based on this data, we run our TABULARGREEDY algorithm with varying numbers of colors C on the blog data set. Fig. 1(a) presents the results of this experiment. For each value of C, we generate 200 rankings, and report both the average performance and the maximum performance over the 200 trials. Increasing C leads to an improved performance over the locally greedy algorithm (C = 1). Results on online learning of blog rankings. We now consider the online problem where on each round t we want to output a ranking St. After we select the ranking, a new set of cascades occurs, modeled using a separate submodular function ft, and we obtain a reward of ft(St). In our experiments, we choose one assignment per day, and define ft as the utility associated with the cascades occurring on that day. Note that ft allows us to evaluate the performance of any possible ranking St, hence we can apply TGBANDIT in the full-information feedback model. We compare the performance of our online algorithm using C = 1 and C = 4. Fig. 1(b) presents the average cumulative reward gained over time by both algorithms. We normalize the average reward by the utility achieved by the TABULARGREEDY algorithm (with C = 1) applied to the entire data set. Fig. 1(b) shows that the performance of both algorithms rapidly (within the first 47 rounds) converges to the performance of the offline algorithm. The TGBANDIT algorithm with C = 4 levels out at an approximately 4% higher reward than the algorithm with C = 1. 5.2 Online ad display We evaluate TGBANDIT for the sponsored search ad selection problem in a simple Markovian model incorporating the value of diverse results and complex position-dependence among clicks. In this model, each user u is defined by two sets of probabilities: pclick(a) for each ad a ∈A, and pabandon(k) for each position k ∈[K]. When presented an assignment of ads {a1, a2, . . . , aK}, where ak occupies position k, the user scans the positions in increasing order. For each position k, the user clicks on ak with probability pclick(ak), leaving the results page forever. Otherwise, with probability (1 −pclick(ak)) · pabandon(k), the user loses interest and abandons the results without clicking on anything. Finally, with probability (1 −pclick(ak)) · (1 −pabandon(k)), the user proceeds to look at position k + 1. The reward function ft is the number of clicks, which is either zero or one. We only receive information about ft(St) (i.e., bandit feedback). 7 In our evaluation, there are 5 positions, 20 available ads, and two (equally frequent) types of users: type 1 users interested in all positions (pabandon ≡0), and type 2 users that quickly lose interest (pabandon ≡0.5). There are also two types of ads, half of type 1 and half of type 2, and users are probabilistically more interested in ads of their own type than those of the opposite type. Specifically, for both types of users we set pclick(a) = 0.5 if a has the same type as the user, and pclick(a) = 0.2 otherwise. In Fig. 1(c) we compare the performance of TGBANDIT with C = 4 to the online algorithm of [16, 18], based on the average of 100 experiments. The latter algorithm is equivalent to running TGBANDIT with C = 1. They perform similarly in the first 104 rounds; thereafter the former algorithm dominates. It can be shown that with several different types of users with distinct pclick(·) functions the offline problem of finding an assignment within 1 −1 e + ε of optimal is NP-hard. This is in contrast to the case in which pclick and pabandon are the same for all users; in this case the offline problem simply requires finding an optimal policy for a Markov decision process, which can be done efficiently using well-known algorithms. A slightly different Markov model of user behavior which is efficiently solvable was considered in [1]. In that model, pclick and pabandon are the same for all users, and pabandon is a function of the ad in the slot currently being scanned rather than its index. 6 Related Work For a general introduction to the literature on submodular function maximization, see [19]. For applications of submodularity to machine learning and AI see [11]. Our offline problem is known as maximizing a monotone submodular function subject to a (simple) partition matroid constraint in the operations research and theoretical computer science communities. The study of this problem culminated in the elegant (1−1/e) approximation algorithm of Vondr´ak [20] and a matching unconditional lower bound of Mirrokni et al. [14]. Vondr´ak’s algorithm, called the continuous-greedy algorithm, has also been extended to handle arbitrary matroid constraints [4]. The continuous-greedy algorithm, however, cannot be applied to our problem directly, because it requires the ability to sample f(·) on infeasible sets S /∈P. In our context, this means it must have the ability to ask (for example) what the revenue will be if ads a1 and a2 are placed in position #1 simultaneously. We do not know how to answer such questions in a way that leads to meaningful performance guarantees. In the online setting, the most closely related work is that of Streeter and Golovin [18]. Like us, they consider sequences of monotone submodular reward functions that arrive online, and develop an online algorithm that uses multi-armed bandit algorithms as subroutines. The key difference from our work is that, as in [16], they are concerned with selecting a set of K items rather than the more general problem of selecting an assignment of items to positions addressed in this paper. Kakade et al. [10] considered the general problem of using α-approximation algorithms to construct no α-regret online algorithms, and essentially proved it could be done for the class of linear optimization problems in which the cost function has the form c(S, w) for a solution S and weight vector w, and c(S, w) is linear in w. However, their result is orthogonal to ours, because our objective function is submodular and not linear2. 7 Conclusions In this paper, we showed that important problems, such as ad display in sponsored search and computing diverse rankings of information sources on the web, require optimizing assignments under submodular utility functions. We developed an efficient algorithm, TABULARGREEDY, which obtains the optimal approximation ratio of (1 −1/e) for this NP-hard optimization problem. We also developed an online algorithm, TGBANDIT, that asymptotically achieves no (1 −1/e)-regret for the problem of repeatedly selecting informative assignments, under the full-information and bandit-feedback settings. Finally, we demonstrated that our algorithm outperforms previous work on two real world problems, namely online ranking of informative blogs and ad allocation. Acknowledgments. This work was supported in part by Microsoft Corporation through a gift as well as through the Center for Computational Thinking at Carnegie Mellon, by NSF ITR grant CCR-0122581 (The Aladdin Center), and by ONR grant N00014-09-1-1044. 2 One may linearize a submodular function by using a separate dimension for every possible function argument, but this leads to exponentially worse convergence time and regret bounds for the algorithms in [10] relative to TGBANDIT. 8 References [1] Gagan Aggarwal, Jon Feldman, S. Muthukrishnan, and Martin P´al. Sponsored search auctions with markovian users. In WINE, pages 621–628, 2008. [2] 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. [3] Avrim Blum and Yishay Mansour. From external to internal regret. Journal of Machine Learning Research, 8:1307–1324, 2007. [4] Gruia Calinescu, Chandra Chekuri, Martin P´al, and Jan Vondr´ak. Maximizing a submodular set function subject to a matroid constraint. SIAM Journal on Computing. To appear. [5] Nicol`o Cesa-Bianchi, Yoav Freund, David Haussler, David P. Helmbold, Robert E. Schapire, and Manfred K. Warmuth. How to use expert advice. J. ACM, 44(3):427–485, 1997. [6] Benjamin Edelman, Michael Ostrovsky, and Michael Schwarz. Internet advertising and the generalized second price auction: Selling billions of dollars worth of keywords. American Economic Review, 97(1):242– 259, 2007. [7] Jon Feldman and S. Muthukrishnan. Algorithmic methods for sponsored search advertising. In Zhen Liu and Cathy H. Xia, editors, Performance Modeling and Engineering. 2008. [8] Marshall L. Fisher, George L. Nemhauser, and Laurence A. Wolsey. An analysis of approximations for maximizing submodular set functions - II. Mathematical Programming Study, (8):73–87, 1978. [9] Daniel Golovin, Andreas Krause, and Matthew Streeter. Online learning of assignments that maximize submodular functions. CoRR, abs/0908.0772, 2009. [10] Sham M. Kakade, Adam Tauman Kalai, and Katrina Ligett. Playing games with approximation algorithms. In STOC, pages 546–555, 2007. [11] Andreas Krause and Carlos Guestrin. Beyond convexity: Submodularity in machine learning. Tutorial at ICML 2008. http://www.select.cs.cmu.edu/tutorials/icml08submodularity.html. [12] S´ebastien Lahaie, David M. Pennock, Amin Saberi, and Rakesh V. Vohra. Sponsored search auctions. In Noam Nisan, Tim Roughgarden, Eva Tardos, and Vijay V. Vazirani, editors, Algorithmic Game Theory. Cambridge University Press, New York, NY, USA, 2007. [13] Jure Leskovec, Andreas Krause, Carlos Guestrin, Christos Faloutsos, Jeanne VanBriesen, and Natalie Glance. Cost-effective outbreak detection in networks. In KDD, pages 420–429, 2007. [14] Vahab Mirrokni, Michael Schapira, and Jan Vondr´ak. Tight information-theoretic lower bounds for welfare maximization in combinatorial auctions. In EC, pages 70–77, 2008. [15] George L. Nemhauser, Laurence A. Wolsey, and Marshall L. Fisher. An analysis of approximations for maximizing submodular set functions - I. Mathematical Programming, 14(1):265–294, 1978. [16] Filip Radlinski, Robert Kleinberg, and Thorsten Joachims. Learning diverse rankings with multi-armed bandits. In ICML, pages 784–791, 2008. [17] Matthew Streeter and Daniel Golovin. An online algorithm for maximizing submodular functions. Technical Report CMU-CS-07-171, Carnegie Mellon University, 2007. [18] Matthew Streeter and Daniel Golovin. An online algorithm for maximizing submodular functions. In NIPS, pages 1577–1584, 2008. [19] Jan Vondr´ak. Submodularity in Combinatorial Optimization. PhD thesis, Charles University, Prague, Czech Republic, 2007. [20] Jan Vondr´ak. Optimal approximation for the submodular welfare problem in the value oracle model. In STOC, pages 67–74, 2008. 9
2009
220
3,727
Skill Discovery in Continuous Reinforcement Learning Domains using Skill Chaining George Konidaris Computer Science Department University of Massachusetts Amherst Amherst MA 01003 USA gdk@cs.umass.edu Andrew Barto Computer Science Department University of Massachusetts Amherst Amherst MA 01003 USA barto@cs.umass.edu Abstract We introduce a skill discovery method for reinforcement learning in continuous domains that constructs chains of skills leading to an end-of-task reward. We demonstrate experimentally that it creates appropriate skills and achieves performance benefits in a challenging continuous domain. 1 Introduction Much recent research in reinforcement learning (RL) has focused on hierarchical RL methods [1] and in particular the options framework [2], which adds to the RL framework principled methods for planning and learning using high level-skills (called options). An important research goal is the development of methods by which an agent can discover useful new skills autonomously, and thereby construct its own high-level skill hierarchies. Although several methods exist for creating new options in discrete domains, none are immediately extensible to, or have been successfully applied in, continuous domains. We introduce skill chaining, a skill discovery method for agents in continuous domains. Skill chaining produces chains of skills, each leading to one of a list of designated target events, where the list can simply contain the end-of-episode event or more sophisticated heuristic events (e.g., intrinsically interesting events [3]). The goal of each skill in the chain is to enable the agent to reach a state where its successor skill can be successfully executed. We demonstrate experimentally that skill chaining creates appropriate skills and achieves performance improvements in the Pinball domain. 2 Background and Related Work An option, o, consists of three components [2]: an option policy, πo, giving the probability of executing each action in each state in which the option is defined; an initiation set indicator function, Io, which is 1 for states where the option can be executed and 0 elsewhere; and a termination condition, βo, giving the probability of option execution terminating in states where it is defined. The options framework adds methods for planning and learning using options as temporally-extended actions to the standard RL framework based on the Markov decision process (MDP) framework [4]. Options can be added to an agent’s action repertoire alongside its primitive actions, and the agent chooses when to execute them in the same way it chooses when to execute primitive actions. Methods for creating new options must determine when to create an option and how to define its termination condition (skill discovery), how to expand its initiation set, and how to learn its policy. Given an option reward function, policy learning can be viewed as just another RL problem. Creation and termination are typically performed by the identification of option goal states, with an option created to reach one of its goal states and terminate when it does so. The initiation set is then the set 1 of states from which a goal state can be reached. In previous research, option goal states have been selected by a variety of methods, the most common relying on computing visit or reward statistics over individual states to identify useful subgoals [5, 6, 7, 8]. Graph-based methods [9, 10, 11] build a state graph and use its properties (e.g., local graph cuts [11]) to identify option goals. In domains with factored state spaces, the agent may create options to change infrequently changing variables [12, 13]. Finally, some methods extract options by exploiting commonalities in collections of policies over a single state space [14, 15, 16, 17]. All of these methods compute some statistic over individual states, in graphs derived from a set of state transitions, or rely on having state variables with finitely many values. These properties are unlikely to easily generalize to continuous spaces, where an agent may never see the same state twice. We know of very little work on skill acquisition in continuous domains where the skills or action hierarchy are not designed in advance. Mugan and Kuipers [18] use learned qualitatively-discretized factored models of a continuous state space to derive options. This approach is restricted to domains where learning such a model is appropriate and feasible. In Neumann et al. [19], an agent learns to solve a complex task by sequencing motion templates. Both the template parameters and which templates to execute for each state are learned, although the agent’s choices are constrained. However, the motion templates are parametrized policies designed specifically for the task. The idea of arranging controllers so that executing one allows the next be executed is known in robotics as pre-image backchaining or sequential composition [20]. In such work the controllers and their pre-images (initiation sets) are typically given. Our work can be thought of as providing the means for learning control policies (and their regions of stability) that are suitable for sequential composition. The most recent relevant work in this line is by Tedrake [21], who builds a similar tree to ours in the model-based control setting, where the controllers are locally valid LQR controllers and their regions of stability (initiation sets) are computed using convex optimization. By contrast, our work does not require a model and may find superior (optimized) policies but does not provide formal guarantees. 3 Skill Discovery in Continuous Domains In discrete domains, the primary reason for creating an option to reach a goal state is to make that state prominent in learning: a state that may once have been difficult to reach can now be reached using a single decision (to invoke the option). This effectively modifies the connectivity of the MDP by connecting the option’s goal states to every state in its initiation set. Another reason for creating options is transfer: if options are learned in an appropriate space they can be used in later tasks to speed up learning. If the agent faces a sequence of tasks having the same state space, then options learned in it are portable [14, 15, 16, 17]; if it faces a sequence of tasks having different but related state spaces, then the options must be learned using features common to all the tasks [22]. In continuous domains, there is a further reason to create new options. An agent using function approximation to solve a problem must necessarily obtain an approximate solution. Creating new options that each have their own function approximator concentrated on a subset of the state space may result in better overall policies by freeing the primary value function from having to simultaneously represent the complexities of the individual option value functions. Thus, skill discovery offers an additional representational benefit in continuous domains. However, several difficulties that are absent or less apparent in discrete domains become important in continuous domains. Target regions. Most existing skill discovery methods identify a single state as an option target. In continuous domains, where the agent may never see the same state twice, this must be generalized to a target region. However, simply defining the target region as a neighborhood about a point will not necessarily capture the goal of a skill. For example, many of the above methods generate target regions that are difficult to reach—a too-small neighborhood may make the target nearly impossible to reach; conversely, a too-large neighborhood may include regions that are not difficult to reach at all. Similarly, we cannot easily compute statistics over state space regions without first describing these regions, which is a nontrivial aspect of the problem. Initiation sets. While in discrete domains it is common for an option’s initiation set to expand arbitrarily as the agent learns a policy for successfully executing the option, this is not desirable in continuous domains. In discrete domains without function approximation a policy to reach a subgoal 2 can always be represented exactly; in continuous domains (or even discrete domains with function approximation), it may only be possible to represent such a policy locally. We are thus required to determine the extent of a new option’s initiation set either analytically or through trial-and-error. Representation. An option policy in both discrete and continuous domains should be able to consistently solve a simpler problem than the overall task using a simpler policy. A value table in a domain with a finite state set is a relatively simple data structure, and updates to it take constant time. Thus, in a discrete domain it is perfectly feasible to create a new value table for each learned option of the same dimension as the task value table. In continuous domains with many variables, however, value function approximation may require hundreds of even thousands of features to represent the overall task’s value function, and updates are usually linear time. Therefore, “lightweight” options that use fewer features than needed to solve the overall problem are desirable in high-dimensional domains, or when we may wish to create many skills. Characterization. S¸ims¸ek and Barto [8] characterize useful subgoals as those likely to lie on a solution path of the task the agent is facing. Options that are useful across a collection of problems should have goals that have high probability of falling on the solution paths of some of those problems (although not necessarily the one the agent is currently solving). In a discrete domain where the agent faces a finite number of tasks, one characterization of an option’s usefulness may be obtained by treating the MDP as a graph and computing the likelihood that its goal lies on a solution path. Such a characterization is much more difficult in a continuous domain. In the following section we develop an algorithm for skill discovery in continuous domains by addressing these challenges. 4 Skill Chaining Since a useful option lies on a solution path, it seems natural to first create an option to reach the task’s goal. The high likelihood that the option can only do so from a local neighborhood about this region suggests a follow-on step: create an option to reach the states where the first option can be successfully executed. This section describes skill chaining, a method that formalizes this intuition to create chains of options to reach a given target event by repeatedly creating options to reach options created earlier in the chain. First, we describe how to create an option given a target event. 4.1 Creating an Option to Trigger a Target Event Given an episodic task defined over state space S with reward function R, assume we are given a goal trigger function T defined over S that evaluates to 1 on states in the goal event and 0 otherwise. To create an option oT to trigger T, i.e., to reach a state on which T evaluates to 1, we must define oT ’s termination condition, reward function, and initiation set. For oT ’s termination condition we simply use T. We set oT ’s reward function to R plus an option completion reward for triggering T. We can then use a standard RL algorithm to learn oT ’s policy, for example, using linear function approximation with a suitable set of basis functions to represent the option’s value function. Obtaining oT ’s initiation set is more difficult because it should consist of the states from which executing oT succeeds in triggering T. We can treat this as a standard classification problem, using as positive training examples states in which oT has been executed and triggered T, and as negative training examples states in which it has been executed and failed to trigger T. A classifier suited to a potentially non-stationary classification problem with continuous features can be used to learn oT ’s initiation set. 4.2 Creating Skill Chains Given an initial target event with trigger function T0, which for the purposes of this discussion we consider to be the indicator function of the goal region of task, the agent creates a chain of skills as follows. First, the agent creates option oT0 to trigger T0, learns a good policy for this option, and obtains a good estimate, ˆIT0, of its initiation set. We then add event T1 = ˆIT0 to the list of target events, so that when the agent first enters ˆIT0, it creates a new option oT1 whose goal is to trigger T1. That is, the new option’s termination function is set to the indicator function ˆIT0, and its reward 3 function becomes the task’s reward function plus an option completion reward for triggering T1. Repeating this procedure results in a chain of skills leading from any state in which the agent may start to the task’s goal region as depicted in Figure 1. ... (a) (b) (c) Figure 1: An agent creates options using skill chaining. (a) First, the agent encounters a target event and creates an option to reach it. (b) Entering the initiation set of this first option triggers the creation of a second option whose target is the initiation set of the first option. (c) Finally, after many trajectories the agent has created a chain of options to reach the original target. Note that although the options lie on a chain, the decision to execute each option is part of the agent’s overall learning problem. Thus, they may not necessarily be executed sequentially; in particular, if an agent has learned a better policy for some parts of the chain, it may learn to skip some options. 4.3 Creating Skill Trees The procedure above can create more general structures than chains. More than one option may be created to reach a target event if that event remains on the target event list after the first option is created to reach it. Each “child” option then creates its own chain, resulting in a skill tree, depicted in Figure 2. This will most likely occur when there are multiple solution trajectories (e.g., when the agent has multiple start states), or when noise or exploration create multiple segments along a solution path that cannot be covered by just one option. ... (a) (b) (c) Figure 2: (a) A skill chaining agent in an environment with multiple start states and two initial target events. (b) When the agent initially encounters target events it creates options to trigger them. (c) The initiation sets of these options then become target events, later triggering the creation of new options so that the agent eventually creates a skill tree covering all solution trajectories. To control the branching factor of this tree, we need to place three further conditions on option creation. First, we do not create a new option when a target event is triggered from a state already in the initiation set of an option targeting that event. Second, we require that the initiation set of an option does not overlap that of its siblings or parents. (Note that although these conditions seem computationally expensive, they can be implemented using at most one execution of each initiation set classifier per visited state—which is required for action selection anyway). Finally, we may find it necessary to set a limit on the branching factor of the tree by removing a target event once it has some number of options targeting it. 4 4.4 More General Target Events Although we have assumed that triggering the task’s end-of-episode event is the only initial target event, we are free to start with any set of target events. We may thus include measures of novelty or other intrinsically motivating events [3] as triggers, events that are interesting for domain-specific reasons (e.g., physically meaningful events for a robot), or more general skill discovery techniques that can identify regions of interest before the goal is reached. 5 The Pinball Domain Our experiments use two instances of the Pinball domain, shown in Figure 3.1 The goal is to maneuver the small ball (which always starts in the same place in the first instance, and one of two places in the second) into the large red hole. The ball is dynamic (drag coefficient 0.995), so its state is described by four variables: x, y, ˙x and ˙y. Collisions with obstacles are fully elastic and cause the ball to bounce, so rather than merely avoiding obstacles the agent may choose to use them to efficiently reach the hole. There are five primitive actions: incrementing or decrementing ˙x or ˙y by a small amount (which incurs a reward of −5 per action), or leaving them unchanged (which incurs a reward of −1 per action); reaching the goal obtains a reward of 10, 000. Figure 3: The two Pinball Domain instances used for our experiments. The Pinball domain is an appropriate continuous domain for skill discovery because its dynamic aspects, sharp discontinuities, and extended dynamic control characteristics make it difficult for control and function approximation—much more difficult than a simple navigation task, or typical benchmarks like Acrobot. While a solution with a flat learning system is possible, there is scope for acquiring skills that could result in a better solution. 5.1 Implementation Details To learn to solve the overall task for both standard and option-learning agents, we used Sarsa (γ = 1, ϵ = 0.01) with linear function approximation, using a 4th-order Fourier basis [23] (625 basis functions per action) with α = 0.001 for the first instance and a 5th-order Fourier basis (1296 basis functions per action) with α = 0.0005 for the second (in both cases α was systematically varied and the best performing value used). Option policy learning was accomplished using Q-learning (αo = 0.0005, γ = 1, ϵ = 0.01) with a 3rd-order Fourier basis (256 basis functions per action). Off-policy updates to an option for states outside its initiation set were ignored (because its policy does not need to be defined in those states), as were updates from unsuccessful on-policy trajectories (because their start states were then removed from the initiation set). To initialize the option’s policy before attempting to learn its initiation set, a newly created option was first allowed a “gestation period” of 10 episodes where it could not be executed and its policy was updated using only off-policy learning. After its gestation period, the option was added to the agent’s action repertoire. For new option o, this requires expanding the overall action-value function Q to include o and assigning appropriate initial values to Q(s, o). We therefore sampled the Q values of transitions that triggered the option’s target event during its gestation, and initialized Q(s, o) to 1Java source code for Pinball can be downloaded at http://www-all.cs.umass.edu/˜gdk/pinball 5 the maximum of these values. This reliably resulted in an optimistic but still fairly accurate initial value that encouraged the agent to execute the option. Each option’s initiation set was learned by a logistic regression classifier, initialized to be true everywhere, using 2nd order polynomial features, learning rate η = 0.1 and 100 sweeps per new data point. When the agent executed the option, states on trajectories that reached its goal within 250 steps were used as positive examples, and the start states of trajectories that did not were used as negative examples. We considered an option’s initiation set learned well enough to be added to the list of target events when its weights changed on average less than 0.15 per episode for two consecutive episodes. Since the Pinball domain has such strong discontinuities, to avoid over-generalization after this learning period we additionally constrained the initiation set to contain only points within a Euclidean distance of 0.1 of a positive example. We used a maximum branching factor of 3. 6 Results Figure 4(a) shows the performance (averaged over 100 runs) in the first Pinball instance for agents using a flat policy (without options) against agents employing skill chaining, and agents using given (pre-learned) options that were obtained using skill chaining over 250 episodes in the same task. 50 100 150 200 250 −16 −14 −12 −10 −8 −6 −4 −2 0 x 10 4 Episodes Return No Options Given Options Skill Chaining (a) (b) Figure 4: (a) Performance in the first Pinball instance (averaged over 100 runs) for agents employing skill chaining, agents with given options, and agents without options. (b) A good example solution to the first Pinball instance, showing the acquired options executed along the sample trajectory in different colors. Primitive actions are in black. Figure 4(a) shows that the skill chaining agents performed significantly better than flat agents by 50 episodes, and went on to obtain consistently good solutions by 250 episodes, whereas the flat agents did much worse and were less consistent. Agents that started with given options did very well initially—with an initial episode return far greater than the average solution eventually learned by agents without options—and proceeded quickly to the same quality of solution as the agents that discovered their options. This shows that the options themselves, and not the process of acquiring them, were responsible for the increase in performance. Figure 4(b) shows a sample solution trajectory from an agent performing skill chaining in the first Pinball instance, with the options executed shown in different colors. The figure illustrates that this agent discovered options corresponding to simple, efficient policies covering segments of the sample trajectory. It also illustrates that in some places (in this case, the beginning of the trajectory) the agent learned to bypass a learned option—the black portions of the trajectory show where the agent employed primitive actions rather than a learned option. In some cases this occurred because poor policies were learned for those options. In this particular case, the presence of other options freed the overall policy (using a more complex function approximator) to represent the remaining trajectory segment better than could an option (with its less complex function approximator). Figure 5 shows the initiation sets and three sample trajectories from the options used in the trajectory shown in Figure 4(b). These learned initiation sets show that the discovered option policies are only locally valid, even though they are represented using Fourier basis functions, which have global support. 6 Figure 5: Initiation sets and sample policy trajectories for the options used in Figure 4(b). Each initiation set is shown using a density plot, with lightness increasing proportionally to the number of points in the set for a given (x, y) coordinate, with ˙x and ˙y sampled over {−1, −1 2, 0, 1 2, 1}. Figures 6, 7 and 8 show similar results for the second Pinball instance, although Figure 6 shows a slight and transient initial penalty for skill chaining agents, before they go on to obtain far better and more consistent solutions than flat agents. The example trajectory in Figure 7 and initiation sets in Figure 8 show portions of a successfully formed skill tree. 50 100 150 200 250 300 −16 −14 −12 −10 −8 −6 −4 −2 0 x 10 4 Episodes Return No Options Given Options Skill Chaining Figure 6: Performance in the second Pinball instance (averaged over 100 runs) for agents employing skill chaining, agents with given options, and agents without options. Figure 7: Good solutions to the second Pinball experimental domain, showing the acquired options executed along the sample trajectory in different colors. Primitive actions are shown in black. 7 Figure 8: Initiation sets and sample trajectories for the options used in Figure 7. 7 Discussion and Conclusions The performance gains demonstrated in the previous section show that skill chaining (at least using an end-of-episode target event) can significantly improve the performance of a RL agent in a challenging continuous domain, by breaking the solution into subtasks and learning lower-order option policies for each one. Further benefits could be obtained by including more sophisticated initial target events: any indicator functions could be used in addition to the end-of-episode event. We expect that methods that identify regions likely to lie on the solution trajectory before a solution is found will result in the kinds of early performance gains sometimes seen in discrete skill discovery methods (e.g., [11]). The primary benefit of skill chaining is that it reduces the burden of representing the task’s value function, allowing each option to focus on representing its own local value function and thereby achieving a better overall solution. This implies that skill acquisition is best suited to highdimensional problems where a single value function cannot be well represented using a feasible number of basis functions in reasonable time. In tasks where a good solution can be well represented using a low-order function approximator, we do not expect to see any benefits when using skill chaining. Similar benefits may be obtainable using representation discovery methods [24], which construct basis functions to compactly represent complex value functions. We expect that such methods will prove most effective for extended control problems when combined with skill acquisition, where they can tailor a separate representation for each option rather than for the entire problem. In this paper we used “lightweight” function approximators to represent option value functions. In domains such as robotics where the state space may contain thousands of state variables, we may require a more sophisticated approach that takes advantage of the notion that although the entire task may not be reducible to a feasibly sized state space, it is often possible to split it into subtasks that are. One such approach is abstraction selection [25, 26], where an agent uses sample trajectories (as obtained during gestation) to select an appropriate abstraction for a new option from a library of candidate abstractions, potentially resulting in a much easier learning problem. We conjecture that the ability to discover new skills, and for each skill to employ its own abstraction, will prove a key advantage of hierarchical reinforcement learning as we try to scale up to extended control problems in high-dimensional spaces. Acknowledgments We thank Jeff Johns, ¨Ozg¨ur S¸ims¸ek and our reviewers for their helpful input. Andrew Barto was supported by the Air Force Office of Scientific Research under grant FA9550-08-1-0418. References [1] A.G. Barto and S. Mahadevan. Recent advances in hierarchical reinforcement learning. Discrete Event Systems, 13:41–77, 2003. Special Issue on Reinforcement Learning. 8 [2] R.S. Sutton, D. Precup, and S.P. Singh. Between MDPs and semi-MDPs: A framework for temporal abstraction in reinforcement learning. Artificial Intelligence, 112(1-2):181–211, 1999. [3] S. Singh, A.G. Barto, and N. Chentanez. Intrinsically motivated reinforcement learning. In Proceedings of the 18th Annual Conference on Neural Information Processing Systems, 2004. [4] R.S. Sutton and A.G. Barto. Reinforcement Learning: An Introduction. MIT Press, Cambridge, MA, 1998. [5] B.L. Digney. Learning hierarchical control structures for multiple tasks and changing environments. In From Animals to Animats 5: Proceedings of the Fifth International Conference on Simulation of Adaptive Behavior. MIT Press, 1998. [6] A. McGovern and A.G. Barto. Automatic discovery of subgoals in reinforcement learning using diverse density. In Proceedings of the 18th International Conference on Machine Learning, pages 361–368, 2001. [7] ¨O. S¸ims¸ek and A.G. Barto. Using relative novelty to identify useful temporal abstractions in reinforcement learning. In Proceedings of the 21st International Conference on Machine Learning, pages 751–758, 2004. [8] ¨O. S¸ims¸ek and A.G. Barto. Skill characterization based on betweenness. In Advances in Neural Information Processing Systems 22, 2009. [9] I. Menache, S. Mannor, and N. Shimkin. Q-cut—dynamic discovery of sub-goals in reinforcement learning. In Proceedings of the 13th European Conference on Machine Learning, pages 295–306, 2002. [10] S. Mannor, I. Menache, A. Hoze, and U. Klein. Dynamic abstraction in reinforcement learning via clustering. In Proceedings of the 21st International Conference on Machine Learning, pages 560–567, 2004. [11] ¨O. S¸ims¸ek, A.P. Wolfe, and A.G. Barto. Identifying useful subgoals in reinforcement learning by local graph partitioning. In Proceedings of the 22nd International Conference on Machine Learning, 2005. [12] B. Hengst. Discovering hierarchy in reinforcement learning with HEXQ. In Proceedings of the 19th International Conference on Machine Learning, pages 243–250, 2002. [13] A. Jonsson and A.G. Barto. A causal approach to hierarchical decomposition of factored MDPs. In Proceedings of the 22nd International Conference on Machine Learning, 2005. [14] S. Thrun and A. Schwartz. Finding structure in reinforcement learning. In Advances in Neural Information Processing Systems, volume 7, pages 385–392. The MIT Press, 1995. [15] D.S. Bernstein. Reusing old policies to accelerate learning on new MDPs. Technical Report UM-CS1999-026, Department of Computer Science, University of Massachusetts at Amherst, April 1999. [16] T.J. Perkins and D. Precup. Using options for knowledge transfer in reinforcement learning. Technical Report UM-CS-1999-034, Department of Computer Science, University of Massachusetts Amherst, 1999. [17] M. Pickett and A.G. Barto. Policyblocks: An algorithm for creating useful macro-actions in reinforcement learning. In Proceedings of the 19th International Conference of Machine Learning, pages 506–513, 2002. [18] J. Mugan and B. Kuipers. Autonomously learning an action hierarchy using a learned qualitative state representation. In Proceedings of the 21st International Joint Conference on Artificial Intelligence, 2009. [19] G. Neumann, W. Maass, and J. Peters. Learning complex motions by sequencing simpler motion templates. In Proceedings of the 26th International Conference on Machine Learning, 2009. [20] R.R. Burridge, A.A. Rizzi, and D.E. Koditschek. Sequential composition of dynamically dextrous robot behaviors. International Journal of Robotics Research, 18(6):534–555, 1999. [21] R. Tedrake. LQR-Trees: Feedback motion planning on sparse randomized trees. In Proceedings of Robotics: Science and Systems, 2009. [22] G.D. Konidaris and A.G. Barto. Building portable options: Skill transfer in reinforcement learning. In Proceedings of the 20th International Joint Conference on Artificial Intelligence, 2007. [23] G.D. Konidaris and S. Osentoski. Value function approximation in reinforcement learning using the Fourier basis. Technical Report UM-CS-2008-19, Department of Computer Science, University of Massachusetts Amherst, June 2008. [24] S. Mahadevan. Learning representation and control in Markov Decision Processes: New frontiers. Foundations and Trends in Machine Learning, 1(4):403–565, 2009. [25] G.D. Konidaris and A.G. Barto. Sensorimotor abstraction selection for efficient, autonomous robot skill acquisition. In Proceedings of the 7th IEEE International Conference on Development and Learning, 2008. [26] G.D. Konidaris and A.G. Barto. Efficient skill learning using abstraction selection. In Proceedings of the 21st International Joint Conference on Artificial Intelligence, July 2009. 9
2009
221
3,728
Strategy Grafting in Extensive Games Kevin Waugh waugh@cs.cmu.edu Department of Computer Science Carnegie Mellon University Nolan Bard, Michael Bowling {nolan,bowling}@cs.ualberta.ca Department of Computing Science University of Alberta Abstract Extensive games are often used to model the interactions of multiple agents within an environment. Much recent work has focused on increasing the size of an extensive game that can be feasibly solved. Despite these improvements, many interesting games are still too large for such techniques. A common approach for computing strategies in these large games is to first employ an abstraction technique to reduce the original game to an abstract game that is of a manageable size. This abstract game is then solved and the resulting strategy is played in the original game. Most top programs in recent AAAI Computer Poker Competitions use this approach. The trend in this competition has been that strategies found in larger abstract games tend to beat strategies found in smaller abstract games. These larger abstract games have more expressive strategy spaces and therefore contain better strategies. In this paper we present a new method for computing strategies in large games. This method allows us to compute more expressive strategies without increasing the size of abstract games that we are required to solve. We demonstrate the power of the approach experimentally in both small and large games, while also providing a theoretical justification for the resulting improvement. 1 Introduction Extensive games provide a general model for describing the interactions of multiple agents within an environment. They subsume other sequential decision making models such as finite horizon MDPs, finite horizon POMDPs, and multiagent scenarios such as stochastic games. This makes extensive games a powerful tool for representing a variety of complex situations. Moreover, it means that techniques for computing strategies in extensive games are a valuable commodity that can be applied in many different domains. The usefulness of the extensive game model is dependent on the availability of solution techniques that scale well with respect to the size of the model. Recent research, particularly motivated by the domain of poker, has made significant developments in scalable solution techniques. The classic linear programming techniques [5] can solve games with approximately 107 states [1], while more recent techniques [2, 9] can solve games with over 1012 states. Despite the improvements in solution techniques for extensive games, even the motivating domain of two-player limit Texas Hold’em is far too large to solve, as the game has approximately 1018 states. The typical solution to this challenge is abstraction [1]. Abstraction involves constructing a new game that is tractably sized for current solution techniques, but restricts the information or actions available to the players. The hope is that the abstract game preserves the important strategic structure of the game, and so playing a near equilibrium solution of the abstract game will still perform well in the original game. In poker, employed abstractions include limiting the possible betting sequences, replacing all betting in the first round with a fixed policy [1], and, most commonly, by grouping the cards dealt to each player into buckets based on a strength metric [4, 9]. With these improvements in solution techniques, larger abstract games have become tractable, and therefore increasingly fine abstractions have been employed. Because a finer abstraction can rep1 resent players’ information more accurately and provide a more expressive space of strategies, it is generally assumed that a solution to a finer abstraction will produce stronger strategies for the original game than those computed using a coarser abstraction. Although this assumption is in general not true [7], results from the AAAI Computer Poker Competition [10] have shown that it does often hold: near equilibrium strategies with the largest expressive power tend to win the competition. In this paper, we increase the expressive power of computable strategies without increasing the size of game that can be feasibly solved. We do this by partitioning the game into tractably sized sub-games called grafts, solving each independently, and then combining the solutions into a single strategy. Unlike previous, subsequently abandoned, attempts to solve independent sub-games [1, 3], the grafting approach uses a base strategy to ensure that the grafts will mesh well as a unit. In fact, we prove that grafted strategies improve on near equilibrium base strategies. We also empirically demonstrate this improvement both in a small poker game as well as limit Texas Hold’em. 2 Background Informally, an extensive game is a game tree where a player cannot distinguish between two histories that share the same information set. This means a past action, from either chance or another player, is not completely observed, allowing one to model situations of imperfect information. Definition 1 (Extensive Game) [6, p. 200] A finite extensive game with imperfect information is denoted Γ and has the following components: • A finite set N of players. • A finite set H of sequences, the possible histories of actions, such that the empty sequence is in H and every prefix of a sequence in H is also in H. Z ⊆H are the terminal histories. No sequence in Z is a strict prefix of any sequence in H. A(h) = {a : (h, a) ∈H} are the actions available after a non-terminal history h ∈H \ Z. • A player function P that assigns to each non-terminal history a member of N ∪{c}, where c represents chance. P(h) is the player who takes an action after the history h. Let Hi be the set of histories where player i chooses the next action. • A function fc that associates with every history h ∈Hc a probability distribution fc(·|h) on A(h). fc(a|h) is the probability that a occurs given h. • For each player i ∈N, a utility function ui that assigns each terminal history a real value. ui(z) is rewarded to player i for reaching terminal history z. If N = {1, 2} and for all z ∈Z, u1(z) = −u2(z), an extensive game is said to be zero-sum. • For each player i ∈N, a partition Ii of Hi with the property that A(h) = A(h′) whenever h and h′ are in the same member of the partition. Ii is the information partition of player i; a set Ii ∈Ii is an information set of player i. In this paper, we exclusively focus on two-player zero-sum games with perfect recall, which is a restriction on the information partitions that excludes unrealistic situations where a player is forced to forget her own past information or decisions. To play an extensive game each player specifies a strategy. A strategy determines how a player makes her decisions when confronted with a choice. Definition 2 (Strategy) A strategy for player i, σi, that assigns a probability distribution over A(h) to each h ∈Hi. This function is constrained so that σi(h) = σi(h′) whenever h and h′ are in the same information set. A strategy is pure if no randomization is required. We denote Σi as the set of all strategies for player i. Definition 3 (Strategy Profile) A strategy profile in extensive game Γ is a set of strategies, σ = {σ1, . . . , σn}, that contains one strategy for each player. We let σ−i denote the set strategies for all players except player i. We call the set of all strategy profiles Σ. When all players play according to a strategy profile, σ, we can define the expected utility of each player as ui(σ). Similarly, ui(σi, σ−i) is the expected utility of player i when all other players play according to σ−i and player i plays according to σi. The traditional solution concept for extensive games is the Nash equilibrium concept. 2 Definition 4 (Nash Equilibrium) A Nash equilibrium is a strategy profile σ where ∀i ∈N ∀σ′ i ∈Σi ui(σi) ≥ui(σ′ i, σ−i) (1) An approximation of a Nash equilibrium or ε-Nash equilibrium is a strategy profile σ where ∀i ∈N ∀σ′ i ∈Σi ui(σi) + ε ≥ui(σ′ i, σ−i) (2) A Nash (ε-Nash) equilibrium is a strategy profile where no player can gain (more than ε) through unilateral deviation. A Nash equilibrium exists in all extensive games. For zero-sum extensive games with perfect recall we can efficiently compute an ε-Nash equilibrium using techniques such as linear programming [5], counterfactual regret minimization [9] and the excessive gap technique [2]. In a zero-sum game we say it is optimal to play any strategy belonging to an equilibrium because this guarantees the equilibrium player the highest expected utility in the worst case. Any deviation from equilibrium by either player can be exploited by a knowledgeable opponent. In this sense we can call computing an equilibrium in a zero-sum game solving the game. Many games of interest are far too large to solve directly and abstraction is often employed to reduce the game to one of a more manageable size. The abstract game is solved and the resulting strategy is presumed to be strong in the original game. Abstraction can be achieved by merging information sets together, restricting the actions a player can take from a given history, or a combination of both. Definition 5 (Abstraction) [7] An abstraction for player i is a pair αi = αI i, αA i , where, • αI i is a partition of Hi, defining a set of abstract information sets coarser1 than Ii, and • αA i is a function on histories where αA i (h) ⊆A(h) and αA i (h) = αA i (h′) for all histories h and h′ in the same abstract information set. We will call this the abstract action set. The null abstraction for player i, is φi = ⟨Ii, A⟩. An abstraction α is a set of abstractions αi, one for each player. Finally, for any abstraction α, the abstract game, Γα, is the extensive game obtained from Γ by replacing Ii with αI i and A(h) with αA i (h) when P(h) = i, for all i. Strategies for abstract games are defined in the same manner as for unabstracted games. However, the strategy must assign the same distribution to all histories in the same block of the abstraction’s information partition, as well as assigning zero probability to actions not in the abstract action set. 3 Strategy Grafting Though there is no guarantee that optimal strategies in abstract games are strong in the original game [7], these strategies have empirically been shown to perform well against both other computers [9] and humans [1]. Currently, strong strategies are solved for in one single equilibrium computation for a single abstract game. Advancement typically involves developing algorithmic improvements to equilibrium finding techniques in order to find solutions to yet larger abstract games. It is simple to show that a strategy space must include at least as good, if not better, strategies than a smaller space that it refines [7]. At first glance, this would seem to imply that a larger abstraction would always be better, but upon closer inspection we see this depends on our method of selecting a strategy from the space. In poker, when using arbitrary equilibrium strategies that are evaluated in a tournament setting, this intuition empirically holds true. One potentially important factor for the empirical evidence is the presence of dominated strategies in the support of the abstract equilibrium strategies. Definition 6 (Dominated Strategy) A dominated strategy for player i is a pure strategy, σi, such that there exists another strategy, σ′ i, where for all opponent strategies σ−i, ui(σ′ i, σ−i) ≥ui(σi, σ−i) (3) and the inequality must hold strictly for at least one opponent strategy. 1Partition A is coarser than partition B, if and only if every set in B is a subset of some set in A, or equivalently x and y are in the same set in A if x and y are in the same set in B. 3 This implies that a player can never benefit by playing a dominated strategy. When abstracting one can, in effect, merge a dominated strategy in with a non-dominated strategy. In the abstract game, this combined strategy might become part of an equilibrium and hence the abstract strategy would make occasional mistakes. That is, abstraction does not necessarily preserve strategy domination. As a result of their expressive power, finer abstractions may better preserve domination and thus can result in less play of dominated strategies. Decomposition is a natural approach for using larger strategy spaces without incurring additional computational costs and indeed it has been employed toward this end. In extensive games with imperfect information, though, straightforward decomposition can be problematic. One way that equilibrium strategies guard against exploitation is information hiding, i.e., the equilibrium plays in a fashion that hinders an opponent’s ability to effectively reconstruct the player’s private information. Independent solutions to a set of sub-games, though, may not “mesh”, or hide information, effectively as a whole. For example, an observant opponent might be able to determine which subgame is being played, which itself could be valuable information that could be exploited. Armed with some intuition for why increasing the size of the strategy space may improve the quality of the solution and why decomposition can be problematic, we will now begin describing the strategy grafting algorithm and provide some theoretical results regarding the quality of grafted strategies. First, we will explain how a game of imperfect information is formally divided into sub-games. Definition 7 (Grafting Partition) G = {G0, G1, . . . , Gp} is a grafting partition for player i if 1. G is a partition of Hi, 2. ∀I ∈Ii ∃j ∈{0, . . . , p} such that I ⊆Gj, and 3. ∀j ∈{1, . . . , p} if h is a prefix of h′ ∈Hi and h ∈Gj then h′ ∈Gj ∪G0. Using the elements of a grafting partition, we construct a set of sub-games. The solutions to these sub-games are called grafts, and we can combine them naturally, since they are disjoint sets, into one single grafted strategy. Definition 8 (Grafted Strategy) Given a strategy σi ∈Σi and a grafting partition G for player i. For j ∈{1, . . . , p}, define Γσi,j to be an extensive game derived from the original game Γ where for all h ∈Hi \ Gj, P(h) = c and fc(a|h) = σi(h, a). That is, player i only controls her actions for histories in Gj and is forced to play according to σi elsewhere. Let the graft of Gj, σ∗,j, be an ϵ-Nash equilibrium of the game Γσi,j. Finally, define the grafted strategy for player i σ∗ i as, σ∗ i (h, a) =  σi(h, a) if h ∈G0 σ∗,j i (h, a) if h ∈Gj We will call σi the base strategy and G the grafting partition for the grafted strategy σ∗ i . There are a few key ideas to observe about grafted strategies that distinguish them from previous sub-game decomposition methods. First, we start out with a base strategy for the player. This base strategy can be constructed using current techniques for a tractably sized abstraction. It is important that we use the same base strategy for all grafts, as it is the only information that is shared between the grafts. Second, when we construct a graft, only the portion of the game that the graft plays is allowed to vary for our player of interest. The actions over the remainder of the game are played according to the base strategy. This allows us to refine the abstraction for that block of the grafting partition, so that it itself is as large as the largest tractably solvable game. Third, note that when we construct a graft, we continue to use an equilibrium finding technique, but we are not interested in the pair of strategies — we are only interested in the strategy for the player of interest. This means in games like poker, where we are interested in a strategy for both players, we must construct a grafted strategy separately for each player. Finally, when we construct a graft, our opponent must learn a strategy for the entire, potentially abstract, game. By letting our opponent’s strategy vary completely, our graft will be a strategy that is less prone to exploitation, forcing each individual graft to mesh well with the base strategy and in turn with each other graft when combined. Strategy grafting allows us to construct a strategy with more expressive power that what can be computed by solving a single game. We now show that strategy grafting uses this expressive power to its advantage, causing an (approximate) improvement over its base strategy. Note that we cannot guarantee a strict improvement as the base strategy may already be an optimal strategy. 4 Theorem 1 For strategies σ1, σ2 where σ2 is an ϵ-best response to σ1, if σ∗ 1 is the grafted strategy for player 1 where σ1 is used as the base strategy and G is the grafting partition then, u1(σ∗ 1, σ2) −u1(σ1, σ2) = p X j=1  u1(σ∗,j 1 , σ2) −u1(σ1, σ2)  ≥−3pϵ. In other words, the grafted strategy’s improvement against σ2 is equal to the sum of the gains of the individual grafts against σ2 and this gain is no less than −3pϵ. PROOF. Define Zj as follows, ∀j ∈{1, . . . , p} Zj = {z ∈Z | ∃h ∈Gj with h a prefix of z} (4) Z0 = Z \ p[ j=1 Zj (5) By condition (3) of Definition 7, Zj=0,...,p are disjoint and therefore form a partition of Z. p X j=1  u1(σ∗,j 1 , σ2) −u1(σ1, σ2)  (6) = p X j=1 X z∈Z u1(z) Pr(z|σ∗,j 1 , σ2) − X z∈Z u1(z) Pr(z|σ1, σ2) ! (7) = p X j=1 p X k=0 X z∈Zk u1(z)  Pr(z|σ∗,j 1 , σ2) −Pr(z|σ1, σ2)  (8) Notice that for all z ∈Zk̸=j, Pr(z|σ∗,j 1 , σ2) = Pr(z|σ1, σ2), so only when k = j is the summand non-zero. = p X j=1 X z∈Zj u1(z)  Pr(z|σ∗,j 1 , σ2) −Pr(z|σ1, σ2)  (9) = p X j=1 X z∈Zj u1(z) (Pr(z|σ∗ 1, σ2) −Pr(z|σ1, σ2)) (10) = X z∈Z u1(z) (Pr(z|σ∗ 1, σ2) −Pr(z|σ1, σ2)) (11) = X z∈Z u1(z) Pr(z|σ∗ 1, σ2) − X z∈Z u1(z) Pr(z|σ1, σ2) ! (12) = u1(σ∗ 1, σ2) −u1(σ1, σ2) (13) Furthermore, since σ∗,j 1 and σ∗,j 2 are strategies of the ϵ-Nash equilibrium σ∗,j, u1(σ∗,j 1 , σ2) + ϵ ≥u1(σ∗,j 1 , σ∗,j 2 ) ≥u1(σ1, σ∗,j 2 ) −ϵ (14) Moreover, because σ2 is an ϵ-best response to σ1, u1(σ1, σ∗,j 2 ) ≥u1(σ1, σ2) −ϵ (15) So, Pp j=1  u1(σ∗,j 1 , σ2) −u1(σ1, σ2)  ≥−3pϵ. The main application of this theorem is in the following corollary, which follows immediately from the definition of an ϵ-Nash equilibrium. Corollary 1 Let α be an abstraction where α2 = φ2 and σ be an ϵ-Nash equilibrium strategy for the game Γα, then any grafted strategy σ∗ 1 in Γ with σ1 used as the base strategy will be at most 3pϵ worse than σ1 against σ2. 5 Although these results suggest that a grafted strategy will (approximately) improve on its base strategy against an optimal opponent, there is one caveat: it assumes we know the opponent’s abstraction or can solve a game with the opponent unabstracted. Without this knowledge or ability, this guarantee does not hold. However, all previous work that employs the use of abstract equilibrium strategies also implicitly makes this assumption. Though we know that refining an abstraction also has no guarantee on improving worst-case performance in the original game [7], the AAAI Computer Poker Competition [10] has shown that in practice larger abstractions and more expressive strategies consistently perform well in the original game, even though competition opponents are not using the same abstractions. We might expect a similar result even when the theorem’s assumptions are not satisfied. In the next section we examine empirically both situations where we know our opponent’s abstraction and situations where we do not. 4 Experimental Results The AAAI Computer Poker Competitions use various types of large Texas Hold’em poker games. These games are quite large and the resulting abstract games can take weeks of computation to solve. We begin our experiments in a smaller poker game called Leduc Hold’em where we can examine several grafted strategies. This is followed by analysis of a grafted strategy for two-player limit Texas Hold’em that was submitted to the 2009 AAAI Poker Competition. 4.1 Leduc Hold’em Leduc Hold’em is a two player poker game. The deck used in Leduc Hold’em contains six cards, two jacks, two queens and two kings, and is shuffled prior to playing a hand. At the beginning of a hand, each player pays a one chip ante to the pot and receives one private card. A round of betting then takes place starting with player one. After the round of betting, a single public card is revealed from the deck, which both players use to construct their hand. This card is called the flop. Another round of betting occurs after the flop, again starting with player one, and then a showdown takes place. At a showdown, if either player has paired their private card with the public card they win all the chips in the pot. In the event neither player pairs, the player with the higher card is declared the winner. The players split the money in the pot if they have the same private card. Each betting round follows the same format. The first player to act has the option to check or bet. When betting the player adds chips into the pot and action moves to the other player. When a player faces a bet, they have the option to fold, call or raise. When folding, a player forfeits the hand and all the money in the pot is awarded to the opposing player. When calling, a player places enough chips into the pot to match the bet faced and the betting round is concluded. When raising, the player must put more chips into the pot than the current bet faced and action moves to the opposing player. If the first player checks initially, the second player may check to conclude the betting round or bet. In Leduc Hold’em there is a limit of one bet and one raise per round. The bets and raises are of a fixed size. This size is two chips in the first betting round and four chips in the second. Tournament Setup. Despite using a smaller poker game, we aim to create a tournament setting similar to the AAAI Poker Competition. To accomplish this we will create a variety of equilibriumlike players using abstractions of varying size. Each of these strategies will then be used as a base strategy to create two grafted strategies. All strategies are then played against each other in a roundrobin tournament. A strategy is said to beat another strategy if its expected winnings against the other is positive. Unlike the AAAI Poker Competition, in our smaller game we can feasibly compute the expected value of one strategy against another and thus we are not required to sample. The abstractions used are J.Q.K, JQ.K, and J.QK. Prior to the flop, the first abstraction can distinguish all three cards, the second abstraction cannot distinguish a jack from a queen and the third cannot distinguish a queen from a king. Postflop, all three abstractions are only aware of if they have paired their private card. These three abstractions were hand chosen as they are representative of how current abstraction techniques will group hands together. The first abstraction is the biggest, and hence we would expect it to do the best. The second and third abstractions are the same size. We chose to train two types of grafted strategies: preflop grafts and flop grafts. Both types consist of three individual grafts for each player: one to play each card with complete information. That is, 6 (1) (2) (3) (4) (5) (6) (7) (8) (9) Avg. (1) J.Q.K preflop grafts 2.3 28.0 17.5 12.2 26.6 36.7 22.3 54.7 25.0 (2) J.Q.K flop grafts -2.3 28.6 18.6 16.9 23.9 39.7 24.7 49.6 25.0 (3) JQ.K flop grafts -28.0 -28.6 -47.2 67.0 -0.9 28.5 79.9 89.2 20.0 (4) JQ.K preflop grafts -17.5 -18.6 47.2 -11.2 9.0 67.3 3.7 62.8 17.9 (5) J.QK preflop grafts -12.2 -16.9 -67.0 11.2 8.1 -20.0 30.9 110.0 5.5 (6) J.Q.K -26.6 -23.9 0.9 -9.0 -8.1 13.6 7.5 32.5 -1.6 (7) JQ.K -36.7 -39.7 -28.5 -67.3 20.0 -13.6 42.2 70.6 -6.6 (8) J.QK flop grafts -22.3 -24.7 -79.9 -3.7 -30.9 -7.5 -42.2 83.3 -16.0 (9) J.QK -54.7 -49.6 -89.2 -62.8 -110.0 -32.5 -70.6 -83.3 -69.1 Table 1: Expected winnings of the row player against the column player in millibets per hand (mb/h) Strategy Wins Losses Exploitability J.Q.K preflop grafts 8 0 298.3 J.Q.K flop grafts 7 1 321.1 JQ.K preflop grafts 5 3 465.9 JQ.K flop grafts 4 4 509.0 J.QK preflop grafts 4 4 507.3 J.Q.K 4 4 315.1 JQ.K 3 5 246.8 J.QK flop grafts 1 7 503.5 J.QK 0 8 371.1 Table 2: Each strategy’s number of wins, losses, and exploitability in unabstracted Leduc Hold’em in millibets per hand (mb/h) each graft does not abstract the sub-game for the observed card. These two types differ in that the preflop grafts play for the entire game whereas the flop grafts only play the game after the flop. For preflop grafts, this means G0 is empty, i.e., the final grafted strategy is always using the probabilities from some graft and never the base strategy. For flop grafts, the grafted strategy follows the base strategy in all preflop information sets. We use ε-Nash equilibria in the three abstract games as our base strategies. Each base strategy and graft is trained using counterfactual regret minimization for one billion iterations. The equilibria found are ε-Nash equilibria where no player can benefit more than ε = 10−5 chips by deviating within the abstract game. We measure the expected winnings in millibets per hand or mb/h. A millibet is one thousandth of a small bet, or 0.002 chips. Results. We can see in Table 1 that the grafted strategies perform well in a field of equilibriumlike strategies. The base strategy seems to be of great importance when training a grafted strategy. Though JQ.K and J.QK are the same size, the JQ.K strategy performs better in this tournament setting. Similarly, the grafted strategies appear to maintain the ordering of their base strategies either when considering the expected winnings in Table 1 or the number of wins in Table 2 (though JQ.K flop grafts switches places with JQ.K preflop grafts in the ordering). Although the choice of base strategy is important, the grafted strategies do well under both evaluation criteria and even the worst base strategy sees great relative improvement when used to train grafted strategies. There are also a few other interesting trends in these results. First, our intuition that larger strategies perform better seems to hold in all cases except for J.QK flop grafts. Larger abstractions also perform better for the non-grafted strategies as J.Q.K is the biggest equilibrium strategy and it performs the best out of this group. Second, it appears that the preflop grafts are usually better than the flop grafts. This can be explained by the fact that the preflop grafts have more information about the original game. Finally, observe that the grafted strategies can have worse exploitability in the original game than their corresponding base strategy. Although this can make grafted strategies more vulnerable to exploitive strategies, they appear to perform well against a field of equilibrium-like opponents. In fact, in our experiment, grafted strategies appear to only improve upon the base strategy despite not always knowing the opponent’s abstraction. This suggests that exploitability is not the only important measure of strategy quality. Contrast the grafted strategies with the strategy that always folds, which is exploitable at 500 mb/h. Although always folding is less exploitable than some of the grafted strategies, it cannot win against any opponent and would place last in this tournament. 7 Relative Size (1) (2) (3) (4) (5) (6) Avg. (1) 20x8 Grafted 1.0 2.1 14.5 18.1 13.7 18.7 13.4 (2) 20x32 2.53 -2.1 4.9 9.4 11.8 15.5 7.9 (3) 20x8 (Base) 1.0 -14.5 -4.9 6.2 7.2 10.7 0.9 (4) 20x7 0.43 -18.1 -9.4 -6.2 1.7 5.0 -5.4 (5) 14 0.82 -13.7 -11.8 -7.2 -1.7 5.3 -5.8 (6) 12 0.45 -18.7 -15.5 -10.7 -5.0 -5.3 -11.0 Table 3: Sampled expected winnings in Texas Hold’em of the row player against the column player in millibets per hand (mb/h). 95% confidence intervals are between 0.8 and 1.6. Relative size is the ratio of the size of the abstract game(s) solved for the row strategy and the base strategy. 4.2 Texas Hold’em Two-player limit Texas Hold’em bears many similarities to Leduc Hold’em but is much larger in scale with respect to the parameters: cards in the deck, private cards, public cards, betting rounds and bets per round. Due to the computational cost2 needed to solve a strong equilibrium, our experiments consist of a single grafted strategy. Table 3 shows the results of running this large grafted strategy against equilibrium-like strategies using a variety of abstractions. The 20x32 strategy is the largest single imperfect recall abstract game solved to date. It is approximately 2.53 times larger than the base strategy used with grafting, 20x8. The 20x7 (imperfect recall) and 12 (perfect recall) strategies were the entrants put forward by the Computer Poker Research Group for the 2008 and 2007 AAAI Computer Poker Competitions, respectively. The 14 strategy was considered for the 2008 competition, but it was ultimately superseded by the smaller 20x7. For a detailed description of these abstractions and the rules of Texas Hold’em see A Practical Use of Imperfect Recall [8]. As evident in the results, the grafted strategy beats all of the players with statistical significance, even the largest single strategy. In addition to these results against other Computer Poker Research Group strategies, the grafted strategy also performed well at the 2009 AAAI Computer Poker Competition. There, against a field of thirteen strong strategies, it placed second and fourth (narrowly behind the third place entrant) in the limit run-off and limit bankroll competitions, respectively. These results demonstrate that strategy grafting is competitive and allows one to augment their existing strategies. Any improvement to the quality of a base strategy should in turn improve the quality of the grafted strategy in similar tournament settings. This means that strategy grafting can be used transparently on top of more sophisticated strategy-computing methods. 5 Conclusion We have introduced a new method, called strategy grafting, for independently solving and combining sub-games in large extensive games. This method allows us to create larger strategies than previously possible by solving many sub-games. These new strategies seem to maintain the features of good equilibrium-like strategies. By creating larger strategies we hope to play fewer dominated strategies and, in turn, make fewer mistakes. Against a static equilibrium-like opponent, making fewer mistakes should lead to an improvement in the quality of play. Our empirical results confirm this intuition and demonstrate that this new method can improve the performance of the state-of-theart in both a simulated competition and the actual AAAI Computer Poker Competition. It is likely that much of the strength of these new strategies will be bounded by the quality of the base strategy used. In this regard, we are still limited by the capabilities of current methods. Acknowledgments The authors would like to thank the members of the Computer Poker Research Group at the University of Alberta for helpful conversations pertaining to this research. This research was supported by NSERC, iCORE, and Alberta Ingenuity. 2This particular grafted strategy was computed on a large cluster using 640 processors over almost 6 days. 8 References [1] Darse Billings, Neil Burch, Aaron Davidson, Robert Holte, Jonathan Schaeffer, Terance Schauenberg, and Duane Szafron. Approximating Game-Theoretic Optimal Strategies for Full-scale Poker. In International Joint Conference on Artificial Intelligence, pages 661–668, 2003. [2] Andrew Gilpin, Samid Hoda, Javier Pe˜na, and Tuomas Sandholm. Gradient-based Algorithms for Finding Nash Equilibria in Extensive Form Games. In Proceedings of the Eighteenth International Conference on Game Theory, 2007. [3] Andrew Gilpin and Tuomas Sandholm. A Competitive Texas Hold’em Poker Player via Automated Abstraction and Real-time Equilibrium Computation. In Proceedings of the Twenty-First Conference on Artificial Intelligence, 2006. [4] Andrew Gilpin and Tuomas Sandholm. Expectation-Based Versus Potential-Aware Automated Abstraction in Imperfect Information Games: An Experimental Comparison Using Poker. In Proceedings of the Twenty-Third Conference on Artificial Intelligence, 2008. [5] Daphne Koller and Avi Pfeffer. Representations and Solutions for Game-Theoretic Problems. Artificial Intelligence, 94:167–215, 1997. [6] Martin Osborne and Ariel Rubinstein. A Course in Game Theory. The MIT Press, Cambridge, Massachusetts, 1994. [7] Kevin Waugh, David Schnizlein, Michael Bowling, and Duane Szafron. Abstraction Pathologies in Extensive Games. In Proceedings of the Eighth International Joint Conference on Autonomous Agents and Multi-Agent Systems, pages 781–788, 2009. [8] Kevin Waugh, Martin Zinkevich, Michael Johanson, Morgan Kan, David Schnizlein, and Michael Bowling. A Practical Use of Imperfect Recall. In Proceedings of the Eighth Symposium on Abstraction, Reformulation and Approximation, 2009. [9] Martin Zinkevich, Michael Johanson, Michael Bowling, and Carmelo Piccione. Regret Minimization in Games with Incomplete Information. In Advances in Neural Information Processing Systems Twenty, pages 1729–1736, 2008. A longer version is available as a University of Alberta Technical Report, TR07-14. [10] Martin Zinkevich and Michael Littman. The AAAI Computer Poker Competition. Journal of the International Computer Games Association, 29, 2006. News item. 9
2009
222
3,729
Training Factor Graphs with Reinforcement Learning for Efficient MAP Inference Michael Wick, Khashayar Rohanimanesh, Sameer Singh, Andrew McCallum Department of Computer Science University of Massachusetts Amherst Amherst, MA 01003 {mwick,khash,sameer,mccallum}@cs.umass.edu Abstract Large, relational factor graphs with structure defined by first-order logic or other languages give rise to notoriously difficult inference problems. Because unrolling the structure necessary to represent distributions over all hypotheses has exponential blow-up, solutions are often derived from MCMC. However, because of limitations in the design and parameterization of the jump function, these samplingbased methods suffer from local minima—the system must transition through lower-scoring configurations before arriving at a better MAP solution. This paper presents a new method of explicitly selecting fruitful downward jumps by leveraging reinforcement learning (RL). Rather than setting parameters to maximize the likelihood of the training data, parameters of the factor graph are treated as a log-linear function approximator and learned with methods of temporal difference (TD); MAP inference is performed by executing the resulting policy on held out test data. Our method allows efficient gradient updates since only factors in the neighborhood of variables affected by an action need to be computed—we bypass the need to compute marginals entirely. Our method yields dramatic empirical success, producing new state-of-the-art results on a complex joint model of ontology alignment, with a 48% reduction in error over state-of-the-art in that domain. 1 Introduction Factor graphs are a widely used representation for modeling complex dependencies amongst hidden variables in structured prediction problems. There are two common inference problems: learning (setting model parameters) and decoding (maximum a posteriori (MAP) inference). MAP inference is the problem of finding the most probable setting to the graph’s hidden variables conditioned on some observed variables. For certain types of graphs, such as chains and trees, exact inference and learning is polynomial time [1, 2, 3]. Unfortunately, many interesting problems require more complicated structure rendering exact inference intractable [4, 5, 6, 7]. In such cases we must rely on approximate techniques; in particular, stochastic methods such as Markov chain Monte Carlo (e.g., Metropolis-Hastings) have been applied to problems such as MAP inference in these graphs [8, 9, 10, 11, 6]. However, for many real-world structured prediction tasks, MCMC (and other local stochastic methods) are likely to struggle as they transition through lower-scoring regions of the configuration space. For example, consider the structured prediction task of clustering where the MAP inference problem is to group data points into equivalence classes according to some model. Assume for a moment that 1 P =.44 R =1.0 F1=.61 P =.34 R =.80 F1=.48 P =.48 R =.70 F1=.57 P =1.0 R =1.0 F1=1.0 0.59 0.6 0.61 0.62 0.63 0.64 0.65 0.66 0 1 2 3 4 5 6 7 8 9 20 Figure 1: The figure on the left shows the sequence of states along an optimal path beginning at a single-cluster configuration and ending at the MAP configuration (F1 scores for each state are shown). The figure on the right plots the F1 scores along the optimal path to the goal for the case where the MAP clustering has forty instances (twenty per cluster) instead of 5. this model is perfect and exactly reflects the pairwise F1 score. Even in these ideal conditions MCMC must make many downhill jumps to reach the MAP configuration. For example, Figure 1 shows the F1 scores of each state along the optimal path to the MAP clustering (assuming each MCMC jump can reposition one data point at a time). We can see that several consecutive downhill transitions must be realized before model-scores begin to improve. Taking into account the above discussion with an emphasis on the delayed feedback nature of the MAP inference problem immediately inspires us to employ reinforcement learning (RL) [12]. RL is a framework for solving the sequential decision making problem with delayed reward. There has been an extensive study of this problem in many areas of machine learning, planning, and robotics. Our approach is to directly learn the parameters of the log-linear factor graph with reinforcement learning during a training phase; MAP inference is performed by executing the policy. Because we develop the reward-structure to assign the most mass to the goal configuration, the parameters of the model can also be interpreted as a regularized version of maximum likelihood that is smoothed over neighboring states in the proposal manifold. The rest of this document is organized as follows: in §2 we briefly overview background material. In §3 we describe the details of our algorithm and discuss a number of ideas for coping with the combinatorial complexity in both state and action spaces. In §4.3 we present our empirical results, and finally in §6 we conclude and lay out a number of ideas for future work. 2 Preliminaries 2.1 Factor Graphs A factor graph is undirected bipartite graphical representation of a probability distribution with random variables and factors as nodes. Let X be a set of observed variables and Y be a set of hidden variables. The factor graph expresses the conditional probability of Y = y given X = x discriminatively: P(y|x) = 1 ZX Y ψi∈Ψ ψi(x, yi) = 1 ZX exp X k θkφk(x, yk) ! (1) Where ZX is an input-dependent normalizing constant ensuring that the distribution sums to one, Ψ is the set of factors, and ψ(x, yi) are factors over the observed variables x and a set of hidden variables yi that are the neighbors of the factor (we use superscript to denote a set). Factors are log-linear combinations of features φ(x, yi) and parameters θ = {θj}. The problem of learning is to find a setting of the parameters θ that explains the data. For example, maximum likelihood sets the parameters so that the model’s feature expectations matches the data’s expectations. 2 2.2 Reinforcement Learning Most of the discussion here is based on [12]. Reinforcement learning (RL) refers to a class of problems in which an agent interacts with the environment and the objective is to learn a course of actions that optimizes a long-term measure of a delayed reward signal. The most popular realization of RL has been in the context of markov decision processes (MDPs). An MDP is the tuple M = ⟨S, A, R, P⟩, where S is the set of states, A is the set of actions, R : S × A × S →IR is the reward function, i.e. R(s, a, s′) is the expected reward when action a is taken in state s and transitions to state s′, and P : S × A × S →[0, 1] is the transition probability function, i.e. Pa(s, s′) is the probability of reaching state s′ if action a is taken in state s. A stochastic policy π is defined as π : S × A →[0, 1] such that P a π(a|s) = 1, where π(s, a) is the probability of choosing action a (as the next action) when in state s. Following a policy on an MDP results in an expected discounted reward Rπ t accumulated over the course of the run, where Rπ t = PT k=0 γkrt+k+1. An optimal policy π⋆is a policy that maximizes this reward. Given a Q-function (Q : S × A →IR) that represents the expected discounted reward for taking action a in state s, the optimal policy π⋆can be found by locally maximizing Q at each step. Methods of temporal difference (TD) [13] can be used to learn the optimal policy in MDPs, and even have convergence guarantees when the Q-function is in tabular form. However, in practice, tabular representations do not scale to large or continuous domains; a problem that function approximation techniques address [12]. Although the convergence properties of these approaches have not yet been established, the methods have been applied successfully to many problems [14, 15, 16, 17]. When linear functional approximation is used, the state-action pair ⟨s, a⟩is represented by a feature vector φ(s, a) and the Q value is represented using a vector of parameters θ, i.e. Q(s, a) = X φk∈φ(s,a) θkφk (2) Instead of updating the Q values directly, the updates are made to the parameters θ: θ ← θ + α  rt+1 −Q(st, at) + γ max a Q(st+1, a)  φ(st, at) (3) notice the similarity between the linear function approximator (Equation 2) and the log-linear factors (right-hand side of Equation 1); namely, the approximator has the same form as the unnormalized log probabilities of the distribution. This enables us to share the parameters θ from Equation 1. 3 Our Approach In our RL treatment of learning factor graphs, each state in the system represents a complete assignment to the hidden variables Y =y. Given a particular state, an action modifies the setting to a subset of the hidden variables; therefore, an action can also be defined as a setting to all the hidden variables Y =y′. However, in order to cope with complexity of the action space, we introduce a proposer (as in Metropolis-Hastings) B : Y →Y that constrains the space by limiting the number of possible actions from each state. The reward function R can be defined as the residual performance improvement when the systems transitions from a current state y to a neighboring state y′ on the manifold induced by B. In our approach, we use a performance measure based on the ground truth labels (for example, F1, accuracy, or normalized mutual information) as the reward. These rewards ensure that the ground truth configuration is the goal. 3.1 Model Recall that an MDP is defined as M = ⟨S, A, R, P⟩with a set of states S, set of actions A, reward function R and transition probability function P; we can now reformulate MAP inference and learning in factor graphs as follows: • States: we require the state space to encompass the entire feasible region of the factor graph. Therefore, a natural definition for a state is a complete assignment to the hidden variables Y ←y and 3 the state space itself is defined as the set S = {y | y ∈DOM(Y )}, where DOM(Y ) is the domain space of Y , and we omit the fixed observables x for clarity since only y is required to uniquely identify a state. Note that unless the hidden variables are highly constrained, the feasible regional will be combinatorial in |Y |; we discuss how to cope with this in the following sections. • Actions Given a state s (e.g., an assignment of Y variables), an action may be defined as a constrained set of modifications to a subset of the hidden variable assignments. We constrain the action space to a manageable size by using a proposer, or a behavior policy from which actions are sampled. A proposer defines the set of reachable states by describing the distribution over neighboring states s′ given a state s. In context of the action space of an MDP, the proposer can be viewed in two ways. First, each possible neighbor state s′ can be considered the result of an action a, leading to a large number of deterministic actions. Second, it can be regarded as a single highly stochastic action, whose next state s′ is a sample from the distribution given by the proposer. Both of these views are equivalent; the former view is used for notation simplicity. • Reward Function The reward function is designed so that the policy learned through delayed reward reaches the MAP configuration. Rewards are shaped to facilitate efficient learning in this combinatorial space. Let F be some performance metric (for example, for information extraction tasks, it could be F1 score based on the ground truth labels). The reward function used is the residual improvement based on the performance metric F when the system transitions between states s and s′: R(s, s′) = F(s′) −F(s) (4) this reward can viewed as learning to minimize the geodesic distance between a current state and the MAP configuration on the proposal manifold. Alternatively, we could define a Euclidean reward as F(s⋆) −F(s′), where s⋆is the ground truth. We choose an F such that the ground truth scores the highest, that is s⋆= arg maxs F(s). • Transition Probability Function: Recall that the actions in our system are samples generated from a proposer B, and that each action uniquely identifies a next state in the system. The function that returns this next state deterministically is called simulate(s,a). Thus, given the state s and the action a, the next state s′ has probability Pa(s, s′) = 1 if s′ = simulate(s, a), and 0 otherwise. 3.2 Efficient Q Value Computations We use linear function approximation to obtain Q values over the state/action space. That is, Q(s, a) = θ · φ(s, a), where φ(s, a) are features over the state-action pair s, a. We show below how Q values can be derived from the factor graph (Equation 1) in a manner that enables efficient computations. As mentioned previously, a state is an assignment to hidden variables Y =y and an action is another assignment to the hidden variables Y =y′ (that results from changing the values of a subset of the variables ∆Y ∈Y ). Let δy be the setting to those variables in y and δy′ be the new setting to those variables in y′. For each assignment, the factor graph can compute the conditional probability p(y | x). Then, the residual log-probability S resulting from taking action a in state y and reaching y′ is therefore log(p(y′ | x))−log(p(y | x)). Plugging in the model from Equation 1 and performing some algebraic manipulation so redundant factors cancel yields: θ ·  X y′i∈δy′ φ(x, y′i) − X yi∈δy φ(x, yi)   (5) Where the partition function ZX and factors outside the neighborhood of ∆y cancel. In practice an action will modify a small subset of the variables so this computation is extremely efficient. We are now justified in using Equation 5 (derived from the model) to compute the inner product (θ ·φ(s, a)) from Equation 2. 4 3.3 Algorithm Now that we have defined MAP inference in a factor graph as an MDP, we can apply a wide variety of RL algorithms to learn the model’s parameters. In particular, we build upon Watkin’s Q(λ) [18, 19], a temporal difference learning algorithm [13]; we augment it with function approximation as described in the previous section. Our RL learning method for factor graphs is shown in Algorithm 1. Algorithm 1 Modified Watkin’s-Q(λ) for Factor Graphs 1: Input: Performance metric F, proposer B 2: Initialize −→θ and −→e = −→0 3: repeat {For every episode} 4: s ←random initial configuration 5: Sample n actions a ←B(s); collect action samples in AB(s) 6: for samples a ∈AB(s) do 7: s′ ←simulate(s, a) 8: φ(s, s′) ←set of features between s, s′ 9: Q(s, a) ←θ · φ(s, s′) {Equation 5} 10: end for 11: repeat {For every step of the episode} 12: if with probability (1 −ϵ) then 13: a ←arg maxa′ Q(s, a′) 14: −→e ←γλ−→e 15: else 16: Sample a random action a ←B(s) 17: −→e ←−→0 18: end if 19: s′ ←simulate(s, a) 20: ∀φi ∈φ(s, s′) : e(i) ←e(i) + φi {Accumulate eligibility traces} 21: Observe reward r = F(s) −F(s′) {Equation 4} 22: δ ←r −Q(s, a) 23: Sample n actions a ←B(s′); collect action samples in AB(s′) 24: for samples a ∈AB(s′) do 25: s′′ ←simulate(s′, a) 26: φ(s′, s′′) ←set of features between s′, s′′ 27: Q(s′, a) ←θ · φ(s′, s′′) 28: end for 29: a ←arg maxa′ Q(s′, a′) 30: δ ←δ + γQ(s′, a) {Equation 3 with elig. traces} 31: −→θ ←−→θ + αδ−→e 32: s ←s′ 33: until end of episode 34: until end of training At the beginning of each episode, the factor graph is initialized to a random initial state s (by assigning Y =y0). Then, during each step of the episode, the maximum action is obtained by repeatedly sampling from the proposal distribution (s′=simulate(s, a)). The system transition to the greedy state s′ with high probability (1 −ϵ), or transitions to a random state instead. We also include eligibility traces that have been modified to handle function approximation [12]. Once learning has completed on a training set, MAP inference can be evaluated on test data by executing the resulting policy. Because Q-values encode both the reward and value together, policy execution can be performed by choosing the action that maximizes the Q-function at each state. 4 Experiments We evaluate our approach by training a factor graph for solving the ontology alignment problem. Ontology alignment is the problem of mapping concepts from one ontology to semantically equivalent concepts from another ontology; our treatment of the problem involves learning a first-order probabilistic model that clusters concepts into semantically equivalent sets. For our experiments, 5 we use the the dataset provided by the Illinois Semantic Integration Archive (ISIA)1. There are two ontology mappings: one between two course catalog hierarchies, and another between two company profile hierarchies. Each ontology is organized as a taxonomy tree. The course catalog contains 104 concepts and 4360 data records while the company profile domain contains 219 concepts and 23139 records. For our experiments we perform two-fold cross validation with even splits. The conditional random field we use to model the problem factors into binary decisions over sets of concepts, where the binary variable is one if all concepts in the set map to each other, and zero otherwise. Each of these hidden variables neighbors a factor that also examines the observed concept data. Since there are variables and factors for each hypothetical cluster, the size of the CRF is combinatorial in the number of concepts in the ontology, and it cannot be full instantiated even for small amounts of data. Therefore, we believe that this is be a good dataset demonstrate the scalability of the approach. 4.1 Features The features used to represent the ontology alignment problem are described here. We choose to encode our features in first order logic, aggregating and quantifying pairwise comparisons of concepts over entire sets. These features are described more detail in our technical report [17]. The pairwise feature extractors are the following: • TFIDF cosine similarity between concept-names of ci and cj • TFIDF cosine similarity between data-records that instantiate ci and cj • TFIDF similarity of the children of ci and cj • Lexical features for each string in the concept name • True if there is a substring overlap between ci and cj • True if both concepts are the same level in the tree The above pairwise features are used as a basis for features over entire sets with the following first order quantifiers and aggregators: • ∀: universal first order logic quantifier • ∃: existential quantifier • Average: conditional mean over a cluster • Max: maximum value obtained for a cluster • Min: minimum value obtained for a cluster • Bias: conditional bias, counts number of pairs where a pairwise feature could potentially fire. The real-valued aggregators (min,max,average) are also quantized into bins of various sizes corresponding to the number of bins={2,4,20,100}. Note that our first order features must be computed on-the-fly since the model is too large to be grounded in advance. Course Catalog Company Profile F1 Precision Recall F1 Precision Recall RL 94.3 96.1 92.6 84.5 84.5 84.5 MH-CD1 76.9 78.0 57.0 64.7 64.7 64.7 MH-SR 92.0 88.9 76.3 81.5 88.0 75.9 GA-PW 89.9 100 81.5 81.5 88.0 75.9 GLUE 80 80 80 80 80 80 Table 1: pairwise-matching precision, recall and F1 on the course catalog dataset 4.2 Systems In this section we evaluate the performance of our reinforcement learning approach to MAP inference and compare it current stochastic and greedy alternatives. In particular, we compare piecewise [20], contrastive divergence [21], and SampleRank [22, 11, 23]; these are described in more detail below. 1http://pages.cs.wisc.edu/ anhai/wisc-si-archive/ 6 • Piecewise (GA-PW): the CRF parameters are learned by training independent logistic regression classifiers in a piecewise fashion. Inference is performed by greedy agglomerative clustering. • Contrastive Divergence (MH-CD1) with Metropolis-Hastings the system is trained with contrastive divergence and allowed to wander one step from the ground-truth configuration. Once the parameters are learned, MAP inference is performed using Metropolis-Hastings (with a proposal distribution that modifies a single variable at a time). • SampleRank with Metropolis-Hastings (MH-SR): this system is the same as above, but trains the CRF using SampleRank rather than CD1. MAP is performed with Metropolis-Hastings using a proposal distribution that modifies a single variable at a time (same proposer as in MH-CD1). • Reinforcement Learning (RL): this is the system introduced in the paper that trains the CRF with delayed reward using Q(λ) to learn state-action returns. The actions are derived from the same proposal distribution as used by our Metropolis-Hastings (MH-CD1,MH-SR) systems (modifying a single variable at a time); however it is exhaustively applied to find the maximum action. We set the RL parameters as follows: α=0.00001, λ=0.9, γ=0.9. • GLUE: in order to compare with a well-known system on the this dataset, we choose GLUE [24]. In these experiments contrastive divergence and SampleRank were run for 10,000 samples each , while reinforcement learning was run for twenty episodes and 200 steps per episode. CD1 and SampleRank were run for more steps to compensate for only observing a single action at each step (recall RL computes the action with the maximum value at each step by observing a large number of samples). 4.3 Results In Table 1 we compare F1 (pairwise-matching) scores of the various systems on the course catalog and company profile datasets. We also compare to the well known system, GLUE [24]. SampleRank (MH-SR), contrastive divergence (MH-CD1) and reinforcement learning (RL) underwent ten training episodes initialized from random configurations; during MAP inference we initialized the systems to the state predicted by greedy agglomerative clustering. Both SampleRank and reinforcement learning were able to achieve higher scores than greedy; however, reinforcement learning outperformed all systems with an error reduction of 75.3% over contrastive divergence, 28% over SampleRank, 71% over GLUE and 48% over the previous state of the art (greedy agglomerative inference on a conditional random field). Reinforcement learning also reduces error over each system on the company profile dataset. After observing the improvements obtained by reinforcement learning, we wished to test how robust the method was at recovering from the local optima problem described in the introduction. To gain more insight, we designed a separate experiment to compare Metropolis-Hastings inference (trained with SampleRank) and reinforcement learning more carefully. In the second experiment we evaluate our approach under more difficult conditions. In particular, the MAP inference procedures are initialized to random clusterings (in regions riddled with the type of local optima discussed in the introduction). We then compare greedy MAP inference on a model whose parameters were learned with RL, to Metropolis-Hastings on a model with parameters learned from SampleRank. More specifically, we generate a set of ten random configurations from the test corpus and run both algorithms, averaging the results over the ten runs. The first two rows of Table 2 summarizes this experiment. Even though reinforcement learning’s policy requires it to be greedy with respect to the q-function, we observe that it is able to better escape the random initial configuration than the Metropolis-Hastings method. This is demonstrated in the first rows of Table 2. Although both systems perform worse than under these conditions than those of the previous experiment, reinforcement learning does much better in this situation, indicating that the q-function learned is fairly robust and capable of generalizing to random regions of the space. After observing Metropolis-Hasting’s tendency to get stuck in regions of lower score than reinforcement learning, we test RL to see if it would fall victim to these same optima. In the last two rows of Table 2 we record the results of re-running both reinforcement learning and Metropolis-Hastings (on the SampleRank model) from the configurations Metropolis-Hastings became stuck. We notice that RL is able to climb out of these optima and achieve a score comparable to our first experiment. 7 MH is also able to progress out of the optima, demonstrating that the stochastic method is capable of escaping optima, but perhaps not as quickly on this particular problem. F1 Precision Recall RL on random 86.4 87.2 85.6 MH-SR on random 81.1 82.9 79.3 RL on MH-SR 93.0 94.6 91.5 MH-SR on MH-SR 84.3 87.3 81.5 Table 2: Average pairwise-matching precision, recall and F1 over ten random initialization points, and on the output of MH-SR after 10,000 inference steps. 5 Related Work The expanded version of this work is our technical report [17], which provides additional detail and motivation. Our approach is similar in spirit to Zhang and Dietterich who propose a reinforcement learning framework for solving combinatorial optimization problems [25]. Similar to this approach, we also rely on generalization techniques in RL in order to directly approximate a policy over unseen test domains. However, our formulation provides a framework that explicitly targets the MAP problem in large factor graphs and takes advantage of the log-linear representation of such models in order to employ a well studied class of generalization techniques in RL known as linear function approximation. Learning generalizable function approximators has been also studied for efficiently guiding standard search algorithms through experience [26]. There are a number of approaches for learning parameters that specifically target the problem of MAP inference. For example, the frameworks of LASO [27] and SEARN [28]) formulate MAP in the context of search optimization, where a cost function is learned to score partial (incomplete) configurations that lead to a goal state. In this framework, actions incrementally construct a solution, rather than explore the solution space itself. As shown in [28] these frameworks have connections to learning policies in reinforcement learning. However, the policies are learned over incomplete configurations. In contrast, we formulate parameter learning in factor graphs as an MDP over the space of complete configurations from which a variety of RL methods can be used to set the parameters. Another approach that targets the problem of MAP inference is SampleRank [11, 23], which computes atomic gradient updates from jumps in the local search space. This method has the advantage of learning over the space of complete configurations, but ignores the issue of delayed reward. 6 Conclusions and Future Work We proposed an approach for solving the MAP inference problem in large factor graphs by using reinforcement learning to train model parameters. RL allows us to evaluate jumps in the configuration space based on a value function that optimizes the long term improvement in model scores. Hence – unlike most search optimization approaches – the system is able to move out of local optima while aiming for the MAP configuration. Benefitting from log linear nature of factor graphs such as CRFs we are also able to employ well studied RL linear function approximation techniques for learning generalizable value functions that are able to provide value estimates on the test set. Our experiments over a real world domain shows impressive error reduction when compared to the other approaches. Future work should investigate additional RL paradigms for training models such as actor-critic. Acknowledgments This work was supported in part by the CIIR; SRI #27-001338 and ARFL #FA8750-09-C-0181, CIA, NSA and NSF #IIS-0326249; Army #W911NF-07-1-0216 and UPenn subaward #103-548106; and UPenn NSF #IS-0803847. Any opinions, findings and conclusions or recommendations expressed in this material are the authors’ and do not necessarily reflect those of the sponsor. 8 References [1] Andrew McCallum, Dayne Freitag, and Fernando Pereira. Maximum entropy markov models for information extraction and segmentation. In International Conference on Machine Learning (ICML), 2000. [2] John D. Lafferty, Andrew McCallum, and Fernando Pereira. Conditional random fields: Probabilistic models for segmenting and labeling sequence data. In Int Conf on Machine Learning (ICML), 2001. [3] Ben Taskar, Carlos Guestrin, and Daphne Koller. Max-margin markov networks. In NIPS, 2003. [4] Ryan McDonald and Fernando Pereira. Online learning of approximate dependency parsing algorithms. In European Chapter of the Association for Computational Linguistics (EACL), pages 81–88, 2006. [5] Matthew Richardson and Pedro Domingos. Markov logic networks. Machine Learning, 62, 2006. [6] Brian Milch, Bhaskara Marthi, and Stuart Russell. BLOG: Relational Modeling with Unknown Objects. PhD thesis, University of California, Berkeley, 2006. [7] Andrew McCallum, Khashayar Rohanimanesh, Michael Wick, Karl Schultz, and Sameer Singh. Factorie: Efficient probabilistic programming via imperative declarations of structure, inference and learning. In Neural Information Processing Systems(NIPS) Workshop on Probabilistic Programming, Vancouver, BC, Canda, 2008. [8] Aria Haghighi and Dan Klein. Unsupervised coreference resolution in a nonparametric bayesian model. In Association for Computational Linguistics (ACL), 2007. [9] Hanna Pasula, Bhaskara Marthi, Brian Milch, Stuart Russell, and Ilya Shpitser. Identity uncertainty and citation matching. In Advances in Neural Information Processing Systems 15. MIT Press, 2003. [10] Sonia Jain and Radford M. Neal. A split-merge markov chain monte carlo procedure for the dirichlet process mixture model. Journal of Computational and Graphical Statistics, 13:158–182, 2004. [11] Aron Culotta. Learning and inference in weighted logic with application to natural language processing. PhD thesis, University of Massachusetts, May 2008. [12] Richard S. Sutton and Andrew G. Barto. Reinforcement Learning: An Introduction. The MIT Press, March 1998. [13] Richard S. Sutton. Learning to predict by the methods of temporal differences. Machine Learning, pages 9–44, 1988. [14] Robert H. Crites and Andrew G. Barto. Improving elevator performance using reinforcement learning. In Advances in Neural Information Processing Systems 8, pages 1017–1023. MIT Press, 1996. [15] Wei Zhang and Thomas G. Dietterich. Solving combinatorial optimization tasks by reinforcement learning: A general methodology applied to resource-constrained scheduling. Journal of Artificial Intelligence Reseach, 1, 2000. [16] Gerald Tesauro. Temporal difference learning and td-gammon. Commun. ACM, 38(3):58–68, 1995. [17] Khashayar Rohanimanesh, Michael Wick, Sameer Singh, and Andrew McCallum. Reinforcement learning for map inference in large factor graphs. Technical Report #UM-CS-2008-040, University of Massachusetts, Amherst, 2008. [18] Christopher J. Watkins. Learning from Delayed Rewards. PhD thesis, Kings College, Cambridge, 1989. [19] Christopher J. Watkins and Peter Dayan. Q-learning. Machine Learning, 8(3):279–292, May 1992. [20] Andrew McCallum and Charles Sutton. Piecewise training with parameter independence diagrams: Comparing globally- and locallytrained linear-chain CRFs. In NIPS Workshop on Learning with Structured Outputs, 2004. [21] Geoffrey E. Hinton. Training products of experts by minimizing contrastive divergence. Neural Computation, 14(8):1771–1800, 2002. [22] Culotta. First. In International Joint Conference on Artificial Intelligence, 2007. [23] Khashayar Rohanimanesh, Michael Wick, and Andrew McCallum. Inference and learning in large factor graphs with adaptive proposal distributions. Technical Report #UM-CS-2009-028, University of Massachusetts, Amherst, 2009. [24] AnHai Doan, Jayant Madhavan, Pedro Domingos, and Alon Y. Halevy. Learning to map between ontologies on the semantic web. In WWW, page 662, 2002. [25] Wei Zhang and Thomas G. Dietterich. A reinforcement learning approach to job-shop scheduling. In International Joint Conference on Artificial Intelligence (IJCAI), pages 1114–1120, 1995. [26] Justin Boyan and Andrew W. Moore. Learning evaluation functions to improve optimization by local search. J. Mach. Learn. Res., 1:77–112, 2001. [27] Hal Daum´e III and Daniel Marcu. Learning as search optimization: approximate large margin methods for structured prediction. In International Conference on Machine learning (ICML), 2005. [28] Hal Daum´e III, John Langford, and Daniel Marcu. Search-based structured prediction. Machine Learning, 2009. 9
2009
223
3,730
Learning a Small Mixture of Trees∗ M. Pawan Kumar Computer Science Department Stanford University pawan@cs.stanford.edu Daphne Koller Computer Science Department Stanford University koller@cs.stanford.edu Abstract The problem of approximating a given probability distribution using a simpler distribution plays an important role in several areas of machine learning, for example variational inference and classification. Within this context, we consider the task of learning a mixture of tree distributions. Although mixtures of trees can be learned by minimizing the KL-divergence using an EM algorithm, its success depends heavily on the initialization. We propose an efficient strategy for obtaining a good initial set of trees that attempts to cover the entire observed distribution by minimizing the α-divergence with α = ∞. We formulate the problem using the fractional covering framework and present a convergent sequential algorithm that only relies on solving a convex program at each iteration. Compared to previous methods, our approach results in a significantly smaller mixture of trees that provides similar or better accuracies. We demonstrate the usefulness of our approach by learning pictorial structures for face recognition. 1 Introduction Probabilistic models provide a powerful and intuitive framework for formulating several problems in machine learning and its application areas, such as computer vision and computational biology. A critical choice to be made when using a probabilistic model is its complexity. For example, consider a system that involves n random variables. A probabilistic model that defines a clique of size n has the ability to model any distribution over these random variables. However, the task of learning and inference on such a model becomes computationally intractable. The other extreme case is to define a tree structured model that allows for efficient learning [3] and inference [23]. However, tree distributions have a restrictive form. Hence, they are not suitable for all applications. A natural way to alleviate the deficiencies of tree distributions is to use a mixture of trees [21]. Mixtures of trees can be employed as accurate models for several interesting problems such as pose estimation [11] and recognition [5, 12]. In order to facilitate their use, we consider the problem of learning them by approximating an observed distribution. Note that the mixture can be learned by minimizing the Kullback-Leibler (KL) divergence with respect to the observed distribution using an expectation-maximization (EM) algorithm [21]. However, there are two main drawbacks of this approach: (i) minimization of KL divergence mostly tries to explain the dominant mode of the observed distribution [22], that is it does not explain the entire distribution; and (ii) as the EM algorithm is prone to local minima, its success depends heavily on the initialization. An intuitive solution to both these problems is to obtain an initial set of trees that covers as much of the observed distribution as possible. To this end, we pose the learning problem as that of obtaining a set of trees that minimize a suitable α-divergence [25]. The α-divergence measures are a family of functions over two probability distributions that measure the information gain contained in them: that is, given the first distribution, how much information is obtained by observing the second distribution. They form a complete family of measures, in that no other function satisfies all the postulates of information gain [25]. When used as an objective ∗This work was supported by DARPA SA4996-10929-4 and the Boeing company. 1 function to approximate an observed distribution, the value of α plays a significant role. For example, when α = 1 we obtain the KL divergence. As the value of α keeps increasing, the divergence measure becomes more and more inclusive [8], that is it tries to cover as much of the observed distribution as possible [22]. Hence, a natural choice for our task of obtaining a good initial estimate would be to set α = ∞. We formulate the minimization of α-divergence with α = ∞within the fractional covering framework [24]. However, the standard iterative algorithm for solving fractional covering is not readily applicable to our problem due to its small stepsize. In order to overcome this deficiency we adapt this approach specifically for the task of learning mixtures of trees. Each iteration of our approach adds one tree to the mixture and only requires solving a convex optimization problem. In practice, our strategy converges within a small number of iterations thereby resulting in a small mixture of trees. We demonstrate the effectiveness of our approach by providing a comparison with state of the art methods and learning pictorial structures [6] for face recognition. 2 Related Work The mixture of trees model was introduced by Meila and Jordan [21] who highlighted its appeal by providing simple inference and sampling algorithms. They also described an EM algorithm that learned a mixture of trees by minimizing the KL divergence. However, the accuracy of the EM algorithm is highly dependent on the initial estimate of the mixture. This is evident in the fact that their experiments required a large mixture of trees to explain the observed distribution, due to random initialization. Several works have attempted to obtain a good set of trees by devising algorithms for minimizing the KL divergence [8, 13, 19, 26]. In contrast, our method uses α = ∞, thereby providing a set of trees that covers the entire observed distribution. It has been shown that mixture of trees admit a decomposable prior [20]. In other words, one can concisely specify a certain prior probability for each of the exponential number of tree structures for a given set of random variables. Kirschner and Smyth [14] have also proposed a method to handle a countably infinite mixture of trees. However, the complexity of both learning and inference in these models restricts their practical use. Researchers have also considered mixtures of trees in the log-probability space. Unlike a mixture in the probability space considered in this paper (which contains a hidden variable), mixtures of trees in log-probability space still define pairwise Markov networks. Such mixtures of trees have been used to obtain upper bounds on the log partition function [27]. However, in this case, the mixture is obtained by considering subgraphs of a given graphical model instead of minimizing a divergence measure with respect to the observed data. Finally, we note that semi-metric distance functions can be approximated to a mixture of tree metrics using the fractional packing framework [24]. This allows us to approximate semi-metric probabilistic models to a simpler mixture of (not necessarily tree) models whose pairwise potentials are defined by tree metrics [15, 17]. 3 Preliminaries Tree Distribution. Consider a set of n random variables V = {v1, · · · , vn}, where each variable va can take a value xa ∈Xa. We represent a labeling of the random variables (i.e. a particular assignment of values) as a vector x = {xa|a = 1, · · · , n}. A tree structured model defined over the random variables V is a graph whose nodes correspond to the random variables and whose edges E define a tree. Such a model assigns a probability to each labeling that can be written as Pr(x|θT ) = 1 Z(θT ) Q (va,vb)∈E θT ab(xa, xb) Q va∈V θTa (xa)deg(a)−1 . (1) Here θT a (·) refers to unary potentials whose values depend on one variable at a time, and θT ab(·, ·) refers to pairwise potentials whose values depend on two neighboring variables at a time. The vector θT is the parameter of the model (which consists of all the potentials) and Z(θT ) is the partition function which ensures that the probability sums to one. The term deg(a) denotes the degree of the variable va. Mixture of Trees. As the name suggests, a mixture of trees is defined by a set of trees along with a probability distribution over them, that is θM = {(θT , ρT )} such that mixture coefficients ρT > 0 for all T and P T ρT = 1. It defines the probability of a given labeling as Pr(x|θM) = X T ρT Pr(x|θT ). (2) 2 α-Divergence. The α-divergence between distributions Pr(·|θ1) (say the observed distribution) and Pr(·|θ2) (the simpler distribution) is given by Dα(θ1||θ2) = 1 α −1 log X x Pr(x|θ1)α Pr(x|θ2)α−1 ! . (3) The α-divergence measure is strictly non-negative and is equal to 0 if and only if θ1 is a reparameterization of θ2. It is a generalization of KL divergence which corresponds to α = 1, that is D1(θ1||θ2) = X x Pr(x|θ1) log Pr(x|θ1) Pr(x|θ2). (4) As mentioned earlier, we are interested in the case where α = ∞, that is D∞(θ1||θ2) = max x log Pr(x|θ1) Pr(x|θ2). (5) The inclusive property of α = ∞is evident from the above formula. Since we would like to minimize the maximum ratio of probabilities (i.e. the worst case), we need to ensure that no value of Pr(x|θ2) is very small, that is the entire distribution is covered. In contrast, the KL divergence can admit very small values of Pr(x|θ2) since it is concerned with the summation shown in equation (4) (and not the worst case). To avoid confusion, we shall refer to the case where α = 1 as KL divergence and the α = ∞case as α-divergence throughout this paper. The Learning Problem. Given a set of samples {xi, i = 1, · · · , m} along with their probabilities ˆP(xi), our task is to learn a mixture of trees θM∗such that θM∗= arg min θ M max i log ˆP(xi) Pr(xi|θM) ! = arg max θ M min i Pr(xi|θM) ˆP(xi) ! . (6) We will concentrate on the second form in the above equation (where the logarithm has been dropped). We define T = {θTj} to be the set of all t tree distributions that are defined over n variables. It follows that the probability of a labeling for any mixture of trees can be written as Pr(x|θM) = X j ρj Pr(x|θTj), (7) for suitable values of ρj. Note that the mixing coefficients ρ should define a valid probability distribution. In other words, ρ belongs to the polytope P defined as ρ ∈P ⇒ X j ρj = 1, ρj ≥0, ∀j = 1, · · · , t. (8) Our task is to find a sparse vector ρ that minimizes the α-divergence with respect to the observed distribution. In order to formally specify the minimization of α-divergence as an optimization problem, we define an m × t matrix A and an m × 1 vector b such that A(i, j) = Pr(xi|θTj) and bi = ˆP(xi). (9) We denote the ith row of A as ai and the ith element of b as bi. Using the above notation, the learning problem can be specified as max ρ λρ, s.t. aiρ ≥λρbi, ∀i ρ ∈P, (10) where λρ = mini aiρ/bi due to the form of the above LP. The above formulation suggests that a natural way to attack the problem would be to use the fractional covering framework [24]. We begin by briefly describing fractional covering in the next section. 3 4 Fractional Covering Given an m×t matrix A and an m×1 vector b > 0, the fractional covering problem is to determine whether there exists a vector ρ ∈P such that Aρ ≥b. The only restriction on the polytope P is that Aρ ≥0 for all ρ ∈P, which is clearly satisfied by our learning problem (since aiρ is the probability of xi specified by the mixture of trees corresponding to ρ). Let λ∗= max ρ min i aiρ bi . (11) If λ∗< 1 then clearly there does not exist a ρ such that Aρ ≥b. However, if λ∗≥1, then the fractional covering problem requires us to find an ǫ-optimal solution, that is find a ρ such that Aρ ≥(1 −ǫ)λ∗b, (12) where ǫ > 0 is a user-specified tolerance factor. Using the definitions of A, b and ρ from the previous section, we observe that in our case λ∗= 1. In other words, there exists a solution such that Aρ = b. This can easily be seen by considering a tree with parameter θTj such that Pr(xi|θTj) =  1 if i = j, 0 otherwise, (13) and setting ρj = ˆP(xj). The above solution provides an α-divergence of 0 but at the cost of introducing m trees in the mixture (where m is the number of samples provided). We would like to find an ǫ-optimal solution with a smaller number of trees by solving the LP (10). However, we cannot employ standard interior point algorithms for optimizing problem (10). This is due to the fact that each of its m constraints is defined over an infinite number of unknowns (specifically, the mixture coefficients for each of the infinite number of tree distributions defined over the n random variables). Fortunately, Plotkin et al. [24] provide an iterative algorithm for solving problem (10) that can handle arbitrarily large number of unknowns in every constraint. The Fractional Covering Algorithm. In order to obtain a solution to problem (10), we solve the following related problem: min ρ∈P Φ(y) ≡y⊤b, s.t. yi = 1 bi exp  −β aiρ bi  . (14) The objective function Φ(y) is called the potential function for fractional covering. Plotkin et al. [24] showed that minimizing Φ(y) solves the original fractional covering problem. The term β is a parameter that is inversely proportional to the stepsize σ of the algorithm. The fractional covering algorithm is an iterative strategy. At iteration t, the variable ρt is updated as ρt ←(1−σ)ρt−1+σρ′ such that the update attempts to decrease the potential function. Specifically, the algorithm proposed in [24] suggests using the first order approximation of Φ(y), that is ρ′ = arg min ρ X i y′ i(bi −βσaiρ) ! = arg max ρ y′⊤Aρ. (15) where y′ i = 1 bi exp  −β (1 −σ)aiρ bi  . (16) Typically, the above problem is easy to solve (including for our case, as will be seen in the next section). Furthermore, for a sufficiently large value of β (∝log m) the above update rule decreases Φ(y). In more detail, the algorithm of [24] is as follows: • Define w = maxρ maxi aiρ/bi to be the width of the problem. • Start with an initial solution ρ0. • Define λρ0 = mini aiρ0/bi, and σ = ǫ/(4βw). • While λρ < 2λρ0, at iteration t: – Define y′ as shown in equation (16). – Find ρ′ = arg maxρ∈P y′⊤Aρ. – Update ρt ←(1 −σ)ρt−1 + σρ∗. 4 Plotkin et al. [24] suggest starting with a tolerance factor of ǫ0 = 1/6 and dividing the value of ǫ0 by 2 after every call to the above procedure terminates. This process is continued until a sufficiently accurate (i.e. an ǫ-optimal) solution is recovered. Note that during each call to the above procedure the potential function Φ(y) is both upper and lower bounded, specifically exp(−2βλρ0) ≤Φ(y) ≤m exp(−βλρ0). (17) Furthermore, we are guaranteed to decrease the value of Φ(y) at each iteration. Hence, it follows that the above algorithm will converge. We refer the reader to [24] for more details. 5 Modifying Fractional Covering The above algorithm provides an elegant way to solve the general fractional covering problem. However, as will be seen shortly, in our case it leads to undesirable solutions. Nevertheless, we show that appropriate modifications can be made to obtain a small and accurate mixture of trees. We begin by identify the deficiencies of the fractional covering algorithm for our learning problem. 5.1 Drawbacks of the Algorithm There are two main drawbacks of fractional covering. First, the value of β is typically very large, which results in a small stepsize σ. In our experiments, β was of the order of 103, which resulted in slow convergence of the algorithm. Second, the update step provides singleton trees, that is trees with a probability of 1 for one labeling and 0 for all others. This is due to the fact that, in our case, the update step solves the following problem: max ρ∈P X j X i y′ iρj Pr(xi|θTj) ! . (18) Note that the above problem is an LP in ρ. Hence, there must exist an optimal solution on the vertex on the polytope P. In other words, we obtain a single tree distribution θT ∗such that θT ∗= arg max θ T X i y′ i Pr(xi|θT ) ! . (19) The optimal tree distribution for the above problem concentrates the entire mass on the sample xi′ where i′ = arg maxi y′ i. Such singleton trees are not desirable as they also result in slow convergenceof the algorithm. Furthermore, the learned mixture only provides a non-zero probability for the samples used during training. Hence, the mixture cannot be used for previously unseen samples, thereby rendering it practically useless. Note that the method of Rosset and Segal [26] also faces a similar problem during their update steps for minimizing the KL divergence. In order to overcome this difficulty, they suggest approximating problem (18) by θT ∗= arg max θ T X i y′ i log  Pr(xi|θT )  , (20) which can be solved efficiently using the Chow-Liu algorithm [3]. However, our preliminary experiments (accuracies not reported) indicate that this approach does not work well for minimizing the potential function Φ(y). 5.2 Fixing the Drawbacks We adapt the original fractional covering algorithm for our problem in order to overcome the drawbacks mentioned above. The first drawback is handled easily. We start with a small value of β and increase it by a factor of 2 if we are not able to reduce the potential function Φ(y) at a given iteration. Since we are assured that the value of Φ(y) decreases for a finite value of β, this procedure is guaranteed to terminate. In our experiments, we initialized β = 1/w and its value never exceeded 32/w. Note that choosing β to be inversely proportional to w ensures that the initial values of y′ i in equation (16) are sufficiently large (at least exp(−(1 −σ))). In order to address the second drawback, we note that our aim at an iteration t of the algorithm is to reduce the potential function Φ(y). That is, given the current distribution parameterized by θMt we would like to add a new tree θTt to the mixture that solves the following problem: θTt = arg min θ T " Φ(y) ≡ X i y′ i exp −β σ Pr(xi|θT ) ˆP(xi) !# (21) 5 s.t. X i Pr(xi|θT ) ≤1, Pr(xi|θT ) ≥0, ∀i = 1, · · · , m, (22) θT ∈T . (23) Here, T is the set of all tree distributions defined over n random variables. Note that the algorithm of [24] optimizes the first order approximation of the objective function (21). However, as seen previously, for our problem this results in an undesirable solution. Instead, we directly optimize Φ(y) using an alternative two step strategy. In the first step, we drop the last constraint from the above problem. In other words, we obtain the values of Pr(xi|θT ) that form a valid (but not necessarily tree-structured) distribution and minimize the function Φ(y). Note that since the Φ(y) is not linear in Pr(xi|θT ), the optimal solution provides a dense distribution Pr(·|θT ) (as opposed to the first order linear approximation which provides a singleton distribution). In the second step, we project these values to a tree distribution. It is easy to see that dropping constraint (23) results in a convex relaxation of the original problem. We solve the convex relaxation using a log-barrier method [1]. Briefly, this implies solving a series of unconstrained optimization problems until we are within a user-specified tolerance value of τ from the optimal solution. Specifically, • Set f = 1. • Solve minPr(·|θ T )  fΦ(y) −P i log(Pr(xi|θT )) −log(1 −P i Pr(xi|θT ))  . • If m/f ≤τ, then stop. Otherwise, update f = µf and repeat the previous step. We used µ = 1.5 in all our experiments, which was sufficient to obtain accurate solutions for the convex relaxation. At each iteration, the unconstrained optimization problem is solved using Newton’s method. Recall that Newton’s method minimizes a function g(z) by updating the current solution as g(z) ←g(z) − ∇2g(z) −1 ∇g(z), (24) where ∇2g(·) denotes the Hessian matrix and ∇g(·) denotes the gradient vector. Note that the most expensive step in the above approach is the inversion of the Hessian matrix. However, it is easy to verify that in our case all the off-diagonal elements of the Hessian are equal to each other. By taking advantage of this special form of the Hessian, we compute its inverse in O(m2) time using Gaussian elimination (i.e. linear in the number of elements of the Hessian). Once the values of Pr(xi|θT ) are computed in this manner, they are projected to a tree distribution using the Chow-Liu algorithm [3]. Note that after the projection step we are no longer guaranteed to decrease the function Φ(y). This would imply that the overall algorithm would not be guaranteed to converge. In order to overcome this problem, if we are unable to decrease Φ(y) then we determine the sample xi′ such that i′ = arg max i Pr(xi|θMt) ˆP(xi) , (25) that is the sample best explained by the current mixture. We enforce Pr(xi′|θT ) = 0 and solve the above convex relaxation again. Note that the solution to the new convex relaxation (i.e. the one with the newly introduced constraint for sample xi′) can easily be obtained from the solution of the previous convex relaxation using the following update: Pr(xi|θT ) ←  Pr(xi|θT ) + ˆP(xi) Pr(xi′|θT )/s if i ̸= i′, 0 otherwise, (26) where s = P i ˆP(xi). In other words, we do not need to use the log-barrier method to solve the new convex relaxation. We then project the updated values of Pr(xi|θT ) to a tree distribution. This process of eliminating one sample and projecting to a tree is repeated until we are able to reduce the value of Φ(y). Note that in the worst case we will eliminate all but one sample (specifically, the one that corresponds to the update scheme of [24]). In other words, we will add a singleton tree. However, in practice our algorithm converges in a small number (≪m) of iterations and provides an accurate mixture of trees. In fact, in all our experiments we never obtained any singleton trees. We conclude the description of our method by noting that once the new tree distribution θTt is obtained, the value of σ is easily updated as σ = arg minσ Φ(y). 6 Experiments We present a comparison of our method with the state of the art algorithms. We also use it to learn pictorial structures for face recognition. Note that our method is efficient in practice due to the 6 Dataset TANB MF Tree MT [26] + MT Our + MT Agaricus 100.0 ± 0 99.45 ± 0.004 98.65 ± 0.32 99.98 ± 0.04 100.0 ± 0 100.0 ± 0 Nursery 93.0 ± 0 98.0 ± 0.01 92.17 ± 0.38 99.2 ± 0.02 98.35 ± 0.30 99.28 ± 0.13 Splice 94.9 ± 0.9 95.7 ± 0.2 95.5 ± 0.3 95.6 ± 0.42 96.1 ± 0.15 Table 1: Classification accuracies for the datasets used in [21]. The first column shows the name of the dataset. The subsequent columns show the mean accuracies and the standard deviation over 5 trials of tree-augmented naive Bayes [10], mixture of factorial distributions [2], single tree classifier [3], mixture of trees with random initialization (i.e. the numbers reported in [21]), initialization with [26] and initialization with our approach. Note that our method provides similar accuracies to [21] while using a smaller mixture of trees (see text). special form of the Hessian matrix (for the log-barrier method) and the Chow-Liu algorithm [3, 21] (for the projection to tree distributions). In all our experiments, each iteration takes only 5 to 10 minutes (and the number of iterations is equal to the number of trees in the mixture). Comparison with Previous Work. As mentioned earlier, our approach can be used to obtain a good initialization for the EM algorithm of [21] since it minimizes α-divergence (providing complementary information to the KL-divergence used in [21]). This is in contrast to the random initializations used in the experiments of [21] or the initialization obtained by [26] (that also attempts to minimize the KL-divergence). We consider the task of using the mixture of trees as a classifier, that is given training data that consists of feature vectors xi together with the class values ci, the task is to correctly classify previously unseen test feature vectors. Following the protocol of [21], this can be achieved in two ways. For the first type of classifier, we append the feature vector xi with its class value ci to obtain a new feature vector x′ i. We then learn a mixture of tree that predicts the probability of x′ i. Given a new feature vector x we assign it the class c that results in the highest probability. For the second type of classifier, we learn a mixture of trees for each class value such that it predicts the probability of a feature vector belonging to that particular class. Once again, given a new feature vector x we assign it the class c which results in the probability. We tested our approach on the three discrete valued datasets used in [21]. In all our experiments, we initialized the mixture with a single tree obtained from the Chow-Liu algorithm. We closely followed the experimental setup of [21] to ensure that the comparisons are fair. Table 1 provides the accuracy of our approach together with the results reported in [21]. For ‘Splice’ the first classifier provides the best results, while ‘Agaricus’ and ‘Nursery’ use the second classifier. Note that our method provides similar accuracies to [21]. More importantly, it uses a smaller mixture of trees to achieve these results. Specifically, the method of [21] uses 12, 30 and 3 trees for the three datasets respectively. In contrast our method uses 3-5 trees for ‘Agaricus’, 10-15 trees for ‘Nursery’ and 2 trees for Splice (where the number of trees in the mixture was obtained using a validation dataset, see [21] for details). Furthermore, unlike [21, 26], we obtain better accuracies by using a mixture of trees instead of a single tree for the ‘Splice’ dataset. It is worth noting that [26] also provided a small set of initial trees (with comparable size to our method). However, since the trees do not cover the entire observed distribution, their method provides less accurate results. Face Recognition. We tested our approach on the task of recognizing faces using the publicly available dataset1 containing the faces of 11 characters in an episode of ‘Buffy the Vampire Slayer’. The total number of faces in the dataset is 24,244. For each face we are provided with the location of 13 facial features (see Fig. 1). Furthermore, for each facial feature, we are also provided with a vector that represents the appearance of that facial feature [5] (using the normalized grayscale values present in a circular region of radius 7 centered at the facial feature). As noted in previous work [5, 18] the task is challenging due to large intra-class variations in expression and lighting conditions. Given the appearance vector, the likelihood of each facial feature belonging to a particular character can be found using logistic regression. However, the relative locations of the facial features also offer important cues in distinguishing one character from the other (e.g. the width of the eyes or the distance between an eye and the nose). Typically, in vision systems, this information is not used. In other words, the so-called bag of visual words model is employed. This is due to the somewhat counter-intuitive observation made by several researchers that models that employ spatial prior on the features, e.g. pictorial structures [6], often provide worse recognition accuracies than those that throw away this information. However, this may be due to the fact that often the structure and parameters of pictorial structures and other related models are set by hand. 1Available at http://www.robots.ox.ac.uk/˜vgg/research/nface/data.html 7 Figure 1: The structure of the seven trees learned for 3 of the 11 characters using our method. The red squares show the position of the facial features while the blue lines indicate the edges. The structure and parameters of the trees vary significantly, thereby indicating the multimodality of the observed distribution. 0 1 2 3 4 5 6 7 [26] 65.68% 66.05% 66.01% 66.01% 66.08% 66.08% 66.16% 66.20% Our 65.68% 66.05% 66.65% 66.86% 67.25% 67.48% 67.50% 67.68% Table 2: Accuracy for the face recognition experiments. The columns indicate the size of the mixture, ranging from 0 (i.e. the bag of visual words model) to 7 (where the results saturate). Note that our approach, which minimizes the α-divergence, provides better results than the method of [26], which minimizes KL-divergence. In order to test whether a spatial model can help improve recognition, we learned a mixture of trees for each of the characters. The random variables of the trees correspond to the facial features and their values correspond to the relative location of the facial feature with respect to the center of the nose. The unary potentials of each random variable is specified using the appearance vectors (i.e. the likelihood obtained by logistic regression). In order to obtain the pairwise potentials (i.e. the structure and parameters of the mixture of trees), the faces are normalized to remove global scaling and in-plane rotation using the location of the facial features. We use the faces found in the first 80% of the episode to learn the mixture of trees. The faces found in the remaining 20% of the episode were used as test data. Splitting the dataset in this manner (i.e. a non-random split) ensures that we do not have any trivial cases where a face found in frame t is used for training and a (very similar) face found in frame t + 1 is used for testing. Fig. 1 shows the structure of the trees learned for 3 characters. The structures differ significantly between characters, which indicates that different spatial priors are dominant for different characters. Although the structure of the trees for a particular character are similar, they vary considerably in the parameters. This suggests that the distribution is in fact multimodal and therefore cannot be represented accurately using a single tree. Although vision researchers have tried to overcome this problem by using more complex models, e.g. see [4], their use is limited by a lack of efficient learning algorithms. Table 2 shows the accuracy of the mixture of trees learned by the method of [26] and our approach. In this experiment, refining the mixture of trees using the EM algorithm of [21] did not improve the results. This is due to the fact that the training and testing data differ significantly (due to non-random splits, unlike the previous experiments which used random splits of the UCI datasets). In fact, when we split the face dataset randomly, we found that the EM algorithm did help. However, classification problems simulated using random splits of video frames are rare in real-world applications. Since [26] tries to minimize the KL divergence, it mostly tries to explain the dominant mode of the observed distribution. This is evident in the fact that the accuracy of the mixture of trees does not increase significantly as the size of the mixture increases (see table 2, first row). In contrast, the minimization of α-divergence provides a diverse set of trees that attempt to explain the entire distribution thereby providing significantly better results (table 2, second row). 7 Discussion We formulated the problem of obtaining a small mixture of trees by minimizing the α-divergence within the fractional covering framework. Our experiments indicate that the suitably modified fractional covering algorithm provides accurate models. We believe that our approach offers a natural framework for addressing the problem of minimizing α-divergence and could prove useful for other classes of mixture models, for example mixtures of trees in log-probability space for which there exist several efficient and accurate inference algorithms [16, 27]. There also appears to be a connection between fractional covering (proposed in the theory community) and Discrete AdaBoost [7, 9] (proposed in the machine learning community) that merits further exploration. 8 References [1] S. Boyd and L. Vandenberghe. Convex Optimization. Cambridge University Press, 2004. [2] P. Cheeseman and J. Stutz. Bayesian classification (AutoClass): Theory and results. In KDD, pages 153–180, 1995. [3] C. Chow and C. Liu. Approximating discrete probability distributions with dependence trees. IEEE Transactions on Information Theory, 14(3):462–467, 1968. [4] D. Crandall, P. Felzenszwalb, and D. Huttenlocher. Spatial priors for parts-based recognition using statistical models. In CVPR, 2005. [5] M. Everingham, J. Sivic, and A. Zisserman. Hello! My name is... Buffy - Automatic naming of characters in TV video. In BMVC, 2006. [6] M. Fischler and R. Elschlager. The representation and matching of pictorial structures. TC, 22:67–92, January 1973. [7] 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. [8] B. Frey, R. Patrascu, T. Jaakkola, and J. Moran. Sequentially fitting inclusive trees for inference in noisy-OR networks. In NIPS, 2000. [9] J. Friedman, T. Hastie, and R. Tibshirani. Additive logistic regression: A statistical view of boosting. Annals of Statistics, 28(2):337–407, 2000. [10] N. Friedman, D. Geiger, and M. Goldszmidt. Bayesian network classifiers. Machine Learning, 29:131–163, 1997. [11] S. Ioffe and D. Forsyth. Human tracking with mixtures of trees. In ICCV, pages 690–695, 2001. [12] S. Ioffe and D. Forsyth. Mixtures of trees for object recognition. In CVPR, pages 180–185, 2001. [13] Y. Jing, V. Pavlovic, and J. Rehg. Boosted bayesian network classifiers. Machine Learning, 73(2):155–184, 2008. [14] S. Kirschner and P. Smyth. Infinite mixture of trees. In ICML, pages 417–423, 2007. [15] J. Kleinberg and E. Tardos. Approximation algorithms for classification problems with pairwise relationships: Metric labeling and Markov random fields. In STOC, 1999. [16] V. Kolmogorov. Convergent tree-reweighted message passing for energy minimization. PAMI, 2006. [17] M. P. Kumar and D. Koller. MAP estimation of semi-metric MRFs via hierarchical graph cuts. In UAI, 2009. [18] M. P. Kumar, P. Torr, and A. Zisserman. An invariant large margin nearest neighbour classifier. In ICCV, 2007. [19] Y. Lin, S. Zhu, D. Lee, and B. Taskar. Learning sparse Markov network structure via ensembleof-trees models. In AISTATS, 2009. [20] M. Meila and T. Jaakkola. Tractable Bayesian learning of tree belief networks. In UAI, 2000. [21] M. Meila and M. Jordan. Learning with a mixture of trees. JMLR, 1:1–48, 2000. [22] T. Minka. Divergence measures and message passing. Technical report, Microsoft Research, 2005. [23] J. Pearl. Probabilistic Reasoning in Intelligent Systems: Networks of Plausible Inference. Morgan-Kauffman, 1988. [24] S. Plotkin, D. Shmoys, and E. Tardos. Fast approximation algorithms for fractional packing and covering problems. Mathematics of Operations Research, 20:257–301, 1995. [25] A. Renyi. On measures of information and entropy. In Berkeley Symposium on Mathematics, Statistics and Probability, pages 547–561, 1961. [26] S. Rosset and E. Segal. Boosting density estimation. In NIPS, 2002. [27] M. Wainwright, T. Jaakkola, and A. Willsky. A new class of upper bounds on the log partition function. IEEE Transactions on Information Theory, 51:2313–2335, 2005. 9
2009
224
3,731
An Additive Latent Feature Model for Transparent Object Recognition Mario Fritz UC Berkeley Michael Black Brown University Gary Bradski Willow Garage Sergey Karayev UC Berkeley Trevor Darrell UC Berkeley Abstract Existing methods for visual recognition based on quantized local features can perform poorly when local features exist on transparent surfaces, such as glass or plastic objects. There are characteristic patterns to the local appearance of transparent objects, but they may not be well captured by distances to individual examples or by a local pattern codebook obtained by vector quantization. The appearance of a transparent patch is determined in part by the refraction of a background pattern through a transparent medium: the energy from the background usually dominates the patch appearance. We model transparent local patch appearance using an additive model of latent factors: background factors due to scene content, and factors which capture a local edge energy distribution characteristic of the refraction. We implement our method using a novel LDA-SIFT formulation which performs LDA prior to any vector quantization step; we discover latent topics which are characteristic of particular transparent patches and quantize the SIFT space into transparent visual words according to the latent topic dimensions. No knowledge of the background scene is required at test time; we show examples recognizing transparent glasses in a domestic environment. 1 Introduction Household scenes commonly contain transparent objects such as glasses and bottles made of various materials (like those in Fig. 6). Instance and category recognition of such objects is important for applications including domestic service robotics and image search. Despite the prevalence of transparent objects in human environments, the problem of transparent object recognition has received relatively little attention. We argue that current appearance-based methods for object and category recognition are not appropriate for transparent objects where the appearance can change dramatically depending on the background and illumination conditions. A full physically plausible generative model of transparent objects is currently impractical for recognition tasks. Instead we propose a new latent component representation that allows us to learn transparent visual words that capture locally discriminative visual features on transparent objects. Figure 1 shows an example of a transparent object observed in front of several different background patterns; the local edge energy histogram is shown around a fixed point on the object for each image. While the overall energy pattern is quite distinct, there is a common structure that can be observed across each observation. This structure can be estimated from training examples and detected reliably in test images: we form a local statistical model of transparent patch appearance by estimating a latent local factor model from training data which includes varying background imagery. The varying background provides examples of how the transparent objects refracts light, 1 p(z|P) traditional approach: quantization (k-means) LDA quantization (axis-aligned threshold) bag of words LDA our approach: Figure 1: Left: Images of a transparent object in different environments. A point on the object is highlighted in each image, and the local orientation edge energy map is shown. While the background dominates the local patch, there is a latent structure that is discriminative of the object. Right: Our model finds local transparent structure by applying a latent factor model (e.g., LDA) before a quantization step. In contrast to previous approaches that applied such models to a quantized visual word model, we apply them directly to the SIFT representation, and then quantize the resulting model into descriptors according to the learned topic distribution. an idea has been used as a way of capturing the refractive properties of glass [34] but not, to our knowledge, as a way of training an object recognition system. Specifically, we adopt a hybrid generative-discriminative model in the spirit of [13] in which a generative latent factor model discovers a vocabulary of locally transparent patterns, and a discriminant classifier is applied to the space of these activations to detect a category of interest. Our latent component representation decomposes patch appearance into sub-components based on an additive model of local patch formation; in particular we use the latent Dirichlet allocation (LDA) model in our experiments below. Transparent object recognition is achieved using a simple probabilistic model of likely local object features. A latent topic model is learned over the space of local patches in images of a given object observed with varying backgrounds; clustering in this space yields descriptors that can be used to infer transparent structures in an image at test time without any knowledge of the underlying background pattern or environmental illumination. Each image patch at test time is then labeled with one or more candidate quantized latent structures (topics), which define our transparent visual word identifiers. Currently, the study of transparent object recognition is extremely limited and we believe ours is the first to consider category recognition of transparent objects in natural settings, with varying pose and unconstrained illumination. The paper provides a first exploration of the problem, establishes a baseline, demonstrates feasibility and suggests problems for future work. Our results show that recognition of transparent objects is possible without explicit physically-based refraction and reflection models, using a learning-based additive latent local feature appearance model. 2 Related Work There is an extensive literature of local feature detection and description techniques; here we focus on those related to our transparent object recognition formulation. Existing methods for object category and object instance recognition are generally designed for opaque objects, typically finding characteristic local patches using descriptors based on weighted histograms of local orientation energy [2, 18, 6], locally stable region characteristics [19], local self-similarity [29], etc. We explore a similar direction but extend this work to transparent objects. Specifically, we base our method on a novel combination of SIFT [18] and latent Dirichlet allocation (LDA) [4], two techniques used in many previous object recognition methods. The SIFT descriptor (see also the related HOG [6] and neurally plausible HMAX models [27]) generally characterizes local appearance 2 with a spatial grid of histograms, with each histogram aggregating a number of edges at a particular orientation in a grid cell. Approaches based on quantizing or matching local appearance from single observations can perform poorly on objects that are made of transparent material. The local appearance of a transparent object is governed, in general, by a complex rendering process including multi-layer refraction and specular reflections. The local appearance of a particular point on a transparent object may be dominated by environmental characteristics, i.e., the background pattern and illumination field. Models that search for nearest neighbor local appearance patterns from training instances may identify the environment (e.g. the background behind the object) rather than the object of interest. Methods that vector quantize individual observations of local appearance may learn a representation that partitions well the variation in the environment. Neither approach is likely to learn salient characteristics of local transparent appearance. Bag-of-words (c.f., [31, 5, 24], and many others), Pyramid-match [14, 17], and many generative methods [11, 32] exploit the “visual word” metaphor, establishing a vocabulary of quantized SIFT appearance. Typically a k-means clustering method (or a discriminative variant) is used to associate nearby appearances into a single cluster. Unfortunately when background energy dominates transparent foreground energy, averaging similar local appearances may simply find a cluster center corresponding to background structure, not foreground appearance. For transparent objects, we argue that there is local latent structure that can be used to recognize objects; we formulate the problem as learning this structure in a SIFT representation using a latent factor model. Early methods for probabilistic topic modeling (e.g. [16]) were developed in the domain of text analysis to factor word occurrence distributions of documents in to multiple latent topics in an unsupervised manner. Latent Dirichlet Allocation [4, 15] is an additive topic model, that allows for prior distributions on mixing proportions as well as the components. SIFT and LDA have been combined before, but the conventional application of LDA to SIFT is to form a topic representation over the quantized SIFT descriptors [30, 32, 10, 22]. As previous methods apply vector quantization before latent modeling, they are inappropriate for uncovering latent (and possibly subtle) transparent structures. To our knowledge, ours is the first work to infer a latent topic model from a SIFT representation before quantizing into a “visual word” representation. Related work on latent variable models includes [9], which reports a “LatentSVM” model to solve for a HOG descriptor with enumerated local high resolution patches. The offset of the patches is regarded as a latent variable in the method, and is solved using a semi-convex optimization. Note that the latent variable here is distinct from a latent topic variable, and that there are no explicitly shared structures across the parts in their model. Quattoni et al. [26] report an object recognition model that uses latent or hidden variables which have CRF-like dependencies to observed image features, including a representation that is formed with local oriented structures. Neither method has an LDA component, but both of these methods have considerable representational flexibility and the ability to learn weight factors from large amounts of training data. Our method is similar in spirit to [13], which uses local oriented gradient strength in a HOG descriptor as a word in an LDA model. However, our method is based on local patches, while theirs is evaluated over a global descriptor; their model also did not include any explicit quantization into discrete (and overlapping) visual words. No results have been reported on transparent objects using these methods. In addition to the above work on generic (non-transparent) object recognition, there has been some limited work in the area of transparent object recognition. Most relevant is that of [25], which focuses on recognition from specular reflections. If the lighting conditions and pose of the object are known, then specularities on the glass surface can be highly discriminative of different object shapes. The initial work in [25] however assumes a highly simplified environment and has not been tested with unknown 3D shape, or with varying and unknown pose and complex illumination. By focusing on specularities they also ignore the potentially rich source of information about transparent object shape caused by the refraction of the background image structure. We take a different approach and do not explicitly model specular reflections or their relationship to 3D shape. Rather than focus on a few highlights we focus on how transparent objects appear against varied backgrounds. Our learning approach is designed to automatically uncover the most discriminative latent features in the data (which may include specular reflections). 3 It is important to emphasize that we are approaching this problem as one of transparent object recognition. This is in contrast to previous work that has explored glass material recognition [20, 21]. This is analogous to the distinction between modeling “things” and “stuff” [1]. There has been significant work on detecting and modeling surfaces that are specular or transparent [7, 12, 23, 28]. These methods, which focus on material recognition, may give important insight into the systematic deformations of the image statistics caused by transparent objects and may inform the design of features for object recognition. Note that a generic “glass material” detector would complement our approach in that it could focus attention on regions of a scene that are most likely to contain transparent objects. Thus, while material recognition and surface modeling are distinct from our problem, we consider them complimentary. 3 Local Transparent Features Local transparent patch appearance can be understood as a combination of different processes that involve illuminants in the scene, overall 3D structure, as well as the geometry and material properties of the transparent object. Many of these phenomena can be approximated with an additive image formation model, subject to certain deformations. A full treatment of the refractive properties of different transparent materials and their geometry is beyond our scope and likely intractable for most contemporary object recognition tasks. Rather than analytically model interactions between scene illumination, material properties and object geometry, we take a machine learning perspective and assume that observed image patches factor into latent components – some originating from the background, others reflecting the structure of the transparent object. To detect a transparent object it may be sufficient to detect characteristic patterns of deformation (e.g. in the stem of a wine glass) or features that are sometimes present in the image and sometimes not (like the rim of a thin glass). We assume a decomposition of an image I into a set of densely sampled image patches IP, each represented by a local set of edge responses in the style of [18, 6], which we further model with an additive process. From each IP we obtain local gradient estimates GP. We model local patch appearance as an additive combination of image structures originating from a background patch appearance A0 as well as a one or more patterns Ai that has been affected by e.g., refraction of the transparent object. An image patch is thus described by: GP = [ gP(0, 0, 0), . . . , gP(M, N, T) ] = ￿ i θ(i)Ai (1) where gP(i, j, o) is the edge count for a histogram bin at position (i, j) in patch IP at orientation index o; M, N, T give the dimensions of the descriptor histogram and θ(i) is the scalar weight associated with pattern Ai. We further assume non-negative θ(i), reflecting the image formation process. Based on this model, we formulate a corresponding generative process for the local gradient statistics p(GP) for patch P. The model constitutes a decomposition of p(GP) into components p(G|z = j) and mixing proportions p(z = j). p(GP) = T ￿ j p(G|z = j)p(z = j). (2) Both the components as well as their mixing proportions are unknown to us wherefore we treat them as latent variables in our model. However, we may reasonably assume that each observed patch was only generated from a few components, so we employ a sparseness prior over the component weights. To estimate this mixture model we use methods for probabilistic topic modeling that allow us to place prior distributions on mixing proportions as well as the components. Based on a set of training patches, we learn a model over the patches which captures the salient structures characterizing the object patch appearance as a set of latent topics. We have investigated both supervised and unsupervised latent topic formation strategies; as reported below both outperform 4 P |GP| z g V v α β T φ(z) y C θ(i) η(c) Figure 2: Left: Graphical model representing our latent topic model of patch appearance and quantization into a potentially overlapping set of visual words. See text for details. Right: Local factors learned by latent topic model for example training data. Figure 3: Detected quantized transparent local features (transparent visual words) on an example image. Each image shows the detected locations for the transparent visual word corresponding to the latent topics depicted on the left. traditional quantized appearance techniques. Figure 2 illustrates examples of the latent topics φ(z) learned by decomposing a local SIFT representation into underlying components. At test time, a patch is presented to the LDA model and topic activation weights are inferred given the fixed topic vectors. To obtain a discrete representation, we can quantize the space of topic vectors into ‘transparent visual words’. The essence of transparency is that more than one visual word may be present in a single local patch, so we have an overlapping set of clusters in the topic space. We quantize the topic activation levels θ(i) into a set of overlapping visual words by forming axis-aligned partitions of the topic space and associate a distinct visual word detection with each topic activation value that is above a threshold activation level ￿. Figure 2 summarizes our transparent visual word model in a graphical model representation. Our method follows the standard LDA presentation, with the addition of a plate of variables corresponding to visual word detections. These boolean detection variables deterministically depend on the latent topic activation vector: word vi is set when θ(i) ≥￿. Figure 3 illustrates detected local features on an example image. Latent topics can be found using an unsupervised process, where topics are trained from a generic corpus of foreground and/or background imagery. More discriminative latent factors can be found by taking advantage of supervised patch labels. In this case we employ a supervised extension to the LDA model1 (sLDA [3]), which allows us to provide the model with class labels per patch in order to train a discriminant representation. This revised model is displayed in the dashed box in Figure 2. The foreground/background label for each patch is provided at training time by the observed variable y; the parameters η(c) for each class c = 1, . . . , C are trained in order to fit to the observed label variables y by a linear classification model on the topic activations. We make use of these weights η by deriving a per topic thresholding according to learned importance for each topic: θ(i) ≥￿/η(i). 1our implementation is based on the one of [33] 5 Figure 4: Example images from our training set of transparent objects in front of varying background. 4 Experiments We have evaluated the proposed method on a glass detection task in a domestic environment under different view-point and illumination conditions; we compared to two baseline methods, HOG and vector quantized SIFT. We collected data2 for four glass objects (two wine glasses and two water glasses) in front of a LCD monitor with varying background (we used images from flickr.com under the search term ‘breakfast table’) in order to capture 200 training images of transparent objects. Figure 4 shows some example images of the training set. We extracted a dense grid of 15 by 37 patches of each of the 800 glass examples as well as 800 background crops. Each patch is represented as a 4 by 4 grid of 9 dimensional edge orientation histograms. Neighboring patches overlap by 75%. We explored training the LDA model either only on foreground (glass) patches, only on background (non-transparent) patches, or on both, as reported below. The prior parameters for the LDA model were set to be α = 2 and β = 0.01 and a total of 25 components were estimated. The components learnt from foreground patches are shown in Figure 2; patches from background or mixed data were qualitatively similar. We infer latent topic activations for each patch and set detections of transparent visual words according to the above-threshold topic dimensions. We set the threshold corresponding to an average activation of 2 latent components per patch on the training set. Based on these 15 by 37 grids of transparent visual word occurrences, we train a linear, binary SVM in order to classify glasses vs. background. For detection we follow the same procedure to infer the latent topic activations. Figure 3 shows example detections of transparent visual words on an example test image. We run a scanning window algorithm to detect likely object locations, examining all spatial location in the test image, and a range of scales from 0.5 to 1.5 with respect to the training size, in increments of 0.1. In each window latent topic activations are inferred for all descriptors and classification by the linear SVM is performed on the resulting grid of transparent visual word occurrences. For inference we use the implementation of [4], that results in an averaged computation time of 8.4ms per descriptor on a single core of an Intel Core2 2.3 Ghz machine. This is substantial but not prohibitive, as we can reuse computation by choosing an appropriate stride of our scanning technique. We compare to 2 baseline methods: traditional visual words and the histogram of oriented gradients (HOG) detector [6]. Both baselines share the same detection approach - namely obtaining detections by applying a linear SVM classifier in sliding window approach - but are based on very different 2all data is available at http://www.eecs.berkeley.edu/˜mfritz/transparency 6 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 recall precision Transparent Visual Word model (sLDA) Transparent Visual Word model (LDA glass) Transparent Visual Word model (LDA bg) HOG Traditional Visual Word model Figure 5: Performance evaluation of detector based on transparent visual words w.r.t. baseline. See text for details. representations. For the traditional visual words baseline we replace the transparent visual words by visual words formed in a conventional fashion: sampled patches are directly input to a vector quantization scheme. We tried different number of clusters from 100 to 1000 and found k = 100 to work slightly better than the other choices. The HOG baseline basically leaves out any feature quantization and operates directly on the gradient histograms. We use the code provided by the authors [6]. To evaluate our approach, we recorded 14 test images of the above transparent objects in a home environment containing 49 glass instances in total; note that this test set is very different in nature from the training data. The training images were all collected with background illumination patterns obtained entirely from online image sources whereas the test data is under natural home illumination conditions. Further the training images were collected from a single viewpoint while viewpoint varies in the test data. In order to quantify our detection results we use the evaluation metric proposed in [8] with a matching threshold of 0.3. Our methods based on transparent visual words outperform both baselines across all ranges of operating points as shown in the precision-recall curve in Figure 5. We show results for the LDA model trained only on glass patches (LDA glass) as well as trained only on background patches (LDA bg). While neither of the methods achieve performance that would indicate glass detection is a solved problem, the results point in a promising direction. Example detections of our system on the test data are shown in Figure 6. We also evaluated the supervised LDA as described above on data with mixed foreground and background patches, where the class label for each patch was provided to the training regime. The performance of sLDA is also displayed in Figure 5. In all of our experiments the transparent visual word models outperformed the conventional appearance baselines. Remarkably, latent topics learned on background data performed nearly as well as those trained on foreground data; those learned using a discriminative paradigm tended to outperform those trained in an unsupervised fashion, but the difference was not dramatic. Further investigation is needed to determine when discriminative models may have significant value, and/or whether a single latent representation is sufficient for a broad range of category recognition tasks. 5 Conclusion and Future Work We have shown how appearance descriptors defined with an additive local factor model can capture local structure of transparent objects. Structures which are only weakly present in individual training instances can be revealed in a local factor model and inferred in test images. Learned latent topics define our “transparent visual words”; multiple such words can be detected at a single location. Recognition is performed using a conventional discriminative method and we show results for 7 Figure 6: Example of transparent object detection with transparent local features. detection of transparent glasses in a domestic environment. These results support our claim that an additive model of local patch appearance can be advantageous when modeling transparent objects, and that latent topic models such as LDA are appropriate for discovering locally transparent “visual words”. This also demonstrates the advantage of estimating a latent appearance representation prior to a vector quantization step, in contrast to the conventional current approach of doing so in reverse. We see this work as a first step toward transparent object recognition in complex environments. Our evaluation establishes a first baseline for transparent object recognition. While limited in scope, the range of test objects, poses and environments considered are varied and natural (i.e. not a laboratory environment). More extensive evaluation of these methods is needed with a wider range of poses, with more objects, occlusion and more varied illumination conditions. There are several avenues of potential future work. We have not explicitly addressed specularity, which is often indicative of local shape, though specular features may be captured in our representation. Dense sampling may be suboptimal and it would be valuable to explore invariant detection schemes in the context of this overall method. Finally, we assume no knowledge of background statistics at test time, which may be overly restrictive; inferred background statistics may be informative in determining whether observed local appearance statistics are discriminative for a particular object category. 8 Acknowledgements. This work was supported in part by Willow Garage, Google, NSF grants IIS0905647 and IIS-0819984, and a Feodor Lynen Fellowship granted by the Alexander von Humboldt Foundation. References [1] E. H. Adelson. On seeing stuff: the perception of materials by humans and machines. In SPIE, 2001. [2] A. C. Berg, T. L. Berg, and J. Malik. Shape matching and object recognition using low distortion correspondence. In CVPR, pages 26–33, 2005. [3] D. Blei and J. McAuliffe. Supervised topic models. In NIPS, 2007. [4] D. Blei, A. Ng, and M. Jordan. Latent dirichlet allocation. JMLR, 2003. [5] G. Csurka, C. Dance, L. Fan, J. Willarnowski, and C. Bray. Visual categorization with bags of keypoints. In SLCV’04, pages 59–74, Prague, Czech Republic, May 2004. [6] N. Dalal and B. Triggs. Histograms of oriented gradients for human detection. In CVPR, 2005. [7] A. DelPozo and S. Savarese. Detecting specular surfaces on natural images. In CVPR, 2007. [8] M. Everingham, A. Zisserman, C. K. I. Williams, and L. Van Gool. The PASCAL Visual Object Classes Challenge 2005 (VOC2005) Results. http://www.pascalnetwork.org/challenges/VOC/voc2005/results.pdf, 2005. [9] P. F. Felzenszwalb, D. McAllester, and D. Ramana. A discriminatively trained, multiscale, deformable part model. In CVPR, 2008. [10] R. Fergus, L. Fei-Fei, P. Perona, and A. Zisserman. Learning object categories from google’s image search. In ICCV, 2005. [11] R. Fergus, A. Zisserman, and P. Perona. Object class recognition by unsupervised scale-invariant learning. In CVPR, 2003. [12] R. W. Fleming and H. H. B¨ulthoff. Low-level image cues in the perception of translucent materials. ACM Trans. Appl. Percept., 2(3):346–382, 2005. [13] M. Fritz and B. Schiele. Decomposition, discovery and detection of visual categories using topic models. In CVPR, 2008. [14] K. Grauman and T. Darrell. The pyramid match kernel: Efficient learning with sets of features. JMLR, 8:725–760, 2007. [15] T. L. Griffiths and M. Steyvers. Finding scientific topics. PNAS USA, 2004. [16] T. Hofmann. Unsupervised learning by probabilistic latent semantic analysis. Machine Learning, 2001. [17] S. Lazebnik, C. Schmid, and J. Ponce. Beyond bags of features: Spatial pyramid matching for recognizing natural scene categories. In CVPR, pages 2169–2178, 2006. [18] D. Lowe. Distinctive image features from scale-invariant keypoints. IJCV, 60(2):91–110, 2004. [19] J. Matas, O. Chum, U. Martin, and T. Pajdla. Robust wide baseline stereo from maximally stable extremal regions. In P. L. Rosin and A. D. Marshall, editors, BMVC, pages 384–393, 2002. [20] K. McHenry and J. Ponce. A geodesic active contour framework for finding glass. In CVPR, 2006. [21] K. McHenry, J. Ponce, and D. A. Forsyth. Finding glass. In CVPR, 2005. [22] J. C. Niebles, H. Wang, and L. Fei-Fei. Unsupervised learning of human action categories using spatialtemporal words. Int. J. Comput. Vision, 79(3):299–318, 2008. [23] P. Nillius and J.-O. Eklundh. Classifying materials from their reflectance properties. In T. Pajdla and J. Matas, editors, ECCV, volume 3021, 2004. [24] D. Nister and H. Stewenius. Scalable recognition with a vocabulary tree. In CVPR, 2006. [25] M. Osadchy, D. Jacobs, and R. Ramamoorthi. Using specularities for recognition. In ICCV, 2003. [26] A. Quattoni, M. Collins, and T. Darrell. Conditional random fields for object recognition. In NIPS, 2004. [27] M. Riesenhuber and T. Poggio. Hierarchical models of object recognition in cortex. Nature Neuroscience, 2:1019–1025, 1999. [28] S. Roth and M. J. Black. Specular flow and the recovery of surface structure. In CVPR, 2006. [29] E. Shechtman and M. Irani. Matching local self-similarities across images and videos. In CVPR, 2007. [30] J. Sivic, B. C. Russell, A. A. Efros, A. Zisserman, and W. T. Freeman. Discovering objects and their locations in images. In ICCV, 2005. [31] J. Sivic and A. Zisserman. Video Google: A text retrieval approach to object matching in videos. In ICCV, 2003. [32] E. Sudderth, A. Torralba, W. Freeman, and A. Willsky. Learning hierarchical models of scenes, objects, and parts. In ICCV, 2005. [33] C. Wang, D. Blei, and L. Fei-Fei. Simultaneous image classification and annotation. In CVPR, 2009. [34] D. Zongker, D. Werner, B. Curless, and D. Salesin. Environment matting and compositing. In SIGGRAPH, pages 205–214, 1999. 9
2009
225
3,732
Know Thy Neighbour: A Normative Theory of Synaptic Depression Jean-Pascal Pfister Computational & Biological Learning Lab Department of Engineering, University of Cambridge Trumpington Street, Cambridge CB2 1PZ, United Kingdom jean-pascal.pfister@eng.cam.ac.uk Peter Dayan Gatsby Computational Neuroscience Unit, UCL 17 Queen Square, London WC1N 3AR, United Kingdom dayan@gatsby.ucl.ac.uk M´at´e Lengyel Computational & Biological Learning Lab Department of Engineering, University of Cambridge Trumpington Street, Cambridge CB2 1PZ, United Kingdom m.lengyel@eng.cam.ac.uk Abstract Synapses exhibit an extraordinary degree of short-term malleability, with release probabilities and effective synaptic strengths changing markedly over multiple timescales. From the perspective of a fixed computational operation in a network, this seems like a most unacceptable degree of added variability. We suggest an alternative theory according to which short-term synaptic plasticity plays a normatively-justifiable role. This theory starts from the commonplace observation that the spiking of a neuron is an incomplete, digital, report of the analog quantity that contains all the critical information, namely its membrane potential. We suggest that a synapse solves the inverse problem of estimating the pre-synaptic membrane potential from the spikes it receives, acting as a recursive filter. We show that the dynamics of short-term synaptic depression closely resemble those required for optimal filtering, and that they indeed support high quality estimation. Under this account, the local postsynaptic potential and the level of synaptic resources track the (scaled) mean and variance of the estimated presynaptic membrane potential. We make experimentally testable predictions for how the statistics of subthreshold membrane potential fluctuations and the form of spiking non-linearity should be related to the properties of short-term plasticity in any particular cell type. 1 Introduction Far from being static relays, synapses are complex dynamical elements. The effect of a spike from a presynaptic neuron on its postsynaptic partner depends on the history of the activity of both pre- and postsynaptic neurons, and thus the efficacy of a synapse undergoes perpetual modification. These changes in efficacy can last from hundreds of milliseconds or minutes (short-term plasticity) to hours or months (long-term plasticity). Short-term plasticity typically only depends on the firing pattern 1 of the presynaptic cell [1]; short term depression gradually diminishes the postsynaptic effects of presynaptic spikes that arrive in quick succession (Fig. 1A). Given the prominence and ubiquity of synaptic depression in cortical (and subcortical) synapses [2], it is pressing to identify its computational role(s). There have thus been various important suggestions for the functional significance of synaptic depression, including – just to name a few – low-pass filtering of inputs [3], rendering postsynaptic responses insensitive to the absolute intensity of presynaptic activity [4, 5], and decorrelating input spike sequences [6]. However, important though they must be for select neural systems, these suggestions have a piecemeal flavor – for instance, chaining together stages of low-pass filtering would lead to trivial responding. Here, we propose a theory according which synaptic depression solves a computational problem that is faced by any neural population in which neurons represent and compute with analog quantities, but communicate with discrete spikes. For convenience, we assume this analog quantity to be the membrane potential, but, via a non-linear transformation [7], it could equally well be an analog firing rate. That is, we assume that network computations require the evolution of the membrane potential of a neuron to be a function of the membrane potentials of its presynaptic partners. However, such a neuron does not have (at least not directly, see [8] for an example of indirect interaction) access to these membrane potentials, but rather only to the spikes to which they lead, and so it faces a key estimation problem. Thus, much as in the vein of standard textbook presentations, the operation of a neuron can be logically broken down into three concurrent processes, each running in its dedicated functional compartment: 1) the neuron’s afferent synapses (e.g. spines) estimate the membrane potential of its presynaptic partners, scaled according to the rules of the network computation; 2) the neuron’s somadendritic compartment follows the membrane potential-dependent dynamics and post-synaptic integration also determined by the computation; and 3) its axon generates action potentials that are broadcasted to its efferent synapses (and possibly back to the other compartments, eg. for long-term plasticity). It is in the indispensable first estimation step that we suggest synaptic depression to be involved. In Section 2 we formalise the problem of estimating presynaptic membrane potentials as an instance of Bayesian inference, and derive an online recursive estimator for it. Given suitable assumptions about presynaptic membrane potential dynamics and spike generation, this optimal estimator can be written in closed form exactly [9, 10]. In Section 3, we introduce a canonical model of postsynaptic membrane potential and synaptic depression dynamics, and show how it relates to the optimal estimator derived earlier. In Section 4, we present results from numerical simulations showing the quality with which synaptic depression can approximate the performance of the optimal estimator, and how much is gained relative to a static synapse without synaptic depression. Finally, in Section 5, we sum up, suggest experimentally testable predictions, and discuss possible extensions of this work, eg. to incorporate other forms of short-term synaptic plasticity. 2 Bayesian estimation of presynaptic membrane potentials The Bayesian estimation problem that needs to be solved by a synapse involves inferring the posterior distribution p (ut|s1..t) over the presynaptic membrane potential ut at time step t (for discretized time), given the spikes seen from the presynaptic cell up to that time step, s1..t. We first define a statistical (generative) model of presynaptic membrane potential fluctuations and spiking, and then derive the estimator that is appropriate for it. The generative model involves two simplifying assumptions (Fig. 1B). First we assume that presynaptic membrane potential dynamics are Markovian p(ut|u1..t−1) = p(ut|ut−1) (1) In particular, we assume that the presynaptic membrane potential evolves as an Ornstein-Uhlenbeck (OU) process, given (again, in discretized time) by ut = ut−1 −θ(ut−1 −ur)∆t + Wt √ ∆t, Wt iid ∼N(Wt; 0, σ2 W) (2) 2 A B . . . ut−1 ut . . . st−1 st C 0 100 200 300 400 500 600 700 800 900 1000 −3 −2 −1 0 1 2 3 4 time [ms] u [mV] Figure 1: A. Synaptic depression: postsynaptic responses to a train of presynaptic action potentials (not shown) at 40 Hz. (Reproduced from [11], adapted from [12].) B. Graphical model of the process generating presynaptic subthreshold membrane potential fluctuations, u, and spikes, s. The membrane potential evolves according to a first-order Markov process, the Ornstein-Uhlenbeck (OU) process (Eqs. 1-2). The probability of generating a spike at time t (st = 1) depends only on the current membrane potential, ut, and is determined by a non-linear Poisson (NP) model (Eqs. 35). C. Sample membrane potential trace (red line) and spike timings (vertical black dotted lines) generated by the OU-NP process; with ur = 0 mV, θ−1 = 100 ms, σ2 W = 0.02 mV2/ms → σ2 OU = 1 mV2, β−1 = 1 mV, and g0 = 10 Hz. where 1/θ is the time constant with which the membrane potential decays back to its resting value, ur, and ∆t is the size of the discretized time bins. Because both θ and σW are assumed to be constant, the variance of the presynaptic membrane potential, σ2 OU = σ2 W/2θ, is stationary. The second assumption is that spiking activity at any time only depends on the membrane potential at that time: p(st|u1..t) = p(st|ut) (3) In particular, we assume that the spike generating mechanism is an inhomogeneous Poisson process (Fig. 1C). Thus, at time step t, the neuron emits a spike (st = 1) with probability g(ut)∆t, and therefore the spiking probability p(st|ut) given the membrane potential can be written as: p(st|ut) = [g(ut)∆t]st [1 −g(u)∆t](1−st) (4) We further assume that the transfer function, g(u), is exponential1: g(u) = g0 exp(βu) (5) where β determines the stochasticity of spiking. In the limit β →∞the spiking process is deterministic, i.e. if the membrane potential, u, is bigger than zero, the neuron emits a spike, and if u < 0, the neuron does not fire. Estimating on-line the membrane potential of the presynaptic cell from its spiking history amounts to computing the posterior probability distribution, p (ut|s1..t). Since equations 1 and 3 define a hidden Markov model, the posterior can be written in a recursive form: p(ut|s1..t) ∝p(st|ut) Z p(ut|ut−1) p(ut−1| s1..t−1) dut−1 (6) That is, the posterior at time step t, p(ut|s1..t), can be computed by combining information from the current time step with the posterior obtained at the previous time step, p(ut−1|s1..t−1). Note that even though inference can be performed recursively, and the hidden dynamics is linear-Gaussian (Eq. 2), the (extended) Kalman filter cannot be used here for inference because the measurement does not involve additive Gaussian noise, but rather comes from the stochasticity of the spiking process (Eqs. 4-5). 1Note that the exponential gain function is a convenient choice since the product of a Gaussian and an exponential gives again an (unnormalised) Gaussian (see Supplementary Information). Furthermore, the exponential gain function has also some experimental support [13]. 3 Performing recursive inference (filtering), as described by equation 6, under the generative model described by equations 1-5 results in a posterior distribution that is Gaussian, ut|s1..t ∼N(ut; µ, σ2) (see Supplementary Information). The mean and variance of this Gaussian evolve (in continuous time, by taking the limit ∆t →0) as: ˙µ = −θ(µ −ur) + βσ2(S(t) −γ) (7) ˙σ2 = −2θ σ2 −σ2 OU  −γβ2σ4 (8) with the normalisation factor given by γ = ⟨g0 exp(βu)⟩ut|s1..t = g0 exp  βµ + β2σ2 2  (9) where S(t) is the spike train of the presynaptic cell (represented as a sum of Dirac delta functions). (A similar, but not identical, derivation can be found in [9]). Equation 7 indicates that each time a spike is observed, the estimated membrane potential should increase proportionally to the uncertainty (variance) about the current estimate. This estimation uncertainty then decreases each time a spike is observed (Eqs. 8-9). As Fig. 2A shows, the higher the presynaptic membrane potential is, the more spikes are emitted (because the instantaneous firing rate is a monotonic function of membrane potential, see Eq. 5), and therefore the smaller the posterior variance becomes. Therefore the estimation error is smaller for higher membrane potential (see Fig. 2B). Conversely, in the absence of spikes, the estimated membrane potential decreases while the variance increases back to its asymptotic value. Fig. 2C shows that the representation of uncertainty about the membrane potential by σ2 is self-consistent because it is predictive of the error of the mean estimator, µ. The first term on the r.h.s of equation 7 comes from the prior knowledge about the membrane potential dynamics. The second term comes from the likelihood of the spiking observations. Those two contributions can be isolated independently by taking two different limits that we will consider in the next two subsections. 2.1 Small noise limit In the limit of small variance of the noise driving the OU process, i.e., σ2 W = ϵσ2 W0 with ϵ →0, the asymptotic uncertainty σ2 ∞scales with ϵ: σ2 ∞= ϵσ2 W0/2θ (c.f. Eq. 8 with ˙σ2 = 0). Then the dynamics of µ becomes driven only by the prior mean membrane potential ur: ˙µ ≃−θ (µ −ur) (10) and so the asymptotic estimated membrane potential will tend to the prior mean membrane potential. This is reasonable since in the small noise limit, the true membrane potential ut will effectively be very close to ur. Furthermore the convergence time constant of the estimated membrane potential should be matched to the time constant θ−1 of the OU process and this is indeed the case in Eq. 10. 2.2 Slow dynamics limit A second interesting limit is where the time constant of the OU process becomes small, i.e., θ = ϵθ0 with ϵ →0. In this case, the variance of the noise in the OU process must also scale with ϵ, i.e σ2 W = ϵσ2 W0, to prevent the process from being unbounded. The variance σ2 OU = σ2 W0/2θ0 of the OU process is therefore independent of ϵ. In this case, the asymptotic value of the posterior variance becomes σ2 ∞= √ϵσW0/√βγ (c.f. Eq. 8 with ˙σ2 = 0). In the limit of small ϵ, the first term of Eq. 7 scales with ϵ whereas the second term with √ϵ. We can therefore write: √γ σW ˙µ ≃S(t) −γ (11) Because the time constant θ−1 of the OU process is slow, the driving force that pulls the membrane potential back to its mean value ur is weak. Therefore the membrane potential estimation dynamics should rely on the observed spikes rather than on the prior information ur. This is apparent in Eq. 11. Furthermore, the time constant τ = p γ/ϵ/σW0 is not fixed but is a function of the mean estimated membrane potential µ. Thus, if the initial estimate µ0 = µ(0) is below the target value ur, γ 4 A 0 100 200 300 400 500 600 700 800 900 1000 −4 −2 0 2 4 time [ms] u [mV] B C −3 −2 −1 0 1 2 3 0 2 4 6 8 10 u [mV] (µ−u)2 [mV2] −3 −2 −1 0 1 2 3 0 0.1 0.2 0.3 0.4 z = (u−µ)/σ Probability density Figure 2: The performance of the optimal on-line estimator. A. Red line: presynaptic membrane potential, u, as a function of time, vertical dotted lines: spikes emitted. Dot-dashed black line: on-line estimator µ given by Eq. (7), gray shading: µ ± σ, with σ given by Eq. (8). B. Estimation error (µ −u)2 as a function of the membrane potential u of the OU process. Black dots: estimation error and true membrane potential in individual time steps, red line: third order polynomial fit. C Black bars: histogram of normalized estimation error z = (µ −u)/σ. Red line: normal distribution N(z; 0, 1). Parameters were as in Fig. 1, except for β−1 = 0.5 mV . will be small and hence the time constant τ will be small as well. As a consequence, each spike will greatly increase the estimate and therefore speed up the approach of this estimate to the true value. As µ gets closer to the true membrane potential, the time constant increases, leading to an appropriately accurate estimate of the membrane potential. This dynamical time constant therefore helps the estimation avoid the traditional speed vs accuracy trade-off (short time constant are fast but give a noisy estimation; longer time constant are slow but yield a more accurate estimation), by combining the best of the two worlds. 3 Depressing synapses as estimators of presynaptic membrane potential In section 2 we have shown that presynaptic spikes have a varying, context-dependent effect on the optimal on-line estimator of presynaptic membrane potential. In this section we will show that the variability that synaptic depression introduces in postsynaptic responses closely resembles the variability of the optimal estimator. A simple way to study the similarity between the optimal estimator and short-term plasticity is to consider their steady state filtering properties. As we saw above, according to the optimal estimator, the higher the input firing rate is, the smaller the posterior variance becomes, and therefore the increment due to subsequent spikes should decrease. This is consistent with depressing synapses for which the amount of excitatory postsynaptic current (EPSC) decreases when the stimulation frequency is increased (see Fig. 3). 5 A B 0 20 40 60 80 100 0 0.2 0.4 0.6 0.8 1 1.2 Stimulus rate [Hz] steady state increment [mV] Figure 3: A. Steady-state spiking increment βσ2 of the optimal estimator as a function of r = ⟨S⟩ (Eq. 8). B. Synaptic depression in the climbing fibre to Purkinje cell synapse: average (±s.e.m.) normalised “steady-state” magnitude of EPSCs as a function of stimulation frequency. Reproduced from [3]. Importantly, the similarity between the optimal membrane potential estimator and short-term plasticity is not limited to stationary properties. Indeed, the actual dynamics of the optimal estimator (Eqs. 7-9) can be well approximated by the dynamics of synaptic depression. In a canonical model of short-term depression [14], the postsynaptic membrane potential, v, changes as ˙v = −v −v0 τ + J Y x S(t), with ˙x = 1 −x τD −Y x S(t) (12) where J and Y are constants (synaptic weight and utilisation fraction), and x is a time varying ‘resource’ variable (e.g. the fraction of presynaptic vesicles ready to fuse to the membrane). Thus, v is increased by each presynaptic spike, and in the absence of spikes it decays to its resting value, v0, with membrane time constant τ. However, the effect of each spike on v is scaled by x which itself is decreased after each spike and increases between spikes back towards one with time constant τD. Thus, the postsynaptic potential, v, behaves much like the posterior mean of the optimal estimator, µ, while the dynamics of the synaptic resource variable, x, closely resemble that of the posterior variance of the optimal estimator, σ2. This qualitative similarity can be made more formal under appropriate assumptions, for details see section 3 of supplementary information. Indeed, the capacity of a depressing synapse (with appropriate parameters) to estimate the presynaptic membrane potential can be nearly as good as that of the optimal estimator (Fig. 4, top). Interestingly, although the scaled variance σ2/σ2 ∞does not follow the resource variable dynamics x perfectly just after a spike, these two quantities are virtually identical at the time of the next spike, i.e. when they are used by the membrane potential estimators (Fig. 4, bottom). 4 Performance analysis In order to quantify how well synaptic dynamics with depression perform in estimating presynaptic membrane potentials, we measure performance by the mean-squared error (MSE) between the true membrane potential u and the estimated membrane potential, and compare the MSE of three alternatives estimators. The simplest model we consider is a static (non-depressing) synapse, in which v is given by Eq. 12 with constant x = 1. This estimator has only 3 tuneable parameters: τ, v0 and J (Y = 1 is fixed without loss of generality). The second estimator we consider includes synaptic depression, i.e. x is also allowed to vary (Eq. 12). This estimator contains 5 tuneable parameters ( v0, τ, Y , J, τD). Finally, we consider the optimal estimator (Eqs. 7-9). This estimator has no tunable parameters. Once the parameters of presynaptic membrane potential dynamics (σW, θ, ur) and spiking (β, g0) are fixed, the optimal estimator is entirely determined. The comparison of the performance of these three estimators is displayed on Fig. 5. The optimal estimator (black circles) is obviously a lower bound on any type of estimator. For a wide range of parameter values, the depressing synapse performs almost as well as the optimal estimator, and both perform better than the static synapse. 6 0 500 1000 1500 2000 −4 −2 0 2 4 time [ms] u [mV] STP Optimal membrane pot. u 0 500 1000 1500 2000 0.2 0.4 0.6 0.8 1 time [ms] x, σ2/σ2 ∞ STP Optimal Figure 4: Depressing synapses implement near-optimal estimation of presynaptic membrane potentials. Top. Red line, and vertical dotted lines: membrane potential, u, and spikes, S, generated by a simulated presynaptic cell (with parameters as in Fig. 1). Blue line: postsynaptic potential, v, in a depressing synapse (Eq. 12) with all 5 parameters (J = 4.82, τ = 60.6 ms, v0 = −0.59 mV, τd = 64 ms, Y = 0.17) tuned to minimize the mean squared estimation error, (u −v)2. Black line: Posterior mean of the optimal on-line estimator, µ (Eq. 7). Bottom. Black: resource variable, x, in the depressing synapse (Eq. 12). Blue: posterior variance of the optimal estimator, σ2 (Eq. 8). In the slow dynamics limit (ϵ →0, see section 2.2), the estimation error of the optimal estimator can even be approximated analytically (see Supplementary Information). In this limit, the error scales with √σW and therefore scales with 4√ϵ. As can be seen on Fig. 5B, for small ϵ, the analytical expression is consistent with the simulations. 5 Discussion Synapses are a cornerstone of computation in networks, and are highly complex dynamical systems involving more than a thousand different types of protein. One prominent feature of their dynamics is significant short-term changes in efficacy; these belie the sort of single fixed, or slowly changing, weights popular in most neural models. We interpreted short-term synaptic depression, a key feature of synaptic dynamics, as solving the fundamental computational task of estimating the analog membrane potential of the presynaptic cell from observed spikes. Steady-state and dynamical properties of a Bayes-optimal estimator are well-matched by a canonical model of depression; using a fixed synaptic efficacy instead leads to a highly suboptimal estimator. Our theory is readily testable, since it suggests a precise relationship between quantities that have been subject to extensive, separate, empirical study — namely the statistics of a neuron’s membrane potential dynamics (captured by the parameters of Eq. (2)), the form of its spiking non-linearity (described by Eq. (5)), and the synaptic depression it expresses in its efferent synapses. Accounting for the observation that different efferent synapses of the same cell can express different forms of short-term synaptic plasticity [15] remains a challenge; one obvious possibility is that different synapses are estimating different aspects or functions of the membrane potential. Our approach is almost dual to that explored in [16]. For that model, the spike generation mechanism of the presynaptic neuron was modified such that even a simple read-out mechanism with fixed efficacies could correctly decode the analogue quantity encoded presynaptically. By contrast, we considered a standard model of spiking [17], and thereby derived an explanation for the evident fact that synapses are not in fact fixed. 7 A B 10 −1 10 0 0 0.2 0.4 0.6 0.8 1 1.2 ε Estimation Error in [mV] no STP: simulation STP: simulation optimal: simulation 10 −2 10 −1 10 0 0 0.2 0.4 0.6 0.8 1 1.2 ε Estimation Error in [mV] optimal: simulation optimal: theory Figure 5: A. Comparing the estimation error for different membrane potential estimators as a function of ϵ. (θ = ϵθ0, σ2 W = ϵσ2 W0). Black: asymptotic error of the optimal estimator. Blue: depressing synapse with its 5 tuneable parameters (see text) being optimised for each value of ϵ. Red: static synapse with its 3 tuneable parameters (see text) being optimised. Total simulated time was 5 min. Horizontal dot-dashed line: upper bound on the estimation error given by σOU = σW/ √ 2θ = 1. B. Analysing the estimation error of the optimal estimator in the slow dynamics limit (ϵ →0). Solid line: analytical approximation (Eq. 31 in the Supplementary Information), circles: simulation, horizontal dot-dashed line: as in A. There are several avenues to extend the present analysis. For example, it would be important to understand in more quantitative detail the mapping between the parameters of the process generating the presynaptic membrane potential and spikes, and the parameters of synaptic depression that will best realize the corresponding optimal estimator. We present some preliminary derivations in the supplementary material that seem to yield at least the right ball-park values for optimal synaptic dynamics. This should also enable us to explore the particular parameter regimes in which depressing synapses have the most (or least) advantage over static synapses in terms of estimation performance, as in Fig. 5. We should also consider a meta-plasticity rule that suitably adapts the parameters of the short-term dynamics in the light of the statistics of spiking. Our assumption about the prior distribution of presynaptic membrane potential dynamics is highly restrictive. A broader scheme that has previously been explored is that it follow a Gaussian process model [18, 19] with a more general covariance function. Recursive estimation is often a reasonable approximation in such cases, even for those covariance functions, for instance enforcing smoothness, for which it cannot be exact. One interesting property of smooth trajectories is that a couple of spikes arriving in quick succession may be diagnostic of an upward-going trend in membrane potential which is best decoded with increasing, i.e., facilitating, rather than decreasing, postsynaptic responses. Thus it may be possible to encompass other forms of short term plasticity within our scheme. The spike generation process can also be extended to incorporate refractoriness, bursting, and other forms of non-Poisson behaviour, eg. as in [20]. Similarly, synaptic failures could also be considered. We hope through our theory to be able to provide a teleological account of the rich complexities of real synaptic inconstancy. Acknowledgements Funding was from the Gatsby Charitable Foundation (PD) and the Wellcome Trust (JPP, ML and PD). 8 References [1] Abbott, L.F. & Regehr, W.G. Synaptic computation. Nature 431, 796–803 (2004). [2] Zucker, R. & Regehr, W. Short-term synaptic plasticity. Annual Review of Physiology 64, 355–405 (2002). [3] Dittman, J., Kreitzer, A. & Regehr, W. Interplay between facilitation, depression, and residual calcium at three presynaptic terminals. Journal of Neuroscience 20, 1374 (2000). [4] Abbott, L.F., Varela, J.A., Sen, K. & Nelson, S.B. Synaptic depression and cortical gain control. Science 275, 220–224 (1997). [5] Cook, D., Schwindt, P., Grande, L. & Spain, W. Synaptic depression in the localization of sound. Nature 421, 66–70 (2003). [6] Goldman, M., Maldonado, P. & Abbott, L. Redundancy reduction and sustained firing with stochastic depressing synapses. Journal of Neuroscience 22, 584 (2002). [7] Ermentrout, B. Neural networks as spatio-temporal pattern-forming systems. Reports on Progress in Physics 61, 353 (1998). [8] Shu, Y., Hasenstaub, A., Duque, A., Yu, Y. & McCormick, D. Modulation of intracortical synaptic potentials by presynaptic somatic membrane potential. Nature 441, 761–765 (2006). [9] Eden, U., Frank, L., Barbieri, R., Solo, V. & Brown, E. Dynamic analysis of neural encoding by point process adaptive filtering. Neural Computation 16, 971–998 (2004). [10] Bobrowski, O., Meir, R. & Eldar, Y. Bayesian filtering in spiking neural networks: Noise, adaptation, and multisensory integration. Neural Computation 21, 1277–1320 (2009). [11] Dayan, P. & Abbott, L.F. Theoretical Neuroscience (MIT Press, Cambridge, 2001). [12] Markram, H. & Tsodyks, M. Redistribution of synaptic efficacy between neocortical pyramidal neurons. Nature 382, 807–810 (1996). [13] Jolivet, R., Rauch, A., L¨uscher, H.R. & Gerstner, W. Predicting spike timing of neocortical pyramidal neurons by simple threshold models. J. Computational Neuroscience 21, 35–49 (2006). [14] Mongillo, G., Barak, O. & Tsodyks, M. Synaptic theory of working memory. Science 319, 1543 (2008). [15] Markram, H., Wu, Y. & Tosdyks, M. Differential signaling via the same axon of neocortical pyramidal neurons. Proc. Natl. Acad. Sci. USA 95, 5323–5328 (1998). [16] Deneve, S. Bayesian spiking neurons I: inference. Neural Computation 20, 91–117 (2008). [17] Gerstner, W. & Kistler, W.K. Spiking Neuron Models (Cambridge University Press, Cambridge UK, 2002). [18] Cunningham, J., Yu, B., Shenoy, K. & Sahani, M. Inferring neural firing rates from spike trains using Gaussian processes. Advances in Neural Information Processing Systems 20, 329–336 (2008). [19] Huys, Q., Zemel, R., Natarajan, R. & Dayan, P. Fast population coding. Neural Computation 19, 404–441 (2007). [20] Pillow, J. et al. Spatio-temporal correlations and visual signalling in a complete neuronal population. Nature 454, 995–999 (2008). 9
2009
226
3,733
Randomized Pruning: Efficiently Calculating Expectations in Large Dynamic Programs Alexandre Bouchard-Cˆot´e1 Slav Petrov2,† bouchard@cs.berkeley.edu slav@google.com 1Computer Science Division University of California at Berkeley Berkeley, CA 94720 Dan Klein1 klein@cs.berkeley.edu 2Google Research 76 Ninth Ave New York, NY 10011 Abstract Pruning can massively accelerate the computation of feature expectations in large models. However, any single pruning mask will introduce bias. We present a novel approach which employs a randomized sequence of pruning masks. Formally, we apply auxiliary variable MCMC sampling to generate this sequence of masks, thereby gaining theoretical guarantees about convergence. Because each mask is generally able to skip large portions of an underlying dynamic program, our approach is particularly compelling for high-degree algorithms. Empirically, we demonstrate our method on bilingual parsing, showing decreasing bias as more masks are incorporated, and outperforming fixed tic-tac-toe pruning. 1 Introduction Many natural language processing applications, from discriminative training [18, 9] to minimumrisk decoding [16, 34], require the computation of expectations over large-scale combinatorial spaces. Problem scale comes from a combination of large constant factors (such as the massive grammar sizes in monolingual parsing) or high-degree algorithms (such as the many dimensions of bitext parsing). In both cases, the primary mechanism for efficiency has been pruning, wherein large regions of the search space are skipped on the basis of some computation mask. For example, in monolingual parsing, entire labeled spans may be skipped on the basis of posterior probabilities in a coarse grammar [17, 7]. Conditioning on these masks, the underlying dynamic program can be made to run arbitrarily quickly. Unfortunately, aggressive pruning introduces biases in the resulting expectations. As an extreme example, features with low expectation may be pruned down to zero if their supporting structures are completely skipped. One option is to simply prune less aggressively and spend more time on a single, more exhaustive expectation computation, perhaps by carefully tuning various thresholds [26, 12] and using parallel computing [9, 38]. However, we present a novel alternative: randomized pruning. In randomized pruning, multiple pruning masks are used in sequence. The resulting sequence of expectation computations are averaged, and errors average out over the multiple computations. As a result, time can be directly traded against approximation quality, and errors of any single mask can be overcome. Our approach is based on the idea of auxiliary variable sampling [31], where a set of auxiliary variables formalizes the idea of a pruning mask. Resampling the auxiliary variables changes the mask at each iteration, so that the portion of the chart that is unconstrained at a given iteration can improve the mask for subsequent iterations. In other words, pruning decisions are continuously revisited and revised. Since our approach is formally grounded in the framework of block Gibbs sampling [33], it inherits desirable guarantees as a consequence. If one needs successively better †Work done while at the University of California at Berkeley. 1 (b) + ! ! + ! ! + ! + + + ! + + ! 0 1 2 3 4 5 (a) S NP P She VP V heard NP the noise . . 0 1 2 3 4 5 . (c) .. . + + + + + a(0, 5) a(3, 4) · · · · · · a(0, 3) · · · ! a(0, 1) T s Figure 1: A parse tree (a) and the corresponding chart cells (b), from which the assignment vector (c) is extracted. Not shown are the labels of the dynamic programming chart cells. approximations, more iterations can be performed, with a guarantee of convergence to the true expectations. In practice, of course, we are only interested in the behavior after a finite number of iterations: the method would be useless if it did not outperform previous heuristics in the time range bounded by the exact computation time. Here, we investigate empirical performance on English-Chinese bitext parsing, showing that bias decreases over time. Moreover, we show that our randomized pruning outperforms standard single-mask tic-tac-toe pruning [40], achieving lower bias over a range of total computation times. Our technique is orthogonal to approaches that use parallel computation [9, 38], and can be additionally parallelized at the sentence level. In what follows, we explain the method in the context of parsing to make the exposition more concrete, and because our experiments are on similar combinatorial objects (bitext derivations). Note, however, that the applicability of this approach is in no way limited to parsing. The settings in which randomized pruning will be most advantageous will be those in which high-order dynamic programs can be vastly sped up by masking, yet no single aggressive mask is likely to be adequate. 2 Randomized pruning 2.1 The need for expectations Algorithms for discriminative training, consensus decoding, and unsupervised learning typically involve repetitively computing a large number of expectations. In discriminative training of probabilistic parsers, for example [18, 32], one needs to repeatedly parse the entire training set in order to compute the necessary expected feature counts. In this setup (Figure 1), the conditional distribution of a tree-valued random variable T given a yield y(T) = w is modeled using a log-linear model : Pθ(T = t|y(T) = w) = exp{⟨θ, f(t, w)⟩−log Z(θ, w)}, in which θ ∈RK is a parameter vector and f(t, w) ∈RK is a feature function. Training such a model involves the computation of the following gradient in between each update of θ (skipping an easy to compute regularization term): ∇log ! i∈I Pθ(T = ti|y(T) = wi) = " i∈I # f(ti, wi) −Eθ[f(T, wi)|y(T) = wi] $ , where {wi : i ∈I} are the training sentences with corresponding gold trees {ti}. The first term in the above equation can be computed in linear time, while the second requires a cubic-time dynamic program (the inside-outside algorithm), which computes constituent posteriors for all possible spans of words (the chart cells in Figure 1). Hence, computing expectations is indeed the bottleneck here. While it is not impossible to calculate these expectations exactly, this is computationally very expensive, limiting previous work to toy setups with 15 word sentences [18, 32, 35], or necessitating aggressive pruning [26, 12] that is not well understood. 2.2 Approximate expectations with a single pruning mask In the case of monolingual parsing, the computation of feature count expectations is usually approximated with a pruning mask which allows the omission of low probability constituents. Formally, a pruning mask is a map from the set M of all possible spans to the set {prune, keep}, indicating 2 t wever, that the applicability of this approach is in no way limited to parsing. The settings randomized pruning will be most advantageous will be those in which high-order dynamic s can be vastly sped up by masking, yet no single aggressive mask is likely to be adequate. ndomized pruning e need for expectations ms for discriminative training, consensus decoding, and unsupervised learning typically epetitively computing a large number of expectations. In discriminative training of probaarsers, for example [18, 32], one needs to repeatedly parse the entire training set in order to the necessary expected feature counts. In this setup (Figure 1), the conditional distribution -valued random variable T given a yield y(T) = w is modeled using a log-linear model : t|y(T) = w) = exp{⟨θ, f(t, w)⟩−log Z(θ, w)}, in which θ ∈RK is a parameter vector w) ∈RK is a feature function. Training such a model involves the computation of the g gradient in between each update of θ (skipping an easy to compute regularization term): ∇log ! i∈I Pθ(T = ti|y(T) = wi) = " i∈I # f(ti, wi) −Eθ[f(T, wi)|y(T) = wi] $ , wi : i ∈I} are the training sentences with corresponding gold trees {ti}. term in the above equation can be computed in linear time, while the second requires a me dynamic program (the inside-outside algorithm), which computes constituent posteriors ossible spans of words (the chart cells in Figure 1). Hence, computing expectations is he bottleneck here. While it is not impossible to calculate these expectations exactly, this utationally very expensive, limiting previous work to toy setups with 15 word sentences 35], or necessitating aggressive pruning [26, 12] that is not well understood. proximate expectations with a single pruning mask se of monolingual parsing, the computation of feature count expectations is usually approxwith a pruning mask which allows the omission of low probability constituents. Formally, g mask is a map from the set M of all possible spans to the set {prune, keep}, indicating 2 Tree Assignments Figure 1: A parse tree, from which the assignment variables are extracted. A linearization into an assignment vector is shown at the right. approximations, more iterations can be performed, with a guarantee of convergence to the true expectations. In practice, of course, we are only interested in the behavior after a finite number of iterations: the method would be useless if it did not outperform previous heuristics in a time range bounded by the exact computation time. Here, we investigate empirical performance on English-Chinese bitext parsing, showing that bias decreases over time. Moreover, we show that our randomized pruning outperforms standard single-mask tic-tac-toe pruning [40], achieving lower bias over a range of total computation times. Our technique is orthogonal to approaches that use parallel computation [9, 38], and can be additionally parallelized at the sentence level. In what follows, we explain the method in the context of parsing because it makes the exposition more concrete, and because our experiments are on similar combinatorial objects (bitext derivations). Note, however, that the applicability of this approach is in no way limited to parsing. The settings in which randomized pruning will be most advantageous will be those in which high-order dynamic programs can be vastly sped up by masking, yet no single aggressive mask is likely to be adequate. 2 Randomized pruning 2.1 The need for expectations Algorithms for discriminative training, consensus decoding, and unsupervised learning typically involve repetitively computing a large number of expectations. In discriminative training of probabilistic parsers, for example [18, 32], one needs to repeatedly parse the entire training set in order to compute the necessary expected feature counts. In this setup (Figure 1), the conditional distribution of a tree-valued random variable T given a yield y(T) = w is modeled using a log-linear model : Pθ(T = t|y(T) = w) = exp{⟨θ, f(t, w)⟩−log Z(θ, w)}, in which θ ∈RK is a parameter vector and f(t, w) ∈RK is a feature function. Training such a model involves the computation of the following gradient in between each update of θ: ∇log Y i∈I Pθ(T = ti|y(T) = wi) = X i∈I n f(ti, wi) −Eθ[f(T, wi)|y(T) = wi] o , where {wi : i ∈I} are the training sentences with corresponding gold trees {ti}. The first term in the above equation can be computed in linear time, while the second requires a cubic-time dynamic program (the inside-outside algorithm), which computes constituent posteriors for all possible spans of words (the chart cells in Figure 1). Hence, computing expectations is indeed the bottleneck here. While it is not impossible to calculate these expectations exactly, it is computationally very expensive, limiting previous work to toy setups with 15 word sentences [18, 32, 35], or necessitating aggressive pruning [26, 12] that is not well understood. 2 0 0 0 1 0 0 1 1 0 0 0 0 0 0 0 0 1 2 3 4 5 + − − − + −+ − + + +−− + + 0 1 2 3 4 5 0 1 2 3 4 5 Selections Assignments Masks 1 selected 0 excluded + positive −negative keep prune Figure 2: An example of how a selection vector s and an assignment vector a are turned into a pruning mask m. 2.2 Approximate expectations with a single pruning mask In the case of monolingual parsing, the computation of feature count expectations is usually approximated with a pruning mask, which allows the omission of low probability constituents. Formally, a pruning mask is a map from the set M of all possible spans to the set {prune, keep}, indicating whether a given span is to be ignored. It is easy to incorporate such a pruning mask into existing dynamic programming algorithms for computing expectations: Whenever a dynamic programming state is considered, we first consult the mask and skip over the pruned states, greatly accelerating the computation (see Algorithm 3 for a schematic description of the pruned inside pass). However, the expected feature counts Em[f] computed by pruned inside-outside with a single mask m are not exact, introducing a systematic error and biasing the model in undesirable ways. 2.3 Approximate expectations with a sequence of masks To reduce the bias resulting from the use of a single pruning mask, we propose a novel algorithm that can combine several masks. Given a sequence of masks, m(1), m(2), . . . , m(N), we will average the expectations under each of them 1 N PN i=1 Em(i)[f]. Our contribution is to show a principled way of computing a sequence of masks such that this average not only has theoretical guarantees, but also has good finite-sample performance. The key is to define a set of auxiliary variables, and we present this construction in more detail in the following sections. In this section, we present the algorithm operationally. The masks are defined via two vector-valued Markov chains: a selection chain with current value denoted by s, and an assignment chain with current value a. Both s and a are vectors with coordinates indexed by spans over the current sentence: ι ∈M = {⟨j, k⟩: 0 ≤j < k ≤n = |w|}. Elements sι specify whether a span ι will be selected (sι = 1) or excluded (0) in the current iteration (i). The assignment vector a then determines, for each span, whether it would be forbidden if selected (or negative, aι = −) or required (positive, +) to be a constituent. Our masks m = m(s, a) are generated deterministically from the selection and assignment vectors. The deterministic procedure uses s to pick a few spans and values to fix from a, forming a mask m. Note that a single span ι that is both positive and selected implies that all of the spans κ crossing ι should be pruned (i.e. all of the spans such that neither ι ⊆κ nor κ ⊆ι holds). This compilation of the pruning constraints is described in Algorithm 2. The type of the return value m of this function is also a vector with coordinates corresponding to spans: mι ∈{prune, keep}. Computation of this mask is illustrated on a concrete example in Figure 2.1 We can now summarize how randomized pruning works (see Algorithm 1 for pseudocode). At the beginning of every iteration (i), the first step is to sample new values of the selection vector conditioning on the current selection vector. We will refer to the transition probability of this Markov chain on selection vectors as k∗. Once a new mask m has been precomputed from the current selection vector and assignments, pruned inside-outside scores are computed using this mask. The 1It may seem that Algorithm 2 is also slow, introducing a new bottleneck. However, |s| is small in practice, and the constant is much smaller since it does not depend on the grammar, making this algorithm fast in practice. 3 E ←0 for i ∈1, 2, . . . , N do s ∼k∗(s, ·) m ←CreateMask(a, s) Compute PrunedInside(w,m) Compute PrunedOutside(w,m) S ←E + Emf a ∼ks(a, ·) return E N Algorithm 2 : CreateMask(s,a) for ι ∈M do for κ ∈s do if aι = −and ι = κ then mι ←prune continue outer loop if aι = + and ι ⊈κ and κ ⊈ι then mι ←prune continue outer loop mι ←keep return m Algorithm 3 : PrunedInside(w, m) {Initialize the chart in the standard way} for ι = ⟨j, k⟩∈M, bottom-up do if mι = keep then for l : j < l < k do if m⟨j,l⟩= m⟨l,k⟩= keep then {Loop over grammar symbols, update inside scores in the standard way} return chart Consider now the problem of jointly resampling the block containing T and a collection of excluded auxiliary variables {Aι : ι /∈s} given a collection of selected ones. We can write the decomposition: P ` T = t, S|C ´ = P(T = t|C) Y ι/∈s P ` Aι = aι|T = t ´ = P(T = t|C) Y ι/∈s 1 ˘ aι = 1[ι ∈t] ¯ where S = ! Aι = aι : ι /∈s " is a configuration of the excluded auxiliary variables and C = ! Aι = aι : ι ∈s " is a configuration of the selected ones. The first factor in the second line is again a pruned dynamic program (described in Algorithm 3). The product of indicator functions shows that once a 5 if aι = −and ι = κ then mι ←prune continue outer loop if aι = + and ι ⊈κ and κ ⊈ι then mι ←prune continue outer loop mι ←keep return m Algorithm 3 : PrunedInside(w, m) {Initialize the chart in the standard way} for ι = ⟨j, k⟩∈M, bottom-up do if mι = keep then for l : j < l < k do if m⟨j,l⟩= m⟨l,k⟩= keep then {Loop over grammar symbols, update inside scores in the standard way} return chart Consider now the problem of jointly resampling the block containing T and a collectio auxiliary variables {Aι : ι /∈s} given a collection of selected ones. We can write the d P ` T = t, S|C ´ = P(T = t|C) Y ι/∈s P ` Aι = aι|T = t ´ = P(T = t|C) Y ι/∈s 1 ˘ aι = 1[ι ∈t] ¯ where S = ! Aι = aι : ι /∈s " is a configuration of the excluded auxiliary variables a aι : ι ∈s " is a configuration of the selected ones. The first factor in the second line is dynamic program (described in Algorithm 3). The product of indicator functions sho 5 v w g y v , p T is deterministic. We therefore require that P(|s| < |M| i.o.) = 1 to maintain irreducibility. We now describe in more detail the effect that each setting of a, s has on the posterior distribution on T. We start by developing the form of the posterior distribution over trees when there is a single selected auxiliary variable, i.e. T|(Aι = a). If a = −, sampling from T|Aι = ι requires the same dynamic program as for exact sampling, except that a single cell in the chart is pruned (the cell ι). The setting where a = + is more interesting: in this case significantly more cells can be pruned. Indeed, all constituents overlapping with ι are pruned. This can lead to a speed-up of up to a multiplicative constant of 8 = 23, when the span ι has length |ι| = |w| 2 . More constraints are maintained during resampling steps in practice (i.e. |s| > 1), leading to a high empirical speedup. Algorithm 1 : AuxVar(w, f) a, s ←random initialization E ←0 for i ∈1, 2, . . . , N do s ∼k∗(s, ·) m ←CreateMask(s, a) Compute PrunedInside(w,m) Compute PrunedOutside(w,m) E ←E + Emf a ∼ks(a, ·) return E N Consider now the problem of jointly resampling the block containing T and a collection of excluded auxiliary variables {Aι : ι /∈s} given a collection of selected ones. We can write the decomposition: P ` T = t, S|C ´ = P(T = t|C) Y ι/∈s P ` Aι = aι|T = t ´ = P(T = t|C) Y ι/∈s 1 ˘ aι = 1[ι ∈t] ¯ , where S = ! Aι = aι : ι /∈s " is a configuration of the excluded auxiliary variables and C = ! Aι = aι : ι ∈s " is a configuration of the selected ones. The first factor in the second line is again a pruned dynamic program (described in Algorithm 3). The product of indicator functions shows that once a tree has been picked, the excluded auxiliary variables can be set to new values deterministically by reading from the sampled tree t whether ι is a constituent, for each ι /∈s. Given a selection vector s, we denote the induced block Gibbs kernel described above by ks(·, ·). Since this kernel depends on the previous state only through the assignments of the auxiliary variables, we can also write it as a transition kernel on the space {+, −}|M| of auxiliary variable assignments: ks(a, a′). 3.2 The selection chain There is a separate mechanism, k∗, that updates at each iteration the selection s of the auxiliary variables. This mechanism corresponds to picking which Gibbs operator ks will be used to transition in the Markov chain on assignments described above. We will denote the random variable corresponding to the selection vector s at state (i) by S(i). In standard treatments of MCMC algorithms [33, 22], the variables S(i) are restricted to be either independent (a mixture of kernels), or deterministic enumerations (an alternation of kernels). However this restriction can be relaxed to having S(i) be itself a Markov chain with kernel k∗: {0, 1}|M|×{0, 1}|M| →[0, 1]. This relaxation can be thought of as allowing stochastic policies for kernel selection. 3 3There is a short and intuitive argument to justify this relaxation. Let x∗be a state from k∗, and consider the set of paths P starting at x∗and extended until they first return to x∗. Many of these paths have infinite 5 Figure 3: Pseudo-code for randomized pruning in the case of monolingual parsing (assuming a grammar with no unaries except at pre-terminal positions. We have omitted PrunedOutside because of limited space, but its structure is very similar to PrunedInside. inside-outside scores are then used in two ways: first, to calculate the expected feature counts under the pruned model, Em[f], which are added to a running average; second, to resample new values for the assignment vector.2 Let us describe in more detail how a new assignment vector a′ is updated given the previous assignment a. This is a two step update process. First, a tree t is sampled from the chart computed by PrunedInside(w, m) (Figure 1, left). This can be done in quadratic time using a standard algorithm [19, 13]. Next, the assignments are set to a new value deterministically as follows: for each span ι, aι = + if ι is a constituent in t, and aι = −otherwise (Figure 1, right). We will denote this property by [ι ∈t]. We defer to Section 3.2 for the description of the selection vector updates—the form of these updates will be easier to motivate after the analysis of the algorithm. 3 Analysis In this section we show that the procedure described above can be viewed as running an MCMC algorithm. This implies that the guarantees associated with this class of algorithms extend to our procedure. In particular, consistency holds: 1 N PN i=1 Em(i)f a.s. −→Ef. 3.1 Auxiliary variables and the assignment Markov chain We start by formally describing the Markov chain over assignments. This is done by defining a collection of Gibbs operators ks(·, ·) indexed by a selection vectors s. The original state space (the space of trees) does not easily decompose into a graphical model where textbook Gibbs sampling could be applied, so we first augment the state space with auxiliary variables. Broadly speaking, an auxiliary variable is a state augmentation such that the target distribution is a marginal of the expanded distribution. It is called auxiliary because the parts of the samples corresponding to the augmentation are discarded at the end of the computation. At an intermediate stage, however, the state augmentation helps explore the space efficiently. This technique is best explained with a concrete example in our parsing setup. In this case, the augmentation is a collection of |M| binary-valued random variables, each corresponding to a span of the current sentence w. The auxiliary variable corresponding to span ι ∈M will be denoted by Aι. We define the auxiliary variables by specifying their conditional distribution Aι|(T = t). This conditional is a deterministic function: P(Aι|T = t) = [ι ∈t]. With this augmentation, we can now describe the sampler. It is a block Gibbs sampler, meaning that it resamples a subset of the random variables, conditioning on the other ones. Even when the subsets selected across iterations overlap, acceptance probabilities are still guaranteed to be one [33]. 2The second operation only needs the inside scores. 4 The blocks of resampled variables will always contain T as well as a subset of the excluded auxiliary variables. Note that when conditioning on all of the auxiliary variables, the posterior distribution on T is deterministic. We therefore require that P(|s| < |M| i.o.) = 1 to maintain irreducibility. We now describe in more detail the effect that each setting of a, s has on the posterior distribution on T. We start by developing the form of the posterior distribution over trees when there is a single selected auxiliary variable, i.e. T|(Aι = a). If a = −, sampling from T|Aι = ι requires the same dynamic program as for exact sampling, except that a single cell in the chart is pruned (the cell ι). The setting where a = + is more interesting: in this case significantly more cells can be pruned. Indeed, all constituents overlapping with ι are pruned. This can lead to a speed-up of up to a multiplicative constant of 8 = 23, when the span ι has length |ι| = |w| 2 . More constraints are maintained during resampling steps in practice (i.e. |s| > 1), leading to a large empirical speedup. Consider now the problem of jointly resampling the block containing T and a collection of excluded auxiliary variables {Aι : ι /∈s} given a collection of selected ones. We can write the decomposition: P ` T = t, S|C ´ = P(T = t|C) Y ι/∈s P ` Aι = aι|T = t ´ = P(T = t|C) Y ι/∈s 1 ˘ aι = [ι ∈t] ¯ , where S = Aι = aι : ι /∈s  is a configuration of the excluded auxiliary variables and C = Aι = aι : ι ∈s  is a configuration of the selected ones. The first factor in the second line is again a pruned dynamic program (described in Algorithm 3). The product of indicator functions shows that once a tree has been picked, the excluded auxiliary variables can be set to new values deterministically by reading from the sampled tree t whether ι is a constituent, for each ι /∈s. Given a selection vector s, we denote the induced block Gibbs kernel described above by ks(·, ·). Since this kernel depends on the previous state only through the assignments of the auxiliary variables, we can also write it as a transition kernel on the space {+, −}|M| of auxiliary variable assignments: ks(a, a′). 3.2 The selection chain There is a separate mechanism, k∗, that updates at each iteration the selection s of the auxiliary variables. This mechanism corresponds to picking which Gibbs operator ks will be used to transition in the Markov chain on assignments described above. We will denote the random variable corresponding to the selection vector s at state (i) by S(i). In standard treatments of MCMC algorithms [33, 22], the variables S(i) are restricted to be either independent (a mixture of kernels), or deterministic enumerations (an alternation of kernels). However this restriction can be relaxed to having S(i) be itself a Markov chain with kernel k∗: {0, 1}|M|×{0, 1}|M| →[0, 1]. This relaxation can be thought of as allowing stochastic policies for kernel selection.3 The choice of k∗is important. To understand why, recall that in the situation where (Aι = −), a single cell in the chart is pruned, whereas in the case where (Aι = +), a large fraction of the chart can be ignored. The construction of k∗is therefore where having a simpler model or heuristic at hand can play a role: as a way to favor the selection of constituents that are likely to be positive, so that better speedup can be achieved. Note that the algorithm can recover from mistakes in the simpler model, since the assignments of the auxiliary variables are also resampled. Another issue that should be considered when designing k∗is that it should avoid self-transitions (repeating the same set of selections). To see why, note that if (s, a) = (s′, a′), then m = m(s, a) = 3There is a short and intuitive argument to justify this relaxation. Let x∗be a state from k∗, and consider the set of paths P starting at x∗and extended until they first return to x∗. Many of these paths have infinite length, however if k∗is positive recurrent, k∗(·, ·), will assign probability zero to these paths. We then use the following reduction: when the chain is at x∗, first pick a path from P under the distribution induced by k∗(this is a mixture of kernels). Once a path is selected, deterministically follow the edges in the path until coming back to x∗(alternation of kernels). Since mixtures and alternations of π-invariant kernels preserve π-invariance, we are done. 5 m(s′, a′) = m′ and hence Emf+Em′f 2 = Emf. The estimator is unchanged in this case, even after paying the computational cost of a second iteration. The mechanism we used takes both of these issues into consideration. First, it uses a simpler model (for instance a grammar with fewer non-terminal symbols) to pick a subset M ′ ⊆M of the spans that have high posterior probability. Our kernel k∗is restricted to selection vectors s such that s ⊆M ′. Next, in order to avoid repetition, our kernel transitions from a previous selection s to the next one, s′, as follows: after picking a random subset R ⊂s of size |s| 2 , define s′ = (M ′\s) ∪R. Provided that the chain is initialized with |s| = 2|M ′| 3 , this scheme has the property that it changes a large portion of the state at every iteration (more precisely, |s ∩s′| = 1 3), and moreover all subsets of M ′ of size 2|M ′| 3 are eventually resampled with probability one. Note that this update depends on the previous selection vector, but not on the assignment vector. Given the asymmetric effect between conditioning on positive versus negative auxiliary variables, it is tempting to let the k∗depend on the current assignment of the auxiliary variables. Unfortunately such schemes will not converge to the correct distribution in general. Counterexamples are given in the adaptive MCMC literature [2]. 3.3 Accelerated averaging In this section, we justify the way expected sufficient statistics are estimated from the collection of samples. In other words, how the variable E is updated in Algorithm 1. In a generic MCMC situation, once samples X(1), X(2), . . . are collected, the traditional way of estimating expected sufficient statistics f is to average “hard counts,” i.e. to use the estimator: SN = 1 N PN i=1 f(X(i)). In our case X(i) contains the current tree and assignments, (T (i), A(i)). For general Metropolis-Hastings chains, this is often the only method available. On the other hand, in our parsing setup—and more generally, with any Gibbs sampler—it turns out that there is a more efficient way of combining the samples [23]. The idea behind this alternative is to take “soft counts.” This is what we do when we add Emf to the running average in Algorithm 1. Suppose we have extracted samples X(1), X(2), . . . , X(i), with corresponding selection vectors S(1), S(2), . . . , S(i). In order to transition to the next step, we will have to sample from the probability distribution denoted by kS(i)(X(i), ·). In the standard setting, we would extract a single sample X(i+1) and add f(X(i+1)) to a running average. More formally, the accelerated averaging method consists of adding the following soft count instead: R f(x)kS(i)(X(i), dx), which can be computed with one extra pruned outside computation in our parsing setup. This quantity was denoted Emf in the previous section. The final estimator then has the form:4 S′ N = 1 N−1 PN−1 i=1 R f(x) kS(i) X(i), dx  . 4 Experiments While we used the task of monolingual parsing to illustrate our randomized pruning procedure, the technique is most powerful when the dynamic program is a higher-order polynomial. We therefore demonstrate the utility of randomized pruning on a bitext parsing task. In bitext parsing, we have sentence-aligned corpora from two languages, and are computing expectations over aligned parse trees [6, 28]. The model we use is most similar to [3], but we extend this model and allow rules to mix terminals and non-terminals, as is often done in the context of machine translation [8]. These rules were excluded in [3] for tractability reasons, but our sampler allows efficient sampling in this more challenging setup. In the terminology of adaptor grammars [19], our sampling step involves resampling an adapted derivation given a base measure derivation for each sentence. Concretely, the problem is to sample from a class of isotonic bipartite graphs over the nodes of two trees. By isotonic we mean that the 4As a side note, we make the observation that this estimator is reminiscent of a structure mean field update. It is different though, since it is still an asymptotically unbiased estimator, while mean fields approximations converge in finite time to a biased estimate. 6 40 60 80 100 120 Product length 10 100 1000 1x104 1x105 1x106 1x107 Mean time (ms) Exact Sampling step (a) 40 60 80 100 120 Product length 500 1500 2500 3500 Speed-up (b) 60 80 100 120 140 Product length 0 0.5 1 1.5 2 Mean L2 bias Fixed Auxiliary variables (c) 1000 10000 100000 Mean time (ms) 0 0.5 1 1.5 2 Mean L2 bias Tic-tac-toe Auxiliary variables (d) Figure 4: Because each sampling step is three orders of magnitude faster than the exact computation (a,b), we can afford to average over multiple samples and thereby reduce the L2 bias compared to a fixed pruning scheme (c). Our auxiliary variable sampling scheme also substantially outperforms the tic-tac-toe pruning heuristic (d). edges E of this bipartite graph should have the property that if two non-terminals α, α′ and β, β′ are aligned in the sampled bipartite graph, i.e. (α, α′) ∈E and (β, β′) ∈E, then α ≥β ⇒α′ ≥β′, where α ≥β denotes that α is an ancestor of β. The weight (up to a proportionality constant) of each of these alignments is obtained as follows: first, consider each aligned point as the left-hand of a rule. Next, multiply the score of these rules. If we let p, q be the length of the two sentences, one can check that this yields a dynamic program of complexity O(pb+1qb+1), where b is the branching factor (we follow [3] and use b = 3). We picked this particular bilingual bitext parsing formalism for two reasons. First, it is relevant to machine translation research. Several researchers have found that state-of-the-art performance can be attained using grammars that mix terminals and non-terminals in their rules [8, 14]. Second, the randomized pruning method is most competitive in cases where the dynamic program has a sufficiently high degree. We did experiments on monolingual parsing that showed that the improvements were not significant for most sentence lengths, and inferior to the coarse-to-fine method of [25]. The bitext parsing version of the randomized pruning algorithm is very similar to the monolingual case. Rather than being over constituent spans, our auxiliary variables in the bitext case are over induced alignments of synchronous derivations. A pair of words is aligned if it is emitted by the same synchronous rule. Note that this includes many-to-many and null alignments since several or zero lexical elements can be emitted by a single rule. Given two aligned sentences, the auxiliary variables Ai,j are the pq binary random variables indicating whether word i is aligned with word j. To compare our approximate inference procedure to exact inference, we follow previous work [15, 29] and measure the L2 distance between the pruned expectations and the exact expectations.5 4.1 Results We ran our experiments on the Chinese Treebank (and its English translation) [39], limiting the product of the sentence lengths of the two sentences to p × q ≤130. This was necessary because computing exact expectations (as needed for comparing to our baseline) quickly becomes prohibitive. Note that our pruning method, in contrast, can handle much longer sentences without problem—one pass through all 1493 sentences with a product length of less than 1000 took 28 minutes on one 2.66GHz Xeon CPU. We used the BerkeleyAligner [21] to obtain high-precision, intersected alignments to construct the high-confidence set M ′ of auxiliary variables needed for k∗(Section 3.2)—in other words, to construct the support of the selection chain S(i). For randomized pruning to be efficient, we need to be able to extract a large number of samples within the time required for computing the exact expectations. Figure 4(a) shows the average time required to compute the full dynamic program and the dynamic program required to extract a single sample for varying sentence product lengths. The ratio between the two (explicitly shown in 5More precisely, we averaged this bias across the sentence-pairs: bias(θ) = 1 |I| P i∈I PK k=1 “ Eθ,i[fk] − ˜Eθ,i[fk] ”2 , where Eθ,i[f], ˜Eθ,i[f] are shorthands notations for exact and approximate expectations. 7 Figure 4(b)) increases with the sentence lengths, and reaches three orders of magnitude, making it possible to average over a large number of samples, while still greatly reducing computation time. We can compute expectations for many samples very efficiently, but how accurate are the approximated expectations? Figure 4(c) shows that averaging over several masks reduces bias significantly. In particular, the bias increases considerably for longer sentences when only a single sample is used, but remains roughly constant when we average multiple samples. To determine the number of samples in this experiment, we measured the time required for exact inference, and ran the auxiliary variable sampler for half of that time. The main point of Figure 4(c) is to show that under realistic running time conditions, the bias of the auxiliary variable sampler stays roughly constant as a function of sentence length. Finally, we compared the auxiliary variable algorithm to tic-tac-toe pruning, a heuristic proposed in [40] and improved in [41]. Tic-tac-toe is an algorithm that efficiently precomputes a figure of merit for each bispan. This figure of merit incorporates an inside score and an outside score. To compute this score, we used a product of the two IBM model 1 scores (one for each directionality). When a bispan figure of merit falls under a threshold, it is pruned away. In Figure 4(d), each curve corresponds to a family of heuristics with varying aggressiveness. With tic-tac-toe, aggressiveness is increased via the cut-off threshold, while with the auxiliary variable sampler, it is controlled by letting the sampler run for more iterations. For each algorithm, its coordinates correspond to the mean L2 bias and mean time in milliseconds per sentence. The plot shows that there is a large regime where the auxiliary variable algorithm dominates tic-tac-toe for this task. Our method is competitive up to a mean running time of about 15 sec/sentence, which is well above the typical running time one needs for realistic, large scale training. 5 Related work There is a large body of related work on approximate inference techniques. When the goal is to maximize an objective function, simple beam pruning [10] can be sufficient. However, as argued in [4], beam pruning is not appropriate for computing expectations because the resulting approximation is too concentrated around the mode. To overcome this problem, [5] suggest adding a collection of samples to a beam of k-best estimates. Their approach is quite different to ours as no auxiliary variables are used. Auxiliary variables are quite versatile and have been used to create MCMC algorithms that can exploit gradient information [11], efficient samplers for regression [1], for unsupervised Bayesian inference [31], automatic sampling of generic distribution [24] and non-parametric Bayesian statistics [37, 20, 36]. In computer vision, in particular, an auxiliary variable sampler developed by [30] is widely used for image segmentation [27]. 6 Conclusion Mask-based pruning is an effective way to speed up large dynamic programs for calculating feature expectations. Aggressive masks introduce heavy bias, while conservative ones offer only limited speed-ups. Our results show that, at least for bitext parsing, using many randomized aggressive masks generated with an auxiliary variable sampler is superior in time and bias to using a single, more conservative one. The applicability of this approach is in no way limited to the cases considered here. Randomized pruning will be most advantageous when high-order dynamic programs can be vastly sped up by masking, yet no single aggressive mask is likely to be adequate. References [1] J. Albert and S. Chib. Bayesian analysis of binary and polychotomous response data. JASA, 1993. [2] C. Andrieu and E. Moulines. On the ergodicity properties of some adaptive MCMC algorithms. Ann. Appl. Probab., 2006. [3] P. Blunsom, T. Cohn, C. Dyer, and M. Osborne. A Gibbs sampler for phrasal synchronous grammar induction. In EMNLP, 2009. 8 [4] P. Blunsom, T. Cohn, and M. Osborne. A discriminative latent variable model for statistical machine translation. In ACL-HLT, 2008. [5] P. Blunsom and M. Osborne. Probabilistic inference for machine translation. In EMNLP, 2008. [6] D. Burkett and D. Klein. Two languages are better than one (for syntactic parsing). In EMNLP ’08, 2008. [7] E. Charniak and M. Johnson. Coarse-to-fine n-best parsing and maxent discriminative reranking. In ACL, 2005. [8] D. Chiang. A hierarchical phrase-based model for statistical machine translation. In ACL, 2005. [9] S. Clark and J. R. Curran. Parsing the WSJ using CCG and log-linear models. In ACL, 2004. [10] M. Collins. Head-Driven Statistical Models for Natural Language Parsing. PhD thesis, UPenn, 1999. [11] S. Duane, A. D. Kennedy, B. J. Pendleton, and D. Roweth. Hybrid Monte Carlo. Physics Letters B, 1987. [12] J. Finkel, A. Kleeman, and C. Manning. Efficient, feature-based, conditional random field parsing. In ACL, 2008. [13] J. R. Finkel, C. D. Manning, and A. Y. Ng. Solving the problem of cascading errors: Approximate Bayesian inference for linguistic annotation pipelines. In EMNLP, 2006. [14] M. Galley, M. Hopkins, K. Knight, and D. Marcu. What’s in a translation rule? In HLT-NAACL, 2004. [15] A. Globerson and T. Jaakkola. Approximate inference using planar graph decomposition. In NIPS, 2006. [16] J. Goodman. Parsing algorithms and metrics. In ACL, 1996. [17] J. Goodman. Global thresholding and multiple-pass parsing. In EMNLP, 1997. [18] M. Johnson. Joint and conditional estimation of tagging and parsing models. In ACL, 2001. [19] M. Johnson, T. L. Griffiths, and S. Goldwater. Bayesian inference for PCFGs via Markov Chain Monte Carlo. In ACL, 2007. [20] P. Liang, M. I. Jordan, and B. Taskar. A permutation-augmented sampler for Dirichlet process mixture models. In ICML, 2007. [21] P. Liang, B. Taskar, and D. Klein. Alignment by agreement. In NAACL, 2006. [22] D. J. C. MacKay. Information Theory, Inference and Learning Algorithms. Cambridge U. Press, 2003. [23] I. W. McKeague and W. Wefelmeyer. Markov chain Monte Carlo and Rao-Blackwellization. Statistical Planning and Inference, 2000. [24] R. Neal. Slice sampling. Annals of Statistics, 2000. [25] S. Petrov and D. Klein. Improved inference for unlexicalized parsing. In HLT-NAACL ’07, 2007. [26] S. Petrov and D. Klein. Discriminative log-linear grammars with latent variables. In NIPS, 2008. [27] J. Shi and J. Malik. Normalized cuts and image segmentation. IEEE Transactions on Pattern Analysis and Machine Intelligence, 2000. [28] D. Smith and N. Smith. Bilingual parsing with factored estimation: Using english to parse korean. In EMNLP ’04, 2004. [29] D. A. Smith and J. Eisner. Dependency parsing by belief propagation. In EMNLP, 2008. [30] R. H. Swendsen and J. S. Wang. Nonuniversal critical dynamics in MC simulations. Rev. Lett, 1987. [31] M. A. Tanner and W. H. Wong. The calculation of posterior distributions by data augmentation. JASA, 1987. [32] B. Taskar, D. Klein, M. Collins, D. Koller, and C. Manning. Max-margin parsing. In EMNLP, 2004. [33] L. Tierney. Markov chains for exploring posterior distributions. The Annals of Statistics, 1994. [34] I. Titov and J. Henderson. Loss minimization in parse reranking. In EMNLP, 2006. [35] J. Turian, B. Wellington, and I. D. Melamed. Scalable discriminative learning for natural language parsing and translation. In NIPS, 2006. [36] J. Van Gael, Y. Saatci, Y. W. Teh, and Z. Ghahramani. Beam sampling for the infinite hidden Markov model. In ICML, 2008. [37] S. G. Walker. Sampling the Dirichlet mixture model with slices. Communications in Statistics - Simulation and Computation, 2007. [38] J. Wolfe, A. Haghighi, and D. Klein. Fully distributed em for very large datasets. In ICML ’08, 2008. [39] N. Xue, F-D Chiou, and M. Palmer. Building a large-scale annotated Chinese corpus. In COLING, 2002. [40] H. Zhang and D. Gildea. Stochastic lexicalized inversion transduction grammar for alignment. In ACL, 2005. [41] H. Zhang, C. Quirk, R. C. Moore, and D. Gildea. Bayesian learning of non-compositional phrases with synchronous parsing. In ACL, 2008. 9
2009
227
3,734
A Rate Distortion Approach for Semi-Supervised Conditional Random Fields Yang Wang†∗ Gholamreza Haffari†∗ Shaojun Wang‡ Greg Mori† †School of Computing Science ‡Kno.e.sis Center Simon Fraser University Wright State University Burnaby, BC V5A 1S6, Canada Dayton, OH 45435, USA {ywang12,ghaffar1,mori}@cs.sfu.ca shaojun.wang@wright.edu Abstract We propose a novel information theoretic approach for semi-supervised learning of conditional random fields that defines a training objective to combine the conditional likelihood on labeled data and the mutual information on unlabeled data. In contrast to previous minimum conditional entropy semi-supervised discriminative learning methods, our approach is grounded on a more solid foundation, the rate distortion theory in information theory. We analyze the tractability of the framework for structured prediction and present a convergent variational training algorithm to defy the combinatorial explosion of terms in the sum over label configurations. Our experimental results show the rate distortion approach outperforms standard l2 regularization, minimum conditional entropy regularization as well as maximum conditional entropy regularization on both multi-class classification and sequence labeling problems. 1 Introduction In most real-world machine learning problems (e.g., for text, image, audio, biological sequence data), unannotated data is abundant and can be collected at almost no cost. However, supervised machine learning techniques require large quantities of data be manually labeled so that automatic learning algorithms can build sophisticated models. Unfortunately, manual annotation of a large quantity of data is both expensive and time-consuming. The challenge is to find ways to exploit the large quantity of unlabeled data and turn it into a resource that can improve the performance of supervised machine learning algorithms. Meeting this challenge requires research at the cutting edge of automatic learning techniques, useful in many fields such as language and speech technology, image processing and computer vision, robot control and bioinformatics. A surge of semi-supervised learning research activities has occurred in recent years to devise various effective semi-supervised training schemes. Most of these semi-supervised learning algorithms are applicable only to multiclass classification problems [1, 10, 32], with very few exceptions that develop discriminative models suitable for structured prediction [2, 9, 16, 20, 21, 22]. In this paper, we propose an information theoretic approach for semi-supervised learning of conditional random fields (CRFs) [19], where we use the mutual information between the empirical distribution of unlabeled data and the discriminative model as a data-dependent regularized prior. Grandvalet and Bengio [15] and Jiao et al. [16] have proposed a similar information theoretic approach that used the conditional entropy of their discriminative models on unlabeled data as a data-dependent regularization term to obtain very encouraging results. Minimum entropy approach can be explained from data-smoothness assumption and is motivated from semi-supervised classification, using unlabeled data to enhance classification; however, its degeneracy is even more problematic and arguable by noting minimum entropy 0 can be achieved by putting all mass on one label and zeros for the rest of labels. As far as we know, there is no formal principled explanation for the validity of this minimum conditional entropy approach. Instead, our approach can be naturally cast into the rate ∗These authors contributed equally to this work. 1 distortion theory framework which is well-known in information theory [14]. The closest work to ours is the one by Corduneanu et al. [11, 12, 13, 28]. Both works are discriminative models and do indeed use mutual information concepts. There are two major distinctions between our work and theirs. First, their approach is essentially motivated from semi-supervised classification point of view and formulated as a communication game, while our approach is based on a completely different motivation, semi-supervised clustering that uses labeled data to enhance clustering and is formulated as a data compression scheme, thus leads to a formulation distinctive from Corduneanu et al. Second, their model is non-parametric, whereas ours is parametric. As a result, their model can be trained by optimizing a convex objective function through a variant of Blahut-Arimoto alternating minimization algorithm, whereas our model is more complex and the objective function becomes non-convex. In particular, training a simple chain structured CRF model [19] in our framework turns out to be intractable even if using Blahut-Arimoto’s type of alternating minimization algorithm. We develop a convergent variational approach to approximately solve this problem. Another relevant work is the information bottleneck (IB) method introduced by Tishby et al [30]. IB method is an information-theoretic framework for extracting relevant components of an input random variable X, with respect to an output random variable Y . Instead of directly compressing X to its representation Y subject to an expected distortion through a parametric probabilistic mapping like our proposed approach, IB method is performed by finding a third, compressed, non-parametric and model-independent representation T of X that is most informative about Y . Formally speaking, the notion of compression is quantified by the mutual information between T and X while the informativeness is quantified by the mutual information between T and Y . The solutions are characterized by the bottleneck equations and can be found by a convergent re-estimation method that generalizes the Blahut-Arimoto algorithm. Finally in contrast to our approach which minimizes both the negative conditional likelihood on labeled data and the mutual information between the hidden variables and the observations on unlabeled data for a discriminative model, Oliver and Garg [24] have proposed maximum mutual information hidden Markov models (MMIHMM) of semi-supervised training for chain structured graph. The objective is to maximize both the joint likelihood on labeled data and the mutual information between the hidden variables and the observations on unlabeled data for a generative model. It is equivalent to minimizing conditional entropy of a generative HMM for the part of unlabeled data. The maximum mutual information of a generative HMM was originally proposed by Bahl et al. [4] and popularized in speech recognition community [23], but it is different from Oliver and Garg’s approach in that an individual HMM is learned for each possible class (e.g., one HMM for each word string), and the point-wise mutual information between the choice of HMM and the observation sequence is maximized. It is equivalent to maximizing the conditional likelihood of a word string given observation sequence to improve the discrimination across different models [18]. Thus in essence, Bahl et al. [4] proposed a discriminative learning algorithm for generative HMMs of training utterances in speech recognition. In the following, we first motivate our rate distortion approach for semi-supervised CRFs as a data compression scheme and formulate the semi-supervised learning paradigm as a classic rate distortion problem. We then analyze the tractability of the framework for structured prediction and present a convergent variational learning algorithm to defy the combinatorial explosion of terms in the sum over label configurations. Finally we demonstrate encouraging results with two real-world problems to show the effectiveness of the proposed approach: text categorization as a multi-class classification problem and hand-written character recognition as a sequence labeling problem. Similar ideas have been successfully applied to semi-supervised boosting [31]. 2 Rate distortion formulation Let X be a random variable over data sequences to be labeled, and Y be a random variable over corresponding label sequences. All components, Yi, of Y are assumed to range over a finite label alphabet Y. Given a set of labeled examples, Dl = n (x(1), y(1)), · · · , (x(N), y(N)) o , and unlabeled examples, Du = n x(N+1), · · · , x(M)o , we would like to build a CRF model pθ(y|x) = 1 Zθ(x) exp  ⟨θ, f(x, y)⟩  over sequential input data x, where θ = (θ1, · · · , θK)⊤, f(x, y) = (f1(x, y), · · · , fK(x, y))⊤, and Zθ(x) = P y exp  ⟨θ, f(x, y)⟩  . Our goal is to learn such a model from the combined set of labeled and unlabeled examples, Dl ∪Du. For notational convenience, we assume that there are no identical examples in Dl and Du. 2 The standard supervised training procedure for CRFs is based on minimizing the negative log conditional likelihood of the labeled examples in Dl CL(θ) = − N X i=1 log pθ(y(i)|x(i)) + λU(θ) (1) where U(θ) can be any standard regularizer on θ, e.g. U(θ) = ∥θ∥2/2 and λ is a parameter that controls the influence of U(θ). Regularization can alleviate over-fitting on rare features and avoid degeneracy in the case of correlated features. Obviously, Eq. (1) ignores the unlabeled examples in Du. To make full use of the available training data, Grandvalet and Bengio [15] and Jiao et al. [16] proposed a semi-supervised learning algorithm that exploits a form of minimum conditional entropy regularization on the unlabeled data. Specifically, they proposed to minimize the following objective RLminCE(θ) = − N X i=1 log pθ(y(i)|x(i)) + λU(θ) −γ M X j=N+1 X y pθ(y|x(j)) log pθ(y|x(j)) (2) where the first term is the negative log conditional likelihood of the labeled data, and the third term is the conditional entropy of the CRF model on the unlabeled data. The tradeoff parameters λ and γ control the influences of U(θ) and the unlabeled data, respectively. This is equivalent to minimizing the following objective (with different values of λ and γ) RLminCE(θ) = D “ ˜pl(x, y), ˜pl(x)pθ(y|x) ” + λU(θ) + γ X x∈Du ˜pu(x)H “ pθ(y|x) ” (3) where D  ˜pl(x, y), ˜pl(x)pθ(y|x)  = P (x,y)∈Dl ˜pl(x, y) log ˜pl(x,y) ˜pl(x)pθ(y|x), H  pθ(y|x)  = P y pθ(y|x) log pθ(y|x). Here we use ˜pl(x, y) to denote the empirical distribution of both X and Y on labeled data Dl, ˜pl(x) to denote the empirical distribution of X on labeled data Dl, and ˜pu(x) to denote the empirical distribution of X on unlabeled data Du. In this paper, we propose an alternative approach for semi-supervised CRFs. Rather than using minimum conditional entropy as a regularization term on unlabeled data, we use minimum mutual information on unlabeled data. This approach has a nice and strong information theoretic interpretation by rate distortion theory. We define the marginal distribution pθ(y) of our discriminative model on unlabeled data Du to be pθ(y) = P x∈Du ˜pu(x)pθ(y|x) over the input data x. Then the mutual information between the empirical distribution ˜p(x) and the discriminative model is I “ ˜pu(x), pθ(y|x) ” = X x∈Du X y ˜pu(x)pθ(y|x) log “ ˜pu(x)pθ(y|x) ˜pu(x)pθ(y) ” = H “ pθ(y) ” − X x∈Du ˜pu(x)H “ pθ(y|x) ” where H  pθ(y)  = −P y P x∈Du ˜pu(x)pθ(y|x) log  P x∈Du ˜pu(x)pθ(y|x)  is the entropy of the label Y on unlabeled data. Thus in rate distortion terminology, the empirical distribution of unlabeled data ˜pu(x) corresponds to input distribution, the model pθ(y|x) corresponds to the probabilistic mapping from X to Y , and pθ(y) corresponds to the output distribution of Y . Our proposed rate distortion approach for semi-supervised CRFs optimizes the following constrained optimization problem, min θ I “ ˜pu(x), pθ(y|x) ” s.t. D “ ˜pl(x, y), ˜pl(x)pθ(y|x) ” + λU(θ) ≤d (4) The rationale for this formulation can be seen from an information-theoretic perspective using the rate distortion theory [14]. Assume we have a source X with a source distribution p(x) and its compressed representation Y through a probabilistic mapping pθ(y|x). If there is a large set of features (infinite in the extreme case), this probabilistic mapping might be too redundant. We’d better look for its minimum description. What determines the quality of the compression is the information rate, i.e. the average number of bits per message needed to specify an element in the representation without confusion. According to the standard asymptotic arguments [14], this quantity is bounded below by the mutual information I  p(x), pθ(y|x)  since the average cardinality of the partitioning of X is given by the ratio of the volume of X to the average volume of the elements of X 3 that are mapped to the same representation Y through pθ(y|x), 2H(X)/2H(X|Y ) = 2I(X,Y ). Thus mutual information is the minimum information rate and is used as a good metric for clustering [26, 27]. True distribution of X should be used to compute the mutual information. Since it is unknown, we use its empirical distribution on unlabeled data set Du and the mutual information I  ˜pu(x), pθ(y|x)  instead. However, information rate alone is not enough to characterize good representation since the rate can always be reduced by throwing away many features in the probabilistic mapping. This makes the mapping likely too simple and leads to distortion. Therefore we need an additional constraint provided through a distortion function which is presumed to be small for good representations. Apparently there is a tradeoff between minimum representation and maximum distortion. Since joint distribution gives the distribution for the pair of X and its representation Y , we choose the log likelihood ratio, log p(x,y) p(x)pθ(y|x), plus a regularized complexity term of θ, λU(θ), as the distortion function. Thus the expected distortion is the non-negative term D  p(x, y), p(x)pθ(y|x)  + λU(θ). Again true distributions p(x, y) and p(x) should be used here, but they are unknown. In semi-supervised setting, we have labeled data available which provides valuable information to measure the distortion: we use the empirical distributions on labeled data set Dl and the expected distortion D  ˜pl(x, y), ˜pl(x)pθ(y|x)  + λU(θ) instead to encode the information provided by labeled data, and add a distortion constraint we should respect for data compression to help the clustering. There is a monotonic tradeoff between the rate of the compression and the expected distortion: the larger the rate, the smaller is the achievable distortion. Given a distortion measure between X and Y on the labeled data set Dl, what is the minimum rate description required to achieve a particular distortion on the unlabeled data set Du? The answer can be obtained by solving (4). Following standard procedure, we convert the constrained optimization problem (4) into an unconstrained optimization problem which minimizes the following objective: RLMI(θ) = I “ ˜pu(x), pθ(y|x) ” + κ “ D “ ˜pl(x, y), ˜pl(x)pθ(y|x) ” + λU(θ) ” (5) where κ > 0, which again is equivalent to minimizing the following objective (with γ = 1 κ)1: RLMI(θ) = D “ ˜pl(x, y), ˜pl(x)pθ(y|x) ” + λU(θ) + γI “ ˜pu(x), pθ(y|x) ” (6) If (4) is a convex optimization problem, then for every solution θ to Eq. (4) found using some particular value of d, there is some corresponding value of γ in the optimization problem (6) that will give the same θ. Thus, these are two equivalent re-parameterizations of the same problem. The equivalence between the two problems can be verified using convex analysis [8] by noting that the Lagrangian for the constrained optimization (4) is exactly the objective in the optimization (5) (plus a constant that does not depend on θ), where κ is the Lagrange multiplier. Thus, (4) can be solved by solving either (5) or (6) for an appropriate κ or γ. Unfortunately (4) is not a convex optimization problem, because its objective I  ˜pu(x), pθ(y|x)  is not convex. This can be verified using the same argument as in the minimum conditional entropy regularization case [15, 16]. There may be some minima of (4) that do not minimize (5) or (6) whatever the value of κ or γ may be. This is however not essential to motivate the optimization criterion. Moreover there are generally local minima in (5) or (6) due to the non-convexity of its mutual information regularization term. Another training method for semi-supervised CRFs is the maximum entropy approach, maximizing conditional entropy (minimizing negative conditional entropy) over unlabeled data Du subject to the constraint on labeled data Dl, min θ “ − X x∈Du ˜pu(x)H “ pθ(y|x) ”” s.t. D “ ˜pl(x, y), ˜pl(x)pθ(y|x) ” + λU(θ) ≤d (7) again following standard procedure, we convert the constrained optimization problem (7) into an unconstrained optimization problem which minimizes the following objective: RLmaxCE(θ) = D “ ˜pl(x, y), ˜pl(x)pθ(y|x) ” + λU(θ) −γ X x∈Du ˜pu(x)H “ pθ(y|x) ” (8) 1For the part of unlabeled data, the MMIHMM algorithm [24] maximizes mutual information, I(˜pu(x), pθ(x|y)), of a generative model pθ(x|y) instead, which is equivalent to minimizing conditional entropy of a generative model pθ(x|y), since I(˜pu(x), pθ(x|y)) = H(˜pu(x)) −H(pθ(x|y)) and H(˜pu(x)) is a constant. 4 Again minimizing (8) is not exactly equivalent to (7); however, it is not essential to motivate the optimization criterion. When comparing maximum entropy approach with minimum conditional entropy approach, there is only a sign change on conditional entropy term. For non-parametric models, using the analysis developed in [5, 6, 7, 25], it can be shown that maximum conditional entropy approach is equivalent to rate distortion approach when we compress code vectors in a mass constrained scheme [25]. But for parametric models such as CRFs, these three approaches are completely distinct. The difference between our rate distortion approach for semi-supervised CRFs (6) and the minimum conditional entropy regularized semi-supervised CRFs (2) is not only on the different sign of conditional entropy on unlabeled data but also the additional term – entropy of pθ(y) on unlabeled data. It is this term that makes direct computation of the derivative of the objective for the rate distortion approach for semi-supervised CRFs intractable. To see why, we take derivative of this term with respect to θ, we have: ∂ ∂θ “ −H(pθ(y)) ” = X x∈Du ˜pu(x) X y pθ(y|x)f(x, y) log “ X x∈Du ˜pu(x)pθ(y|x) ” − X x∈Du ˜pu(x) X y pθ(y|x) log “ X x∈Du ˜pu(x)pθ(y|x) ” X y′ pθ(y′|x)f(x, y′) In the case of structured prediction, the number of sums over Y is exponential, and there is a sum inside the log. These make the computation of the derivative intractable even for a simple chain structured CRF. An alternative way to solve (6) is to use the famous algorithm for the computation of the rate distortion function established by Blahut [6] and Arimoto [3]. Corduneanu and Jaakkola [12, 13] proposed a distributed propagation algorithm, a variant of Blahut-Arimoto algorithm, to solve their problem. However as illustrated in the following, this approach is still intractable for structured prediction in our case. By extending a lemma for computing rate distortion in [14] to parametric models, we can rewrite the minimization problem (5) of mutual information regularized semi-supervised CRFs as a double minimization, min θ min r(y) g(θ, r(y)) where g(θ, r(y)) = X x∈Du X y ˜pu(x)pθ(y|x) log pθ(y|x) r(y) + κ “ D “ ˜pl(x, y), ˜pl(x)pθ(y|x) ” + λU(θ) ” We can use an alternating minimization algorithm to find a local minimum of RLMI(θ). First, we assign the initial CRF model to be the optimal solution of the supervised CRF on labeled data and denote it as pθ(0)(y|x). Then we define r(0)(y) and in general r(t)(y) for t ≥1 by r(t)(y) = X x∈Du ˜pu(x)pθ(t)(y|x) (9) In order to define pθ(1)(y|x) and in general pθ(t)(y|x), we need to find the pθ(y|x) which minimizes g for a given r(y). The gradient of g(θ, r(y)) with respect to θ is ∂ ∂θ g(θ, r(y)) = M X i=N+1 ˜pu(x(i)) “ covpθ(y|x(i)) h f(x(i), y) i θ − X y pθ(y|x(i))f(x(i), y) log r(y) (10) + X y pθ(y|x(i)) log r(y) X y′ pθ(y′|x(i))f(x(i), y′) ” (11) −κ N X i=1 ˜pl(x(i)) f(x(i), y(i)) − X y pθ(y|x(i))f(x(i), y) ! + κλ ∂ ∂θ U(θ) (12) Even though the first term in Eq. (10) and (12) can be efficiently computed via recursive formulas [16], we run into the same intractable problem to compute the second term Eq. (10) and Eq. 11) since the number of sums over Y is exponential and implicitly there is a sum inside the log due to r(y). This makes the computation of the derivative in the alternating minimization algorithm intractable. 5 3 A variational training procedure In this section, we derive a convergent variational algorithm to train rate distortion based semisupervised CRFs for sequence labeling. The basic idea of convexity-based variational inference is to make use of Jensen’s inequality to obtain an adjustable upper bound on the objective function [17]. Essentially, one considers a family of upper bounds indexed by a set of variational parameters. The variational parameters are chosen by an optimization procedure that attempts to find the tightest possible upper bound. Following Jordan et al. [17], we begin by introducing a variational distribution q(x) to bound H(pθ(y)) using Jensen’s inequality as the following, H(pθ(y)) = − X y X x∈Du ˜pu(x)pθ(y|x) log X x∈Du ˜pu(x)pθ(y|x) q(x) q(x) ! ≤ − X y M X j=N+1 ˜pu(x(j))pθ(y|x(j)) " M X l=N+1 q(x(l)) log „ ˜pu(x(l))pθ(y|x(l)) q(x(l)) «# Thus the desideratum of finding a tight upper bound of RLMI(θ) in Eq. (6) translates directly into the following alternative optimization problem: (θ∗, q∗) = min θ,q U(θ, q) where U(θ, q) = − N X i=1 ˜pl(x(i)) log pθ(y(i)|x(i)) + λU(θ) −γ M X j=N+1 M X l=N+1 ˜pu(x(j))q(x(l)) X y pθ(y|x(j)) log pθ(y|x(l)) (13) −γ M X j=N+1 ˜pu(x(j)) M X l=N+1 q(x(l)) log ˜pu(x(l)) q(x(l)) + γ M X j=N+1 X y ˜pu(x(j))pθ(y|x(j)) log pθ(y|x(j)) (14) Minimizing U with respect to q has a closed form solution, q(x(l)) = ˜pu(x(l)) exp “ PM j=N+1 P y ˜pu(x(j))pθ(y|x(j)) log pθ(y|x(l)) ” PM k=1 ˜pu(x(k)) exp “ PM j=N+1 P y ˜pu(x(j))pθ(y|x(j)) log pθ(y|x(k)) ” ∀x(l) ∈Du (15) It can be shown that U(θ, q) ≥RLMI(θ) + X y X x∈Du ˜pu(x)pθ(y|x) X x∈Du D “ q(x), qθ(x|y) ” ≥0 (16) where qθ(x|y) = ˜pu(x)pθ(y|x) P x∈Du ˜pu(x)pθ(y|x) ∀x ∈Du. Thus U is bounded below, the alternative minimization algorithm monotonically decreases U and converges. In order to calculate the derivative of U with respect to θ, we just need to notice that the first term in Eq. (13) is the log-likelihood in CRF, and the first term in Eq. (14) is a constant and second term in Eq. (14) is the conditional entropy in [16]. They all can be efficiently computed [16, 21]. In the following, we show how to compute the derivative of the last term in Eq.(13) using an idea similar to that proposed in [21]. Without loss of generality, we assume all the unlabeled data are of equal lengths in the sequence labeling case. We will describe how to handle the case of unequal lengths in Sec. 4. If we define A(y, x(j), x(l)) = P y pθ(y|x(j)) log pθ(y|x(l)) in (13) for a fixed (j, l) pair, where we assume x(j) and x(l) form two linear-chain graphs of equal lengths, we can calculate the derivative of A(y, x(j), x(l)) with respect to the k-th parameter θk, where all the terms can be computed through standard dynamic programming techniques in CRFs except one term P y pθ(y|x(j)) log pθ(y|x(l))fk(x(j), y). Nevertheless similar to [21], we compute this term as follows [21]: we first define pairwise subsequence constrained entropy on (x(j), x(l)) (as suppose to the subsequence constrained entropy defined in [21]) as: Hσ jl(y−(a..b)|ya..b, x(j), x(l)) = X y−(a..b) pθ(y−(a..b)|ya..b, x(j)) log pθ(y−(a..b)|ya..b, x(l)) 6 where y−(a..b) is the label sequence with its subsequence ya..b fixed. If we have Hσ jl for all (a, b), then the term P y pθ(y|x(j)) log pθ(y|x(l))fk(x(j), y) can be easily computed. Using the independence property of linear-chain CRF, we have the following: X y−(a..b) pθ(y−(a..b), ya..b|x(j)) log pθ(y−(a..b), ya..b|x(l)) = pθ(ya..b|x(j)) log pθ(ya..b|x(l)) + pθ(ya..b|x(j))Hα jl(y1..(a−1)|ya, x(j), x(l)) +pθ(ya..b|x(j))Hβ jl(y(b+1)..n|yb, x(j), x(l)) Given Hα jl(·) and Hβ jl(·), any sequence entropy can be computed in constant time [21]. Computing Hα jl(·) can be done using the following dynamic programming [21]: Hα jl(y1..i|yi+1, x(j), x(l)) = X yi pθ(yi|yi+1, x(j)) log pθ(yi|yi+1, x(l)) + X yi pθ(yi|yi+1, x(j))Hα jl(y1..(i−1)|yi, x(j), x(l)) The base case for the dynamic programming is Hα jl(∅|y1, x(j), x(l)) = 0. All the probabilities (i.e., pθ(yi|yi+1, xj)) needed in the above formula can be obtained using belief propagation. Hβ jl(·) can be similarly computed using dynamic programming. 4 Experiments We compare our rate distortion approach for semi-supervised learning with one of the state-of-the-art semi-supervised learning algorithms, minimum conditional entropy approach and maximum conditional entropy approach on two real-world problems: text categorization and hand-written character recognition. The purpose of the first task is to show the effectiveness of rate distortion approach over minimum and maximum conditional entropy approaches when no approximation is needed in training. In the second task, a variational method has to be used to train semi-supervised chain structured CRFs. We demonstrate the effectiveness of the rate distortion approach over minimum and maximum conditional entropy approaches even when an approximation is used during training. 4.1 Text categorization We select different class pairs from the 20 newsgroup dataset 2 to construct our binary classification problems. The chosen classes are similar to each other and thus hard for classification algorithms. We use Porter stemmer to reduce the morphological word forms. For each label, we rank words based on their mutual information with that label (whether it predicts label 1 or 0). Then we choose the top 100 words as our features. For each problem, we select 15% of the training data, almost 150 instances, as the labeled training data and select the unlabeled data from the remaining data. The validation set (for setting the free parameters, e.g. λ and γ) contains 100 instances. The test set contains about 700 instances. We vary the ratio between the amount of unlabeled and labeled data, repeat the experiments ten times with different randomly selected labeled and unlabeled training data, and report the mean and standard deviation over different trials. For each run, we initialize the model parameter for mutual information (MI) regularization and maximum/minimum conditional entropy (CE) regularization using the parameter learned from a l2-regularized logistic regression classifier. Figure 1 shows the classification accuracies of these four regularization methods versus the ratio between the amount of unlabeled and labeled data on different classification problems. We can see that mutual information regularization outperforms the other three regularization schemes. In most cases, maximum CE regularization outperforms minimum CE regularization and the baseline (logistic regression with l2 regularization) which uses only the labeled data. Although the randomly selected labeled instances are different for different experiments, we should not see a significant difference in the performance of the learned models based on the baseline; since for each particular ratio of labeled and unlabeled data, the performance is averaged over ten runs. We suspect the reason for the performance differences of the baselines models in Figure 1 is due to our feature selection phase. 2http://people.csail.mit.edu/jrennie/20Newsgroups. 7 0 1 2 3 4 5 6 0.862 0.864 0.866 0.868 0.87 0.872 0.874 0.876 0.878 0.88 0.882 ratio unlabel/label accuracy MI minCE maxCE L2 0 1 2 3 4 5 6 0.835 0.84 0.845 0.85 0.855 0.86 0.865 0.87 ratio unlabel/label accuracy MI minCE maxCE L2 0 1 2 3 4 5 6 0.815 0.82 0.825 0.83 0.835 0.84 0.845 ratio unlabel/label accuracy MI minCE maxCE L2 0 1 2 3 4 5 6 0.66 0.67 0.68 0.69 0.7 0.71 0.72 0.73 ratio unlabel/label accuracy MI minCE maxCE L2 0 1 2 3 4 5 6 0.765 0.77 0.775 0.78 0.785 0.79 0.795 0.8 ratio unlabel/label accuracy MI minCE maxCE L2 Figure 1: Results on five different binary classification problems in text categorization (left to right): comp.os.ms-windows.misc vs comp.sys.mac.hardware; rec.autos vs rec.motorcycles; rec.sport.baseball vs rec.sport.hockey; talk.politics.guns vs talk.politics.misc; sci.electronics vs sci.med. 0 1 2 3 4 5 6 0.785 0.79 0.795 0.8 0.805 0.81 0.815 0.82 0.825 ratio unlabel/label accuracy MI minCE maxCE L2 0 1 2 3 4 5 6 0.64 0.66 0.68 0.7 0.72 0.74 0.76 0.78 ratio unlabel/label accuracy MI minCE maxCE L2 Figure 2: Results on hand-written character recognition: (left) sequence labeling; (right) multi-class classification. 4.2 Hand-written character recognition Our dataset for hand-written character recognition contains ∼6000 handwritten words with average length of ∼8 characters. Each word was divided into characters, each character is resized to a 16×8 binary image. We choose ∼600 words as labeled data, ∼600 words as validation data, ∼2000 words as test data. Similar to text categorization, we vary the ratio between the amount of unlabeled and labeled data, and report the mean and standard deviation of classification accuracies over several trials. We use a chain structured graph to model hand-written character recognition as a sequence labeling problem, similar to [29]. Since the unlabeled data may have different lengths, we modify the mutual information as I = P ℓIℓ, where Iℓis the mutual information computed on all the unlabeled data with length ℓ. We compare our approach (MI) with other regularizations (maximum/minimum conditional entropy, l2). The results are shown in Fig. 2 (left). As a sanity check, we have also tried solving hand-written character recognition as a multi-class classification problem, i.e. without considering the correlation between adjacent characters in a word. The results are shown in Fig. 2 (right). We can see that MI regularization outperforms maxCE, minCE and l2 regularizations in both multi-class and sequence labeling cases. There are significant gains in the structured learning compared with the standard multi-class classification setting. 5 Conclusion and future work We have presented a new semi-supervised discriminative learning algorithm to train CRFs. The proposed approach is motivated by the rate distortion framework in information theory and utilizes the mutual information on the unlabeled data as a regularization term, to be more precise a data dependent prior. Even though a variational approximation has to be used during training process for even a simple chain structured graph, our experimental results show that our proposed rate distortion approach outperforms supervised CRFs with l2 regularization and a state-of-the-art semi-supervised minimum conditional entropy approach as well as semi-supervised maximum conditional entropy approach in both multi-class classification and sequence labeling problems. As future work, we would like to apply this approach to other graph structures, develop more efficient learning algorithms and illuminate how reducing the information rate helps generalization. 8 References [1] S. Abney. Semi-Supervised Learning for Computational Linguistics. Chapman & Hall/CRC, 2007. [2] Y. Altun, D. McAllester and M. Belkin. Maximum margin semi-supervised learning for structured variables. NIPS 18:33-40, 2005. [3] S. Arimoto. An algorithm for computing the capacity of arbitrary discrete memoryless channels. IEEE Transactions on Information Theory, 18:1814-1820, 1972. [4] L. Bahl, P. Brown, P. de Souza and R. Mercer. Maximum mutual information estimation of hidden Markov model parameters for speech recognition. ICASSP, 11:49-52, 1986. [5] T. Berger and J. Gibson. Lossy source coding. IEEE Transactions on Information Theory, 44(6):26932723, 1998. [6] R. Blahut. Computation of channel capacity and rate-distortion functions. IEEE Transactions on Information Theory, 18:460-473, 1972. [7] R. Blahut. Principles and Practice of Information Theory, Addison-Wesley, 1987. [8] S. Boyd and L. Vandenberghe. Convex Optimization, Cambridge University Press, 2004. [9] U. Brefeld and T. Scheffer. Semi-supervised learning for structured output variables. ICML, 145-152, 2006. [10] O. Chapelle, B. Scholk¨opf and A. Zien. Semi-Supervised Learning, MIT Press, 2006. [11] A. Corduneanu and T. Jaakkola. On information regularization. UAI, 151-158, 2003. [12] A. Corduneanu and T. Jaakkola. Distributed information regularization on graphs. NIPS, 17:297-304, 2004. [13] A. Corduneanu and T. Jaakkola. Data dependent regularization. In Semi-Supervised Learning, O. Chapelle, B. Scholk¨opf and A. Zien, (Editors), 163-182, MIT Press, 2006. [14] T. Cover and J. Thomas. Elements of Information Theory, Wiley, 1991. [15] Y. Grandvalet and Y. Bengio. Semi-supervised learning by entropy minimization. NIPS, 17:529-536, 2004. [16] F. Jiao, S. Wang, C. Lee, R. Greiner and D. Schuurmans. Semi-supervised conditional random fields for improved sequence segmentation and labeling. COLING/ACL, 209-216, 2006. [17] M. Jordan, Z. Ghahramani, T. Jaakkola and L. Saul. Introduction to variational methods for graphical models. Machine Learning, 37:183-233, 1999. [18] D. Jurafsky and J. Martin. Speech and Language Processing, 2nd Edition, Prentice Hall, 2008. [19] J. Lafferty, A. McCallum and F. Pereira. Conditional random fields: Probabilistic models for segmenting and labeling sequence data. ICML, 282-289, 2001. [20] C. Lee, S. Wang, F. Jiao, D. Schuurmans and R. Greiner. Learning to model spatial dependency: Semisupervised discriminative random fields. NIPS, 19:793-800, 2006. [21] G. Mann and A. McCallum. Efficient computation of entropy gradient for semi-supervised conditional random fields. NAACL/HLT, 109-112, 2007. [22] G. Mann and A. McCallum. Generalized expectation criteria for semi-supervised learning of conditional random fields. ACL, 870-878, 2008. [23] Y. Normandin. Maximum mutual information estimation of hidden Markov models. In Automatic Speech and Speaker Recognition: Advanced Topics, C. Lee, F. Soong and K. Paliwal (Editors), 57-81, Springer, 1996. [24] N. Oliver and A. Garg. MMIHMM: maximum mutual information hidden Markov models. ICML, 466473, 2002. [25] K. Rose. Deterministic annealing for clustering, compression, classification, regression, and related optimization problems. Proceedings of the IEEE, 80:2210-2239, 1998. [26] N. Slonim, G. Atwal, G. Tkacik and W. Bialek. Information based clustering. Proceedings of National Academy of Science (PNAS), 102:18297-18302, 2005. [27] S. Still and W. Bialek. How many clusters? An information theoretic perspective. Neural Computation, 16:2483-2506, 2004. [28] M. Szummer and T. Jaakkola. Information regularization with partially labeled data. NIPS, 1025-1032, 2002. [29] B. Taskar, C. Guestrain and D. Koller. Max-margin Markov networks. NIPS, 16:25-32, 2003. [30] N. Tishby, F. Pereira, and W. Bialek. The information bottleneck method. The 37th Annual Allerton Conference on Communication, Control, and Computing, 368-377, 1999. [31] L. Zheng, S. Wang, Y. Liu and C. Lee. Information theoretic regularization for semi-supervised boosting. KDD, 1017-1026, 2009. [32] X. Zhu. Semi-supervised learning literature survey. Computer Sciences TR 1530, University of Wisconsin Madison, 2007. 9
2009
228
3,735
Learning to Explore and Exploit in POMDPs Chenghui Cai, Xuejun Liao, and Lawrence Carin Department of Electrical and Computer Engineering Duke University Durham, NC 27708-0291, USA Abstract A fundamental objective in reinforcement learning is the maintenance of a proper balance between exploration and exploitation. This problem becomes more challenging when the agent can only partially observe the states of its environment. In this paper we propose a dual-policy method for jointly learning the agent behavior and the balance between exploration exploitation, in partially observable environments. The method subsumes traditional exploration, in which the agent takes actions to gather information about the environment, and active learning, in which the agent queries an oracle for optimal actions (with an associated cost for employing the oracle). The form of the employed exploration is dictated by the specific problem. Theoretical guarantees are provided concerning the optimality of the balancing of exploration and exploitation. The effectiveness of the method is demonstrated by experimental results on benchmark problems. 1 Introduction A fundamental challenge facing reinforcement learning (RL) algorithms is to maintain a proper balance between exploration and exploitation. The policy designed based on previous experiences is by construction constrained, and may not be optimal as a result of inexperience. Therefore, it is desirable to take actions with the goal of enhancing experience. Although these actions may not necessarily yield optimal near-term reward toward the ultimate goal, they could, over a long horizon, yield improved long-term reward. The fundamental challenge is to achieve an optimal balance between exploration and exploitation; the former is performed with the goal of enhancing experience and preventing premature convergence to suboptimal behavior, and the latter is performed with the goal of employing available experience to define perceived optimal actions. For a Markov decision process (MDP), the problem of balancing exploration and exploitation has been addressed successfully by the E3 [4, 5] and R-max [2] algorithms. Many important applications, however, have environments whose states are not completely observed, leading to partially observable MDPs (POMDPs). Reinforcement learning in POMDPs is challenging, particularly in the context of balancing exploration and exploitation. Recent work targeted on solving the exploration vs. exploitation problem is based on an augmented POMDP, with a product state space over the environment states and the unknown POMDP parameters [9]. This, however, entails solving a complicated planning problem, which has a state space that grows exponentially with the number of unknown parameters, making the problem quickly intractable in practice. To mitigate this complexity, active learning methods have been proposed for POMDPs, which borrow similar ideas from supervised learning, and apply them to selectively query an oracle (domain expert) for the optimal action [3]. Active learning has found success in many collaborative human-machine tasks where expert advice is available. In this paper we propose a dual-policy approach to balance exploration and exploitation in POMDPs, by simultaneously learning two policies with partially shared internal structure. The first policy, termed the primary policy, defines actions based on previous experience; the second policy, termed 1 the auxiliary policy, is a meta-level policy maintaining a proper balance between exploration and exploitation. We employ the regionalized policy representation (RPR) [6] to parameterize both policies, and perform Bayesian learning to update the policy posteriors. The approach applies in either of two cases: (i) the agent explores by randomly taking the actions that have been insufficiently tried before (traditional exploration), or (ii) the agent explores by querying an oracle for the optimal action (active learning). In the latter case, the agent is assessed a query cost from the oracle, in addition to the reward received from the environment. Either (i) or (ii) is employed as an exploration vehicle, depending upon the application. The dual-policy approach possesses interesting convergence properties, similar to those of E3 [5] and Rmax [2]. However, our approach assumes the environment is a POMDP while E3 and Rmax both assume an MDP environment. Another distinction is that our approach learns the agent policy directly from episodes, without estimating the POMDP model. This is in contrast to E3 and Rmax (both learn MDP models) and the active-learning method in [3] (which learns POMDP models). 2 Regionalized Policy Representation We first provide a brief review of the regionalized policy representation, which is used to parameterize the primary policy and the auxiliary policy as discussed above. The material in this section is taken from [6], with the proofs omitted here. Definition 2.1 A regionalized policy representation is a tuple (A, O, Z, W, µ, π). The A and O are respectively a finite set of actions and observations. The Z is a finite set of belief regions. The W is the belief-region transition function with W(z, a, o′, z′) denoting the probability of transiting from z to z′ when taking action a in z results in observing o′. The µ is the initial distribution of belief regions with µ(z) denoting the probability of initially being in z. The π are the region-dependent stochastic policies with π(z, a) denoting the probability of taking action a in z. We denote A = {1, 2, . . ., |A|}, where |A| is the cardinality of A. Similarly, O = {1, 2, . . ., |O|} and Z = {1, 2, . . ., |Z|}. We abbreviate (a0, a1, . . . , aT ) as a0:T and similarly, (o1, o2, . . . , aT ) as o1:T and (z0, z1, . . . , zT ) as z0:T , where the subscripts indexes discrete time steps. The history ht = {a0:t−1, o1:t} is defined as a sequence of actions performed and observations received up to t. Let Θ = {π, µ, W} denote the RPR parameters. Given ht, the RPR yields a joint probability distribution of z0:t and a0:t as follows p(a0:t, z0:t|o1:t, Θ) = µ(z0)π(z0, a0)Qt τ=1W(zτ−1, aτ−1, oτ, zτ)π(zτ, aτ) (1) By marginalizing z0:t out in (1), we obtain p(a0:t|o1:t, Θ). Furthermore, the history-dependent distribution of action choices is obtained as follows: p(aτ|hτ, Θ) = p(a0:τ|o1:τ, Θ)[p(a0:τ−1|o1:τ−1, Θ)]−1 which gives a stochastic policy for choosing the action aτ. The action choice depends solely on the historical actions and observations, with the unobservable belief regions marginalized out. 2.1 Learning Criterion Bayesian learning of the RPR is based on the experiences collected from the agent-environment interaction. Assuming the interaction is episodic, i.e., it breaks into subsequences called episodes [10], we represent the experiences by a set of episodes. Definition 2.2 An episode is a sequence of agent-environment interactions terminated in an absorbing state that transits to itself with zero reward. An episode is denoted by (ak 0rk 0ok 1ak 1rk 1 · · · ok Tkak Tkrk Tk), where the subscripts are discrete times, k indexes the episodes, and o, a, and r are respectively observations, actions, and immediate rewards. Definition 2.3 (The RPR Optimality Criterion) Let D(K) = {(ak 0rk 0ok 1ak 1rk 1 · · · ok Tkak Tkrk Tk)}K k=1 be a set of episodes obtained by an agent interacting with the environment by following policy Π to select actions, where Π is an arbitrary stochastic policy with action-selecting distributions pΠ(at|ht) > 0, ∀action at, ∀history ht. The RPR optimality criterion is defined as bV (D(K); Θ) def. = 1 K PK k=1 PTk t=0 γtrk t Qt τ=0 p(ak τ |hk τ,Θ) Qt τ=0 pΠ(ak τ |hk τ) (2) 2 where hk t = ak 0ok 1ak 1 · · · ok t is the history of actions and observations up to time t in the k-th episode, 0 < γ < 1 is the discount, and Θ denotes the RPR parameters. Throughout the paper, we call bV (D(K); Θ) the empirical value function of Θ. It is proven in [6] that limK→∞bV (D(K); Θ) is the expected sum of discounted rewards by following the RPR policy parameterized by Θ for an infinite number of steps. Therefore, the RPR resulting from maximization of bV (D(K); Θ) approaches the optimal as K is large (assuming |Z| is appropriate). In the Bayesian setting discussed below, we use a noninformative prior for Θ, leading to a posterior of Θ peaked at the optimal RPR, therefore the agent is guaranteed to sample the optimal or a near-optimal policy with overwhelming probability. 2.2 Bayesian Learning Let G0(Θ) represent the prior distribution of the RPR parameters. We define the posterior of Θ as p(Θ|D(K), G0) def. = bV (D(K); Θ)G0(Θ)[bV (D(K))]−1 (3) where bV (D(K)) = R bV (D(K); Θ)G0(Θ)dΘ is the marginal empirical value. Note that bV (D(K); Θ) is an empirical value function, thus (3) is a non-standard use of Bayes rule. However, (3) indeed gives a distribution whose shape incorporates both the prior and the empirical information. Since each term in bV (D(K); Θ) is a product of multinomial distributions, it is natural to choose the prior as a product of Dirichlet distributions, G0(Θ) = p(µ|υ)p(π|ρ)p(W|ω) (4) where p(µ|υ) = Dir µ(1), · · · , µ(|Z|) υ  , p(π|ρ) = Q|Z| i=1Dir π(i, 1), · · · , π(i, |A|) ρi  , p(W|ω) = Q|A| a=1 Q|O| o=1 Q|Z| i=1Dir W(i, a, o, 1), · · · , W(i, a, o, |Z|) ωi,a,o  ; ρi = {ρi,m}|A| m=1, υ = {υi}|Z| i=1, and ωi,a,o = {ωi,a,o,j}|Z| j=1 are hyper-parameters. With the prior thus chosen, the posterior in (3) is a large mixture of Dirichlet products, and therefore posterior analysis by Gibbs sampling is inefficient. To overcome this, we employ the variational Bayesian technique [1] to obtain a variational posterior by maximizing a lower bound to ln R bV (D(K); Θ)G0(Θ)dΘ, LB({qk t }, g(Θ)) = ln Z bV (D(K); Θ)G0(Θ)dΘ −KL({qk t(zk 0:t)g(Θ)}||{νk t p(zk 0:t, Θ|ak 0:t, ok 1:t)}) where {qk t }, g(Θ) are variational distributions satisfying qk t (zk 0:t) ≥1, g(Θ) ≥1, R g(Θ)dΘ = 1, and 1 K PK k=1 PTk t=1 P|Z| zk 0 ,··· ,zk t =1 qk t (zk 0:t) = 1; νk t = γtrk t p(ak 0:t|ok 1:t) Qt τ=0 pΠ(akτ|hkτ) bV (D(K)) and KL(q∥p) denotes the Kullback-Leibler (KL) distance between probability measure q and p. The factorized form {qt(z0:t)g(Θ)} represents an approximation of the weighted joint posterior of Θ and z’s when the lower bound reaches the maximum, and the corresponding g(Θ) is called the variational approximate posterior of Θ. The lower bound maximization is accomplished by solving {qt(z0:t)} and g(Θ) alternately, keeping one fixed while solving for the other. The solutions are summarized in Theorem 2.4; the proof is in [6]. Theorem 2.4 Given the initialization bρ = ρ, bυ = υ, bω = ω, iterative application of the following updates produces a sequence of monotonically increasing lower bounds LB({qk t }, g(Θ)), which converges to a maxima. The update of {qk t } is qk z(zk 0:t) = σk t p(zk 0:t|ak 0:t, ok 1:t, eΘ) where eΘ = {eπ, eµ, f W} is a set of under-normalized probability mass functions, with eπ(i, m) = eψ( bρi,m)−ψ( P|A| m=1 bρi,m), eµ(i) = eψ( bυi)−ψ( P|Z| i=1 bυi), and f W(i, a, o, j) = eψ( bωi,a,o,j)−ψ( P|A| j=1 bωi,a,o,j), and ψ is the digamma function. The g(Θ) has the same form as the prior G0 in (4), except that the hyper-parameter are updated as bυi = υi + PK k=1 PTk t=0σk t φk t,0(i) 3 bρi,a = ρi,a + PK k=1 PTk t=0 Pt τ=0σk t φk t,τ(i)δ(ak τ, a) bωi,a,o,j = ωi,a,o,j+PK k=1 PTk t=0 Pt τ=1σk t ξk t,τ−1(i, j)δ(ak τ−1, a)δ(ok τ, o) where ξk t,τ(i, j) = p(zk τ = i, zk τ+1 = j|ak 0:t, ok 1:t, eΘ), φk t,τ(i) = p(zk τ = i|ak 0:t, ok 1:t, eΘ), and σk t =  γtrk t p(ak 0:t|ok 1:t, eΘ) Qt τ=0 pΠ(ak τ|hk τ)bV (D(K)|eΘ) −1 (5) 3 Dual-RPR: Joint Policy for the Agent Behavior and the Trade-Off Between Exploration and Exploitation Assume that the agent uses the RPR described in Section 2 to govern its behavior in the unknown POMDP environment (the primary policy). Bayesian learning employs the empirical value function bV (D(K); Θ) in (2) in place of a likelihood function, to obtain the posterior of the RPR parameters Θ. The episodes D(K) may be obtained from the environment by following an arbitrary stochastic policy Π with pΠ(a|h) > 0, ∀a, ∀h. Although any such Π guarantees optimality of the resulting RPR, the choice of Π affects the convergence speed. A good choice of Π avoids episodes that do not bring new information to improve the RPR, and thus the agent does not have to see all possible episodes before the RPR becomes optimal. In batch learning, all episodes are collected before the learning begins, and thus Π is pre-chosen and does not change during the learning [6]. In online learning, however, the episodes are collected during the learning, and the RPR is updated upon completion of each episode. Therefore there is a chance to exploit the RPR to avoid repeated learning in the same part of the environment. The agent should recognize belief regions it is familiar with, and exploit the existing RPR policy there; in belief regions inferred as new, the agent should explore. This balance between exploration and exploitation is performed with the goal of accumulating a large long-run reward. We consider online learning of the RPR (as the primary policy) and choose Π as a mixture of two policies: one is the current RPR Θ (exploitation) and the other is an exploration policy Πe. This gives the action-choosing probability pΠ(a|h) = p(y = 0|h)p(a|h, Θ, y = 0)+p(y = 1|h)p(a|h, Πe, y = 1), where y = 0 (y = 1) indicates exploitation (exploration). The problem of choosing good Π then reduces to a proper balance between exploitation and exploration: the agent should exploit Θ when doing so is highly rewarding, while following Πe to enhance experience and improve Θ. An auxiliary RPR is employed to represent the policy for balancing exploration and exploitation, i.e., the history-dependent distribution p(y|h). The auxiliary RPR shares the parameters {µ, W} with the primary RPR, but with π = {π(z, a) : a ∈A, z ∈Z} replaced by λ = {λ(z, y) : y = 0 or 1, z ∈Z}, where λ(z, y) is the probability of choosing exploitation (y = 0) or exploration (y = 1) in belief region z. Let λ have the prior p(λ|u) = Q|Z| i=1Beta  λ(i, 0), λ(i, 1) u0, u1  . (6) In order to encourage exploration when the agent has little experience, we choose u0 = 1 and u1 > 1 so that, at the beginning of learning, the auxiliary RPR always suggests exploration. As the agent accumulates episodes of experience, it comes to know a certain part of the environment in which the episodes have been collected. This knowledge is reflected in the auxiliary RPR, which, along with the primary RPR, is updated upon completion of each new episode. Since the environment is a POMDP, the agent’s knowledge should be represented in the space of belief states. However, the agent cannot directly access the belief states, because computation of belief states requires knowing the true POMDP model, which is not available. Fortunately, the RPR formulation provides a compact representation of H = {h}, the space of histories, where each history h corresponds to a belief state in the POMDP. Within the RPR formulation, H is represented internally as the set of distributions over belief regions z ∈Z, which allows the agent to access H based on a subset of samples from H. Let Hknown be the part of H that has become known to the agent, i.e., the primary RPR is optimal in Hknown and thus the agent should begin to exploit upon entering Hknown. As will be clear below, Hknown can be identified by Hknown = {h : p(y = 0|h, Θ, λ) ≈1}, if the posterior of λ is updated by bui,0 = u0 + PK k=1 PTk t=0 Pt τ=0σk t φk t,τ(i), (7) bui,1 = max η, u1 −PK k=1 PTk t=0 Pt τ=0yk t γtc φk t,τ(i)  , (8) 4 where η is a small positive number, and σk t is the same in (5) except that rk t is replaced by mk t , the meta-reward received at t in episode k. We have mk t = rmeta if the goal is reached at time t in episode k, and mk t = 0 otherwise, where rmeta > 0 is a constant. When Πe is provided by an oracle (active learning), a query cost c > 0 is taken into account in (8), by subtracting c from u1. Thus, the probability of exploration is reduced each time the agent makes a query to the oracle (i.e., yk t = 1). After a certain number of queries, bui,1 becomes the small positive number η (it never becomes zero due to the max operator), at which point the agent stops querying in belief region z = i. In (7) and (8), exploitation always receives a “credit”, while exploration never receives credit (exploration is actually discredited when Πe is an oracle). This update makes sure that the chance of exploitation monotonically increases as the episodes accumulate. Exploration receives no credit because it has been pre-assigned a credit (u1) in the prior, and the chance of exploration should monotonically decrease with the accumulation of episodes. The parameter u1 represents the agent’s prior for the amount of needed exploration. When c > 0, u1 is discredited by the cost and the agent needs a larger u1 (than when c = 0) to obtain the same amount of exploration. The fact that the amount of exploration monotonically increases with u1 implies that, one can always find a large enough u1 to ensure that the primary RPR is optimal in Hknown = {h : p(y = 0|h, Θ, λ) ≈1}. However, an unnecessarily large u1 makes the agent over-explore and leads to slow convergence. Let umin 1 denote the minimum u1 that ensures optimality in Hknown. We assume umin 1 exists in the analysis below. The possible range of umin 1 is examined in the experiments. 4 Optimality and Convergence Analysis Let M be the true POMDP model. We first introduce an equivalent expression for the empirical value function in (2), bV (E(K) T ; Θ) = P E(K) T PT t=0γtrtp(a0:t, o1:t, rt|y0:t = 0, Θ, M), (9) where the first summation is over all elements in E(K) T ⊆ET , and ET = {(a0:T , o1:T , r0:T ) : at ∈ A, ot ∈O, t = 0, 1, · · · , T } is the complete set of episodes of length T in the POMDP, with no repeated elements. The condition y0:t = 0, which is an an abbreviation for yτ = 0 ∀τ = 0, 1, · · · , t, indicates that the agent always follows the RPR (Θ) here. Note bV (E(K) T ; Θ) is the empirical value function of Θ defined on E(K) T , as is bV (D(K); Θ) on D(K). When T = ∞1, the two are identical up to a difference in acquiring the episodes: E(K) T is a simple enumeration of distinct episodes while D(K) may contain identical episodes. The multiplicity of an episode in D(K) results from the sampling process (by following a policy to interact with the environment). Note that the empirical value function defined using E(K) T is interesting only for theoretical analysis, because the evaluation requires knowing the true POMDP model, not available in practice. We define the optimistic value function bVf(E(K) T ; Θ,λ, Πe) = X E(K) T T X t=0 γt 1 X y0,··· ,yt=0 rt+(Rmax−rt)∨t τ=0 yτ  p(a0:t, o1:t, rt, y0:t|Θ,λ,M,Πe) (10) where ∨t τ=0yτ indicates that the agent receives rt if and only if yτ = 0 at all time steps τ = 1, 2, · · · , t; otherwise, it receives Rmax at t, which is an upper bound of the rewards in the environment. Similarly we can define bV (D(K); Θ, λ, Πe), the equivalent expression for bVf(E(K) T ; Θ, λ, Πe). The following lemma is proven in the Appendix. Lemma 4.1 Let bV (E(K) T ; Θ), bVf(E(K) T ; Θ, λ, Πe), and Rmax be defined as above. Let Pexlpore(E(K) T , Θ, λ, Πe) be the probability of executing the exploration policy Πe at least once in some episode in E(K) T , under the auxiliary RPR (Θ, λ) and the exploration policy Πe. Then Pexlpore(E(K) T , Θ, λ, Πe) ≥1 −γ Rmax |bV (E(K) T ; Θ) −bVf(E(K) T ; Θ, λ, Πe)|. 1An episode almost always terminates in finite time steps in practice and the agent stays in the absorbing state with zero reward for the remaining infinite steps after an episode is terminated [10]. The infinite horizon is only to ensure theoretically all episodes have the same horizon length. 5 Proposition 4.2 Let Θ be the optimal RPR on E(K) ∞ and Θ∗be the optimal RPR in the complete POMDP environment. Let the auxiliary RPR hyper-parameters (λ) be updated according to (7) and (8), with u1 ≥umin 1 . Let Πe be the exploration policy and ǫ ≥0. Then either (a) bV (E∞; Θ) ≥ bV (E∞; Θ∗) −ǫ, or (b) the probability that the auxiliary RPR suggests executing Πe in some episode unseen in E(K) ∞ is at least ǫ(1−γ) Rmax . Proof: It is sufficient to show that if (a) does not hold, then (b) must hold. Let us assume bV (E∞; Θ) < bV (E∞; Θ∗) −ǫ. Because Θ is optimal in E(K) ∞, bV (E(K) ∞; Θ) ≥bV (E(K) ∞; Θ∗), which implies bV (E(\K) ∞ ; Θ) < bV (E(\K) ∞ ; Θ∗) −ǫ. where E(\K) ∞ = E∞\ E(K) ∞. We show below that bVf(E(\K) ∞ ; Θ, λ, Πe) ≥bV (E(\K) ∞ ; Θ∗) which, together with Lemma 4.1, implies Pexlpore(E(\K) ∞ , Θ, λ, Πe) ≥ 1 −γ Rmax h bVf(E(\K) ∞ ; Θ, λ, Πe) −bV (E(\K) ∞ ; Θ) i ≥ 1 −γ Rmax h bV (E(\K) ∞ ; Θ∗) −bV (E(\K) ∞ ; Θ) i ≥ǫ(1 −γ) Rmax We now show bVf(E(\K) ∞ ; Θ, λ, Πe) ≥bV (E(\K) ∞ ; Θ∗). By construction, bVf(E(\K) ∞ ; Θ, λ, Πe) is an optimistic value function, in which the agent receives Rmax at any time t unless if yτ = 0 at τ = 0, 1, · · · , t. However, yτ = 0 at τ = 0, 1, · · · , t implies that {hτ : τ = 0, 1, · · · , t} ⊂Hknown, By the premise, λ is updated according to (7) and (8) and u1 ≥umin 1 , therefore Θ is optimal in Hknown (see the discussions following (7) and (8)), which implies Θ is optimal in {hτ : τ = 0, 1, · · · , t}. Thus, the inequality holds. Q.E.D. Proposition 4.2 shows that whenever the primary RPR achieves less accumulative reward than the optimal RPR by ǫ, the auxiliary RPR suggests exploration with a probability exceeding ǫ(1 −γ)R−1 max. Conversely, whenever the auxiliary RPR suggests exploration with a probability smaller than ǫ(1 −γ)R−1 max, the primary RPR achieves ǫ-near optimality. This ensures that the agent is either receiving sufficient rewards or it is performing sufficient exploration. 5 Experimental Results Our experiments are based on Shuttle, a benchmark POMDP problem [7], with the following setup. The primary policy is a RPR with |Z| = 10 and a prior in (4), with all hyper-parameters initially set to one (which makes the initial prior non-informative). The auxiliary policy is a RPR sharing {µ, W} with the primary RPR and having a prior for λ as in (6). The prior of λ is initially biased towards exploration by using u0 = 1 and u1 > 1. We consider various values of u1 to examine the different effects. The agent performs online learning: upon termination of each new episode, the primary and auxiliary RPR posteriors are updated by using the previous posteriors as the current priors. The primary RPR update follows Theorem 2.4 with K = 1 while the auxiliary RPR update follows (7) and (8) for λ (it shares the same update with the primary RPR for µ and W). We perform 100 independent Monte Carlo runs. In each run, the agent starts learning from a random position in the environment and stops learning when Ktotal episodes are completed. We compare various methods that the agent uses to balance exploration and exploitation: (i) following the auxiliary RPR, with various values of u1, to adaptively switch between exploration and exploitation; (ii) randomly switching between exploration and exploitation with a fixed exploration rate Pexplore (various values of Pexplore are examined). When performing exploitation, the agent follows the current primary RPR (using the Θ that maximizes the posterior); when performing exploration, it follows an exploration policy Πe. We consider two types of Πe: (i) taking random actions and (ii) following the policy obtained by solving the true POMDP using PBVI [8] with 2000 belief samples. In either case, rmeta = 1 and η = 0.001. In case (ii), the PBVI policy is the oracle and incurs a query cost c. We report: (i) the sum of discounted rewards accrued within each episode during learning; these rewards result from both exploitation and exploration. (ii) the quality of the primary RPR upon termination of each learning episode, represented by the sum of discounted rewards averaged over 251 episodes of following the primary RPR (using the standard testing procedure for Shuttle: each episode is terminated when either the goal is reached or a maximum of 251 steps is taken); these rewards result from exploitation alone. (iii) the exploration rate Pexplore in each learning episode, which is the number of time steps at which exploration is performed divided by the total time steps in 6 a given episode. In order to examine the optimality, the rewards in (i)-(ii) has the corresponding optimal rewards subtracted, where the optimal rewards are obtained by following the PBVI policy; the difference are reported, with zero difference indicating optimality and minus difference indicating sub-optimality. All results are averaged over the 100 Monte Carlo runs. The results are summarized in Figure 1 when Πe takes random actions and in Figure 2 when Πe is an oracle (the PBVI policy). 0 500 1000 1500 2000 2500 3000 −16 −14 −12 −10 −8 −6 −4 −2 0 Number of episodes used in the learning phase Accrued learning reward minus optimal reward Dual−RPR, u1=2 Dual−RPR, u1=20 Dual−RPR, u1=200 RPR, Pexplore = 0 RPR, Pexplore = 0.1 RPR, Pexplore = 0.3 RPR, Pexplore = 1.0 0 500 1000 1500 2000 2500 3000 −12 −10 −8 −6 −4 −2 0 Number of episodes used in the learning phase Accrued testing reward minus optimal reward Dual−RPR, u1=2 Dual−RPR, u1=20 Dual−RPR, u1=200 RPR, Pexplore = 0 RPR, Pexplore = 0.1 RPR, Pexplore = 0.3 RPR, Pexplore = 1.0 0 500 1000 1500 2000 2500 3000 0 0.2 0.4 0.6 0.8 1 Number of episodes used in the learning phase Exploration rate Dual−RPR, u1=2 Dual−RPR, u1=20 Dual−RPR, u1=200 Figure 1: Results on Shuttle with a random exploration policy, with Ktotal = 3000. Left: accumulative discounted reward accrued within each learning episode, with the corresponding optimal reward subtracted. Middle: accumulative discounted rewards averaged over 251 episodes of following the primary RPR obtained after each learning episode, again with the corresponding optimal reward subtracted. Right: the rate of exploration in each learning episode. All results are averaged over 100 independent Monte Carlo runs. 0 20 40 60 80 100 −12 −10 −8 −6 −4 −2 0 Number of episodes used in the learning phase Accrued learning reward minus optimal reward Dual−RPR, u1=2 Dual−RPR, u1=10 Dual−RPR, u1=20 RPR, Pexplore = 0.158 RPR, Pexplore = 0.448 RPR, Pexplore = 0.657 RPR, Pexplore = 1.0 0 20 40 60 80 100 −20 −15 −10 −5 0 Number of episodes used in the learning phase Accrued testing reward minus optimal reward Dual−RPR, u1=2 Dual−RPR, u1=10 Dual−RPR, u1=20 RPR, Pexplore = 0.158 RPR, Pexplore = 0.448 RPR, Pexplore = 0.657 RPR, Pexplore = 1.0 0 20 40 60 80 100 0 0.2 0.4 0.6 0.8 1 Number of episodes used in the learning phase Exploration rate Dual−RPR, u1=2 Dual−RPR, u1=10 Dual−RPR, u1=20 0 20 40 60 80 100 −12 −10 −8 −6 −4 −2 0 Number of episodes used in the learning phase Accrued learning reward minus optimal reward Dual−RPR, u1=2 Dual−RPR, u1=10 Dual−RPR, u1=20 RPR, Pexplore = 0.081 RPR, Pexplore = 0.295 RPR, Pexplore = 0.431 RPR, Pexplore = 1.0 0 20 40 60 80 100 −20 −15 −10 −5 0 Number of episodes used in the learning phase Accrued testing reward minus optimal reward Dual−RPR, u1=2 Dual−RPR, u1=10 Dual−RPR, u1=20 RPR, Pexplore = 0.081 RPR, Pexplore = 0.295 RPR, Pexplore = 0.431 RPR, Pexplore = 1.0 0 20 40 60 80 100 0 0.2 0.4 0.6 0.8 1 Number of episodes used in the learning phase Exploration rate Dual−RPR, u1=2 Dual−RPR, u1=10 Dual−RPR, u1=20 Figure 2: Results on Shuttle with an oracle exploration policy incurring cost c = 1 (top row) and c = 3 (bottom row), and Ktotal = 100. Each figure in a row is a counterpart of the corresponding figure in Figure 1, with the random Πe replaced by the oracle Πe. See the captions there for details. It is seen from Figure 1 that, with random exploration and u1 = 2, the primary policy converges to optimality and, accordingly, Pexplore drops to zero, after about 1500 learning episodes. When u1 increases to 20, the convergence is slower: it does not occur (and Pexplore > 0) until after abound 2500 learning episodes. With u1 increased to 200, the convergence does not happen and Pexplore > 0.2 within the first 3000 learning episodes. These results verify our analysis in Section 3 and 4: (i) the primary policy improves as Pexplore decreases; (ii) the agent explores when it is not acting optimally and it is acting optimally when it stops exploring; (iii) there exists finite u1 such that the primary policy is optimal if Pexplore = 0. Although u1 = 2 may still be larger than umin 1 , it is small enough to ensure convergence within 1500 episodes. We also observe from Figure 1 that: (i) the agent explores more efficiently when it is adaptively switched between exploration and exploitation by the auxiliary policy, than when the switch is random; (ii) the primary policy cannot converge to optimality when the agent never explores; (iii) the primary policy may converge 7 to optimality when the agent always takes random actions, but it may need infinite learning episodes to converge. The results in Figure 2, with Πe being an oracle, provide similar conclusions as those in Figure 1 when Πe is random. However, there are two special observations from Figure 2: (i) Pexplore is affected by the query cost c: with a larger c, the agent performs less exploration. (ii) the convergence rate of the primary policy is not significantly affected by the query cost. The reason for (ii) is that the oracle always provides optimal actions, thus over-exploration does not harm the optimality; as long as the agent takes optimal actions, the primary policy continually improves if it is not yet optimal, or it remains optimal if it is already optimal. 6 Conclusions We have presented a dual-policy approach for jointly learning the agent behavior and the optimal balance between exploitation and exploration, assuming the unknown environment is a POMDP. By identifying a known part of the environment in terms of histories (parameterized by the RPR), the approach adaptively switches between exploration and exploitation depending on whether the agent is in the known part. We have provided theoretical guarantees for the agent to either explore efficiently or exploit efficiently. Experimental results show good agreement with our theoretical analysis and that our approach finds the optimal policy efficiently. Although we empirically demonstrated the existence of a small u1 to ensure efficient convergence to optimality, further theoretical analysis is needed to find umin 1 , the tight lower bound of u1, which ensures convergence to optimality with just the right amount of exploration (without over-exploration). Finding the exact umin 1 is difficult because of the partial observability. However, it is hopeful to find a good approximation to umin 1 . In the worst case, the agent can always choose to be optimistic, like in E3 and Rmax. An optimistic agent uses a large u1, which usually leads to over-exploration but ensures convergence to optimality. 7 Acknowledgements The authors would like to thank the anonymous reviewers for their valuable comments and suggestions. This work is supported by AFOSR. Appendix Proof of Lemma 4.1: We expand (10) as, bVf(E (K) T ; Θ, λ, Πe) = P E(K) T PT t=0γtrtp(a0:t, o1:t, rt|y0:t = 0, Θ, M)p(y0:t = 0|Θ, λ) + P E(K) T PT t=0 γtRmax P y0:t̸=0p(a0:t, o1:t, rt|y0:t, Θ, M, Πe)p(y0:t|Θ, λ) where y0:t is an an abbreviation for yτ = 0 ∀τ = 0, · · · , t and y0:t ̸= 0 is an an abbreviation for ∃0 ≤τ ≤t satisfying yτ ̸= 0. The sum P E(K) T is over all episodes in E (K) T . The difference between (9) and (11) is | bV (E (K) T , Θ) − bV (E (K) T ; Θ, λ)| = P E(K) T PT t=0γtrtp(a0:t, o1:t, rt|y0:t = 0, Θ, M)(1 −p(y0:t = 0|Θ, λ)) − P E(K) T PT t=0 γtRmax P y0:t̸=0p(a0:t, o1:t, rt|y0:t, Θ, M, Πe)p(y0:t|Θ, λ) = P E(K) T PT t=0 γtrtp(a0:t, o1:t, rt|y0:t = 0, Θ, M) P y0:t̸=0p(y0:t|Θ, λ) − P E(K) T PT t=0 γtRmax P y0:t̸=0p(a0:t, o1:t, rt|y0:t, Θ, M, Πe)p(y0:t|Θ, λ) = X E(K) T T X t=0 γtrt X y0:t̸=0 h p(a0:t, o1:t, rt|y0:t = 0, Θ, M) −Rmax rt p(a0:t, o1:t, rt|y0:t, Θ, M, Πe) i p(y0:t|Θ, λ) ≤ P E(K) T PT t=0 γtRmax P y0:t̸=0p(y0:t|Θ, λ) = P E(K) T PT t=0γtRmax(1 −p(y0:t = 0|Θ, λ)) ≤ P E(K) T (1 −p(y0:T = 0|Θ, λ)) PT t=0γtRmax ≤Rmax 1 −γ P E(K) T (1 −p(y0:T = 0|Θ, λ)) where P y0:t̸=0 is a sum over all sequences {y0:t : ∃0 ≤τ ≤t satisfying yτ ̸= 0}. Q.E.D. 8 References [1] M. J. Beal. Variational Algorithms for Approximate Bayesian Inference. PhD thesis, Gatsby Computational Neuroscience Unit, Univertisity College London, 2003. [2] R. I. Brafman and M. Tennenholtz. R-max - a general polynomial time algorithm for near-optimal reinforcement learning. Journal of Machine Learning Research, 3(OCT):213–231, 2002. [3] F. Doshi, J. Pineau, and N. Roy. Reinforcement learning with limited reinforcement: Using Bayes risk for active learning in POMDPs. In Proceedings of the 25th international conference on Machine learning, pages 256–263. ACM, 2008. [4] M. Kearns and D. Koller. Efficient reinforcement learning in factored mdps. In Proc. of the Sixteenth International Joint Conference of Artificial Intelligence, pages 740–747, 1999. [5] M. Kearns and S. P. Singh. Near-optimal performance for reinforcement learning in polynomial time. In Proc. ICML, pages 260–268, 1998. [6] H. Li, X. Liao, and L. Carin. Multi-task reinforcement learning in partially observable stochastic environments. Journal of Machine Learning Research, 10:1131–1186, 2009. [7] M.L. Littman, A.R. Cassandra, and L.P. Kaelbling. Learning policies for partially observable environments: scaling up. In ICML, 1995. [8] J. Pineau, G. Gordon, and S. Thrun. Point-based value iteration: An anytime algorithm for POMDPs. In Proceedings of the Sixteenth International Joint Conference on Artificial Intelligence (IJCAI), pages 1025 – 1032, August 2003. [9] P. Poupart and N. Vlassis. Model-based bayesian reinforcement learning in partially observable domains. In International Symposiu on Artificial Intelligence and Mathmatics (ISAIM), 2008. [10] R. Sutton and A. Barto. Reinforcement learning: An introduction. MIT Press, Cambridge, MA, 1998. 9
2009
229
3,736
Potential-Based Agnostic Boosting Adam Tauman Kalai Microsoft Research adum@microsoft.com Varun Kanade Harvard University vkanade@fas.harvard.edu Abstract We prove strong noise-tolerance properties of a potential-based boosting algorithm, similar to MadaBoost (Domingo and Watanabe, 2000) and SmoothBoost (Servedio, 2003). Our analysis is in the agnostic framework of Kearns, Schapire and Sellie (1994), giving polynomial-time guarantees in presence of arbitrary noise. A remarkable feature of our algorithm is that it can be implemented without reweighting examples, by randomly relabeling them instead. Our boosting theorem gives, as easy corollaries, alternative derivations of two recent nontrivial results in computational learning theory: agnostically learning decision trees (Gopalan et al, 2008) and agnostically learning halfspaces (Kalai et al, 2005). Experiments suggest that the algorithm performs similarly to MadaBoost. 1 Introduction Boosting procedures attempt to improve the accuracy of general machine learning algorithms, through repeated executions on reweighted data. Aggressive reweighting of data may lead to poor performance in the presence of certain types of noise [1]. This has been addressed by a number of “robust” boosting algorithms, such as SmoothBoost [2, 3] and MadaBoost [4] as well as boosting by branching programs [5, 6]. Some of these algorithms are potential-based boosters, i.e., natural variants on AdaBoost [7], while others are perhaps less practical but have stronger theoretical guarantees in the presence of noise. The present work gives a simple potential-based boosting algorithm with guarantees in the (arbitrary noise) agnostic learning setting [8, 9]. A unique feature of our algorithm, illustrated in Figure 1, is that it does not alter the distribution on unlabeled examples but rather it alters the labels. This enables us to prove a strong boosting theorem in which the weak learner need only succeed for one distribution on unlabeled examples. To the best of our knowledge, earlier weak-to-strong boosting theorems have always relied on the ability of the weak learner to succeed under arbitrary distributions. The utility of our boosting theorem is demonstrated by re-deriving two non-trivial results in computational learning theory, namely agnostically learning decision trees [10] and agnostically learning halfspaces [11], which were previously solved using very different techniques. The main contributions of this paper are, first, giving the first provably noise-tolerant analysis of a potential-based boosting algorithm, and, second, giving a distribution-specific boosting theorem that does not require the weak learner to learn over all distributions on x ∈X. This is in contrast to recent work by Long and Servedio, showing that convex potential boosters cannot work in the presence of random classification noise [12]. The present algorithm circumvents that impossibility result in two ways. First, the algorithm has the possibility of negating the current hypothesis and hence is not technically a standard potential-based boosting algorithm. Second, weak agnostic learning is more challenging than weak learning with random classification noise, in the sense that an algorithm which is a weak-learner in the random classification noise setting need not be a weak-learner in the agnostic setting. Related work. There is a substantial literature on robust boosting algorithms, including algorithms already mentioned, MadaBoost, SmoothBoost, as well as LogitBoost [13], BrownBoost [14], Nad1 Simplified Boosting by Relabeling Procedure Inputs: (x1, y1), . . . , (xm, ym) ∈X × {−1, 1}, T ≥1, and weak learner W. Output: classifier h : X →{−1, 1}. 1. Let H0 = 0 2. For t = 1, . . . , T : (a) For i = 1, . . . , m: • wt i = min{1, exp(−Ht−1(xi)yi)} • With probability wt i, set ˜yt i = yi, otherwise pick ˜yt i ∈{−1, 1} randomly (b) gt = W (x1, ˆyt 1), . . . , (xm, ˆyt m)  . (c) ht = argmax g∈{gt,−sign(Ht−1)} X i wt iyig(xi). /* possibly take negated hypothesis */ (d) γt = 1 m Pm i=1 wt iyiht(xi) (e) Ht(x) = Ht−1(x) + γtht(x) 3. Output h = sign(HT ) as hypothesis. Figure 1: Simplified Boosting by Relabeling Procedure. Each epoch, the algorithm runs the weak learner on relabeled data ⟨(xi, ˜yt i)⟩m i=1. In traditional boosting, on each epoch, Ht is a linear combination of weak hypotheses. For our agnostic analysis, we also need to include the negated current hypothesis, −sign(Ht−1) : X →{−1, 1}, as a possible weak classifier. ∗In practice, to avoid adding noise, each example would be replaced with three weighted examples: (xi, yi) with weight wt i, and (xi, ±1) each with weight (1 −wt i)/2. aBoost [15] and others [16, 17], including extensive experimentation [18, 15, 19]. These are all simple boosting algorithms whose output is a weighted majority of classifiers. Many have been shown to have formal boosting properties (weak to strong PAC-learning) in a noiseless setting, or partial boosting properties in noisy settings. There has also been a line of work on boosting algorithms that provably boost from weak to strong learners either under agnostic or random classification noise, using branching programs [17, 20, 5, 21, 6]. Our results are stronger than those in the recent work of Kalai, Mansour, Verbin [6], for two main reasons. First, we propose a simple potential-based algorithm that can be implemented efficiently. Second, since we don’t change the distribution over unlabeled examples, we can boost distribution-specific weak learners. In recent work, using a similar idea of relabeling, Kalai, Kanade and Mansour[22] proved that the class of DNFs is learnable in a one-sided error agnostic learning model. Their algorithm is essentially a simpler form of boosting. Experiments. Our boosting procedure is quite similar to MadaBoost. The main differences are: (1) there is the possibility of using the negation of the current hypothesis at each step, (2) examples are relabeled rather than reweighted, and (3) the step size is slightly different. The goal of experiments was to understand how significant these differences may be in practice. Preliminary experimental results, presented in Section 5, suggest that all of these modifications are less important in practice than theory. Hence, the present simple analysis can be viewed as a theoretical justification for the noise-tolerance of MadaBoost and SmoothBoost. 1.1 Preliminaries In the agnostic setting, we consider learning with respect to a distribution over X×Y . For simplicity, we will take X be to finite or countable and Y = {−1, 1}. Formally, learning is with respect to some class of functions, C, where each c ∈C is a binary classifier c : X →{−1, 1}. There is an arbitrary distribution µ over X and an arbitrary target function f : X →[−1, 1]. Together these determine an arbitrary joint distribution D = ⟨µ, f⟩over X × {−1, 1} where D(x, y) = µ(x) 1+yf(x) 2 , i.e., f(x) = ED[y|x]. The error and correlation1 of a classifier h : X →{−1, 1} with respect to D, are 1This quantity is typically referred to as edge in the boosting literature. However, cor(h, D) = 2 edge(h, D) according to the standard notation, hence we use the notation cor. 2 respectively defined as, err(h, D) = Pr (x,y)∼D[h(x) ̸= y] cor(h, D) = E (x,y)∼D[h(x)y] = E x∼µ[h(x)f(x)] = 1 −2 err(h, D) We will omit D when understood from context. The goal of the learning algorithm is to achieve error (equivalently correlation) arbitrarily close to that of the best classifier in C, namely, err(C) = err(C, D) = inf c∈C err(c, D); cor(C) = cor(C, D) = sup c∈C cor(c, D) A γ-weakly accurate classifier [23] for PAC (noiseless) learning is simply one whose correlation is at least γ (for some γ ∈(0, 1)). A different definition of weakly accurate classifier is appropriate in the agnostic setting. Namely, for some γ ∈(0, 1), h : X →{−1, 1} is said to be γ-optimal for C (and D) if, cor(h, D) ≥γ cor(C, D) Hence, if the labels are totally random then a weak hypothesis need not have any correlation over random guessing. On the other hand, in a noiseless setting, where cor(C) = 1, this is equivalent to a γ-weakly accurate hypothesis. The goal is to boost from an algorithm capable of outputting γ-optimal hypotheses to one which outputs a nearly 1-optimal hypothesis, even for small γ. Let D be a distribution over X × {−1, 1}. Let w : X × {−1, 1} →[0, 1] be a weighting function. We now define the distribution D relabeled by w, RD,w. Procedurally, one can think of generating a sample from RD,w by drawing an example (x, y) from D, then with probability w(x, y), outputting (x, y) directly, and with probability 1 −w(x, y), outputting (x, y′) where y′ is uniformly random in {−1, 1}. Formally, RD,w(x, y) = D(x, y)  w(x, y) + 1 −w(x, y) 2  + D(x, −y) 1 −w(x, −y) 2  Note that D and RD,w have the same marginal distributions over unlabeled examples x ∈X. Also, observe that, for any D, w, and h : X →R, E (x,y)∼RD,w [h(x)y] = E (x,y)∼D[h(x)yw(x, y)] (1) This can be seen by the procedural interpretation above. When (x, y) is returned directly, which happens with probability w(x, y), we get a contribution of h(x)y, but E[h(x)y′] = 0 for uniform y′ ∈{−1, 1}. It is possible to describe traditional supervised learning and active (query) learning in the same framework. A general (m, q)-learning algorithm is given m unlabeled examples ⟨x1, . . . , xm⟩, and may make q label queries to a query oracle L : X →{−1, 1}, and it outputs a classifier h : X → {−1, 1}. The queries may be active, meaning that queries may only be made to training examples xi, or membership queries meaning that arbitrary examples x ∈X may be queried. The active query setting where q = m is the standard supervised learning setting where all m labels may be queried. One can similarly model semi-supervised learning. Since our boosting procedure does not change the distribution over unlabeled examples, it offers two advantages: (1) Agnostic weak learning may be defined with respect to a single distribution µ over unlabeled examples, and (2) The weak learning algorithms may be active (or use membership queries). In particular, the agnostic weak learning hypothesis for C and µ is that for any f : X → [−1, 1], given examples from D = ⟨µ, f⟩, the learner will output a γ-optimal classifier for C. The advantages of this new definition are: (a) it is not with respect to every distribution on unlabeled examples (the algorithm may only have guarantees for certain distributions), and (b) it is more realistic as it does not assume noiseless data. Finding such a weak learner may be quite challenging since it has to succeed in the agnostic model (where no assumption is made on f), however it may be a bit easier in the sense that the learning algorithm need only handle one particular µ. Definition 1. A learning algorithm is a (γ, ϵ0, δ) agnostic weak learner for C and µ over X if, for any f : X →[−1, 1], with probability ≥1 −δ over its random input, the algorithm outputs h : X →[−1, 1] such that, if D = ⟨µ, f⟩, cor(h, D) = E x∼µ[h(x)f(x)] ≥γ  sup c∈C E x∼µ[c(x)f(x)]  −ϵ0 3 The ϵ0 parameter typically decreases quickly with the size of training data, e.g., O(m−1/2). To see why it is necessary, consider a class C = {c1, c2} consisting of only two classifiers, and one of them has correlation 0 and the other has minuscule positive correlation. Then, one cannot even identify which one has better correlation to within O(m−1/2) using m examples. Note that δ can easily made exponentially small (boosting confidence) using standard techniques. Lastly, we define sign(z) to be 1 if z ≥0 and −1 if z < 0. 2 Formal boosting procedure and main results The formal boosting procedure we analyze is given in Figure 2. AGNOSTIC BOOSTER Inputs: ⟨x1, . . . , xT m+s⟩, T, s ≥1, label oracle L : X →{−1, 1}, (m, q)-learner W. Output: classifier h : X →{−1, 1}. 1. Let H0 = 0 2. Query the labels of the first s examples to get y1 = L(x1), . . . , ys = L(xs). 3. For t = 1, . . . , T : a) Define wt(x, y) = −φ′(Ht−1(x)y) = min{1, exp(−Ht−1(x)y)} Define Lt : X →{−1, 1} by: i) On input x ∈X, let y = L(x). ii) With probability wt(x, y), return y. iii) Otherwise return −1 or 1 with equal probability. b) Let gt = W(⟨xs+(t−1)m+1, . . . , xs+tm⟩, Lt) c) Let i) αt = 1 s s X i=1 gt(xi)wt(xi, yi) ii) βt = 1 s s X i=1 −sign(Ht−1(xi))wt(xi, yi) d) If αt ≥βt, ht = gt; γt = αt; Else, ht = −sign(Ht−1); γt = βt; e) Ht(x) = Ht−1(x) + γtht(x) 4. Output h = sign(Hτ) where τ is chosen so as to minimize empirical error on ⟨(x1, y1), . . . , (xs, ys)⟩ Figure 2: Formal Boosting by Relabeling Procedure. Theorem 1. If W is a (γ, ϵ0, δ) weak learner with respect to C and µ, s = 200 γ2ϵ2 log 1 δ  , T = 29 γ2ϵ2 , Algorithm AGNOSTIC BOOSTER (Figure 2) with probability at least 1 −4δT outputs a hypothesis h satisfying: cor(h, D) ≥cor(C, D) −ϵ0 γ −ϵ Recall that ϵ0 is intended to be very small, e.g., O(m−1/2). Also note that the number of calls to the query oracle L is s plus T times the number of calls made by the weak learner (if the weak learner is active, then so is the boosting algorithm). We show that two recent non-trivial results, viz. agnostically learning decision trees and agnostically learning halfspaces follow as corollaries to Theorem 1. The two results are stated below: Theorem 2 ([10]). Let C be the class of binary decision trees on {−1, 1}n with at most t leaves, and let U be the uniform distribution on {−1, 1}n. There exists an algorithm that when given t, n, ϵ, δ > 0, and a label oracle for an arbitrary f : {−1, 1}n →[−1, 1], makes q = poly(nt/(ϵδ)) membership queries and, with probability ≥1 −δ, outputs h : {−1, 1}n →{−1, 1} such that for Uf = ⟨U, f⟩, err(h, Uf) ≤err(C, Uf) + ϵ. 4 Theorem 3 ([11]). For any fixed ϵ > 0, there exists a univariate polynomial p such that the following holds: Let n ≥1, C be the class of halfspaces in n dimensions, let U be the uniform distribution on {−1, 1}n, and f : {−1, 1}n →[−1, 1] be an arbitrary function. There exists a polynomialtime algorithm that, when given m = p(n log(1/δ)) labeled examples from Uf = ⟨U, f⟩, outputs a classifier h : {−1, 1}n →{−1, 1} such that err(h, Uf) ≤err(C, Uf) + ϵ. (The algorithm makes no queries.) Note that a related theorem was shown for halfspaces over log-concave distributions over X = Rn. The boosting approach here similarly generalizes to that case in a straightforward manner. This illustrates how, from the point of view of designing provably efficient agnostic learning algorithms, the current boosting procedure may be useful. 3 Analysis of Boosting Algorithm This section is devoted to the analysis of algorithm AGNOSTIC BOOSTER (see Fig 2). As is standard, the boosting algorithm can be viewed as minimizing a convex potential function. However, the proof is significantly different than the analysis of AdaBoost [7], where they simply use the fact that the potential is an upper-bound on the error rate. Our analysis has two parts. First, we define a conservative relabeling, such as the one we use, to be one which never relabels/downweights examples that the booster currently misclassifies. We show that for a conservative reweighting, either the weak learner will make progress, returning a hypothesis correlated with the relabeled distribution or −sign(Ht−1) will be correlated with the relabeled distribution. Second, if we find a hypothesis correlated with the relabeled distribution, then the potential on round t will be noticeably lower than that of round t −1. This is essentially a simple gradient descent analysis, using a bound on the second derivative of the potential. Since the potential is between 0 and 1, it can only drop so many rounds. This implies that sign(Ht) must be a near-optimal classifier for some t (though the only sure way we have of knowing which one to pick is by testing accuracy on held-out data). The potential function we consider, as in MadaBoost, is defined by φ : R →R, φ(z) = 1 −z if z ≤0 e−z if z > 0 Define the potential of a (real-valued) hypothesis H with respect to a distribution D over X×{−1, 1} as: Φ(H, D) = E (x,y)∼D[φ(yH(x))] (2) Note that Φ(H0, D) = Φ(0, D) = 1. We will show that the potential decreases every round of the algorithm. Notice that the weights in the boosting algorithm correspond to the derivative of the potential, because −φ′(z) = min{1, exp(−z)} ∈[0, 1]. In other words, the weak learning step is essentially a gradient descent step. We next state a key fact about agnostic learning in Lemma 1. Definition 2. Let h : X →{−1, 1} be a hypothesis. Then weighting function w : X × {−1, 1} → [0, 1] is called conservative for h if w(x, −h(x)) = 1 for all x ∈X. Note that, if the hypothesis is sign(Ht(x)), then a weighting function defined by −φ′(Ht(x)y) is conservative if and only if φ′(z) = −1 for all z < 0. We first show that relabeling according to a conservative weighting function is good in the sense that, if h is far from optimal according to the original distribution, then after relabeling by w it is even further from optimal. Lemma 1. For any distribution D over X × {−1, 1}, classifiers c, h : X →{−1, 1}, and any weighting function w : X × {−1, 1} →[0, 1] conservative for h, cor(c, RD,w) −cor(h, RD,w) ≥cor(c, D) −cor(h, D) 5 Proof. By the definition of correlation and eq. (1), cor(c, RD,w) = ED[c(x)yw(x, y)]. Hence, cor(c, RD,w) −cor(h, RD,w) = cor(c, D) −cor(h, D) − E (x,y)∼D[(c(x) −h(x))y(1 −w(x, y))] Finally, consider two cases. In the first case, when 1 −w(x, y) > 0, we have h(x)y = 1 while c(x)y ≤1. The second case is 1 −w(x, y) = 0. In either case, (c(x) −h(x))y(1 −w(x, y)) ≤0. Thus the above equation implies the lemma. We will use Lemma 1 to show that the weak learner will return a useful hypothesis. The case in which the weak learner may not return a useful hypothesis is when cor(C, RD,w) = 0, when the optimal classifier on the reweighted distribution has no correlation. This can happen, but in this case it means that either our current hypothesis is close to optimal, or h = sign(Ht−1) is even worse than random guessing, and hence we can use its negation as a weak agnostic learner. We next explain how a γ-optimal classifier on the reweighted distribution decreases the potential. We will use the following property linear approximation of φ. Lemma 2. For any x, δ ∈R, |φ(x + δ) −φ(x) −φ′(x)δ| ≤δ2/2. Proof. This follows from Taylor’s theorem and the fact the function φ is differentiable everywhere, and that the left and right second derivatives exist everywhere and are bounded by 1. Let ht : X →{−1, 1} be the weak hypothesis that the algorithm finds on round t. This may either be the hypothesis returned by the weak learner W or −sign(Ht−1). The following lemma lower bounds the decrease in potential caused by adding γtht to Ht−1. We will apply the following Lemma on each round of the algorithm to show that the potential decreases on each round, as long as the weak hypothesis ht has non-negligible correlation and γt is suitably chosen. Lemma 3. Consider any function H : X →R, hypothesis h : X →[−1, 1], γ ∈R, and distribution D over X × {−1, 1}. Let D′ = RD,w be the distribution D relabeled by w(x, y) = −φ′(yH(x)). Then, Φ(H, D) −Φ(H + γh, D) ≥γ cor(h, D′) −γ2 2 Proof. For any (x, y) ∈X × {−1, 1}, using Lemma 2 we know that: φ(H(x)y) −φ((H(x) + γh(x))y) ≥γh(x)y(−φ′(H(x)y)) −γ2 2 In the step above we use the fact that h(x)2y2 ≤1. Taking expectation over (x, y) from D, Φ(H, D) −φ(H + γh, D) ≥ E (x,y)∼D[h(x)y(−φ′(H(x)y))] −γ2 2 = E (x,y)∼D′[h(x)y] −γ2 2 In the above we have used Eq. (1). We are done, by definition of cor(h, D′). Using all the above lemmas, we will show that the algorithm AGNOSTIC BOOSTER returns a hypothesis with correlation (or error) close to that of the best classifier from C. We are now ready to prove the main theorem. Proof of Theorem 1. Suppose ∃c ∈C such that cor(c, D) > cor(sign(Ht−1), D) + ϵ0 γ + ϵ, then applying Lemma 1 to Ht−1 and setting wt(x, y) = −φ′(Ht−1(x)y), we get that cor(c, RD,wt) > cor(sign(Ht−1), RD,wt) + ϵ0 γ + ϵ (3) In this case we want to show that the algorithm successfully finds ht with cor(ht, RD,wt) ≥γϵ 3 . 6 Let gt be the hypothesis returned by the weak learner W. From Step 3c) in the algorithm: αt = 1 s s X i=1 g(xi)wt(xi, yi); βt = 1 s s X i=1 −sign(Ht−1)(xi)wt(xi, yi) When s = 200 γ2ϵ2 log 1 δ  , by Chernoff-Hoeffding bounds we know that αt and βt are within an additive γϵ 20 of cor(gt, RD,wt) and cor(−sign(Ht−1), RD,wt) respectively with probability at least 1−2δ. As defined in Step 3d) in the algorithm, let γt = max(αt, βt). We allow the algorithm to fail with probability 3δ at this stage, possibly caused by the weak-learner and the estimation of αt, βt. Consider two cases: First that cor(c, RD,wt) ≥ϵ0 γ + ϵ 2, in this case by the weak learning assumption, cor(gt, RD,wt) ≥γϵ 2 . In the second case, if this does not hold, then cor(−sign(Ht−1), RD,wt) ≥ϵ 2 using (3). Thus, even after taking into account the fact that the empirical estimates may be off from the true correlations by γϵ 20, we get that cor(ht, RD,wt) ≥γϵ 3 and that |γt −cor(ht, RD,wt)| ≤γϵ 20. Using this and Lemma 3, we get that by setting Ht = Ht−1 + γtht the potential decreases by at least γ2ϵ2 29 . When t = 0 and H0 = 0, Φ(H0, D) = 1. Since for any H : X →R, Φ(H, D) > 0; we can have at most T = 29 γ2ϵ2 rounds. This guarantees that when the algorithm is run for T rounds, on some round t the hypothesis sign(Ht) will have correlation at least sup c∈C cor(c, D) −ϵ0 γ −2ϵ 3 . For s = 200 γ2ϵ2 log 1 δ  the empirical estimate of the correlation of the constructed hypothesis on each round is within an additive ϵ 6 of its true correlation, allowing a further failure probability of δ each round. Thus the final hypothesis Hτ which has the highest empirical correlation satisfies, cor(Hτ, D) ≥sup c∈C cor(c, D) −ϵ0 γ −ϵ Since there is a failure probability of at most 4δ on each round, the algorithm succeeds with probability at least 1 −4Tδ. 4 Applications We show that recent agnostic learning analyses can be dramatically simplified using our boosting algorithm. Both of the agnostic algorithms are distribution-specific, meaning that they only work on one (or a family) of distributions µ over unlabeled examples. 4.1 Agnostically Learning Decision Trees Recent work has shown how to agnostically learn polynomial-sized decision trees using membership queries, by an L1 gradient-projection algorithm [10]. Here, we show that learning decision trees is quite simple using our distribution-specific boosting theorem and the Kushilevitz-Mansour membership query parity learning algorithm as a weak learner [24]. Lemma 4. Running the KM algorithm, using q = poly(n, t, 1/ϵ0) queries, and outputting the parity with largest magnitude of estimated Fourier coefficient, is a (γ = 1/t, ϵ0) agnostic weak learner for size-t decision trees over the uniform distribution. The proof of this Lemma is simple using results in [24] and is given in Appendix A. Theorem 2 now follows easily from Lemma 4 and Theorem 1. 4.2 Agnostically Learning Halfspaces In the case of learning halfspaces, the weak learner simply finds the degree-d term, χS(x) with |S| ≤d, with greatest empirical correlation 1 m Pm i=1 χS(xi)yi on a data set (x1, y1), . . . , (xm, ym). The following lemma is useful in analyzing it. Lemma 5. For any ϵ > 0, there exists d ≥1 such that the following holds. Let n ≥1, C be the class of halfspaces in n dimensions, let U be the uniform distribution on {−1, 1}n, and f : {−1, 1}n → [−1, 1] be an arbitrary function. Then there exists a set S ⊆[n] of size |S| ≤d = 20 ϵ4 0 such that | cor(χS, Uf)| ≥(cor(C, Uf) −ϵ0)/nd. 7 Using results from [25] the proofs of Lemma 5 and Theorem 3 are straightforward and are given in Appendix B. 5 Experiments We performed preliminary experiments with the new boosting algorithm presented here on 8 datasets from UCI repository [26]. We converted multi-class problems into binary classification problems by arbitrarily grouping classes, and ran Adaboost, Madaboost and Agnostic Boost on these datasets, using stumps as weak learners. Since stumps can accept weighted examples, we passed the exact weighted distribution to the weak learner. Our experiments were performed with fractional relabeling, which means the following. Rather than keeping the label with probability wt(x, y) and making it completely random with the remaining probability, we added both (x, y) and (x, −y) with weights (1 + wt(x, y))/2 and (1 −wt(x, y))/2 respectively. Experiments with random relabeling showed that random relabeling performs much worse than fractional relabeling. Table 1 summarizes the final test error on the datasets. In the case of pima and german datasets, we observed overfitting and the reported test errors are the minimum test error observed for all the algorithms. In all other cases the test error rate at the end of round 500 is reported. Only pendigits had a test dataset, for the rest of the datasets we performed 10-fold cross validation. We also added random classification noise of 5%, 10% and 20% to the datasets and ran the boosting algorithms on the modified dataset. Dataset No Added Noise 5% noise 10% Noise 20% Noise Ada Mada Agn Ada Mada Agn Ada Mada Agn Ada Mada Agn sonar 12.4 14.8 15.3 23.9 20.6 24.0 26.5 26.3 25.1 34.2 32.7 34.5 ionosphere 8.6 9.1 8.1 15.8 17.2 14.4 24.2 23.8 21.8 32 28.2 27.8 pima 23.7 23.0 23.6 26.1 24.9 25.7 27.6 26.4 26.7 34.3 34.5 34 german 23.1 23.6 23.1 28.5 27.7 27.5 29.0 29.5 30.0 35.0 34.5 35.1 waveform 10.4 10.2 10.3 14.9 15.0 13.9 20.1 19.2 19.1 27.9 27.3 27.1 magic 14.7 14.9 14.5 18.2 18.3 18.1 21.9 22.0 21.5 29.4 29.1 28.7 letter 17.4 18.2 18.3 20.9 21.4 21.5 24.6 24.9 25.2 31.4 31.8 31.6 pendigits 7.4 7.3 8.2 12.1 12.0 13.0 16.8 16.3 16.9 25.5 25.2 25.3 Table 1: Final test error rates of Adaboost, Madaboost and Agnostic Boosting on 8 datasets. The first column reports error rates on the original datasets, and the next three report errors on datasets with 5%, 10% and 20% classification noise added. 6 Conclusion We show that potential-based agnostic boosting is possible in theory, and also that this may be done without changing the distribution over unlabeled examples. We show that non-trivial agnostic learning results, for learning decision trees and halfspaces, can be viewed as simple applications of our boosting theorem combined with well-known weak learners. Our analysis can be viewed as a theoretical justification of noise tolerance properties of algorithms like Madaboost and Smoothboost. Preliminary experiments show that the performance of our boosting algorithm is comparable to that of Madaboost and Adaboost. A more thorough empirical evaluation of our boosting procedure using different weak learners is part of future research. References [1] T. G. Dietterich. An experimental comparison of three methods for constructing ensembles of decision trees: bagging, boosting, and randomization. Machine Learning, 40(2):139–158, 2000. [2] R. Servedio. Smooth boosting and learning with malicious noise. Journal of Machine Learning Research, 4:633–648, 2003. [3] D. Gavinsky. Optimally-smooth adaptive boosting and application to agnostic learning. Journal of Machine Learning Research, 4:101–117, 2003. 8 [4] C. Domingo and O. Watanabe. Madaboost: A modification of adaboost. In Proceedings of the Thirteenth Annual Conference on Learning Theory, pages 180–189, San Francisco, CA, USA, 2000. Morgan Kaufmann Publishers Inc. [5] A. Kalai and R. Servedio. Boosting in the presence of noise. In Proceedings of the 35th Annual Symposium on Theory of Computing (STOC), pages 196–205, 2003. [6] A. T. Kalai, Y. Mansour, and E. Verbin. On agnostic boosting and parity learning. In STOC ’08: Proceedings of the 40th annual ACM symposium on Theory of computing, pages 629–638, New York, NY, USA, 2008. ACM. [7] Y. Freund and R. Schapire. Game theory, on-line prediction and boosting. In Proceedings of the Ninth Annual Conference on Computational Learning Theory, pages 325–332, 1996. [8] D. Haussler. Decision theoretic generalizations of the pac model for neural net and other learning applications. Inf. Comput., 100(1):78–150, 1992. [9] M. Kearns, R. Schapire, and L. Sellie. Toward Efficient Agnostic Learning. Machine Learning, 17(2):115–141, 1994. [10] P. Gopalan, A. T. Kalai, and A. R. Klivans. Agnostically learning decision trees. In Proceedings of the 40th annual ACM symposium on Theory of computing, pages 527–536, New York, NY, USA, 2008. ACM. [11] A. T. Kalai, A. R. Klivans, Y. Mansour, and R. Servedio. Agnostically learning halfspaces. In Proc. 46th IEEE Symp. on Foundations of Computer Science (FOCS’05), 2005. [12] P. M. Long and R. A. Servedio. Random classification noise defeats all convex potential boosters. In ICML, pages 608–615, 2008. [13] J. Friedman, T. Hastie, and R. Tibshirani. Additive logistic regression: a statistical view of boosting. Annals of Statistics, 28:2000, 1998. [14] Y. Freund. An adaptive version of the boost-by-majority algorithm. In Proceedings of the Twelfth Annual Conference on Computational Learning Theory, pages 102–113, 1999. [15] M. Nakamura, H. Nomiya, and K. Uehara. Improvement of boosting algorithm by modifying the weighting rule. Annals of Mathematics and Artificial Intelligence, 41(1):95–109, 2004. [16] T. Bylander and L. Tate. Using validation sets to avoid overfitting in adaboost. In G. Sutcliffe and R. Goebel, editors, FLAIRS Conference, pages 544–549. AAAI Press, 2006. [17] S. Ben-David, P. M. Long, and Y. Mansour. Agnostic boosting. In Proceedings of the 14th Annual Conference on Computational Learning Theory, COLT 2001, volume 2111 of Lecture Notes in Artificial Intelligence, pages 507–516. Springer, 2001. [18] R. A. McDonald, D. J. Hand, and I. A. Eckley. An empirical comparison of three boosting algorithms on real data sets with artificial class noise. In T. Windeatt and F. Roli, editors, Multiple Classifier Systems, volume 2709 of Lecture Notes in Computer Science, pages 35–44. Springer, 2003. [19] J. K. Bradley and R. Schapire. Filterboost: Regression and classification on large datasets. In J.C. Platt, D. Koller, Y. Singer, and S. Roweis, editors, Advances in Neural Information Processing Systems 20, pages 185–192. MIT Press, Cambridge, MA, 2008. [20] Y. Mansour and D. McAllester. Boosting using branching programs. Journal of Computer and System Sciences, 64(1):103–112, 2002. [21] P. M. Long and R. A. Servedio. Adaptive martingale boosting. In NIPS, pages 977–984, 2008. [22] A. T. Kalai, V. Kanade, and Y. Mansour. Reliable agnostic learning. In COLT ’09: Proceedings of the 22nd annual conference on learning theory, 2009. [23] M. Kearns and L. Valiant. Cryptographic limitations on learning Boolean formulae and finite automata. Journal of the ACM, 41(1):67–95, 1994. [24] E. Kushilevitz and Y. Mansour. Learning decision trees using the Fourier spectrum. SIAM J. on Computing, 22(6):1331–1348, 1993. [25] A. Klivans, R. O’Donnell, and R. Servedio. Learning intersections and thresholds of halfspaces. Journal of Computer & System Sciences, 68(4):808–840, 2004. [26] A. Asuncion and D. J. Newman. UCI Machine Learning Repository [http://www.ics.uci.edu/ ˜mlearn/MLRepository.html] Irvine, CA: University of California, School of Information and Computer Science, 2007. 9
2009
23
3,737
Multiple Incremental Decremental Learning of Support Vector Machines Masayuki Karasuyama and Ichiro Takeuchi Department of Engineering, Nagoya Institute of Technology Gokiso-cho, Syouwa-ku, Nagoya, Aichi, 466-8555, JAPAN krsym@ics.nitech.ac.jp, takeuchi.ichiro@nitech.ac.jp Abstract We propose a multiple incremental decremental algorithm of Support Vector Machine (SVM). Conventional single incremental decremental SVM can update the trained model efficiently when single data point is added to or removed from the training set. When we add and/or remove multiple data points, this algorithm is time-consuming because we need to repeatedly apply it to each data point. The proposed algorithm is computationally more efficient when multiple data points are added and/or removed simultaneously. The single incremental decremental algorithm is built on an optimization technique called parametric programming. We extend the idea and introduce multi-parametric programming for developing the proposed algorithm. Experimental results on synthetic and real data sets indicate that the proposed algorithm can significantly reduce the computational cost of multiple incremental decremental operation. Our approach is especially useful for online SVM learning in which we need to remove old data points and add new data points in a short amount of time. 1 Introduction Incremental decremental algorithm for online learning of Support Vector Machine (SVM) was previously proposed in [1], and the approach was adapted to other variants of kernel machines [2–4]. When a single data point is added and/or removed, these algorithms can efficiently update the trained model without re-training it from scratch. These algorithms are built on an optimization technique called parametric programming [5–7], in which one solves a series of optimization problems parametrized by a single parameter. In particular, one solves a solution path with respect to the coefficient parameter corresponding to the data point to be added or removed. When we add and/or remove multiple data points using these algorithms, one must repeat the updating operation for each single data point. It often requires too much computational cost to use it for real-time online learning. In what follows, we refer this conventional algorithm as single incremental decremental algorithm or single update algorithm. In this paper, we develop a multiple incremental decremental algorithm of the SVM. The proposed algorithm can update the trained model more efficiently when multiple data points are added and/or removed simultaneously. We develop the algorithm by introducing multi-parametric programming [8] in the optimization literature. We consider a path-following problem in the multi-dimensional space spanned by the coefficient parameters corresponding to the set of data points to be added or removed. Later, we call our proposed algorithm as multiple incremental decremental algorithm or multiple update algorithm. The main computational cost of parametric programming is in solving a linear system at each breakpoint (see Section 3 for detail). Thus, the total computational cost of parametric programming is roughly proportional to the number of breakpoints on the solution path. In the repeated use of 1 single update algorithm for each data point, one follows the coordinate-wise solution path in the multi-dimensional coefficient parameter space. On the other hand, in multiple update algorithm, we establish a direction in the multi-dimensional coefficient parameter space so that the total length of the path becomes much shorter than the coordinate-wise one. Because the number of breakpoints in the shorter path followed by our algorithm is less than that in the longer coordinate-wise path, we can gain relative computational efficiency. Figure 2 in Section 3.4 schematically illustrates our main idea. This paper is organized as follows. Section 2 formulates the SVM and the KKT conditions. In Section 3, after briefly reviewing single update algorithm, we describe our multiple update algorithm. In section 4, we compare the computational cost of our multiple update algorithm with the single update algorithm and with the LIBSVM (the-state-of-the-art batch SVM solver based on SMO algorithm) in numerical experiments on synthetic and real data sets. We close in Section 5 with concluding remarks. 2 Support Vector Machine and KKT Conditions Suppose we have a set of training data {(xi, yi)}n i=1, where xi ∈X ⊆Rd is the input and yi ∈{−1, +1} is the output class label. Support Vector Machines (SVM) learn the following discriminant function: f(x) = wT Φ(x) + b, where Φ(x) denotes a fixed feature-space transformation. The model parameter w and b can be obtained by solving an optimization problem: min 1 2||w||2 + C n ∑ i=1 ξi s.t. yif(xi) ≥1 −ξi, ξi ≥0, i = 1, · · · , n, where C ∈R+ is the regularization parameter. Introducing Lagrange multipliers αi ≥0, the optimal discriminant function f : X →R can be formulated as f(x) = ∑n i=1 αiyiK(x, xi) + b, where K(xi, xj) = Φ(xi)T Φ(xj) is a kernel function. From the Karush-Kuhn-Tucker (KKT) optimality conditions, we obtain the following relationships: yif(xi) > 1 ⇒ αi = 0, (1a) yif(xi) = 1 ⇒ αi ∈[0, C], (1b) yif(xi) < 1 ⇒ αi = C, (1c) n ∑ i=1 yiαi = 0. (1d) Using (1a)-(1c), let us define the following index sets: O = {i | yif(xi) > 1, αi = 0}, (2a) M = {i | yif(xi) = 1, 0 ≤αi ≤C}, (2b) I = {i | yif(xi) < 1, αi = C}. (2c) In what follows, the subscription by an index set, such as vI for a vector v ∈Rn, indicates a subvector of v whose elements are indexed by I. Similarly, the subscription by two index sets, such as M M,O for a matrix M ∈Rn×n, denotes a submatrix whose rows are indexed by M and columns are indexed by O. If the submatrix is the principal submatrix such as QM,M, we abbreviate as QM. 3 Incremental Decremental Learning for SVM 3.1 Single Incremental Decremental SVM In this section, we briefly review the conventional single incremental decremental SVM [1]. Using the SV sets (2b) and (2c), we can expand yif(xi) as yif(xi) = ∑ j∈M Qijαj + ∑ j∈I Qijαj + yib, 2 where Qij = yiyjK(xi, xj). When a new data point (xc, yc) is added, we increase the corresponding new parameter αc from 0 while keeping the optimal conditions of the other parameters satisfied. Let us denote the amount of the change of each variable with an operator ∆. To satisfy the equality conditions (1b) and (1d), we need Qic∆αc + ∑ j∈M Qij∆αj + yi∆b = 0, i ∈M, yc∆αc + ∑ j∈M yj∆αj = 0. Solving this linear system with respect to ∆αi, i ∈M, and b, we obtain the update direction of the parameters. We maximize the ∆αc under the constraint that no element moves across M, I and O. After updating the index sets M, I and O, we repeat the process until the new data point satisfies the optimality condition. Decremental algorithm can be derived similarly, in which the target parameter moves toward 0. 3.2 Multiple Incremental Decremental SVM Suppose we add m new data points and remove ℓdata points simultaneously. Let us denote the index set of new adding data points and removing data points as A = {n + 1, n + 2, · · · , n + m} and R ⊂{1, · · · , n}, respectively, where |R| = ℓ. We remove the elements of R from the sets M, I and O (i.e. M ← M \ R, I ←I \ R and O ←O \ R). Let us define y = [y1, · · · , yn+m]⊤, α = [α1, · · · , αn+m]⊤, and Q ∈R(n+m)×(n+m), where (i, j)-th entry of Q is Qij. When m = 1, ℓ= 0 or m = 0, ℓ= 1, our method corresponds to the conventional single incremental decremental algorithm. We initially set αi = 0, ∀i ∈A. If we have yif(xi) > 1, i ∈A, we can append these indices to O and remove them from A because these points already satisfy the optimality condition (1a). Similarly, we can append the indices {i | yif(xi) = 1, i ∈A} to M and remove them from A. In addition, we can remove the points {i | αi = 0, i ∈R} because they already have no influence on the model. Unlike single incremental decremental algorithm, we need to determine the directions of ∆αA and ∆αR. These directions have a critical influence on the computational cost. For ∆αR, we simply trace the shortest path to 0, i.e., ∆αR = −ηαR, (3) where η is a step length. For ∆αA, we do not know the optimal value of αA beforehand. To determine this direction, we may be able to use some optimization techniques (e.g. Newton method). However, such methods usually need additional computational burden. In this paper, we simply take ∆αA = η(C1 −αA). (4) This would become the shortest path if αi = C, ∀i ∈A, at optimality. When we move parameters αi, ∀i ∈A ∪R, the optimality conditions of the other parameters must be kept satisfied. From yif(xi) = 1, i ∈M, and the equality constraint (1d), we need ∑ j∈A Qij∆αj + ∑ j∈R Qij∆αj + ∑ j∈M Qij∆αj + yi∆b = 0, i ∈M, (5) ∑ j∈A yj∆αj + ∑ j∈R yj∆αj + ∑ j∈M yj∆αj = 0. (6) Using matrix notation, (5) and (6) can be written as M [ ∆b ∆αM ] + [ y⊤ A y⊤ R QM,A QM,R ] [ ∆αA ∆αR ] = 0, (7) where M = [ 0 y⊤ M yM QM ] . 3 From the definitions of the index sets in (2a)-(2c), the following inequality constraints must also be satisfied: 0 ≤αi + ∆αi ≤C, i ∈M, (8a) yi{f(xi) + ∆f(xi)} > 1, i ∈O, (8b) yi{f(xi) + ∆f(xi)} < 1, i ∈I. (8c) Since we removed the indices {i | f(xi) ≥1} from A, we obtain yi{f(xi) + ∆f(xi)} < 1, i ∈A. (9) During the process of moving αi, i ∈A, to C from 0, if the inequality (9) becomes equality for any i, we can append the point to M and remove it from A. On the other hand, if (9) holds until αi becomes C, the point moves to I. In the path following literature [8], the region that satisfies (8) and (9) is called critical region (CR). We decide update direction by the linear system (7) while monitoring inequalities (8) and (9). Substituting (3) and (4) to (7), we obtain the update direction [ ∆b ∆αM ] = ηϕ, where ϕ = −M −1 [ y⊤ A y⊤ R QM,A QM,R ] [ C1 −αA −αR ] . (10) To determine step length η, we need to check inequalities (8) and (9). Using vector notation and the hadamard product ⊙(element-wise product [9]), we can write y ⊙∆f = η ψ, where ψ = [ y Q:,M ] ϕ + Q:,A(C1 −αA) −Q:,RαR, (11) and the subscription ”:” of Q denotes the index of all the elements {1, · · · , n + m}. Since (10) and (11) are linear function of η, we can calculate the set of the largest step length ηs for each i at which the inequalities (8) and (9) becomes equality for i. The size of such ηs is |M| × 2 + |O| + |I| + |A| and we define this set as H. We determine the step length as follows: η = min({˜η | ˜η ∈H, ˜η ≥0} ∪{1}). If η becomes 1, we can terminate the algorithm because all the new data points in A and existing points in M, O and I satisfy the optimality conditions and αR is 0. Once we decide η, we can update αM and b using (10), and αA and αR using (3) and (4). In the path-following literature, the points at which the size of linear system (7) is changed are called breakpoints. If the ith data point reaches bound of any one of the constraints (8) and (9) we need to update M, O and I. After updating, we re-calculate ϕ, ψ to determine the next step length. 3.3 Empty Margin We need to establish the way of dealing with the empty margin M. In such case, we can not obtain the bias from yif(xi) = 1, i ∈M. Then we can only obtain the interval of the bias from yif(xi) > 1, i ∈O, yif(xi) < 1, i ∈I ∪A. To keep these inequality constraints, the bias term must be in max i∈L yigi ≤b ≤min i∈U yigi, (12) where gi = 1 − ∑ i∈I αiQij − ∑ i∈A αiQij − ∑ i∈R αiQij, and L = {i | i ∈O, yi = +1} ∪{i | i ∈I ∪A, yi = −1}, U = {i | i ∈O, yi = −1} ∪{i | i ∈I ∪A, yi = +1}. If this empty margin happens during the path-following, we look for the new data points which re-enter the margin. When the set M is empty, equality constraint (6) becomes ∑ i∈A yi∆αi + ∑ i∈R yi∆αi = ηδ(α) = 0, (13) 4 Figure 1: An illustration of the bias in empty margin case. Dotted lines represent yi(gi + ∆gi(η)), for each i. Solid lines are the upper bound and the lower bound of the bias. The bias term is uniquely determined when u(η) and l(η) intersect. where δ(α) = ∑ i∈A yi(C −αi) − ∑ i∈R yiαi. We take two different strategies depending on δ(α). First, if δ(α) ̸= 0, we can not simply increase η from 0 while keeping (13) satisfied. Then we need new margin data point m1 which enables equality constraint to be satisfied. The index m1 is either ilow = argmax i∈L yigi or iup = argmax i∈U yigi. If ilow, iup ∈O ∪I, we can update b and M as follows: δ(α) > 0 ⇒ b = yiupgiup, M = {iup}, δ(α) < 0 ⇒ b = yilowgilow, M = {ilow}. By setting the bias terms as above, equality condition ηδ(α) + ym1∆αm1 = 0 is satisfied. If ilow ∈A or iup ∈A, we can put either of these points to margin. On the other hand, if δ(α) = 0, we can increase η while keeping (13) satisfied. Then, we consider increasing η until the upper bound and the lower bound of the bias (12) take the same value (the bias term can be uniquely determined). If we increase η, gi changes linearly: ∆gi(η) = − ∑ j∈A ∆αjQij − ∑ j∈R ∆αjQij = η { − ∑ j∈A (C −αj)Qij + ∑ j∈R αjQij } . Since each yi(gi + ∆gi(η)) may intersect, we need to consider the following piece-wise linear boundaries: u(η) = max i∈U yi(gi + ∆gi(η)), l(η) = min j∈L yj(gj + ∆gj(η)). Figure 1 shows an illustration of these functions. We can trace the upper bound and the lower bound until two bounds become the same value. 3.4 The number of breakpoints The main computational cost of incremental decremental algorithm is in solving the linear system (10) at each breakpoint (The cost is O(|M|2) because we use Cholesky factor update except the first step). Thus, the number of breakpoints is an important factor of the computational cost. To simplify the discussion, let us introduce the following assumptions: • The number of breakpoints is proportional to the total length of the path. • The path obtained by our algorithm is the shortest one. 5 final path breakpoints borders of CR initial (a) Adding 2 data points. (b) Adding and Removing 1 data point Figure 2: The schematic illustration of the difference of path length and the number of breakpoints. Each polygonal region enclosed by dashed lines represents the region in which M, I, O and A are constant (CR: critical region). The intersection of the path and the borders are the breakpoints. The update of matrices and vectors at the breakpoints are the main computational cost of pathfollowing. In the case of Figure 2(a), we add 2 data points. If optimal α1 = α2 = C, our proposed algorithm can trace shortest path to optimal point from the origin (left plot). On the other hand, single incremental algorithm moves one coordinate at a time (right plot). Figure 2(b) shows the case that we add and remove 1 data point, respectively. In this case, if α2 = C, our algorithm can trace shortest path to α1 = 0, α2 = C (left plot), while single incremental algorithm again moves one coordinate at a time (right plot). The first assumption means that the breakpoints are uniformly distributed on the path. The second assumption holds for the removing parameters αR because we know that we should move αR to 0. On the other hand, for some of αA, the second assumption does not necessarily hold because we do not know the optimal αA beforehand. In particular, if the point i ∈A which was located inside the margin before the update moved to M during the update (i.e. the equality (9) holds), the path with respect to this parameter is not really the shortest one. To simplify the discussion further, let us consider only the case of |A| = m > 0 and |R| = 0 (the same discussion holds for other cases too). In this simplified scenario, the ratio of the number of breakpoints of multiple update algorithm to that of repeated use of single update algorithm is ∥αA∥2 : ∥αA∥1, where ∥• ∥2 is ℓ2 norm and ∥• ∥1 is ℓ1 norm. Figure 2 illustrates the concept in the case of m = 2. If we consider only the case of αi = C, ∀i ∈A, the ratio is simply √m : m. 4 Experiments We compared the computational cost of the proposed multiple incremental decremental algorithm (MID-SVM) with (repeated use of) single incremental decremental algorithm [1] (SID-SVM) and with the LIBSVM [10], the-state-of-the-art batch SVM solver based on sequential minimal optimization algorithm (SMO). In LIBSVM, we examined several tolerances for termination criterion: ε = 10−3, 10−6, 10−9. When we use LIBSVM for online-learning, alpha seeding [11, 12] sometimes works well. The basic idea of alpha seeding is to use the parameters before the update as the initial parameter. In alpha seeding, we need to take care of the fact that the summation constraint α⊤y = 0 may not be satisfied after removing αs in R. In that case, we simply re-distribute δ = ∑ i∈R αiyi to the in-bound αi, i ∈{i | 0 < αi < C}, uniformly. If δ cannot be distributed to in-bound αs, it is also distributed to other αs. If we still can not distribute δ by this way, we did not use alpha-seeding. For kernel function, we used RBF kernel K(xi, xj) = exp(−γ||xi −xj||2). In this paper, we assume that the kernel matrix K is positive definite. If the kernel matrix happens to be singular, which typically arise when there are two or more identical data points in M, our algorithm may not work. As far as we know, this degeneracy problem is not fully solved in path-following literature. Many heuristics are proposed to circumvent the problem. In the experiments described below, we 6 −2 −1 0 1 2 3 −2 −1 0 1 2 3 4 x1 x2 Figure 3: Artificial data set. For graphical simplicity, we plot only a part of data points. The cross points are generated from a mixture of two Gaussian while the circle points come from a single Gaussian. Two classes have equal prior probabilities. use one of them: adding small positive constant to the diagonal elements of kernel matrix. We set this constant as 10−6. In the LIBSVM we can specify cache size of kernel matrix. We set this cache size enough large to store the entire matrix. 4.1 Artificial Data First, we used simple artificial data set to see the computational cost for various number of adding and/or removing points. We generated data points (x, y) ∈R2 × {+1, −1} using normal distributions. Figure 3 shows the generated data points. The size of initial data points is n = 500. As discussed, adding or removing the data points with αi = 0 at optimal can be performed with almost no cost. Thus, to make clear comparison, we restrict the adding and/or removing points as those with αi = C at optimal. Figure 4 shows the log plot of the CPU time. We examined several scenarios: (a) adding m ∈{1, · · · , 50} data points, (b) removing ℓ∈{1, · · · , 50} data points, (c) adding m ∈{1, · · · , 25} data points and removing ℓ∈{1, · · · , 25} data points simultaneously. The horizontal axis is the number of adding and/or removing data points. We see that MID-SVM is significantly faster than SID-SVM. When m = 1 or ℓ= 1, SID-SVM and MID-SVM are identical. The relative difference of SID-SVM and MID-SVM grows as the m and/or ℓincrease because MID-SVM can add or remove multiple data points simultaneously while SID-SVM merely iterates the algorithm m + ℓtimes. In this experimental setting, the CPU time of SMO does not change largely because m and ℓare relatively smaller than n. Figure 5 shows the number of breakpoints of SID-SVM and MID-SVM along with the theoretical number of breakpoints of the MID-SVM in Section 3.4 (e.g., for scenario (a), the number of breakpoints of SID-SVM multiplied by √m/m). The results are very close to the theoretical one. 4.2 Application to Online Time Series Learning We applied the proposed algorithm to a online time series learning problem, in which we update the model when some new observations arrive (adding the new ones and removing the obsolete ones). We used Fisher river data set in StatLib [13]. In this data set, the task is to predict whether the mean daily flow of the river increases or decreases using the previous 7 days temperature, precipitation and flow (xi ∈R21). This data set contains the observations from Jan 1 1988 to Dec 31 1991. The size of the initial data points is n = 1423 and we set m = ℓ= 30 (about a month). Each dimension of x is normalized to [0, 1]. We add new m data points and remove the oldest ℓdata points. We investigate various settings of the regularization parameter C ∈{10−1, 100, · · · , 105} and kernel parameter γ ∈{10−3, 10−2, 10−1, 100}. Unlike previous experiments, we did not choose the adding or removing data points by its parameter. Figure 6 shows the elapsed CPU times and Figure 7 shows 10-fold cross-validation error of each setting. Each figure has 4 plots corresponding to different settings of kernel parameter γ. The horizontal axis denotes the regularization parameter C. Figure 6 shows that our algorithm is faster than the others, especially in large C. It is well known that the computational cost of SMO algorithm becomes large when C gets large [14]. Crossvalidation error in Figure 7 indicates that the relative computational cost of our proposed algorithm is especially low for the hyperparameters with good generalization performances in this application problem. 7 0 10 20 30 40 50 10 −1.8 10 −1.6 10 −1.4 10 −1.2 m CPU time (sec) MID−SVM SID−SVM SMO(ε=1e−3) SMO(ε=1e−6) SMO(ε=1e−9) (a) Adding m data points. 0 10 20 30 40 50 10 −1.8 10 −1.6 10 −1.4 10 −1.2 l CPU time (sec) MID−SVM SID−SVM SMO(ε=1e−3) SMO(ε=1e−6) SMO(ε=1e−9) (b) Removing ℓdata points. 0 5 10 15 20 25 10 −1.9 10 −1.7 10 −1.5 10 −1.3 m and l CPU time (sec) MID−SVM SID−SVM SMO(ε=1e−3) SMO(ε=1e−6) SMO(ε=1e−9) (c) Adding m data points and removing ℓdata points simultaneously (m = ℓ). Figure 4: Log plot of the CPU time (artificial data set) 0 10 20 30 40 50 0 100 200 300 400 500 600 m the number of breakpoints MID−SVM SID−SVM Theoretical (a) Adding m data points. 0 10 20 30 40 50 0 100 200 300 400 500 600 l the number of breakpoints MID−SVM SID−SVM Theoretical (b) Removing ℓdata points. 0 5 10 15 20 25 0 50 100 150 200 250 300 350 400 450 500 m and l the number of breakpoints MID−SVM SID−SVM Theoretical (c) Adding m data points and removing ℓdata points simultaneously (m = ℓ). Figure 5: The number of breakpoints (artificial data set) 10 −2 10 0 10 2 10 4 10 6 10 −1 10 0 10 1 10 2 10 3 C CPU time (sec) MID−SVM SID−SVM SMO(ε=1e−3) SMO(ε=1e−6) SMO(ε=1e−9) (a) γ = 100 10 −2 10 0 10 2 10 4 10 6 10 −1 10 0 10 1 10 2 10 3 C CPU time (sec) MID−SVM SID−SVM SMO(ε=1e−3) SMO(ε=1e−6) SMO(ε=1e−9) (b) γ = 10−1 10 −2 10 0 10 2 10 4 10 6 10 −1 10 0 10 1 10 2 C CPU time (sec) MID−SVM SID−SVM SMO(ε=1e−3) SMO(ε=1e−6) SMO(ε=1e−9) (c) γ = 10−2 10 0 10 5 10 −0.5 10 −0.3 10 −0.1 10 0.1 C CPU time (sec) MID−SVM SID−SVM SMO(ε=1e−3) SMO(ε=1e−6) SMO(ε=1e−9) (d) γ = 10−3 Figure 6: Log plot of the CPU time (Fisher river data set) 10 −2 10 0 10 2 10 4 10 6 0.32 0.33 0.34 0.35 0.36 0.37 0.38 0.39 0.4 0.41 0.42 Cross Validation Error C (a) γ = 100 10 −2 10 0 10 2 10 4 10 6 0.32 0.34 0.36 0.38 0.4 0.42 0.44 0.46 Cross Validation Error C (b) γ = 10−1 10 −2 10 0 10 2 10 4 10 6 0.34 0.36 0.38 0.4 0.42 0.44 0.46 Cross Validation Error C (c) γ = 10−2 10 −2 10 0 10 2 10 4 10 6 0.34 0.36 0.38 0.4 0.42 0.44 0.46 Cross Validation Error C (d) γ = 10−3 Figure 7: Cross-validation error (Fisher river data set) 5 Conclusion We proposed multiple incremental decremental algorithm of the SVM. Unlike single incremental decremental algorithm, our algorithm can efficiently work with simultaneous addition and/or removal of multiple data points. Our algorithm is built on multi-parametric programming in the optimization literature [8]. We previously proposed an approach to accelerate Support Vector Regression (SVR) cross-validation using similar technique [15]. These multi-parametric programming frameworks can be easily extended to other kernel machines. 8 References [1] G. Cauwenberghs and T. Poggio, “Incremental and decremental support vector machine learning,” in Advances in Neural Information Processing Systems (T. K. Leen, T. G. Dietterich, and V. Tresp, eds.), vol. 13, (Cambridge, Massachussetts), pp. 409–415, The MIT Press, 2001. [2] M. Martin, “On-line support vector machines for function approximation,” tech. rep., Software Department, University Politecnica de Catalunya, 2002. [3] J. Ma and J. Theiler, “Accurate online support vector regression,” Neural Computation, vol. 15, no. 11, pp. 2683–2703, 2003. [4] P. Laskov, C. Gehl, S. Kruger, and K.-R. Muller, “Incremental support vector learning: Analysis, implementation and applications,” Journal of Machine Learning Research, vol. 7, pp. 1909–1936, 2006. [5] T. Hastie, S. Rosset, R. Tibshirani, and J. Zhu, “The entire regularization path for the support vector machine,” Journal of Machine Learning Research, vol. 5, pp. 1391–1415, 2004. [6] L. Gunter and J. Zhu, “Efficient computation and model selection for the support vector regression,” Neural Computation, vol. 19, no. 6, pp. 1633–1655, 2007. [7] G. Wang, D.-Y. Yeung, and F. H. Lochovsky, “A new solution path algorithm in support vector regression,” IEEE Transactions on Neural Networks, vol. 19, no. 10, pp. 1753–1767, 2008. [8] E. N. Pistikopoulos, M. C. Georgiadis, and V. Dua, Process Systems Engineering: Volume 1: MultiParametric Programming. WILEY-VCH, 2007. [9] J. R. Schott, Matrix Analysis For Statistics. Wiley-Interscience, 2005. [10] C.-C. Chang and C.-J. Lin, “LIBSVM: a library for support vector machines,” 2001. Software available at http://www.csie.ntu.edu.tw/∼cjlin/libsvm. [11] D. DeCoste and K. Wagstaff, “Alpha seeding for support vector machines,” in Proceedings of the International Conference on Knowledge Discovery and Data Mining, pp. 345–359, 2000. [12] M. M. Lee, S. S. Keerthi, C. J. Ong, and D. DeCoste, “An efficient method for computing leave-one-out error in support vector machines,” IEEE transaction on neural networks, vol. 15, no. 3, pp. 750–757, 2004. [13] M. Meyer, “Statlib.” http://lib.stat.cmu.edu/index.php. [14] L. Bottou and C.-J. Lin, “Support vector machine solvers,” in Large Scale Kernel Machines (L. Bottou, O. Chapelle, D. DeCoste, and J. Weston, eds.), pp. 301–320, Cambridge, MA.: MIT Press, 2007. [15] M. Karasuyama, I. Takeuchi, and R.Nakano, “Efficient leave-m-out cross-validation of support vector regression by generalizing decremental algorithm,” New Generation Computing, vol. 27, no. 4, Special Issue on Data-Mining and Statistical Science, pp. 307–318, 2009. 9
2009
230
3,738
Bayesian Source Localization with the Multivariate Laplace Prior Marcel van Gerven1,2 Botond Cseke1 Robert Oostenveld2 Tom Heskes1,2 1Institute for Computing and Information Sciences 2Donders Institute for Brain, Cognition and Behaviour Radboud University Nijmegen Nijmegen, The Netherlands Abstract We introduce a novel multivariate Laplace (MVL) distribution as a sparsity promoting prior for Bayesian source localization that allows the specification of constraints between and within sources. We represent the MVL distribution as a scale mixture that induces a coupling between source variances instead of their means. Approximation of the posterior marginals using expectation propagation is shown to be very efficient due to properties of the scale mixture representation. The computational bottleneck amounts to computing the diagonal elements of a sparse matrix inverse. Our approach is illustrated using a mismatch negativity paradigm for which MEG data and a structural MRI have been acquired. We show that spatial coupling leads to sources which are active over larger cortical areas as compared with an uncoupled prior. 1 Introduction Electroencephalography (EEG) and magnetoencephalography (MEG) provide an instantaneous and non-invasive measure of brain activity. Let q, p, and t denote the number of sensors, sources and time points, respectively. Sensor readings Y ∈Rq×t and source currents S ∈Rp×t are related by Y = XS + E (1) where X ∈Rq×p is a lead field matrix that represents how sources project onto the sensors and E ∈Rq×t represents sensor noise. Unfortunately, localizing distributed sources is an ill-posed inverse problem that only admits a unique solution when additional constraints are defined. In a Bayesian setting, these constraints take the form of a prior on the sources [3, 19]. Popular choices of prior source amplitude distributions are Gaussian or Laplace priors, whose MAP estimates correspond to minimum norm and minimum current estimates, respectively [18]. Minimum norm estimates produce spatially smooth solutions but are known to suffer from depth bias and smearing of nearby sources. In contrast, minimum current estimates lead to focal source estimates that may be scattered too much throughout the brain volume [9]. In this paper, we take the Laplace prior as our point of departure for Bayesian source localization (instead of using just the MAP estimate). The obvious approach is to assume univariate Laplace priors on individual sources. Here, in contrast, we assume a multivariate Laplace distribution over all sources, which allows sources to be coupled. We show that such a distribution can be represented as a scale mixture [2] that differs substantially from the one presented in [5]. Our representation allows the specification of both spatio-temporal as well as sparsity constraints. Since the posterior cannot be computed exactly, we formulate an efficient expectation propagation 1 algorithm [12] which allows us to approximate the posterior of interest for very large models. Efficiency arises from the block diagonal form of the approximate posterior covariance matrix due to properties of the scale mixture representation. The computational bottleneck then reduces to computation of the diagonal elements of a sparse matrix inverse, which can be solved through Cholesky decomposition of a sparse matrix and application of the Takahashi equation [17]. Furthermore, moment matching is achieved by one-dimensional numerical integrations. Our approach is evaluated on MEG data that was recorded during an oddball task. 2 Bayesian source localization In a Bayesian setting, the goal of source localization is to estimate the posterior p(S | Y, X, Σ, Θ) ∝p(Y | S, X, Σ)p(S | Θ) (2) where the likelihood term p(Y | S) = Q t N(yt | Xst, Σ) factorizes over time and Σ represents sensor noise. The prior p(S | Θ), with Θ acting as a proxy for the hyper-parameters, can be used to incorporate (neuroscientific) constraints. For simplicity, we assume independent Gaussian noise with a fixed variance σ2, i.e., Σ = σ2I. Without loss of generality, we will focus on one time-point (yt, st) only and drop the subscript when clear from context.1 The source localization problem can be formulated as a (Bayesian) linear regression problem where the source currents s play the role of the regression coefficients and rows of the lead field matrix X can be interpreted as covariates. In the following, we define a multivariate Laplace distribution, represented in terms of a scale mixture, as a convenient prior that incorporates both spatio-temporal and sparsity constraints. The univariate Laplace distribution L (s | λ) ≡λ 2 exp (−λ|s|) (3) can be represented as a scale mixture of Gaussians [2], the scaling function being an exponential distribution with parameter λ2/2. The scale parameter λ controls the width of the distribution and thus the regularizing behavior towards zero. Since the univariate exponential distribution is a χ2 2 distribution, one can alternatively write L (s | λ) = Z dudv N s | 0, u2 + v2 N u | 0, 1/λ2 N v | 0, 1/λ2 . (4) Eltoft et al [5] defined the multivariate Laplace distribution as a scale mixture of a multivariate Gaussian given by √zΣ1/2s where s is a standard normal multivariate Gaussian, Σ is a positive definite matrix, and z is drawn from a univariate exponential distribution. The work presented in [11] is based on similar ideas but replaces the distribution on z with a multivariate log-normal distribution. In contrast, we use an alternative formulation of the multivariate Laplace distribution that couples the variances of the sources rather than the source currents themselves. This is achieved by generalizing the representation in Eq. (4) to the multivariate case. For an uncoupled multivariate Laplace distribution, this generalization reads L (s | λ) = Z dudv Y i N si | 0, u2 i + v2 i  N vi | 0, 1/λ2 N ui | 0, 1/λ2 (5) such that each source current si gets assigned scale variables ui and vi. We can interpret the scale variables corresponding to source i as indicators of its relevance: the larger (the posterior estimate of) u2 i + v2 i , the more relevant the corresponding source. In order to introduce correlations between sources, we define our multivariate Laplace (MVL) distribution as the following scale mixture: L (s | λ, J) ≡ Z dudv Y i N si | 0, u2 i + v2 i  ! N v | 0, J−1/λ2 N u | 0, J−1/λ2 , (6) 1Multiple time-points can be incorporated by vectorizing Y and S, and augmenting X. 2 f s1 s2 ··· sp g1 g2 ··· gp u1 v1 u2 v2 ··· up vp h1 h2 Figure 1: Factor graph representation of Bayesian source localization with a multivariate Laplace prior. The factor f represents the likelihood term N y | Xs, σ2I  . Factors gi correspond to the coupling between sources and scales. Factors h1 and h2 represent the (identical) multivariate Gaussians on u and v with prior precision matrix J. The gi are the only non-Gaussian terms and need to be approximated. where J−1 is a normalized covariance matrix. This definition yields a coupling in the magnitudes of the source currents through their variances. The normalized covariance matrix J−1 specifies the correlation strengths, while λ acts as a regularization parameter. Note that this approach is defining the multivariate Laplace with the help of a multivariate exponential distribution [10]. As will be shown in the next section, apart from having a semantics that differs from [5], our scale mixture representation has some desirable characteristics that allow for efficient approximate inference. Based on the above formulation, we define the sparse linear model as p(y, s | X, σ2, λ, J) = N y | Xs, σ2I  L (s | λ, J) . (7) The factor graph in Fig. 1 depicts the interactions between the variables in our model. 3 Approximate inference Our goal is to compute posterior marginals for sources si as well as scale variables ui and vi in order to determine source relevance. These marginals are intractable and we need to resort to approximate inference methods. In this paper we use a deterministic approximate inference method called expectation propagation (EP) [12]. For a detailed analysis of the use of EP in case of the decoupled prior, which is a special case of our MVL prior, we refer to [16]. EP works by iterative minimizations of the Kullback–Leibler (KL) divergence between appropriately chosen distributions in the following way. We introduce the vector of all latent variables z = (sT , uT , vT )T . The posterior distribution on z given the data y (which is considered fixed and given and therefore omitted in our notation) can be written in the factorized form p(z) ∝t0(z) Y i ti(z) , (8) where t0(z) ∝N y | Xs, σ2I  N v | 0, J−1/λ2 N u | 0, J−1/λ2 and ti(z) = ti(si, ui, vi) = N si | 0, u2 i + v2 i  . The term t0(z) is a Gaussian function, i.e., it can be written in the form exp(zT h0 −zT K0z/2). It factorizes into Gaussian functions of s, u, and v such that K0 has a block-diagonal structure. Using EP, we will approximate p(z) with q (z) ∝t0(z) Q i ¯ti (z), where the ¯ti(z) are Gaussian functions as well. Our definition of the MVL distribution leads to several computational benefits. Equation (6) introduces 2p auxiliary Gaussian variables (u, v) that are coupled to the si’s by p non-Gaussian factors, thus, we have to approximate p terms. The multivariate Laplace distribution defined in [5] introduces one auxiliary variable and couples all the sisj terms to it, therefore, it would lead to p2 non-Gaussian terms to be approximated. Moreover, as we will see below, the a priori independence of u and v and 3 the form of the terms ti(z) results in an approximation of the posterior with the same block-diagonal structure as that of t0(z). In each step, EP updates ¯ti with ¯t∗ i by defining q\i ∝t0(z) Q \i ¯tj, minimizing KL tiq\i ∥q∗ with respect to q∗and setting ¯t∗ i ∝q∗/q\i. It can be shown that when ti depends only on a subset of variables zi (in our case on zi = (si, ui, vi)) then so does ¯ti. The minimization of the KL divergence then boils down to the minimization of KL ti(zi)q\i(zi) ∥q∗(zi)  with respect to q∗(zi) and ¯ti is updated to ¯t∗ i (zi) ∝q∗(zi)/q\i(zi). Minimization of the KL divergence corresponds to moment matching, i.e., q∗(si, ui, vi) is a Gaussian with the same mean and covariance matrix as qi(zi) ∝ti(zi)q\i(zi). So, to update the i-th term in a standard application of EP, we would have to compute q\i(zi) and could then use a three-dimensional (numerical) integration to compute all first and second moments of qi(zi). Below we will explain how we can exploit the specific characteristics of the MVL to do this more efficiently. For stability, we use a variant of EP, called power EP [13], where q\i ∝¯t(1−α) i Q \i ¯tj and KL tα i q\i ∥q∗ with α ∈(0, 1] is minimized. The above explanation of standard EP corresponds to α = 1. In the following we will give the formulas for general α. We will now work out the EP update for the i-th term approximation in more detail to show by induction that ¯ti(si, ui, vi) factorizes into independent terms for si, ui, and vi. Since ui and vi play exactly the same role, it is also easy to see that the term approximation is always symmetric in ui and vi. Let us suppose that q (si, ui, vi) and consequently q\i (si, ui, vi) factorizes into independent terms for si, ui, and vi, e.g., we can write q\i (si, ui, vi) = N(si | mi, σ2 i )N(ui | 0, ν2 i )N(vi | 0, ν2 i ). (9) By initializing ¯ti(si, ui, vi) = 1, we have q(z) ∝t0(z) and the factorization of q\i (si, ui, vi) follows directly from the factorization of t0(z) into independent terms for s, u, and v. That is, for the first EP step, the factorization can be guaranteed. To obtain the new term approximation, we have to compute the moments of the distribution qi(si, ui, vi) ∝N(si | 0, u2 i + v2 i )αq\i(si, ui, vi), which, by regrouping terms, can be written in the form qi(si, ui, vi) = qi(si | ui, vi)qi(ui, vi) with qi(si | ui, vi) ∝ N  si | mi(u2 i + v2 i ) ασ2 i + u2 i + v2 i , σ2 i (u2 i + v2 i ) ασ2 i + u2 i + v2 i  (10) qi(ui, vi) ∝ u2 i + v2 i (1−α)/2 N √αmi | 0, ασ2 i + u2 i + v2 i  ×N(ui | 0, ν2 i )N(vi | 0, ν2 i ) . (11) Since qi(ui, vi) only depends on u2 i and v2 i and is thus invariant under sign changes of ui and vi, we must have E [ui] = E [vi] = 0, as well as E [uivi] = 0. Because of symmetry, we further have E  u2 i  = E  v2 i  = (E  u2 i  +E  v2 i  )/2. Since qi(ui, vi) can be expressed as a function of u2 i +v2 i only, this variance can be computed from (11) using one-dimensional Gauss-Laguerre numerical quadrature [15]. The first and second moments of si conditioned upon ui and vi follow directly from (10). Because both (10) and (11) are invariant under sign changes of ui and vi, we must have E [siui] = E [sivi] = 0. Furthermore, since the conditional moments again depend only on u2 i +v2 i , also E [si] and E  s2 i  can be computed with one-dimensional Gauss-Laguerre integration. Summarizing, we have shown that if the old term approximations factorize into independent terms for si, ui, and vi, the new term approximation after an EP update, ¯t∗ i (si, ui, vi) ∝q∗(si, ui, vi)/q\i(si, ui, vi), must do the same. Furthermore, given the cavity distribution q\i(si, ui, vi), all required moments can be computed using one-dimensional numerical integration. The crucial observation here is that the terms ti(si, ui, vi) introduce dependencies between si and (ui, vi), as expressed in Eqs. (10) and (11), but do not lead to correlations that we have to keep track of in a Gaussian approximation. This is not specific to EP, but a consequence of the symmetries and invariances of the exact distribution p(s, u, v). That is, also when the expectations are taken with respect to the exact p(s, u, v) we have E [ui] = E [vi] = E [uivi] = E [siui] = E [sivi] = 0 and E  u2 i  = E  v2 i  . The variance of the scales E  u2 i + v2 i  determines the amount of regularization on the source parameter si such that large variance implies little regularization. Last but not least, contrary to conventional sequential updating, we choose to update the terms ¯ti in parallel. That is, we compute all q\is and update all terms simultaneously. Calculating q\i(si, ui, vi) 4 requires the computation of the marginal moments q(si), q(ui) and q(vi). For this, we need the diagonal elements of the inverse of the precision matrix K of q(z). This precision matrix has the block-diagonal form K =   XT X/σ2 + Ks 0 0 0 λ2J + Ku 0 0 0 λ2J + Kv   (12) where J is a sparse precision matrix which determines the coupling, and Ks, Ku, and Kv = Ku are diagonal matrices that contain the contributions of the term approximations. We can exploit the low-rank representation of XT X/σ2 + Ks to compute its inverse using the Woodbury formula [7]. The diagonal elements of the inverse of λ2J + Ku can be computed efficiently via sparse Cholesky decomposition and the Takahashi equation [17]. By updating the term approximations in parallel, we only need to perform these operations once per parallel update. 4 Experiments Returning to the source localization problem, we will show that the MVL prior can be used to induce constraints on the source estimates. To this end, we use a dataset obtained for a mismatch negativity experiment (MMN) [6]. The MMN is the negative component of the difference between responses to normal and deviant stimuli within an oddball paradigm that peaks around 150 ms after stimulus onset. In our experiment, the subject had to listen to normal (500 Hz) and deviant (550 Hz) tones, presented for 70 ms. Normal tones occurred 80% of the time, whereas deviants occurred 20% of the time. A total of 600 trials was acquired. Data was acquired with a CTF MEG System (VSM MedTech Ltd., Coquitlam, British Columbia, Canada), which provides whole-head coverage using 275 DC SQUID axial gradiometers. A realistically shaped volume conduction model was constructed based on the individual’s structural MRI [14]. The brain volume was discretized to a grid with a 0.75 cm resolution and the lead field matrix was calculated for each of the 3863 grid points according to the head position in the system and the forward model. The lead field matrix is defined for the three x, y, and z orientations in each of the source locations and was normalized to correct for depth bias. Consequently, the lead field matrix X is of size 275 × 11589. The 275 × 1 observation vector y was rescaled to prevent issues with numerical precision. In the next section, we compare source estimates for the MMN difference wave that have been obtained when using either a decoupled or a coupled MVL prior. For ease of exposition, we focus on a spatial prior induced by the coupling of neighboring sources. In order to demonstrate the effect of the spatial prior, we assume a fixed regularization parameter λ and fixed noise variance σ2, as estimated by means of the L curve criterion [8]. Differences in the source estimates will therefore arise only from the form of the 11589 × 11589 sparse precision matrix J. The first estimate is obtained by assuming that there is no coupling between elements of the lead field matrix, such that J = I. This gives a Bayesian formulation of the minimum current estimate [18]. The second estimate is obtained by assuming a coupling between neighboring sources i and j within the brain volume with fixed strength c. This coupling is specified through the unnormalized precision matrix ˆJ by assuming ˆJix,jx = ˆJiy,jy = ˆJiz,jz = −c while diagonal elements ˆJii are set to 1 −P j̸=i ˆJij.2 This prior dictates that the magnitude of the variances of the source currents are coupled between sources. For the coupling strength c, we use correlation as a guiding principle. Recall that the unnormalized precision matrix ˆJ in the end determines the correlations (of the variances) between sources. Specifically, correlation between sources si and sj is given by rij =  ˆJ−1 ij/  ˆJ−1 1 2 ii  ˆJ−1 1 2 jj . (13) For example, using c = 10, we would obtain a correlation coefficient of ri,i+1 = 0.78. Note that this also leads to more distant sources having non-zero correlations. The positive correlation between 2The normalized precision matrix is obtained through J = diag(ˆJ−1) 1 2 ˆJ diag(ˆJ−1) 1 2 . 5 J L C Figure 2: Spatial coupling leads to the normalized precision matrix J with coupling of neighboring source orientations in the x, y, and z directions. The (reordered) matrix L is obtained from the Cholesky decomposition of J. The correlation matrix C shows the correlations between the source orientations. For the purpose of demonstration, we show matrices using a very coarse discretization of the brain volume. neighboring sources is motivated by the notion that we expect neighboring sources to be similarly though not equivalently involved for a given task. Evidently, the desired correlation coefficient also depends on the resolution of the discretized brain volume. Figure 2 demonstrates how a chosen coupling leads to a particular structure of J, where irregularities in J are caused by the structure of the imaged brain volume. The figure also shows the computational bottleneck of our algorithm, which is to compute diagonal elements of J−1. This can be solved by means of the Takahashi equation which operates on the matrix L that results from a sparse Cholesky decomposition. The block diagonal structure of L arises from a reordering of rows and columns using, for instance, the amd algorithm [1]. The correlation matrix C shows the correlations between the sources induced by the structure of J. Zeros in the correlation matrix arise from the independence between source orientations x, y, and z. 5 Results Figure 3 depicts the difference wave that was obtained by subtracting the trial average for standard tones from the trial average for deviant tones. A negative deflection after 100 ms is clearly visible. The event-related field indicates patterns of activity at central channels in both hemispheres. These 0 0.05 0.1 0.15 0.2 0.25 0.3 −10 −8 −6 −4 −2 0 2 4 x 10 −14 time (s) standard deviant difference Figure 3: Evolution of the difference wave at right central sensors and event-related field of the difference wave 125 ms after cue onset. 6 Figure 4: Source estimates using a decoupled prior (top) or a coupled prior (bottom). Plots are centered on the left temporal source. Figure 5: Relative variance using a decoupled prior (top) or a coupled prior (bottom). Plots are centered on the right temporal source. findings are consistent with the mismatch negativity literature [6]. We now proceed to localizing the sources of the activation induced by mismatch negativity. Figure 4 depicts the localized sources when using either a decoupled MVL prior or a coupled MVL prior. The coupled spatial prior leads to stronger source currents that are spread over a larger brain volume. MVL source localization has correctly identified the source over left temporal cortex but does not capture the source over right temporal cortex that is also hypothesized to be present (cf. Fig. 3). Note however that the source estimates in Fig. 4 represent estimated mean power and thus do not capture the full posterior over the sources. Differences between the decoupled and the coupled prior become more salient when we look at the relative variance of the auxiliary variables as shown in Fig. 5. Relative variance is defined here as posterior variance minus prior variance of the auxiliary variables, normalized to be between zero and one. This measure indicates the change in magnitude of the variance of the auxiliary variables, and thus indirectly that of the sources via Eq. (6). Since only sources with non-zero contributions should have high variance, this measure can be used to indicate the relevance of a source. Figure 5 7 shows that temporal sources in both left and right hemispheres are relevant. The relevance of the temporal source in the right hemisphere becomes more pronounced when using the coupled prior. 6 Discussion In this paper, we introduced a multivariate Laplace prior as the basis for Bayesian source localization. By formulating this prior as a scale mixture we were able to approximate posteriors of interest using expectation propagation in an efficient manner. Computation time is mainly influenced by the sparsity structure of the precision matrix J which is used to specify interactions between sources by coupling their variances. We have demonstrated the feasibility of our approach using a mismatch negativity dataset. It was shown that coupling of neighboring sources leads to source estimates that are somewhat more spatially smeared as compared with a decoupled prior. Furthermore, visualization of the relative variance of the auxiliary variables gave additional insight into the relevance of sources. Contrary to the MAP estimate (i.e., the minimum current estimate), our Bayesian estimate does not exactly lead to sparse posteriors given a finite amount of data. However, posterior marginals can still be used to exclude irrelevant sources since these will typically have a mean activation close to zero with small variance. In principle, we could force our posteriors to become more MAP-like by replacing the likelihood term with N y | Xs, σ2I 1/T in the limit T →0. From the Bayesian point of view, one may argue whether taking this limit is fair. In any case, given the inherent uncertainty in our estimates we favor the representation in terms of (non-sparse) posterior marginals. Note that it is straightforward to impose other constraints since this only requires the specification of suitable interactions between sources through J. For instance, the spatial prior could be made more realistic by taking anatomical constraints into account or by the inclusion of coupling between sources over time. Other constraints that can be implemented with our approach are the coupling of individual orientations within a source, or even the coupling of source estimates between different subjects. Coupling of source orientations has been realized before in [9] through an ℓ1/ℓ2 norm, although not using a fully Bayesian approach. In future work, we aim to examine the effect of the proposed priors and optimize the regularization and coupling parameters via empirical Bayes [4]. Other directions for further research are inclusion of the noise variance in the optimization procedure and dealing with the depth bias that often arises in distributed source models in a more principled way. In [11], fields of Gaussian scale mixtures were used for modeling the statistics of wavelet coefficients of photographics images. Our approach differs in two important aspects. To obtain a generalization of the univariate Laplace distribution, we used a multivariate exponential distribution of the scales, to be compared with the multivariate log-normal distribution in [11]. The Laplace distribution has the advantage that it is the most sparsifying prior that, in combination with a linear model, still leads to a unimodal posterior [16]. Furthermore, we described an efficient method for approximating marginals of interest whereas in [11] an iterative coordinate-ascent method was used to compute the MAP solution. Since (the efficiency of) our method for approximate inference only depends on the sparsity of the multivariate scale distribution, and not on its precise form, it should be feasible to compute approximate marginals for the model presented in [11] as well. Concluding, we believe the scale mixture representation of the multivariate Laplace distribution to be a promising approach to Bayesian distributed source localization. It allows a wide range of constraints to be included and, due to the characteristics of the scale mixture, posteriors can be approximated efficiently even for very large models. Acknowledgments The authors gratefully acknowledge the support of the Dutch technology foundation STW (project number 07050) and the BrainGain Smart Mix Programme of the Netherlands Ministry of Economic Affairs and the Netherlands Ministry of Education, Culture and Science. Tom Heskes is supported by Vici grant 639.023.604. 8 References [1] P. R. Amestoy, T. A. Davis, and I. S. Duff. Algorithm 837: Amd, an approximate minimum degree ordering algorithm. ACM Transactions on Mathematical Software, 30(3):381–388, 2004. [2] D. F. Andrews and C. L. Mallows. Scale mixtures of normal distributions. Journal of the Royal Statistical Society, Series B, 36(1):99–102, 1974. [3] S. Baillet and L. Garnero. A Bayesian approach to introducing anatomo-functional priors in the EEG/MEG inverse problem. IEEE Transactions on Biomedical Engineering, 44(5):374–385, 1997. [4] J. M. Bernardo and J. F. M. Smith. Bayesian Theory. Wiley, 1994. [5] T. Eltoft, T. Kim, and T. Lee. On the multivariate Laplace distribution. IEEE Signal Processing Letters, 13(5):300–303, 2006. [6] M. I. Garrido, J. M. Kilner, K. E. Stephan, and K. J. Friston. The mismatch negativity: A review of underlying mechanisms. Clinical Neurophysiology, 120:453–463, 2009. [7] G. Golub and C. van Loan. Matrix Computations. John Hopkins University Press, Baltimore, MD, 3rd edition, 1996. [8] P. C. Hansen. Rank-Deficient and Discrete Ill-Posed Problems: Numerical Aspects of Linear Inversion. Monographs on Mathematical Modeling and Computation. Society for Industrial Mathematics, 1987. [9] S. Haufe, V. V. Nikulin, A. Ziehe, K.-R. M¨uller, and G. Nolte. Combining sparsity and rotational invariance in EEG/MEG source reconstruction. NeuroImage, 42(2):726–738, 2008. [10] N. T. Longford. Classes of multivariate exponential and multivariate geometric distributions derived from Markov processes. In H. W. Block, A. R. Sampson, and T. H. Savits, editors, Topics in statistical dependence, volume 16 of IMS Lecture Notes Monograph Series, pages 359–369. IMS Business Office, Hayward, CA, 1990. [11] S. Lyu and E. P. Simoncelli. Statistical modeling of images with fields of Gaussian scale mixtures. In B. Sch¨olkopf, J. Platt, and T. Hoffman, editors, Advances in Neural Information Processing Systems 19, pages 945–952. MIT Press, Cambridge, MA, 2007. [12] T. Minka. Expectation propagation for approximate Bayesian inference. In J. Breese and D. Koller, editors, Proceedings of the Seventeenth Conference on Uncertainty in Artificial Intelligence, pages 362–369. Morgan Kaufmann, 2001. [13] T. Minka. Power EP. Technical report, Microsoft Research, Cambridge, 2004. [14] G. Nolte. The magnetic lead field theorem in the quasi-static approximation and its use for magnetoencephalography forward calculation in realistic volume conductors. Physics in Medicine & Biology, 48(22):3637–3652, 2003. [15] W. H. Press, S. A. Teukolsky, W. T. Vetterling, and B. P. Flannery. Numerical Recipes in C. Cambridge University Press, 3rd edition, 2007. [16] M. W. Seeger. Bayesian inference and optimal design for the sparse linear model. Journal of Machine Learning Research, 9:759–813, 2008. [17] K. Takahashi, J. Fagan, and M. S. Chen. Formation of a sparse bus-impedance matrix and its application to short circuit study. In 8th IEEE PICA Conference, pages 63–69, Minneapolis, MN, 1973. [18] K. Uutela, M. H¨am¨al¨ainen, and E. Somersalo. Visualization of magnetoencephalographic data using minimum current estimates. NeuroImage, 10:173–180, 1999. [19] D. Wipf and S. Nagarajan. A unified Bayesian framework for MEG/EEG source imaging. NeuroImage, 44(3):947–966, 2009. 9
2009
231
3,739
Learning Non-Linear Combinations of Kernels Corinna Cortes Google Research 76 Ninth Ave New York, NY 10011 corinna@google.com Mehryar Mohri Courant Institute and Google 251 Mercer Street New York, NY 10012 mohri@cims.nyu.edu Afshin Rostamizadeh Courant Institute and Google 251 Mercer Street New York, NY 10012 rostami@cs.nyu.edu Abstract This paper studies the general problem of learning kernels based on a polynomial combination of base kernels. We analyze this problem in the case of regression and the kernel ridge regression algorithm. We examine the corresponding learning kernel optimization problem, show how that minimax problem can be reduced to a simpler minimization problem, and prove that the global solution of this problem always lies on the boundary. We give a projection-based gradient descent algorithm for solving the optimization problem, shown empirically to converge in few iterations. Finally, we report the results of extensive experiments with this algorithm using several publicly available datasets demonstrating the effectiveness of our technique. 1 Introduction Learning algorithms based on kernels have been used with much success in a variety of tasks [17,19]. Classification algorithms such as support vector machines (SVMs) [6, 10], regression algorithms, e.g., kernel ridge regression and support vector regression (SVR) [16,22], and general dimensionality reduction algorithms such as kernel PCA (KPCA) [18] all benefit from kernel methods. Positive definite symmetric (PDS) kernel functions implicitly specify an inner product in a high-dimension Hilbert space where large-margin solutions are sought. So long as the kernel function used is PDS, convergence of the training algorithm is guaranteed. However, in the typical use of these kernel method algorithms, the choice of the PDS kernel, which is crucial to improved performance, is left to the user. A less demanding alternative is to require the user to instead specify a family of kernels and to use the training data to select the most suitable kernel out of that family. This is commonly referred to as the problem of learning kernels. There is a large recent body of literature addressing various aspects of this problem, including deriving efficient solutions to the optimization problems it generates and providing a better theoretical analysis of the problem both in classification and regression [1,8,9,11,13,15,21]. With the exception of a few publications considering infinite-dimensional kernel families such as hyperkernels [14] or general convex classes of kernels [2], the great majority of analyses and algorithmic results focus on learning finite linear combinations of base kernels as originally considered by [12]. However, despite the substantial progress made in the theoretical understanding and the design of efficient algorithms for the problem of learning such linear combinations of kernels, no method seems to reliably give improvements over baseline methods. For example, the learned linear combination does not consistently outperform either the uniform combination of base kernels or simply the best single base kernel (see, for example, UCI dataset experiments in [9, 12], see also NIPS 2008 workshop). This suggests exploring other non-linear families of kernels to obtain consistent and significant performance improvements. Non-linear combinations of kernels have been recently considered by [23]. However, here too, experimental results have not demonstrated a consistent performance improvement for the general 1 learning task. Another method, hierarchical multiple learning [3], considers learning a linear combination of an exponential number of linear kernels, which can be efficiently represented as a product of sums. Thus, this method can also be classified as learning a non-linear combination of kernels. However, in [3] the base kernels are restricted to concatenation kernels, where the base kernels apply to disjoint subspaces. For this approach the authors provide an effective and efficient algorithm and some performance improvement is actually observed for regression problems in very high dimensions. This paper studies the general problem of learning kernels based on a polynomial combination of base kernels. We analyze that problem in the case of regression using the kernel ridge regression (KRR) algorithm. We show how to simplify its optimization problem from a minimax problem to a simpler minimization problem and prove that the global solution of the optimization problem always lies on the boundary. We give a projection-based gradient descent algorithm for solving this minimization problem that is shown empirically to converge in few iterations. Furthermore, we give a necessary and sufficient condition for this algorithm to reach a global optimum. Finally, we report the results of extensive experiments with this algorithm using several publicly available datasets demonstrating the effectiveness of our technique. The paper is structured as follows. In Section 2, we introduce the non-linear family of kernels considered. Section 3 discusses the learning problem, formulates the optimization problem, and presents our solution. In Section 4, we study the performance of our algorithm for learning nonlinear combinations of kernels in regression (NKRR) on several publicly available datasets. 2 Kernel Family This section introduces and discusses the family of kernels we consider for our learning kernel problem. Let K1, . . . , Kp be a finite set of kernels that we combine to define more complex kernels. We refer to these kernels as base kernels. In much of the previous work on learning kernels, the family of kernels considered is that of linear or convex combinations of some base kernels. Here, we consider polynomial combinations of higher degree d≥1 of the base kernels with non-negative coefficients of the form: Kµ = X 0≤k1+···+kp≤d, ki≥0, i∈[0,p] µk1···kpKk1 1 · · · Kkp p , µk1···kp ≥0. (1) Any kernel function Kµ of this form is PDS since products and sums of PDS kernels are PDS [4]. Note that Kµ is in fact a linear combination of the PDS kernels Kk1 1 · · ·Kkp p . However, the number of coefficients µk1···kp is in O(pd), which may be too large for a reliable estimation from a sample of size m. Instead, we can assume that for some subset I of all p-tuples (k1, . . . , kp), µk1···kp can be written as a product of non-negative coefficients µ1, . . . , µp: µk1···kp = µk1 1 · · · µkp p . Then, the general form of the polynomial combinations we consider becomes K = X (k1,...,kp)∈I µk1 1 · · · µkp p Kk1 1 · · · Kkp p + X (k1,...,kp)∈J µk1···kpKk1 1 · · · Kkp p , (2) where J denotes the complement of the subset I. The total number of free parameters is then reduced to p+|J|. The choice of the set I and its size depends on the sample size m and possible prior knowledge about relevant kernel combinations. The second sum of equation (2) defining our general family of kernels represents a linear combination of PDS kernels. In the following, we focus on kernels that have the form of the first sum and that are thus non-linear in the parameters µ1, . . . , µp. More specifically, we consider kernels Kµ defined by Kµ = X k1+···+kp=d µk1 1 · · · µkp p Kk1 1 · · · Kkp p , (3) where µ=(µ1, . . . , µp)⊤∈Rp. For the ease of presentation, our analysis is given for the case d=2, where the quadratic kernel can be given the following simpler expression: Kµ = p X k,l=1 µkµl KkKl . (4) But, the extension to higher-degree polynomials is straightforward and our experiments include results for degrees d up to 4. 2 3 Algorithm for Learning Non-Linear Kernel Combinations 3.1 Optimization Problem We consider a standard regression problem where the learner receives a training sample of size m, S = ((x1, y1), . . . , (xm, ym)) ∈(X ×Y )m, where X is the input space and Y ∈R the label space. The family of hypotheses Hµ out of which the learner selects a hypothesis is the reproducing kernel Hilbert space (RKHS) associated to a PDS kernel function Kµ : X ×X →R as defined in the previous section. Unlike standard kernel-based regression algorithms however, here, both the parameter vector µ defining the kernel Kµ and the hypothesis are learned using the training sample S. The learning kernel algorithm we consider is derived from kernel ridge regression (KRR). Let y = [y1, . . . , ym]⊤∈Rm denote the vector of training labels and let Kµ denote the Gram matrix of the kernel Kµ for the sample S: [Kµ]i,j = Kµ(xi, xj), for all i, j ∈[1, m]. The standard KRR dual optimization algorithm for a fixed kernel matrix Kµ is given in terms of the Lagrange multipliers α ∈Rm by [16]: max α∈Rm −α⊤(Kµ + λI)α + 2α⊤y (5) The related problem of learning the kernel Kµ concomitantly can be formulated as the following min-max optimization problem [9]: min µ∈M max α∈Rm −α⊤(Kµ + λI)α + 2α⊤y, (6) where M is a positive, bounded, and convex set. The positivity of µ ensures that Kµ is positive semi-definite (PSD) and its boundedness forms a regularization controlling the norm of µ.1 Two natural choices for the set M are the norm-1 and norm-2 bounded sets, M1 = {µ | µ ⪰0 ∧∥µ −µ0∥1 ≤Λ} (7) M2 = {µ | µ ⪰0 ∧∥µ −µ0∥2 ≤Λ}. (8) These definitions include an offset parameter µ0 for the weights µ. Some natural choices for µ0 are: µ0 = 0, or µ0/∥µ0∥= 1. Note that here, since the objective function is not linear in µ, the norm-1-type regularization may not lead to a sparse solution. 3.2 Algorithm Formulation For learning linear combinations of kernels, a typical technique consists of applying the minimax theorem to permute the min and max operators, which can lead to optimization problems computationally more efficient to solve [8, 12]. However, in the non-linear case we are studying, this technique is unfortunately not applicable. Instead, our method for learning non-linear kernels and solving the min-max problem in equation (6) consists of first directly solving the inner maximization problem. In the case of KRR for any fixed µ the optimum is given by α = (Kµ + λI)−1y. (9) Plugging the optimal expression of α in the min-max optimization yields the following equivalent minimization in terms of µ only: min µ∈M F(µ) = y⊤(Kµ + λI)−1y. (10) We refer to this optimization as the NKRR problem. Although the original min-max problem has been reduced to a simpler minimization problem, the function F is not convex in general as illustrated by Figure 1. For small values of µ, concave regions are observed. Thus, standard interiorpoint or gradient methods are not guaranteed to be successful at finding a global optimum. In the following, we give an analysis which shows that under certain conditions it is however possible to guarantee the convergence of a gradient-descent type algorithm to a global minimum. Algorithm 1 illustrates a general gradient descent algorithm for the norm-2 bounded setting which projects µ back to the feasible set M2 after each gradient step (projecting to M1 is very similar). 1To clarify the difference between similar acronyms, a PDS function corresponds to a PSD matrix [4]. 3 0 0.5 1 0 0.5 1 195 200 205 210 µ2 µ1 F(µ1,µ2) 0 0.5 1 0 0.5 1 20 20.5 21 µ2 µ1 F(µ1,µ2) 0 0.5 1 0 0.5 1 2.06 2.07 2.08 2.09 µ2 µ1 F(µ1,µ2) Figure 1: Example plots for F defined over two linear base kernels generated from the first two features of the sonar dataset. From left to right λ = 1, 10, 100. For larger values of λ it is clear that there are in fact concave regions of the function near 0. Algorithm 1 Projection-based Gradient Descent Algorithm Input: µinit ∈M2, η ∈[0, 1], ǫ > 0, Kk, k ∈[1, p] µ′ ←µinit repeat µ ←µ′ µ′ ←−η∇F(µ) + µ ∀k, µ′ k ←max(0, µ′ k) normalize µ′, s.t. ∥µ′ −µ0∥= Λ until ∥µ′ −µ∥< ǫ In Algorithm 1 we have fixed the step size η, however this can be adjusted at each iteration via a line-search. Furthermore, as shown later, the thresholding step that forces µ′ to be positive is unnecessary since ∇F is never positive. Note that Algorithm 1 is simpler than the wrapper method proposed by [20]. Because of the closed form expression (10), we do not alternate between solving for the dual variables and performing a gradient step in the kernel parameters. We only need to optimize with respect to the kernel parameters. 3.3 Algorithm Properties We first explicitly calculate the gradient of the objective function for the optimization problem (10). In what follows, ◦denotes the Hadamard (pointwise) product between matrices. Proposition 1. For any k ∈[1, p], the partial derivative of F : µ →y⊤(Kµ +λI)−1y with respect to µi is given by ∂F ∂µk = −2α⊤Ukα, (11) where Uk = Pp r=1(µrKr) ◦Kk  . Proof. In view of the identity ∇M Tr(y⊤M−1y)=−M−1⊤yy⊤M−1⊤, we can write: ∂F ∂µk = Tr ∂y⊤(Kµ + λI)−1y ∂(Kµ + λI) ∂(Kµ + λI) ∂µk  = −Tr  (Kµ + λI)−1yy⊤(Kµ + λI)−1 ∂(Kµ + λI) ∂µk  = −Tr " (Kµ + λI)−1yy⊤(Kµ + λI)−1 2 p X r=1 (µrKr) ◦Kk # = −2y⊤(Kµ + λI)−1 p X r=1 (µrKr) ◦Kk  (Kµ + λI)−1y = −2α⊤Ukα. 4 Matrix Uk just defined in proposition 1 is always PSD, thus ∂F ∂µk ≤0 for all i ∈[1, p] and ∇F ≤0. As already mentioned, this fact obliterates the thresholding step in Algorithm 1. We now provide guarantees for convergence to a global optimum. We shall assume that λ is strictly positive: λ>0. Proposition 2. Any stationary point µ⋆of the function F : µ →y⊤(Kµ + λI)−1y necessarily maximizes F: F(µ⋆) = max µ F(µ) = ∥y∥2 λ . (12) Proof. In view of the expression of the gradient given by Proposition 1, at any point µ⋆, µ⋆⊤∇F(µ⋆) = α⊤ p X i=1 µ⋆ kUkα = α⊤Kµ⋆α. (13) By definition, if µ⋆is a stationary point, ∇F(µ⋆) = 0, which implies µ⋆⊤∇F(µ⋆) = 0. Thus, α⊤Kµ⋆α=0, which implies Kµ⋆α=0, that is Kµ⋆(Kµ⋆+ λI)−1y = 0 ⇔(Kµ⋆+ λI −λI)(Kµ⋆+ λI)−1y = 0 (14) ⇔y −λ(Kµ⋆+ λI)−1y = 0 (15) ⇔(Kµ⋆+ λI)−1y = y λ. (16) Thus, for any such stationary point µ⋆, F(µ⋆) = y⊤(Kµ⋆+λI)−1y = y⊤y λ , which is clearly a maximum. We next show that there cannot be an interior stationary point, and thus any local minimum strictly within the feasible set, unless the function is constant. Proposition 3. If any point µ⋆> 0 is a stationary point of F : µ →y⊤(Kµ + λI)−1y, then the function is necessarily constant. Proof. Assume that µ⋆> 0 is a stationary point, then, by Proposition 2, F(µ⋆) = y⊤(Kµ⋆+ λI)−1y= y⊤y λ , which implies that y is an eigenvector of (Kµ⋆+λI)−1 with eigenvalue λ−1. Equivalently, y is an eigenvector of Kµ⋆+ λI with eigenvalue λ, which is equivalent to y ∈null(Kµ⋆). Thus, y⊤Kµ⋆y = p X k,l=1 µkµl m X r,s=1 yrysKk(xr, xs)Kl(xr, xs) | {z } (∗) = 0. (17) Since the product of PDS functions is also PDS, (*) must be non-negative. Furthermore, since by assumption µi > 0 for all i ∈[1, p], it must be the case that the term (*) is equal to zero. Thus, equation 17 is equal to zero for all µ and the function F is equal to the constant ∥y∥2/λ. The previous propositions are sufficient to show that the gradient descent algorithm will not become stuck at a local minimum while searching the interior of a convex set M and, furthermore, they indicate that the optimum is found at the boundary. The following proposition gives a necessary and sufficient condition for the convexity of F on a convex region C. If the boundary region defined by ∥µ −µ0∥= Λ is contained in this convex region, then Algorithm 1 is guaranteed to converge to a global optimum. Let u ∈Rp represent an arbitrary direction of µ in C. We simplify the analysis of convexity in the following derivation by separating the terms that depend on Kµ and those depending on Ku, which arise when showing the positive semi-definiteness of the Hessian, i.e. u⊤∇2Fu ⪰0. We denote by ⊗the Kronecker product of two matrices. Proposition 4. The function F : µ →y⊤(Kµ +λI)−1y is convex over the convex set C iff the following condition holds for all µ ∈C and all u: ⟨M, N −e1⟩F ≥0, (18) 5 Data m p lin. base lin. ℓ1 lin. ℓ2 quad. base quad. ℓ1 quad. ℓ2 Parkinsons 194 21 .70 ± .03 .70 ± .04 .70 ± .03 .65 ± .03 .66 ± .03 .64 ± .03 Iono 351 34 .82 ± .03 .81 ± .04 .81 ± .03 .62 ± .05 .62 ± .05 .60 ± .05 Sonar 208 60 .90 ± .02 .92 ± .03 .90 ± .04 .84 ± .03 .80 ± .04 .80 ± .04 Breast 683 9 .70 ± .02 .71 ± .02 .70 ± .02 .70 ± .02 .70 ± .01 .70 ± .01 Table 1: The square-root of the mean squared error is reported for each method and several datasets. where M = 1 ⊗vec(αα⊤)⊤ ◦(Ku ⊗Ku), N = 4 1 ⊗vec(V)⊤ ◦(Kµ ⊗Kµ), and e1 is the matrix with zero-one entries constructed to select the terms [M]ijkl where i = k and j = l, i.e. it is non-zero only in the (i, j)th coordinate of the (i, j)th m × m block. Proof. For any u ∈Rp the expression of the Hessian of F at the point µ ∈C can be derived from that of its gradient and shown to be u⊤(∇2F)u = 4α⊤(Kµ ◦Ku)V(Kµ ◦Ku)α −α⊤(Ku ◦Ku)α. (19) Expanding each term, we obtain: α⊤(Kµ ◦Ku)V(Kµ ◦Ku)α = m X i,j=1 αiαj m X k,l=1 [Kµ]ik[Ku]ik[V]kl[Kµ]ik[Kµ]lj (20) = m X i,j,k,l=1 (αiαj[Ku]ik[Ku]lj)([V]kl[Kµ]ik[Kµ]lj) (21) and α⊤(Ku ◦Ku)α = Pm i,j=1 αiαj[Ku]ij[Ku]ij. Let 1 ∈Rm2 define the column vector of all ones and let vec(A) denote the vectorization of a matrix A by stacking its columns. Let the matrices M and N be defined as in the statement of the proposition. Then, [M]ijkl = (αiαj[Ku]ik[Ku]lj) and [N]ijkl = [V]kl[Kµ]ik[Kµ]lj. Then, in view of the definition of e1, the terms of equation (19) can be represented with the Frobenius inner product, u⊤(∇2F)u = ⟨M, N⟩F −⟨M, e1⟩F = ⟨M, N −e1⟩F . For any µ ∈Rp, let Kµ = P i µiKi and let V = (Kµ + λI)−1. We now show that the condition of Proposition 4 is satisfied for convex regions for which Λ, and therefore µ, is sufficiently large, in the case where Ku and Kµ are diagonal. In that case, M, N and V are diagonal as well and the condition of Proposition 4 can be rewritten as follows: X i,j [Ku]ii[Ku]jjαiαj(4[Kµ]ii[Kµ]jjVij −1i=j) ≥0. (22) Using the fact that V is diagonal, this inequality we can be further simplified m X i=1 [Ku]2 ii α2 i (4[Kµ]2 iiVii −1) ≥0. (23) A sufficient condition for this inequality to hold is that each term (4[Kµ]2 iiVii −1) be non-negative, or equivalently that 4K2 µV −I ⪰0, that is Kµ ⪰ q λ 3 I. Therefore, it suffices to select µ such that mini Pp k=1 µk[Kk]ii ≥ p λ/3. 4 Empirical Results To test the advantage of learning non-linear kernel combinations, we carried out a number of experiments on publicly available datasets. The datasets are chosen to demonstrate the effectiveness of the algorithm under a number of conditions. For general performance improvement, we chose a number of UCI datasets frequently used in kernel learning experiments, e.g., [7,12,15]. For learning with thousands of kernels, we chose the sentiment analysis dataset of Blitzer et. al [5]. Finally, for learning with higher-order polynomials, we selected datasets with large number of examples such as kin-8nm from the Delve repository. The experiments were run on a 2.33 GHz Intel Xeon Processor with 2GB of RAM. 6 0 1000 2000 3000 4000 1.4 1.45 1.5 1.55 1.6 1.65 1.7 Kitchen RMSE # bigrams L2 reg. Baseline L1 reg. 0 1000 2000 3000 4000 5000 1.4 1.45 1.5 1.55 1.6 1.65 1.7 Electronics RMSE # bigrams L2 reg. Baseline L1 reg. Figure 2: The performance of baseline and learned quadratic kernels (plus or minus one standard deviation) versus the number of bigrams (and kernels) used. 4.1 UCI Datasets We first analyzed the performance of the kernels learned as quadratic combinations. For each dataset, features were scaled to lie in the interval [0, 1]. Then, both labels and features were centered. In the case of classification dataset, the labels were set to ±1 and the RMSE was reported. We associated a base kernel to each feature, which computes the product of this feature between different examples. We compared both linear and quadratic combinations, each with a baseline (uniform), norm-1-regularized and norm-2-regularized weighting using µ0 =1 corresponding to the weights of the baseline kernel. The parameters λ and Λ were selected via 10-fold cross validation and the error reported was based on 30 random 50/50 splits of the entire dataset into training and test sets. For the gradient descent algorithm, we started with η = 1 and reduced it by a factor of 0.8 if the step was found to be too large, i.e., the difference ∥µ′ −µ∥increased. Convergence was typically obtained in less than 25 steps, each requiring a fraction of a second (∼0.05 seconds). The results, which are presented in Table 1, are in line with previous ones reported for learning kernels on these datasets [7,8,12,15]. They indicate that learning quadratic combination kernels can sometimes offer improvements and that it clearly does not degrade with respect to the performance of the baseline kernel. The learned quadratic combination performs well, particularly on tasks where the number of features was large compared to the number of points. This suggests that the learned kernel is better regularized than the plain quadratic kernel and can be advantageous is scenarios where over-fitting is an issue. 4.2 Text Based Dataset We next analyzed a text-based task where features are frequent word n-grams. Each base kernel computes the product between the counts of a particular n-gram for the given pair of points. Such kernels have a direct connection to count-based rational kernels, as described in [8]. We used the sentiment analysis dataset of Blitzer et. al [5]. This dataset contains text-based user reviews found for products on amazon.com. Each text review is associated with a 0-5 star rating. The product reviews fall into two categories: electronics and kitchen-wares, each with 2,000 data-points. The data was not centered in this case since we wished to preserve the sparsity, which offers the advantage of significantly more efficient computations. A constant feature was included to act as an offset. For each domain, the parameters λ and Λ were chosen via 10-fold cross validation on 1,000 points. Once these parameters were fixed, the performance of each algorithm was evaluated using 20 random 50/50 splits of the entire 2,000 points into training and test sets. We used the performance of the uniformly weighted quadratic combination kernel as a baseline, and showed the improvement when learning the kernel with norm-1 or norm-2 regularization using µ0 = 1 corresponding to the weights of the baseline kernel. As shown by Figure 2, the learned kernels significantly improved over the baseline quadratic kernel in both the kitchen and electronics categories. For this case too, the number of features was large in comparison with the number of points. Using 900 training points and about 3,600 bigrams, and thus kernels, each iteration of the algorithm took approximately 25 7 0 20 40 60 80 100 0.10 0.15 0.20 0.25 Training data subsampling factor MSE KRR, with (dashed) and without (solid) learning 1st degree 2nd degree 3rd degree 4th degree Figure 3: Performance on the kin-8nm dataset. For all polynomials, we compared un-weighted, standard KRR (solid lines) with norm-2 regularized kernel learning (dashed lines). For 4th degree polynomials we observed a clear performance improvement, especially for medium amount of training data (subsampling factor of 10-50). Standard deviations were typically in the order 0.005, so the results were statistically significant. seconds to compute with our Matlab implementation. When using norm-2 regularization, the algorithm generally converges in under 30 iterations, while the norm-1 regularization requires an even fewer number of iterations, typically less than 5. 4.3 Higher-order Polynomials We finally investigated the performance of higher-order non-linear combinations. For these experiments, we used the kin-8nm dataset from the Delve repository. This dataset has 20,000 examples with 8 input features. Here too, we used polynomial kernels over the features, but this time we experimented with polynomials with degrees as high as 4. Again, we made the assumption that all coefficients of µ are in the form of products of µis (see Section 2), thus only 8 kernel parameters needed to be estimated. We split the data into 10,000 examples for training and 10,000 examples for testing, and, to investigate the effect of the sample size on learning kernels, subsampled the training data so that only a fraction from 1 to 100 was used. The parameters λ and Λ were determined by 10-fold cross validation on the training data, and results are reported on the test data, see Figure 3. We used norm-2 regularization with µ0 =1 and compare our results with those of uniformly weighted KRR. For lower degree polynomials, the performance was essentially the same, but for 4th degree polynomials we observed a significant performance improvement of learning kernels over the uniformly weighted KRR, especially for a medium amount of training data (subsampling factor of 10-50). For the sake of readability, the standard deviations are not indicated in the plot. They were typically in the order of 0.005, so the results were statistically significant. This result corroborates the finding on the UCI dataset, that learning kernels is better regularized than plain unweighted KRR and can be advantageous is scenarios where overfitting is an issue. 5 Conclusion We presented an analysis of the problem of learning polynomial combinations of kernels in regression. This extends learning kernel ideas and helps explore kernel combinations leading to better performance. We proved that the global solution of the optimization problem always lies on the boundary and gave a simple projection-based gradient descent algorithm shown empirically to converge in few iterations. We also gave a necessary and sufficient condition for that algorithm to converge to a global optimum. Finally, we reported the results of several experiments on publicly available datasets demonstrating the benefits of learning polynomial combinations of kernels. We are well aware that this constitutes only a preliminary study and that a better analysis of the optimization problem and solution should be further investigated. We hope that the performance improvements reported will further motivate such analyses. 8 References [1] A. Argyriou, R. Hauser, C. Micchelli, and M. Pontil. A DC-programming algorithm for kernel selection. In International Conference on Machine Learning, 2006. [2] A. Argyriou, C. Micchelli, and M. Pontil. Learning convex combinations of continuously parameterized basic kernels. In Conference on Learning Theory, 2005. [3] F. Bach. Exploring large feature spaces with hierarchical multiple kernel learning. In Advances in Neural Information Processing Systems, 2008. [4] C. Berg, J. P. R. Christensen, and P. Ressel. Harmonic Analysis on Semigroups. SpringerVerlag: Berlin-New York, 1984. [5] J. Blitzer, M. Dredze, and F. Pereira. Biographies, Bollywood, Boom-boxes and Blenders: Domain Adaptation for Sentiment Classification. In Association for Computational Linguistics, 2007. [6] B. Boser, I. Guyon, and V. Vapnik. A training algorithm for optimal margin classifiers. In Conference on Learning Theory, 1992. [7] O. Chapelle, V. Vapnik, O. Bousquet, and S. Mukherjee. Choosing multiple parameters for support vector machines. Machine Learning, 46(1-3), 2002. [8] C. Cortes, M. Mohri, and A. Rostamizadeh. Learning sequence kernels. In Machine Learning for Signal Processing, 2008. [9] C. Cortes, M. Mohri, and A. Rostamizadeh. L2 regularization for learning kernels. In Uncertainty in Artificial Intelligence, 2009. [10] C. Cortes and V. Vapnik. Support-Vector Networks. Machine Learning, 20(3), 1995. [11] T. Jebara. Multi-task feature and kernel selection for SVMs. In International Conference on Machine Learning, 2004. [12] G. Lanckriet, N. Cristianini, P. Bartlett, L. E. Ghaoui, and M. Jordan. Learning the kernel matrix with semidefinite programming. Journal of Machine Learning Research, 5, 2004. [13] C. Micchelli and M. Pontil. Learning the kernel function via regularization. Journal of Machine Learning Research, 6, 2005. [14] C. S. Ong, A. Smola, and R. Williamson. Learning the kernel with hyperkernels. Journal of Machine Learning Research, 6, 2005. [15] A. Rakotomamonjy, F. Bach, Y. Grandvalet, and S. Canu. Simplemkl. Journal of Machine Learning Research, 9, 2008. [16] C. Saunders, A. Gammerman, and V. Vovk. Ridge Regression Learning Algorithm in Dual Variables. In International Conference on Machine Learning, 1998. [17] B. Sch¨olkopf and A. Smola. Learning with Kernels. MIT Press: Cambridge, MA, 2002. [18] B. Scholkopf, A. Smola, and K. Muller. Nonlinear component analysis as a kernel eigenvalue problem. Neural computation, 10(5), 1998. [19] J. Shawe-Taylor and N. Cristianini. Kernel Methods for Pattern Analysis. Cambridge University Press, 2004. [20] S. Sonnenburg, G. R¨atsch, C. Sch¨afer, and B. Sch¨olkopf. Large scale multiple kernel learning. Journal of Machine Learning Research, 7, 2006. [21] N. Srebro and S. Ben-David. Learning bounds for support vector machines with learned kernels. In Conference on Learning Theory, 2006. [22] V. N. Vapnik. Statistical Learning Theory. Wiley-Interscience, New York, 1998. [23] M. Varma and B. R. Babu. More generality in efficient multiple kernel learning. In International Conference on Machine Learning, 2009. 9
2009
232
3,740
Conditional Neural Fields Jian Peng Toyota Technological Institute at Chicago 6045 S. Kenwood Ave. Chicago, IL 60637 jpengwhu@gmail.com Liefeng Bo Toyota Technological Institute at Chicago 6045 S. Kenwood Ave. Chicago, IL 60637 liefengbo@gmail.com Jinbo Xu Toyota Technological Institute at Chicago 6045 S. Kenwood Ave. Chicago, IL 60637 jinboxu@gmail.com Abstract Conditional random fields (CRF) are widely used for sequence labeling such as natural language processing and biological sequence analysis. Most CRF models use a linear potential function to represent the relationship between input features and output. However, in many real-world applications such as protein structure prediction and handwriting recognition, the relationship between input features and output is highly complex and nonlinear, which cannot be accurately modeled by a linear function. To model the nonlinear relationship between input and output we propose a new conditional probabilistic graphical model, Conditional Neural Fields (CNF), for sequence labeling. CNF extends CRF by adding one (or possibly more) middle layer between input and output. The middle layer consists of a number of gate functions, each acting as a local neuron or feature extractor to capture the nonlinear relationship between input and output. Therefore, conceptually CNF is much more expressive than CRF. Experiments on two widely-used benchmarks indicate that CNF performs significantly better than a number of popular methods. In particular, CNF is the best among approximately 10 machine learning methods for protein secondary structure prediction and also among a few of the best methods for handwriting recognition. 1 Introduction Sequence labeling is a ubiquitous problem arising in many areas, including natural language processing [1], bioinformatics [2, 3, 4] and computer vision [5]. Given an input/observation sequence, the goal of sequence labeling is to infer the state sequence (also called output sequence), where a state may be some type of labeling or segmentation. For example, in protein secondary structure prediction, the observation is a protein sequence consisting of a collection of residues. The output is a sequence of secondary structure types. Hidden Markov model (HMM) [6] is one of the popular methods for sequence labeling. HMM is a generative learning model since it generates output from a joint distribution between input and output. In the past decade, several discriminative learning models such as conditional random fields (CRF) have emerged as the mainstream methods for sequence labeling. Conditional random fields, introduced by Lafferty [7], is an undirected graphical model. It defines the conditional probability of the output given the input. CRF is also a special case of the log-linear model since its potential function is defined as a linear combination of features. Another approach for sequence labeling is max margin structured learning such as max margin Markov 1 networks (MMMN) [8] and SVM-struct [9]. These models generalize the large margin and kernel methods to structured learning. In this work, we present a new probabilistic graphical model, called conditional neural fields (CNF), for sequence labeling. CNF combines the advantages of both CRF and neural networks. First, CNF preserves the globally consistent prediction, i.e. exploiting the structural correlation between outputs, and the strength of CRF as a rigorous probabilistic model. Within the probabilistic framework, posterior probability can be derived to evaluate confidence on predictions. This property is particularly valuable in applications that require multiple cascade predictors. Second, CNF automatically learns an implicit nonlinear representation of features and thus, can capture more complicated relationship between input and output. Finally, CNF is much more efficient than kernel-based methods such as MMMN and SVM-struct. The learning and inference procedures in CNF adopt efficient dynamic programming algorithm, which makes CNF applicable to large scale tasks. 2 Conditional Random Fields Assume the input and output sequences are X and Y , respectively. Meanwhile, Y = {y1, y2, ..., yN} ∈ΣN where Σ is the alphabet of all possible output states and |Σ| = M. CRF uses two types of features given a pair of input and output sequences. The first type of features describes the dependency between the neighboring output labels. fy,y′(Y, X, t) = δ[yt = y]δ[yt−1 = y′] (1) where δ[yt = y] is a indicator function. It is equal to 1 if and only if the state at position t is y. The second type of features describes the dependency between the label at one position and the observations around this position. fy(Y, X, t) = f(X, t)δ[yt = y] (2) where f(X,t) is the local observation or feature vector at position t. In a linear chain CRF model [7], the conditional probability of the output sequence Y given the input sequence X is the normalized product of the exponentials of potential functions on all edges and vertices in the chain. P(Y |X) = 1 Z(X)exp( N X t=1 (ψ(Y, X, t) + φ(Y, X, t))) (3) where φ(Y, X, t) = X ywT y fy(Y, X, t) (4) is the potential function defined on vertex at the tth position, which measures the compatibility between the local observations around the tth position and the output label yt; and ψ(Y, X, t) = X y,y′uy,y′fy,y′(Y, X, t) (5) is the potential function defined on an edge connecting two labels yt and yt+1. This potential measures the compatibility between two neighbor output labels. Although CRF is a very powerful model for sequence labeling, CRF does not work very well on the tasks in which the input features and output labels have complex relationship. For example, in computer vision or bioinformatics, many problems require the modeling of complex/nonlinear relationship between input and output [10, 11]. To model complex/nonlinear relationship between input and output, CRF has to explicitly enumerate all possible combinations of input features and output labels. Nevertheless, even assisted with domain knowledge, it is not always possible for CRF to capture all the important nonlinear relationship by explicit enumeration. 3 Conditional Neural Fields Here we propose a new probabilistic graphical model, conditional neural fields (CNF), for sequence labeling. Figure 1 shows the structural difference between CNF and CRF. CNF not only 2 can parametrize the conditional probability in the log-linear like formulation, but also is able to implicitly model complex/nonlinear relationship between input features and output labels. In a linear chain CNF, the edge potential function is similar to that of a linear chain CRF. That is, the edge function describes only the interdependency between the neighbor output labels. However, the potential function of CNF at each vertex is different from that of CRF. The function is defined as follows. φ(Y, X, t) = X y K X g=1 wy,gh(θT g f(X, t))δ[yt = y] (6) where h is a gate function. In this work, we use the logistic function as the gate function. The major difference between CRF and CNF is the definition of the potential function at each vertex. In CRF, the local potential function (see Equation (4)) is defined as a linear combination of features. In CNF, there is an extra hidden layer between the input and output, which consists of K gate functions (see Figure 1 and Equation (6)). The K gate functions extract a K-dimensional implicit nonlinear representation of input features. Therefore, CNF can be viewed as a CRF with its inputs being K homogeneous hidden feature-extractors at each position. Similar to CRF, CNF can also be defined on a general graph structure or an high-order Markov chain. This paper mainly focuses on a linear chain CNF model for sequence labeling. yi-2 uyi-1,yi uyi,yi+1 yi-1 yi yi+1 yi+2 xi+2 xi+1 xi-2 xi xi-1 uyi-2,yi-1 uyi+2,yi+1 wyi Input Output 1 θ yi-2 uyi-1,yi uyi,yi+1 wyi,1 wyi,K yi-1 yi yi+1 yi+2 xi+2 xi+1 xi-2 xi xi-1 K θ g θ uyi-2,yi-1 uyi+2,yi+1 Local window … … Gates Level Local window Input Output Figure 1: Structures of CRF and CNF CNF can also be viewed as a natural combination of neural networks and log-linear models. In the hidden layer, there are a set of neurons that extract implicit features from input. Then the log-linear model in the output layer utilizes the implicit features as its input. The parameters in the hidden neurons and the log-linear model can be jointly optimized. After learning the parameters, we can first compute all the hidden neuron values from the input and then use an inference algorithm to predict the output. Any inference algorithm used by CRF, such as Viterbi [7], can be used by CNF. Assume that the dimension of feature vector at each vertex is D. The computational complexity for the K neurons is O(NKD). Supposing Viterbi is used as the inference algorithm, the total computational complexity of CNF inference is O(NMK + NKD). Empirically the number of hidden neurons K is small, so the CNF inference procedure may have lower computational complexity than CRF. In our experiments, CNF shows superior predictive performance over two baseline methods: neural networks and CRF. 4 Parameter Optimization Similar to CRF, we can use the maximum likelihood method to train the model parameters such that the log-likelihood is maximized. For CNF, the log-likelihood is as follows. log P(Y |X) = N X t=1 (ψ(Y, X, t) + φ(Y, X, t))) −log Z(X) (7) 3 Since CNF contains a hidden layer of gate function h, the log-likelihood function is not convex any more. Therefore, it is very likely that we can only obtain a local optimal solution of the parameters. Although both the output and hidden layers contain model parameters, all the parameters can be learned together by gradient-based optimization. We can use LBFGS [12] as the optimization routine to search for the optimal model parameters because 1) LBFGS is very efficient and robust; and 2) LBFGS provides us an approximation of inverse Hessian for hyperparameter learning [13], which will be described in the next section. The gradient of the log-likelihood with respect to the parameters is given by ∂log P ∂uy,y′ = N X t=1 δ[yt = y]δ[yt−1 = y′] −EP ( ˜Y |X,w,u,θ)[ N X t=1 δ[˜yt = y]δ[˜yt−1 = y′]] (8) ∂log P ∂wy,g = N X t=1 δ[yt = y]h(θT g f(X, t)) −EP ( ˜Y |X,w,u,θ)[ N X t=1 δ[˜yt = y]h(θT g f(X, t))] (9) ∂log P ∂θg = N X t=1 wyt,g ∂h(θT g f(X, t)) ∂θg −EP ( ˜Y |X,w,u,θ)[ N X t=1 w˜yt,g ∂h(θT g f(X, t)) ∂θg ] (10) where δ is the indicator function. Just like CRF, we can calculate the expectations in these gradients efficiently using the forwardbackward algorithm. Assume that the dimension of feature vector at each vertex is D. Since the K gate functions can be computed in advance, the computational complexity of the gradient computation is O(NKD + NM 2K) for a single input-output pair with length N. If K is smaller than D, it is very possible that the computation of gradient in CNF is faster than in CRF, where the complexity of gradient computation is O(NM 2D). In our experiments, K is usually much smaller than D. For example, in protein secondary structure prediction, K = 30 and D = 260. In handwriting recognition, K = 40 and D = 128. As a result, although the optimization problem is non-convex, the training time of CNF is acceptable. Our experiments show that the training time of CNF is about 2 or 3 times that of CRF. 5 Regularization and Hyperparameter Optimization Because an hidden layer is added to CNF to introduce more expressive power than CRF, it is crucial to control the model complexity of CNF to avoid overfitting. Similar to CRF, we can enforce regularization on the model parameters to avoid overfitting. We assume that the parameters have a Gaussian prior and constrain the inverse covariance matrix (of Gaussian distribution) by a small number of hyperparameters. To simplify the problem, we divide the model parameter vector λ into three different groups w, u and θ (see Figure 1) and assume that the parameters among different groups are independent of each other. Furthermore, we assume parameters in each group share the same Gaussian prior with a diagonal covariance matrix. Let α = [αw, αu, αθ]T denote the vector of three regularizations/hyperparameters for these three groups of parameters, respectively. While grid search provides a practical way to determine the best value at low resolution for a single hyperparameter, we need a more sophisticated method to determine three hyperparameters simultaneously. In this section, we discuss the hyperparameter learning in evidence framework. 5.1 Laplace’s Approximation The evidence framework [14] assumes that the posterior of α is sharply peaked around the maximum αmax. Since no prior knowledge of α is known, the prior of each αi, i ∈{w, u, θ}, P(αi) is chosen to be a constant on log-scale or flat. Thus, the value of α maximizing the posterior of α P(α|Y, X) can be found by maximizing P(Y |X, α) = Z λ P(Y |X, λ)P(λ|α)dλ (11) By Laplace’s approximation [14], this integral is approximated around the MAP estimation of weights. We have log P(Y |X, α) = log P(Y |X, λMAP ) + log P(λMAP |α) −1 2 log det(A) + const (12) 4 where A is the hessian of log P(Y |X, λMAP ) + log P(λMAP |α) with respect to λ. In order to maximize the approximation, we take the derivative of the right hand side of Equation (12) with respect to α. The optimal α value can be derived by the following update formula. αnew i = 1 λT MAP λMAP (Wi −αold i Tr(A−1)) (13) where Wi is the number of parameters in group i ∈{w, u, θ}. 5.2 Approximation of the Trace of Inverse Hessian When there is a large number of model parameters, accurate computation of Tr(A−1) is very expensive. All model parameters are coupled together by the normalization factor, so the diagonal approximation of Hessian or the outer-product approximation are not appropriate. In this work, we approximate inverse Hessian using information available in the parameter optimization procedure. The LBFGS algorithm is used to optimize parameters iteratively, so we can approximate inverse Hessian at λMAP using the update information generated in the past several iterations. This approach is also employed in [15, 14]. From the LBFGS update formula [13], we can compute the approximation of the trace of inverse Hessian very efficiently. The computational complexity of this approximation is only O(m3 + nm2), while the accurate computation has complexity O(n3) where n is the number of parameters and m is the size of history budget used by LBFGS. Since m is usually much smaller than n, the computational complexity is only O(nm2). See Theorem 2.2 in [13] for more detailed account of this approximation method. 5.3 Hyperparameter Update The hyperparameter α is iteratively updated by a two-step procedure. In the first step we fix hyperparameter α and optimize the model parameters by maximizing the log-likelihood in Equation (7) using LBFGS. In the second step,we fix the model parameters and then update α using Equation (13). This two-step procedure is iteratively carried out until the norm of α does not change more than a threshold. Figure 2 shows the learning curve of the hyperparameter on a protein secondary structure prediction benchmark. In our experiments, the update usually converges in less than 15 iterations. Also we found that this method achieves almost the same test performance as the grid search approach on two public benchmarks. 1 2 3 4 5 6 7 8 9 10 79.2 79.4 79.6 79.8 80 80.2 80.4 80.6 Iterations Accuracy Hyperparameter Training Figure 2: Learning curve of hyperparameter α. 6 Related Work Most existing methods for sequence labeling are built under the framework of graphical models such as HMM and CRF. Since these approaches are incapable of capturing highly complex relationship between observations and labels, many structured models are proposed for nonlinear modeling of label-observation dependency. For example, kernelized max margin Markov networks [8], SVMstruct [9] and kernel CRF [16] use nonlinear kernels to model the complex relationship between 5 observations and labels. Although these kernelized models are convex, it is still too expensive to train and test them in the case that observations are of very high dimension. Furthermore,the number of resultant support vectors for these kernel methods are also very large. Instead, CNF has computational complexity comparable to CRF. Although CNF is non-convex and usually only the local minimum solution can be obtained, CNF still achieves very good performance in real-world applications. Very recently, the probabilistic neural language model [17] and recurrent temporal restricted Boltzmann machine [18] are proposed for natural language and time series modeling. These two methods model sequential data using a directed graph structure, so they are essentially generative models. By contrast, our CNF is a discriminative model, which is mainly used for discriminative prediction of sequence data. The hierarchical recurrent neural networks [19, 20] can be viewed as a hybrid of HMM and neural networks (HMM/NN), building on a directed linear chain. Similarly, CNF can be viewed as an a hybrid of CRF and neural networks, which has the global normalization factor and alleviate the label-bias problem. 7 Experiments 7.1 Protein Secondary Structure Prediction Protein secondary structure (SS) prediction is a fundamental problem in computational biology as well as a typical problem used to evaluate sequence labeling methods. Given a protein sequence consisting of a collection of residues, the problem of protein SS prediction is to predict the secondary structure type at each residue. A variety of methods have been described in literature for protein SS prediction. Given a protein sequence,we first run PSI-BLAST [21] to generate sequence profile and then use this profile as input to predict SS. A sequence profile is a position-specific scoring matrix X with n × 20 elements where n is the number of residues in a protein. Formally, X = [x1, x2, x3, ..., xn] where xi is a vector of 20 elements. Each xi contains 20 position-specific scores, each corresponding to one of the 20 amino acids in nature. The output we want to predict is Y = [y1, y2, ..., yn] where yi ∈{H, E, C} represents the secondary structure type at the ith residue. We evaluate all the SS prediction methods using the CB513 benchmark [22], which consists of 513 no-homologous proteins. The true secondary structure for each protein is calculated using DSSP [23], which generates eight possible secondary structure states. Then we convert these 8 states into three SS types as follows: H and G to H (Helix), B and E to E (Sheets) and all other states to C (Coil). Q3 is used to measure the accuracy of three SS types averaged on all positions. To obtain good performance, we also linearly transform X into values in [0, 1] as suggested by Kim et al[24]. S(x) = ( 0 if x < −5; 0.1x+0.5 if −5 ≤x ≤5; 1 if x > 5. To determine the number of gate functions for CNF, we enumerate this number in set {10,20,30,40,60,100}. We also enumerate window size for CNF in set {7,9,11,13,15,17} and find that the best evidence is achieved when window size is 13 and K = 30. Two baseline methods are used for comparison: conditional random fields and neural networks. All the parameters of these methods are carefully tuned. The best window sizes for neural networks and CRF are 15 and 13, respectively. We also compared our methods with other popular secondary structure prediction programs. CRF, neural networks, Semi-Markov HMM [25], SVMpsi [24], PSIPRED[2] and CNF use the sequence profile generated by PSI-BLAST as described above. SVMpro [26] uses the position specific frequency as input feature. YASSPP [27] and SPINE [28] also use other residue-specific features in addition to sequence profile. Table 1 lists the overall performance of a variety of methods on the CB513 data set. As shown in this table, there are two types of gains on accuracy. First, by using one hidden layer to model the nonlinear relationship between input and output, CNF achieves a very significant gain over linear chain CRF. This also confirms that strong nonlinear relationship exists between sequence profile and secondary structure type. Second, by modeling interdependency between neighbor residues, CNF also obtains much better prediction accuracy over neural networks. We also tested the the hybrid of HMM/NN on this dataset. The predicted accuracy of HMM/NN is about three percent less than 6 Table 1: Performance of various methods for protein secondary structure prediction on the CB513 dataset. Semi-Markov HMM is a segmental semi-Markov model for sequence labeling. SVMpro and SVMpsi are jury method with the SVM (Gaussian kernel) as the basic classifiers. YASSPP use the SVM with a specifically designed profile kernel function for SVM classifiers. PSIPRED is a two stage double-hidden layer neural network. SPINE is voting systems with multiple coupled neural networks. YASSPP, PSIPRED and SPINE also use other features besides the PSSM scores. An * symbol indicates the methods are tested over a 10-fold cross-validation on CB513, while others are tested over a 7-fold cross-validation. Methods Q3(%) Conditional Random Fields 72.9 SVM-struct (Linear Kernel) 73.1 Neural Networks (one hidden layer) 72 Neural Networks (two hidden layer) 74 Semimarkov HMM 72.8 SVMpro 73.5 SVMpsi 76.6 PSIPRED 76 YASSPP 77.8 SPINE* 76.8 Conditional Neural Fields 80.1 ±0.3 Conditional Neural Fields* 80.5 ±0.3 that of CNF. By seamlessly integrating neural networks and CRF, CNF outperforms all other thestate-of-art prediction methods on this dataset. We also tried Max-Margin Markov Network [8] and SVM-struct1 with RBF kernel for this dataset. However, because the dataset is large and the feature space is of high dimension, it is impossible for these kernel-based methods to finish training within a reasonable amount of time. Both of them failed to converge within 120 hours. The running time of CNF learning and inference is about twice that of CRF. 7.2 Handwriting Recognition Handwriting recognition(OCR) is another widely-used benchmark for sequence labeling algorithms. We use the subset of OCR dataset chosen by Taskar [8], which contains 6876 sequences. In this dataset, each word consists of a sequence of characters and each character is represented by an image with 16 × 8 binary pixels. In addition to using the vector of pixel values as input features, we do not use any higher-level features. Formally, the input X = [x1, x2, x3, ..., xn] is a sequence of 128-dimensional binary vectors. The output we want to predict is a sequence of labels. Each label yi for image xi is one of the 26 classes {a, b, c, ..., z}. The accuracy is defined as the average accuracy over all characters. The number of gate functions for CNF is selected from set {10, 20, 30, 40, 60, 100} and we find that the best evidence is achieved when K = 40. Window sizes for all methods are fixed to 1. All the methods are tested using 10-fold cross-validation and their performance are shown in Table 2. As shown in this table, CNF achieves superior performance over log-linear methods, SVM, CRF and neural networks. CNF is also comparable with two slightly different max margin Markov network models. 8 Discussion We present a probabilistic graphical model conditional neural fields (CNF) for sequence labeling tasks which require accurate account of nonlinear relationship between input and output. CNF is a very natural integration of conditional graphical models and neural networks and thus, inherits advantages from both of them. On one hand, by neural networks, CNF can model nonlinear relationship between input and output. On the other hand, by using graphical representation, CNF 1http://svmlight.joachims.org/svm struct.html 7 Table 2: Performance of various methods on handwriting recognition. The results of logistic regression, SVM and max margin Markov networks are taken from [8]. Both CNF and neural networks use 40 neurons in the hidden layer. The CRF performance (78.9%) we obtained is a bit better than 76% in [8]. Methods Accuracy(%) Logistic Regression 71 SVM (linear) 71 SVM (quadratic) 80 SVM (cubic) 81 SVM-struct 80 Conditional Random Fields 78.9 Neural Networks 79.8 MMMN (linear) 80 MMMN (quadratic) 87 MMMN (cubic) 87 Conditional Neural Fields 86.9 ±0.4 can model interdependency between output labels. While CNF is more sophisticated and expressive than CRF, the computational complexity of learning and inference is not necessarily higher. Our experimental results on large-scale datasets indicate that CNF can be trained and tested as almost efficient as CRF but much faster than kernel-based methods. Although CNF is not convex, it can still be trained using the quasi-Newton method to obtain a local optimal solution, which usually works very well in real-world applications. In two real-world applications, CNF significantly outperforms two baseline methods, CRF and neural networks. On protein secondary structure prediction, CNF achieves the best performance over all methods we tested. on handwriting recognition, CNF also compares favorably with the best method max-margin Markov network. We are currently generalizing our CNF model to a second-order Markov chain and a more general graph structure and also studying if it will improve predictive power of CNF by interposing more than one hidden layers between input and output. Acknowledgements We thank Nathan Srebro and David McAllester for insightful discussions. References [1] Fei Sha and O. Pereira. Shallow parsing with conditional random fields. In Proceedings of Human Language Technology-NAACL 2003. [2] D. T. Jones. Protein secondary structure prediction based on position-specific scoring matrices. Journal of Molecular Biology, 292(2):195–202, September 1999. [3] Feng Zhao, Shuaicheng Li, Beckett W. Sterner, and Jinbo Xu. Discriminative learning for protein conformation sampling. Proteins, 73(1):228–240, October 2008. [4] Feng Zhao, Jian Peng, Joe Debartolo, Karl F. Freed, Tobin R. Sosnick, and Jinbo Xu. A probabilistic graphical model for ab initio folding. In RECOMB 2’09: Proceedings of the 13th Annual International Conference on Research in Computational Molecular Biology, pages 59– 73, Berlin, Heidelberg, 2009. Springer-Verlag. [5] Sy Bor Wang, Ariadna Quattoni, Louis-Philippe Morency, and David Demirdjian. Hidden conditional random fields for gesture recognition. In CVPR 2006. [6] Lawrence R. Rabiner. A tutorial on hidden markov models and selected applications in speech recognition. In Proceedings of the IEEE, 1989. [7] John D. Lafferty, Andrew McCallum, and Fernando C. N. Pereira. Conditional random fields: Probabilistic models for segmenting and labeling sequence data. In ICML 2001. [8] Ben Taskar, Carlos Guestrin, and Daphne Koller. Max-margin markov networks. In NIPS 2003. 8 [9] Ioannis Tsochantaridis, Thomas Hofmann, Thorsten Joachims, and Yasemin Altun. Support vector machine learning for interdependent and structured output spaces. In ICML 2004. [10] Nam Nguyen and Yunsong Guo. Comparisons of sequence labeling algorithms and extensions. In ICML 2007. [11] Yan Liu, Jaime Carbonell, Judith Klein-Seetharaman, and Vanathi Gopalakrishnan. Comparison of probabilistic combination methods for protein secondary structure prediction. Bioinformatics, 20(17), November 2004. [12] D. C. Liu and J. Nocedal. On the limited memory bfgs method for large scale optimization. Mathematical Programming, 45(3), 1989. [13] Richard H. Byrd, Jorge Nocedal, and Robert B. Schnabel. Representations of quasi-newton matrices and their use in limited memory methods. Mathematical Programming, 63(2), 1994. [14] David J. C. Mackay. A practical bayesian framework for backpropagation networks. Neural Computation, 4:448–472, 1992. [15] Christopher M. Bishop. Neural Networks for Pattern Recognition. Oxford University Press, November 1995. [16] John Lafferty, Xiaojin Zhu, and Yan Liu. Kernel conditional random fields: representation and clique selection. In ICML 2004. [17] Yoshua Bengio, R´ejean Ducharme, Pascal Vincent, and Christian Janvin. A neural probabilistic language model. Journal of Machine Learning Research, 3:1137–1155, 2003. [18] Ilya Sutskever, Geoffrey E Hinton, and Graham Taylor. The recurrent temporal restricted boltzmann machine. In D. Koller, D. Schuurmans, Y. Bengio, and L. Bottou, editors, NIPS 2009. [19] Barbara Hammer. Recurrent networks for structured data - a unifying approach and its properties. Cognitive Systems Research, 2002. [20] Alex Graves and Juergen Schmidhuber. Offline handwriting recognition with multidimensional recurrent neural networks. In D. Koller, D. Schuurmans, Y. Bengio, and L. Bottou, editors, NIPS 2009. [21] S. F. Altschul, T. L. Madden, A. A. Sch¨affer, J. Zhang, Z. Zhang, W. Miller, and D. J. Lipman. Gapped blast and psi-blast: a new generation of protein database search programs. Nucleic Acids Research, 25, September 1997. [22] James A. Cuff and Geoffrey J. Barton. Evaluation and improvement of multiple sequence methods for protein secondary structure prediction. Proteins: Structure, Function, and Genetics, 34, 1999. [23] Wolfgang Kabsch and Christian Sander. Dictionary of protein secondary structure: Pattern recognition of hydrogen-bonded and geometrical features. Biopolymers, 22(12):2577–2637, December 1983. [24] H. Kim and H. Park. Protein secondary structure prediction based on an improved support vector machines approach. Protein Engineering, 16(8), August 2003. [25] Wei Chu, Zoubin Ghahramani, and David. A graphical model for protein secondary structure prediction. In ICML 2004. [26] Sujun Hua and Zhirong Sun. A novel method of protein secondary structure prediction with high segment overlap measure: Support vector machine approach. Journal of Molecular Biology, 308, 2001. [27] George Karypis. Yasspp: Better kernels and coding schemes lead to improvements in protein secondary structure prediction. Proteins: Structure, Function, and Bioinformatics, 64(3):575– 586, 2006. [28] O. Dor and Y. Zhou. Achieving 80% ten-fold cross-validated accuracy for secondary structure prediction by large-scale training. Proteins: Structure, Function, and Bioinformatics, 66, March 2007. 9
2009
233
3,741
An Online Algorithm for Large Scale Image Similarity Learning Gal Chechik Google Mountain View, CA gal@google.com Varun Sharma Google Bengalooru, Karnataka, India vasharma@google.com Uri Shalit ICNC, The Hebrew University Israel uri.shalit@mail.huji.ac.il Samy Bengio Google Mountain View, CA bengio@google.com Abstract Learning a measure of similarity between pairs of objects is a fundamental problem in machine learning. It stands in the core of classification methods like kernel machines, and is particularly useful for applications like searching for images that are similar to a given image or finding videos that are relevant to a given video. In these tasks, users look for objects that are not only visually similar but also semantically related to a given object. Unfortunately, current approaches for learning similarity do not scale to large datasets, especially when imposing metric constraints on the learned similarity. We describe OASIS, a method for learning pairwise similarity that is fast and scales linearly with the number of objects and the number of non-zero features. Scalability is achieved through online learning of a bilinear model over sparse representations using a large margin criterion and an efficient hinge loss cost. OASIS is accurate at a wide range of scales: on a standard benchmark with thousands of images, it is more precise than state-of-the-art methods, and faster by orders of magnitude. On 2.7 million images collected from the web, OASIS can be trained within 3 days on a single CPU. The nonmetric similarities learned by OASIS can be transformed into metric similarities, achieving higher precisions than similarities that are learned as metrics in the first place. This suggests an approach for learning a metric from data that is larger by orders of magnitude than was handled before. 1 Introduction Learning a pairwise similarity measure from data is a fundamental task in machine learning. Pair distances underlie classification methods like nearest neighbors and kernel machines, and similarity learning has important applications for “query-by-example” in information retrieval. For instance, a user may wish to find images that are similar to (but not identical copies of) an image she has; a user watching an online video may wish to find additional videos about the same subject. In all these cases, we are interested in finding a semantically-related sample, based on the visual content of an image, in an enormous search space. Learning a relatedness function from examples could be a useful tool for such tasks. A large number of previous studies of learning similarities have focused on metric learning, like in the case of a positive semidefinite matrix that defines a Mahalanobis distance [19]. However, similarity learning algorithms are often evaluated in a context of ranking [16, 5]. When the amount 1 of training data available is very small, adding positivity constraints for enforcing metric properties is useful for reducing overfitting and improving generalization. However, when sufficient data is available, as in many modern applications, adding positive semi-definitiveness constraints is very costly, and its benefit in terms of generalization may be limited. With this view, we take here an approach that avoids imposing positivity or symmetry constraints on the learned similarity measure. Some similarity learning algorithms assume that the available training data contains real-valued pairwise similarities or distances. Here we focus on a weaker supervision signal: the relative similarity of different pairs [4]. This signal is also easier to obtain, here we extract similarity information from pairs of images that share a common label or are retrieved in response to a common text query in an image search engine. The current paper presents an approach for learning semantic similarity that scales up to two orders of magnitude larger than current published approaches. Three components are combined to make this approach fast and scalable: First, our approach uses an unconstrained bilinear similarity. Given two images p1 and p2 we measure similarity through a bilinear form p1Wp2, where the matrix W is not required to be positive, or even symmetric. Second we use a sparse representation of the images, which allows to compute similarities very fast. Finally, the training algorithm that we developed, OASIS, Online Algorithm for Scalable Image Similarity learning, is an online dual approach based on the passive-aggressive algorithm [2]. It minimizes a large margin target function based on the hinge loss, and converges to high quality similarity measures after being presented with a small fraction of the training pairs. We find that OASIS is both fast and accurate at a wide range of scales: for a standard benchmark with thousands of images, it achieves better or comparable results than existing state-of-the-art methods, with computation times that are shorter by an order of magnitude. For web-scale datasets, OASIS can be trained on more than two million images within three days on a single CPU. On this large scale dataset, human evaluations of OASIS learned similarity show that 35% of the ten nearest neighbors of a given image are semantically relevant to that image. 2 Learning Relative Similarity We consider the problem of learning a pairwise similarity function S, given supervision on the relative similarity between two pairs of images. The algorithm is designed to scale well with the number of samples and the number of features, by using fast online updates and a sparse representation. Formally, we are given a set of images P, where each image is represented as a vector p ∈Rd. We assume that we have access to an oracle that, given a query image pi ∈P, can locate two other images, p+ i ∈P and p− i ∈P, such that p+ i ∈P is more relevant to pi ∈P than p− i ∈P. Formally, we could write that relevance(pi, p+ i ) > relevance(pi, p− i ). However, unlike methods that assume that a numerical value of the similarity is available, relevance(pi, pj) ∈R, we use this weaker form of supervision, and only assume that some pairs of images can be ranked by their relevance to a query image pi. The relevance measure could reflect that the relevant image p+ i belongs to the same class of images as the query image, or reflect any other semantic property of the images. Our goal is to learn a similarity function SW (pi, pj) parameterized by W that assigns higher similarity scores to the pairs of more relevant images (with a safety margin), S(pi, p+ i ) > S(pi, p− i ) + 1 , ∀pi, p+ i , p− i ∈P . (1) In this paper, we consider a parametric similarity function that has a bi-linear form, SW(pi, pj) ≡pT i W pj (2) with W ∈Rd×d. Importantly, if the image vectors pi ∈Rd are sparse, namely, the number of non-zero entries ki ≡∥pi∥0 is small, ki ≪d, then the value of the score defined in Eq. (2) can be computed very efficiently even when d is large. Specifically, SW can be computed with complexity of O(kikj) regardless of the dimensionality d. To learn a scoring function that obeys the constraints in Eq. (1), we define a global loss LW that accumulates hinge losses over all possible triplets in the training set: LW ≡P (pi,p+ i ,p− i )∈P3 lW(pi, p+ i , p− i ), with the loss for a single triplet being lW(pi, p+ i , p− i ) ≡max 0, 1 −SW(pi, p+ i ) + SW(pi, p− i )  . 2 To minimize the global loss LW, we propose an algorithm that is based on the Passive-Aggressive family of algorithms [2]. First, W is initialized to the identity matrix W0 = Id×d. Then, the algorithm iteratively draws a random triplet (pi, p+ i , p− i ), and solves the following convex problem with a soft margin: Wi = argmin W 1 2∥W −Wi−1∥2 F ro + Cξ s.t. lW(pi, p+ i , p− i ) ≤ξ and ξ ≥0 (3) where ∥·∥F ro is the Frobenius norm (point-wise L2 norm). At the ith iteration, Wi is updated to optimize a trade-off between staying close to the previous parameters Wi−1 and minimizing the loss on the current triplet lW(pi, p+ i , p− i ). The aggressiveness parameter C controls this trade-off. To solve the problem in Eq. (3) we follow the derivation in [2]. When lW(pi, p+ i , p− i ) = 0, it is clear that Wi = Wi−1 satisfies Eq. (3) directly. Otherwise, we define the Lagrangian L(W, τ, ξ, λ) = 1 2∥W −Wi−1∥2 F ro + Cξ + τ(1 −ξ −pT i W(p+ i −p− i )) −λξ (4) where τ ≥0 and λ ≥0 are the Lagrange multipliers. The optimal solution is obtained when the gradient vanishes ∂L(W,τ,ξ,λ) ∂W = W −Wi−1 −τVi = 0, where Vi is the gradient matrix at the current step Vi = ∂lW ∂W = [p1 i (p+ i −p− i ), . . . , pd i (p+ i −p− i )]T . When image vectors are sparse, the gradient Vi is also sparse, hence the update step costs only O(|pi|0 × (∥p+ i ∥0 + ∥p− i ∥0)), where the L0 norm ∥x∥0 is the number of nonzero values in x. Differentiating the Lagrangian with respect to ξ we obtain ∂L(W,τ,ξ,λ) ∂ξ = C −τ −λ = 0 which, knowing that λ ≥0, means that τ ≤C. Plugging back into the Lagrangian in Eq. (4), we obtain L(τ) = −1 2τ 2∥Vi∥2 + τ(1 −pT i Wi−1(p+ i −p− i )). Finally, taking the derivative of this second Lagrangian with respect to τ and using τ ≤C, we obtain W = Wi−1 + τVi (5) τ = min  C, lWi−1(pi, p+ i , p− i ) ∥Vi∥2  . The optimal update for the new W therefore has a form of a gradient descent step with a step size τ that can be computed exactly. Applying this algorithm for classification tasks was shown to yield a small cumulative online loss, and selecting the best Wi during training using a hold-out validation set was shown to achieve good generalization [2]. It should be emphasized that OASIS is not guaranteed to learn a parameter matrix that is positive, or even symmetric. We study variants of OASIS that enforce symmetry or positivity in Sec. 4.3.2. 3 Related Work Learning similarity using relative relevance has been intensively studied, and a few recent approaches aim to address learning at large scale. For small-scale data, there are two main groups of similarity learning approaches. The first approach, learning Mahalanobis distances, can be viewed as learning a linear projection of the data into another space (often of lower dimensionality), where a Euclidean distance is defined among pairs of objects. Such approaches include Fisher’s Linear Discriminant Analysis (LDA), relevant component analysis (RCA) [1], supervised global metric learning [18], large margin nearest neighbor (LMNN) [16], and metric learning by collapsing classes [5] (MLCC). Other constraints like sparseness are sometimes induced over the learned metric [14]. See also a review in [19] for more details. The second family of approaches, learning kernels, is used to improve performance of kernel based classifiers. Learning a full kernel matrix in a non parametric way is prohibitive except for very small data sets. As an alternative, several studies suggested learning a weighted sum of pre-defined kernels [11] where the weights are learned from data. In some applications this was shown to be inferior to uniform weighting of the kernels [12]. The work in [4] further learns a weighting over local distance functions for every image in the training set. Non linear image similarity learning was also studied in the context of dimensionality reduction, as in [8]. Finally, Jain et al [9] (based on Davis et al [3]) aim to learn metrics in an online setting. This work is one of the closest work with respect to OASIS: it learns online a linear model of a [dis-]similarity 3 Query image Top 5 relevant images retrieved by OASIS Table 1: OASIS: Successful cases from the web dataset. The relevant text queries for each image are shown beneath the image (not used in training). function between documents (images); the main difference is that Jain et al [9] try to learn a true distance, imposing positive definiteness constraints, which makes the algorithm more complex and more constrained. We argue in this paper that in the large scale regime, imposing these constraints throughout could be detrimental. Learning a semantic similarity function between images was also studied in [13]. There, semantic similarity is learned by representing each image by the posterior probability distribution over a predefined set of semantic tags, and then computing the distance between two images as the distance between the two underlying posterior distributions. The representation size of each image therefore grows with the number of semantic classes. 4 Experiments We tested OASIS on two datasets spanning a wide regime of scales. First, we tested its scalability on 2.7 million images collected from the web. Then, to quantitatively compare the precision of OASIS with other, small-scale metric-learning methods, we tested OASIS using Caltech-256, a standard machine vision benchmark. Image representation. We use a sparse representation based on bags of visual words [6]. These features were systematically tested and found to outperform other features in related tasks, but the details of the visual representation is outside the focus of this paper. Broadly speaking, features are extracted by dividing each image into overlapping square blocks, representing each block by edge and color histograms, and finding the nearest block in a predefined set (dictionary) of d = 10, 000 vectors of such features. An image is thus represented as the number of times each dictionary visual word was present in it, yielding vectors in Rd with an average of 70 non-zero values. Evaluation protocol. We evaluated the performance of all algorithms using precision-at-top-k, a standard ranking precision measure based on nearest neighbors. For each query image in the test set, all other test images were ranked according to their similarity to the query image, and the number of same-class images among the top k images (the k nearest neighbors) is computed, and then averaged across test images. We also calculated the mean average precision (mAP), a measure that is widely used in the information retrieval community. 4.1 Web-Scale Experiment We first tested OASIS on a set of 2.7 million images scraped from the Google image search engine. We collected a set of ∼150K anonymized text queries, and for each of these queries, we had access to a set of relevant images. To compute an image-image relevance measure, we first obtained measures of relevance between images and text queries. This was achieved by collecting anonymized clicks over images collected from the set of text queries. We used this query-image click counts 4 C(query,image) to compute the (unnormalized) probability that two images are co-queried as Relevance(image,image) = CT C. The relevance matrix was then thresholded to keep only the top 1 percent values. We trained OASIS on a training set of 2.3 million images, and tested performance on 0.4 million images. The number of training iterations (each corresponding to sampling one triplet) was selected using a second validation set of around 20000 images, over which the performance saturated after 160 million iterations. Overall, training took a total of ∼4000 minutes on a single CPU of a standard modern machine. Table 1 shows the top five images as ranked by OASIS on two examples of query-images in the test set. In these examples, OASIS captures similarity that goes beyond visual appearance: most top ranked images are about the same concept as the query image, even though that concept was never provided in a textual form, and is inferred in the viewers mind (“dog”, “snow”). This shows that learning similarity across co-queried images can indeed capture the semantics of queries even if the queries are not explicitly used during training. To obtain a quantitative evaluation of the ranking obtained by OASIS we created an evaluation benchmark, by asking human evaluators to mark if a set of candidate images were semantically relevant to a set of 25 popular image queries. For each query image, evaluators were presented with the top-10 images ranked by OASIS, mixed with 10 random images. Given the relevance ranking from 30 evaluators, we computed the precision of each OASIS rank as the fraction of people that marked each image as relevant to the query image. On average across all queries and evaluators, OASIS rankings yielded precision of ∼40% at the top 10 ranked images. As an estimate of an “upper bound” on the difficulty of the task, we also computed the precision obtained by human evaluators: For every evaluator, we used the rankings of all other evaluators as ground truth, to compute his precision. As with the ranks of OASIS, we computed the fraction of evaluators that marked an image as relevant, and repeated this separately for every query and human evaluator, providing a measure of “coherence” per query. Fig. 1(a) shows the mean precision obtained by OASIS and human evaluators for every query in our data. For some queries OASIS achieves precision that is very close to that of the mean human evaluator. In many cases OASIS achieves precision that is as good or better than some evaluators. (a) (b) 0 5 10 15 20 25 0 0.2 0.4 0.6 0.8 1 query ID (sorted by precision) precision Human precision OASIS precision 60 600 10K 100K 2M 9sec 37sec 5min 3hrs 2days runtime (min) number of images (log scale) 3 hrs 60K 5 min ~190 days 1.5 hrs 100K 2 days 2.3M fast LMNN (MNIST 10 categories) projected extrapolation (2nd poly) OASIS (Web data) Figure 1: (a) Precision of OASIS and human evaluators, per query, using rankings of all (remaining) human evaluators as a ground truth. (b) Comparison of the runtime of OASIS and fast-LMNN[17], over a wide range of scales. LMNN results (on MNIST data) are faster than OASIS results on subsets of the web data. However LMNN scales quadratically with the number of samples, hence is three times slower on 60K images, and may be infeasible for handling 2.3 million images. We further studied how the runtime of OASIS scales with the size of the training set. Figure 1(b) shows that the runtime of OASIS, as found by early stopping on a separate validation set, grows linearly with the train set size. We compare this to the fastest result we found in the literature, based on a fast implementation of LMNN [17]. The LMNN algorithm scales quadratically with the number of objects, although their experiments with MNIST data show that the active set of constraints grows linearly. This could be because MNIST has 10 classes only. 5 (a) 10 classes (b) 20 classes (c) 50 classes 0 10 20 30 40 50 0 0.1 0.2 0.3 0.4 0.5 number of neighbors precision Random OASIS MCML LEGO LMNN Euclidean 0 10 20 30 40 50 0 0.1 0.2 0.3 number of neighbors precision Random OASIS MCML LEGO LMNN Euclidean 0 10 20 30 40 50 0 0.1 0.2 number of neighbours precision Random OASIS LEGO LMNN Euclidean Figure 2: Comparison of the performance of OASIS, LMNN, MCML, LEGO and the Euclidean metric in feature space. Each curve shows the precision at top k as a function of k neighbors. The results are averaged across 5 train/test partitions (40 training images, 25 test images per class), error bars are standard error of the means (s.e.m.), black dashed line denotes chance performance. 4.2 Caltech256 Dataset To compare OASIS with small-scale methods we used the Caltech256 dataset [7], containing images collected from Google image search and from PicSearch.com. Images were assigned to 257 categories and evaluated by humans in order to ensure image quality and relevance. After we have pre-processed the images, and filtered images that were too small, we were left with 29461 images in 256 categories. To allow comparisons with methods that were not optimized for sparse representation, we also reduced the block vocabulary size d from 10000 to 1000. We compared OASIS with the following metric learning methods. (1) Euclidean - The standard Euclidean distance in feature space (equivalent to using the identity matrix W = Id×d). (2) MCML [5] - Learning a Mahalanobis distance such that same-class samples are mapped to the same point, formulated as a convex problem. (3) LMNN [16] - learning a Mahalanobis distance for aiming to have the k-nearest neighbors of a given sample belong to the same class while separating different-class samples by a large margin. As a preprocessing phase, images were projected to a basis of the principal components (PCA) of the data, with no dimensionality reduction. (4) LEGO [9] - Online learning of a Mahalanobis distance using a Log-Det regularization per instance loss, that is guaranteed to yield a positive semidefinite matrix. We used a variant of LEGO that, like OASIS, learns from relative distances.1 We tested all methods on subsets of classes taken from the Caltech256 repository. For OASIS, images from the same class were treated as similar. Each subset was built such that it included semantically diverse categories, controlled for classification difficulty. We tested sets containing 10, 20 and 50 classes, each spanning the range of difficulties. We used two levels of 5-fold cross validation, one to train the model, and a second to select hyper parameters of each method (early stopping time for OASIS; the ω parameter for LMNN (ω ∈{0.125, 0.25, 0.5}), and the regularization parameter η for LEGO (η ∈{0.02, 0.08, 0.32}). Results reported below were obtained by selecting the best value of the hyper parameter and then training again on the full training set (40 images per class). Figure 2 compares the precision obtained with OASIS, with the four competing approaches. OASIS achieved consistently superior results throughout the full range of k (number of neighbors) tested, and on all four sets studied. LMNN performance on the training set was often high, suggesting that it overfits the training set, as was also observed sometimes by [16]. Table 2 shows the total CPU time in minutes for training all algorithms compared, and for four subsets of classes at sizes 10, 20, 50 and 249. Data is not given when runtime was longer than 5 days or performance was worse than the Euclidean baseline. For the purpose of a fair comparison, we tested two implementations of OASIS: The first was fully implemented Matlab. The second had the core loop of the algorithm implemented in C and called from Matlab. All other methods used 1We have also experimented with the methods of [18], which we found to be too slow, and with RCA [1], whose precision was lower than other methods. These results are not included in the evaluations below. 6 Table 2: Runtime (minutes) on a standard CPU of all compared methods num OASIS OASIS MCML LEGO LMNN fastLMNN classes Matlab Matlab+C Matlab+C Matlab Matlab+C Matlab+C 10 42 ± 15 0.12 ± .03 1835 ± 210 143 ± 44 337 ± 169 247 ± 209 20 45 ± 8 0.15 ± .02 7425 ± 106 533 ± 49 631 ± 40 365 ± 62 50 25 ± 2 1.60 ± .04 711 ± 28 960 ± 80 2109 ± 67 249 485 ± 113 1.13 ± .15 code supplied by the authors implemented in Matlab, with core parts implemented in C. Due to compatibility issues, fast-LMNN was run on a different machine, and the given times are rescaled to the same time scale as all other algorithms. LEGO is fully implemented in Matlab. All other code was compiled (mex) to C. The C implementation of OASIS is significantly faster, since Matlab does not use the potential speedup gained by sparse images. OASIS is significantly faster, with a runtime that is shorter by orders of magnitudes than MCML even on small sets, and about one order of magnitude faster than LMNN. The run time of OASIS and LEGO was measured until the point of early stopping. OASIS memory requirements grow quadratically with the size of the dictionary. For a large dictionary of 10K, the parameters matrix takes 100M floats, or 0.4 Giga bytes of memory. (a) (b) 0 10 20 30 40 50 0 0.1 0.2 0.3 number of neighbors precision Random OASIS PROJ OASIS ONLINE−PROJ OASIS DISSIM−OASIS Euclidean 50K 100K 150K 200K 250K 0.18 0.2 0.22 mean average precision learning steps proj. every 5000 proj. every 50000 proj. after complete Figure 3: (a) Comparing symmetric variants of OASIS on the 20-class subset, similar results obtained with other sets. (b) mAP along training for three PSD projection schemes. 4.3 Symmetry and positivity The similarity matrix W learned by OASIS is not guaranteed to be positive or even symmetric. Some applications, like ranking images by semantic relevance to a given image query are known to be non-symmetric when based on human judgement [15]. However, in some applications symmetry or positivity constraints reflects a prior knowledge that may help in avoiding overfitting. We now discuss variants of OASIS that learn a symmetric or positive matrices. 4.3.1 Symmetric similarities A simple approach to enforce symmetry is to project the OASIS model W onto the set of symmetric matrices W′ = sym(W) = 1 2 WT + W  . Projection can be done after each update (denoted Online-Proj-Oasis) or after learning is completed (Proj-Oasis). Alternatively, the asymmetric score function SW(pi, pj) in lW can be replaced with a symmetric score S′ W(pi, pj) ≡−(pi −pj)T W (pi −pj) . (6) and used to derive an OASIS-like algorithm (which we name Dissim-Oasis). The optimal update for this loss has a symmetric gradient V′i = (pi −p+ i )(pi −p+ i )T −(pi −p− i )(pi −p− i )T . Therefore, if W0 is initialized with a symmetric matrix (e.g., the identity) all Wi are guaranteed to remain 7 symmetric. Dissim-Oasis is closely related to LMNN [16]. This can be seen be casting the batch objective of LMNN, into an online setup, which has the form err(W) = −ω · S′ W(pi, p+ i ) + (1 − ω) · l′ W(pi, p+ i , p− i ). This online version of LMNN becomes equivalent to Dissim-Oasis for ω = 0. Figure 3(a) compares the precision of the different symmetric variants with the original OASIS. All symmetric variants performed slightly worse, or equal, to the original asymmetric OASIS. The precision of Proj-Oasis was equivalent to that of OASIS, most likely since asymmetric OASIS actually converged to an almost-symmetric model (as measured by a symmetry index ρ(W) = ∥sym(W)∥2 ∥W∥2 = 0.94). 4.3.2 Positive similarity Most similarity learning approaches focus on learning metrics. In the context of OASIS, when W is positive semi definite (PSD), it defines a Mahalanobis distance over the images. The matrix squareroot of W, AT A = W can then be used to project the data into a new space in which the Euclidean distance is equivalent to the W distance in the original space. We experimented with positive variants of OASIS, where we repeatedly projected the learned model onto the set of PSD matrices, once every t iterations. Projection is done by taking the eigen decomposition W = V · D · VT where V is the eigenvector matrix and D is a the diagonal eigenvalues matrix limited to positive eigenvalues. Figure 3(b) traces precision on the test set throughout learning for various values of t. The effect of positive projections is complex. First, continuously projecting at every step helps to reduce overfitting, as can be observed by the slower decline of the blue curve (upper smooth curve) compared to the orange curve (lowest curve). However, when projection is performed after many steps, (instead of continuously), performance of the projected model actually outperforms the continuous-projection model (upper jittery curve). The reason for this effect is likely to be that estimating the positive sub-space is very noisy when only based on a few samples. Indeed, accurate estimation of the negative subspace is known to be a hard problem, in that the estimated eigenvalues of eigenvectors “near zero”, is relatively large. We found that this effect was so strong, that the optimal projection strategy is to avoid projection throughout learning completely. Instead, projecting into PSD after learning (namely, after a model was chosen using early stopping) provided the best performance in our experiments. An interesting alternative to obtain a PSD matrix was explored by [10, 9]. Using a LogDet divergence between two matrices Dld(X, Y ) = tr(XY −1) −log(det(XY −1)) ensures that, given an initial PSD matrix, all subsequent matrices will be PSD as well. It will be interesting to test the effect of using LogDet regularization in the OASIS setup. 5 Discussion We have presented OASIS, a scalable algorithm for learning image similarity that captures both semantic and visual aspects of image similarity. Three key factors contribute to the scalability of OASIS. First, using a large margin online approach allows training to converge even after seeing a small fraction of potential pairs. Second, the objective function of OASIS does not require the similarity measure to be a metric during training, although it appears to converge to a near-symmetric solution, whose positive projection is a good metric. Finally, we use a sparse representation of low level features which allows to compute scores very efficiently. OASIS learns a class-independent model: it is not aware of which queries or categories were shared by two similar images. As such, it is more limited in its descriptive power and it is likely that classdependent similarity models could improve precision. On the other hand, class-independent models could generalize to handle classes that were not observed during training, as in transfer learning. Large scale similarity learning, applied to images from a large variety of classes, could therefore be a useful tool to address real-world problems with a large number of classes. This paper focused on the training part of metric learning. To use the learned metric for ranking, an efficient procedure for scoring a large set of images is needed. Techniques based on locality-sensitive hashing could be used to speed up evaluation, but this is outside the scope of this paper. 8 References [1] A. Bar-Hillel, T. Hertz, N. Shental, and D. Weinshall. Learning Distance Functions using Equivalence Relations. In Proc. of 20th International Conference on Machine Learning (ICML), pages 11–18, 2003. [2] K. Crammer, O. Dekel, J. Keshet, S. Shalev-Shwartz, and Y. Singer. Online passive-aggressive algorithms. JMLR, 7:551–585, 2006. [3] J.V. Davis, B. Kulis, P. Jain, S. Sra, and I.S. Dhillon. Information-theoretic metric learning. In ICML 24, pages 209–216, 2007. [4] A. Frome, Y. Singer, F. Sha, and J. Malik. Learning globally-consistent local distance functions for shape-based image retrieval and classification. In International Conference on Computer Vision, pages 1–8, 2007. [5] A. Globerson and S. Roweis. Metric Learning by Collapsing Classes. NIPS, 18:451, 2006. [6] D. Grangier and S. Bengio. A discriminative kernel-based model to rank images from text queries. Transactions on Pattern Analysis and Machine Intelligence (TPAMI), 30(8):1371– 1384, 2008. [7] G. Griffin, A. Holub, and P. Perona. Caltech-256 object category dataset. Technical Report 7694, CalTech, 2007. [8] R. Hadsell, S. Chopra, and Y. LeCun. Dimensionality reduction by learning an invariant mapping. In IEEE Computer Society Conference on Computer Vision and Pattern Recognition (CVPR), volume 2, 2006. [9] P. Jain, B. Kulis, I. Dhillon, and K. Grauman. Online metric learning and fast similarity search. In NIPS, volume 22, 2008. [10] B. Kulis, M.A. Sustik, and I.S. Dhillon. Low-rank kernel learning with bregman matrix divergences. Journal of Machine Learning Research, 10:341–376, 2009. [11] G.R.G. Lanckriet, N. Cristianini, P. Bartlett, L. El Ghaoui, and M.I. Jordan. Learning the kernel matrix with semidefinite programming. JMLR, 5:27–72, 2004. [12] W. S. Noble. Multi-kernel learning for biology. In NIPS workshop on kernel learning, 2008. [13] N. Rasiwasia and N. Vasconcelos. A study of query by semantic example. In 3rd International Workshop on Semantic Learning and Applications in Multimedia, 2008. [14] R. Rosales and G. Fung. Learning sparse metrics via linear programming. In Proceedings of the 12th ACM SIGKDD international conference on Knowledge discovery and data mining, pages 367–373. ACM New York, NY, USA, 2006. [15] A. Tversky. Features of similarity. Psychological Review, 84(4):327–352, 1977. [16] K. Weinberger, J. Blitzer, and L. Saul. Distance metric learning for large margin nearest neighbor classification. NIPS, 18:1473, 2006. [17] K.Q. Weinberger and L.K. Saul. Fast solvers and efficient implementations for distance metric learning. In ICML25, pages 1160–1167, 2008. [18] E.P. Xing, A.Y. Ng, M.I. Jordan, and S. Russell. Distance metric learning with application to clustering with side-information. In S. Becker, S. Thrun, and K. Obermayer, editors, NIPS 15, pages 521–528, Cambridge, MA, 2003. MIT Press. [19] L. Yang. Distance metric learning: A comprehensive survey. Technical report, Michigan State Univ., 2006. 9
2009
234
3,742
Functional network reorganization in motor cortex can be explained by reward-modulated Hebbian learning Robert Legenstein1∗, Steven M. Chase2,3,4, Andrew B. Schwartz2,3, Wolfgang Maass1 1 Institute for Theoretical Computer Science, Graz University of Technology, Austria 2Department of Neurobiology, University of Pittsburgh 3Center for the Neural Basis of Cognition 4Department of Statistics, Carnegie Mellon University Abstract The control of neuroprosthetic devices from the activity of motor cortex neurons benefits from learning effects where the function of these neurons is adapted to the control task. It was recently shown that tuning properties of neurons in monkey motor cortex are adapted selectively in order to compensate for an erroneous interpretation of their activity. In particular, it was shown that the tuning curves of those neurons whose preferred directions had been misinterpreted changed more than those of other neurons. In this article, we show that the experimentally observed self-tuning properties of the system can be explained on the basis of a simple learning rule. This learning rule utilizes neuronal noise for exploration and performs Hebbian weight updates that are modulated by a global reward signal. In contrast to most previously proposed reward-modulatedHebbian learning rules, this rule does not require extraneous knowledge about what is noise and what is signal. The learning rule is able to optimize the performance of the model system within biologically realistic periods of time and under high noise levels. When the neuronal noise is fitted to experimental data, the model produces learning effects similar to those found in monkey experiments. 1 Introduction It is a commonly accepted hypothesis that adaptation of behavior results from changes in synaptic efficacies in the nervous system. However, there exists little knowledge about how changes in synaptic efficacies change behavior and about the learning principles that underlie such changes. Recently, one important hint has been provided in the experimental study [1] of a monkey controlling a neuroprostethic device. The monkey’s intended movement velocity vector can be extracted from the firing rates of a group of recorded units by the population vector algorithm, i.e., by computing the weighted sum of their PDs, where each weight is the unit’s normalized firing rate [2].1 In [1], this velocity vector was used to control a cursor in a 3D virtual reality environment. The task for the monkey was to move the cursor from the center of an imaginary cube to a target appearing at one of its corners. It is well known that performance increases with practice when monkeys are trained to move to targets in similar experimental setups, i.e., the function of recorded neurons is adapted such that control over the new artificial “limb” is improved [3]. In [1], it was systematically studied how such reorganization changes the tuning properties of recorded neurons. The authors manipulated the interpretation of recorded firing rates by the readout system (i.e., the system that converts firing ∗To whom correspondence should be addressed: robert.legenstein@igi.tugraz.at 1In general, a unit is not necessarily equal to a neuron in the experiments. Since the spikes of a unit are determined by a spike sorting algorithm, a unit may represent the mixed activity of several neurons. 1 rates of recorded neurons into cursor movements). When the interpretation was altered for a subset of neurons, the tuning properties of the neurons in this subset changed significantly stronger than those of neurons for which the interpretation of the readout system was not changed. Hence, the experiment showed that motor cortical neurons can change their activity specifically and selectively to compensate for an altered interpretation of their activity within some task. Such adjustment strategy is quite surprising, since it is not clear how the cortical adaption mechanism is able to determine for which subset of neurons the interpretation was altered. We refer to this learning effect as the “credit assignment” effect. In this article, we propose a simple synaptic learning rule and apply it to a model neural network. This learning rule is capable of optimizing performance in a 3D reaching task and it can explain the learning effects described in [1]. It is biologically realistic since weight changes are based exclusively on local variables and a global scalar reward signal R(t). The learning rule is rewardmodulated Hebbian in the following sense: Weight changes at synapses are driven by the correlation between a global reward signal, the presynaptic activity, and the difference of the postsynaptic potential from its recent mean (see [4] for a similar approach). Several reward-modulated Hebbian learning rules have been studied for quite some time both in the context of rate-based [5, 6, 7, 8, 4] and spiking models [9, 10, 11, 12, 13, 14, 15, 16]. They turn out to be viable learning mechanisms in many contexts and constitute a biologically plausible alternative [17, 18] to backpropagation based mechanisms preferentially used in artificial neural networks. One important feature of the learning rule proposed in this article is that noisy neuronal output is used for exploration to improve performance. It was often hypothesized that neuronal variability can optimize motor performance. For example in songbirds, syllable variability results in part from variations in the motor command, i. e. the variability of neuronal activity [19]. Furthermore, there exists evidence for the songbird system that motor variability reflects meaningful motor exploration that can support continuous learning [20]. We show that relatively high amounts of noise are beneficial for the adaptation process but not problematic for the readout system. We find that under realistic noise conditions, the learning rule produces effects surprisingly similar to those found in the experiments of [1]. Furthermore, the version of the reward-modulated Hebbian learning rule that we propose does not require extraneous information about what is noise and what is signal. Thus, we show in this study that reward-modulated learning is a possible explaination for experimental results about neuronal tuning changes in monkey pre-motor cortex. This suggests that reward-modulated learning is an important plasticity mechanism for the acquisition of goal-directed behavior. 2 Learning effects in monkey motor cortex In this section, we briefly describe the experimental results of [1] as well as the network that we used to model learning in motor cortex. Neurons in motor and premotor cortex of primates are broadly tuned to intended arm movement direction [21, 3].2 This sets the basis for the ability to extract intended arm movement from recorded neuronal activity in in these areas. The tuning curve of a direction tuned neuron is given by its firing rate as a function of movement direction. This curve can be fitted reasonably well by a cosine function. The preferred direction (PD) pi ∈R3 of a neuron i is defined as the direction in which the cosine fit to its firing rate is maximal, and the modulation depth is defined as the difference in firing rate between the maximum of the cosine fit and the baseline (mean). The experiments in [1] consisted of a sequence of four brain control sessions: Calibration, Control, Perturbation, and Washout. The tuning functions of an average of 40 recorded neurons were obtained in the Calibration session where the monkey moved its hand in a center out reaching task. Those PDs (or manipulated versions of them) were later used for decoding neural trajectories. We refer to PDs used for decoding as “decoding PDs” (dPDs) in order to distinguish them from measured PDs. In Control, Perturbation, and Washout sessions the monkey had to perform a cursor control task in a 3D virtual reality environment (see Figure 1B). The cursor was initially positioned in the center of an imaginary cube, a target position on one of the corners of the cube was randomly selected and made visible. When the monkey managed to hit the target position with the cursor or a 3s time period expired, the cursor position was reset to the origin and a new target position was randomly selected from the eight corners of the imaginary cube. In the Control session, the measured PDs were used as dPDs for cursor control. In the Perturbation session, the dPDs of a randomly selected subset of neurons (25% or 50% of the recorded neurons) were altered. This was 2Arm movement refers to movement of the endpoint of the arm. 2 input to motor cortex (t) motor cortex neurons (t) recorded neurons B A cursor velocity (t) via dPDs monkey arm velocity plastic weights w x s ij y target position cursor position direction *(t) y target Figure 1: Description of the 3D cursor control task and network model for cursor control. A) Schematic of the network model. A set of m neurons project to ntotal noisy neurons in motor cortex. The monkey arm movement was modeled by a fixed linear mapping from the activities of the modeled motor cortex neurons to the 3D velocity vector of the monkey arm. A subset of n neurons in the simulated motor cortex was recorded for cursor control. The cursor velocity was given by the population vector. B) The task was to move the cursor from the center of an imaginary cube to one of its eight corners. achieved by rotating the measured PDs by 90 degrees around the x, y, or z axes (all PDs were rotated around a single common axis in each experiment). We term these neurons rotated neurons. Other dPDs remained the same as in the Control session (non-rotated neurons). The measured PDs were used for cursor control in the subsequent Washout session. In the Perturbation session, neurons adapted their firing behavior to compensate for the altered dPDs. The authors observed differential effects of learning for the two groups of non-rotated neurons and rotated neurons. Rotated neurons tended to shift their PDs in the direction of dPD rotation, thus compensating for the perturbation. For non-rotated neurons, the change of the preferred directions was weaker and significantly less strongly biased towards the rotation direction. We refer to this differential behavior of rotated and non-rotated neurons as the “credit assignment effect”. Network and neuron model: Our aim in this article is to explain the described effects in the simplest possible model. The model consisted of two populations of neurons, see Figure 1A. The input population modeled those neurons which provide input to the neurons in motor cortex. It consisted of m = 100 neurons with activities x1(t), . . . , xm(t) ∈R. Another population modeled neurons in motor cortex which receive inputs from the input population. It consisted of ntotal = 340 neurons with activities s1(t), . . . , sntotal(t).3 All modeled motor cortex neurons were used to determine the monkey arm movement in our model. A small number of them (n = 40) modeled recorded neurons used for cursor control. We denote the activities of this subset as s1(t), . . . , sn(t). The total synaptic input ai(t) for neuron i at time t was modeled as a noisy weighted sum of its inputs: ai(t) = m X j=1 wijxj(t) + ξi(t), ξi(t) drawn from distribution D(ν), (1) where wij is the synaptic efficacy from input neuron j to neuron i. These weights were set randomly from a uniform distribution in the interval [−0.5, 0.5] at the beginning of each simulation. ξi(t) models some exploratory signal needed to explore possibly better network behaviors. In cortical neurons, this exploratory signal could for example result from neuronal or synpatic noise, or it could be spontaneous activity of the neuron. An independent sample from the zero mean distribution D(ν) was drawn as the exploratory signal ξi(t) at each time step. The parameter ν (exploration level) 3The distinction between these two layers is purely functional. Input neurons may be situated in extracortical areas, in other cortical areas, or even in motor cortex itself. The functional feature of these two populations in our model is that learning takes place solely in synapses of projections between these population since the aim of this article is to explain the learning effects in the simplest model. But in principle the same learning is applicable to multilayer networks. 3 determines the variance of the distribution and hence the amount of noise in the neuron. A nonlinear function was applied to the total synaptic input, si(t) = σ (ai(t)), to obtain the activity si(t) of neuron i at time t. We used σ : R →R is the piecewise linear activation function σ(x) = max{x, 0} in order to guarantee non-negative firing rates. Task model: We modeled the cursor control task as shown in Figure 1B. Eight possible cursor target positions were located at the corners of a unit cube in 3D space which had its center at the origin of the coordinate system. At each time step t the desired direction of cursor movement y∗(t) was computed from the current cursor and target position. By convention, the desired direction y∗(t) had unit Euclidean norm. From the desired movement direction y∗(t), the activities x1(t), . . . , xm(t) of the neurons that provide input to the motor cortex neurons were computed and the activities s1(t), . . . , sn(t) of the recorded neurons were used to determine the cursor velocity via their population activity vector (see below). In order to model the cursor control experiment, we had to determine the PDs of recorded neurons. Obviously, to determine PDs, one needs a model for monkey arm movement. In monkeys, the transformation from motor cortical activity to arm movements involves a complicated system of several synaptic stages. In our model, we treated this transformation as a black box. Experimental findings suggest that monkey arm movements can be predicted quite well by a linear model based on the activities of a small number of motor cortex neurons [3]. We therefore assumed that the direction of the monkey arm movement yarm(t) at time t can be modeled in a linear way, using the activities of the total population of the ntotal cortical neurons s1(t), . . . , sntotal(t) in our simple model and a fixed randomly chosen 3 × ntotal linear mapping Q (see [23]). With the transformation from motor cortex neurons to monkey arm movements being defined, the input to the network for a given desired direction y∗should be chosen such that motor cortex neurons produce a monkey arm movement close to the desired movement direction. We therefore calculated from the desired movement direction input activities x(t) = crate(W total)†Q†y∗(t), where Q† denotes the pseudo-inverse of Q, W total denotes the matrix of weights wij before learning, and crate scales the input activity such that the activities of the neurons in the simulated motor cortex could directly be interpreted as rates in Hz [23]. This transformation from desired directions to input neuron activities was defined initially and held fixed during each simulation because learning took place in our model in a single synaptic stage from neurons of the input population to neurons in the motor cortex population in our model and therefore the coding of desired directions did not change in the input population. As described above, a subset of the motor cortex population was chosen to model recorded neurons that were used for cursor control. For each modeled recorded neuron i ∈{1, . . . , n}, we determined the preferred direction pi ∈R3 as well as the baseline activity βi and the modulation depth αi by fitting a cosine tuning on the basis of simulated monkey arm movements [1, 23]. In the simulation of a Perturbation session, dPDs ˜pi of rotated neurons were rotated versions of the measured PDs pi (as in [1], one of the x, y, or z axis was chosen and the PDs were rotated by 90 degrees around this axis), whereas the dPDs of non-rotated neurons were identical to their measured PDs. The dPDs were then used to determine the movement velocity y(t) of the cursor by the population vector algorithm [1, 2, 23]. This decoding strategy is consistent with an interpretation of the neural activity which codes for the velocity of the movement. 3 Adaptation with an online learning rule Adaptation of synaptic efficacies wij from input neurons to neurons in motor cortex is necessary if the actual decoding PDs ˜pi do not produce optimal cursor trajectories. Assume that suboptimal dPDs ˜p1, . . . , ˜pn are used for decoding. Then for some input x(t), the movement of the cursor is not in the desired direction y∗(t). The weights wij should therefore be adapted such that at every time step t the direction of movement y(t) is close to the desired direction y∗(t). We can quantify the angular match Rang(t) at time t by the cosine of the angle between movement direction y(t) and desired direction y∗(t): Rang(t) = y(t)T y∗(t) ||y(t)||·||y∗(t)||. This measure has a value of 1 if the cursor moves exactly in the desired direction, it is 0 if the cursor moves perpendicular to the desired direction, and it is -1 if the cursor movement is in the opposite direction. We assume in our model that all synapses receive information about a global reward R(t). The general idea that a neuromodulatory signal gates local synaptic plasticity was studied in [4]. In that 4 study, the idea was implemented by learning rules where the weight changes are proportional to the covariance between the reward signal R and some measure of neuronal activity N at the synapse. Here, N could correspond to the presynaptic activity, the postsynaptic activity, or the product of both. The authors showed that such learning rules can explain a phenomenon called Herrnstein’s matching law. Interestingly, for the analysis in [4] the specific implementation of this correlation based adaptation mechanism is not important. We investigate in this article a learning rule of this type: EH rule: ∆wij(t) = η xj(t) [ai(t) −¯ai(t)]  R(t) −¯R(t)  , (2) where ¯ai(t) and ¯R(t) denote the low-pass filtered version of ai(t) and R(t) with an exponential kernel4. We refer to this rule as the exploratory Hebb rule (EH rule) in this article. The important feature of this learning rule is that apart from variables which are locally available for each neuron (xj(t), ai(t), ¯ai(t)), only a single scalar signal, R(t), is needed to evaluate performance.5 The reward signal R(t) is provided by some neural circuit which evaluates performance of the system. In our simulations, we simply used the angular match Rang(t) as this reward signal. Weight updates of the rule are based on correlations between deviations of the reward signal R(t) and the activation ai(t) from their means. It adjusts weights such that rewards above mean are reinforced. The EH rule (2) approximates gradient ascent on the reward signal by exploring alternatives to the actual behavior with the help of some exploratory signal ξ(t). The deviation of the activation from the recent mean ai(t) −¯ai(t) is an estimate of the exploratory term ξi(t) at time t if the mean ¯ai(t) is based on neuron activations P j wijxj(t′) which are similar to the activation P j wijxj(t) at time t. Here we make use of (1) the fact that weights are changing very slowly and (2) the continuity of the task (inputs x at successive time points are similar). Then, (2) can be seen as an approximation of ∆wij(t) = η xj(t)ξi(t)  R(t) −¯R(t)  . (3) This rule is a typical node-perturbation learning rule [6, 7, 22, 10] which can be shown to approximate gradient ascent, see e.g. [10]. A simple derivation that shows the link between the EH rule (2) and gradient ascent is given in [23]. The EH learning rule differs from other node-perturbation rules in an important aspect. In many node-perturbation learning rules, the noise needs to be accessible to the learning mechanism separately from the output signal. For example, in [6] and [7] binary neurons were used. The weight updates there depend on the probability of the neuron to output 1. In [10] the noise term is directly incorporated in the learning rule. The EH rule does not directly need the noise signal. Instead a temporally filtered version of the neurons activation is used to estimate the noise signal. Obviously, this estimate is only sufficiently accurate if the input to the neuron is temporally stable on small time scales. 4 Comparison with experimentally observed learning effects In this section, we explore the EH rule (2) in a cursor control task that was modeled to closely match the experimental setup in [1]. Each simulated session consisted of a sequence of movements from the center to a target position at one of the corners of the imaginary cube, with online weight updates during the movements. In monkey experiments, perturbation of decoding PDs lead to retuning of PDs with the above described credit assignment effect [1]. In order to obtain biologically plausible values for the noise distribution in our neuron model, the noise in our model was fitted to data from experiments (see [23]). Analysis of the neuronal responses in the experiments showed that the variance of the response for a given desired direction scaled roughly linearly with the mean firing rate of that neuron for this direction. We obtained this behavior with our neuron model with noise that is a mixture of an activation-independent noise source and a noise source where the variance scales linearly with the activation of the neuron. In particular, the noise term ξi(t) of neuron i was drawn from the uniform distribution in [−νi(x(t)), νi(x(t))] with an exploration level νi given by νi(x(t)) = 10 + 2.8 r σ Pm j=1 wijxj(t)  . The constants where chosen fit neuron behavior in the data. We note that in all simulations with the EH rule, the input activities xj(t) were scaled in such a way that the output of the neuron at time t could be interpreted directly as the firing rate of the neuron 4We used ¯ai(t) = 0.8¯ai(t −1) + 0.2ai(t) and ¯R(t) = 0.8 ¯R(t −1) + 0.2R(t) 5A rule where the activation ai is replaced by the output si and obtained very similar results. 5 0 200 0.5 0.75 1 t [sec] ang. match R(t) A B C Figure 2: One example simulation of the 50% perturbation experiment with the EH rule and dataderived network parameters. A) Angular match Rang as a function of learning time. Every 100th time point is plotted. B) PD shifts drawn on the unit sphere (arbitrary units) for non-rotated (black traces) and rotated (light cyan traces) neurons from their initial values (light) to their values after training (dark, these PDs are connected by the shortest path on the unit sphere). The straight line indicates the rotation axis. C) Same as B, but the view was altered such that the rotation axis is directed towards the reader. The PDs of rotated neurons are consistently rotated in order to compensate for the perturbation. −60 −30 0 30 60 90 −60 −30 0 30 60 Shift along perturbation direction [°] Shift perp. to perturbation direction [°] A 25% perturbation −60 −30 0 30 60 90 −60 −30 0 30 60 Shift along perturbation direction [°] 50% perturbation B non−rotated rotated Figure 3: PD shifts in simulated Perturbation sessions are in good agreement with experimental results (compare to Figure 3A,B in [1]). Shift in the PDs measured after simulated perturbation sessions relative to initial PDs for all units in 20 simulated experiments where 25% (A) or 50% (B) of the units were rotated. Dots represent individual data points and black circled dots represent the means of rotated (light gray) and non-rotated (dark gray) units. at time t. With such scaling, we obtained output values of the neurons without the exploratory signal in the range of 0 to 120Hz with a roughly exponential distribution. Having estimated the variability of neuronal response, the learning rate η remained the last free parameter of the model. To constrain this parameter, η was chosen such that the performance in the 25% perturbation task approximately matched the monkey performance. We simulated the two types of perturbation experiments reported in [1] in our model network with 40 recorded neurons. In the first set of simulations, a random set of 25% of recorded neurons were rotated neurons in Perturbation sessions. In the second set of simulations, we chose 50 % of the recorded neurons to be rotated. In each simulation, 320 targets were presented to the model, which is similar to the number of target presentations in [1]. Results for one example run are shown in Figure 2. The shifts in PDs of recorded neurons induced by training in 20 independent trials were compiled and analyzed separately for rotated neurons and non-rotated neurons. The results are in good agreement with the experimental data, see Figure 3. In the simulated 25% perturbation 6 experiment, the mean shift of the PD for rotated neurons was 8.2 ± 4.8 degrees, whereas for nonrotated neurons, it was 5.5±1.6 degrees. This relatively small effect is similar to the effect observed in [1] where the PD shift of rotated (non-rotated) units was 9.9 (5.2) degrees. The effect is more pronounced in the 50% perturbation experiment (see below). We also compared the deviation of the movement trajectory from the ideal straight line in rotation direction half way to the target6 from early trials to the deviation of late trials, where we scaled the results to a cube of 11cm side length in order to be able to compare the results directly to the results in [1]. In early trials, the trajectory deviation was 9.2 ± 8.8mm, which was reduced by learning to 2.4 ± 4.9mm. In the simulated 50% perturbation experiment, the mean shift of the PD for rotated neurons was 18.1 ± 4.2 degrees, whereas for non-rotated neurons, it was 12.1 ± 2.6 degrees (in monkey experiments [1] this was 21.7 and 16.1 degrees respectively). The trajectory deviation was 23.1 ± 7.5mm in early trials, and 4.8 ± 5.1mm in late trials. Here, the early deviation was stronger than in the monkey experiment, while the late deviation was smaller. The EH rule (2) falls into the general class of correlation-based learning rules described in [4]. In these rules the weight change is proportional to the covariance of the reward signal and some measure of neuronal activity. We performed the same experiment with slightly different correlationbased rules ∆wij(t) = η xj(t)ai(t)  R(t) −¯R(t)  , (4) ∆wij(t) = η xj(t) [ai(t) −¯ai(t)] R(t), (5) (compare to (2)). The performance improvements were similar to those obtaint with the EH rule. However, no credit assignment effect was observed with these rules. In the simulated 50% perturbation experiment, the mean shift of the PD of rotated neurons (non-rotated neurons) was 12.8 ± 3.6 (12.0 ± 2.4) degrees for rule (4) and 25.5 ± 4 (26.8 ± 2.8) degrees for rule (5). In the monkey experiment, training in the Perturbation session also induced in a decrease of the modulation depth of rotated neurons. This resulted in a decreased contribution of these neurons to the cursor movement. We observed a qualitatively similar resultin our simulations. In the 25% perturbation simulation, modulation depths decreased on average by 2.7±4.3Hz for rotated neurons. Modulation depths for non-rotated neurons increased on average by 2.2 ± 3.9Hz (average over 20 independent simulations). In the 50% perturbation simulation, the changes in modulation depths were −3, 6 ± 5.5Hz for rotated neurons and 5.4 ± 6Hz for non-rotated neurons.7 Thus, the relative contribution of rotated neurons on cursor movement decreased. Comparing the results obtained by our simulations to those of monkey experiments (compare Figure 3 to Figure 3 in [1]), it is interesting that quantitatively similar effects were obtained when noise level and learning rate was constrained by the experimental data. One should note here that tuning changes due to learning depend on the noise level. For small exploration levels, PDs changed only slightly and the difference in PD change between rotated and non-rotated neurons was small, while for large noise levels, PD change differences can be quite drastic. Also the learning rate η influences the amount of PD shift differences with higher learning rates leading to stronger credit assignment effects, see [23] for details. The performance of the system before and after learning is shown in Figure 4. The neurons in the network after training are subject to the same amount of noise as the neurons in the network before training, but the angular match after training shows much less fluctuation than before training. Hence, the network automatically suppresses jitter on the trajectory in the presence of high exploration levels ν. We quantified this observation by computing the standard deviation of the angle between the cursor velocity vector and the desired movement direction for 100 randomly drawn noise samples.8 The mean standard deviation for 50 randomly drawn target directions was always decreased by learning. In the mean over the 20 simulations, the mean STD over 50 target directions was 7.9 degrees before learning and 6.3 degrees after learning. Hence, the network not only adapted its response to the input, it also found a way to optimize its sensitivity to the exploratory signal. 6These deviations were computed as described in [1] 7When comparing these results to experimental results, one has to take into account the modulation depths in monkey experiments were around 10Hz whereas in the simulations, they were around 25Hz 8This effect is not caused by a larger norm of the weight vectors. The comparison was done with weight vectors after training normalized to their L2 norm before training. 7 0 1 2 3 0 0.5 1 t [sec] ang. match R(t) before learning after learning Figure 4: Network performance before and after learning for 50% perturbation. Angular match Rang(t) of the cursor movements in one reaching trial before (gray) and after (black) learning as a function of the time since the target was first made visible. The black curve ends prematurely because the target was reached faster. After learning temporal jitter of the performance was reduced, indicating reduced sensitivity to noise. 5 Discussion Jarosiewicz et al. [1] discussed three strategies that could potentially be used by the monkey to compensate for the errors caused by perturbations: re-aiming, re-weighting, and re-mapping. Using the re-aiming strategy, the monkey compensates for perturbations by aiming for a virtual target located in the direction that offsets the visuomotor rotation. The authors identified a global change in the activity level of all neurons. This indicates a re-aiming strategy of the monkey. Re-weighting would suppress the use of rotated units, leading to a reduction of their modulation depths. A reduction of modulation depths of rotated neurons was also identified in the experimentals. A re-mapping strategy would selectively change the directional tunings of rotated units. Rotated neurons shifted their PDs more than the non-rotated population in the experiments. Hence, the authors found elements of all three strategies in their data. These three elements of neuronal adaptation were also identified in our model: a global change in activity of neurons (all neurons changed their tuning properties; reaiming), a reduction of modulation depths for rotated neurons (re-weighting), and a selective change of the directional tunings of rotated units (re-mapping). This modeling study therefore suggests that all three elements can be explained by a single synaptic adaptation strategy that relies on noisy neuronal activity and visual feedback that is made accessible to all synapses in the network by a global reward signal. It is noteworthy that the credit assignment phenomenon is an emergent feature of the learning rule rather than implemented in some direct way. Intuitively, this behavior can be explained in the following way. The output of non-rotated neurons is consistent with the interpretation of the readout system. So if this output is strongly altered, performance will likely drop. On the other hand, if the output of a rotated neuron is radically different, this will often improve performance. Hence, the relatively high noise levels measured in experiments are probably important for the credit assignment phenomenon. Under such realistic noise conditions, our model produced effects surprisingly similar to those found in the monkey experiments. Thus, this study shows that reward-modulated learning can explain detailed experimental results about neuronal adaptation in motor cortex and therefore suggests that reward-modulated learning is an essential plasticity mechanism in cortex. The results of this modeling paper also support the hypotheses introduced in [24]. The authors presented data which suggests that neural representations change randomly (background changes) even without obvious learning, while systematic task-correlated representational changes occur within a learning task. Reward-modulated Hebbian learning rules are currently the most promising candidate for a learning mechanism that can support goal-directed behavior by local synaptic changes in combination with a global performance signal. The EH rule (2) is one particularly simple instance of such rules that exploits temporal continuity of inputs and an exploration signal - a signal which would show up as “noise” in neuronal recordings. We showed that large exploration levels are beneficial for learning while they do not interfere with the performance of the system because of pooling effects of readout elements. This study therefore provides a hypothesis about the role of “noise” or ongoing activity in cortical circuits as a source for exploration utilized by local learning rules. Acknowledgments This work was supported by the Austrian Science Fund FWF [S9102-N13, to R.L. and W.M.]; the European Union [FP6-015879 (FACETS), FP7-216593 (SECO), FP7-506778 (PASCAL2), FP7231267 (ORGANIC) to R.L. and W.M.]; and by the National Institutes of Health [R01-NS050256, EB005847, to A.B.S.]. 8 References [1] B. Jarosiewicz, S. M. Chase, G. W. Fraser, M. Velliste, R. E. Kass, and A. B. Schwartz. Functional network reorganization during learning in a brain-computer interface paradigm. Proc. Nat. Acad. Sci. USA, 105(49):19486–91, 2008. [2] A. P. Georgopoulos, R. E. Ketner, and A. B. Schwartz. Primate motor cortex and free arm movements to visual targets in three- dimensional space. ii. coding of the direction of movement by a neuronal population. J. Neurosci., 8:2928–2937, 1988. [3] A. B. Schwartz. Useful signals from motor cortex. J. Physiology, 579:581–601, 2007. [4] Y. Loewenstein and H. S. Seung. Operant matching is a generic outcome of synaptic plasticity based on the covariance between reward and neural activity. Proc. Nat. Acad. Sci. USA, 103(41):15224–15229, 2006. [5] A. G. Barto, R. S. Sutton, and C. W. Anderson. Neuronlike adaptive elements that can solve difficult learning control problems. IEEE Trans. Syst. Man Cybern., SMC-13(5):834–846, 1983. [6] P. Mazzoni, R. A. Andersen, and M. I. Jordan. A more biologically plausible learning rule for neural networks. Proc. Nat. Acad. Sci. USA, 88(10):4433–4437, 1991. [7] R. J. Williams. Simple statistical gradient-following algorithms for connectionist reinforcement learning. Machine Learning, 8:229–256, 1992. [8] J. Baxter and P. L. Bartlett. Direct gradient-based reinforcement learning: I. gradient estimation algorithms. Technical report, Research School of Information Sciences and Engineering, Australian National University, 1999. [9] X. Xie and H. S. Seung. Learning in neural networks by reinforcement of irregular spiking. Phys. Rev. E, 69(041909), 2004. [10] I. R. Fiete and H. S. Seung. Gradient learning in spiking neural networks by dynamic perturbation of conductances. Phys. Rev. Lett., 97(4):048104–1 to 048104–4, 2006. [11] J.-P. Pfister, T. Toyoizumi, D. Barber, and W. Gerstner. Optimal spike-timing-dependent plasticity for precise action potential firing in supervised learning. Neural Computation, 18(6):1318–1348, 2006. [12] E. M. Izhikevich. Solving the distal reward problem through linkage of STDP and dopamine signaling. Cerebral Cortex, 17:2443–2452, 2007. [13] D. Baras and R. Meir. Reinforcement learning, spike-time-dependent plasticity, and the bcm rule. Neural Computation, 19(8):2245–2279, 2007. [14] R. V. Florian. Reinforcement learning through modulation of spike-timing-dependent synaptic plasticity. Neural Computation, 6:1468–1502, 2007. [15] M. A. Farries and A. L. Fairhall. Reinforcement learning with modulated spike timing-dependent synaptic plasticity. J. Neurophys., 98:3648–3665, 2007. [16] R. Legenstein, D. Pecevski, and W. Maass. A learning theory for reward-modulated spike-timingdependent plasticity with application to biofeedback. PLoS Computational Biology, 4(10):1–27, 2008. [17] C. H. Bailey, M. Giustetto, Y.-Y. Huang, R. D. Hawkins, and E. R. Kandel. Is heterosynaptic modulation essential for stabilizing Hebbian plasticity and memory? Nat. Rev. Neurosci., 1:11–20, 2000. [18] Q. Gu. Neuromodulatory transmitter systems in the cortex and their role in cortical plasticity. Neuroscience, 111(4):815–835, 2002. [19] Samuel J. Sober, Melville J. Wohlgemuth, and Michael S. Brainard. Central contributions to acoustic variation in birdsong. J. Neurosci., 28(41):10370–9, 2008. [20] E. C. Tumer and M. S. Brainard. Performance variability enables adaptive plasticity of ‘crystallized’ adult birdsong. Nature, 250(7173):1240–1244, 2007. [21] A. P. Georgopoulos, A. P. Schwartz, and R. E. Ketner. Neuronal population coding of movement direction. Science, 233:1416–1419, 1986. [22] J. Baxter and P. L. Bartlett. Infinite-horizon policy-gradient estimation. J. Artif. Intell. Res., 15:319–350, 2001. [23] R. Legenstein, S. M. Chase, A. B. Schwartz, and W. Maass. A reward-modulated hebbian learning rule can explain experimentally observed network reorganization in a brain control task. Submitted for publication, 2009. [24] U. Rokni, A G. Richardson, E. Bizzi, and H. S. Seung. Motor learning with unstable neural representations. Neuron, 54:653–666, 2007. 9
2009
235
3,743
The Infinite Partially Observable Markov Decision Process Finale Doshi-Velez Cambridge University Cambridge, CB21PZ, UK finale@alum.mit.edu Abstract The Partially Observable Markov Decision Process (POMDP) framework has proven useful in planning domains where agents must balance actions that provide knowledge and actions that provide reward. Unfortunately, most POMDPs are complex structures with a large number of parameters. In many real-world problems, both the structure and the parameters are difficult to specify from domain knowledge alone. Recent work in Bayesian reinforcement learning has made headway in learning POMDP models; however, this work has largely focused on learning the parameters of the POMDP model. We define an infinite POMDP (iPOMDP) model that does not require knowledge of the size of the state space; instead, it assumes that the number of visited states will grow as the agent explores its world and only models visited states explicitly. We demonstrate the iPOMDP on several standard problems. 1 Introduction The Partially Observable Markov Decision Process (POMDP) model has proven attractive in domains where agents must reason in the face of uncertainty because it provides a framework for agents to compare the values of actions that gather information and actions that provide immediate reward. Unfortunately, modelling real-world problems as POMDPs typically requires a domain expert to specify both the structure of the problem and a large number of associated parameters, and both of which are often difficult tasks. Current methods in reinforcement learning (RL) focus on learning the parameters online, that is, while the agent is acting in its environment. Bayesian RL [1, 2, 3] has recently received attention because it allows the agent to reason both about uncertainty in its model of the environment and uncertainty within environment itself. However, these methods also tend to focus on learning parameters of an environment rather than the structure. In the context of POMDP learning, several algorithms [4, 5, 6, 7] have applied Bayesian methods to reason about the unknown model parameters. All of these approaches provide the agent with the size of the underlying state space and focus on learning the transition and observation1 dynamics for each state. Even when the size of the state space is known, however, just making the agent reason about a large number of unknown parameters at the beginning of the learning process is fraught with difficulties. The agent has insufficient experience to fit a large number of parameters, and therefore much of the model will be highly uncertain. Trying to plan under vast model uncertainty often requires significant computational resources; moreover, the computations are often wasted effort when the agent has very little data. Using a point estimate of the model instead—that is, ignoring the model uncertainty—can be highly inaccurate if the expert’s prior assumptions are a poor match for the true model. 1[7] also learns rewards. 1 We propose a nonparametric approach to modelling the structure of the underlying space— specifically, the number of states in the agent’s world—which allows the agent to start with a simple model and grow it with experience. Building on the infinite hidden Markov model (iHMM) [8], the infinite POMDP (iPOMDP) model posits that the environment contains of an unbounded number of states. The agent is expected to stay in a local region; however, as time passes, it may explore states that it has not visited before. Initially, the agent will infer simple, local models of the environment corresponding to its limited experience (also conducive to fast planning). It will dynamically add structure as it accumulates evidence for more complex models. Finally, a data-driven approach to structure discovery allows the agent to agglomerate states with identical dynamics (see section 4 for a toy example). 2 The Infinite POMDP Model A POMDP consists of the n-tuple {S,A,O,T,Ω,R,γ}. S, A, and O are s st t−1 rt ot at Figure 1: A time-slice of the POMDP model. sets of states, actions, and observations. The transition function T(s′|s, a) defines the distribution over next-states s′ to which the agent may transition after taking action a from state s. The observation function Ω(o|s′, a) is a distribution over observations o that may occur in state s′ after taking action a. The reward function R(s, a) specifies the immediate reward for each state-action pair (see figure 1 for a slice of the graphical model). The factor γ ∈[0, 1) weighs the importance of current and future rewards. We focus on discrete state and observation spaces (generalising to continuous observations is straightforward) and finite action spaces. The size of the state space is unknown and potentially unbounded. The transitions, observations, and rewards are modelled with an iHMM. The Infinite Hidden Markov Model A standard hidden Markov model (HMM) consists of the ntuple {S,O,T,Ω}, where the transition T(s′|s) and observation Ω(o|s′) distributions only depend on the hidden state. When the number of hidden states is finite and discrete, Dirichlet distributions may be used as priors over the transition and observation distributions. The iHMM [9] uses a hierarchical Dirichlet Process (HDP) to define a prior over HMMs where the number of underlying states is unbounded.2 To generate a model from the iHMM prior, we: 1. Draw the mean transition distribution ¯T ∼Stick(λ). 2. Draw observations Ω(·|s, a) ∼H for each s, a. 3. Draw transitions T(·|s, a) ∼DP(α, ¯T) for each s, a. where λ is the DP concentration parameter and H is a prior over observation distributions. For example, if the observations are discrete, then H could be a Dirichlet distribution. Intuitively, the first two steps define the observation distribution and an overall popularity for each state. The second step uses these overall state popularities to define individual state transition distributions. More formally, the first two steps involve a draw G0 ∼DP(λ, H), where the atoms of G0 are Ω, and ¯T are the associated stick-lengths.3 Recall that in the stick breaking procedure, the sth stick-length, ¯Ts, is given by vs Qs−1 i=1 (1 −vi), where vi ∼Beta(1, λ). While the number of states is unbounded, ¯Ts decreases exponentially with s, meaning that “later” states are less popular. This construction of ¯Ts also ensures that P∞ s ¯Ts = 1. The top part of figure 2 shows a cartoon of a few elements of ¯T and Ω. The second step of the iHMM construction involves defining the transition distributions T(·|s) ∼ DP(α, ¯T) for each state s, where α, the concentration parameter for the DP, determines how closely the sampled distribution T(·|s) matches the mean transition distribution ¯T. Because ¯T puts higher probabilities on states with smaller indices, T(s′|s) will also generally put more mass on earlier s′ (see lower rows of figure 2). Thus, the generating process encodes a notion that the agent will spend most of its time in some local region. However, the longer the agent acts in this infinite space, the more likely it is to transition to somewhere new. 2The iHMM models in [8] and [9] are formally equivalent [10]. 3A detailed description of DPs and HDPs is beyond the scope of this paper; please refer to [11] for background on Dirichlet processes and [9] for an overview of HDPs. 2 Infinite POMDPs To extend the iHMM framework to Τ1 Τ2 Τ3 Τ4 ... ... Τ Τ 1: 2: Ω Ω 2 3 Ω1 Ω4 ... G0 ... Figure 2: iHMM: The first row shows each state’s observation distribution Ωs and the mean transition distribution ¯T. Later rows show each state’s transition distribution. iPOMDPs, we must incorporate actions and rewards into the generative model. To incorporate actions, we draw an observation distribution Ω(·|s, a) ∼H for each action a and each state s. Similarly, during the second step of the generative process, we draw a transition distribution T(s′|s, a) ∼ DP(α, ¯T) for each state-action pair.4 HMMs have one output—observations—while POMDPs also output rewards. We treat rewards as a secondary set of observations. For this work, we assume that the set of possible reward values is given, and we use a multinomial distribution to describe the probability R(r|s, a) of observing reward r after taking action a in state s. As with the observations, the reward distributions R are drawn from Dirichlet distribution HR. We use multinomial distributions for convenience; however, other reward distributions (such as Gaussians) are easily incorporate in this framework. In summary, the iPOMDP prior requires that we specify • a set of actions A and observations O, • a generating distribution H for the observation distributions and HR for the rewards (these generating distributions can have any form; the choice will depend on the application), • a mean transition concentration factor λ and a state transition concentration factor α, and • a discount factor γ. To sample a model from the iPOMDP prior, we first sample the mean transition distribution ¯T ∼ Stick(λ). Next, for each state s and action a, we sample • T(·|s, a) ∼DP(α, ¯T) , • Ω(·|s, a) ∼H, • R(·|s, a) ∼HR. Samples from the iPOMDP prior have an infinite number of states, but fortunately all of these states do not need to be explicitly represented. During a finite lifetime the agent can only visit a finite number of states, and thus the agent can only make inferences about a finite number of states. The remaining (infinite) states are equivalent from agent’s perspective, as, in expectation, these states will exhibit the mean dynamics of the prior. Thus, the only parts of the infinite model that need to be initialised are those corresponding to the states the agent has visited as well as a catch-all state representing all other states. In reality, of course, the agent does not know the states it has visited: we discuss joint inference over the unknown state history and the model in section 3.1. 3 Planning As in the standard Bayesian RL framework, we recast the problem of POMDP learning as planning in a larger ‘model-uncertainty’ POMDP in which both the true model and the true state are unknown. We outline below our procedure for planning in this joint space of POMDP models and unknown states and the detail each step—belief monitoring and action-selection—in sections 3.1 and 3.2. Because the true state is hidden, the agent must choose its actions based only on past actions and observations. Normally the best action to take at time t depends on the entire history of actions and observations that the agent has taken so far. However, the probability distribution over current states, known as the belief, is a sufficient statistic for a history of actions and observations. In discrete state spaces, the belief at time t + 1 can be computed from the previous belief, bt, the last action a, and observation o, by the following application of Bayes rule: ba,o t+1(s)=Ω(o|s, a) X s′∈S T(s|s′, a)bt(s′)/Pr(o|b, a), (1) 4We use the same base measure H to draw all observation distributions; however, a separate measures Ha could be used for each action if one had prior knowledge about the expected observation distribution for reach action. Likewise, one could also draw a separate ¯ Ta for each action. 3 where Pr(o|b, a)=P s′∈S Ω(o|s′, a)P s∈S T(s′|s, a)bt(s). However, it is intractable to express the joint belief b over models and states with a closed-form expression. We approximate the belief b with a set of sampled models m = {T, Ω, R}, each with weight w(m). Each model sample m maintains a belief over states bm(s). The states are discrete, and thus the belief bm(s) can be updated using equation 1. Details for sampling the models m are described in section 3.1. Given the belief, the agent must choose what action to choose next. One approach is to solve the planning problem offline, that is, determine a good action for every possible belief. If the goal is to maximize the expected discounted reward, then the optimal policy is given by: Vt(b) = max a∈A Qt(b, a), (2) Qt(b, a) = R(b, a) + γ X o∈O Pr(o|b, a)Vt(ba,o), (3) where the value function V (b) is the expected discounted reward that an agent will receive if its current belief is b and Q(b, a) is the value of taking action a in belief b. The exact solution to equation 3 is only tractable for tiny problems, but many approximation methods [12, 13, 14] have been developed to solve POMDPs offline. While we might hope to solve equation 3 over the state space of a single model, it is intractable to solve over the joint space of states and infinite models—the model space is so large that standard point-based approximations will generally fail. Moreover, it makes little sense to find the optimal policy for all models when only a few models are likely. Therefore, instead of solving 3 offline, we build a forward-looking search tree at each time step (see [15] for a review of forward search in POMDPs). The tree computes the value of action by investigating a number of steps into the future. The details of the action selection are discussed in section 3.2. 3.1 Belief Monitoring As outlined in section 3, we approximate the joint belief over states and models through a set of samples. In this section, we describe a procedure for sampling a set of models m = {T, Ω, R} from the true belief, or posterior, over models.5 These samples can then be used to approximate various integrations over models that occur during planning; in the limit of infinite samples, the approximations will be guaranteed to converge to their true values. To simplify matters, we assume that given a model m, it is tractable to maintain a closed-form belief bm(s) over states using equation 1. Thus, models need to be sampled, but beliefs do not. Suppose we have a set of models m that have been drawn from the belief at time t. To get a set of models drawn from the belief at time t+1, we can either draw the models directly from the new belief or adjust the weights on the model set at time t so that they now provide an accurate representation of the belief at time t + 1. Adjusting the weights is computationally most straightforward: directly following belief update equation 1, the importance weight w(m) on model m is given by: wa,o t+1(m) ∝Ω(o|m, a)wt(m), (4) where Ω(o|m, a)=P s∈S Ω(o|s, m, a)bm(s), and we have used T(m′|m, a) = δm(m′) because the true model does not change. The advantage of simply reweighting the samples is that the belief update is extremely fast. However, new experience may quickly render all of the current model samples unlikely. Therefore, we must periodically resample a new set of models directly from the current belief. The beam-sampling approach of [16] is an efficient method for drawing samples from an iHMM posterior. We adapt this approach to allow for observations with different temporal shifts (since the reward rt depends on the state st, whereas the observation ot is conditioned on the state st+1) and for transitions indexed by both the current state and the most recent action. The correctness of our sampler follows directly from the correctness of the beam sampler [16]. The beam-sampler is an auxiliary variable method that draws samples from the iPOMDP posterior. A detailed description of beam sampling is beyond the scope of this paper; however, we outline the general procedure below. The inference alternates between three phases: 5We will use the words posterior and belief interchangeably; both refer to the probability distribution over the hidden state given some initial belief (or prior) and the history of actions and observations. 4 • Sampling slice variables to limit trajectories to a finite number of hidden states. Given a transition model T and a state trajectory {s1, s2, . . .}, an auxiliary variable ut ∼Uniform([0, min(T(·|st, a))]) is sampled for each time t. The final column k of the transition matrix is extended via additional stick-breaking until max(T(sk|s, a)) < ut.). Only transitions T(s′|s, a) > ut are considered for inference at time t.6 • Sampling a hidden state trajectory. Now that we have a finite model, we apply forward filtering-backward sampling (FFBS) [18] to sample the underlying state sequence. • Sampling a model. Given a trajectory over hidden states, transition, observation, and reward distributions are sampled for the visited states (it only makes sense to sample distributions for visited states, as we do not have information about unvisited states). In this finite setting, we can resample the transitions T(·|s, a) using standard Dirichlet posteriors: T(·|s, a) ∼Dirichlet(T sa 1 + nsa 1 , T sa 2 + nsa 2 , ..., T sa k + nsa k , ∞ X i=k+1 T sa i ), (5) where k is the number of active or used states, T sa i is the prior probability of transitioning to state i from state s after taking action a, and nsa i is the number of observed transitions to state i from s after a. The observations and rewards are resampled in a similar manner: for example, if the observations are discrete with Dirichlet priors: Ω(·|s, a) ∼Dirichlet(H1 + no1sa, H2 + no2sa, ..., H|O| + no|O|sa). (6) As with all MCMC methods, initial samples (from the burn-in period) are biased by sampler’s start position; only after the sampler has mixed will the samples be representative of the true posterior. Finally, we emphasize that the approach outline above is a sampling approach and not a maximum likelihood estimator; thus the samples, drawn from the agent’s belief, capture the variation over possible models. The representation of the belief is necessarily approximate due to our use of samples, but the samples are drawn from the true current belief—no other approximations have been made. Specifically, we are not filtering: each run of the beam sampler produces samples from the current belief. Because they are drawn from the true posterior, all samples have equal weight. 3.2 Action Selection Given a set of models, we apply a stochastic forward search in the model-space to choose an action. The general idea behind forward search [15] is to use a forward-looking tree to compute actionvalues. Starting from the agent’s current belief, the tree branches on each action the agent might take and each observation the agent might see. At each action node, the agent computes its expected immediate reward R(a) = Em[Es|m[R(·|s, a)]]. From equation 3, the value of taking action a in belief b is Q(a, b) = R(a, b) + γ X o Ω(o|b, a) max a′ Q(a′, bao) (7) where bao is the agent’s belief after taking action a and seeing observation o from belief b. Because action selection must be completed online, we use equation 4 to update the belief over models via the weights w(m). Equation 7 is evaluated recursively for each Q(a′, bao) up to some depth D. The number of evaluations grows with (|A||O|)D, so doing a full expansion is feasible only for very small problems. We approximate the true value stochastically by sampling only a few observations from the distribution P(o|a) = P m P(o|a, m)w(m). Equation 7 reduces to Q(a, b) = R(a, b) + γ 1 NO X i max a′ Q(a′, baoi) (8) where NO is the number of sampled observations and oi is the ith sampled observation. Once we reach a prespecified depth in the tree, we must approximate the value of the leaves. For each model m in the leaves, we can compute the value Q(a, bm, m) of the action a by approximately 6For an introduction to slice sampling, refer to [17]. 5 solving offline the POMDP model that m represents. We approximate the value of action a as Q(a, b) ≈ X m w(m)Q(a, bm, m). (9) This approximation is always an overestimate of the value, as it assumes that the uncertainty over models—but not the uncertainty over states—will be resolved in the following time step (similar to the QMDP [19] assumption).7 As the iPOMDP posterior becomes peaked and the uncertainty over models decreases, the approximation becomes more exact. The quality of the action selection largely follows from the bounds presented in [20] for planning through forward search. The key difference is that now our belief representation is particle-based; during the forward search we approximate an expected rewards over all possible models with rewards from the particles in our set. Because we can guarantee that our models are drawn from the true posterior over models, this approach is a standard Monte Carlo approximation of the expectation. Thus, we can apply the central limit theorem to state that the estimated expected rewards will be distributed around the true expectation with approximately normal noise N(0, σ2 n ), where n is the number of POMDP samples and σ2 is a problem-specific variance. 4 Experiments We begin with a series of illustrative examples demonstrating the properties of the iPOMDP. In all experiments, the observations were given vague hyperparameters (1.0 Dirichlet counts per element), and rewards were given hyperparameters that encouraged peaked distributions (0.1 Dirichlet counts per element). The small counts on the reward hyperparameters encoded the prior belief that R(·|s, a) is highly peaked, that is, each state-action pair will likely have one associated reward value. Beliefs were approximated with sample set of 10 models. Models were resampled between episodes and reweighted during episodes. A burn-in of 500 iterations was used for the beam sampler when drawing these models directly from the belief. The forward-search was expanded to a depth of 3. Loopworld S G Lineworld S G . (a) Cartoon of Models 10 20 30 40 50 60 70 80 90 100 0 2 4 6 8 10 12 Number of States Number of States in Lineworld POMDP 10 20 30 40 50 60 70 80 90 100 0 2 4 6 8 10 12 Number of States Episode Number Number of States in Loopworld POMDP (b) Evolution of state size Learned Optimal 4 4.5 5 5.5 6 Total Reward Total Reward in Lineworld POMDP Learned Optimal −6 −4 −2 0 Total Reward Total Reward in Loopworld POMDP (c) Performance Figure 3: Various comparisons of the lineworld and loopworld models. Loopworld infers only necessary states, ignoring the more complex (but irrelevant) structure. Avoiding unnecessary structure: Lineworld and Loopworld. We designed a pair of simple environments to show how the iPOMDP infers states only as it can distinguish them. The first, lineworld was a length-six corridor in which the agent could either travel left or right. Loopworld consisted of a corridor with a series of loops (see figure 3(a)); now the agent could travel though the upper or lower branches. In both environments, only the two ends of the corridors had unique observations. 7We also experimented with approximating Q(a, b) ≈80 −percentile({w(m)Q(a, bm,m )}). Taking a higher percentile ranking as the approximate value places a higher value on actions with larger uncertainty. As the values of the actions become more well known and the discrepancies between the models decreases, this criterion reduces to the true value of the action. 6 Actions produced the desired effect with probability 0.95, observations were correct with probability 0.85 (that is, 15% of the time the agent saw an incorrect observation). The agent started at the left end of the corridor and received a reward of -1 until it reached the opposite end (reward 10). The agent eventually infers that the lineworld environment consists of six states—based on the number of steps it requires to reach the goal—although in the early stages of learning it infers distinct states only for the ends of the corridor and groups the middle region as one state. The loopworld agent also shows a growth in the number of states over time (see figure 3(b)), but it never infers separate states for the identical upper and lower branches. By inferring states as they needed to explain its observations—instead of relying on a prespecified number of states—the agent avoided the need to consider irrelevant structure in the environment. Figure 3(c) shows that the agent (unsurprisingly) learns optimal performance in both environments. Adapting to new situations: Tiger-3. The iPOMDP’s flexibility also lets it adapt to new situations. In the tiger-3 domain, a variant of the tiger problem [19] the agent had to choose one of three doors to open. Two doors had tigers behind them (r = −100) and one door had a small reward (r = 10). At each time step, the agent could either open a door or listen for the “quiet” door. It heard the correct door correctly with probability 0.85. The reward was unlikely to be behind the third door (p = .2), 0 50 100 150 200 250 −140 −120 −100 −80 −60 −40 Averaged Reward Episode Count Evolution of Reward Figure 4: Evolution of reward from tiger-3. but during the first 100 episodes, we artificially ensured that the reward was always behind doors 1 or 2. The improving rewards in figure 4 show the agent steadily learning the dynamics of its world; it learned never to open door 3. The dip in 4 following episode 100 occurs when we next allowed the reward to be behind all three doors, but the agent quickly adapts to the new possible state of its environment. The iPOMDP enabled the agent to first adapt quickly to its simplified environment but add complexity when it was needed. Broader Evaluation. We next completed a set of experiments on POMDP problems from the literature. Tests had 200 episodes of learning, which interleaved acting and resampling models, and 100 episodes of testing with the models fixed. During learning, actions were chosen stochastically based on its value with probability 0.05 and completely randomly with probability 0.01. Otherwise, they were chosen greedily (we found this small amount of randomness was needed for exploration to overcome our very small sample set and search depths). We compared accrued rewards and running times for the iPOMDP agent against (1) an agent that knew the state count and used EM to train its model, (2) an agent that knew the state count and that used the same forward-filtering backward-sampling (FFBS) algorithm used in the beam sampling inner loop to sample models, and (3) an agent that used FFBS with ten times the true number of states. For situations where the number of states is not known, the last case is particularly interesting—we show that simply overestimating the number of states is not necessarily the most efficient solution. Table 1 summarises the results. We see that the iPOMDP often infers a smaller number of states than the true count, ignoring distinctions that the history does not support. The middle three columns show the speeds of the three controls relative the iPOMDP. Because the iPOMDP generally uses smaller state spaces, we see that most of these values are greater than 1, indicating the iPOMDP is faster. (In the largest problem, dialog, the oversized FFBS model did not complete running in several days.) The latter four columns show accumulated rewards; we see that the iPOMDP is generally on par or better than the methods that have access to the true state space size. Finally, figure 5 plots the learning curve for one of problems, shuttle. 5 Discussion Recent work in learning POMDP models include[23], which uses a set of Gaussian approximations to allow for analytic value function updates in the POMDP space, and [5], which jointly reasons over the space Dirichlet parameter and states when planning in discrete POMDPs. Sampling based approaches include Medusa [4], which learns using state-queries, and [7], which learns using policy 7 0 50 100 150 200 −20 −15 −10 −5 0 5 10 Episode Count Total Reward Evolution of Total Reward for Shuttle Learned Optimal −20 −15 −10 −5 0 5 10 Final Reward for Shuttle Figure 5: Evolution of reward for shuttle. During training (left), we see that the agent makes fewer mistakes toward the end of the period. The boxplots on the right show rewards for 100 trials after learning has stopped; we see the iPOMDP-agent’s reward distribution over these 100 trials is almost identical an agent who had access to the correct model. Table 1: Inferred states and performance for various problems. The iPOMDP agent (FFBS-Inf) often performs nearly as well as the agents who had knowledge of the true number of states (EMtrue, FFBS-true), learning the necessary number of states much faster than an agent for which we overestimate the number of states (FFBS-big). Metric States Relative Training Time Performance Problem True FFBSInf EMtrue FFBStrue FFBSbig EMtrue FFBStrue FFBSbig FFBSInf Tiger[19] 2 2.1 0.41 0.70 1.50 -277 0.49 4.24 4.06 Shuttle[21] 8 2.1 1.82 1.02 3.56 10 10 10 10 Network[19] 7 4.36 1.56 1.09 4.82 1857 7267 6843 6508 Gridworld[19] (adapted) 26 7.36 3.57 2.48 59.1 -25 -51 -67 -13 Dialog[22] (adapted) 51 2 0.67 5.15 -3023 -1326 -1009 queries. All of these approaches assume that the number of underlying states is known; all but [7] focus on learning only the transition and observation models. In many problems, however, the underlying number of states may not be known—or may require significant prior knowledge to model—and, from the perspective of performance, is irrelevant. The iPOMDP model allows the agent to adaptively choose the complexity of the model; any expert knowledge is incorporated into the prior: for example, the Dirichlet counts on observation parameters can be used to give preference to certain observations as well as encode whether we expect observations to have low or high noise. As seen in the results, the iPOMDP allows the complexity of the model to scale gracefully with the agent’s experience. Future work remains to tailor the planning to unbounded spaces and refine the inference for POMDP resampling. Past work has attempted to take advantage of structure in POMDPs [24, 25], but learning that structure has remained an open problem. By giving the agent an unbounded state space—but strong locality priors—the iPOMDP provides one principled framework to learning POMDP structure. Moreover, the hierarchical Dirichlet process construction described in section 2 can be extended to include more structure and deeper hierarchies in the transitions. 6 Conclusion We presented the infinite POMDP, a new model for Bayesian RL in partially observable domains. The iPOMDP provides a principled framework for an agent to posit more complex models of its world as it gains more experience. By linking the complexity of the model to the agent’s experience, the agent is not forced to consider large uncertainties—which can be computationally prohibitive— near the beginning of the planning process, but it can later come up with accurate models of the world when it requires them. An interesting question may also to apply these methods to learning large MDP models within the Bayes-Adaptive MDP framework [26]. 8 References [1] R. Dearden, N. Friedman, and D. Andre, “Model based Bayesian exploration,” pp. 150–159, 1999. [2] M. Strens, “A Bayesian framework for reinforcement learning,” in ICML, 2000. [3] P. Poupart, N. Vlassis, J. Hoey, and K. Regan, “An analytic solution to discrete Bayesian reinforcement learning,” in ICML, (New York, NY, USA), pp. 697–704, ACM Press, 2006. [4] R. Jaulmes, J. Pineau, and D. Precup, “Learning in non-stationary partially observable Markov decision processes,” ECML Workshop, 2005. [5] S. Ross, B. Chaib-draa, and J. Pineau, “Bayes-adaptive POMDPs,” in Neural Information Processing Systems (NIPS), 2008. [6] S. Ross, B. Chaib-draa, and J. Pineau, “Bayesian reinforcement learning in continuous POMDPs with application to robot navigation,” in ICRA, 2008. [7] F. Doshi, J. Pineau, and N. Roy, “Reinforcement learning with limited reinforcement: Using Bayes risk for active learning in POMDPs,” in International Conference on Machine Learning, vol. 25, 2008. [8] M. J. Beal, Z. Ghahramani, and C. E. Rasmussen, “The infinite hidden Markov model,” in Machine Learning, pp. 29–245, MIT Press, 2002. [9] Y. W. Teh, M. I. Jordan, M. J. Beal, and D. M. Blei, “Hierarchical Dirichlet processes,” Journal of the American Statistical Association, vol. 101, no. 476, pp. 1566–1581, 2006. [10] J. V. Gael and Z. Ghahramani, Inference and Learning in Dynamic Models, ch. Nonparametric Hidden Markov Models. Cambridge University Press, 2010. [11] Y. W. Teh, “Dirichlet processes.” Submitted to Encyclopedia of Machine Learning, 2007. [12] J. Pineau, G. Gordon, and S. Thrun, “Point-based value iteration: An anytime algorithm for POMDPs,” IJCAI, 2003. [13] M. T. J. Spaan and N. Vlassis, “Perseus: Randomized point-based value iteration for POMDPs,” Journal of Artificial Intelligence Research, vol. 24, pp. 195–220, 2005. [14] T. Smith and R. Simmons, “Heuristic search value iteration for POMDPs,” in Proc. of UAI 2004, (Banff, Alberta), 2004. [15] S. Ross, J. Pineau, S. Paquet, and B. Chaib-Draa, “Online planning algorithms for POMDPs,” Journal of Artificial Intelligence Research, vol. 32, pp. 663–704, July 2008. [16] J. van Gael, Y. Saatci, Y. W. Teh, and Z. Ghahramani, “Beam sampling for the infinite hidden Markov model,” in ICML, vol. 25, 2008. [17] R. Neal, “Slice sampling,” Annals of Statistics, vol. 31, pp. 705–767, 2000. [18] C. K. Carter and R. Kohn, “On Gibbs sampling for state space models,” Biometrika, vol. 81, pp. 541–553, September 1994. [19] M. L. Littman, A. R. Cassandra, and L. P. Kaelbling, “Learning policies for partially observable environments: scaling up,” ICML, 1995. [20] D. McAllester and S. Singh, “Approximate planning for factored POMDPs using belief state simplification,” in UAI 15, 1999. [21] L. Chrisman, “Reinforcement learning with perceptual aliasing: The perceptual distinctions approach,” in In Proceedings of the Tenth National Conference on Artificial Intelligence, pp. 183–188, AAAI Press, 1992. [22] F. Doshi and N. Roy, “Efficient model learning for dialog management,” in Proceedings of Human-Robot Interaction (HRI 2007), (Washington, DC), March 2007. [23] P. Poupart and N. Vlassis, “Model-based Bayesian reinforcement learning in partially observable domains,” in ISAIM, 2008. [24] J. H. Robert, R. St-aubin, A. Hu, and C. Boutilier, “SPUDD: Stochastic planning using decision diagrams,” in UAI, pp. 279–288, 1999. [25] A. P. Wolfe, “POMDP homomorphisms,” in NIPS RL Workshop, 2006. [26] M. O. Duff, Optimal learning: computational procedures for Bayes-adaptive markov decision processes. PhD thesis, 2002. 9
2009
236
3,744
Accelerated Gradient Methods for Stochastic Optimization and Online Learning Chonghai Hu♯†, James T. Kwok♯, Weike Pan♯ ♯Department of Computer Science and Engineering Hong Kong University of Science and Technology Clear Water Bay, Kowloon, Hong Kong † Department of Mathematics, Zhejiang University Hangzhou, China hino.hu@gmail.com, {jamesk,weikep}@cse.ust.hk Abstract Regularized risk minimization often involves non-smooth optimization, either because of the loss function (e.g., hinge loss) or the regularizer (e.g., ℓ1-regularizer). Gradient methods, though highly scalable and easy to implement, are known to converge slowly. In this paper, we develop a novel accelerated gradient method for stochastic optimization while still preserving their computational simplicity and scalability. The proposed algorithm, called SAGE (Stochastic Accelerated GradiEnt), exhibits fast convergence rates on stochastic composite optimization with convex or strongly convex objectives. Experimental results show that SAGE is faster than recent (sub)gradient methods including FOLOS, SMIDAS and SCD. Moreover, SAGE can also be extended for online learning, resulting in a simple algorithm but with the best regret bounds currently known for these problems. 1 Introduction Risk minimization is at the heart of many machine learning algorithms. Given a class of models parameterized by w and a loss function ℓ(·, ·), the goal is to minimize EXY [ℓ(w; X, Y )] w.r.t. w, where the expectation is over the joint distribution of input X and output Y . However, since the joint distribution is typically unknown in practice, a surrogate problem is to replace the expectation by its empirical average on a training sample {(x1, y1), . . . , (xm, ym)}. Moreover, a regularizer Ω(·) is often added for well-posedness. This leads to the minimization of the regularized risk min w 1 m m X i=1 ℓ(w; xi, yi) + λΩ(w), (1) where λ is a regularization parameter. In optimization terminology, the deterministic optimization problem in (1) can be considered as a sample average approximation (SAA) of the corresponding stochastic optimization problem: min w EXY [ℓ(w; X, Y )] + λΩ(w). (2) Since both ℓ(·, ·) and Ω(·) are typically convex, (1) is a convex optimization problem which can be conveniently solved even with standard off-the-shelf optimization packages. However, with the proliferation of data-intensive applications in the text and web domains, data sets with millions or trillions of samples are nowadays not uncommon. Hence, off-the-shelf optimization solvers are too slow to be used. Indeed, even tailor-made softwares for specific models, such as the sequential minimization optimization (SMO) method for the SVM, have superlinear computational 1 complexities and thus are not feasible for large data sets. In light of this, the use of stochastic methods have recently drawn a lot of interest and many of these are highly successful. Most are based on (variants of) the stochastic gradient descent (SGD). Examples include Pegasos [1], SGD-QN [2], FOLOS [3], and stochastic coordinate descent (SCD) [4]. The main advantages of these methods are that they are simple to implement, have low per-iteration complexity, and can scale up to large data sets. Their runtime is independent of, or even decrease with, the number of training samples [5, 6]. On the other hand, because of their simplicity, these methods have a slow convergence rate, and thus may require a large number of iterations. While standard gradient schemes have a slow convergence rate, they can often be “accelerated”. This stems from the pioneering work of Nesterov in 1983 [7], which is a deterministic algorithm for smooth optimization. Recently, it is also extended for composite optimization, where the objective has a smooth component and a non-smooth component [8, 9]. This is particularly relevant to machine learning since the loss ℓand regularizer Ωin (2) may be non-smooth. Examples include loss functions such as the commonly-used hinge loss used in the SVM, and regularizers such as the popular ℓ1 penalty in Lasso [10], and basis pursuit. These accelerated gradient methods have also been successfully applied in the optimization problems of multiple kernel learning [11] and trace norm minimization [12]. Very recently, Lan [13] made an initial attempt to further extend this for stochastic composite optimization, and obtained the convergence rate of O  L/N 2 + (M + σ)/ √ N  . (3) Here, N is the number of iterations performed by the algorithm, L is the Lipschitz parameter of the gradient of the smooth term in the objective, M is the Lipschitz parameter of the nonsmooth term, and σ is the variance of the stochastic subgradient. Moreover, note that the first term of (3) is related to the smooth component in the objective while the second term is related to the nonsmooth component. Complexity results [14, 13] show that (3) is the optimal convergence rate for any iterative algorithm solving stochastic (general) convex composite optimization. However, as pointed out in [15], a very useful property that can improve the convergence rates in machine learning optimization problems is strong convexity. For example, (2) can be strongly convex either because of the strong convexity of ℓ(e.g., log loss, square loss) or Ω(e.g., ℓ2 regularization). On the other hand, [13] is more interested in general convex optimization problems and so strong convexity is not utilized. Moreover, though theoretically interesting, [13] may be of limited practical use as (1) the stepsize in its update rule depends on the often unknown σ; and (2) the number of iterations performed by the algorithm has to be fixed in advance. Inspired by the successes of Nesterov’s method, we develop in this paper a novel accelerated subgradient scheme for stochastic composite optimization. It achieves the optimal convergence rate of O  L/N 2 + σ/ √ N  for general convex objectives, and O (L + µ)/N 2 + σµ−1/N  for µstrongly convex objectives. Moreover, its per-iteration complexity is almost as low as that for standard (sub)gradient methods. Finally, we also extend the accelerated gradient scheme to online learning. We obtain O( √ N) regret for general convex problems and O(log N) regret for strongly convex problems, which are the best regret bounds currently known for these problems. 2 Setting and Mathematical Background First, we recapitulate a few notions in convex analysis. (Lipschitz continuity) A function f(x) is L-Lipschitz if ∥f(x) −f(y)∥≤L∥x −y∥. Lemma 1. [14] The gradient of a differentiable function f(x) is Lipschitz continuous with Lipschitz parameter L if, for any x and y, f(y) ≤f(x) + ⟨∇f(x), y −x⟩+ L 2 ∥x −y∥2. (4) (Strong convexity) A function φ(x) is µ-strongly convex if φ(y) ≥φ(x)+⟨g(x), y−x⟩+ µ 2 ∥y−x∥2 for any x, y and subgradient g(x) ∈∂φ(x). Lemma 2. [14] Let φ(x) be µ-strongly convex and x∗= arg minx φ(x). Then, for any x, φ(x) ≥φ(x∗) + µ 2 ∥x −x∗∥2. (5) 2 We consider the following stochastic convex stochastic optimization problem, with a composite objective function min x {φ(x) ≡E[F(x, ξ)] + ψ(x)}, (6) where ξ is a random vector, f(x) ≡E[F(x, ξ)] is convex and differentiable, and ψ(x) is convex but non-smooth. Clearly, this includes the optimization problem (2). Moreover, we assume that the gradient of f(x) is L-Lipschitz and φ(x) is µ-strongly convex (with µ ≥0). Note that when φ(x) is smooth (ψ(x) = 0), µ lower bounds the smallest eigenvalue of its Hessian. Recall that in smooth optimization, the gradient update xt+1 = xt −λ∇f(xt) on a function f(x) can be seen as proximal regularization of the linearized f at the current iterate xt [16]. In other words, xt+1 = arg minx(⟨∇f(xt), x −xt⟩+ 1 2λ∥x −xt∥2). With the presence of a non-smooth component, we have the following more general notion. (Gradient mapping) [8] In minimizing f(x) + ψ(x), where f is convex and differentiable and ψ is convex and non-smooth, xt+1 = arg min x  ⟨∇f(x), x −xt⟩+ 1 2λ∥x −xt∥2 + ψ(x)  (7) is called the generalized gradient update, and δ = 1 λ(xt −xt+1) is the (generalized) gradient mapping. Note that the quadratic approximation is made to the smooth component only. It can be shown that the gradient mapping is analogous to the gradient in smooth convex optimization [14, 8]. This is also a common construct used in recent stochastic subgradient methods [3, 17]. 3 Accelerated Gradient Method for Stochastic Learning Let G(xt, ξt) ≡∇xF(x, ξt)|x=xt be the stochastic gradient of F(x, ξt). We assume that it is an unbiased estimator of the gradient ∇f(x), i.e., Eξ[G(x, ξ)] = ∇f(x). Algorithm 1 shows the proposed algorithm, which will be called SAGE (Stochastic Accelerated GradiEnt). It involves the updating of three sequences {xt}, {yt} and {zt}. Note that yt is the generalized gradient update, and xt+1 is a convex combination of yt and zt. The algorithm also maintains two parameter sequences {αt} and {Lt}. We will see in Section 3.1 that different settings of these parameters lead to different convergence rates. Note that the only expensive step of Algorithm 1 is the computation of the generalized gradient update yt, which is analogous to the subgradient computation in other subgradient-based methods. In general, its computational complexity depends on the structure of ψ(x). As will be seen in Section 3.3, this can often be efficiently obtained in many regularized risk minimization problems. Algorithm 1 SAGE (Stochastic Accelerated GradiEnt). Input: Sequences {Lt} and {αt}. Initialize: y−1 = z−1 = 0, α0 = λ0 = 1. L0 = L + µ. for t = 0 to N do xt = (1 −αt)yt−1 + αtzt−1. yt = arg minx  ⟨G(xt, ξt), x −xt⟩+ Lt 2 ∥x −xt∥2 + ψ(x) . zt = zt−1 −(Ltαt + µ)−1[Lt(xt −yt) + µ(zt−1 −xt)]. end for Output yN. 3.1 Convergence Analysis Define ∆t ≡G(xt, ξt) −∇f(xt). Because of the unbiasedness of G(xt, ξt), Eξt[∆t] = 0. In the following, we will show that the value of φ(yt) −φ(x) can be related to that of φ(yt−1) −φ(x) for any x. Let δt ≡Lt(xt −yt) be the gradient mapping involved in updating yt. First, we introduce the following lemma. Lemma 3. For t ≥0, φ(x) is quadratically bounded from below as φ(x) ≥φ(yt) + ⟨δt, x −xt⟩+ µ 2 ∥x −xt∥2 + ⟨∆t, yt −x⟩+ 2Lt −L 2L2 t ∥δt∥2. 3 Proposition 1. Assume that for each t ≥0, ∥∆t∥∗≤σ and Lt > L, then φ(yt) −φ(x) + Ltα2 t + µαt 2 ∥x −zt∥2 ≤(1 −αt)[φ(yt−1) −φ(x)] + Ltα2 t 2 ∥x −zt−1∥2 + σ2 2(Lt −L) + αt⟨∆t, x −zt−1⟩. (8) Proof. Define Vt(x) = ⟨δt, x −xt⟩+ µ 2 ∥x −xt∥2 + Ltαt 2 ∥x −zt−1∥2. It is easy to see that zt = arg minx∈Rd Vt(x). Moreover, notice that Vt(x) is (Ltαt + µ)-strongly convex. Hence on applying Lemmas 2 and 3, we obtain that for any x, Vt(zt) ≤Vt(x) −Ltαt + µ 2 ∥x −zt∥2 = ⟨δt, x −xt⟩+ µ 2 ∥x −xt∥2 + Ltαt 2 ∥x −zt−1∥2 −Ltαt + µ 2 ∥x −zt∥2 ≤φ(x)−φ(yt)−2Lt−L 2L2 t ∥δt∥2+ Ltαt 2 ∥x−zt−1∥2−Ltαt+µ 2 ∥x−zt∥2+⟨∆t, x−yt⟩. Then, φ(yt) can be bounded from above, as: φ(yt) ≤φ(x) + ⟨δt, xt −zt⟩−2Lt −L 2L2 t ∥δt∥2 −Ltαt 2 ∥zt −zt−1∥2 + Ltαt 2 ∥x −zt−1∥2 −Ltαt + µ 2 ∥x −zt∥2 + ⟨∆t, x −yt⟩, (9) where the non-positive term −µ 2 ∥zt −xt∥2 has been dropped from its right-hand-side. On the other hand, by applying Lemma 3 with x = yt−1, we get φ(yt) −φ(yt−1) ≤⟨δt, xt −yt−1⟩+ ⟨∆t, yt−1 −yt⟩−2Lt −L 2L2 t ∥δt∥2, (10) where the non-positive term −µ 2 ∥yt−1 −xt∥2 has also been dropped from the right-hand-side. On multiplying (9) by αt and (10) by 1 −αt, and then adding them together, we obtain φ(yt)−φ(x) ≤(1−αt)[φ(yt−1)−φ(x)]−2Lt −L 2L2 t ∥δt∥2 +A+B+C −Ltα2 t 2 ∥zt −zt−1∥2, (11) where A = ⟨δt, αt(xt −zt) + (1 −αt)(xt −yt−1)⟩, B = αt⟨∆t, x −yt⟩+ (1 −αt)⟨∆t, yt−1 −yt⟩, and C = Ltα2 t 2 ∥x −zt−1∥2 −Ltα2 t +µαt 2 ∥x −zt∥2. In the following, we consider to upper bound A and B. First, by using the update rule of xt in Algorithm 1 and the Young’s inequality1, we have A = ⟨δt, αt(xt −zt−1) + (1 −αt)(xt −yt−1)⟩+ αt⟨δt, zt−1 −zt⟩ = αt⟨δt, zt−1 −zt⟩≤Ltα2 t 2 ∥zt −zt−1∥2 + ∥δt∥2 2Lt . (12) On the other hand, B can be bounded as B = ⟨∆t, αtx + (1 −αt)yt−1 −xt⟩+ ⟨∆t, xt −yt⟩= αt⟨∆t, x −zt−1⟩+ ⟨∆t, δt⟩ Lt ≤αt⟨∆t, x −zt−1⟩+ σ∥δt∥ Lt , (13) where the second equality is due to the update rule of xt, and the last step is from the CauchySchwartz inequality and the boundedness of ∆t. Hence, plugging (12) and (13) into (11), φ(yt) −φ(x) ≤(1−αt)[φ(yt−1)−φ(x)]−(Lt−L)∥δt∥2 2L2 t + σ∥δt∥ Lt + αt⟨∆t, x−zt−1⟩+ C ≤(1 −αt)[φ(yt−1) −φ(x)] + σ2 2(Lt −L) + αt⟨∆t, x −zt−1⟩+ C, where the last step is due to the fact that −ax2 + bx ≤b2 4a with a, b > 0. On re-arranging terms, we obtain (8). 1The Young’s inequality states that ⟨x, y⟩≤∥x∥2 2a + a∥y∥2 2 for any a > 0. 4 Let the optimal solution in problem (6) be x∗. From the update rules in Algorithm 1, we observe that the triplet (xt, yt−1, zt−1) depends on the random process ξ[t−1] ≡{ξ0, . . . , ξt−1} and hence is also random. Clearly, zt−1 and x∗are independent of ξt. Thus, Eξ[t]⟨∆t, x∗−zt−1⟩ = Eξ[t−1]Eξ[t][⟨∆t, x∗−zt−1⟩|ξ[t−1]] = Eξ[t−1]Eξt[⟨∆t, x∗−zt−1⟩] = Eξ[t−1]⟨x∗−zt−1, Eξt[∆t]⟩= 0, where the first equality uses Ex[h(x)] = EyEx[h(x)|y], and the last equality is from our assumption that the stochastic gradient G(x, ξ) is unbiased. Taking expectations on both sides of (8) with x = x∗, we obtain the following corollary, which will be useful in proving the subsequent theorems. Corollary 1. E[φ(yt)] −φ(x∗) + Ltα2 t + µαt 2 E[∥x∗−zt∥2] ≤(1 −αt)(E[φ(yt−1)] −φ(x∗)) + Ltα2 t 2 E[∥x∗−zt−1∥2] + σ2 2(Lt −L). So far, the choice of Lt and αt in Algorithm 1 has been left unspecified. In the following, we will show that with a good choice of Lt and αt, (the expectation of) φ(yt) converges rapidly to φ(x∗). Theorem 1. Assume that E[∥x∗−zt∥2] ≤D2 for some D. Set Lt = b(t + 1) 3 2 + L, αt = 2 t + 2, (14) where b > 0 is a constant. Then the expected error of Algorithm 1 can be bounded as E[φ(yN)] −φ(x∗) ≤3D2L N 2 +  3D2b + 5σ2 3b  1 √ N . (15) If σ were known, we can set b to the optimal choice of √ 5σ 3D , and the bound in (15) becomes 3D2L N2 + 2 √ 5σD √ N . Note that so far φ(x) is only assumed to be convex. As is shown in the following theorem, the convergence rate can be further improved by assuming strong convexity. This also requires another setting of αt and Lt which is different from that in (14). Theorem 2. Assume the same conditions as in Theorem 1, except that φ(x) is µ-strongly convex. Set Lt = L + µλ−1 t−1, for t ≥1; αt = s λt−1 + λ2 t−1 4 −λt−1 2 , for t ≥1, (16) where λt ≡Πt k=1(1 −αt) for t ≥1 and λ0 = 1. Then, the expected error of Algorithm 1 can be bounded as E[φ(yN)] −φ(x∗) ≤2(L + µ)D2 N 2 + 6σ2 Nµ. (17) In comparison, FOLOS only converges as O(log(N)/N) for strongly convex objectives. 3.2 Remarks As in recent studies on stochastic composite optimization [13], the error bounds in (15) and (17) consist of two terms: a faster term which is related to the smooth component and a slower term related to the non-smooth component. SAGE benefits from using the structure of the problem and accelerates the convergence of the smooth component. On the other hand, many stochastic (sub)gradient-based algorithms like FOLOS do not separate the smooth from the non-smooth part, but simply treat the whole objective as non-smooth. Consequently, convergence of the smooth component is also slowed down to O(1/ √ N). As can be seen from (15) and (17), the convergence of SAGE is essentially encumbered by the variance of the stochastic subgradient. Recall that the variance of the average of p i.i.d. random 5 variables is equal to 1/p of the original variance. Hence, as in Pegasos [1], σ can be reduced by estimating the subgradient from a data subset. Unlike the AC-SA algorithm in [13], the settings of Lt and αt in (14) do not require knowledge of σ and the number of iterations, both of which can be difficult to estimate in practice. Moreover, with the use of a sparsity-promoting ψ(x), SAGE can produce a sparse solution (as will be experimentally demonstrated in Section 5) while AC-SA cannot. This is because in SAGE, the output yt is obtained from a generalized gradient update. With a sparsity-promoting ψ(x), this reduces to a (soft) thresholding step, and thus ensures a sparse solution. On the other hand, in each iteration of AC-SA, its output is a convex combination of two other variables. Unfortunately, adding two vectors is unlikely to produce a sparse vector. 3.3 Efficient Computation of yt The computational efficiency of Algorithm 1 hinges on the efficient computation of yt. Recall that yt is just the generalized gradient update, and so is not significantly more expensive than the gradient update in traditional algorithms. Indeed, the generalized gradient update is often a central component in various optimization and machine learning algorithms. In particular, Duchi and Singer [3] showed how this can be efficiently computed with the various smooth and non-smooth regularizers, including the ℓ1, ℓ2, ℓ2 2, ℓ∞, Berhu and matrix norms. Interested readers are referred to [3] for details. 4 Accelerated Gradient Method for Online Learning In this section, we extend the proposed accelerated gradient scheme for online learning of (2). The algorithm, shown in Algorithm 2, is similar to the stochastic version in Algorithm 1. Algorithm 2 SAGE-based Online Learning Algorithm. Inputs: Sequences {Lt} and {αt}, where Lt > L and 0 < αt < 1. Initialize: z1 = y1. loop xt = (1 −αt)yt−1 + αtzt−1. Output yt = arg minx  ⟨∇ft−1(xt), x −xt⟩+ Lt 2 ∥x −xt∥2 + ψ(x) . zt = zt−1 −αt(Lt + µαt)−1[Lt(xt −yt) + µ(zt−1 −xt)]. end loop First, we introduce the following lemma, which plays a similar role as its stochastic counterpart of Lemma 3. Moreover, let δt ≡Lt(xt −yt) be the gradient mapping related to the updating of yt. Lemma 4. For t > 1, φt(x) can be quadratically bounded from below as φt−1(x) ≥φt−1(yt) + ⟨δt, x −xt⟩+ µ 2 ∥x −xt∥2 + 2Lt −L 2L2 t ∥δt∥2. Proposition 2. For any x and t ≥1, assume that there exists a subgradient ˆg(x) ∈∂ψ(x) such that ∥∇ft(x) + ˆg(x)∥∗≤Q. Then for Algorithm 2, φt−1(yt−1) −φt−1(x) ≤ Q2 2(1 −αt)(Lt −L) + Lt 2αt ∥x −zt−1∥2 −Lt + µαt 2αt ∥x −zt∥2 + (1 −α2 t )Lt −αt(1 −αt)L 2 ∥yt−1 −zt−1∥2 −Lt 2 ∥zt −yt∥2. (18) Proof Sketch. Define τt = Ltα−1 t . From the update rule of zt, one can check that zt = arg min x Vt(x) ≡⟨δt, x −xt⟩+ µ 2 ∥x −xt∥2 + τt 2 ∥x −zt−1∥2. Similar to the analysis in obtaining (9), we can obtain φt−1(yt)−φt−1(x)≤⟨δt, xt−zt⟩−2Lt−L 2L2 t ∥δt∥2−τt 2 ∥zt−zt−1∥2+τt 2 ∥x−zt−1∥2−τt+µ 2 ∥x−zt∥2. (19) 6 On the other hand, ⟨δt, xt −zt⟩−∥δt∥2 2Lt = Lt 2 (∥zt −xt∥2 −∥zt −yt∥2) ≤Lt 2αt ∥zt −zt−1∥2 + Lt(1 −αt) 2 ∥zt−1 −yt−1∥2 −Lt 2 ∥zt −yt∥2, (20) on using the convexity of ∥· ∥2. Using (20), the inequality (19) becomes φt−1(yt) −φt−1(x) ≤Lt(1 −αt) 2 ∥zt−1 −yt−1∥2 −Lt 2 ∥zt −yt∥2 −Lt −L 2L2 t ∥δt∥2 + τt 2 ∥x −zt−1∥2 −τt + µ 2 ∥x −zt∥2. (21) On the other hand, by the convexity of φt−1(x) and the Young’s inequality, we have φt−1(yt−1) −φt−1(yt) ≤⟨∇ft−1(yt−1) + ˆgt−1(yt−1), yt−1 −yt⟩ ≤ Q2 2(1 −αt)(Lt −L) + (1 −αt)(Lt −L) 2 ∥yt−1 −yt∥2. (22) Moreover, by using the update rule of xt and the convexity of ∥· ∥2, we have ∥yt−1 −yt∥2 = ∥(yt−1 −xt) + (xt −yt)∥2 = ∥αt(yt−1 −zt−1) + (xt −yt)∥2 ≤αt∥yt−1 −zt−1∥2 + (1 −αt)−1∥xt −yt∥2 = αt∥yt−1 −zt−1∥2 + ∥δt∥2 (1 −αt)L2 t . (23) On using (23), it follows from (22) that φt−1(yt−1) −φt−1(yt) ≤ Q2 2(1−αt)(Lt−L) + αt(1−αt)(Lt−L) 2 ∥yt−1−zt−1∥2 + Lt−L 2L2 t ∥δt∥2. Inequality (18) then follows immediately by adding this to (21). Theorem 3. Assume that µ = 0, and ∥x∗−zt∥≤D for t ≥1. Set αt = a and Lt = aL√t −1+L, where a ∈(0, 1) is a constant. Then the regret of Algorithm 2 can be bounded as N X t=1 [φt(yt) −φt(x∗)] ≤LD2 2a + LD2 2 + Q2 a(1 −a)L  √ N. Theorem 4. Assume that µ > 0, and ∥x∗−zt∥≤D for t ≥1. Set αt = a, and Lt = aµt + L + a−1(µ −L)+, where a ∈(0, 1) is a constant. Then the regret of Algorithm 2 can be bounded as N X t=1 [φt(yt) −φt(x∗)] ≤ (2a + a−1)µ + L 2a  D2 + Q2 2a(1 −a)µ log(N + 1). In particular, with a = 1 2, the regret bound reduces to 3µ 2 + L  D2 + 2Q2 µ log(N + 1). 5 Experiments In this section, we perform experiments on the stochastic optimization of (2). Two data sets are used2 (Table 1). The first one is the pcmac data set, which is a subset of the 20-newsgroup data set from [18], while the second one is the RCV1 data set, which is a filtered collection of the Reuters RCV1 from [19]. We choose the square loss for ℓ(·, ·) and the ℓ1 regularizer for Ω(·) in (2). As discussed in Section 3.3 and [3], the generalized gradient update can be efficiently computed by soft thresholding in this case. Moreover, we do not use strong convexity and so µ = 0. We compare the proposed SAGE algorithm (with Lt and αt in (14)) with three recent algorithms: (1) FOLOS [3]; (2) SMIDAS [4]; and (3) SCD [4]. For fair comparison, we compare their convergence 2Downloaded from http://people.cs.uchicago.edu/∼vikass/svmlin.html and http://www.cs.ucsb.edu/∼wychen/sc.html. 7 behavior w.r.t. both the number of iterations and the number of data access operations, the latter of which has been advocated in [4] as an implementation-independent measure of time. Moreover, the efficiency tricks for sparse data described in [4] are also implemented. Following [4], we set the regularization parameter λ in (2) to 10−6. The η parameter in SMIDAS is searched over the range of {10−6, 10−5, 10−4, 10−3, 10−2, 10−1}, and the one with the lowest ℓ1-regularized loss is used. As in Pegasos [1], the (sub)gradient is computed from small sample subsets. The subset size p is set to min(0.01m, 500), where m is the data set size. This is used on all the algorithms except SCD, since SCD is based on coordinate descent and is quite different from the other stochastic subgradient algorithms.3 All the algorithms are trained with the same maximum amount of “time” (i.e., number of data access operations). Table 1: Summary of the data sets. data set #features #instances sparsity pcmac 7,511 1,946 0.73% RCV1 47,236 193,844 0.12% Results are shown in Figure 1. As can be seen, SAGE requires much fewer iterations for convergence than the others (Figures 1(a) and 1(e)). Moreover, the additional costs on maintaining xt and zt are small, and the most expensive step in each SAGE iteration is in computing the generalized gradient update. Hence, its per-iteration complexity is comparable with the other (sub)gradient schemes, and its convergence in terms of the number of data access operations is still the fastest (Figures 1(b), 1(c), 1(f) and 1(g)). Moreover, the sparsity of the SAGE solution is comparable with those of the other algorithms (Figures 1(d) and 1(h)). 0 1000 2000 3000 4000 0 0.2 0.4 0.6 0.8 1 Number of Iterations L1 regularized loss SAGE FOLOS SMIDAS (a) 0 2 4 6 8 10 x 10 6 0 0.2 0.4 0.6 0.8 1 Number of Data Accesses L1 regularized loss SAGE FOLOS SMIDAS SCD (b) 0 2 4 6 8 10 x 10 6 0 20 40 60 80 100 Number of Data Accesses Error (%) SAGE FOLOS SMIDAS SCD (c) 0 2 4 6 8 10 x 10 6 0 2000 4000 6000 8000 Number of Data Accesses Density of w SAGE FOLOS SMIDAS SCD (d) 0 1000 2000 3000 4000 0 0.2 0.4 0.6 0.8 1 Number of Iterations L1 regularized loss SAGE FOLOS SMIDAS (e) 0 0.5 1 1.5 2 2.5 x 10 8 0 0.2 0.4 0.6 0.8 1 Number of Data Accesses L1 regularized loss SAGE FOLOS SMIDAS SCD (f) 0 0.5 1 1.5 2 2.5 x 10 8 0 20 40 60 80 100 Number of Data Accesses Error (%) SAGE FOLOS SMIDAS SCD (g) 0 0.5 1 1.5 2 2.5 x 10 8 0 1 2 3 4x 10 4 Number of Data Accesses Density of w SAGE FOLOS SMIDAS SCD (h) Figure 1: Performance of the various algorithms on the pcmac (upper) and RCV1 (below) data sets. 6 Conclusion In this paper, we developed a novel accelerated gradient method (SAGE) for stochastic convex composite optimization. It enjoys the computational simplicity and scalability of traditional (sub)gradient methods but are much faster, both theoretically and empirically. Experimental results show that SAGE outperforms recent (sub)gradient descent methods. Moreover, SAGE can also be extended to online learning, obtaining the best regret bounds currently known. Acknowledgment This research has been partially supported by the Research Grants Council of the Hong Kong Special Administrative Region under grant 615209. 3For the same reason, an SCD iteration is also very different from an iteration in the other algorithms. Hence, SCD is not shown in the plots on the regularized loss versus number of iterations. 8 References [1] S. Shalev-Shwartz, Y. Singer, and N. Srebro. Pegasos: Primal estimated sub-gradient solver for SVM. In Proceedings of the 24th International Conference on Machine Learning, pages 807–814, Corvalis, Oregon, USA, 2007. [2] A. Bordes, L. Bottou, and P. Gallinari. SGD-QN: Careful Quasi-Newton Stochastic Gradient Descent. Journal of Machine Learning Research, 10:1737–1754, 2009. [3] J. Duchi and Y. Singer. Online and batch learning using forward looking subgradients. Technical report, 2009. [4] S. Shalev-Shwartz and A. Tewari. Stochastic methods for ℓ1 regularized loss minimization. In Proceedings of the 26th International Conference on Machine Learning, pages 929–936, Montreal, Quebec, Canada, 2009. [5] L. Bottou and O. Bousquet. The tradeoffs of large scale learning. In Advances in Neural Information Processing Systems 20. 2008. [6] S. Shalev-Shwartz and N. Srebro. SVM optimization: Inverse dependence on training set size. In Proceedings of the 25th International Conference on Machine Learning, pages 928–935, Helsinki, Finland, 2008. [7] Y. Nesterov. A method for unconstrained convex minimization problem with the rate of convergence o( 1 k2 ). Doklady AN SSSR (translated as Soviet. Math. Docl.), 269:543–547, 1983. [8] Y. Nesterov. Gradient methods for minimizing composite objective function. CORE Discussion Paper 2007/76, Catholic University of Louvain, September 2007. [9] A. Beck and M. Teboulle. A fast iterative shrinkage-thresholding algorithm for linear inverse problems. SIAM Journal on Imaging Sciences, 2:183–202, 2009. [10] R. Tibshirani. Regression shrinkage and selection via the Lasso. Journal of the Royal Statistical Society: Series B, 58:267–288, 1996. [11] S. Ji, L. Sun, R. Jin, and J. Ye. Multi-label multiple kernel learning. In Advances in Neural Information Processing Systems 21. 2009. [12] S. Ji and J. Ye. An accelerated gradient method for trace norm minimization. In Proceedings of the International Conference on Machine Learning. Montreal, Canada, 2009. [13] G. Lan. An optimal method for stochastic composite optimization. Technical report, School of Industrial and Systems Engineering, Georgia Institute of Technology, 2009. [14] Y. Nesterov and I.U.E. Nesterov. Introductory Lectures on Convex Optimization: A Basic Course. Kluwer, 2003. [15] S.M. Kakade and S. Shalev-Shwartz. Mind the duality gap: Logarithmic regret algorithms for online optimization. In Advances in Neural Information Processing Systems 21. 2009. [16] A. Beck and M. Teboulle. Mirror descent and nonlinear projected subgradient methods for convex optimization. Operations Research Letters, 31(3):167–175, 2003. [17] S.J. Wright, R.D. Nowak, and M.A.T. Figueiredo. Sparse reconstruction by separable approximation. In Proceedings of the International Conference on Acoustics, Speech, and Signal Processing, Las Vegas, Nevada, USA, March 2008. [18] V. Sindhwani and S.S. Keerthi. Large scale semi-supervised linear SVMs. In Proceedings of the SIGIR Conference on Research and Development in Information Retrieval, pages 477–484, Seattle, WA, USA, 2006. [19] Y. Song, W.Y. Chen, H. Bai, C.J. Lin, and E.Y. Chang. Parallel spectral clustering. In Proceedings of the European Conference on Machine Learning, pages 374–389, Antwerp, Belgium, 2008. 9
2009
237
3,745
Robust Value Function Approximation Using Bilinear Programming Marek Petrik Department of Computer Science University of Massachusetts Amherst, MA 01003 petrik@cs.umass.edu Shlomo Zilberstein Department of Computer Science University of Massachusetts Amherst, MA 01003 shlomo@cs.umass.edu Abstract Existing value function approximation methods have been successfully used in many applications, but they often lack useful a priori error bounds. We propose approximate bilinear programming, a new formulation of value function approximation that provides strong a priori guarantees. In particular, this approach provably finds an approximate value function that minimizes the Bellman residual. Solving a bilinear program optimally is NP-hard, but this is unavoidable because the Bellman-residual minimization itself is NP-hard. We therefore employ and analyze a common approximate algorithm for bilinear programs. The analysis shows that this algorithm offers a convergent generalization of approximate policy iteration. Finally, we demonstrate that the proposed approach can consistently minimize the Bellman residual on a simple benchmark problem. 1 Motivation Solving large Markov Decision Problems (MDPs) is a very useful, but computationally challenging problem addressed widely in the AI literature, particularly in the area of reinforcement learning. It is widely accepted that large MDPs can only be solved approximately. The commonly used approximation methods can be divided into three broad categories: 1) policy search, which explores a restricted space of all policies, 2) approximate dynamic programming, which searches a restricted space of value functions, and 3) approximate linear programming, which approximates the solution using a linear program. While all of these methods have achieved impressive results in many domains, they have significant limitations. Policy search methods rely on local search in a restricted policy space. The policy may be represented, for example, as a finite-state controller [22] or as a greedy policy with respect to an approximate value function [24]. Policy search methods have achieved impressive results in such domains as Tetris [24] and helicopter control [1]. However, they are notoriously hard to analyze. We are not aware of any theoretical guarantees regarding the quality of the solution. Approximate dynamic programming (ADP) methods iteratively approximate the value function [4, 20, 23]. They have been extensively analyzed and are the most commonly used methods. However, ADP methods typically do not converge and they only provide weak guarantees of approximation quality. The approximation error bounds are usually expressed in terms of the worst-case approximation of the value function over all policies [4]. In addition, most available bounds are with respect to the L∞norm, while the algorithms often minimize the L2 norm. While there exist some L2-based bounds [14], they require values that are difficult to obtain. Approximate linear programming (ALP) uses a linear program to compute the approximate value function in a particular vector space [7]. ALP has been previously used in a wide variety of settings [2, 9, 10]. Although ALP often does not perform as well as ADP, there have been some recent 1 efforts to close the gap [18]. ALP has better theoretical properties than ADP and policy search. It is guaranteed to converge and return the closest L1-norm approximation ˜v of the optimal value function v∗up to a multiplicative factor. However, the L1 norm must be properly weighted to guarantee a small policy loss, and there is no reliable method for selecting appropriate weights [7]. To summarize, the existing reinforcement learning techniques often provide good solutions, but typically require significant domain knowledge [20]. The domain knowledge is needed partly because useful a priori error bounds are not available, as mentioned above. Our goal is to develop a more robust method that is guaranteed to minimize an actual bound on the policy loss. We present a new formulation of value function approximation that provably minimizes a bound on the policy loss. Unlike in some other algorithms, the bound in this case does not rely on values that are hard to obtain. The new method unifies policy search and value-function search methods to minimize the L∞norm of the Bellman residual, which bounds the policy loss. We start with a description of the framework and notation in Section 2. Then, in Section 3, we describe the proposed Approximate Bilinear Programming (ABP) formulation. A drawback of this formulation is its computational complexity, which may be exponential. We show in Section 4 that this is unavoidable, because minimizing the approximation error bound is in fact NP-hard. Although our focus is on the formulation and its properties, we also discuss some simple algorithms for solving bilinear programs. Section 5 shows that ABP can be seen as an improvement of ALP and Approximate Policy Iteration (API). Section 6 demonstrates the applicability of ABP using a common reinforcement learning benchmark problem. A complete discussion of sampling strategies–an essential component for achieving robustness–is beyond the scope of this paper, but the issue is briefly discussed in Section 6. Complete proofs of the theorems can be found in [19]. 2 Solving MDPs using ALP In this section, we formally define MDPs, their ALP formulation, and the approximation errors involved. These notions serve as a basis for developing the ABP formulation. A Markov Decision Process is a tuple (S, A, P, r, α), where S is the finite set of states, A is the finite set of actions. P : S × S × A 7→[0, 1] is the transition function, where P(s′, s, a) represents the probability of transiting to state s′ from state s, given action a. The function r : S × A 7→R is the reward function, and α : S 7→[0, 1] is the initial state distribution. The objective is to maximize the infinite-horizon discounted cumulative reward. To shorten the notation, we assume an arbitrary ordering of the states: s1, s2, . . . , sn. Then, Pa and ra are used to denote the probabilistic transition matrix and reward for action a. The solution of an MDP is a policy π : S × A →[0, 1] from a set of possible policies Π, such that for all s ∈S, P a∈A π(s, a) = 1. We assume that the policies may be stochastic, but stationary [21]. A policy is deterministic when π(s, a) ∈{0, 1} for all s ∈S and a ∈A. The transition and reward functions for a given policy are denoted by Pπ and rπ. The value function update for a policy π is denoted by Lπ, and the Bellman operator is denoted by L. That is: Lπv = Pπv + rπ Lv = max π∈Π Lπv. The optimal value function, denoted v∗, satisfies v∗= Lv∗. We focus on linear value function approximation for discounted infinite-horizon problems. In linear value function approximation, the value function is represented as a linear combination of nonlinear basis functions (vectors). For each state s, we define a row-vector φ(s) of features. The rows of the basis matrix M correspond to φ(s), and the approximation space is generated by the columns of the matrix. That is, the basis matrix M, and the value function v are represented as: M =    − φ(s1) − − φ(s2) − ...    v = Mx. Definition 1. A value function, v, is representable if v ∈M ⊆R|S|, where M = colspan (M), and is transitive-feasible when v ≥Lv. We denote the set of transitive-feasible value functions as: K = {v ∈R|S| v ≥Lv}. 2 Notice that the optimal value function v∗is transitive-feasible, and M is a linear space. Also, all the inequalities are element-wise. Because the new formulation is related to ALP, we introduce it first. It is well known that an infinite horizon discounted MDP problem may be formulated in terms of solving the following linear program: minimize v X s∈S c(s)v(s) s.t. v(s) −γ X s′∈S P(s′, s, a)v(s′) ≥r(s, a) ∀(s, a) ∈(S, A) (1) We use A as a shorthand notation for the constraint matrix and b for the right-hand side. The value c represents a distribution over the states, usually a uniform one. That is, P s∈S c(s) = 1. The linear program in Eq. (1) is often too large to be solved precisely, so it is approximated to get an approximate linear program by assuming that v ∈M [8], as follows: minimize x cTv s.t. Av ≥b v ∈M (2) The constraint v ∈M denotes the approximation. To actually solve this linear program, the value function is represented as v = Mx. In the remainder of the paper, we assume that 1 ∈M to guarantee the feasibility of the ALP, where 1 is a vector of all ones. The optimal solution of the ALP, ˜v, satisfies that ˜v ≥v∗. Then, the objective of Eq. (2) represents the minimization of ∥˜v −v∗∥1,c, where ∥· ∥1,c is a c-weighted L1 norm [7]. The ultimate goal of the optimization is not to obtain a good value function ˜v, but a good policy. The quality of the policy, typically chosen to be greedy with respect to ˜v, depends non-trivially on the approximate value function. The ABP formulation will minimize policy loss by minimizing ∥L˜v −˜v∥∞, which bounds the policy loss as follows. Theorem 2 (e.g. [25]). Let ˜v be an arbitrary value function, and let ˆv be the value of the greedy policy with respect to ˜v. Then: ∥v∗−ˆv∥∞≤ 2 1 −γ ∥L˜v −˜v∥∞, In addition, if ˜v ≥L˜v, the policy loss is smallest for the greedy policy. Policies, like value functions, can be represented as vectors. Assume an arbitrary ordering of the state-action pairs, such that o(s, a) 7→N maps a state and an action to its position. The policies are represented as θ ∈R|S|×|A|, and we use the shorthand notation θ(s, a) = θ(o(s, a)). Remark 3. The corresponding π and θ are denoted as πθ and θπ and satisfy: πθ(s, a) = θπ(s, a). We will also consider approximations of the policies in the policy-space, generated by columns of a matrix N. A policy is representable when π ∈N, where N = colspan (N). 3 Approximate Bilinear Programs This section shows how to formulate minv∈M ∥Lv −v∥∞as a separable bilinear program. Bilinear programs are a generalization of linear programs with an additional bilinear term in the objective function. A separable bilinear program consists of two linear programs with independent constraints and are fairly easy to solve and analyze. Definition 4 (Separable Bilinear Program). A separable bilinear program in the normal form is defined as follows: minimize w,x y,z f(w, x, y, z) = sT 1 w + rT 1 x + xTCy + rT 2 y + sT 2 z s.t. A1x + B1w = b1 A2y + B2z = b2 w, x ≥0 y, z ≥0 (3) 3 We separate the variables using a vertical line and the constraints using different columns to emphasize the separable nature of the bilinear program. In this paper, we only use separable bilinear programs and refer to them simply as bilinear programs. An approximate bilinear program can now be formulated as follows. minimize θ λ,λ′,v θTλ + λ′ s.t. Bθ = 1 z = Av −b θ ≥0 z ≥0 λ + λ′1 ≥z λ ≥0 θ ∈N v ∈M (4) All variables are vectors except λ′, which is a scalar. The symbol z is only used to simplify the notation and does not need to represent an optimization variable. The variable v is defined for each state and represents the value function. Matrix A represents constraints that are identical to the constraints in Eq. (2). The variables λ correspond to all state-action pairs. These variables represent the Bellman residuals that are being minimized. The variables θ are defined for all state-action pairs and represent policies in Remark 3. The matrix B represents the following constraints: X a∈A θ(s, a) = 1 ∀s ∈S. As with approximate linear programs, we initially assume that all the constraints on z are used. In realistic settings, however, the constraints would be sampled or somehow reduced. We defer the discussion of this issue until Section 6. Note that the constraints in our formulation correspond to elements of z and θ. Thus when constraints are omitted, also the corresponding elements of z and θ are omitted. To simplify the notation, the value function approximation in this problem is denoted only implicitly by v ∈M, and the policy approximation is denoted by θ ∈N. In an actual implementation, the optimization variables would be x, y using the relationships v = Mx and θ = Ny. We do not assume any approximation of the policy space, unless mentioned otherwise. We also use v or θ to refer to partial solutions of Eq. (4) with the other variables chosen appropriately to achieve feasibility. The ABP formulation is closely related to approximate linear programs, and we discuss the connection in Section 5. We first analyze the properties of the optimal solutions of the bilinear program and then show and discuss the solution methods in Section 4. The following theorem states the main property of the bilinear formulation. Theorem 5. b Let (˜θ, ˜v, ˜λ, ˜λ′) be an optimal solution of Eq. (4) and assume that 1 ∈M. Then: ˜θT˜λ + ˜λ′ = ∥L˜v −˜v∥∞≤ min v∈K∩M ∥Lv −v∥∞≤2 min v∈M ∥Lv −v∥∞≤2(1 + γ) min v∈M ∥v −v∗∥∞. In addition, π˜θ minimizes the Bellman residual with regard to ˜v, and its value function ˆv satisfies: ∥ˆv −v∗∥∞≤ 2 1 −γ min v∈M ∥Lv −v∥∞. The proof of the theorem can be found in [19]. It is important to note that, as Theorem 5 states, the ABP approach is equivalent to a minimization over all representable value functions, not only the transitive-feasible ones. Notice also the missing coefficient 2 (2 instead of 4) in the last equation of Theorem 5. This follows by subtracting a constant vector 1 from ˜v to balance the lower bounds on the Bellman residual error with the upper ones. This modified approximate value function will have 1/2 of the original Bellman residual but an identical greedy policy. Finally, note that whenever v∗∈M, both ABP and ALP will return the optimal value function. The ABP solution minimizes the L∞norm of the Bellman residual due to: 1) the correspondence between θ and the policies, and 2) the dual representation with respect to variables λ and λ′. The theorem then follows using techniques similar to those used for approximate linear programs [7]. 4 Algorithm 1: Iterative algorithm for solving Eq. (3) (x0, w0) ←random ; (y0, z0) ←arg miny,z f(w0, x0, y, z) ; i ←1 ; while yi−1 ̸= yi or xi−1 ̸= xi do (yi, zi) ←arg min{y,z A2y+B2z=b2 y,z≥0} f(wi−1, xi−1, y, z) ; (xi, wi) ←arg min{x,w A1x+B1w=b1 x,w≥0} f(w, x, yi, zi) ; i ←i + 1 return f(wi, xi, yi, zi) 4 Solving Bilinear Programs In this section we describe simple methods for solving ABPs. We first describe optimal methods, which have exponential complexity, and then discuss some approximation strategies. Solving a bilinear program is an NP-complete problem [3]. The membership in NP follows from the finite number of basic feasible solutions of the individual linear programs, each of which can be checked in polynomial time. The NP-hardness is shown by a reduction from the SAT problem [3]. The NP-completeness of ABP compares unfavorably with the polynomial complexity of ALP. However, most other ADP algorithms are not guaranteed to converge to a solution in finite time. The following theorem shows that the computational complexity of the ABP formulation is asymptotically the same as the complexity of the problem it solves. Theorem 6. b Determining minv∈K∩M ∥Lv −v∥∞< ϵ is NP-complete for the full constraint representation, 0 < γ < 1, and a given ϵ > 0. In addition, the problem remains NP-complete when 1 ∈M, and therefore minv∈M ∥Lv −v∥∞< ϵ is also NP-complete. As the theorem states, the value function approximation does not become computationally simpler even when 1 ∈M – a universal assumption in the paper. Notice that ALP can determine whether minv∈K∩M ∥Lv −v∥∞= 0 in polynomial time. The proof of Theorem 6 is based on a reduction from SAT and can be found in [19]. The policy in the reduction determines the true literal in each clause, and the approximate value function corresponds to the truth value of the literals. The approximation basis forces literals that share the same variable to have consistent values. Bilinear programs are non-convex and are typically solved using global optimization techniques. The common solution methods are based on concave cuts [11] or branch-and-bound [6]. In ABP settings with a small number of features, the successive approximation algorithm [17] may be applied efficiently. We are, however, not aware of commercial solvers available for solving bilinear programs. Bilinear programs can be formulated as concave quadratic minimization problems [11], or mixed integer linear programs [11, 16], for which there are numerous commercial solvers available. Because we are interested in solving very large bilinear programs, we describe simple approximate algorithms next. Optimal scalable methods are beyond the scope of this paper. The most common approximate method for solving bilinear programs is shown in Algorithm 1. It is designed for the general formulation shown in Eq. (3), where f(w, x, y, z) represents the objective function. The minimizations in the algorithm are linear programs which can be easily solved. Interestingly, as we will show in Section 5, Algorithm 1 applied to ABP generalizes a version of API. While Algorithm 1 is not guaranteed to find an optimal solution, its empirical performance is often remarkably good [13]. Its basic properties are summarized by the following proposition. Proposition 7 (e.g. [3]). Algorithm 1 is guaranteed to converge, assuming that the linear program solutions are in a vertex of the optimality simplex. In addition, the global optimum is a fixed point of the algorithm, and the objective value monotonically improves during execution. 5 The proof is based on the finite count of the basic feasible solutions of the individual linear programs. Because the objective function does not increase in any iteration, the algorithm will eventually converge. In the context of MDPs, Algorithm 1 can be further refined. For example, the constraint v ∈M in Eq. (4) serves mostly to simplify the bilinear program and a value function that violates it may still be acceptable. The following proposition motivates the construction of a new value function from two transitive-feasible value functions. Proposition 8. Let ˜v1 and ˜v2 be feasible value functions in Eq. (4). Then the value function ˜v(s) = min{˜v1(s), ˜v2(s)} is also feasible in Eq. (4). Therefore ˜v ≥v∗and ∥v∗−˜v∥∞≤ min {∥v∗−˜v1∥∞, ∥v∗−˜v2∥∞}. The proof of the proposition is based on Jensen’s inequality and can be found in [19]. Proposition 8 can be used to extend Algorithm 1 when solving ABPs. One option is to take the state-wise minimum of values from multiple random executions of Algorithm 1, which preserves the transitive feasibility of the value function. However, the increasing number of value functions used to obtain ˜v also increases the potential sampling error. 5 Relationship to ALP and API In this section, we describe the important connections between ABP and the two closely related ADP methods: ALP, and API with L∞minimization. Both of these methods are commonly used, for example to solve factored MDPs [10]. Our analysis sheds light on some of their observed properties and leads to a new convergent form of API. ABP addresses some important issues with ALP: 1) ALP provides value function bounds with respect to L1 norm, which does not guarantee small policy loss, 2) ALP’s solution quality depends significantly on the heuristically-chosen objective function c in Eq. (2) [7], and 3) incomplete constraint samples in ALP easily lead to unbounded linear programs. The drawback of using ABP, however, is the higher computational complexity. Both the first and the second issues in ALP can be addressed by choosing the right objective function [7]. Because this objective function depends on the optimal ALP solution, it cannot be practically computed. Instead, various heuristics are usually used. The heuristic objective functions may lead to significant improvements in specific domains, but they do not provide any guarantees. ABP, on the other hand, has no such parameters that require adjustments. The third issue arises when the constraints of an ALP need to be sampled in some large domains. The ALP may become unbounded with incomplete samples because its objective value is defined using the L1 norm on the states, and the constraints are defined using the L∞norm of the Bellman residual. In ABP, the Bellman residual is used in both the constraints and objective function. The objective function of ABP is then bounded below by 0 for an arbitrarily small number of samples. ABP can also improve on API with L∞minimization (L∞-API for short), which is a leading method for solving factored MDPs [10]. Minimizing the L∞approximation error is theoretically preferable, since it is compatible with the existing bounds on policy loss [10]. In contrast, few practical bounds exist for API with the L2 norm minimization [14], such as LSPI [12]. L∞-API is shown in Algorithm 2, where f(π) is calculated using the following program: minimize φ,v φ s.t. (I −γPπ)v + 1φ ≥rπ −(I −γPπ)v + 1φ ≥−rπ v ∈M (5) Here I denotes the identity matrix. We are not aware of a convergence or a divergence proof of L∞-API, and this analysis is beyond the scope of this paper. 6 Algorithm 2: Approximate policy iteration, where f(π) denotes a custom value function approximation for the policy π. π0, k ←rand, 1 ; while πk ̸= πk−1 do ˜vk ←f(πk−1) ; πk(s) ←arg maxa∈A r(s, a) + γ P s′∈S P(s′, s, a)˜vk(s) ∀s ∈S ; k ←k + 1 We propose Optimistic Approximate Policy Iteration (OAPI), a modification of API. OAPI is shown in Algorithm 2, where f(π) is calculated using the following program: minimize φ,v φ s.t. Av ≥b (≡(I −γPπ)v ≥rπ ∀π ∈Π) −(I −γPπ)v + 1φ ≥−rπ v ∈M (6) In fact, OAPI corresponds to Algorithm 1 applied to ABP because Eq. (6) corresponds to Eq. (4) with fixed θ. Then, using Proposition 7, we get the following corollary. Corollary 9. Optimistic approximate policy iteration converges in finite time. In addition, the Bellman residual of the generated value functions monotonically decreases. OAPI differs from L∞-API in two ways: 1) OAPI constrains the Bellman residuals by 0 from below and by φ from above, and then it minimizes φ. L∞-API constrains the Bellman residuals by φ from both above and below. 2) OAPI, like API, uses only the current policy for the upper bound on the Bellman residual, but uses all the policies for the lower bound on the Bellman residual. L∞-API cannot return an approximate value function that has a lower Bellman residual than ABP, given the optimality of ABP described in Theorem 5. However, even OAPI, an approximate ABP algorithm, performs comparably to L∞-API, as the following theorem states. Theorem 10. b Assume that L∞-API converges to a policy π and a value function v that both satisfy: φ = ∥v −Lπv∥∞= ∥v −Lv∥∞. Then ˜v = v + φ 1−γ 1 is feasible in Eq. (4), and it is a fixed point of OAPI. In addition, the greedy policies with respect to ˜v and v are identical. The proof is based on two facts. First, ˜v is feasible with respect to the constraints in Eq. (4). The Bellman residual changes for all the policies identically, since a constant vector is added. Second, because Lπ is greedy with respect to ˜v, we have that ˜v ≥Lπ˜v ≥L˜v. The value function ˜v is therefore transitive-feasible. The full proof can be found in [19]. To summarize, OAPI guarantees convergence, while matching the performance of L∞-API. The convergence of OAPI is achieved because given a non-negative Bellman residual, the greedy policy also minimizes the Bellman residual. Because OAPI ensures that the Bellman residual is always non-negative, it can progressively reduce it. In comparison, the greedy policy in L∞-API does not minimize the Bellman residual, and therefore L∞-API does not always reduce it. Theorem 10 also explains why API provides better solutions than ALP, as observed in [10]. From the discussion above, ALP can be seen as an L1-norm approximation of a single iteration of OAPI. L∞-API, on the other hand, performs many such ALP-like iterations. 6 Empirical Evaluation As we showed in Theorem 10, even OAPI, the very simple approximate algorithm for ABP, can perform as well as existing state-of-the art methods on factored MDPs. However, a deeper understanding of the formulation and potential solution methods will be necessary in order to determine the full practical impact of the proposed methods. In this section, we validate the approach by applying it to the mountain car problem, a simple reinforcement learning benchmark problem. We have so far considered that all the constraints involving z are present in the ABP in Eq. (4). Because the constraints correspond to all state-action pairs, it is often impractical to even enumerate 7 (a) L∞error of the Bellman residual Features 100 144 OAPI 0.21 (0.23) 0.13 (0.1) ALP 13. (13.) 3.6 (4.3) LSPI 9. (14.) 3.9 (7.7) API 0.46 (0.08) 0.86 (1.18) (b) L2 error of the Bellman residual Features 100 144 OAPI 0.2 (0.3) 0.1 (1.9) ALP 9.5 (18.) 0.3 (0.4) LSPI 1.2 (1.5) 0.9 (0.1) API 0.04 (0.01) 0.08 (0.08) Table 1: Bellman residual of the final value function. The values are averages over 5 executions, with the standard deviations shown in parentheses. them. This issue can be addressed in at least two ways. First, a small randomly-selected subset of the constraints can be used in the ABP, a common approach in ALP [9, 5]. The ALP sampling bounds can be easily extended to ABP. Second, the structure of the MDP can be used to reduce the number of constraints. Such a reduction is possible, for example, in factored MDPs with L∞-API and ALP [10], and can be easily extended to OAPI and ABP. In the mountain-car benchmark, an underpowered car needs to climb a hill [23]. To do so, it first needs to back up to an opposite hill to gain sufficient momentum. The car receives a reward of 1 when it climbs the hill. In the experiments we used a discount factor γ = 0.99. The experiments are designed to determine whether OAPI reliably minimizes the Bellman residual in comparison with API and ALP. We use a uniformly-spaced linear spline to approximate the value function. The constraints were based on 200 uniformly sampled states with all 3 actions per state. We evaluated the methods with the number of the approximation features 100 and 144, which corresponds to the number of linear segments. The results of ABP (in particular OAPI), ALP, API with L2 minimization, and LSPI are depicted in Table 1. The results are shown for both L∞norm and uniformly-weighted L2 norm. The runtimes of all these methods are comparable, with ALP being the fastest. Since API (LSPI) is not guaranteed to converge, we ran it for at most 20 iterations, which was an upper bound on the number of iterations of OAPI. The results demonstrate that ABP minimizes the L∞Bellman residual much more consistently than the other methods. Note, however, that all the considered algorithms would perform significantly better given a finer approximation. 7 Conclusion and Future Work We proposed and analyzed approximate bilinear programming, a new value-function approximation method, which provably minimizes the L∞Bellman residual. ABP returns the optimal approximate value function with respect to the Bellman residual bounds, despite the formulation with regard to transitive-feasible value functions. We also showed that there is no asymptotically simpler formulation, since finding the closest value function and solving a bilinear program are both NP-complete problems. Finally, the formulation leads to the development of OAPI, a new convergent form of API which monotonically improves the objective value function. While we only discussed approximate solutions of the ABP, a deeper study of bilinear solvers may render optimal solution methods feasible. ABPs have a small number of essential variables (that determine the value function) and a large number of constraints, which can be leveraged by the solvers [15]. The L∞error bound provides good theoretical guarantees, but it may be too conservative in practice. A similar formulation based on L2 norm minimization may be more practical. We believe that the proposed formulation will help to deepen the understanding of value function approximation and the characteristics of existing solution methods, and potentially lead to the development of more robust and widely-applicable reinforcement learning algorithms. Acknowledgements This work was supported by the Air Force Office of Scientific Research under Grant No. FA955008-1-0171. We also thank the anonymous reviewers for their useful comments. 8 References [1] Pieter Abbeel, Varun Ganapathi, and Andrew Y. Ng. Learning vehicular dynamics, with application to modeling helicopters. In Advances in Neural Information Processing Systems, pages 1–8, 2006. [2] Daniel Adelman. A price-directed approach to stochastic inventory/routing. Operations Research, 52:499–514, 2004. [3] Kristin P. Bennett and O. L. Mangasarian. Bilinear separation of two sets in n-space. Technical report, Computer Science Department, University of Wisconsin, 1992. [4] Dimitri P. Bertsekas and Sergey Ioffe. Temporal differences-based policy iteration and applications in neuro-dynamic programming. Technical Report LIDS-P-2349, LIDS, 1997. [5] Guiuseppe Calafiore and M.C. Campi. Uncertain convex programs: Randomized solutions and confidence levels. Mathematical Programming, Series A, 102:25–46, 2005. [6] Alberto Carpara and Michele Monaci. Bidimensional packing by bilinear programming. Mathematical Programming Series A, 118:75–108, 2009. [7] Daniela P. de Farias. The Linear Programming Approach to Approximate Dynamic Programming: Theory and Application. PhD thesis, Stanford University, 2002. [8] Daniela P. de Farias and Ben Van Roy. The linear programming approach to approximate dynamic programming. Operations Research, 51:850–856, 2003. [9] Daniela Pucci de Farias and Benjamin Van Roy. On constraint sampling in the linear programming approach to approximate dynamic programming. Mathematics of Operations Research, 29(3):462–478, 2004. [10] Carlos Guestrin, Daphne Koller, Ronald Parr, and Shobha Venkataraman. Efficient solution algorithms for factored MDPs. Journal of Artificial Intelligence Research, 19:399–468, 2003. [11] Reiner Horst and Hoang Tuy. Global optimization: Deterministic approaches. Springer, 1996. [12] Michail G. Lagoudakis and Ronald Parr. Least-squares policy iteration. Journal of Machine Learning Research, 4:1107–1149, 2003. [13] O. L. Mangasarian. The linear complementarity problem as a separable bilinear program. Journal of Global Optimization, 12:1–7, 1995. [14] Remi Munos. Error bounds for approximate policy iteration. In International Conference on Machine Learning, pages 560–567, 2003. [15] Marek Petrik and Shlomo Zilberstein. Anytime coordination using separable bilinear programs. In Conference on Artificial Intelligence, pages 750–755, 2007. [16] Marek Petrik and Shlomo Zilberstein. Average reward decentralized Markov decision processes. In International Joint Conference on Artificial Intelligence, pages 1997–2002, 2007. [17] Marek Petrik and Shlomo Zilberstein. A bilinear programming approach for multiagent planning. Journal of Artificial Intelligence Research, 35:235–274, 2009. [18] Marek Petrik and Shlomo Zilberstein. Constraint relaxation in approximate linear programs. In International Conference on Machine Learning, pages 809–816, 2009. [19] Marek Petrik and Shlomo Zilberstein. Robust value function approximation using bilinear programming. Technical Report UM-CS-2009-052, Department of Computer Science, University of Massachusetts Amherst, 2009. [20] Warren B. Powell. Approximate Dynamic Programming. Wiley-Interscience, 2007. [21] Martin L. Puterman. Markov decision processes: Discrete stochastic dynamic programming. John Wiley & Sons, Inc., 2005. [22] Kenneth O. Stanley and Risto Miikkulainen. Competitive coevolution through evolutionary complexification. Journal of Artificial Intelligence Research, 21:63–100, 2004. [23] Richard S. Sutton and Andrew Barto. Reinforcement learning. MIT Press, 1998. [24] Istvan Szita and Andras Lorincz. Learning Tetris using the noisy cross-entropy method. Neural Computation, 18(12):2936–2941, 2006. [25] Ronald J. Williams and Leemon C. Baird. Tight performance bounds on greedy policies based on imperfect value functions. In Yale Workshop on Adaptive and Learning Systems, 1994. 9
2009
238
3,746
Parallel Inference for Latent Dirichlet Allocation on Graphics Processing Units Feng Yan Department of CS Purdue University West Lafayette, IN 47907 Ningyi Xu Microsoft Research Asia No. 49 Zhichun Road Beijing, P.R. China Yuan (Alan) Qi Departments of CS and Statistics Purdue University West Lafayette, IN 47907 Abstract The recent emergence of Graphics Processing Units (GPUs) as general-purpose parallel computing devices provides us with new opportunities to develop scalable learning methods for massive data. In this work, we consider the problem of parallelizing two inference methods on GPUs for latent Dirichlet Allocation (LDA) models, collapsed Gibbs sampling (CGS) and collapsed variational Bayesian (CVB). To address limited memory constraints on GPUs, we propose a novel data partitioning scheme that effectively reduces the memory cost. This partitioning scheme also balances the computational cost on each multiprocessor and enables us to easily avoid memory access conflicts. We use data streaming to handle extremely large datasets. Extensive experiments showed that our parallel inference methods consistently produced LDA models with the same predictive power as sequential training methods did but with 26x speedup for CGS and 196x speedup for CVB on a GPU with 30 multiprocessors. The proposed partitioning scheme and data streaming make our approach scalable with more multiprocessors. Furthermore, they can be used as general techniques to parallelize other machine learning models. 1 Introduction Learning from massive datasets, such as text, images, and high throughput biological data, has applications in various scientific and engineering disciplines. The scale of these datasets, however, often demands high, sometimes prohibitive, computational cost. To address this issue, an obvious approach is to parallelize learning methods with multiple processors. While large CPU clusters are commonly used for parallel computing, Graphics Processing Units (GPUs) provide us with a powerful alternative platform for developing parallel machine learning methods. A GPU has massively built-in parallel thread processors and high-speed memory, therefore providing potentially one or two magnitudes of peak flops and memory throughput greater than its CPU counterpart. Although GPU is not good at complex logical computation, it can significantly reduce running time of numerical computation-centric applications. Also, GPUs are more cost effective and energy efficient. The current high-end GPU has over 50x more peak flops than CPUs at the same price. Given a similar power consumption, GPUs perform more flops per watt than CPUs. For large-scale industrial applications, such as web search engines, efficient learning methods on GPUs can make a big difference in energy consumption and equipment cost. However, parallel computing 1 on GPUs can be a challenging task because of several limitations, such as relatively small memory size. In this paper, we demonstrate how to overcome these limitations to parallel computing on GPUs with an exemplary data-intensive application, training Latent Dirichlet Allocation (LDA) models. LDA models have been successfully applied to text analysis. For large corpora, however, it takes days, even months, to train them. Our parallel approaches take the advantage of parallel computing power of GPUs and explore the algorithmic structures of LDA learning methods, therefore significantly reducing the computational cost. Furthermore, our parallel inference approaches, based on a new data partition scheme and data streaming, can be applied to not only GPUs but also any shared memory machine. Specifically, the main contributions of this paper include: • We introduce parallel collapsed Gibbs sampling (CGS) and parallel collapsed variational Bayesian (CVB) for LDA models on GPUs. We also analyze the convergence property of the parallel variational inference and show that, with mild convexity assumptions, the parallel inference monotonically increases the variational lower bound until convergence. • We propose a fast data partition scheme that efficiently balances the workloads across processors, fully utilizing the massive parallel mechanisms of GPUs. • Based on this partitioning scheme, our method is also independent of specific memory consistency models: with partitioned data and parameters in exclusive memory sections, we avoid access conflict and do not sacrifice speedup caused by extra cost from a memory consistency mechanism • We propose a data streaming scheme, which allows our methods to handle very large corpora that cannot be stored in a single GPU. • Extensive experiments show both parallel inference algorithms on GPUs achieve the same predictive power as their sequential inference counterparts on CPUs, but significantly faster. The speedup is near linear in terms of the number of multiprocessors in the GPU card. 2 Latent Dirichlet Allocation We briefly review the LDA model and two inference algorithms for LDA. 1LDA models each of D documents as a mixture over K latent topics, and each topic k is a multinomial distribution over a word vocabulary having W distinct words denoted by φk = {φkw}, where φk is drawn from a symmetric Dirichlet prior with parameter β. In order to generate a document j, the document’s mixture over topics, θj = {θjk}, is drawn from a symmetric Dirichlet prior with parameter α first. For the ith token in the document, a topic assignment zij is drawn with topic k chosen with probability θjk. Then word xij is drawn from the zijth topic, with xij taking on value w with probability φzijw. Given the training data with N words x = {xij}, we need to compute the posterior distribution over the latent variables. Collapsed Gibbs sampling [4] is an efficient procedure to sample the posterior distribution of topic assignment z = {zij} by integrating out all θjk and φkw. Given the current state of all but one variable zij, the conditional distribution of zij is P(zij = k|z¬ij, x, α, β) ∝ n¬ij xijk + β n¬ij k + Wβ (n¬ij jk + α) (1) where nwk denotes the number of tokens with word w assigned to topic k, njk denotes the number of tokens in document j assigned to topic k and n¬ij k = X w n¬ij wk . Superscript ¬ij denotes that the variable is calculated as if token xij is removed from the training data. CGS is very efficient because the variance is greatly reduced by sampling in a collapsed state space. Teh et al. [9] applied the same state space to variational Bayesian and proposed the collapsed variational Bayesian inference algorithm. It has been shown that CVB has a theoretically tighter variational bound than standard VB. In CVB, the posterior of z is approximated by a factorized posterior q(z) = Q ij q(zij|γij) where q(zij|γij) is multinomial with variational parameter 1We use indices to represent topics, documents and vocabulary words. 2 γij = {γijk}. The inference task is to find variational parameters maximizing the variational lower bound L(q) = X z q(z) log p(z, x|α, β) q(z) . The authors used a computationally efficient Gaussian approximation. The updating formula for γij is similar to the CGS updates γijk ∝ (Eq[n¬ij xijk] + β)(Eq[n¬ij jk ] + α)(Eq[n¬ij k ] + Wβ)−1 exp(− Varq[n¬ij xij k] 2(Eq[n¬ij xij k]+β)2 − Varq[n¬ij jk ] 2(Eq[n¬ij jk ]+α)2) + Varq[n¬ij k ] 2(Eq[n¬ij k ]+W β)2 ) (2) 3 Parallel Algorithms for LDA Training 3.1 Parallel Collapsed Gibbs Sampling A natural way to parallelize LDA training is to distribute documents across P processors. Based on this idea, Newman et al. [8] introduced a parallel implementation of CGS on distributed machines, called AD-LDA. In AD-LDA, D documents and document-specific counts njk are distributed over P processors, with D P documents on each processor. In each iteration, every processor p independently runs local Gibbs sampling with its own copy of topic-word count np kw and topic counts np k = P w np kw in parallel. Then a global synchronization aggregates local counts np kw to produce global counts nkw and nk. AD-LDA achieved substantial speedup compared with single-processor CGS training without sacrificing prediction accuracy. However, it needs to store P copies of topicword counts nkw for all processors, which is unrealistic for GPUs with large P and large datasets due to device memory space limitation. For example, a dataset having 100, 000 vocabulary words needs at least 1.4 GBytes to store 256-topic nwk for 60 processors, exceeding the device memory capacity of current high-end GPUs. In order to address this issue, we develop parallel CGS algorithm that only requires one copy of nkw. Algorithm 1: Parallel Collapsed Gibbs Sampling Input: Word tokens x, document partition J1, . . . , JP and vocabulary partition V1, . . . , VP Output: njk, nwk, zij Initialize topic assignment to each word token, set 1 np k ←nk repeat 2 for l = 0 to P −1 do 3 /* Sampling step */ for each processor p in parallel do 4 Sample zij for j ∈Jp and xij ∈Vp⊕l 5 (Equation (1)) with global counts nwk, global counts njk and local counts np k end 6 /* Synchronization step */ Update np k according to Equation (3) 7 end 8 until convergence 9 Our parallel CGS algorithm is motivated by the following observation: for word token w1 in document j1 and word token w2 in document j2, if w1 ̸= w2 and j1 ̸= j2, simultaneous updates of topic assignment by (1) have no memory read/write conflicts on document-topic counts njk and topic-word counts nwk. The algorithmic flow is summarized in Algorithm 1. In addition to dividing all documents J = {1, . . . , D} to P (disjoint) sets of documents J1, . . . , JP and distribute them to P processors, we further divide the vocabulary words V = {1, . . . , W} into P disjoint subsets V1, . . . , VP , and each processor p (p = 0, . . . , P −1) stores a local copy of topic counts np k. Every parallel CGS training iteration consists of P epochs, and each epoch consists of a sampling step and a synchronization step. In the sampling step of the lth epoch (l = 0, . . . , P −1), processor p samples topic assignments zij whose document index is j ∈Jp and word index is xij ∈Vp⊕l. The ⊕is the modulus P addition operation defined by a ⊕b = (a + b) mod P, and all processors run the sampling simultaneously without memory read/write conflicts on the global counts njk and nwk. Then the synchronization step uses (3) to aggregate np k to global counts nk, which are used as local counts in the next epoch. nk ←nk + X p (np k −nk), np k ←nk (3) 3 Our parallel CGS can be regarded as an extension to AD-LDA by using the data partition in local sampling and inserting P −1 more synchronization steps within an iteration. Since our data partition guarantees that any two processors access neither the same document nor the same word in an epoch, the synchronization of nwk in AD-LDA is equivalent to keeping nwk unchanged after the sampling step of the epoch. Becasue P processors concurrently sample new topic assignments in parallel CGS, we don’t necessarily sample from the correct posterior distribution. However, we can view it as a stochastic optimization method that maximizes p(z|x, α, β). A justification of this viewpoint can be found in [8]. 3.2 Parallel Collapsed Variational Bayesian The collapsed Gibbs sampling and the collapsed variational Bayesian inference [9] are similar in their algorithmic structures. As pointed out by Asuncion et al. [2], there are striking similarities between CGS and CVB. A single iteration of our parallel CVB also consists of P epochs, and each epoch has an updating step and a synchronization step. The updating step updates variational parameters in a similar manner as the sampling step of parallel CGS. Counts in CGS are replaced by expectations and variances, and new variational parameters are computed by (2). The synchronization step involves an affine combination of the variational parameters in the natural parameter space. Since multinomial distribution belongs to the exponential family, we can represent the multinomial distribution over K topics defined by mean parameter γij in natural parameter λij = (λijk) by λijk = log( γijk 1−P k′̸=K γijk′ ) for k = 1, 2, . . . , K −1, and the domain of λij is unconstrained. Thus maximizing L(q(λ)) becomes an unconstrained optimization problem. Denote λm = (λij)j∈Jm, λ = (λ0, . . . , λP −1), λnew and λold to be the variational parameters immediately after and before the updating step respectively. Let λ(p) = (λold 0 , . . . , λnew p , . . . , λold P −1). We pick a λsync as the updated λ from a one-parameter class of variational parameters λ(µ) that combines the contribution from all processors λ(µ) = λold + µ P −1 X i=0 (λ(i) −λold), µ ≥0. Two special cases are of interest: 1) λsync = λ( 1 P ) is a convex combination of {λ(p)}; and 2) λsync = λ(1) = λnew. If (quasi)concavity [3] holds in sufficient large neighborhoods of the sequence of λ(µ), say near a local maximum having negatively defined Hessian, then L(q(λ(µ))) ≥ minp L(q(λ(p))) ≥L(q(λold)) and L(q) converge locally. For the second case, we keep γnew and only update Eq[nk] and Varq[nk] similarly as (3) in the synchronization step. The formulas are E[nk] ←E[nk] + P p(E[np k] −E[nk]), E[np k] ←E[nk] Var[nk] ←Var[nk] + P p(Var[np k] −Var[nk]), Var[np k] ←Var[nk] (4) Also, λ(1) assigns a larger step size to the direction PP −1 i=0 (λ(i) −λold). Thus we can achieve a faster convergence rate if it is an ascending direction. It should be noted that our choice of λsync doesn’t guarantee global convergence, but we shall see that λ(1) can produce models that have almost the same predictive power and variational lower bounds as the single-processor CVB. 3.3 Data Partition In order to achieve maximal speedup, we need the partitions producing balanced workloads across processors, and we also hope that generating the data partition consumes a small fraction of time in the whole training process. In order to present in a unified way, we define the co-occurrence matrix R = (rjw) as: For parallel CGS, rjw is the number of occurrences of word w in document j; for parallel CVB, rjw = 1 if w occurs at least once in j, otherwise rjw = 0. We define the submatrix Rmn = (rjw) ∀j ∈Jm, w ∈ Vn. The optimal data partition is equivalent to minimizing the following cost function C = P −1 X l=0 max (m,n): m⊕l=n {Cmn}, Cmn = X rjw∈Rmn rjw (5) 4 The basic operation in the proposed algorithms is either sampling topic assignments (in CGS) or updating variational parameters (in CVB). Each value of l in the first summation term in (5) is associated with one epoch. All Rmn satisfying m ⊕l = n are the P submatrices of R whose entries are used to perform basic operations in epoch l. The number of these two types of basic operations on each unique document/word pair (j, w) are all rjw. So the total number of basic operations in Rm,n is Cmn for a single processor. Since all processors have to wait for the slowest processor to complete its job before a synchronization step, the maximal Cmn is the number of basic operations for the slowest processor. Thus the total number of basic operations is C. We define data partition efficiency, η, for a given row and column partitions by η = Copt C , Copt = X j∈J,w∈V rjw/P (6) where Copt is the theoretically minimal number of basic operations. η is defined to be less than or equal to 1. The higher the η, the better the partitions. Exact optimization of (5) can be achieved through solving an equivalent integer programming problem. Since integer programming is NPhard in general, and the large number of free variables for real-world datasets makes it intractable to solve, we use a simple approximate algorithm to perform data partitioning. In our observation, it works well empirically. Here we use the convention of initial value j0 = w0 = 0. Our data partition algorithm divides row index J into disjoint subsets Jm = {j(m−1), . . . , jm}, where jm = arg min j′ |mCopt − X j≤j′ rjw|. Similarly, we divide column index V into disjoint subsets Vn = {w(n−1) + 1, . . . , wn} by wn = arg min w′ |mCopt − X w≤w′ rjw|. This algorithm is fast, since it needs only one full sweep over all word tokens or unique document/word pairs to calculate jm and wn. In practice, we can run this algorithm for several random permutations of J or V , and take the partitions with the highest η. We empirically obtained high η on large datasets with the approximate algorithm. For a word token x in the corpus, the probability that x is the word w is P(x = w), the probability that x is in document j is P(x in j). If we assume these two distributions are independent and x is i.i.d., then for a fixed P, the law of large numbers asserts P(x in Jm) ≈ jm−j(m−1) D ≈1 P and P(x ∈Vn) ≈ wn−w(n−1) W ≈1 P . Independence gives E[Cmn] ≈Copt P where Cmn = P x 1{x inJm,x∈Vn}. Furthermore, the law of large numbers and the central limit theorem also give Cmn ≈Copt P and the distribution of Cmn is approximately a normal distribution. Although independence and i.i.d. assumptions are not true for real data, the above analysis holds in an approximate way. Actually, when P = 10, the Cmn of NIPS and NY Times datasets (see Section 4) accepted the null hypothesis of Lilliefors’ normality test with a 0.05 significance level. 3.4 GPU Implementation and Data Streaming We used a Leatek Geforce 280 GTX GPU (G280) in this experiment. The G280 has 30 on-chip multiprocessors running at 1296 MHz, and each multiprocessor has 8 thread processors that are responsible for executing all threads deployed on the multiprocessor in parallel. The G280 has 1 GBytes on-board device memory, the memory bandwidth is 141.7 GB/s. We adopted NVidia’s Compute Unified Device Architecture (CUDA) as our GPU programming environment. CUDA programs run in a Single Program Multiple Threads (SPMT) fashion. All threads are divided into equal-sized thread blocks. Threads in the same thread block are executed on a multiprocessor, and a multiprocessor can execute a number of thread blocks. We map a “processor” in the previous algorithmic description to a thread block. For a word token, fine parallel calculations, such as (1) and (2), are realized by parallel threads inside a thread block. Given the limited amount of device memory on GPUs, we cannot load all training data and model parameters into the device memory for large-scale datasets. However, the sequential nature of Gibbs sampling and variational Bayesian inferences allow us to implement a data streaming [5] scheme which effectively reduces GPU device memory space requirements. Temporal data and variables, xij, zij and γij, are sent to a working space on GPU device memory on-the-fly. Computation and data transfer are carried out simultaneously, i.e. data transfer latency is hidden by computation. 5 dataset KOS NIPS NYT Number of documents, D 3, 430 1, 500 300, 000 Number of words, W 6, 906 12, 419 102, 660 Number of word tokens, N 467, 714 1, 932, 365 99, 542, 125 Number of unique document/word pairs, M 353, 160 746, 316 69, 679, 427 Table 1: datasets used in the experiments. P=1 P=10 P=30 P=60 1350 1400 1450 1500 1550 CVB, K=64 CVB, K=128 CGS, K=64 CGS, K=128 Perplexity P=1 P=10 P=30 P=60 1000 1050 1100 1150 1200 1250 1300 1350 1400 CVB, K=64 CVB, K=128 CVB, K=256 CGS, K=64 CGS, K=128 CGS, K=256 Perplexity Figure 1: Test set perplexity versus number of processors P for KOS (left) and NIPS (right). 4 Experiments We used three text datasets retrieved from the UCI Machine Learning Repository2 for evaluation. Statistical information about these datasets is shown in Table 4. For each dataset, we randomly extracted 90% of all word tokens as the training set, and the remaining 10% of word tokens are the test set. We set α = 50/K and β = 0.1 in all experiments [4]. We use λsync = λ(1) in the parallel CVB, and this setting works well in all of our experiments. 4.1 Perplexity We measure the performance of the parallel algorithms using test set perplexity. Test set perplexity is defined as exp(− 1 Ntest log p(xtest)). For CVB, test set likelihood p(xtest) is computed as p(xtest) = Y ij log X k ¯θjk ¯φxijk ¯θjk = α + E[njk] Kα + P k E[njk] ¯φwk = β + E[nwk] Wβ + E[nk] (7) We report the average perplexity and the standard deviation of 10 randomly initialized runs for the parallel CVB. The typical burn-in period of CGS is about 200 iterations. We compute the likelihood p(xtest) for CGS by averaging S = 10 samples at the end of 1000 iterations from different chains. p(xtest) = Y ij log 1 S X s X k ˆθs jk ˆφs xijk ˆθs jk = α + ns jk Kα + P k ns jk ˆφs wk = β + ns wk Wβ + ns k (8) Two small datasets, KOS and NIPS, are used in the perplexity experiment. We computed test perplexity for different values of K and P. Figure 1 shows the test set perplexity on KOS (left) and NIPS (right). We used the CPU to compute perplexity for P = 1 and the GPU for P = 10, 30, 60. For a fixed number of K, there is no significant difference between the parallel and the single-processor algorithms. It suggests our parallel algorithms converge to models having the same predictive power in terms of perplexity as single-processor LDA algorithms. Perplexity as a function of iteration number for parallel CGS and parallel CVB on NIPS are shown in Figure 2 (a) and (b) respectively. Since CVB actually maxmizes the variational lower bound L(q) on the training set, so we also investigated the convergence rate of the variational lower bound. The variational lower bound is computed using an exact method suggested in [9]. Figure 2 (c) shows the per word token variational lower bound as a function of iteration for P = 1, 10, 30 on a sampled 2http://archive.ics.uci.edu/ml/datasets/Bag+of+Words 6 subset of KOS (K = 64). Both parallel algorithms converge as rapidly as the single-processor LDA algorithms. Therefore, when P gets larger, convergence rate does not curtail the speedup. We surmise that these results in Figure 2 may be due to frequent synchronization and relative big step sizes in our algorithms. In fact, as we decreased the number of synchronizations in the parallel CVB, the result became significantly worse. The curve “µ=1/P, P=10” in Figure 2 (right) was obtained by setting λsync = λ( 1 P ). It converged considerably slower than the other curves because of its small step size. 0 50 100 150 200 250 300 1000 1200 1400 1600 1800 2000 2200 2400 2600 Perplexity Iteration CGS Parallel CGS, P=10 Parallel CGS, P=30 (a) 0 50 100 150 200 250 300 1200 1400 1600 1800 2000 2200 2400 2600 Perplexity Iteration µ=1/P, P=10 CVB Parallel CVB, P=10 Parallel CVB, P=30 (b) 0 50 100 150 -6.82 -6.80 -6.78 -6.76 -6.74 -6.72 -6.70 -6.68 -6.66 Variational lower bound Iteration CVB, P=1 Parallel CVB, P=10 Parallel CVB, P=30 (c) Figure 2: (a) Test set perplexity as a function of iteration number for the parallel CGS on NIPS, K = 256. (b) Test set perplexity as a function of iteration number for the parallel CVB on NIPS, K = 128. (c) Variational lower bound on a dataset sampled from KOS, K = 64. 4.2 Speedup The speedup is compared with a PC equipped with an Intel quad-core 2.4GHz CPU and 4 GBytes memory. Only one core of the CPU is used. All CPU implementations are compiled by Microsoft C++ compiler 8.0 with -O2 optimization. We did our best to optimize the code through experiments, such as using better data layout and reducing redundant computation. The final CPU code is almost twice as fast as the initial code. Our speedup experiments are conducted on the NIPS dataset for both parallel algorithms and the large NYT dataset for only the parallel CGS, because γij of the NYT dataset requires too much memory space to fit into our PC’s host memory. We measure the speedup on a range of P with or without data streaming. As the baseline, average running times on the CPU are: 4.24 seconds on NIPS (K = 256) and 22.1 seconds on NYT (K = 128) for the parallel CGS, and 11.1 seconds (K = 128) on NIPS for the parallel CVB. Figure 3 shows the speedup of the parallel CGS (left) and the speedup of the parallel CVB (right) with the data partition efficiency η under the speedup. We note that when P > 30, more threads are deployed on a multiprocessor. Therefore data transfer between the device memory and the multiprocessor is better hidden by computation on the threads. As a result, we have extra speedup when the number of “processors” (thread blocks) is larger than the number of multiprocessors on the GPU. P=10 P=30 P=60 8 12 16 20 24 28 P=10 P=30 P=60 0.5 0.6 0.7 0.8 0.9 1.0 Speedup NYT, Streaming NIPS, Streaming NIPS, No Streaming NYT NIPS η P=10 P=30 P=60 20 40 60 80 100 120 140 160 180 200 220 240 P=10 P=30 P=60 0.5 0.6 0.7 0.8 0.9 1.0 Speedup Streaming No Streaming η Figure 3: Speedup of parallel CGS (left) on NIPS and NYT, and speedup of parallel CVB (right) on NIPS. Average running times on the CPU are 4.24 seconds on NIPS and 22.1 seconds on NYT for the parallel CGS, and 11.1 seconds on NIPS for the parallel CVB, respectively. Although using data streaming reduces the speedup of parallel CVB due to the low bandwidth between the PC host memory and the GPU device memory, it enables us to use a GPU card to process large-volume data. 7 P=10 P=30 P=60 0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 η current even random Figure 4: data partition efficiency η of various data partition algorithms for P = 10, 30, 60. Due to the negligible overheads for the synchronization steps, the speedup is proportional to η in practice. The synchronization overhead is very small since P ≪ N and the speedup is largely determined by the maximal number of nonzero elements in all partitioned submatrices. As a result, the speedup (when not using data streaming) is proportional to ηP. The bandwidth between the PC host memory and the GPU device memory is ∼1.0 GB/s, which is higher than the computation bandwidth (size of data processed by the GPU per second) of the parallel CGS. Therefore, the speedup with or without data streaming is almost the same for the parallel CGS. But the speedup with or without data streaming differs dramatically for the parallel CVB, because its computation bandwidth is roughly ∼7.2 GB/s for K = 128 due to large memory usage of γij, higher than the maximal bandwidth that data streaming can provide. The high speedup of the parallel CVB without data streaming is due to a hardware supported exponential function and a high performance implementation of parallel reduction that is used to normalize γij calculated from (2). Figure 3 (right) shows that the larger the P, the smaller the speedup for the parallel CVB with data streaming. The reason is when P becomes large, the data streaming management becomes more complicated and introduces more latencies on data transfer. Figure 4 shows data partition efficiency η of various data partition algorithms for P = 10, 30, 60 on NIPS. “current” is the data partition algorithm proposed in section 3.3, “even” partitions documents and word vocabulary into roughly equal-sized subsets by setting jm = ⌊mD P ⌋and wn = ⌊nW P ⌋. “random” is a data partition obtained by randomly partitioning documents and words. We see that the proposed data partition algorithm outperforms the other algorithms. More than 20x speedup is achieved for both parallel algorithms with data streaming. The speedup of the parallel CGS enables us to run 1000 iterations (K=128) Gibbs sampling on the large NYT dataset within 1.5 hours, and it yields the same perplexity 3639 (S = 5) as the result obtained from 30-hour training on a CPU. 5 Related Works and Discussion Our work is closely related to several previous works, including the distributed LDA by Newman et al. [8], asynchronous distributed LDA by Asuncion et al. [1] and the parallelized variational EM algorithm for LDA by Nallapati et al. [7]. For these works LDA training was parallelized on distributed CPU clusters and achieved impressive speedup. Unlike their works, ours shows how to use GPUs to achieve significant, scalable speedup for LDA training while maintaining correct, accurate predictions. Masada et al. recently proposed a GPU implementation of CVB [6]. Masada et al. keep one copy of nwk while simply maintaining the same algorithmic structure for their GPU implementation as Newman et al. did on a CPU cluster. However, with the limited memory size of a GPU, compared to that of a CPU cluster, this can lead to memory access conflicts. This issue becomes severe when one performs many parallel jobs (threadblocks) and leads to wrong inference results and operation failure, as reported by Masada et al. Therefore, their method is not easily scalable due to memory access conflicts. Different from their approach, ours are scalable with more multiprocessors with the the proposed partitioning scheme and data streaming. They can also be used as general techniques to parallelize other machine learning models that involve sequential operations on matrix, such as online training of matrix factorization. Acknowledgements We thank Max Welling and David Newman for providing us with the link to the experimental data. We also thank the anonymous reviewers, Dong Zhang and Xianxing Zhang for their invaluable inputs. F. Yan conducted this research at Microsoft Research Asia. F. Yan and Y. Qi were supported by NSF IIS-0916443 and Microsoft Research. 8 References [1] A. Asuncion, P. Smyth, and M. Welling. Asynchronous distributed learning of topic models. In D. Koller, D. Schuurmans, Y. Bengio, and L. Bottou, editors, NIPS, pages 81–88. MIT Press, 2008. [2] A. Asuncion, M. Welling, P. Smyth, and Y. W. Teh. On smoothing and inference for topic models. In Proceedings of the International Conference on Uncertainty in Artificial Intelligence, 2009. [3] S. Boyd and L. Vandenberghe. Convex Optimization. Cambridge University Press, March 2004. [4] T. L. Griffiths and M. Steyvers. Finding scientific topics. Proceedings of the National Academy Science, 101 (suppl. 1):5228–5235, April 2004. [5] F. Labonte, P. Mattson, W. Thies, I. Buck, C. Kozyrakis, and M. Horowitz. The stream virtual machine. In PACT ’04: Proceedings of the 13th International Conference on Parallel Architectures and Compilation Techniques, pages 267–277, Washington, DC, USA, 2004. IEEE Computer Society. [6] T. Masada, T. Hamada, Y. Shibata, and K. Oguri. Accelerating collapsed variational bayesian inference for latent Dirichlet allocation with Nvidia CUDA compatible devices. In IEA-AIE, 2009. [7] R. Nallapati, W. Cohen, and J. Lafferty. Parallelized variational EM for latent Dirichlet allocation: An experimental evaluation of speed and scalability. 2007. [8] D. Newman, A. Asuncion, P. Smyth, and M. Welling. Distributed inference for latent Dirichlet allocation. In NIPS, 2007. [9] Y. W. Teh, D. Newman, and M. Welling. A collapsed variational Bayesian inference algorithm for Latent Dirichlet allocation. In B. Sch¨olkopf, J. C. Platt, and T. Hoffman, editors, NIPS, pages 1353–1360. MIT Press, 2006. 9
2009
239
3,747
Gaussian process regression with Student-t likelihood Jarno Vanhatalo Department of Biomedical Engineering and Computational Science Helsinki University of Technology Finland jarno.vanhatalo@tkk.fi Pasi Jyl¨anki Department of Biomedical Engineering and Computational Science Helsinki University of Technology Finland pasi.jylanki@tkk.fi Aki Vehtari Department of Biomedical Engineering and Computational Science Finland Helsinki University of Technology aki.vehtari@tkk.fi Abstract In the Gaussian process regression the observation model is commonly assumed to be Gaussian, which is convenient in computational perspective. However, the drawback is that the predictive accuracy of the model can be significantly compromised if the observations are contaminated by outliers. A robust observation model, such as the Student-t distribution, reduces the influence of outlying observations and improves the predictions. The problem, however, is the analytically intractable inference. In this work, we discuss the properties of a Gaussian process regression model with the Student-t likelihood and utilize the Laplace approximation for approximate inference. We compare our approach to a variational approximation and a Markov chain Monte Carlo scheme, which utilize the commonly used scale mixture representation of the Student-t distribution. 1 Introduction A commonly used observation model in the Gaussian process (GP) regression is the Normal distribution. This is convenient since the inference is analytically tractable up to the covariance function parameters. However, a known limitation with the Gaussian observation model is its non-robustness, and replacing the normal distribution with a heavy-tailed one, such as the Student-t distribution, can be useful in problems with outlying observations. If both the prior and the likelihood are Gaussian, the posterior is Gaussian with mean between the prior mean and the observations. In conflict this compromise is not supported by either of the information sources. Thus, outlying observations may significantly reduce the accuracy of the inference. For example, a single corrupted observation may pull the posterior expectation of the unknown function value considerably far from the level described by the other observations (see Figure 1). A robust, or outlier-prone, observation model would, however, weight down the outlying observations the more, the further away they are from the other observations and prior mean. The idea of robust regression is not new. Outlier rejection was described already by De Finetti [1] and theoretical results were given by Dawid [2], and O’Hagan [3]. Student-t observation model with linear regression was studied already by West [4] and Geweke [5], and Neal [6] introduced it for GP regression. Other robust observation models include, for example, mixtures of Gaussians, Laplace 1 (a) Gaussian observation model. (b) Student-t observation model. Figure 1: An example of regression with outliers by Neal [6]. On the left Gaussian and on the right the Student-t observation model. The real function is plotted with black line. distribution and input dependent observation models [7–10]. The challenge with the Student-t model is the inference, which is analytically intractable. A common approach has been to use the scalemixture representation of the Student-t distribution [5], which enables Gibbs sampling [5, 6], and a factorized variational approximation (VB) for the posterior inference [7, 11]. Here, we discuss the properties of the GP regression with a Student-t likelihood and utilize the Laplace approximation for the approximate inference. We discuss the known weaknesses of the approximation scheme and show that in practice it works very well and quickly. We use several different data sets to compare it to both a full MCMC and a factorial VB, which utilize the scale mixture equivalent of the Student-t distribution. We show that the predictive performances are similar and that the Laplace’s method approximates the posterior covariance somewhat better than VB. We also point out some of the similarities between these two methods and discuss their differences. 2 Robust regression with Gaussian processes Consider a regression problem, where the data comprise observations yi = f(xi) + ϵi at input locations X = {xi}n i=1, where the observation errors ϵ1, ..., ϵn are zero-mean exchangeable random variables. The object of inference is the latent function f, which is given a Gaussian process prior. This implies that any finite subset of latent variables, f = {f(xi)}n i=1, has a multivariate Gaussian distribution. In particular, at the observed input locations X the latent variables have a distribution p(f|X) = N(f|µ, Kf,f), (1) where Kf,f is the covariance matrix and µ the mean function. For the notational simplicity, we will use a zero-mean Gaussian process. Each element in the covariance matrix is a realization of covariance function, [Kf,f]ij = k(xi, xj), which represents the prior assumptions of the smoothness of the latent function (for a detailed introduction on GP regression see [12]). The covariance function used in this work is the stationary squared exponential kse(xi, xj) = σ2 se exp(−PD d=1(xi,d −xj,d)2/l2 d), where σ2 se is the scaling parameter and ld are the length-scales. A formal definition of robustness is given, for example, in terms of an outlier-prone observation model. The observation model is defined to be outlier-prone of order n, if p(f|y1, ..., yn+1) → p(f|y1, ..., yn) as yn+1 →∞[3, 4]. That is, the effect of a single conflicting observation to the posterior becomes asymptotically negligible as the observation approaches infinity. This contrasts heavily with the Gaussian observation model where each observation influences the posterior no matter how far it is from the others. The zero-mean Student-t distribution p(yi|fi, σ, ν) = Γ((ν + 1)/2) Γ(ν/2)√νπσ  1 + (yi −fi)2 νσ2 −(ν+1)/2 , (2) where ν is the degrees of freedom and σ the scale parameter [13], is outlier prone of order 1, and it can reject up to m outliers if there are at least 2m observations in all [3]. From this on we will collect all the hyperparameters into θ = {σ2 se, l1, ..., lD, σ, ν}. 2 3 Inference with the Laplace approximation 3.1 The conditional posterior of the latent variables Our approach is motivated by the Laplace approximation in GP classification [14]. A similar approximation has been considered by West [4] in the case of robust linear regression and by Rue et al. [15] in their integrated nested Laplace approximation (INLA). Below we follow the notation of Rasmussen and Williams [12]. A second order Taylor expansion of log p(f | y, θ) around the mode, gives a Gaussian approximation p(f | y, θ) ≈q(f | y, θ) = N(f |ˆf, Σ), where ˆf = arg maxf p(f | y, θ) and Σ−1 is the Hessian of the negative log conditional posterior at the mode ˆf [12, 13]: Σ−1 = −∇∇log p(f | y, θ)|f=ˆf = K-1 f,f +W, (3) where Wii = −(ν + 1) r2 i −νσ2 (r2 i + νσ2)2 , (4) ri = (yi −fi), and Wji = 0 if i ̸= j. 3.2 The maximum a posterior estimate of the hyperparameters To find a maximum a posterior estimate (MAP) for the hyperparameters, we write p(θ| y) ∝ p(y |θ)p(θ), where p(y |θ) = Z p(y| f)p(f |X, θ)d f, (5) is the marginal likelihood. To find an approximation, q(y |θ), for the marginal likelihood one can utilize the Laplace method second time [12]. A Taylor expansion of the logarithm of the integrand in (5) around ˆf gives a Gaussian integral over f multiplied by a constant, giving log q(y |θ) = log p(y|ˆf) −1 2 ˆf T K-1 f,f ˆf −1 2 log | Kf,f | −1 2 log | K-1 f,f +W|. (6) The hyperparameters can then be optimized by maximizing the approximate log marginal posterior, log q(θ| y) ∝log q(y |θ) + log p(θ). This is differentiable with respect to θ, which enables the use of gradient based optimization to find ˆθ = arg maxθ q(θ| y) [12]. 3.3 Making predictions The approximate posterior distribution of a latent variable f∗at a new input location x∗is also Gaussian, and therefore defined by its mean and variance [12] E q(f | y,θ)[f∗|X, y, x∗] = K∗,f K-1 f,f ˆf = K∗,f ∇log p(y |ˆf) (7) Var q(f | y,θ)[f∗|X, y, x∗] = K∗,∗−K∗,f(Kf,f +W−1)−1 Kf,∗. (8) The predictive distribution of a new observation is obtained by marginalizing over the posterior distribution of f∗ q(y∗|X, y, x∗) = Z p(y∗|f∗)q(f∗|X, y, x∗)df∗, (9) which can be evaluated, for example, with a Gaussian quadrature integration. 3.4 Properties of the Laplace approximation The Student-t distribution is not log-concave, and therefore the posterior distribution may be multimodal. The immediate concern from this is that a unimodal Laplace approximation may give a poor estimate for the posterior. This is, however, a problem for all unimodal approximations, 3 −15 −10 −5 0 5 0 1 latent value f p(f), p(f|D), p(y|f) prior likelih real posterior Laplace app VB approx −15 −10 −5 0 5 0 2 4 posterior mean of latent value f Var(f|D),Var(f) (a) Greater prior variance than likelihood variance −15 −10 −5 0 5 0 latent value f p(f), p(f|D), p(y|f) −15 −10 −5 0 5 posterior mean of latent value f Var(f|D),Var(f) 0.3 0.6 (b) Equal prior and likelihood variance Figure 2: A comparison of the Laplace and VB approximation for p(f|θ, y) in the case of a single observation with the Student-t likelihood and a Gaussian prior. The likelihood is centered at zero and the prior mean is altered. The upper plots show the probability density functions and the lower plots the variance of the true posterior and its approximations as a function of the posterior mean. such as the VB in [7, 11]. An other concern is that the estimate of the posterior precision, Σ−1 = −∇∇log p(f | y, θ)|f=ˆf, is essentially uncontrolled. However, at a posterior mode ˆf, the Hessian Σ−1 is always positive definite and in practice approximates the truth rather well according to our experiments. If the optimization for f ends up in a saddle point or the mode is very flat, Σ−1 may be close to singular, which leads to problems in the implementation. In this section, we will discuss these issues with simple examples and address the implementation in the section 4. Consider a single observation yi = 0 from a Student-t distribution with a Gaussian prior for its mean, fi. The behavior of the true posterior, the Laplace approximation, and VB as a function of prior mean are illustrated in the upper plots of the Figure 2. The dotted lines represent the situation, where the observation is a clear outlier in which case the posterior is very close to the prior (cf. section 2). The solid lines represent a situation where the prior and data agree, and the dashed lines represent a situation where the prior and data conflict moderately. The posterior of the mean is unimodal if Σ(fi)−1 = τ −2 i + W(fi) > 0, for all fi ∈ℜ, where τ 2 i is the prior variance and W(fi) is the Hessian of the negative log likelihood at fi (see equations (3) and (4)). With ν and σ fixed, W(fi) reaches its (negative) minimum at |yi−fi| = ± √ 3νσ, where Σ−1 = τ −2 i −(ν + 1)/(8νσ2). Therefore, the posterior distribution is unimodal if τ −2 i > (ν + 1)/(8νσ2), or in terms of variances if Var[yi|fi, ν, σ]/τ 2 i > (ν + 1)/(8(ν −2)) (for ν > 2). It follows that the most problematic situation for the Laplace approximation is when the prior is much wider than the likelihood. Then in the case of a moderate conflict (|yi −ˆfi| is close to √ 3νσ) the posterior may be multimodal (see the Figure 2(a)), meaning that it is unclear whether the observation is an outlier or not. In this case, W(fi) is negative and Σ−1 may be close to zero, which reflects uncertainty on the location. In the implementation this may lead to numerical problems but in practice, the problem becomes concrete only seldom as described in the section 4. The negative values of W relate to a decrease in the posterior precision compared to the prior precision. As long as the total precision remains positive it approximates the behavior of the true posterior rather well. The Student-t likelihood leads to a decrease in the variance from prior to posterior only if the prior mean and the observation are consistent with each other as shown in the Figure 2. This behavior is not captured with the factorized VB approximation [7], where W in q(f |θ, y) is replaced with a strictly positive diagonal that always increases the precision as illustrated in the Figure 2. 4 4 On the implementation 4.1 Posterior mode of the latent variables The mode of the latent variables, ˆf, can be found with general optimization methods such as the scaled conjugate gradients. The most robust and efficient method, however, proved to be the expectation maximization (EM) algorithm that utilizes the scale mixture representation of the Student-t distribution yi|fi ∼N(fi, Vi) (10) Vi ∼Inv-χ2(ν, σ2) (11) where each observation has its own noise variance Vi that is Inv-χ2 distributed. Following Gelman et al. [13], p. 456 the E-step of the algorithm consists of evaluating the expectation E  1 Vi yi, f old i , ν, σ  = ν + 1 νσ2 + (yi −f old i )2 , (12) after which the latent variables are updated in the M-step as ˆf new = (K-1 f,f +V−1)−1V−1y, (13) where V−1 is a diagonal matrix of the expectations in (12). In practice, we do not invert Kf,f and, thus, ˆf is updated using the Woodbury-Sherman-Morrison [e.g. 16] lemma ˆf new = (Kf,f −Kf,f V−1/2B−1V−1/2 Kf,f)V−1y = Kf,f a (14) where matrix B = I + V−1/2 Kf,f V−1/2. This is numerically more stable than directly inverting the covariance matrix, and gives as an intermediate result the vector a = K-1 f,f ˆf for later use. 4.2 Approximate marginal likelihood Rasmussen and Williams [12] discuss a numerically stable formulation to evaluate the approximate marginal likelihood and its gradients with a classification model. Their approach relies on W being non-negative, for which reason it requires some modification for our setting. With the Student-t likelihood, we found the most stable formulation for (6) is log q(y |θ) = log p(y|ˆf) −1 2 ˆf Ta − n X i=1 log Rii + n X i=1 log Lii, (15) where R and L are the Cholesky decomposition of Kf,f and Σ = (K-1 f,f +W)−1, and a is obtained from the EM algorithm. The only problematic term is the last one, which is numerically unstable if evaluated directly. We could evaluate first Σ = Kf,f −Kf,f(W−1 + Kf,f)−1 Kf,f, but this is in many cases even worse than the direct evaluation, since W−1 might have arbitrary large negative values. For this reason, we evaluate LLT = Σ using a rank one Cholesky updates in a specific order. After L is found it can also be used in the predictive variance (8) and in the gradients of (6) with only minor modification to equations given in [12]. We write first the posterior covariance as Σ = (K-1 f,f +W)−1 = (K-1 f,f +e1eT 1W11 + e2eT 2W22 + ...eneT nWnn)−1, (16) where ei is the ith unit vector. The terms eieT i Wii are added iteratively and the Cholesky decomposition of Σ is updated accordingly. At the beginning L = chol(Kf,f), and at iteration step i+1 we use the rank one Cholesky update to find L(i+1) = chol  L(i)(L(i))T −sisT i δi  , (17) where si is the ith column of Σ(i) and δi = Wii(Σ(i) ii )−1/((Σ(i) ii )−1 + Wii). If Wii is positive we conduct a Cholesky downdate, and if Wii < 0 and (Σ(i) ii )−1 + Wii > 0 we have a Cholesky update which increases the covariance. The increase may be arbitrary large if (Σ(i) ii )−1 ≈−Wii, but in 5 practice it can be limited. Problems arise also if Wii < 0 and (Σ(i) ii )−1 + Wii ≤0, since then the resulting Cholesky downdate is not positive definite. This should not happen if ˆf is at local maxima, but in practice it may be in a saddle point or this happens because of numerical instability or the iterative framework to update the Cholesky decomposition. The problem is prevented by adding the diagonals in a decreasing order, that is, first the ”normal” observations and last the outliers. A single Cholesky update is analogous to the discussion in section 3.4 in that the posterior covariance is updated using the result of the previous iteration as a prior. If we added the negative W values at the beginning, Σii, (the prior variance) could be so large that either (Σ(i) ii )−1 + Wii ≤0 or (Σ(i) ii )−1 ≈−Wii, in which case the posterior covariance Σ(i+1) ii could become singular or arbitrary large and lead to problems in the later iterations (compare to the dashed black line in the Figure 2(a)). Adding first the largest W we reduce Σ so that negative values of W are less problematic (compare to the dashed black line in the Figure 2(b)), and the updates are numerically more stable. During the Cholesky updates, we cross-check with the condition (Σ(i) ii )−1+Wii ≥0 that everything is fine. If the condition is not fulfilled our code prints a warning and replaces Wii with −1/(2Σ(i) ii ). This ensures that the Cholesky update will remain positive definite and doubles the marginal variance instead. However, in practice we never encountered any warnings in our experiments if the hyperparameters were initialized sensibly so that the prior was tight compared to the likelihood. 5 Relation to other work Neal [6] implemented the Student-t model for the Gaussian process via Markov chain Monte Carlo utilizing the scale mixture representation. However, the most similar approaches to the Laplace approximation are the VB approximation [7, 11] and the one in INLA [15]. Here we will shortly summarize them. The difference between INLA and GP framework is that INLA utilizes Gaussian Markov random fields (GMRF) in place of the Gaussian process. The Gaussian approximation for p(f | y, θ) in INLA is the same as the Laplace approximation here with the covariance function replaced by a precision matrix. Rue et al. [15] derive the approximation for the log marginal posterior, log p(θ| y), from p(θ| y) ≈q(θ| y) ∝p(y, f, θ) q(f |θ, y) f=ˆf = p(y | f)p(f |θ)p(θ) q(f |θ, y) f=ˆf. (18) The proportionality sign is due to the fact that the normalization constant for p(f, θ| y) is unknown. This is exactly the same as the approximation derived in the section 3.2. Taking the logarithm of (18) we end up in log q(θ| y) ∝log q(y |θ) + log p(θ), where log q(y |θ) is given in (6). In the variational approximation [7], the joint posterior of the latent variables and the scale parameters in the scale mixture representation (10)-(11) is approximated with a factorizing distribution p(f, V| y, θ) ≈q(f)q(V), where q(f) = N(f |m, A) and q(V) = Πn i=1Inv-χ2(Vii|˜ν/2, ˜σ2/2), where ˜θ = {m, A, ˜ν, ˜σ2} are the parameters of the variational approximation. The approximate distributions and the hyperparameters are updated in turns so that ˜θ are updated with current estimate for θ and after that θ is updated with fixed ˜θ. The variational approximation for the conditional posterior is p(f | y, ˆθ, ˆV) ≈N(f |m, A). Here, A = (K-1 f,f + ˆV−1)−1, and the iterative search for the posterior parameters m and A is the same as the EM algorithm described in section 4 except that the update of E  V −1 ii  in (12) is replaced with E  V −1 ii  = (ν +1)/(σ2 +Aold ii +(yi −mold i )2). Thus, the Laplace and the variational approximation are very similar. In practice, the posterior mode, m, is very close to the mode ˆf, and the main difference between the approximations is in the covariance and the hyperparameter estimates. In the variational approximation ˆθ is searched by maximizing the variational lower bound V =Eq(f,V| y,θ)  log p(y, f, V, θ) q(f | y, θ)q(V| y, θ)  =Eq(f,V| y,θ)  log p(y | f, V)p(f |θ)p(V|θ)p(θ) q(f, V| y, θ)  , (19) where we have made visible the implicit dependence of the approximations q(f) and q(V) to the data and hyperparameters, and included prior for θ. The variational lower bound is similar to the ap6 Table 1: The RMSE and NLP statistics on the experiments. The RMSE error The NLP statistics Neal Friedman Housing Concrete Neal Friedman Housing Concrete G 0.393 0.324 0.324 0.230 0.254 0.227 1.249 0.0642 T-lapl 0.028 0.220 0.289 0.231 -2.181 -0.16 0.080 -0.116 T-vb 0.029 0.220 0.294 0.212 -2.228 -0.049 0.091 -0.132 T-mcmc 0.055 0.253 0.287 0.197 -1.907 -0.106 0.029 -0.241 proximate log marginal posterior (18). Only the point estimate ˆf is replaced with averaging over the approximating distribution q(f, V| y, θ). The other difference is that in the Laplace approximation the scale parameters V are marginalized out and it approximates directly p(f | y, θ). 6 Experiments We studied four data sets: 1) Neal data [6] with 100 data points and one input shown in Figure 1. 2) Friedman data with a nonlinear function of 10 inputs, from which we generated 10 data sets with 100 training points including 10 randomly selected outliers as described by Kuss [7], p. 83. 3) The Boston housing data that summarize median house prices in Boston metropolitan area for 506 data points and 13 input variables [7]. 4) Concrete data that summarize the quality of concrete casting as a function of 27 variables for 215 measurements [17]. In earlier experiments, the Student-t model has worked better than the Gaussian observation model in all of these data sets. The predictive performance is measured with a root mean squared error (RMSE) and a negative log predictive density (NLP). With simulated data these are evaluated for a test set of 1000 latent variables. With real data we use 10-fold cross-validation. The compared observation models are Gaussian (G) and Student-t (T). The Student-t model is inferred using the Laplace approximation (lapl), VB (vb) [7] and full MCMC (mcmc) [6]. The Gaussian observation model, the Laplace approximation and VB are evaluated at ˆθ, and in MCMC we sample θ. INLA is excluded from the experiments since GMRF model can not be constructed naturally for these non-regularly distributed data sets. The results are summarized in the Table 1. The significance of the differences in performance is approximated using a Gaussian approximation for the distribution of the NLP and RMSE statistics [17]. The Student-t model is significantly better than the Gaussian with higher than 95% probability in all other tests but in the RMSE with the concrete data. There is no significant difference between the Laplace approximation, VB and MCMC. The inference time was the shortest with Gaussian observation model and the longest with the Student-t model utilizing full MCMC. The Laplace approximation for the Student-t likelihood took in average 50% more time than the Gaussian model, and VB was in average 8-10 times slower than the Laplace approximation. The reason for this is that in VB two sets of parameters, θ and ˜θ, are updated in turns, which slows down the convergence of hyperparameters. In the Laplace approximation we have to optimize only θ. Figure 3 shows the mean and the variance of p(f |ˆθ, y) for MCMC versus the Laplace approximation and VB. The mean of the Laplace approximation and VB match equally well the mean of the MCMC solution, but VB underestimates the variance more than the Laplace approximation (see also the figure 2). In the housing data, both approximations underestimate the variance remarkably for few data points (40 of 506) that were located as clusters at places where inputs, x are truncated along one or more dimension. At these locations, the marginal posteriors were slightly skew and their tails were rather heavy, and thus a Gaussian approximation presumably underestimates the variance. The degrees of freedom of the Student-t likelihood were optimized only in Neal data and Boston housing data using the Laplace approximation. In other data sets, there was not enough information to infer ν and it was set to 4. Optimizing ν was more problematic for VB than for the Laplace approximation probably because the factorized approximation makes it harder to identify ν. The MAP estimates ˆθ found by the Laplace approximation and VB were slightly different. This is reasonable since the optimized functions (18) and (19) are also different. 7 (a) Neal data (b) Friedman data (c) Boston housing data (d) Concrete data Figure 3: Scatter plot of the posterior mean and variance of the latent variables. Upper row consists means, and lower row variances. In each figure, left plot is for MCMC (x-axis) vs the Laplace approximation (y-axis) and the right plot is MCMC (x-axis) vs. VB (y-axis). 7 Discussion In our experiments we found that the predictive performance of both the Laplace approximation and the factorial VB is similar with the full MCMC. Compared to the MCMC the Laplace approximation and VB estimate the posterior mean E[f |ˆθ, y] similarly but VB underestimates the posterior variance Var[f |ˆθ, y] more than the Laplace approximation. Optimizing the hyperparameters is clearly faster with the Laplace approximation than with VB. Both the Laplace and the VB approximation estimate the posterior precision as a sum of a prior precision and a diagonal matrix. In VB the diagonal is strictly positive, whereas in the Laplace approximation the diagonal elements corresponding to outlying observations are negative. The Laplace approximation is closer to the reality in that respect since the outlying observations have a negative effect on the (true) posterior precision. This happens because VB minimizes KL(q(f)q(V)||p(f, V)), which requires that the q(f, V) must be close to zero whenever p(f, V) is (see for example [18]). Since a posteriori f and V are correlated, the marginal q(f) underestimates the effect of marginalizing over the scale parameters. The Laplace approximation, on the other hand, tries to estimate directly the posterior p(f) of the latent variables. Recently, Opper and Archambeau [19] discussed the relation between the Laplace approximation and VB, and proposed a variational approximation directly for the latent variables and tried it with a Cauchy likelihood (they did not perform extensive experiments though). Presumably their implementation would give better estimate for p(f) than the factorized approximation. However, experiments on that respect are left for future. The advantage of VB is that the objective function (19) is a rigorous lower bound for p(y |θ), whereas the Laplace approximation (18) is not. However, the marginal posteriors p(f | y, θ) in our experiments (inferred with MCMC) were so close to Gaussian that the Laplace approximation q(f |θ, y) should be very accurate and, thus, the approximation for p(θ| y) (18) should also be close to the truth (see also justifications in [15]). In recent years the expectation propagation (EP) algorithm [20] has been demonstrated to be very accurate and efficient method for approximate inference in many models with factorizing likelihoods. However, the Student-t likelihood is problematic for EP since it is not log-concave, for which reason EPs estimate for the posterior covariance may become singular during the site updates [21]. The reason for this is that the variance parameters of the site approximations may become negative. As demonstrated with Laplace approximation here, this reflects the behavior of the true posterior. We assume that the problem can be overcome, but we are not aware of any work that would have solved this problem. Acknowledgments This research was funded by the Academy of Finland, and the Graduate School in Electronics and Telecommunications and Automation (GETA). The first and second author thank also the Finnish Foundation for Economic and Technology Sciences - KAUTE, Finnish Cultural Foundation, Emil Aaltonen Foundation, and Finnish Foundation for Technology Promotion for supporting their post graduate studies. 8 References [1] Bruno De Finetti. The Bayesian approach to the rejection of outliers. In Proceedings of the fourth Berkeley Symposium on Mathematical Statistics and Probability, pages 199–210. University of California Press, 1961. [2] A. Philip Dawid. Posterior expectations for large observations. Biometrika, 60(3):664–667, December 1973. [3] Anthony O’Hagan. On outlier rejection phenomena in Bayes inference. Royal Statistical Society. Series B., 41(3):358–367, 1979. [4] Mike West. Outlier models and prior distributions in Bayesian linear regression. Journal of Royal Statistical Society. Serires B., 46(3):431–439, 1984. [5] John Geweke. Bayesian treatment of the independent Student-t linear model. Journal of Applied Econometrics, 8:519–540, 1993. [6] Radford M. Neal. Monte Carlo Implementation of Gaussian Process Models for Bayesian Regression and Classification. Technical Report 9702, Dept. of statistics and Dept. of Computer Science, University of Toronto, January 1997. [7] Malte Kuss. Gaussian Process Models for Robust Regression, Classification, and Reinforcement Learning. PhD thesis, Technische Universit¨at Darmstadt, 2006. [8] Paul W. Goldberg, Christopher K.I. Williams, and Christopher M. Bishop. Regression with input-dependent noise: A Gaussian process treatment. In M. I. Jordan, M. J. Kearns, and S. A Solla, editors, Advances in Neural Information Processing Systems 10. MIT Press, Cambridge, MA, 1998. [9] Andrew Naish-Guzman and Sean Holden. Robust regression with twinned gaussian processes. In J.C. Platt, D. Koller, Y. Singer, and S. Roweis, editors, Advances in Neural Information Processing Systems 20, pages 1065–1072. MIT Press, Cambridge, MA, 2008. [10] Oliver Stegle, Sebastian V. Fallert, David J. C. MacKay, and Søren Brage. Gaussian process robust regression for noisy heart rate data. Biomedical Engineering, IEEE Transactions on, 55 (9):2143–2151, September 2008. ISSN 0018-9294. doi: 10.1109/TBME.2008.923118. [11] Michael E. Tipping and Neil D. Lawrence. Variational inference for Student-t models: Robust bayesian interpolation and generalised component analysis. Neurocomputing, 69:123–141, 2005. [12] Carl Edward Rasmussen and Christopher K. I. Williams. Gaussian Processes for Machine Learning. The MIT Press, 2006. [13] Andrew Gelman, John B. Carlin, Hal S. Stern, and Donald B. Rubin. Bayesian Data Analysis. Chapman & Hall/CRC, second edition, 2004. [14] Christopher K. I. Williams and David Barber. Bayesian classification with Gaussian processes. IEEE Transactions on Pattern Analysis and Machine Intelligence, 20(12):1342–1351, 1998. [15] H˚avard Rue, Sara Martino, and Nicolas Chopin. Approximate Bayesian inference for latent Gaussian models by using integrated nested Laplace approximations. Journal of Royal statistical Society B, 71(2):1–35, 2009. [16] David A. Harville. Matrix Algebra From a Statistician’s Perspective. Springer-Verlag, 1997. [17] Aki Vehtari and Jouko Lampinen. Bayesian model assessment and comparison using crossvalidation predictive densities. Neural Computation, 14(10):2439–2468, 2002. [18] Christopher M. Bishop. Pattern Recognition and Machine Learning. Springer Science +Business Media, LLC, 2006. [19] Manfred Opper and C´edric Archambeau. The variational Gaussian approximation revisited. Neural Computation, 21(3):786–792, March 2009. [20] Thomas Minka. A family of algorithms for approximate Bayesian inference. PhD thesis, Massachusetts Institute of Technology, 2001. [21] Matthias Seeger. Bayesian inference and optimal design for the sparse linear model. Journal of Machine Learning Research, 9:759–813, 2008. 9
2009
24
3,748
Local Rules for Global MAP: When Do They Work ? Kyomin Jung∗ KAIST Daejeon, Korea kyomin@kaist.edu Pushmeet Kohli Microsoft Research Cambridge, UK pkohli@microsoft.com Devavrat Shah MIT Cambridge, MA, USA devavrat@mit.edu Abstract We consider the question of computing Maximum A Posteriori (MAP) assignment in an arbitrary pair-wise Markov Random Field (MRF). We present a randomized iterative algorithm based on simple local updates. The algorithm, starting with an arbitrary initial assignment, updates it in each iteration by first, picking a random node, then selecting an (appropriately chosen) random local neighborhood and optimizing over this local neighborhood. Somewhat surprisingly, we show that this algorithm finds a near optimal assignment within n log2 n iterations with high probability for any n node pair-wise MRF with geometry (i.e. MRF graph with polynomial growth) with the approximation error depending on (in a reasonable manner) the geometric growth rate of the graph and the average radius of the local neighborhood – this allows for a graceful tradeoff between the complexity of the algorithm and the approximation error. Through extensive simulations, we show that our algorithm finds extremely good approximate solutions for various kinds of MRFs with geometry. 1 Introduction The abstraction of Markov random field (MRF) allows one to utilize graphical representation to capture inter-dependencybetween large number of random variables in a succinct manner. The MRF based models have been utilized successfully in the context of coding (e.g. the low density parity check code [15]), statistical physics (e.g. the Ising model [5]), natural language processing [13] and image processing in computer vision [11,12, 19]. In most applications, the primary inference question of interest is that of finding maximum a posteriori (MAP) solution – e.g. finding a most likely transmitted message based on the received signal. Related Work. Computing the exact MAP solution in general probabilistic models is an NP-hard problem. This had led researchers to resort of fast approximate algorithms. Various such algorithmic approaches have been developed over more than the past three decades. In essence, all such approaches try to find a locally optimal solution of the problem through iterative procedure. These ”local update” algorithms start from an initial solution and proceed by making a series of changes which lead to solutions having lower energy (or better likelihood), and hence are also called ”move making algorithms”. At each step, the algorithms search the space of all possible local changes that can be made to the current solution (also called move space), and choose the one which leads to the solution having the highest probability or lowest energy. One such algorithm (which has been rediscovered multiple times) is called Iterated Conditional Modes or ICM for short. Its local update involves selecting (randomly or deterministically) a variable of the problem. Keeping the values of all other variables fixed, the value of the selected variable ∗This work was partially carried out while the author was visiting Microsoft Research Cambridge, and was partially supported by NSF CAREER project CNS-0546590. 1 is chosen which results in a solution with the maximum probability. This process is repeated by selecting other variables until the probability cannot be increased further. The size of the move space is the defining characteristic of any such move making algorithm. A large move space means that more extensive changes to the current solution can be made. This makes the algorithm less prone to getting stuck in local minima and also results in a faster rate of convergence. Expansion and Swap are move making algorithms which search for the optimal move in a move space of size 2n where n is the number of random variables. For energy functions composed of metric pairwise potentials, the optimal move can be found in polynomial time by minimizing a submodular quadratic pseudo-boolean function [3] (or solving an equivalent minimum cost st-cut problem). The last few years have seen a lot of interest in st-mincut based move algorithms for energy minimization. Komodakis et al. [9] recently gave an alternative interpretation of the expansion algorithm. They showed that expansion can be seen as solving the dual of a linear programming relaxation of the energy minimization problem. Researchers have also proposed a number of novel move encoding strategies for solving particular forms of energy functions. Veksler [18] proposed a move algorithm in which variables can choose any label from a range of labels. They showed that this move space allowed them to obtain better minima of energy functions with truncated convex pairwise terms. Kumar and Torr [10] have since shown that the range move algorithm achieves the same guarantees as the ones obtained by methods based on the standard linear programming relaxation. A related popular algorithmic approach is based on max-product belief propagation (cf. [14] and [22]). In a sense, it can be viewed as an iterative algorithm that makes local updates based optimizing based on the immediate graphical structure. There is a long list of literature on understanding the conditions under which max-product belief propagationalgorithm find correct solution. Specifically, in recent years a sequence of results suggest that there is an intimate relation between the maxproduct algorithm and a natural linear programming relaxation – for example, see [1,2,8,16,21]. We also note that Swendsen-Wang algorithm (SW) [17], a local flipping algorithm, has a philosophy similar to ours in that it repeats a process of randomly partitioning the graph, and computing an assignment. However, the graph partitioning of SW is fundamentally different from ours and there is no known guarantee for the error bound of SW. In summary, all the approaches thus far with provable guarantees for local update based algorithm are primarily for linear or more generally convex optimization setup. Our Contribution. As the main result of this paper, we propose a randomized iterative local algorithm that is based on simple local updates. The algorithm, starting with an arbitrary initial assignment, updates it in each iteration by first picking a random node, then its (appropriate) random local neighborhood and optimizing over this local neighborhood. Somewhat surprisingly, we show that this algorithm finds near optimal assignment within n log2 n iterations with high probability for graphs with geometry – i.e. graphs in which the neighborhood of each node within distance r grows no faster than a polynomial in r. Such graphs can have arbitrarily structure subject to this polynomial growth structure. We show that the approximation error depends gracefully on the average random radius of the local neighborhood and degree of polynomial growth of the graph. Overall, our algorithm can provide an ε−approximation MAP with C(ε)n log 2 n total computation with C(ε) depending only on ε and the degree of polynomial growth. The crucial novel feature of our algorithm is the appropriate selection of random local neighborhood rather than deterministic in order to achieve provable performance guarantee. We note that near optimality of our algorithm does not depend on convexity property, or tree-like structure as many of the previous works; but only relies on geometry of the graphical structure which is present in many graphical models of interest such as those arising in image processing, wireless networks, etc. We use our algorithm to verify its performance in simulation scenario. Specifically, we apply our algorithm to two popular setting: (a) a grid graph based pairwise MRF with varying node and edge interaction strengths, and (b) a grid graph based MRF on the weighted independent set (or hardcore) model. We find that with very small radius (within 3), we find assignment which within 1% (0.99 factor) of the MAP for a large range of parameters and upto graph of 1000 nodes. 2 Organization. We start by formally stating our problem statement and main theorem (Theorem 1) in Section 2. This is followed by a detailed description of the algorithm in Section 3. We present the sketch proof of the main result in Section 4. Finally, we provide a detailed simulation results in Section 5. 2 Main Results We start with the formal problem description and useful definitions/notations followed by the statement of the main result about performance of the algorithm. The algorithm will be stated in the next section. Definitions & Problem Statement. Our interest is in a pair-wise MRF defined next. We note that, formally all (non pair-wise) MRFs are equivalent to pair-wise MRFs – e.g. see [20]. Definition 1 (Pair-wise MRF). A pair-wise MRF based on graph G = (V, E) with n = |V | vertices and edge set E is defined by associated a random variable X v with each vertex v ∈V taking value in finite alphabet set Σ; the joint distribution of X = (Xv)v∈V defined as Pr[X = x] ∝  v∈V Ψv(xv) ·  (u,v)∈E Ψuv(xu, xv) (1) where Ψv : Σ →R+ and Ψuv : Σ2 →R+ are called node and edge potential functions. 1 In this paper, the question of interest is to find the maximum a posteriori (MAP) assignment x ∗∈ Σn, i.e. x∗∈arg max x∈Σn Pr[X = x]. Equivalently, from the optimization point of view, we wish to find an optimal assignment of the problem maximize H(x) over x ∈Σn, where H(x) =  v∈V ln Ψv(xv) +  (u,v)∈E ln Ψuv(xu, xv). For completeness and simplicity of exposition, we assume that the function H is finite valued over Σn. However, results of this paper extend for hard constrained problems such as the hardcore or independent set model. In this paper, we will design algorithms for finding approximate MAP problem. Specifically, we call an assignment x as an ε-approximate MAP if (1 −ε)H(x∗) ≤H(x) ≤H(x∗). Graphs with Geometry. We define notion of graphs with geometry here. To this end, a graph G = (V, E) induces a natural ‘graph metric’ on vertices V , denoted by d G : V × V →R+ with dG(v, u) as the length of the shortest path between u and v; with it defined as ∞if there is no path between them. Definition 2 (Graph with Polynomial Growth). We call a graph G with polynomial growth of degree (or growth rate) ρ, if for any v ∈V and r ∈N, |BG(v, r)| ≤C · rρ, where C > 0 is a universal constant and BG(v, r) = {w ∈V |dG(w, v) < r}. A large class of graph model naturally fall into the graphs with polynomial growth. To begin with, the standard d-dimensional regular grid graphs have polynomial growth rate d – e.g. d = 1 is the line graph. More generally, in recent years in the context of computational geometry and metric embedding, the graphs with finite doubling dimensions have become popular object of study [6,7]. 1We assume the positivity of Ψv’s and Ψuv’s for simplicity of analysis. 3 It can be checked that a graph with doubling dimension ρ is also a graph with polynomial growth rate ρ. Finally, the popular geometric graph model where nodes are placed arbitrarily on a two dimensional surface with minimum distance separation and two nodes have an edge between them if they are within certain finite distance, then it is indeed a graph with finite polynomial growth rate. Statement of Main Result. The main result of this paper is a randomized iterative algorithm based on simple local updates. In essence the algorithm works as follows. It starts with an arbitrary initial assignment. In each iteration, it picks a node, say v from all n nodes of V , uniformly at random and picks a random radius Q (as per specific distribution). The algorithm re-assigns values to all nodes within distance Q of node v with respect to graph distance dG by finding the optimal assignment for this local neighborhood subject to keeping the assignment to all other nodes the same. The algorithm LOC-ALGO described in Section 3 repeats this process for n log 2 n many times. We show that LOC-ALGO finds near optimal solution with high probability as long as the graph has finite polynomial growth rate. Theorem 1. Given MRF based on graph G = (V, E) of n = |V | nodes with polynomial growth rate ρ and approximation parameter ε ∈(0, 1), our algorithm LOC-ALGO with O (log(1/δ)n log n) iterations produces a solution x such that Pr[H(x∗) −H(x) ≤2εH(x∗)] ≥1 −δ − 1 poly(n). And each iteration takes at most ζ(ε, ρ) computation, with ζ(ε, ρ) ≤|Σ|CK(ε,ρ)ρ, where K(ε, ρ) is defined as K = K(ε, ρ) = 8ρ ϕ log 8ρ ϕ  + 4 ϕ log C + 4 ϕ log 1 ϕ + 2 with ϕ = ε 5C2ρ . In a nutshell, Theorem 1 say that the complexity of the algorithm for obtaining an ε-approximation scales almost linearly in n, double exponentially in 1/ε and ρ. On one hand, this result establishes that it is indeed possible to have polynomial (or almost linear) time approximation algorithm for arbitrary pair-wise MRF with polynomial growth. On the other hand, though theoretical bound on the pre-constant ζ(ε, ρ) as function of 1/ε and ρ is not very exciting, our simulations suggest (see Section 5) that even for hard problem setup, the performance is much more optimistic than predicted by these theoretical bounds. Therefore, as a recommendation for a system designer, we suggest use of smaller ‘radius’ distribution in algorithm described in Section 3 for obtaining good algorithm. 3 Algorithm Description In this section, we provide details of the algorithm intuitively described in the previous section. As noted earlier, the algorithm iteratively updates its estimation of MAP, denoted by x. Initially, the x is chosen arbitrarily. Iteratively, at each step a vertex v ∈V is chosen uniformly at random along with a random radius Q that is chosen independently as per distribution Q. Then, select R ⊂V , the local neighborhood(or ball) of radius Q around v as per graph distance d G, i.e. {w ∈V |dG(u, w) < Q}. Then while keeping the assignment of all nodes in V \R fixed as per x = (ˆxv)v∈V , find MAP assignment x∗,R restricted to nodes of R. And, update the assignment of nodes in v ∈R as per x∗,R. A caricature of an iteration is described in Figure 1. The precise description of the algorithm is given in Figure 2. In order to have good performance, it is essential to choose appropriate distribution Q for selection of random radius Q each time. Next, we define this distribution which is essentially a truncated Geometric distribution. Specifically, given parameters ε ∈(0, 1) and the polynomial growth rate ρ (with constant C) of the graph, define ϕ = ε 5C2ρ , and K = K(ε, ρ) = 8ρ ϕ log 8ρ ϕ  + 4 ϕ log C + 4 ϕ log 1 ϕ + 2. Then, the distribution (or random variable) Q is defined over integers from 1 to K(ε, ρ) as Pr[Q = i] = ϕ(1 −ϕ)i−1 if 1 ≤i < K(ε, ρ) (1 −ϕ)K−1 if i = K(ε, ρ) . 4 Graph G Graph G Q u 1 ) 1( ] Pr[   i i Q H H for )1 (, 3,2,1  K i  Figure 1: Pictorial description of an iteration of LOC-ALGO. LOC-ALGO(ε, K) (0) Input: MRF G = (V, E) with φi(·), i ∈V , ψij(·, ·), (i, j) ∈E. (1) Initially, select x ∈Σn arbitrarily. (2) Do the following for n log2 n many times : (a) Choose an element u ∈V uniformly at random. (b) Draw a random number Q according to the distribution Q. (c) Let R ←{w ∈V |dG(u, w) < Q}. (d) Through dynamic programming (or exhaustive computation) find an exact MAP x∗,R for R while fixing all the other assignment of x value outside R. (e) Change values of x for R by x∗,R. (3) Output x. Figure 2: Algorithm for approximate MAP computation. 4 Proof of Theorem 1 In this section, we present proof of Theorem 1. To that end, we will prove the following Lemma. Lemma 1. If we run the LOC-ALGO with (2n ln n) iterations, with probability at least 1 −1/n, we have (1 −ε)H(x∗) ≤E[H(x)] ≤H(x∗). From Lemma 1, we obtain Theorem 1 as follows. Define T = 2 log(1/δ), and consider LOCALGO with (2T n ln n) iterations. From the fact that H(x∗) −H(x) ≥0, and by the Markov inequality applied to H(x∗) −H(x) with Lemma 1, we have that after (2n ln n) iterations, Pr[H(x∗) −H(x) ≤2εH(x∗)] ≥1 2. (2) Note that (2) is true for any initial assignment of LOC-ALGO. Hence for each 1 ≤t ≤T , after (2tn ln n) iterations, (2) holds independently with probability 1 −1/n. Also, note that H( x) is increasing monotonically. Hence, H(x∗)−H(x) > 2εH(x∗) holds after (2T n lnn) iterations only if the same holds after (2tn ln n) iterations for all 1 ≤t ≤T . Hence, after (2T n ln n) iterations, we have Pr[H(x∗) −H(x) ≤2εH(x∗)] ≥1 −δ −1/poly(n), which proves the first part of Theorem 1. For the total computation bound in Theorem 1, note that each iteration of LOC-ALGO involves dynamic programming over a local neighborhood of radius at most K = K(ε, ρ) around a node. 5 This involves, due to the polynomial growth condition, at most CK ρ nodes. Each variable can takes at most |Σ| different values. Therefore, dynamic programming (or exhaustive search) can take at most |Σ|CKρ operations as claimed. Proof of Lemma 1. First observe that by the standard argument in the classical coupon collector problem with n coupons (e.g. see [4]), it follows that after 2n ln n iterations, with probability at least 1 −1/n, all the vertices of V will be chosen as ‘ball centers’ at least once. Error bound. Now we prove that if all the vertices of V are chosen as ‘ball centers’ at least once, the answer x generated by LOC-ALGO after 2n ln n iterations, is indeed an ε-approximationon average. To this end, we construct an imaginarily set of edges as follows. Imagine that the procedure (2) of LOC-ALGO is done with an iteration parameter t ∈Z+. Then for each vertex v ∈V, we assign the largest iteration number t such that the chosen ball R at the iteration t contains w. That is, T (v) = max{t ∈Z+| LOC-ALGO chooses v as a member of R at iteration t}. Clearly, this is well defined algorithm is run till each node is chosen as the ‘ball center’ at least once. Now define an imaginary boundary set of LOC-ALGO as B = {(u, w) ∈E|T (u) ̸= T (w)}. Now consider graph G′ = (V, E\B) obtained by removing edges B from G. In this graph, nodes of the same connected component have same T (·) value. Next, we state two Lemmas that will be crucial to the proof of the Theorem. Proof of Lemmas 2 and 3 are omitted. Lemma 2. Given two MRFs X1 and X2 on the same graph G = (V, E) with identical edge potentials {ψij(·, ·)}, (i, j) ∈E but distinct node potentials {φ1 i (·)}, {φ2 i (·)}, i ∈V respectively. For each i ∈V, define φD i = maxσ∈Σ φ1 i (σ) −φ2 i (σ)  . Finally, for ℓ∈{1, 2} and any x ∈Σn, define Hℓ(x) = i∈V φℓ i(xi) + (i,j)∈E ψij(xi, xj), with x∗,ℓbeing a MAP assignment of MRF xℓ. Then, we have |H1(x∗,1) −H1(x2,∗)| ≤2 i∈V φD i . Lemma 3. Given MRF X defined on G (as in (1)), the algorithm LOC-ALGO produces output x such that |H(x∗) −H(x)| ≤5 ⎛ ⎝ (i,j)∈B ψU ij −ψL ij ⎞ ⎠, where B is the (random) imaginary boundary set of LOC-ALGO, ψ U ij ≜maxσ,σ′∈Σ ψij(σ, σ′), and ψL ij ≜minσ,σ′∈Σ ψij(σ, σ′). Now we obtain the following lemma that utilizes the fact that the distribution Q follows a geometric distribution with rate (1 −ϕ) – its proof is omitted. Lemma 4. For any edge e ∈E of G, Pr[e ∈B] ≤ϕ. From Lemma 4, we obtain that  (i,j)∈B ψU ij −ψL ij ≤ϕ  (i,j)∈E ψU ij −ψL ij . (3) Finally, we establish the following lemma that bounds (i,j)∈E ψU ij −ψL ij – its proof is omitted. Lemma 5. If G has maximum vertex degree d∗, then  (i,j)∈E ψU ij −ψL ij ≤(d∗+ 1)H(x∗). (4) Now recall that the maximum vertex degree d∗of G is less than 2ρC by the definition of polynomially growing graph. Therefore, by Lemma 3, (3), and Lemma 5, the output produced by the LOC-ALGO algorithm is such that |H(x∗) −H(x)| ≤5(d∗+ 1)ϕH(x∗) ≤εH(x∗), where recall that ϕ = ε 5C2ρ . This completes the proof of Lemma 1. 6 5 Experiments Our algorithm provides a provable approximation for any MRF on a polynomially growing graph. In this section, we present experimental evaluations of our algorithm for two popular models: (a) synthetic Ising model, and (b) hardcore (independent set) model. As a reader will notice, the experimental results not only conform the qualitatively behavior proved by our theoretical result, but it also suggest that much tighter approximation guarantees should be expected in practice compared to what is guaranteed by theoretical results. Setup 12 Consider a binary (i.e. Σ = {0, 1}) MRF on an n1 × n2 grid G = (V, E): Pr(x) ∝exp ⎛ ⎝ i∈V θixi +  (i,j)∈E θijxixj ⎞ ⎠, for x ∈{0, 1}n1n2. We consider the following scenario for choosing parameters (with the notation U[a, b] for the uniform distribution over the interval [a, b]): 1. For each i ∈V , choose θi independently as per the distribution U[−1, 1]. 2. For each (i, j) ∈E, choose θij independently from U[−α, α]. Here the interaction parameter α is chose from {0.125, 0.25, 0.5, 1, 2, 4, 8, 16, 32, 64}. (A) 0.2 0.25 0 1 0.15 r=1 r=2 E 0.05 0.1 r 2 r=3 Error D 0 0.125 0.25 0.5 1 2 4 8 16 32 64 (B) 0.25 0.3 0.15 0.2 r=1 r=2 0.05 0.1 r=2 r=3 Error D 0 0.125 0.25 0.5 1 2 4 8 16 32 64 Figure 3: (A) plots the error of local update algorithm for a random Ising model in the grid graph of size 10 × 10, and (B) plots the error in the grid of size 100 × 10. To compare the effectiveness of our algorithm for each size of the local updates, in our simulation, we fix the square size as a constant instead of choosing it from a distribution. We run the simulation for the local square size r×r with r = 1, 2, 3, where r = 1 is the case when each square consists of a single vertex. We computed an exact MAP assignment x∗by dynamic programming, and computed the output x of our local update algorithm for each r, by doing 4n 1n2 log(n1n2) many local updates for n1 × n2 grid graph. Then compare the error as follows: Error = H(x∗) −H( x∗) H(x∗) . We run the simulation for 100 trials and compute the average error for each case. The Figure 3(A) plots the error for the grid of size 10 × 10, while Figure 3(B) plots the error for the grid of size 100 × 10. 2Though this setup has φi, ψij taking negative values, they are equivalent to the setup considered in the paper, since affine shift will make them non-negative without changing the distribution. 7 Remind that the approximation guarantee of Theorem 1 is an error bound for the worst case. As the simulation result suggests, for any graph and any range of α, the error of the local update algorithm decreases dramatically as r increases. Moreover, when r is comparably small as r = 3, the output of the local update algorithm achieves remarkably good approximation. Hence we observe that our algorithm performs well not only theoretically, but also practically. Setup 2. We consider the vertex weighted independent set model defined on a grid graph. To this end, we start by description of a weighted independent set problem as the MRF model. Specifically, consider a binary MRF on an n1 × n2 grid G = (V, E): Pr(x) ∝exp ⎛ ⎝ i∈V θixi +  (i,j)∈E Ψ(xixj) ⎞ ⎠, for x ∈{0, 1}n1n2. Here, the parameters are chosen as follows. 1. For each i ∈V , θi is chosen independently as per the distribution U[0, 1]. 2. The function Ψ(·, ·) is defined as Ψ(σ, σ′) = −M if (σ, σ′) = (1, 1) 0 otherwise , where M is a large number. For this model, we did simulations for grid graphs of size 10×10, 30×10, and 100×10 respectively. For each graph, we computed the average error as in the Setup 1, over 100 trials. The result is shown in the following table. As the result shows, our local update algorithm achieves remarkably good approximation of the MAP or equivalently in this setup the maximum weight independent set, even with very small r values ! 10 × 10 30 × 10 100 × 10 r=1 0.219734 0.205429 0.208446 r=2 0.016032 0.019145 0.019305 r=3 0.001539 0.002616 0.002445 It is worth nothing that choosing θi from U[0, α] for any α > 0 will give the same approximation result, since x∗and x are both linear on α. 6 Conclusion We considered the question of designing simple, iterative algorithm with local updates for finding MAP in any pair-wise MRF. As the main result of this paper, we presented such a randomized, local iterative algorithm that can find ε-approximate solution of MAP in any pair-wise MRF based on G within 2n ln n iterations and the computation per iteration is constant C(ε, ρ) dependent on the accuracy parameter ε as well as the growth rate ρ of the polynomially growing graph G. That is, ours is a local, iterative randomized PTAS for MAP problem in MRF with geometry. Our results are somewhat surprising given that thus far the known theoretical justification for such local algorithms strongly dependended on some form of convexity of the ‘energy’ function. In contrast, our results do not require any such condition, but only the geometry of the underlying MRF. We believe that our algorithm will be of great practical interest in near future as a large class of problems that utilize MRF based modeling and inference in practice have the underlying graphical structure possessing some form of geometry naturally. 8 References [1] M. Bayati, D. Shah, and M. Sharma. Maximum weight matching via max-product belief propagation. In IEEE ISIT, 2005. [2] M. Bayati, D. Shah, and M. Sharma. Max-Product for Maximum Weight Matching: Convergence, Correctness, and LP Duality. IEEE Transactions on Information Theory, 54(3):1241– 1251, 2008. [3] Y. Boykov, O. Veksler, and R. Zabih. Fast approximate energy minimization via graph cuts. IEEE Trans. Pattern Anal. Mach. Intell., 23(11):1222–1239, 2001. [4] William Feller. An Introduction to Probability Theory and Its Applications. Wiley, 1957. [5] Hans-Otto Georgii. Gibbs measures and phase transitions. Walter de Gruyter, 1988. [6] A. Gupta, R. Krauthgamer, and J.R. Lee. Bounded geometries, fractals, and low-distortion embeddings. In In Proceedings of the 44th annual Symposium on the Foundations of Computer Science, 2003. [7] S. Har-Peled and M. Mendel. Fast construction of nets in low dimensional metrics, and their applications. In Proceedings of the twenty-first annual symposium on Computational geometry, pages 150–158. ACM New York, NY, USA, 2005. [8] B. Huang and T. Jebara. Loopy belief propagation for bipartite maximum weight b-matching. Artificial Intelligence and Statistics (AISTATS), 2007. [9] N. Komodakis and G. Tziritas. A new framework for approximate labeling via graph cuts. In International Conference on Computer Vision, pages 1018–1025, 2005. [10] M. Pawan Kumar and Philip H. S. Torr. Improved moves for truncated convex models. In NIPS, pages 889–896, 2008. [11] Stan Z. Li. Markov Random Field Modeling in Image Analysis. Springer, 2001. [12] M. Malfait and D. Roose. Wavelet-based image denoising using a markov random field a priori model. IEEE Transactions on : Image Processing, 6(4):549–565, 1997. [13] Christopher D. Manning and Hinrich Schutze. Foundations of Statistical Natural Language Processing. The MIT Press, 1999. [14] J. Pearl. Probabilistic Reasoning in Intelligent Systems: Networks of Plausible Inference. San Francisco, CA: Morgan Kaufmann, 1988. [15] Thomas Richardson and Ruediger Ubanke. Modern Coding Theory. Cambridge University Press, 2008. [16] S. Sanghavi, D. Shah, and A. Willsky. Message-passing for Maximum Weight Independent Set. In Proceedings of NIPS, 2007. [17] R. Swendsen and J. Wang. Nonuniversal critical dynamics in monte carlo simulations. Phys. Rev. Letter., 58:86–88, 1987. [18] O. Veksler. Graph cut based optimization for mrfs with truncated convex priors. In CVPR, 2007. [19] Paul Viola and Michael J. Jones. Robust real-time face detection. International Journal of Computer Vision, 57(2):137–154, 2004. [20] M. Wainwright and M. Jordan. Graphical models, exponential families, and variational inference. UC Berkeley, Dept. of Statistics, Technical Report 649, 2003. [21] M. J. Wainwright, T. Jaakkola, and A. S. Willsky. Map estimation via agreement on (hyper)trees: Message-passing and linear-programming approaches. IEEE Transactions on Information Theory, 2005. [22] J. Yedidia, W. Freeman, and Y. Weiss. Generalized belief propagation. Mitsubishi Elect. Res. Lab., TR-2000-26, 2000. 9
2009
240
3,749
Bayesian estimation of orientation preference maps Jakob H. Macke MPI for Biological Cybernetics and University of T¨ubingen Computational Vision and Neuroscience Spemannstrasse 41, 72076 T¨ubingen jakob@tuebingen.mpg.de Sebastian Gerwinn MPI for Biological Cybernetics and University of T¨ubingen Computational Vision and Neuroscience Spemannstrasse 41, 72076 T¨ubingen sgerwinn@tuebingen.mpg.de Leonard E. White Duke Institute for Brain Sciences Duke University Durham, NC 27705, USA white033@mc.duke.edu Matthias Kaschube Lewis-Sigler Institute for Integrative Genomics and Department of Physics Princeton University Princeton, NJ 08544, USA kaschube@princeton.edu Matthias Bethge MPI for Biological Cybernetics and University of T¨ubingen Computational Vision and Neuroscience Group Spemannstrasse 41, 72076 T¨ubingen mbethge@tuebingen.mpg.de Abstract Imaging techniques such as optical imaging of intrinsic signals, 2-photon calcium imaging and voltage sensitive dye imaging can be used to measure the functional organization of visual cortex across different spatial and temporal scales. Here, we present Bayesian methods based on Gaussian processes for extracting topographic maps from functional imaging data. In particular, we focus on the estimation of orientation preference maps (OPMs) from intrinsic signal imaging data. We model the underlying map as a bivariate Gaussian process, with a prior covariance function that reflects known properties of OPMs, and a noise covariance adjusted to the data. The posterior mean can be interpreted as an optimally smoothed estimate of the map, and can be used for model based interpolations of the map from sparse measurements. By sampling from the posterior distribution, we can get error bars on statistical properties such as preferred orientations, pinwheel locations or pinwheel counts. Finally, the use of an explicit probabilistic model facilitates interpretation of parameters and quantitative model comparisons. We demonstrate our model both on simulated data and on intrinsic signaling data from ferret visual cortex. 1 Introduction Neurons in the visual cortex of primates and many other mammals are organized according to their tuning properties. The most prominent example of such a topographic organization is the layout of neurons according to their preferred orientation, the orientation preference map (OPM) [1, 2, e.g.]. The statistical structure of OPMs [3, 4] and other topographic maps has been the focus of extensive 1 research, as have been the relationships between different maps [5]. Orientation preference maps can be measured using optical imaging of intrinsic signals, voltage sensitive dye imaging, functional magnetic resonance imaging [6], or 2-photon calcium imaging [2, 7]. For most of these methods the signal-to-noise ratio is low, i.e. the stimulus specific part of the response is small compared to non-specific background fluctuations. Therefore, statistical pre-processing of the data is required in order to extract topographic maps from the raw experimental data. Here, we propose to use Gaussian process methods [8] for estimating topographic maps from noisy imaging data. While we will focus on the case of OPMs, the methods used will be applicable more generally. The most common analysis method for intrisic signaling data is to average the data within each stimulus condition, and report differences between conditions. In the case of OPMs, this amounts to estimating the preferred orientation at each pixel by vector averaging the different stimulus orientations weighted according to the evoked responses. In a second step, spatial bandpass filtering is usually applied in order to obtain smoother maps. One disadvantage of this approach is that the frequency characteristics of the bandpass filters are free parameters which are often set ad-hoc, and may have a substantial impact on the statistics of the obtained map [9, 10]. In addition, the approach ignores the effect of anisotropic and correlated noise [11, 10], which might result in artifacts. Methods aimed at overcoming these limitations include analysis techniques based on principal component analysis, linear discriminant analysis, oriented PCA [12] (and extensions thereof [11]) as well as variants of independent component analysis [9]. Finally, paradigms employing periodically changing stimuli [13, 14] use differences in their temporal characteristics to separate signal and noise components. These methods have in common that they do not make any parametric assumptions about the relationship between stimulus and response, between different stimuli, or about the smoothness of the maps. Rather, they attempt to find ’good’ maps by searching for filters which are maximally discriminative between different stimulus conditions. In particular, they differ from the classical approach in that they do not assume the noise to be isotropic and uncorrelated, but make it hard to incorporate prior knowledge about the structure of maps, and can therefore be data-intensive. Here, we attempt to combine the strengths of the classical and discriminative models by combining prior knowledge about maps with flexible noise models into a common probabilistic model. We encode prior knowledge about the statistical structure of OPMs in the covariance function of a Gaussian Process prior over maps. By combining the prior with the data through an explicit generative model of the measurement process, we obtain a posterior distribution over maps. Compared to previously proposed methods for analyzing multivariate imaging methods, the GP approach has a number of advantages: • Optimal smoothing: The mean of the posterior distribution can be interpreted as an optimally smoothed map. The filtering is adaptive, i.e. it will adjust to the amount and quality of the data observed at any particular location. • Non-isotropic and correlated noise: In contrast to the standard smoothing approach, noise with correlations across pixels as well as non-constant variances can be modelled. • Interpolations: The model returns an estimate of the preferred orientation at any location, not only at those at which measurements were obtained. This can be used, e.g., for artifact removal, or for inferring maps from multi-electrode recordings. • Explicit probabilistic model: The use of an explicit, generative model of the data facilitates both the interpretation and setting of parameters quantitative model comparisons. • Model based uncertainty estimates: The posterior variances at each pixel can be used to compute point-wise error bars at each pixel location [9, 11]. By sampling from the posterior (using the full posterior covariance), we can also get error bars on topological or global properties of the map, such as pinwheel counts or locations. Mathematically speaking, we are interested in inferring a vector field (the 2-dimensional vector encoding preferred orientation) across the cortical surface from noisy measurements. Related problems have been studied in spatial statistics, e.g. in the estimation of wind-fields in geo-statistics [15], where GP methods for this problem are often referred to as co-kriging methods [16, 17]. 2 2 Methods 2.1 Encoding Model We model an imaging experiment, where at each of N trials, the activity at n pixels is measured. The response ri(x) at trial i to a stimulus parameterised by Vi is given by ri(x) = d X k=1 vkimk(x) + ϵi(x) = v⊤ i mk(x) + ϵi(x), (1) i.e. the mean response at each pixel is modelled to be a linear function of some stimulus parameters vki. This can be written compactly as ri = Mvi + εi or ri = V ⊤ i m + εi. Here, ri and εi are ndimensional vectors, M is an n × d dimensional matrix, Vi = vi ⊗In, ⊗is the Kronecker-product and m = vec(M) is an nd-dimensional vector. We refer to the coefficients mk(x) as feature maps, as they indicate the selectivity of pixel x to stimulus feature k. In the specific case of modelling an orientation preference map, we have d = 2 and vi = (cos(2θi), sin(2θi))⊤. Then, the argument of the complex number m′(x) = m1(x) + im2(x) is the preferred orientation at location x, whereas the absolute value of m′(x) is a measure of its selectivity. While this approach assumes cosine-tuning curves at each measurement location, it can be generalized to arbitrary tuning curves by including terms corresponding to cosines with different frequencies. We assume that the noise-residuals ε are normally distributed with covariance Σϵ, and a Gaussian prior with covariance Km for the feature map vector m. Then, the posterior distribution over m is Gaussian with posterior covariance Σpost and mean µpost: Σ−1 post = K−1 m + X i viv⊤ i ! ⊗Σ−1 ϵ (2) µpost = Σpost X i VjΣ−1 ϵ ri ! = Σpost Id ⊗Σ−1 ϵ  X i vi ⊗ri (3) We note that the posterior covariance will have block structure provided that the prior covariance Km has block structure, i.e. if different feature maps are statistically independent a priori, and the stimuli are un-correlated on average, i.e. P i viv⊤ i = Dv is diagonal. Hence, inference for different maps ’de-couples’, and we do not have to store the full joint covariance over all d maps. 2.2 Choosing a prior We need to specify the covariance function K(m(x), m(x′)) of the prior distribution over maps. As cortical maps, and in particular orientation preference maps, have been studied extensively in the past [5], we actually have prior knowledge (rather than just prior assumptions) to guide the choice of a prior. It is known that orientation preference maps are smooth [2] and that they have a semi-periodic structure of regularly spaced columns. Hence, filtering white noise with appropriately chosen filters [18] yields maps which visually look like measured OPMs (see Fig. 1). While it is known that real OPMs differ from Gaussian random fields in their higher order statistics [3], use of a Gaussian prior can be motivated by the maximum entropy principle: We assume a prior with minimal higher-order correlations, with the goal of inferring them from the experimental data [3]. For simplicity, we take the prior to be isotropic, i.e. not to favour any direction over others. (For real maps, there is a slight anisotropy [19]). We assume that each prior sample is generated by convolving a two-dimensional Gaussian whitenoise image with a Difference-of-Gaussians filter f(x) = P2 k=1 αk 2πσ2 k exp  −1 2 x2 σ2 k  , α1 = −α2, and σ2 = 2σ1. This will result in a prior which is uncorrelated in the different maps component, i.e. 3 Cov(m1(x), m2(x′)) = 0, and a stationary covariance function given by Kc(τ) = Kc(∥x −x′∥) = Cov(m1(x), m1(x′)) = 2 X k,l=1 αkαl 2π(σ2 k + σ2 l ) exp  −1 2  τ 2 σ2 k + σ2 l  . (4) Then, the prior covariance matrix Km can be written as Km = Ic ⊗Kc. This prior has two hyperparameters, namely the absolute magnitude α1 and the kernel width σ1. In principle, optimization of the marginal likelihood can be used to set hyper-parameters. In practice, it turned out to be computationally more efficient to select them by matching the radial component of the empirically observed auto-correlation function of the map [16], see Fig. 1 B). A) B) C) 0 20 40 60 -0.5 0 0.5 1 1.5 2 2.5 Distance (pixels) Covariance Empirical Difference of Gaussian Figure 1: Prior covariance: A) Covariance function derived from the Difference-of-Gaussians. B) Radial component of prior covariance function and of covariance of raw data. C Angle-map of one sample from the prior, with σ1 = 4. Each color corresponds to an angle in [0, 180◦]. 2.3 Approximate inference The formulas for the posterior mean and covariance involve covariance matrices over all pixels. On a map of size nx × ny, there are n = nx × ny pixels, so we would have to store and compute with matrices of size n × n, which would limit this approach to maps of relatively small size. A number of approximation techniques have been proposed to make large scale inference feasible in models with Gaussian process priors (see [8] for an overview). Here, we utilize the fact that the spectrum of eigenvalues drops off quickly for many kernel functions [20, 21], including the Difference-ofGaussians used here. This means that the covariance matrix Kc can be approximated well by a low rank matrix product Kc ≈GG⊤, where G is of size n × q, q ≪n (see [17] for a related idea). To find G, we perform an incomplete Cholesky factorization on the matrix Kc. This can be done without having to store Kc in memory explicitly. In this case, the posterior covariance can be calculated without ever having to store (or even invert) the full prior covariance: Σpost = Id ⊗  Kc −β−1Kc  Σ−1 ϵ −Σ−1 ϵ G βIq + G⊤Σ−1 ϵ G −1 G⊤Σ−1 ϵ  Kc  , (5) where β = 2/N. We restrict the form of the noise covariance either to be diagonal (i.e. assume uncorrelated noise), or more generally to be of the form Σϵ = Dϵ + GϵRϵG⊤ ϵ . Here, Gϵ is of size n × qϵ, qϵ ≪n, and Dϵ is a diagonal matrix. In other words, the functional form of the covariance matrix is assumed to be the same as in factor analysis models [22, 23]: The low rank term Gϵ models correlation across pixels, whereas the diagonal matrix Dϵ models independent noise. We assume this model to regularize the noise covariance to ensure that the noise covariance has full rank even when the number of data-points is less than the number of pixels [22]. The matrices Gϵ and Dϵ can be fit using expectation maximization without ever having to calculate the full noise covariance across all pixels. We initialize the noise covariance by calculating the noise variances for each stimulus condition, and averaging this initial estimate across stimulus conditions. We iterate between calculating the posterior mean (using the current estimate of Σϵ), and obtaining a pointestimate of the most likely noise covariance given the mean [24]. In all cases, a very small number of iterations lead to convergence. 4 A) B) C) 0 45 90 135 180 D) E) F) 0 45 90 135 180 16 40 80 160 320 640 0.4 0.5 0.6 0.7 0.8 0.9 1 Simulus presentations Correlation GP with correlations GP, no correlations Smoothing (optimized) Figure 2: Illustration on synthetic data: A) Ground truth map used to generate the data. B) Raw map, estimated using 10 trials of each direction. C) GP-reconstruction of the map. D) Posterior variance of GP, visualized as size of 95% confidence intervals on preferred orientations. Superimposed are the zero-crossings of the GP map. E) Reconstruction by smoothing with fixed Gaussian filter, filter-width optimized by maximizing correlation with ground truth. F) Reconstruction performance as a function of stimulus presentations used, for GP with noise-correlations, GP without noise-correlations, and simple smoothing. 3 Results 3.1 Illustration on synthetic data To illustrate the ability of our method to recover maps from noisy recordings, we generated a synthetic map (a sample from the prior distribution, ’true map’, see Fig. 2 A), and simulated responses to each of 8 different oriented gratings by sampling from the likelihood (1). The parameters were chosen to be roughly comparable with the experimental data (see below). We reconstructed the map using our GP method (low rank approximation of rank q = 1600, noise correlations of rank qϵ = 5) on data sets of different sizes (N = 8 ∗(2, 5, 10, 20, 30, 40, 80)). Figure 2 C) shows the angular components of the posterior mean of the GP, our reconstruction of the map. We use the posterior variances to also calculate a pointwise 95% confidence interval on the preferred orientation at each location, shown in Fig. 2 D). As expected, the confidence intervals are biggest near pinwheels, where the orientation selectivity of pixels is low, and therefore the preferred orientation is not well defined. To evaluate the performance of the model, we quantified its reconstruction performance by computing the correlation coefficient of the posterior mean and the true map, each represented as a long vector with 2n elements. We compared the GP map against a map obtained by filtering the raw map (Fig. 2 B) with a Gaussian kernel (Fig. 2 D), where the kernel width was chosen by maximizing the similarity with the ’true map’. This yields an optimistic estimate of the performance of the smoothed map, as setting the optimal filter-size requires access to the ground truth. We can see that the GP map converges to the true map more quickly than the smoothed map (Fig. 2 F). For example, using 16 stimulus presentations, the smoothed map has a correlation with the ground truth of 0.45, whereas the correlation of the GP map is 0.77. For the simple smoothing method, about 120 presentations would be required to achieve this performance level. When we ignore noise-correlations (i.e. assume Σϵ to be diagonal), GP still outperforms simple smoothing, although by a much smaller amount (Fig. 2 F). 5 3.2 Application to data from ferret visual cortex To see how well the method works on real data, we used it to analyze data from an intrinsic signal optical imaging experiment. The central portion of the visuotopic map in visual areas V1 and V2 of an anesthetized ferret was imaged with red light while square wave gratings (spatial frequency 0.1 cycles/degree) were presented on a screen. Gratings were presented in 4 different orientations (0◦, 45◦, 90◦and 135◦), and moving along one of the two directions orthogonal to its orientation (temporal frequency 3.2Hz). Each of the 8 possible directions was presented 100 times in a pseudorandom order for a duration of 5 seconds each, with an interstimulus interval of 8 seconds. Intrinsic signals were collected using a digital camera with pixel-size 30µm. The response ri was taken to be the average activity in a 5 second window relative to baseline Each response vector ri was normalized to have mean 0 and standard deviation 1, no spatial filtering was performed. For all analyses in this paper, we concentrated on a region of size 100 by 100 pixels. The large data set with a total of 800 stimulus presentations made it possible to quantify the performance of our model by comparing it to unsmoothed maps. Figure 3 A) shows the map estimated by vector averaging all 800 presentations, without any smoothing. However, the GP method itself is designed to also work robustly on smaller data sets, and we are primarily interested in its performance in estimating maps using only few stimulus presentations. 3.3 Bayesian estimation of orientation preference maps For real measured data, we do not know ground truth to estimate the performance of our model. Therefore, we used 5% of the data for estimating the map, and compared this map with the (unsmoothed) map estimated on the other 95% of data, which served as our proxy for ground truth. As above, we compared the GP map against one obtained by smoothing with a Gaussian kernel, where the kernel width of the smoothing kernel was chosen by maximizing its correlation with (our proxy for) the ground truth. The GP map outperformed the smoothing map consistently: For 18 out of 20 different splits into training and test data, the correlation of the GP map was higher (p = 2 × 10−4, average correlations c = 0.84 ± 0.01 for GP, c = 0.79 ± 0.015 for smoothing). The same held true when we smoothed maps with a Difference of Gaussians filter rather than a Gaussian (19 out of 20, average correlation c = 0.71 ± 0.08). A) B) C) Figure 3: OPMs in ferret V1 A) Raw map, estimated from 720 out of 800 stimuli. B) Smoothed map estimated from other 80 stimuli, filter width obtained by maximizing the correlation to map A. C) GP reconstruction of map. The GP has a correlation with the map shown in A) of 0.87, the performance of the smoothed map is 0.74. One of the strengths of the GP model is that the filter-parameters are inferred by the model, and do not have to be set ad-hoc. The analysis above shows that, even if when optimized the filter-width for smoothing (which would not be possible in a real experiment), the GP still outperforms the approach of smoothing with a Gaussian window. In addition, it is important to keep in mind that using the posterior mean as a clean estimate of the map is only one feature of our model. In the following, we will use the GP model to optimally interpolate a sparsely sampled map, and to the posterior distribution to obtain error bars over the pinwheel-counts and locations of the map. 6 3.4 Interpolating the map The posterior mean µ(x) of the model can be evaluated for any x. This makes it possible to extend the map to locations at which no data was recorded. We envisage this to be useful in two kinds of applications: First, if the measurement is corrupted in some pixels (e.g. because of a vessel artifact), we attempt to recover the map in this region by model-based interpolation. We explored this scenario by cutting out a region of the map described above (inside of ellipse in Fig. 4 A), and using the GP to fill in the map. The correlation between the true map and the GP map in the filled-in region was 0.77. As before, we compared to smoothing with a Gaussian filter, for which the correlation was 0.59. In addition, multi-electrode arrays [25] can be used to measure neural activity at multiple locations simultaneously. Provided that the electrode spacing is small enough, it should be possible to reconstruct at least a rough estimate of the map from such discrete measurements. We simulated a multielectrode recording by only using the measured activity at 49 pixel locations which were chosen to be spaced 400µm apart. Then, we attempted to infer the full map using only these 49 measurements, and our prior knowledge about OPMs encoded in the prior covariance. The reconstruction is shown in Fig. 4 C. As before, the GP map outperforms the smoothing approach (c = 0.78 vs. c = 0.81). Discriminative analysis methods for imaging data can not be used for such interpolations. A) B) C) D) Figure 4: Interpolations: A) Filling in: The region inside the white ellipse was reconstructed by the GP using only the data outside the ellipse. B) Map estimated from all 800 stimulus presentations, with ’electrode locations’ superimposed. C) GP-reconstruction of the map, estimated only from the 49 pixels colored in in gray in B). D) Smoothing reconstruction of the map. 3.5 Posterior uncertainty As both our prior and the likelihood are Gaussian, the posterior distribution is also Gaussian, with mean µpost and covariance Σpost. By sampling from this posterior distribution, we can get error bars not only on the preferred orientations in individual pixels (as we did for Fig. 2 D), but also for global properties of the map. For example, the location [10] and total number [3, 4] of pinwheels (singularities at which both map components vanish) has received considerable attention in the past. Figure 5 A) and B) shows two samples from the posterior distribution, which differ both in their pinwheel locations and counts (A: 39, B: 28, C:31). To evaluate our certainty in the pinwheel locations, we calculate a two-dimensional histogram of pinwheel locations across samples (Fig. 5 D and E). One can see that the histogram gets more peaked with increasing data-set size. We illustrate this effect by calculating the entropy of the (slightly smoothed) histograms, which seems to keep decreasing for larger data-set sizes, indicating that we are more confident in the exact locations of the pinwheels. 4 Discussion We introduced Gaussian process methods for estimating orientation preference maps from noisy imaging data. By integrating prior knowledge about the spatial structure of OPMs with a flexible noise model, we aimed to combine the strengths of classical analysis methods with discriminative approaches. While we focused on the analysis of intrinsic signal imaging data, our methods are expected to be also applicable to other kinds of imaging data. For example, functional magnetic 7 A) B) C) D) E) F) 80 160 240 320 400 11.2 11.4 11.6 11.8 12 12.2 Stimulus presentations Entropy Figure 5: Posterior uncertainty: A B C) Three samples from the posterior distribution, using 80 stimuli (zoomed in for better visibility). D E) Density-plot of pinwheel locations when map is estimated with 40 and 800 stimuli, respectively. F) Entropy of pinwheel-density as a measure of confidence in the pinwheel locations. resonance imaging is widely used as a non-invasive means of measuring brain activity, and has been reported to be able to estimate orientation preference maps in human subjects [6]. In contrast to previously used analysis methods for intrinsic signal imaging, ours is based on a generative model of the data. This can be useful for quantitative model comparisons, and for investigating the coding properties of the map. For example, it can be used to investigate the relative impact of different model-properties on decoding performance. We assumed a GP prior over maps, i.e. assumed the higher-order correlations of the maps to be minimal. However, it is known that the statistical structure of OPMs shows systematic deviations from Gaussian random fields [3, 4], which implies that there could be room for improvement in the definition of the prior. For example, using priors which are sparse [26] (in an appropriately chosen basis) could lead to superior reconstruction ability, and facilitate reconstructions which go beyond the auto-correlation length of the GP-prior [27]. Finally, one could use generalized linear models rather than a Gaussian noise model [26, 28]. However, it is unclear how general noise correlation structures can be integrated in these models in a flexible manner, and whether the additional complexity of using a more involved noise model would lead to a substantial increase in performance. Acknowledgements This work is supported by the German Ministry of Education, Science, Research and Technology through the Bernstein award to MB (BMBF; FKZ: 01GQ0601), the Werner-Reichardt Centre for Integrative Neuroscience T¨ubingen, and the Max Planck Society. References [1] G G Blasdel and G Salama. Voltage-sensitive dyes reveal a modular organization in monkey striate cortex. Nature, 321(6070):579–85, Jan 1986. [2] Kenichi Ohki, Sooyoung Chung, Yeang H Ch’ng, Prakash Kara, and R Clay Reid. Functional imaging with cellular resolution reveals precise micro-architecture in visual cortex. Nature, 433(7026):597–603, 2005. 8 [3] F Wolf and T Geisel. Spontaneous pinwheel annihilation during visual development. Nature, 395(6697):73–8, 1998. [4] M. Kaschube, M. Schnabel, and F. Wolf. Self-organization and the selection of pinwheel density in visual cortical development. New Journal of Physics, 10(1):015009, 2008. [5] Naoum P Issa, Ari Rosenberg, and T Robert Husson. Models and measurements of functional maps in v1. J Neurophysiol, 99(6):2745–2754, 2008. [6] Essa Yacoub, Noam Harel, and Kˆamil Ugurbil. High-field fmri unveils orientation columns in humans. P Natl Acad Sci Usa, 105(30):10607–12, Jul 2008. [7] Ye Li, Stephen D Van Hooser, Mark Mazurek, Leonard E White, and David Fitzpatrick. Experience with moving visual stimuli drives the early development of cortical direction selectivity. Nature, 456(7224):952–6, Dec 2008. [8] C.E. Rasmussen and C.K.I. Williams. Gaussian processes for machine learning. Springer, 2006. [9] M Stetter, I Schiessl, T Otto, F Sengpiel, M H¨ubener, T Bonhoeffer, and K Obermayer. Principal component analysis and blind separation of sources for optical imaging of intrinsic signals. Neuroimage, 11(5 Pt 1):482–90, May 2000. [10] Jonathan R Polimeni, Domhnull Granquist-Fraser, Richard J Wood, and Eric L Schwartz. Physical limits to spatial resolution of optical recording: clarifying the spatial structure of cortical hypercolumns. Proc Natl Acad Sci U S A, 102(11):4158–4163, 2005 Mar 15. [11] T. Yokoo, BW Knight, and L. Sirovich. An optimization approach to signal extraction from noisy multivariate data. Neuroimage, 14(6):1309–1326, 2001. [12] R Everson, B W Knight, and L Sirovich. Separating spatially distributed response to stimulation from background. i. optical imaging. Biological cybernetics, 77(6):407–17, Dec 1997. [13] Valery A Kalatsky and Michael P Stryker. New paradigm for optical imaging: temporally encoded maps of intrinsic signal. Neuron, 38(4):529–545, 2003 May 22. [14] A Sornborger, C Sailstad, E Kaplan, and L Sirovich. Spatiotemporal analysis of optical imaging data. Neuroimage, 18(3):610–21, Mar 2003. [15] D. Cornford, L. Csato, D.J. Evans, and M. Opper. Bayesian analysis of the scatterometer wind retrieval inverse problem: some new approaches. Journal of the Royal Statistical Society. Series B, Statistical Methodology, pages 609–652, 2004. [16] N. Cressie. Statistics for spatial data. Terra Nova, 4(5):613–617, 1992. [17] N. Cressie and G. Johannesson. Fixed rank kriging for very large spatial data sets. Journal of the Royal Statistical Society: Series B (Statistical Methodology), 70(1):209–226, 2008. [18] A S Rojer and E L Schwartz. Cat and monkey cortical columnar patterns modeled by bandpass-filtered 2d white noise. Biol Cybern, 62(5):381–391, 1990. [19] D M Coppola, L E White, D Fitzpatrick, and D Purves. Unequal representation of cardinal and oblique contours in ferret visual cortex. P Natl Acad Sci Usa, 95(5):2621–3, Mar 1998. [20] Francis R Bach and Michael I Jordan. Kernel independent component analysis. Journal of Machine Learning Research, 3:1:48, 2002. [21] C. Williams and M. Seeger. Using the Nystrom method to speed up kernel machines. In International Conference on Machine Learning, volume 17, 2000. [22] Donald Robertson and James Symons. Maximum likelihood factor analysis with rank-deficient sample covariance matrices. J. Multivar. Anal., 98(4):813–828, 2007. [23] Byron M Yu, John P Cunningham, Gopal Santhanam, Stephen I Ryu, Krishna V Shenoy, and Maneesh Sahani. Gaussian-process factor analysis for low-dimensional single-trial analysis of neural population activity. J Neurophysiol, 102(1):614–635, 2009 Jul. [24] K. Kersting, C. Plagemann, P. Pfaff, and W. Burgard. Most likely heteroscedastic Gaussian process regression. In Proceedings of the 24th international conference on Machine learning, pages 393–400. ACM New York, NY, USA, 2007. [25] Ian Nauhaus, Andrea Benucci, Matteo Carandini, and Dario L Ringach. Neuronal selectivity and local map structure in visual cortex. Neuron, 57(5):673–679, 2008 Mar 13. [26] H. Nickisch and M. Seeger. Convex variational bayesian inference for large scale generalized linear models. In International Conference on Machine Learning, 2009. [27] F. Wolf, K. Pawelzik, T. Geisel, DS Kim, and T. Bonhoeffer. Optimal smoothness of orientation preference maps. Network: Computation in Neural SystemsComputation in neurons and neural systems, pages 97– 101, 1994. [28] K. Rahnama Rad and L. Paninski. Efficient estimation of two-dimensional firing rate surfaces via gaussian process methods. Network: Computation in Neural Systems, under review, 2009. 9
2009
241
3,750
A Bayesian Analysis of Dynamics in Free Recall Richard Socher Department of Computer Science Stanford University Stanford, CA 94305 richard@socher.org Samuel J. Gershman, Adler J. Perotte, Per B. Sederberg Department of Psychology Princeton University Princeton, NJ 08540 {sjgershm,aperotte,persed}@princeton.edu David M. Blei Department of Computer Science Princeton University Princeton, NJ 08540 blei@cs.princeton.edu Kenneth A. Norman Department of Psychology Princeton University Princeton, NJ 08540 knorman@princeton.edu Abstract We develop a probabilistic model of human memory performance in free recall experiments. In these experiments, a subject first studies a list of words and then tries to recall them. To model these data, we draw on both previous psychological research and statistical topic models of text documents. We assume that memories are formed by assimilating the semantic meaning of studied words (represented as a distribution over topics) into a slowly changing latent context (represented in the same space). During recall, this context is reinstated and used as a cue for retrieving studied words. By conceptualizing memory retrieval as a dynamic latent variable model, we are able to use Bayesian inference to represent uncertainty and reason about the cognitive processes underlying memory. We present a particle filter algorithm for performing approximate posterior inference, and evaluate our model on the prediction of recalled words in experimental data. By specifying the model hierarchically, we are also able to capture inter-subject variability. 1 Introduction Modern computational models of verbal memory assume that the recall of items is shaped by their semantic representations. The precise nature of this relationship is an open question. To address it, recent research has used information from diverse sources, such as behavioral data [14], brain imaging [13] and text corpora [8]. However, a principled framework for integrating these different types of information is lacking. To this end, we develop a model of human memory that encodes probabilistic dependencies between multiple information sources and the hidden variables that couple them. Our model lets us combine multiple sources of information and multiple related memory experiments. Our model builds on the Temporal Context Model (TCM) of [10, 16]. TCM was developed to explain the temporal structure of human behavior in free recall experiments, where subjects are presented with lists of words (presented one at a time) and then asked to recall them in any order. TCM posits a slowly changing mental context vector whose evolution is driven by lexical input. At study, words are bound to context states through learning; during recall, context information is used as a cue to probe for stored words. TCM can account for numerous regularities in free recall data, most prominently the finding that subjects tend to consecutively recall items that were studied close in time to one another. (This effect is called the temporal contiguity effect.) TCM explains this effect by positing that recalling an item also triggers recall of the context state that was present when the 1 item was studied; subjects can use this retrieved context state to access items that were studied close in time to the just-recalled item. The fact that temporal contiguity effects in TCM are mediated indirectly (via item-context associations) rather than directly (via item-item associations) implies that temporal contiguity effects should persist when subjects are prevented from forming direct item-item associations; for evidence consistent with this prediction, see [9]. Importantly, temporal structure is not the only organizing principle in free recall data: Semantic relatedness between items also influences the probability of recalling them consecutively [11]. Moreover, subjects often recall semantically-related items that were not presented at study. (These are called extra-list intrusions; see [15].) To capture this semantic structure, we will draw on probabilistic topic models of text documents, specifically latent Dirichlet allocation (LDA) [3]. LDA is an unsupervised model of document collections that represents the meaning of documents in terms of a small number of “topics,” each of which is a distribution over words. When fit to a corpus, the most probable words of these distributions tend to represent the semantic themes (like “sports” or “chemistry”) that permeate the collection. LDA has been used successfully as a psychological model of semantic representation [7]. We model free recall data by combining the underlying assumptions of TCM with the latent semantic space provided by LDA. Specifically, we reinterpret TCM as a dynamic latent variable model where the mental context vector specifies a distribution over topics. In other words, the human memory component of our model represents the drifting mental context as a sequence of mixtures of topics, in the same way that LDA represents documents. With this representation, the dynamics of the mental context are determined by two factors: the posterior probability over topics given a studied or recalled word (semantic inference) and the retrieval of previous contexts (episodic retrieval). These dynamics let us capture both the episodic and semantic structure of human verbal memory. The work described here goes beyond prior TCM modeling work in two ways: First, our approach allows us to infer the trajectory of the context vector over time, which (in turn) allows us to predict the item-by-item sequence of word recalls; by contrast, previous work (e.g., [10, 16]) has focused on fitting the summary statistics of the data. Second, we model inter-subject variability using a hierarchical model specification; this approach allows us to capture both common and idiosyncratic features of the behavioral data. The rest of the paper is organized as follows. In Section 2 we describe LDA and in Section 3 we describe our model, which we refer to as LDA-TCM. In Section 4 we describe a particle filter for performing posterior inference in this model. In Section 5.1 we present simulation results showing how this model reproduces fundamental behavioral effects in free recall experiments. In Section 5.2 we present inference results for a dataset collected by Sederberg and Norman in which subjects performed free recall of words. 2 Latent Dirichlet allocation Our model builds on probabilistic topic models, specifically latent Dirichlet allocation. Latent Dirichlet allocation (LDA) is a probabilistic model of document collections [3]. LDA posits a set of K topics, each of which is a distribution over a fixed vocabulary, and documents are represented as mixtures over these topics. Thus, each word is assumed to be drawn from a mixture model with corpus-wide components (i.e., the topics) and document-specific mixture proportions. When fit to a collection of documents, the topic distributions often reflect the themes that permeate the document collection. More formally, assume that there are K topics βk, each of which is a distribution over words. (We will call the K × W matrix β the word distribution matrix.) For each document, LDA assumes the following generative process: 1. Choose topic proportions θ ∼Dir(α). 2. For each of the N words wn: (a) Choose a topic assignment zn ∼Mult(θ). (b) Choose a word wn ∼Mult(βzn). 2 Figure 1: A graphical model of LDA-TCM. Given a collection of documents, posterior inference in LDA essentially reverses this process to decompose the corpus according to its topics and find the corresponding distributions over words. Posterior inference is intractable, but many approximation algorithms have been developed [3, 7, 17]. In addition to capturing the semantic content of documents, recent psychological work has shown that several aspects of LDA make it attractive as a model of human semantic representation [7]. In our model of memory, the topic proportions χplay the role of a “mental context” that guides memory retrieval by parameterizing a distribution over words to recall. 3 Temporal context and memory We now turn to a model of human memory that uses the latent representation of LDA to capture the semantic aspects of recall experiments. Our data consist of two types of observations: a corpus of documents from which we have obtained the word distribution matrix, 1 and behavioral data from free recall experiments, which are studied and recalled words from multiple subjects over multiple runs of the experiment. Our goal is to model the psychological process of recall in terms of a drifting mental context. The human memory component of our model is based on the Temporal Context Model (TCM). There are two core principles of TCM: (1) Memory retrieval involves reinstating a representation of context that was active at the time of study; and (2) context change is driven by features of the studied stimuli [10, 16, 14]. We capture these principles by representing the mental context drift of each subject with a trajectory of latent variables χn. Our use of the same variable name (χ) and dimensionality for the context vector and for topics reflects our key assertion: Context and topics reside in the same meaning space. The relationship between context and topics is specified in the generative process of the free recall data. The generative process encompasses both the study phase and the recall phase of the memory experiment. During study, the model specifies the distribution of the trajectory of internal mental contexts of the subject. (These variables are important in the next phase when recalling words episodically.) First, the initial mental context is drawn from a Gaussian: χs,0  N(0,φI), (1) where s denotes the study phase and I is a K × K identity matrix.2 Then, for each studied word the mental context drifts according to χs,n  N(hs,n,φI), (2) where hs,n = 1χs,n 1 + (1  1) log(˜ps,n). (3) 1For simplicity, we fix the word distribution matrix to one fit using the method of [3]. In future work, we will explore how the data from the free recall experiment could be used to constrain estimates of the word distribution matrix. 2More precisely, context vectors are log-transformed topic vectors (see [1, 2]). When generating words from the topics, we renormalize the context vector. 3 This equation identifies the two pulls on mental context drift when the subject is studying words: the previous context vector θn−1 and ˜ps,n ∝β·,ws,n, the posterior probabilities of each topic given the current word and the topic distribution matrix. This second term captures the idea that mental context is updated with the meaning of the current word (see also [2] for a related treatment of topic dynamics in the context of text modeling). For example, if the studied word is “stocks” then the mental context might drift toward topics that also have words like “business”, “financial”, and “market” with high probability. (Note that this is where the topic model and memory model are coupled.) The parameter η1 controls the rate of drift, while σ controls its noisiness. During recall, the model specifies a distribution over drifting contexts and recalled words. For each time t, the recalled word is assumed to be generated from a mixture of two components. Effectively, there are two “paths” to recalling a word: a semantic path and an episodic path. The semantic path recalls words by “free associating” according to the LDA generative process: Using the current context as a distribution over topics, it draws a topic randomly and then draws a word from this topic (this is akin to thinking of a word that is similar in meaning to just-recalled words). Formally, the probability of recalling a word via the semantic path is expressed as the marginal probability of that word induced by the current context: Ps(w) = π(θr,t) · β·,w, (4) where π is a function that maps real-valued vectors onto the simplex (i.e., positive vectors that sum to one) and the index r denotes the recall phase. The episodic path recalls words by drawing them exclusively from the set of studied words. This path puts a high probability on words that were studied in a context that resembles the current context (this is akin to remembering words that you studied when you were thinking about things similar to what you are currently thinking about). Formally, the episodic distribution over words is expressed as a weighted sum of delta functions (each corresponding to a word distribution that puts all its mass on a single studied word), where the weight for a particular study word is determined by the similarity of the context at recall to the state of context when the word was studied: Pe(w) = ut,w P i ut,i , (5) where ut = PN n=1 δs,ws,n/d(π(θr,t), π(θs,n))ϵ. Here d(·, ·) is a similarity function between distributions (here we use the negative KL-divergence) and ϵ is a parameter controlling the curvature of the similarity function. We define {δs,ws,n}N n=1 to be delta functions defined at study words. Because people tend not to repeatedly recall words, we remove the corresponding delta function after a word is recalled. Our model assumes that humans use some mixture of these two paths, determined by mixing proportion λ. Letting wr,t ∼Mult(φt), we have φt(w) = λPs(w) + (1 −λ)Pe(w). (6) Intuitively, λ in Equation 6 controls the balance between semantic influences and episodic influences. When λ approaches 1, we obtain a “pure semantic” model wherein words are recalled essentially by free association (this is similar to the model used by [7] to model semantically-related intrusions in free recall). When λ approaches 0, we obtain a “pure episodic” model wherein words are recalled exclusively from the study list. An intermediate value of λ is essential to simultaneously explaining temporal contiguity and semantic effects in memory. Finally, the context drifts according to θr,t+1 ∼N(hr,t, σI), (7) where hr,t = η2θr,t + η3 log(˜pr,t) + η4θs,n(wr,t). (8) This is similar to how context drifts in the study phase, except that the context is additionally pushed by the context that was present when the recalled word was studied. This is obtained mathematically by defining n(wr,t) to be a mapping from a recalled word to the index of the same word at study. For 4 Figure 2: Simulated and empirical recall data. Data replotted from [9]. (Left) Probability of first recall curve. (Right) Conditional response probability curve. example, if the recalled word is “cat” and cat was the sixth studied word then n(wr,t) = 6. If there is a false recall, i.e., the subject recalls a word that was not studied, then θs,n(wr,t) is set to the zero vector. This generative model is depicted graphically in Figure 1, where Ω= {η1:4, σ, λ, ϵ} represents the set of model parameters and Ξ is the set of hyperparameters. To model inter-subject variability, we extend our model hierarchically, defining group-level prior distributions from which subject-specific parameters are assumed to be drawn [6]. This approach allows for inter-subject variability and, at the same time, it allows us to gain statistical strength from the ensemble by coupling subjects in terms of higher-level hyperparameters. We choose our group prior over subject i’s parameters to factorize as follows: P(ηi 1:4, σi, λi, ϵi) = P(ηi 1)P(ηi 2:4)P(σi)P(λi)P(ϵi). (9) In more detail, the factors take on the following functional forms: ηi 1 ∼Beta(c, d), ηi 2:4 ∼ Dir(χ), σi ∼Exp(ν), λi ∼Beta(a, b), ϵi ∼Gamma(α1, α2). Except where mentioned otherwise, we used the following hyperparameter values: a = b = c = d = 1, χ = [1, 1, 1], α1 = 1, α2 = 1. For some model variants (described in Section 5.2) we set the parameters to a fixed value rather than inferring them. Here, we use the model to answer the following questions about behavior in free recall experiments: (1) Do both semantic and temporal factors influence recall, and if so what are their relative contributions; (2) What are the relevant dimensions of variation across subjects? In our model, semantic and temporal factors exert their influence via the context vector, while variation across subjects is expressed in the parameters drawn from the group prior. Thus, our goal in inference is to compute the posterior distribution over the context trajectory and subject-specific parameters, given a sequence of studied and recalled words. We can also use this posterior to make predictions about what words will be recalled by a subject at each point during the recall phase. By comparing the predictive performance of different model variants, we can examine what types of model assumptions (like the balance between semantic and temporal factors) best capture human behavior. 4 Inference We now describe an approximate inference algorithm for computing the posterior distribution. Letting θ = {θs,0:N, θr,1:T , Ω}, the posterior is: P(θ|W) = P(wr,1:T |θs,1:N, θr,1:T , ws,1:N)P(θr,1:T |θs,1:N)P(θs,1:N|ws,1:N, θs,0)P(θs,0)P(Ω) P(ws,1:N, wr,1:T ) . (10) Because computing the posterior exactly is intractable (the denominator involves a high-dimensional integral that cannot be solved exactly), we approximate it with a set of C samples using the particle filter algorithm [4], which can be summarized as follows. At time t > 0: 5 Figure 3: Factors contributing to context change during recall on a single list. (Left) Illustration of how three successively recalled words influence context. Each column corresponds to a specific recalled word (shown in the top row). The bars in each cell correspond to individual topics (specifically, these are the top ten inferred topics at recall; the center legend shows the top five words associated with each topic). Arrows schematically indicate the flow of influence between the components. The context vector at recall (Middle Row) is updated by the posterior over topics given the recalled word (Top Row) and also by retrieved study contexts (Bottom Row). (Right) Plot of the inferred context trajectory at study and recall for a different list, in a 2-dimensional projection of the context space obtained by principal components analysis. 1. Sample recall context θ(c) t using (7). 2. Compute weights v(c) t ∝P  wr,t|θ(c) r,t  using (6). 3. Resample the particles according to their weights. Using this sample-based approximation, the posterior is approximated as a sum of the delta functions placed at the samples: P(θ|W) ≈1 C C X c=1 δ  θ −θ(c) . (11) 5 Results We evaluate our model in two ways. First, we generate data from the generative model and record a number of common psychological measurements to assess to what extent the model reproduces qualitative patterns of recall behavior. Second, we perform posterior inference and evaluate the predictive performance of the model on a real dataset gathered by Sederberg and Norman. 5.1 Simulations For the simulations, the following parameters were used: η1 = 0.2, η2 = 0.55, η3 = 0.05, σ = 0.00001, λ = 0.2, ϵ = 1.7. Note that these parameters have not been fit quantitatively to the data; here we are simply trying to reproduce qualitative patterns. These values have been chosen heuristically without a systematic search through the parameter space. The results are averaged over 400 random study lists of 12 words each. In Figure 3, we compare our simulation results to data collected by [9]. Figure 2 (left) shows the probability of first recall (PFR) curve, which plots the probability of each list position being the first recalled word. This curve illustrates how words in later positions are more likely to be recalled first, a consequence (in our model) of initializing the recall context with the last study context. Figure 2 (right) shows the lag conditional response probability (lag-CRP) curve, which plots the conditional probability of recalling a word given the last recalled word as a function of the lag (measured in terms of serial position) between the two. This curve demonstrates the temporal 6 Figure 4: (Left) Box-plot of average predictive log-probability of recalled words under different models. S: pure semantic model; E: pure episodic model. Green line indicates chance. See text for more detailed descriptions of these models. (Right) Box-plot of inferred parameter values across subjects. contiguity effect observed in human recall behavior: the increased probability of recalling words that were studied nearby in time to the last-recalled word. As in TCM, this effect is present in our model because items studied close in time to one another have similar context vectors; as such, cuing with contextual information from time t will facilitate recall of other items studied in temporal proximity to time t. 5.2 Modeling psychological data The psychological data modeled here are from a not-previously-published dataset collected by Sederberg and Norman. 30 participants studied 8 lists of words for a delayed free-recall task. Each list was composed of 15 common nouns, chosen at random and without replacement from one of 28 categories, such as Musical Instruments, Sports, or Four-footed Animals. After fitting LDA to the TASA corpus [5], we ran the particle filter with 1000 particles on the Sederberg and Norman dataset. Our main interest here is comparing our model (which we refer to as the semantic-episodic model) against various special hyperparameter settings that correspond to alternative psychological accounts of verbal memory. The models being compared include: 1. Pure semantic: defined by drawing words exclusively from the semantic path, with λ = 1. This type of model has been used by [7] to examine semantic similarity effects in free recall. 2. Pure episodic: defined by drawing words exclusively from the episodic path, with λ = 0. 3. Semantic-episodic: a = b = 1 (uniform beta prior on λ). This corresponds to a model in which words are drawn from a mixture of the episodic and semantic paths. We also compare against a null (chance) model in which all words in the vocabulary have an equal probability of being recalled. As a metric of model comparison, we calculate the model’s predictive probability for the word recalled at time t given words 1 to t −1, for all t: T X t=1 −log p(wr,t|wr,1:t−1, ws,1:N). (12) This metric is proportional to the accumulative prediction error [19], a variant of cross-validation designed for time series models. To assure ourselves that the particle filter we used does not suffer from weight degeneracy, we also calculated the effective sample size, as recommended by [4]: ESS = PC c=1 v(c)2−1 . Conventionally, it is desirable that the effective sample size is at least half the number of particles. This desideratum was satisfied for all the models we explored. 7 Before we present the quantitative results, it is useful to examine some examples of inferred context change and how it interacts with word recall. Figure 3 shows the different factors at work in generating context change during recall on a single trial, illustrating how semantic inference and retrieved episodic memories combine to drive context change. The legend showing the top words in each topic illustrates how these topics appear to capture some of the semantic structure of the recalled words. On the right of Figure 3, we show another representation of context change (from a different trial), where the context trajectory is projected onto the first two principal components of the context vector. We can see from this figure how recall involves reinstatement of studied contexts: Recalling a word pulls the inferred context vector in the direction of the (inferred) contextual state associated with that word at study. Figure 4 (left) shows the average predictive log-probability of recalled words for the models described above. Overall, the semantic-episodic model outperforms the pure episodic and pure semantic models in predictive accuracy (superiority over the closest competitor, the pure episodic model, was confirmed by a paired-sample t-test, with p < 0.002). To gain deeper insight into this pattern of results, consider the behavior of the different “pure” models with respect to extra-list intrusions vs. studied list items. The pure episodic model completely fails to predict extra-list intrusions, because it restricts recall to the study list (i.e., it assigns zero predictive probability to extra-list items). Conversely, the pure semantic model does a poor job of predicting recall of studied list items, because it does not scope recall to the study list. Thus, each of these models is hobbled by crucial (but complementary) shortcomings. The semantic-episodic model, by occupying an intermediate position between these two extremes, is able to capture both the semantic and temporal structure in free recall. Our second goal in inference was to examine individual differences in parameter fits. Figure 4 (right) shows box-plots of the different parameters. In some cases there is substantial variability across subjects, such as for the similarity parameter ϵ. Another pattern to notice is that the values of the episodic-semantic trade-off parameter λ tend to cluster close to 0 (the episodic extreme of the spectrum), consistent with the fact that the pure episodic and semantic-episodic models are fairly comparable in predictive accuracy. Future work will assess the extent to which these across-subject differences in parameter fits reflect stable individual differences in memory functioning. 6 Discussion We have presented here LDA-TCM, a probabilistic model of memory that integrates semantic and episodic influences on recall behavior. By formalizing this model as a probabilistic graphical model, we have provided a common language for developing and comparing more sophisticated variants. Our simulation and empirical results show that LDA-TCM captures key aspects of the experimental data and provides good accuracy at making item-by-item recall predictions. The source code for learning and inference and the experimental datasets are available at www.cs.princeton.edu/˜blei. There are a number of advantages to adopting a Bayesian approach to modeling free recall behavior. First, it is easy to integrate more sophisticated semantic models such as hierarchical Dirichlet processes [18]. Second, hierarchical model specification gives us the power to capture both common and idiosyncratic behavioral patterns across subjects, thereby opening a window onto individual differences in memory. Finally, this approach makes it possible to integrate other sources of data, such as brain imaging data. In keeping with the graphical model formalism, we plan to augment LDA-TCM with additional nodes representing variables measured with functional magnetic resonance imaging (fMRI). Existing studies have used fMRI data to decode semantic states in the brain [12] and predict recall behavior at the level of semantic categories [13]. Incorporating fMRI data into the model will have several benefits: The fMRI data will serve as an additional constraint on the inference process, thereby improving our ability to track subjects’ mental states during encoding and recall; fMRI will give us a new way of validating the model – we will be able to measure the model’s ability to predict both brain states and behavior; also, by examining the relationship between latent context states and fMRI data, we will gain insight into how mental context is instantiated in the brain. Acknowledgements RS acknowledges support from the Francis Robbins Upton Fellowship and the ERP Fellowship. This work was done while RS was at Princeton University. PBS acknowledges support from National Institutes of Health research grant MH080526. 8 References [1] J. Aitchison. The statistical analysis of compositional data. Journal of the Royal Statistical Society. Series B (Methodological), pages 139–177, 1982. [2] D.M. Blei and J.D. Lafferty. Dynamic topic models. In Proceedings of the 23rd international conference on Machine learning, pages 113–120. ACM New York, NY, USA, 2006. [3] D.M. Blei, A.Y. Ng, and M.I. Jordan. Latent dirichlet allocation. Journal of Machine Learning Research, 3:993–1022, 2003. [4] A. Doucet and N. De Freitas. Sequential Monte Carlo Methods in Practice. Springer, 2001. [5] ST Dumais and TK Landauer. A solution to Platos problem: The latent semantic analysis theory of acquisition, induction and representation of knowledge. Psychological Review, 104:211–240, 1997. [6] A. Gelman and J. Hill. Data analysis using regression and multilevel/hierarchical models. Cambridge University Press, 2007. [7] T.L. Griffiths, M. Steyvers, and J.B. Tenenbaum. Topics in semantic representation. Psychological Review, 114(2):211–244, 2007. [8] M.W. Howard, B. Jing, K.M. Addis, and M.J. Kahana. Semantic structure and episodic memory. Handbook of Latent Semantic Analysis, pages 121–142, 2007. [9] M.W. Howard and M.J. Kahana. Contextual variability and serial position effects in free recall. Journal of Experimental Psychology: Learning, Memory, and Cognition, 25(4):923, 1999. [10] M.W. Howard and M.J. Kahana. A distributed representation of temporal context. Journal of Mathematical Psychology, 46:269–299, 2002. [11] M.W. Howard and M.J. Kahana. When does semantic similarity help episodic retrieval? Journal of Memory and Language, 46(1):85–98, 2002. [12] T.M. Mitchell, S.V. Shinkareva, A. Carlson, K. Chang, V.L. Malave, R.A. Mason, and M.A. Just. Predicting human brain activity associated with the meanings of nouns. Science, 320(5880):1191–1195, 2008. [13] S.M. Polyn, V.S. Natu, J.D. Cohen, and K.A. Norman. Category-specific cortical activity precedes retrieval during memory search. Science, 310(5756):1963–1966, 2005. [14] S.M. Polyn, K.A. Norman, and M.J. Kahana. A context maintenance and retrieval model of organizational processes in free recall. Psychological Review, 116(1):129, 2009. [15] H.L. Roediger and K.B. McDermott. Creating false memories: Remembering words not presented in lists. Journal of Experimental Psychology Learning Memory and Cognition, 21:803–803, 1995. [16] P.B. Sederberg, M.W. Howard, and M.J. Kahana. A context-based theory of recency and contiguity in free recall. Psychological Review, 115(4):893–912, 2008. [17] Y. Teh, D. Newman, and M. Welling. A collapsed variational Bayesian inference algorithm for latent Dirichlet allocation. In Neural Information Processing Systems, 2006. [18] 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. [19] E.J. Wagenmakers, P. Gr¨unwald, and M. Steyvers. Accumulative prediction error and the selection of time series models. Journal of Mathematical Psychology, 50(2):149–166, 2006. 9
2009
242
3,751
Structural inference affects depth perception in the context of potential occlusion Ian H. Stevenson and Konrad P. K¨ording Department of Physical Medicine and Rehabilitation Northwestern University Chicago, IL 60611 i-stevenson@northwestern.edu Abstract In many domains, humans appear to combine perceptual cues in a near-optimal, probabilistic fashion: two noisy pieces of information tend to be combined linearly with weights proportional to the precision of each cue. Here we present a case where structural information plays an important role. The presence of a background cue gives rise to the possibility of occlusion, and places a soft constraint on the location of a target - in effect propelling it forward. We present an ideal observer model of depth estimation for this situation where structural or ordinal information is important and then fit the model to human data from a stereo-matching task. To test whether subjects are truly using ordinal cues in a probabilistic manner we then vary the uncertainty of the task. We find that the model accurately predicts shifts in subject’s behavior. Our results indicate that the nervous system estimates depth ordering in a probabilistic fashion and estimates the structure of the visual scene during depth perception. 1 Introduction Understanding how the nervous system makes sense of uncertain visual stimuli is one of the central goals of perception research. One strategy to reduce uncertainty is to combine cues from several sources into a good joint estimate. If the cues are Gaussian, for instance, an ideal observer should combine them linearly with weights proportional to the precision of each cue. In the past few decades, a number of studies have demonstrated that humans combine cues during visual perception to reduce uncertainty and often do so in near-optimal, probabilistic ways [1, 2, 3, 4]. In most situations, each cue gives noisy information about the variable of interest that can be modeled as a Gaussian likelihood function about the variable. Recently [5] have suggested that subjects may combine a metric cue (binocular disparity) with ordinal cues (convexity or familiarity of faces) during depth perception. In these studies ordinal cues were modeled as simple biases. We argue that the effect of such ordinal cues stems from a structural inference process where an observer estimates the structure of the visual scene along with depth cues. The importance of structural inference and occlusion constraints, particularly of hard constraints, has been noted previously [6, 7, 8]. For instance, it was found that points presented to one eye but not the other have a perceived depth that is constrained by the position of objects presented to both eyes. Although these unpaired image points do not contain depth cues in the usual sense, subjects were able to estimate their depth. This indicates that human subjects indeed use the inferred structure of a visual scene for the estimation of depth. Here we formalize the constraints presented by occlusion using a probabilistic framework. We first present the model and illustrate its ability to describe data from [7]. Then we present results from a new stereo-vision experiment in which subjects were asked to match the depth of an occluding 1 or occluded circle. The model accurately predicts human behavior in this task and describes the changes that occur when we increase depth uncertainty. These results cannot be explained by traditional cue combination or even more recent relevance (causal inference) models [9, 10, 11, 12]. Our constraint-based approach may thus be useful in understanding how subjects make sense of cluttered scenes and the impact of structural inference on perception. 2 Theory 2.1 An Ordinal Cue Combination Model We assume that observers receive noisy information about the depth of objects in the world. For concreteness, we assume that there is a central object c and a surrounding object s. The exact shapes and relative positions of these two objects are not important, but naming them will simplify the notation that follows. We assume that each of these objects has a true, hidden depth (xc and xs) and observers receive noisy observations of these depths (yc and ys). In a scene with potential occlusion there may be two (or more) possible interpretations of an image (Fig 1A). When there is no occlusion (structure S1) the depth observations of the two objects are independent. That is, we assume that the depth of the surrounding object in the scene s has no influence on our estimate of the depth of c. The distribution of observations is assumed to be Gaussian and is physically determined by disparity, shading, texture, or other depth cues and their associated uncertainties. In this case the joint distribution of the observations given the hidden positions is p(yc, ys|xc, xs, S1) = p(yc|xc, S1)p(ys|xs, S1) = Nyc(xc, σc)Nys(xs, σs). (1) When occlusion does occur, however, the position of the central object c is bounded by the depth of the surrounding, occluded object (structure S2) p(yc, ys|xc, xs, S2) ∝ Nyc(xc, σc)Nys(xs, σs) if xc > xs, 0 if xc ≤xs. (2) An ideal observer can then make use of this ordinal information in estimating the depth of the occluding object. The (marginal) posterior distribution over the hidden depth of the central object xc can be found by marginalizing over the depth of the surrounding object xs and possible structures (S1 and S2). p(xc | yc, ys) = p(xc | yc, ys, S1)p(S1) + p(xc | yc, ys, S2)p(S2) (3) Constraint p(S1) = 0 p(xc| yc, ys) p(S1) = 0.25 p(S1) = 1 Marginal Posterior S1 S2 Observation A B s c c s c s p(xc| yc, ys,S1) xc yc yc yc ys ys ys Figure 1: An occlusion model with soft-constraints. (A) Two possible structures leading to the same observation: one without occlusion S1 and one with occlusion S2. (B) Examples of biases in the posterior estimate of xc for complete (left), moderate (center), and no relevance (right). In the cases shown, the observed depth of the central stimulus yc is the same as the observed depth of the surrounding stimulus ys. Note that when yc ≫ys the constraint will not bias estimates of xc. 2 Using the assumption of conditional independence and assuming flat priors over the hidden depths xc and xs, the first term in this expression is p(xc | yc, ys, S1) = Z p(xc|yc, ys, xs, S1)p(xs | yc, ys, S1)dxs = Z p(xc|yc, S1)p(xs|ys, S1)dxs = Z Nxc(yc, σc)Nxs(ys, σs)dxs = Nxc(yc, σc). (4) The second term is then p(xc | yc, ys, S2) = Z p(xc|yc, ys, xs, S2)p(xs | yc, ys, S2)dxs = Z p(yc, ys|xc, xs, S2)dxs = Z xc −∞ Nxc(yc, σc)Nxs(ys, σs)dxs = 1 Z [erf(ρs(xc −ys))/2 + 1/2]Nxc(yc, σc), (5) where step 2 uses Bayes’ rule and the assumption of flat priors, ρs = 1/ p (2π)/σs and Z is a normalizing factor. Combining these two terms gives the marginal posterior p(xc | yc, ys) = 1 Z [(1 −p(S1))(erf(ρs(xc −ys))/2 + 1/2) + p(S1)] Nxc(yc, σc), (6) which describes the best estimate of the depth of the central object. Intuitively, the term in square brackets constrains the possible depths of the central object c (Fig 1B). The p(S1) term allows for the possibility that the constraint should not apply. Similar to models of causal inference [11, 12, 9, 10], the surrounding stimulus may be irrelevant, in which case we should simply rely on the observation of the target. Here we have described two specific structures in the world that result in the same observation. Real world stimuli may result from a much larger set of possible structures. Generally, we can simply split structures into those with occlusion O and those without occlusion ¬O. Above, S1 corresponds to the set of possible structures without occlusion ¬O, and S2 corresponds to the set of possible structures with occlusion O. It is not necessary to actually enumerate the possible structures. Similar to traditional cue combination models, where there is an analytic form for the expected value of the target (linear combination weighted by the precision of each cue), we can write down analytic expressions for E[xc] for at least one case. For p(S1) = 0, σs →0 the mean of the marginal posterior is the expected value of a truncated Gaussian E(xc|ys < xc) = yc + σcλ(ys −yc σc ) (7) Where λ(·) = φ(·) [1−Φ(·)], φ(·) is the PDF for the standard normal distribution and Φ(·) is the CDF. For yc = ys, for instance, E(xc|ys < xc) = yc + 0.8σc (8) It is important to note that, similar to classical cue combination models, estimation of the target is improved by combining depth information with the occlusion constraint. The variance of p(xc|yc, ys) is smaller than that of p(xc | yc, ys, S1). 3 2.2 Modeling Data from Nakayama and Shimojo (1990) To illustrate the utility of this model, we fit data from [7]. In this experiment subjects were presented with a rectangle in each eye. Horizontal disparity between the two rectangles gave the impression of depth. To test how subjects perceive occluded objects, a small vertical bar was presented to one eye, giving the impression that the large rectangle was occluding the bar and leading to unpaired image points (Fig 2A). Subjects were then asked to match the depth of this vertical bar by changing the disparity of another image in which the bar was presented in stereo. Despite the absence of direct depth cues, subjects assigned a depth to the vertical bar. Moreover, for a range of horizontal distances, the assigned depth was consistent with the constraint provided by the stereo-rectangle (Fig 2B). These results systematically characterize the effect of structural estimation on depth estimates. Without ordinal information, the horizontal distance between the rectangle and the vertical bar should have no effect on the perceived depth of the bar. In our model yc and ys are simply observations on the depth of two objects: in this case, the unpaired vertical bar and the large rectangle. Since there isn’t direct disparity for the vertical bar, we assume that horizontal distance from the large rectangle serves as the depth cue. In reality an infinity of depths are compatible with a given horizontal distance (Fig 2A, dotted lines). However, the size and shape of the vertical bar serve as indirect cues, which we assume generate a Gaussian likelihood (as in Eq. 1). We fit our model to this data with three free parameters: σs, σc, and a relevance term p(O). The event O corresponds to occlusion (case S2), while ¬O corresponds to the set of possible structures leading to the same observation without occlusion. For the valid stimuli where occlusion can account for the vertical bar being seen in only one eye, σs = 4.45 arcmin, σc = 12.94 arcmin and p(¬O) = 0.013 minimized the squared error between the data and model fit (Fig 2C). For invalid stimuli we assume that p(¬O) = 1, which matches subject’s responses. R A B L Unpaired Image Points DISTANCE (min arc) 0 20 40 60 0 10 20 0 20 40 60 L R Valid Stimuli Invalid Stimuli L R Valid Invalid Data Model Figure 2: Experiment and data from [7]. A) Occlusion puts hard constraints on the possible depth of unpaired image points (top). This leads to ”valid” and ”invalid” stimuli (bottom). B) When subjects were asked to judge the depth of unpaired image points they followed these hard constraints (dotted lines) for a range of distances between the large rectangle and vertical bar (top). The two figures show a single subject’s response when the vertical bar was positioned to the left or right of a large rectangle. The ordinal cue combination model can describe this behavior as well as deviations from the constraints for large distances (bottom). 4 3 Experimental Methods To test this model in a more general setting where depth is driven by both paired and unpaired image points we constructed a simple depth matching experiment. Subjects (N=7) were seated 60cm in front of a CRT wearing shutter glasses (StereoGraphics CrystalEyes, 100Hz refresh rate) and asked to maintain their head position on a chin-rest. The experiment consisted of two tasks: a two-alternative forced choice task (2AFC) to measure subjects’ depth acuity and a stereo-matching task to measure their perception of depth when a surrounding object was present. The target (central) objects were drawn on-screen as circles (13.0 degrees diameter) composed of random dots on a background pedestal of random dots (Fig 3). In the 2AFC task, subjects were presented with two target objects with slightly different horizontal disparities and asked to indicate using the keyboard which object was closer. The reference object had a horizontal disparity of 0.57 degrees and was positioned randomly each trial on either the left or right side. The pedestal had a horizontal disparity of -0.28 degrees. Subjects performed 100 trials in which the disparity of the test object was chosen using optimal experimental design methods [13]. After the first 10 trials the next sample was chosen to maximize the conditional mutual information between the responses and the parameter for the just-noticeable depth difference (JND) given the sample position. This allowed us to efficiently estimate the JND for each subject. In the stereo-matching task subjects were presented with two target objects and a larger surrounding circle (25.2 degrees diameter) paired with one of the targets. Subjects were asked to match the depth of the unpaired target with that of the paired target using the keyboard (100 trials). The depth of the paired target was held fixed across trials at 0.57 degrees horizontal disparity while the position of the surrounding circle was varied between 0.14-1.00 degrees horizontal disparity. The depth of the unpaired target was selected randomly at the beginning of each trial to minimize any effects of the starting position. All objects were presented in gray-scale and the target was presented offcenter from the surrounding object to avoid confounding shape cues. The side on which the paired target and surrounding object appeared (left or right side of the screen) was also randomly chosen from trial to trial, and all objects were within the fusional limits for this task. When asked, subjects reported that diplopia occurred only when they drove the unpaired target too far in one direction or the other. Each of these tasks (the 2AFC task and the stereo-matching task) was performed for two uncertainty conditions: a low and high uncertainty condition. We varied the uncertainty by changing the distribution of disparities for the individual dots which composed the target objects and the larger occluding/occluded circle. In the low uncertainty condition the disparity for each dot was drawn from a Gaussian distribution with a variance of 2.2 arc minutes. In the high uncertainty condition A B Figure 3: Experimental design. Each trial consists of a matching task in which subjects control the depth of an unpaired circle (A, left). Subjects attempt to match the depth of this unpaired circle to the depth of a target circle which is surrounded by a larger object (A, right). Divergent fusers can fuse (B) to see the full stimulus. The contrast has been reversed for visibility. To measure depth acuity, subjects also complete a two-alternative forced choice task (2AFC) using the same stimulus without the surrounding object. 5 the disparities were drawn with a variance of 6.5 arc minutes. All subjects had normal or corrected to normal vision and normal stereo vision (as assessed by a depth acuity < 5 arcmin in the low uncertainty 2AFC task). All experimental protocols were approved by IRB and in accordance with Northwestern University’s policy statement on the use of humans in experiments. Informed consent was obtained from all participants. 4 Results All subjects showed increased just-noticeable depth differences between the low and high uncertainty conditions. The JNDs were significantly different across conditions (one-sided paired t-test, p= 0.0072), suggesting that our manipulation of uncertainty was effective (Fig 4A). In the matching task, subjects were, on average, biased by the presence of the surrounding object. As the disparity of the surrounding object was increased and disparity cues suggested that s was closer than c, this bias increased. Consistent with our model, this bias was higher in the high uncertainty condition (Fig 4B and C). However, the difference between uncertainty conditions was only significant for two surround depths (0.6 and 1.0 degrees, one-sided paired t-test p=0.004, p=0.0281) and not significant as a main effect (2-way ANOVA p=0.3419). To model the bias, we used the JNDs estimated from the 2AFC task, and fit two free parameters: σs and p(¬O), by minimizing the squared error between model predictions and subject’s responses. The model provided an accurate fit for both individual subjects and the across subject data (Fig 4B and C). For the across subject data, we found σs = 0.085 arcmin for the low uncertainty condition and σs = 0.050 arcmin for the high uncertainty 0 0.5 1 1.5 2 2.5 3 3.5 Just noticeable depth diference (arcmin) Low Uncertainty High Uncertainty * A B C 0.2 0.4 0.6 0.8 1 −4 −2 0 2 4 6 8 Depth of surrounding object (degrees) Diference in perceived depth (arcmin) Subject IV −2 0 2 4 6 8 10 12 14 −4 0.2 0.4 0.6 0.8 1 Across Subject Average N = 7 Depth of surrounding object (degrees) yc yc Figure 4: Experimental results. (A) Just noticeable depth differences for the two uncertainty conditions averaged across subjects. (B) and (C) show the difference between the perceived depth of the unpaired target and the paired target (the bias) as a function of the depth of the surrounding circle. Results for a typical subject (B) and the across subject average (C). Dots and error-bars denote subject responses, solid lines denote model fits, and dotted lines denote the depth of the paired target, which was fixed. Error bars denote SEM (N=7). 6 condition. In these cases, p(¬O) was not significantly different from zero and the simplified model in which p(¬O) = 0 was preferred (cross-validated likelihood ratio test). Over the range of depths we tested, this relevance term does not seem to play a role. However, we predict that for larger discrepancies this relevance term would come into play as subjects begin to ignore the surrounding object (as in Fig 2). Note that if the presence of a surrounding object had no effect subjects would be unbiased across depths of the occluded object. Two subjects (out of 7) did not show bias; however, both subjects had normal stereo vision and this behavior did not appear to be correlated with low or high depth acuity. Since subjects were allowed to free-view the stimulus, it is possible that some subjects were able to ignore the surrounding object completely. As with the invalid stimuli in [7], a model where p(¬O) = 1 accurately fit data from these subjects. The rest of the subjects demonstrated bias (see Fig 4B for an example), but more data may be need to conclusively show differences between the two uncertainty conditions and causal inference effects. 5 Discussion The results presented above illustrate the importance of structural inference in depth perception. We have shown that potential occlusion can bias perceived depth, and a probabilistic model of the constraints accurately accounts for subjects’ perception during occlusion tasks with unpaired image points [7] as well as a novel task designed to probe the effects of structural inference. x1 x2 y1 y2 A B ? Model Relation References Cue Combination Causal Inference Ordinal Cue Combination x1 = x2 probabilistic x1=x2 probabilistic x1>x2 e.g. Alais and Burr (2004), Ernst and Banks (2002) e.g. Knill (2007), Kording et al. (2007) model presented here Cue Combination Causal Inference Ordinal Cue Combination D y1 E[x2] E[x2] E[x2] y1 C Figure 5: Models of cue combination. (A) Given the observations (y1 and y2) from two sources, how should we estimate the hidden sources x1 and x2? (B) Classical cue combination models assume x1 = x2. This results in a linear weighting of the cues. Non-linear cue combination can be explained by causal inference models where x1 and x2 are probabilistically equal. (C) In the model presented here, ordinal information introduces an asymmetry into cue combination. x1 and x2 are related here by a probabilistic inequality. (D) A summary of the relation between x1 and x2 for each model class. 7 A number of studies have proposed probabilistic accounts of depth perception [1, 4, 12, 14], and a variety of cues, such as disparity, shading, and texture, can all be combined to estimate depth [4, 12]. However, accounting for structure in the visual scene and use of occlusion constraints is typically qualitative or limited to hard constraints where certain depth arrangements are strictly ruled out [6, 14]. The model presented here accounts for a range of depth perception effects including perception of both paired and unpaired image points. Importantly, this model of perception explains the effects of ordinal cues in a cohesive structural inference framework. More generally, ordinal information introduces asymmetry into cue combination. Classically, cue combination models assume a generative model in which two observations arise from the same hidden source. That is, the hidden source for observation 1 is equal to the hidden source for observation 2 (Fig 5A). More recently, causal inference or cue conflict models have been developed that allow for the possibility of probabilistic equality [9, 11, 12]. That is, there is some probability that the two sources are equal and some probability that they are unequal. This addition explains a number of nonlinear perceptual effects [9, 10] (Fig 5B). The model presented here extends these previous models by introducing ordinal information and allowing the relationship between the two sources to be an inequality - where the value from one source is greater than or less than the other. As with causal inference models, relevance terms allow the model to capture probabilistic inequality, and this type of mixture model allows descriptions of asymmetric and nonlinear behavior (Fig 5C). The ordinal cue combination model thus increases the class of behaviors that can be modeled by cue combination and causal inference and should have applications for other modalities where ordinal and structural information is important. References [1] M. O. Ernst and M. S. Banks. Humans integrate visual and haptic information in a statistically optimal fashion. Nature, 415(6870):429–33, 2002. [2] D. Kersten and A. Yuille. Bayesian models of object perception. Current Opinion in Neurobiology, 13(2):150–158, 2003. [3] D. C. Knill and W. Richards. Perception as Bayesian inference. Cambridge University Press, 1996. [4] M. S. Landy, L. T. Maloney, E. B. Johnston, and M. Young. Measurement and modeling of depth cue combination: In defense of weak fusion. Vision Research, 35(3):389–412, 1995. [5] J. Burge, M. A. Peterson, and S. E. Palmer. Ordinal configural cues combine with metric disparity in depth perception. Journal of Vision, 5(6):5, 2005. [6] D. Geiger, B. Ladendorf, and A. Yuille. Occlusions and binocular stereo. International Journal of Computer Vision, 14(3):211–226, 1995. [7] K. Nakayama and S. Shimojo. da vinci stereopsis: Depth and subjective occluding contours from unpaired image points. Vision Research, 30(11):1811, 1990. [8] J. J. Tsai and J. D. Victor. Neither occlusion constraint nor binocular disparity accounts for the perceived depth in the sieve effect. Vision Research, 40(17):2265–2275, 2000. [9] K. P. K¨ording, U. Beierholm, W. J. Ma, S. Quartz, J. B. Tenenbaum, and L. Shams. Causal inference in multisensory perception. PLoS ONE, 2(9), 2007. [10] K. Wei and K. K¨ording. Relevance of error: what drives motor adaptation? Journal of Neurophysiology, 101(2):655, 2009. [11] M. O. Ernst and H. H. B¨ulthoff. Merging the senses into a robust percept. Trends in Cognitive Sciences, 8(4):162–169, 2004. [12] D. C. Knill. Robust cue integration: A bayesian model and evidence from cue-conflict studies with stereoscopic and figure cues to slant. Journal of Vision, 7(7):5, 2007. [13] L. Paninski. Asymptotic theory of information-theoretic experimental design. Neural Computation, 17(7):1480–1507, 2005. [14] K. Nakayama and S. Shimojo. Experiencing and perceiving visual surfaces. Science, 257(5075):1357– 1363, Sep 1992. 8
2009
243
3,752
Indian Buffet Processes with Power-law Behavior Yee Whye Teh and Dilan G¨or¨ur Gatsby Computational Neuroscience Unit, UCL 17 Queen Square, London WC1N 3AR, United Kingdom {ywteh,dilan}@gatsby.ucl.ac.uk Abstract The Indian buffet process (IBP) is an exchangeable distribution over binary matrices used in Bayesian nonparametric featural models. In this paper we propose a three-parameter generalization of the IBP exhibiting power-law behavior. We achieve this by generalizing the beta process (the de Finetti measure of the IBP) to the stable-beta process and deriving the IBP corresponding to it. We find interesting relationships between the stable-beta process and the Pitman-Yor process (another stochastic process used in Bayesian nonparametric models with interesting power-law properties). We derive a stick-breaking construction for the stable-beta process, and find that our power-law IBP is a good model for word occurrences in document corpora. 1 Introduction The Indian buffet process (IBP) is an infinitely exchangeable distribution over binary matrices with a finite number of rows and an unbounded number of columns [1, 2]. It has been proposed as a suitable prior for Bayesian nonparametric featural models, where each object (row) is modeled with a potentially unbounded number of features (columns). Applications of the IBP include Bayesian nonparametric models for ICA [3], choice modeling [4], similarity judgements modeling [5], dyadic data modeling [6] and causal inference [7]. In this paper we propose a three-parameter generalization of the IBP with power-law behavior. Using the usual analogy of customers entering an Indian buffet restaurant and sequentially choosing dishes from an infinitely long buffet counter, our generalization with parameters α > 0, c > −σ and σ ∈[0, 1) is simply as follows: • Customer 1 tries Poisson(α) dishes. • Subsequently, customer n + 1: – tries dish k with probability mk−σ n+c , for each dish that has previously been tried; – tries Poisson(α Γ(1+c)Γ(n+c+σ) Γ(n+1+c)Γ(c+σ)) new dishes. where mk is the number of previous customers who tried dish k. The dishes and the customers correspond to the columns and the rows of the binary matrix respectively, with an entry of the matrix being one if the corresponding customer tried the dish (and zero otherwise). The mass parameter α controls the total number of dishes tried by the customers, the concentration parameter c controls the number of customers that will try each dish, and the stability exponent σ controls the power-law behavior of the process. When σ = 0 the process does not exhibit power-law behavior and reduces to the usual two-parameter IBP [2]. Many naturally occurring phenomena exhibit power-law behavior, and it has been argued that using models that can capture this behavior can improve learning [8]. Recent examples where this has led to significant improvements include unsupervised morphology learning [8], language modeling [9] 1 and image segmentation [10]. These examples are all based on the Pitman-Yor process [11, 12, 13], a generalization of the Dirichlet process [14] with power-law properties. Our generalization of the IBP extends the ability to model power-law behavior to featural models, and we expect it to lead to a wealth of novel applications not previously well handled by the IBP. The approach we take in this paper is to first define the underlying de Finetti measure, then to derive the conditional distributions of Bernoulli process observations with the de Finetti measure integrated out. This automatically ensures that the resulting power-law IBP is infinitely exchangeable. We call the de Finetti measure of the power-law IBP the stable-beta process. It is a novel generalization of the beta process [15] (which is the de Finetti measure of the normal two-parameter IBP [16]) with characteristics reminiscent of the stable process [17, 11] (in turn related to the Pitman-Yor process). We will see that the stable-beta process has a number of properties similar to the Pitman-Yor process. In the following section we first give a brief description of completely random measures, a class of random measures which includes the stable-beta and the beta processes. In Section 3 we introduce the stable-beta process, a three parameter generalization of the beta process and derive the powerlaw IBP based on the stable-beta process. Based on the proposed model, in Section 4 we construct a model of word occurrences in a document corpus. We conclude with a discussion in Section 5. 2 Completely Random Measures In this section we give a brief description of completely random measures [18]. Let Θ be a measure space with Ωits σ-algebra. A random variable whose values are measures on (Θ, Ω) is referred to as a random measure. A completely random measure (CRM) µ over (Θ, Ω) is a random measure such that µ(A)⊥⊥µ(B) for all disjoint measurable subsets A, B ∈Ω. That is, the (random) masses assigned to disjoint subsets are independent. An important implication of this property is that the whole distribution over µ is determined (with usually satisfied technical assumptions) once the distributions of µ(A) are given for all A ∈Ω. CRMs can always be decomposed into a sum of three independent parts: a (non-random) measure, an atomic measure with fixed atoms but random masses, and an atomic measure with random atoms and masses. CRMs in this paper will only contain the second and third components. In this case we can write µ in the form, µ = N X k=1 ukδφk + M X l=1 vlδψl, (1) where uk, vl > 0 are the random masses, φk ∈Θ are the fixed atoms, ψl ∈Θ are the random atoms, and N, M ∈N∪{∞}. To describe µ fully it is sufficient to specify N and {φk}, and to describe the joint distribution over the random variables {uk}, {vl}, {ψl} and M. Each uk has to be independent from everything else and has some distribution Fk. The random atoms and their weights {vl, ψl} are jointly drawn from a 2D Poisson process over (0, ∞] × Θ with some nonatomic rate measure Λ called the L´evy measure. The rate measure Λ has to satisfy a number of technical properties; see [18, 19] for details. If R Θ R (0,∞] Λ(du × dθ) = M ∗< ∞then the number of random atoms M in µ is Poisson distributed with mean M ∗, otherwise there are an infinite number of random atoms. If µ is described by Λ and {φk, Fk}N k=1 as above, we write, µ ∼CRM(Λ, {φk, Fk}N k=1). (2) 3 The Stable-beta Process In this section we introduce a novel CRM called the stable-beta process (SBP). It has no fixed atoms while its L´evy measure is defined over (0, 1) × Θ: Λ0(du × dθ) = α Γ(1 + c) Γ(1 −σ)Γ(c + σ)u−σ−1(1 −u)c+σ−1duH(dθ) (3) where the parameters are: a mass parameter α > 0, a concentration parameter c > −σ, a stability exponent 0 ≤σ < 1, and a smooth base distribution H. The mass parameter controls the overall mass of the process and the base distribution gives the distribution over the random atom locations. 2 The mean of the SBP can be shown to be E[µ(A)] = αH(A) for each A ∈Ω, while var(µ(A)) = α 1−σ 1+c H(A). Thus the concentration parameter and the stability exponent both affect the variability of the SBP around its mean. The stability exponent also governs the power-law behavior of the SBP. When σ = 0 the SBP does not have power-law behavior and reduces to a normal two-parameter beta process [15, 16]. When c = 1 −σ the stable-beta process describes the random atoms with masses < 1 in a stable process [17, 11]. The SBP is so named as it can be seen as a generalization of both the stable and the beta processes. Both the concentration parameter and the stability exponent can be generalized to functions over Θ though we will not deal with this generalization here. 3.1 Posterior Stable-beta Process Consider the following hierarchical model: µ ∼CRM(Λ0, {}), Zi|µ ∼BernoulliP(µ) iid, for i = 1, . . . , n. (4) The random measure µ is a SBP with no fixed atoms and with L´evy measure (3), while Zi ∼ BernoulliP(µ) is a Bernoulli process with mean µ [16]. This is also a CRM: in a small neighborhood dθ around θ ∈Θ it has a probability µ(dθ) of having a unit mass atom in dθ; otherwise it does not have an atom in dθ. If µ has an atom at θ the probability of Zi having an atom at θ as well is µ({θ}). If µ has a smooth component, say µ0, Zi will have random atoms drawn from a Poisson process with rate measure µ0. In typical applications to featural models the atoms in Zi give the features associated with data item i, while the weights of the atoms in µ give the prior probabilities of the corresponding features occurring in a data item. We are interested in both the posterior of µ given Z1, . . . , Zn, as well as the conditional distribution of Zn+1|Z1, . . . , Zn with µ marginalized out. Let θ∗ 1, . . . , θ∗ K be the K unique atoms among Z1, . . . , Zn with atom θ∗ k occurring mk times. Theorem 3.3 of [20] shows that the posterior of µ given Z1, . . . , Zn is still a CRM, but now including fixed atoms given by θ∗ 1, . . . , θ∗ K. Its updated L´evy measure and the distribution of the mass at each fixed atom θ∗ k are, µ|Z1, . . . , Zn ∼CRM(Λn, {θ∗ k, Fnk}K k=1), (5) where Λn(du × dθ) =α Γ(1 + c) Γ(1 −σ)Γ(c + σ)u−σ−1(1 −u)n+c+σ−1duH(dθ), (6a) Fnk(du) = Γ(n + c) Γ(mk −σ)Γ(n −mk + c + σ)umk−σ−1(1 −u)n−mk+c+σ−1du. (6b) Intuitively, the posterior is obtained as follows. Firstly, the posterior of µ must be a CRM since both the prior of µ and the likelihood of each Zi|µ factorize over disjoint subsets of Θ. Secondly, µ must have fixed atoms at each θ∗ k since otherwise the probability that there will be atoms among Z1, . . . , Zn at precisely θ∗ k is zero. The posterior mass at θ∗ k is obtained by multiplying a Bernoulli “likelihood” umk(1 −u)n−mk (since there are mk occurrences of the atom θ∗ k among Z1, . . . , Zn) to the “prior” Λ0(du×dθ∗ k) in (3) and normalizing, giving us (6b). Finally, outside of these K atoms there are no other atoms among Z1, . . . , Zn. We can think of this as n observations of 0 among n iid Bernoulli variables, so a “likelihood” of (1 −u)n is multiplied into Λ0 (without normalization), giving the updated L´evy measure in (6a). Let us inspect the distributions (6) of the fixed and random atoms in the posterior µ in turn. The random mass at θ∗ k has a distribution Fnk which is simply a beta distribution with parameters (mk − σ, n −mk + c + σ). This differs from the usual beta process in the subtraction of σ from mk and addition of σ to n −mk + c. This is reminiscent of the Pitman-Yor generalization to the Dirichlet process [11, 12, 13], where a discount parameter is subtracted from the number of customers seated around each table, and added to the chance of sitting at a new table. On the other hand, the L´evy measure of the random atoms of µ is still a L´evy measure corresponding to an SBP with updated parameters α′ ←αΓ(1 + c)Γ(n + c + σ) Γ(n + 1 + c)Γ(c + σ), σ′ ←σ c′ ←c + n, H′ ←H. (7) 3 Note that the update depends only on n, not on Z1, . . . , Zn. In summary, the posterior of µ is simply an independent sum of an SBP with updated parameters and of fixed atoms with beta distributed masses. Observe that the posterior µ is not itself a SBP. In other words, the SBP is not conjugate to Bernoulli process observations. This is different from the beta process and again reminiscent of Pitman-Yor processes, where the posterior is also a sum of a Pitman-Yor process with updated parameters and fixed atoms with random masses, but not a Pitman-Yor process [11]. Fortunately, the non-conjugacy of the SBP does not preclude efficient inference. In the next subsections we describe an Indian buffet process and a stick-breaking construction corresponding to the SBP. Efficient inference techniques based on both representations for the beta process can be straightforwardly generalized to the SBP [1, 16, 21]. 3.2 The Stable-beta Indian Buffet Process We can derive an Indian buffet process (IBP) corresponding to the SBP by deriving, for each n, the distribution of Zn+1 conditioned on Z1, . . . , Zn, with µ marginalized out. This derivation is straightforward and follows closely that for the beta process [16]. For each of the atoms θ∗ k the posterior of µ(θ∗ k) given Z1, . . . , Zn is beta distributed with mean mk−σ n+c . Thus p(Zn+1(θ∗ k) = 1|Z1, . . . , Zn) = E[µ(θ∗ k)|Z1, . . . , Zn] = mk −σ n + c (8) Metaphorically speaking, customer n + 1 tries dish k with probability mk−σ n+c . Now for the random atoms. Let θ ∈Θ\{θ∗ 1, . . . , θ∗ K}. In a small neighborhood dθ around θ, we have: p(Zn+1(dθ) = 1|Z1, . . . , Zn) = E[µ(dθ)|Z1, . . . , Zn] = Z 1 0 uΛn(du × dθ) = Z 1 0 uα Γ(1 + c) Γ(1 −σ)Γ(c + σ)u−1−σ(1 −u)n+c+σ−1duH(dθ) =α Γ(1 + c) Γ(1 −σ)Γ(c + σ)H(dθ) Z 1 0 u−σ(1 −u)n+c+σ−1du =αΓ(1 + c)Γ(n + c + σ) Γ(n + 1 + c)Γ(c + σ)H(dθ) (9) Since Zn+1 is completely random and H is smooth, the above shows that on Θ\{θ∗ 1, . . . , θ∗ K} Zn+1 is simply a Poisson process with rate measure α Γ(1+c)Γ(n+c+σ) Γ(n+1+c)Γ(c+σ)H. In particular, it will have Poisson(α Γ(1+c)Γ(n+c+σ) Γ(n+1+c)Γ(c+σ)) new atoms, each independently and identically distributed according to H. In the IBP metaphor, this corresponds to customer n+1 trying new dishes, with each dish associated with a new draw from H. The resulting Indian buffet process is as described in the introduction. It is automatically infinitely exchangeable since it was derived from the conditional distributions of the hierarchical model (4). Multiplying the conditional probabilities of each Zn given previous ones together, we get the joint probability of Z1, . . . , Zn with µ marginalized out: p(Z1, . . . , Zn) = exp  −α n X i=1 Γ(1+c)Γ(i−1+c+σ) Γ(i+c)Γ(c+σ)  K Y k=1 Γ(mk−σ)Γ(n−mk+c+σ)Γ(1+c) Γ(1−σ)Γ(c+σ)Γ(n+c) αh(θ∗ k), (10) where there are K atoms (dishes) θ∗ 1, . . . , θ∗ K among Z1, . . . , Zn with atom k appearing mk times, and h is the density of H. (10) is to be contrasted with (4) in [1]. The Kh! terms in [1] are absent as we have to distinguish among these Kh dishes in assigning each of them a distinct atom (this also contributes the h(θ∗ k) terms). The fact that (10) is invariant to permuting the ordering among Z1, . . . , Zn also indicates the infinite exchangeability of the stable-beta IBP. 3.3 Stick-breaking constructions In this section we describe stick-breaking constructions for the SBP generalizing those for the beta process. The first is based on the size-biased ordering of atoms induced by the IBP [16], while 4 the second is based on the inverse L´evy measure method [22], and produces a sequence of random atoms of strictly decreasing masses [21]. The size-biased construction is straightforward: we use the IBP to generate the atoms (dishes) in the SBP; each time a dish is newly generated the atom is drawn from H and its mass from Fnk. This leads to the following procedure: for n = 1, 2, . . .: Jn ∼Poisson(α Γ(1+c)Γ(n−1+c+σ) Γ(n+c)Γ(c+σ) ), for k = 1, . . . , Jn: vnk ∼Beta(1 −σ, n −1 + c + σ), ψnk ∼H, (11) µ = ∞ X n=1 Jn X k=1 vnkδψnk. The inverse L´evy measure is a general method of generating from a Poisson process with nonuniform rate measure. It essentially transforms the Poisson process into one with uniform rate, generates a sample, and transforms the sample back. This method is more involved for the SBP because the inverse transform has no analytically tractable form. The L´evy measure Λ0 of the SBP factorizes into a product Λ0(du × dθ) = L(du)H(dθ) of a σ-finite measure L(du) = α Γ(1+c) Γ(1−σ)Γ(c+σ)u−σ−1(1−u)c+σ−1du over (0, 1) and a probability measure H over Θ. This implies that we can generate a sample {vl, ψl}∞ l=1 of the random atoms of µ and their masses by first sampling the masses {vl}∞ l=1 ∼PoissonP(L) from a Poisson process on (0, 1) with rate measure L, and associating each vl with an iid draw ψl ∼H [19]. Now consider the mapping T : (0, 1) →(0, ∞) given by T(u) = Z 1 u L(du) = Z 1 u α Γ(1 + c) Γ(1 −σ)Γ(c + σ)u−σ−1(1 −u)c+σ−1du. (12) T is bijective and monotonically decreasing. The Mapping Theorem for Poisson processes [19] shows that {vl}∞ l=1 ∼PoissonP(L) if and only if {T(vl)}∞ l=1 ∼PoissonP(L) where L is Lebesgue measure on (0, ∞). A sample {tl}∞ l=1 ∼PoissonP(L) can be easily drawn by letting el ∼Exponential(1) and setting tl = Pl i=1 ei for all l. Transforming back with vl = T −1(tl), we have {vl}∞ l=1 ∼PoissonP(L). As t1, t2, . . . is an increasing sequence and T is decreasing, v1, v2, . . . is a decreasing sequence of masses. Deriving the density of vl given vl−1, we get: p(vl|vl−1) = dtl dvl p(tl|tl−1) = α Γ(1+c) Γ(1−σ)Γ(c+σ)v−σ−1 l (1−vl)c+σ−1 exp n − Z vl−1 vl L(du) o . (13) In general these densities do not simplify and we have to resort to solving for T −1(tl) numerically. There are two cases for which they do simplify. For c = 1, σ = 0, the density function reduces to p(vl|vl−1) = αvα−1 l /vα l−1, leading to the stick-breaking construction of the single parameter IBP [21]. In the stable process case when c = 1 −σ and σ ̸= 0, the density of vl simplifies to: p(vl | vl−1) = α Γ(2−σ) Γ(1−σ)Γ(1)v−σ−1 l × exp n − R vl−1 vl α Γ(2−σ) Γ(1−σ)Γ(1)u−σ−1du o = α(1 −σ)v−σ−1 l exp n −α(1−σ) σ (v−σ l −v−σ l−1) o . (14) Doing a change of values to yl = v−σ l , we get: p(yl|yl−1) = α 1−σ σ exp n −α 1−σ σ (yl −yl−1) o . (15) That is, each yl is exponentially distributed with rate α 1−σ σ and offset by yl−1. For general values of the parameters we do not have an analytic stick breaking form. However note that the weights generated using this method are still going to be strictly decreasing. 3.4 Power-law Properties The SBP has a number of appealing power-law properties. In this section we shall assume σ > 0 since the case σ = 0 reduces the SBP to the usual beta process with less interesting power-law properties. Derivations are given in the appendix. 5 10 0 10 2 10 4 10 6 10 0 10 1 10 2 10 3 10 4 10 5 number of customers mean number of dishes tried !=1, c=1 "=0.8 "=0.5 "=0.2 "=0 10 0 10 2 10 4 10 0 10 1 10 2 10 3 10 4 number of customers trying each dish number of dishes !=1, c=1, "=0.5 Figure 1: Power-law properties of the stable-beta Indian buffet process. Firstly, the total number of dishes tried by n customers is O(nσ). The left panel of Figure 1 shows this for varying σ. Secondly, the number of customers trying each dish follows a Zipf’s law [23]. This is shown in the right panel of Figure 1, which plots the number of dishes Km versus the number of customers m trying each dish (that is, Km is the number of dishes k for which mk = m). Asymptotically we can show that the proportion of dishes tried by m customers is O(m−1−σ). Note that these power-laws are similar to those observed for Pitman-Yor processes. One aspect of the SBP which is not power-law is the number of dishes each customer tries. This is simply Poisson(α) distributed. It seems difficult obtain power-law behavior in this aspect within a CRM framework, because of the fundamental role played by the Poisson process. 4 Word Occurrence Models with Stable-beta Processes In this section we use the SBP as a model for word occurrences in document corpora. Let n be the number of documents in a corpus. Let Zi({θ}) = 1 if word type θ occurs in document i and 0 otherwise, and let µ({θ}) be the occurrence probability of word type θ among the documents in the corpus. We use the hierarchical model (4) with a SBP prior1 on µ and with each document modeled as a conditionally independent Bernoulli process draw. The joint distribution over the word occurrences Z1, . . . , Zn, with µ integrated out, is given by the IBP joint probability (10). We applied the word occurrence model to the 20newsgroups dataset. Following [16], we modeled the training documents in each of the 20 newsgroups as a separate corpus with a separate SBP. We use the popularity of each word type across all 20 newsgroups as the base distribution2: for each word type θ let nθ be the number of documents containing θ and let H({θ}) ∝nθ. In the first experiment we compared the SBP to the beta process by fitting the parameters α, c and σ of both models to each newsgroup by maximum likelihood (in beta process case σ is fixed at 0) . We expect the SBP to perform better as it is better able to capture the power-law statistics of the document corpora (see Figure 2). The ML values of the parameters across classes did not vary much, taking values α = 142.6 ± 40.0, c = 4.1 ± 0.9 and σ = 0.47 ± 0.1. In comparison, the parameters values obtained by the beta process are α = 147.3 ± 41.4 and c = 25.9 ± 8.4. Note that the estimated values for c are significantly larger than for the SBP to allow the beta process to model the fact that many words occur in a small number of documents (a consequence of the power-law 1Words are discrete objects. To get a smooth base distribution we imagine appending each word type with a U[0, 1] variate. This does not affect the modelling that follows. 2The appropriate technique, as proposed by [16], would be to use a hierarchical SBP to tie the word occurrence probabilities across the newsgroups. However due to difficulties dealing with atomic base distributions we cannot define a hierarchical SBP easily (see discussion). 6 100 200 300 400 500 2000 4000 6000 8000 10000 12000 14000 number of documents cumulative number of words BP SBP DATA 10 0 10 1 10 2 10 0 10 1 10 2 10 3 number of documents per word number of words BP SBP DATA Figure 2: Power-law properties of the 20newsgroups dataset. The faint dashed lines are the distributions of words in the documents in each class, the solid curve is the mean of these lines. The dashed lines are the means of the word distributions generated by the ML parameters for the beta process (pink) and the SBP (green). Table 1: Classification performance of SBP and beta process (BP). The jth column (denoted 1:j) shows the cumulative rank j classification accuracy of the test documents. The three numbers after the models are the percentages of training, validation and test sets respectively. assigned to classes: 1 1:2 1:3 1:4 1:5 BP - 20/20/60 78.7(±0.5) 87.4(±0.2) 91.3(±0.2) 95.1(±0.2) 96.2(±0.2) SBP - 20/20/60 79.9(±0.5) 87.6(±0.1) 91.5(±0.2) 93.7(±0.2) 95.1(±0.2) BP - 60/20/20 85.5(±0.6) 91.6(±0.3) 94.2(±0.3) 95.6(±0.4) 96.6(±0.3) SBP - 60/20/20 85.5(±0.4) 91.9(±0.4) 94.4(±0.2) 95.6(±0.3) 96.6(±0.3) statistics of word occurrences; see Figure 2). We also plotted the characteristics of data simulated from the models using the estimated ML parameters. The SBP has a much better fit than the beta process to the power-law properties of the corpora. In the second experiment we tested the two models on categorizing test documents into one of the 20 newsgroups. Since this is a discriminative task, we optimized the parameters in both models to maximize the cumulative ranked classification performance. The rank j classification performance is defined to be the percentage of documents where the true label is among the top j predicted classes (as determined by the IBP conditional probabilities of the documents under each of the 20 newsgroup classes). As the cost function is not differentiable, we did a grid search over the parameter space, using 20 values of α, c and σ each, and found the parameters maximizing the objective function on a validation set separate from the test set. To see the effect of sample size on model performance we tried splitting the documents in each newsgroup into 20% training, 20% validation and 60% test sets, and into 60% training, 20% validation and 20% test sets. We repeated the experiment five times with different random splits of the dataset. The ranked classification rates are shown in Table 1. Figure 3 shows that the SBP model has generally higher classification performances than the beta process. 5 Discussion We have introduced a novel stochastic process called the stable-beta process. The stable-beta process is a generalization of the beta process, and can be used in nonparametric Bayesian featural models with an unbounded number of features. As opposed to the beta process, the stable-beta process has a number of appealing power-law properties. We developed both an Indian buffet process and a stick-breaking construction for the stable-beta process and applied it to modeling word occurrences in document corpora. We expect the stable-beta process to find uses modeling a range of natural phenomena with power-law properties. 7 1 2 3 4 5 −2 0 2 4 6 x 10 −3 SBP−BP class order Figure 3: Differences between the classification rates of the SBP and the beta process. The performance of the SBP was consistently higher than that of the beta process for each of the five runs. We derived the stable-beta process as a completely random measure with L´evy measure (3). It would be interesting and illuminating to try to derive it as an infinite limit of finite models, however we were not able to do so in our initial attempts. A related question is whether there is a natural definition of the stable-beta process for non-smooth base distributions. Until this is resolved in the positive, we are not able to define hierarchical stable-beta processes generalizing the hierarchical beta processes [16]. Another avenue of research we are currently pursuing is in deriving better stick-breaking constructions for the stable-beta process. The current construction requires inverting the integral (12), which is expensive as it requires an iterative method which evaluates the integral numerically within each iteration. Acknowledgement We thank the Gatsby Charitable Foundation for funding, Romain Thibaux, Peter Latham and Tom Griffiths for interesting discussions, and the anonymous reviewers for help and feedback. A Derivation of Power-law Properties We will make large n and K assumptions here, and make use of Stirling’s approximation Γ(n+1) ≈ √ 2πn(n/e)n, which is accurate in the larger n regime. The expected number of dishes is, E[K] = n X i=1 α Γ(1+c)Γ(n+c+σ) Γ(n+1+c)Γ(c+σ) ∈O n X i=1 √ 2π(i+c+σ−1)((i+c+σ−1)/e)i+c+σ−1 √ 2π(i+c)((i+c)/e)i+c ! =O n X i=1 e−σ+1(1 + σ−1 i+c )i+c(i + c + σ −1)σ−1 ! = O n X i=1 e−σ+1eσ−1iσ−1 ! = O(nσ). (16) We are interested in the joint distribution of the statistics (K1, . . . , Kn), where Km is the number of dishes tried by exactly m customers and where there are a total of n customers in the restaurant. As there are K! Qn m=1 Km! Qn m=1 n! m!(n−m)! Km configurations of the IBP with the same statistics (K1, . . . , Kn), we have (ignoring constant terms and collecting terms in (10) with mk = m), p(K1, . . . , Kn|n) ∝ K! Qn m=1 Km! Qn m=1  n! m!(n−m)! Γ(m−σ)Γ(n−m+c+σ)Γ(1+c) Γ(1−σ)Γ(c+σ)Γ(n+c) Km . (17) Conditioning on K = Pn m=1 Km as well, we see that (K1, . . . , Kn) is multinomial with the probability of a dish having m customers being proportional to the term in large parentheses. For large m (and even larger n), this probability simplifies to, O( Γ(m−σ) Γ(m+1) ) = O √ 2π(m−1−σ)((m−1−σ)/e)m−1−σ √ 2πm(m/e)m  = O m−1−σ . (18) 8 References [1] T. L. Griffiths and Z. Ghahramani. Infinite latent feature models and the Indian buffet process. In Advances in Neural Information Processing Systems, volume 18, 2006. [2] Z. Ghahramani, T. L. Griffiths, and P. Sollich. Bayesian nonparametric latent feature models (with discussion and rejoinder). In Bayesian Statistics, volume 8, 2007. [3] D. Knowles and Z. Ghahramani. Infinite sparse factor analysis and infinite independent components analysis. In International Conference on Independent Component Analysis and Signal Separation, volume 7 of Lecture Notes in Computer Science. Springer, 2007. [4] D. G¨or¨ur, F. J¨akel, and C. E. Rasmussen. A choice model with infinitely many latent features. In Proceedings of the International Conference on Machine Learning, volume 23, 2006. [5] D. J. Navarro and T. L. Griffiths. Latent features in similarity judgment: A nonparametric Bayesian approach. Neural Computation, in press 2008. [6] E. Meeds, Z. Ghahramani, R. M. Neal, and S. T. Roweis. Modeling dyadic data with binary latent factors. In Advances in Neural Information Processing Systems, volume 19, 2007. [7] F. Wood, T. L. Griffiths, and Z. Ghahramani. A non-parametric Bayesian method for inferring hidden causes. In Proceedings of the Conference on Uncertainty in Artificial Intelligence, volume 22, 2006. [8] S. Goldwater, T.L. Griffiths, and M. Johnson. Interpolating between types and tokens by estimating power-law generators. In Advances in Neural Information Processing Systems, volume 18, 2006. [9] Y. W. Teh. A hierarchical Bayesian language model based on Pitman-Yor processes. In Proceedings of the 21st International Conference on Computational Linguistics and 44th Annual Meeting of the Association for Computational Linguistics, pages 985–992, 2006. [10] E. Sudderth and M. I. Jordan. Shared segmentation of natural scenes using dependent PitmanYor processes. In Advances in Neural Information Processing Systems, volume 21, 2009. [11] M. Perman, J. Pitman, and M. Yor. Size-biased sampling of Poisson point processes and excursions. Probability Theory and Related Fields, 92(1):21–39, 1992. [12] J. Pitman and M. Yor. The two-parameter Poisson-Dirichlet distribution derived from a stable subordinator. Annals of Probability, 25:855–900, 1997. [13] H. Ishwaran and L. F. James. Gibbs sampling methods for stick-breaking priors. Journal of the American Statistical Association, 96(453):161–173, 2001. [14] T. S. Ferguson. A Bayesian analysis of some nonparametric problems. Annals of Statistics, 1(2):209–230, 1973. [15] N. L. Hjort. Nonparametric Bayes estimators based on beta processes in models for life history data. Annals of Statistics, 18(3):1259–1294, 1990. [16] 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, pages 564–571, 2007. [17] M. Perman. Random Discrete Distributions Derived from Subordinators. PhD thesis, Department of Statistics, University of California at Berkeley, 1990. [18] J. F. C. Kingman. Completely random measures. Pacific Journal of Mathematics, 21(1):59–78, 1967. [19] J. F. C. Kingman. Poisson Processes. Oxford University Press, 1993. [20] Y. Kim. Nonparametric Bayesian estimators for counting processes. Annals of Statistics, 27(2):562–588, 1999. [21] Y. W. Teh, D. G¨or¨ur, and Z. Ghahramani. Stick-breaking construction for the Indian buffet process. In Proceedings of the International Conference on Artificial Intelligence and Statistics, volume 11, 2007. [22] R. L. Wolpert and K. Ickstadt. Simulations of l´evy random fields. In Practical Nonparametric and Semiparametric Bayesian Statistics, pages 227–242. Springer-Verlag, 1998. [23] G. Zipf. Selective Studies and the Principle of Relative Frequency in Language. Harvard University Press, Cambridge, MA, 1932. 9
2009
244
3,753
Boosting with Spatial Regularization Zhen James Xiang1 Yongxin Taylor Xi1 Uri Hasson2 Peter J. Ramadge1 1: Department of Electrical Engineering, Princeton University, Princeton NJ, USA 2: Department of Psychology, and Neuroscience Institute, Princeton University, Princeton NJ, USA {zxiang, yxi, hasson, ramadge} @ princeton.edu Abstract By adding a spatial regularization kernel to a standard loss function formulation of the boosting problem, we develop a framework for spatially informed boosting. From this regularized loss framework we derive an efficient boosting algorithm that uses additional weights/priors on the base classifiers. We prove that the proposed algorithm exhibits a “grouping effect”, which encourages the selection of all spatially local, discriminative base classifiers. The algorithm’s primary advantage is in applications where the trained classifier is used to identify the spatial pattern of discriminative information, e.g. the voxel selection problem in fMRI. We demonstrate the algorithm’s performance on various data sets. 1 Introduction When applying off-the-shelf machine learning algorithms to data with spatial dimensions (images, geo-spatial data, fMRI, etc) a central question arises: how to incorporate prior information on the spatial characteristics of the data? For example, if we feed a boosting or SVM algorithm with individual image voxels as features, the voxel spatial information is ignored. Indeed, if we randomly shuffled the voxels, the algorithm would not notice any difference. Yet in many cases the spatial arrangement of the voxels together with prior information about expected spatial characteristics of the data may be very helpful. We are particularly interested in the situation when the trained classifier is used to identify relevant spatial regions. To make this more concrete, consider the problem of training a classifier to distinguish two different brain states based on fMRI responses. Successful classification suggests that the voxels used are important in discriminating between the two classes. Hence we could use a successful classifier to learn a set of discriminative voxels. We expect that these voxels will be spatially compact and clustered. How can this prior knowledge be incorporated into the training of the classifier? In summary, our primary objective is improving the ability of the trained classifier to usefully identify the spatial pattern of discriminative information. However, incorporating spatial information into boosting may also improve classification accuracy. Our key contribution is the development of a framework for spatially regularized boosting. We do this by adding a spatial regularization kernel to the standard loss minimization formulation of boosting. We then design an associated boosting algorithm by using coordinate descent on the regularized loss. We show that the algorithm minimizes the regularized loss function and has a natural interpretation of boosting with additional adaptive priors/weights on both spatial locations and training examples. We also show that it exhibits a natural grouping effect on nearby spatial locations with similar discriminative power. We believe our contributions are fundamental and relevant to a variety of applications where base classifiers are attributed with a known auxiliary variable and prior information is known about this auxiliary variable. However, since our study is motivated by the particular problem of voxel selection in fMRI analysis, we briefly review the state of the art in this domain so as to put our contribution into a concrete context. 1 Briefly, the fMRI voxel selection problem is to use the fMRI signal to identify a subset of voxels that are key in discriminating between two stimuli. One expects such voxels to be spatially compact and clustered. Traditionally this is done by thresholding a statistical univariate test score on each voxel [1]. Spatial smoothing prior to this analysis is commonly employed to integrate activity from neighboring voxels. An extreme case is hypothesis testings on clusters of voxels rather than on voxels themselves [2]. The problem with these methods is that they greatly sacrifice the spatial resolution of the results and averaging could hide fine patterns in data. An alternative is to spatially average the univariate test scores, e.g. thresholding in some transformed domain (e.g. wavelet domain) [3, 4]. However, this also compromises the spatial accuracy of the result because one selects discriminating wavelet components, not voxels. A more promising spatially aware approach selects voxels with tree-based spatial regularization of a univariate statistic [5, 6]. This can achieve both spatial precision and smoothness but uses a complex regularization method. Our proposed method also selects single voxels with the help of spatial regularization but operates in a multivariate classifier framework using a simpler form of regularization. Recent research has suggested that multivariate analysis has potential advantages over univariate tests [7, 8], e.g. it brings in machine learning algorithms (such as boosting, SVM, etc.) and therefore might capture more intricate activation patterns involving multiple voxels. To ensure spatial clustering of selected voxels, one can run a searchlight (a spherical mask) [9] to pre-select clustered informative features. In each searchlight location, a multivariate analysis is performed to see whether the masked area contains informative data. One can then train a classifier on the pre-selected voxels. A variant of this two-stage framework is to train classifiers on a few predefined masks, and then aggregate these classifiers by boosting [10, 11]. This is faster but assumes detailed prior knowledge to select the predefined masks. Unlike two-stage approaches, [12] directly uses AdaBoost to train classifiers with “rich features” (features involving the values of several adjacent voxels) to capture spatial structure in the data. Although exhibiting superior performance, this method selects “rich features” rather than individual discriminating voxels. Moreover, there is no control on the spatial smoothness of the results. Our method is similar to [12] in that we combine the feature selection and classification into one boosting process. But our algorithm operates on single voxels and uses simple spatial regularization to incorporate spatial information. The remainder of the paper is organized as follows. After introducing notation in §2, we formulate our spatial regularization approach in §3 and derive an associated spatially regularized boosting algorithm in §4. We prove an interesting property of the algorithm in §5 that guarantees the simultaneous selection of equivalent locations that are spatially close. In §6, we test the algorithm on face gender detection, OCR image classification, and fMRI experiments. 2 Boosting Preliminaries In a supervised learning setting, we are given m training instances X = {xi ∈Rn, i = 1, . . . , m} and corresponding binary labels Y = {yi = ±1, i = 1, . . . , m}. Using the training instances X, we select a pool of base classifiers H = {hj : Rn →{−1, +1}, j = 1, . . . , p}. Our objective is to train a composite binary classifier of the form hα(xi) = sgn(Pp j=1 αjhj(xi)). We can further assume that hj ∈H ⇒−hj ∈H, thus all values in α can be assumed to be nonnegative. Boosting is a technique for constructing from X, Y and H the weight α of a composite classifier to best predict the labels. This can be done by seeking α to minimize a loss function of the form: L(X, Y, α) = m X i=1 l(yi, hα(xi)). (1) Various boosting algorithms can be derived as iterative greedy coordinate descent procedures to minimize (1) [13]. In particular, AdaBoost [14] is of this form with l(yi, hα(xi)) = e−yihα(xi). The result of a conventional boosting algorithm is determined by the m × p matrix M = [yihj(xi)] [15]. Under a component permutation ˆxi = Pxi, the base classifiers become ˆhj = hj · P −1; so ˆ M = [yiˆhj(ˆxi)] = [yihj(xi)] = M. Hence training on {Pxi, yi} or {xi, yi} yields the same α, i.e., the arrangement of the components can be arbitrary as long as it is consistent. The weights α of a composite classifier not only indicate how to construct the classifier, but also the relative reliance of the classifier on each of the n instance components. To see this, assume each 2 hj depends on only a single component of x ∈Rn, i.e., for some standard basis vector ek, and function gj : R →{−1, +1}, hj(x) = gj(eT k x) (the base classifiers are decision stumps). To make the association between base classifiers and components explicit, let s be the function s(j) = k if hj(x) = gj(eT k x) and Q = [qkj] be the n×p matrix with qkj = 1[s(j)=k]. Then the vector β = Qα indicates the relative importance the classifier assigns to each instance component. Although we used decision stumps above for simplicity, more complex base classifiers such as decision trees could be used with proper modification of mapping from α to β. We call β the component importance map. Suppose the instance components reflect spatial structure in the data, e.g. the components are samples along an interval or pixels in an image. Then the component importance map is indicating the spatial distribution of weights that the classifier employs. Presumably a good classifier distributes the weights in accordance with the discriminative power of the components; in which case, the map is indicating how discriminative information is spatially distributed. It is in this aspect of the classifier that we are particularly interested. Now as shown above, conventional boosting ignores spatial information. Our objective, pursued in the next sections, is to incorporated prior information on spatial structure, e.g. a prior on the component importance map, into the boosting problem. 3 Adding Spatial Regularization To incorporate spatial information we add spatial regularization of the form βT Kβ to the loss (1) where the kernel K ∈Rn×n ++ is positive definite. For concreteness, we employ the exponential loss l(yi, hα(xi)) = e−yihα(xi). Thus the regularized loss is: Lexp reg(X, Y, α) = m X i=1 exp(−yi p X j=1 αjhj(xi)) + λβT Kβ (2) = m X i=1 exp(−yi p X j=1 αjhj(xi)) + λαT QT KQα. (3) The term βT Kβ imposes a spatial smoothness constraint on β. To see this, consider the eigendecomposition K = UΣU T , where the columns {uj} of U are the orthonormal eigenvectors, σj is the eigenvalue of uj and Σ = diag(σ1, σ2, . . . , σn). Then the regularizing term can be rewritten as λ∥Σ 1 2 U T β∥2 2 where U T β is the “spectrum” of β under the orthogonal transformation U T . Rather than standard Tikhonov regularization with ∥β∥2 2 = ∥U T β∥2 2, we penalize the variation in direction uj proportional to the eigenvalue σj. By doing so we are encouraging β to be close to the eigenvectors uj with small eigenvalues. This encodes our prior spatial knowledge. Figure 1: Each graph is the eigenimage of size d × d corresponding to an eigenvector of K = µI −G. As an example, consider the kernel K = µI −G, where G is a Gaussian kernel matrix: Gij = e−1 2 ∥vi−vj∥2 2/r2, (4) with vj the spatial location of component j, ∥vi −vj∥2 the Euclidean distance (other distances can also be used) between components i and j, and r the radius parameter of the Gaussian kernel. For the 2D case, i = (i1, i2) ranges over (1, 1), (1, 2), . . . , (d, d). j = (j1, j2) ranges over the same coordinates. So G is a size d2×d2 matrix. We plot the 6 eigenimages of K with smallest eigenvalues in Figure 1. The regularization imposes a spatial smoothness constraint by encouraging β to give more weight to the eigenimages with smaller eigenvalues, e.g. the patterns shown in Figure 1. 4 A Spatially Regularized Boosting Algorithm We now derive a spatially regularized boosting algorithm (abbreviated as SRB) using coordinate descent on (3). In particular, in each iteration we choose a coordinate of α with the largest negative 3 gradient and increase the weight of that coordinate by step size ε. This results in an algorithm similar to AdaBoost, but with additional consideration of spatial location. To begin, we take the partial derivative of (3) w.r.t. αj′: −∂ ∂αj′ Lexp reg(X, Y, α) = m X i=1 yihj′(xi) exp(−yi p X j=1 αjhj(xi)) −2eT j′λQT KQα. Here ej′ is the j′-th standard basis vector, so eT j′λQT KQα is the j′-th element of λQT KQα. By the definition of Q, (eT j′QT )λKQα is the s(j′)-th element of λKQα. Therefore if we define γ to be γ = −2λKβ, and wi = exp(−yi Pp j=1 αjhj(xi)) (1 ≤i ≤m) to be the unnormalized weight on training instance xi, then the partial derivative in (4) can be written as: −∂ ∂αj′ Lexp reg(X, Y, α) = m X i=1 yihj′(xi)wi + γs(j′) The term Pm i=1 yihj′(xi)wi is the weighted performance of base classifier hj′ on the training examples. Normally, we choose hj′ to maximize this term. This corresponds to choosing the best base classifier under the current weight distribution. However, here we have an additional term: the performance of base classifier hj′ is enhanced by a weight γs(j′) on its corresponding component s(j′). We call γ the spatial compensation weight. To proceed, we choose a base classifier hj′ to maximize the sum of these two terms and then increase the weight of that base classifier by a step size ε. This gives Algorithm 1 shown in Figure 2. The key differences from AdaBoost are: (a) the new algorithm maintains a new set of “spatial compensation weights” γ; (b) the weights on training examples wi are not normalized at the end of each iteration. Algorithm 1 The SRB algorithm 1: wi ←1, 1 ≤i ≤m 2: α ←0 3: for t = 1 to T do 4: β ←Qα 5: γ ←−2λKβ 6: find the “best” base classifier in the following sense: j′ ←arg maxj  Ω(hj, w) + γs(j) 7: choose a step size ε, αj′ ←αj′ + ε 8: adjust weights: wi ←  wieε if yihj′(xi) = −1 wie−ε if yihj′(xi) = 1 for 1 ≤i ≤m 9: end for 10: Output result: hα(x) = Pp j=1 αjhj(x) In both algorithms, Ω(hj, w) is defined to be: Ω(hj, w) = m X i=1 yihj(xi)wi, which is a performance measure of classifier hj under weight distribution w on training examples. Algorithm 2 SRB algorithm with backward steps 1: wi ←1, 1 ≤i ≤m 2: α ←0 3: for t = 1 to T do 4: β ←Qα 5: γ ←−2λKβ 6: find the “best” base classifier in the following sense: j′ ←arg maxj  Ω(hj, w) + γs(j) 7: choose a step size ε1, αj′ ←αj′ + ε1 8: adjust weights: wi ←  wieε1 if yihj′(xi) = −1 wie−ε1 if yihj′(xi) = 1 9: find the “worst” active classifier in the following sense: j′′ ←arg minj:αj>0  Ω(hj, w) + γs(j) 10: αj′′ ←αj′′ −ε2 2 11: adjust weights again: wi ←  wie−ε2/2 if yihj′′(xi) = −1 wieε2/2 if yihj′′(xi) = 1 for 1 ≤i ≤m 12: end for 13: Output result: hα(x) = Pp j=1 αjhj(x) Figure 2: The SRB (spatially regularized boosting algorithms). To elucidate the effect of the compensation weights, consider the kernel K = µI−G, with G defined in (4). In this case, γ = 2λ(¯β −µβ) where ¯β = Gβ is the Gaussian smoothing of β . Therefore, 4 a component receives a high compensation weight γk = 2λ( ¯βk −µβk) if some neighboring spatial locations have already been selected (i.e., made “active”) by the composite classifier. On the other hand, the weight of a component is reduced (proportional to the magnitude of parameter µ) if it is already “active”, i.e., βk > 0. So the algorithm encourages the selection of base classifiers associated with “inactive” locations that are close to “active” locations. We can enhance the algorithm by including a backward step each iteration: αj′′ ←αj′′ −ε′, where j′′ = arg min 1≤j≤p,αj>0 ( m X i=1 yihj(xi)wi + γs(j) ) . (5) This helps remove prematurely selected base classifiers [16, 17]. This is Algorithm 2 in Figure 2. Spatial regularization brings no significant computational overhead: Compared to AdaBoost, SRB has additional steps 4,5, which can be computed in time O(n) every iteration. Adaptive weight γ incurs no additional complexity for step 6 in our current implementation. We now briefly discuss the choice of step size ε in Algorithm 1 (ε1 and ε2 in Algorithm 2 can be chosen similarly). ε could be a fixed (small) step size at each iteration. This is not greedy but may necessitate a large number of iterations. Alternatively, one can be greedy and select ε to minimize the value of the loss function (3) after the change αj′ ←αj′ + ε: W−eε + W+e−ε + λ(β + εek′)T K(β + εek′), (6) where W−= P i:yihj′(xi)=−1 exp(−yihα(xi)), W+ = P i:yihj′(xi)=1 exp(−yihα(xi)) and k′ = s(j′). Setting the derivative of (6) to 0 yields: W−eε −W+e−ε −γk′ + 2λεKk′k′ = 0. (7) Using e±ε ≈1 ± ε gives the solution ˆε = W+−W−+γk′ W++W−+2λKk′k′ , which can be used as a step size. However, for the following slightly more conservative step size we can prove algorithm convergence: ˜ε = min  3 (W + −W −) W+ + 1.36W− , W+ −W−+ γk′ W+ + W−+ 2λKk′k′ , 1  . (8) Theorem 1. The step size (8) ensures convergence of Algorithm 1. Proof. (6) is convex, so its minimum point ε∗is the unique solution of (7): f1(ε∗) + f2(ε∗) = 0 where f1(ε) = W−eε −W+e−ε and f2(ε) = 2λKk′k′ε −γk′. We have the inequality chain: f1(˜ε) + f2(˜ε) ≤g1(˜ε) + f2(˜ε) ≤g1(ˆε) + f2(ˆε) = 0 = f1(ε∗) + f2(ε∗), (9) where g1(ε) = W−(1+ε)−W+(1−ε). So ˜ε is on the descending slope of (6), which is a sufficient condition for ˜ε to reduce the objective (6). Since the objective (3) is nonnegative and each iteration of the algorithm reduces (3), the algorithm converges. The second inequality in (9) uses monoticity while the first inequality in (9) uses the following lemma proved in the supplementary material: Lemma: If 0 < ε ≤min{3 (W +−W −) W++1.36W−, 1}, then f1(ε) −g1(ε) ≤0. 5 The Grouping Effect: Asymptotic Analysis Recall our objective of using the component importance map of the trained classifier to ascertain the spatial distribution of informative components in the data. Ideally, we would like β to faithfully represent this information. In general, however, a boosting algorithm will select a sufficient but incomplete collection of base classifiers (and hence components) to accomplish the classification. For example, after selecting one base classifier hj, AdaBoost will adjust the weights of training examples to make the weighted training error of hj exactly 1 2 (totally uninformative), thus preventing the selection of any classifiers similar to hj in the next iteration. In fact, for AdaBoost we can prove that in the optimal solution α∗, we can transfer coefficient weights between any two equivalent base classifiers without impacting optimality. So minimizing the loss function (1) does not require any particular distribution among the β coefficients of identical components. This is the content of the following proposition. 5 Proposition 1. Assume hj1and hj2, j1 < j2, are base classifiers with s(j1) ̸= s(j2), and hj1(xi) = hj2(xi) for all xi ∈X. If α∗minimizes the loss function (1), then for any η in [0, min{α∗ j1, α∗ j2}], α† also minimizes loss function (1) where α† = α∗−ηej1 +ηej2 where ej denotes the j-th standard basis vector in Rp. Proof. hj1(xi) = hj2(xi) implies that hα∗(xi) = hα†(xi) for all xi ∈X. What is desirable is a “grouping effect”, in which components with similar behavior under H receive similar β weights. We will prove that asymptotically, SRB exhibits a “grouping effect”. In particular, for kernel K = µI −G, G defined in (4), we will look at the minimizer β∗= Qα∗of the loss function (2), and in the spirit of [18], establish a bound on the difference |β∗ i1−β∗ i2| of the coefficients on two similar components. To proceed, let α∗minimize (3) with: β∗= Qα∗, γ∗= −2λKβ∗, and the corresponding training instance weight w∗. Let Hk denote the subset of base classifiers acting on component k, i.e., Hk = {hj ∈H: s(j) = k}. The following lemma is proved in the supplementary material: Lemma: For any k, 1 ≤k ≤n, −γ∗ k ≥maxhj∈Hk Pm i=1 yihj(xi)w∗ i with equality if β∗ k > 0. Assuming K = µI −G, G defined in (4), we have the following result: Theorem 2. Let ¯ β∗= Gβ∗be the smoothed version of vector β∗. Then for any k1 and k2: |β∗ k1 −β∗ k2| ≤1 µ|¯β∗ k1 −¯β∗ k2| + 1 λµd(k1, k2), (10) where d(k1, k2) = | maxhj∈Hk1 Pm i=1 yihj(xi)w∗ i −maxhj∈Hk2 Pm i=1 yihj(xi)w∗ i |. Proof. We prove the following three cases separately: (1). β∗ k1 and β∗ k2 are both positive. In this case, using the lemma on γ∗ k1 and γ∗ k2 yields: (2λ¯β∗ k1 −2λµβ∗ k1) −(2λ¯β∗ k2 −2λµβ∗ k2) = |γ∗ k1 −γ∗ k2| = d(vk1, vk2). We can then use the triangle inequality on the LHS to obtain the result. (2). One of β∗ k1 and β∗ k2 is zero the other is positive. WLOG assume β∗ k1 = 0. Then −γ∗ k1 ≥ maxhj∈Hk1 Pm i=1 yihj(xi)w∗ i and −γ∗ k2 = maxhj∈Hk2 Pm i=1 yihj(xi)w∗ i . This gives: γ∗ k1 −γ∗ k2 ≤max hj∈Hk2 m X i=1 yihj(xi)w∗ i −max hj∈Hk1 m X i=1 yihj(xi)w∗ i ≤d(vk1, vk2). Substituting the definition of γ: γ = 2λGβ −2λµβ = 2λ¯β −2λµβ, yields (2λ¯β∗ k1 −2λµ0) − (2λ¯β∗ k2 −2λµβ∗ k2) ≤d(vk1, vk2). Therefore 2λµβ∗ k2 ≤(2λ¯β∗ k2 −2λ¯β∗ k1) + d(vk1, vk2). Using the triangle inequality on the right hand side of the previous expression yields the result. (3) β∗ k1 = β∗ k2 = 0. In this case, the inequality is obvious. The theorem upper bounds the difference in the importance coefficient of two components by the sum of two terms: the first, |¯β∗ k1−¯β∗ k2|, takes into account the importance weight of nearby locations. This term is small when the two locations are spatially close, or when they are in two neighborhoods that contain a similar amount of important voxels. The second term reflects the dissimilarity between two voxels. This term measures the difference in the weighted performances of a location’s best base classifier. Clearly, d(k1, k2) = 0 when components k1 and k2 are identical under H over the training instances. More generally, we can sort all the training examples by the activation level on a single component. If sorting on locations k1 and k2 yields the same results, then d(k1, k2) = 0. 6 Experiments The first experiment is gender classification using features located on 58 annotated landmark points in the IMM face data set [19] (Figure 3(a)). For each point we extract the first 3 principal components of a 15×15 window as features. We randomly choose 7 males and 7 females to do leave-one-out 7fold cross-validation for 100 trials. AdaBoost yields an average classification accuracy of τ =78.8% 6 with a standard deviation of σ =19.9%. SRB (λ=0.1, r=10 pixel-length) achieves τ =80.5% and σ = 18.7%. The component importance map β of SRB reveals both eyes as discriminating areas and demonstrates the grouping effect. (All experiments in this section use µ = maxj(P i Gij). By (10), a larger µ will make this grouping effect more dominant). The β for AdaBoost is less smooth and less interpretable with the most important component on the left chin (Figure 3(b,c)). (a) (b) (c) Figure 3: Experiment 1. (a): an example showing annotated points; (b-c): the average component importance map β (indicated by sizes of the circles) after running (b) AdaBoost and (c) SRB for 50 iterations. (a) (b) (c) (d) (e) (f) (g) (h) Figure 4: Experiment 2. (a-d): example images; (e): example training image with noise; (f): ground truth of discriminative pixels; (g-h): pixels selected by (g) AdaBoost and (h) SRB. The second experiment is a binary image classification task. Each image contains the handwritten digits 1,1,0,3 and a random digit, all in fixed locations. Digits 0 and 1 are swapped between the classes (Figure 4(a-d)). The handwritten digit images are from the OCR digits data set [20]. To obtain the training/testing instances we add noise to the images (Figure 4(e)). We test the ability of several algorithms to: (a) find the discriminating pixels, and (b) if a classification algorithm, accurately classify the classes. The quality of pixel selection is measured by a precision-recall curve, with ground truth pixels (Figure 4(f)) selected by a t-test on the two classes of noiseless images. This curve is plotted for the following methods: (1) SRB (λ = 0.5, r = 1 √ 2 pixel-length) (2) AdaBoost; (3) thresholding the univariate t-test score; (4) thresholding the first one or two principle component(s); (5) thresholding the pixel coefficients in an LDA model with diagonal covariance (Gaussian naive bayes classifier); (6) level-set method [6] on a Z-statistics map. We plot the precision-recall curve by varying the number of iterations (for (1),(2)) or the value of the threshold (for (3)-(6)). We also tried all methods with Gaussian spatial pre-smoothing as a preprocessing step. The classification accuracies are measured for methods (1), (2) and (5) on separate test data. The results, averaged over 100 noise realizations, are plotted in Figure 5. SRB showed no loss of classification accuracy nor convergence speed (usually within 100 iterations), and achieved the best pixel selection among all methods. It is better than Gaussian naive Bayes and PCA methods, even when the noise matches the i.i.d. Gaussian assumption of these methods (Figure 5(a,d)). In all cases, local spatial averaging deteriorates the classification performance of boosting. In the third experiment, subjects watch a movie during the fMRI scan. The classification task is to discriminate two types of scenes (faces and objects) based on the fMRI responses. Each fMRI responses is a single TR scan of the brain volume. We divide the data (14 subjects, 26 face and 18 object fMRI responses) into 10 cross validation groups and average the classification accuracies. SRB (λ = 0.1, r = 5 voxel-length) trained for 100 iterations yields accuracy τ = 73.3% with σ = 9.3% across 14 subjects. AdaBoost yields τ = 75.5% with σ = 4.9%. To make sure this is significant, we repeated the training with shuffled labels. After shuffling, τ = 49.7%, with σ = 4.6%, which is effectively chance. We note that spatially regularized boosting yields a more clustered and interpretable selection of voxels. The result for one subject (Figure 6) shows that standard boosting (AdaBoost) selects voxels scattered in the brain, while SRB selects clustered voxels and nicely highlights the relevant FFA area [21] and posterior central sulcus [22, 23]. 7 Conclusions The proposed SRB algorithm is applicable to a variety of situations in which one needs to boost the performance of base classifiers with spatial structure. The mechanism of the algorithm has a 7 0 50 100 150 200 0.86 0.88 0.9 0.92 0.94 0.96 0.98 1 iterations of boosting classification accuracy on test images Spatial Regularized Boosting Spatial Regularized Boosting with smoothing AdaBoost AdaBoost with smoothing Gaussian naive Bayes Gaussian naive Bayes with smoothing (a) 0 50 100 150 200 0.7 0.75 0.8 0.85 0.9 0.95 iterations of boosting classification accuracy on test images (b) 0 50 100 150 200 0.8 0.85 0.9 0.95 1 iterations of boosting classification accuracy on test images (c) 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 recall precision Spatial Regularized Boosting Spatial Regularized Boosting with smoothing AdaBoost AdaBoost with smoothing Univariate test Univariate test with smoothing PCA, first PC PCA, first two PCs PCA with smoothing, first PC Gaussian naive Bayes Gaussian naive Bayes with smoothing level−set level−set with smoothing (d) 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 recall precision (e) 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 recall precision (f) Figure 5: Experiment 2. (a-c): test classification accuracy: (a) i.i.d. Gaussian noise, (b) poisson noise, (c) spatially correlated Gaussian noise. (b,c) share the legend of (a). (d-f): pixel selection performances: (d) i.i.d. Gaussian noise, (e) poisson noise, (f) spatial correlated Gaussian noise. (e,f) share the legend of (d). (a) (b) (c) Figure 6: Experiment 3: an example: sets of voxels selected by (a) univariate t-test (b) AdaBoost and (c) SRB natural interpretation: in each iteration, the algorithm selects a base classifier with the best performance evaluated under two sets of weights: weights on training examples (as in AdaBoost) and weights on locations. The additional set of location weights encourages or discourages the selection of certain base classifiers based on the spatial location of base classifiers that have already been selected. Computationally, SRB is as effective as AdaBoost. We demonstrated the effectiveness of the algorithm both by providing a theoretical analysis of the “grouping effect” and by experiments on three data sets. The grouping effect is clearly demonstrated in the face gender detection experiment. In the OCR classification experiment, the algorithm shows superior performance in pixel selection accuracy without loss of classification accuracy. The algorithm matches the performance of the state-of-the-art set estimation methods [6] that use a more complex spatial regularization and cycle spinning technique. In the fMRI experiment, the algorithm yields a clustered selection of voxels in positions relevant to the task. An alternative approach, being explored, is to combine searchlight [9] with a strong learning algorithm (e.g. SVM) to integrate spatial locality and accurate classification. 8 Acknowledgments The authors thank Princeton University’s J. Insley Blair Pyne Fund for seed research funding. 8 References [1] K.J. Friston, J. Ashburner, J. Heather, et al. Statistical parametric mapping. Neuroscience Databases: A Practical Guide, page 237, 2003. [2] R. Heller, D. Stanley, D. Yekutieli, N. Rubin, and Y. Benjamini. Cluster-based analysis of FMRI data. NeuroImage, 33(2):599–608, 2006. [3] D. Van De Ville, T. Blu, and M. Unser. Integrated wavelet processing and spatial statistical testing of fMRI data. NeuroImage, 23(4):1472–1485, 2004. [4] D. Van De Ville, M.L. Seghier, F. Lazeyras, T. Blu, and M. Unser. WSPM: Wavelet-based statistical parametric mapping. NeuroImage, 37(4):1205–1217, 2007. [5] Z. Harmany, R. Willett, A. Singh, and R. Nowak. Controlling the error in fmri: Hypothesis testing or set estimation? In Biomedical Imaging, 5th IEEE International Symposium on, pages 552–555, 2008. [6] R.M. Willett and R.D. Nowak. Minimax optimal level-set estimation. IEEE Transactions on Image Processing, 16(12):2965–2979, 2007. [7] J.V. Haxby, M.I. Gobbini, M.L. Furey, A. Ishai, J.L. Schouten, and P. Pietrini. Distributed and overlapping representations of faces and objects in ventral temporal cortex. Science, 293(5539):2425–2430, 2001. [8] K.A. Norman, S.M. Polyn, G.J. Detre, and J.V. Haxby. Beyond mind-reading: multi-voxel pattern analysis of fMRI data. Trends in Cognitive Sciences, 10(9):424–430, 2006. [9] N. Kriegeskorte, R. Goebel, and P. Bandettini. Information-based functional brain mapping. Proceedings of the National Academy of Sciences, 103(10):3863–3868, 2006. [10] V. Koltchinskii, M. Martınez-Ramon, and S. Posse. Optimal aggregation of classifiers and boosting maps in functional magnetic resonance imaging. Advances in Neural Information Processing Systems, 17:705– 712, 2005. [11] M. Mart´ınez-Ram´on, V. Koltchinskii, G.L. Heileman, and S. Posse. fMRI pattern classification using neuroanatomically constrained boosting. NeuroImage, 31(3):1129–1141, 2006. [12] Melissa K. Carroll, Kenneth A. Norman, James V. Haxby, and Robert E. Schapire. Exploiting spatial information to improve fmri pattern classification. In 12th Annual Meeting of the Organization for Human Brain Mapping, Florence, Italy, 2006. [13] J.H. Friedman. Greedy function approximation: A gradient boosting machine. Annals of Statistics, 29(5):1189–1232, 2001. [14] Y. Freund and R. E. Schapire. A decision-theoretic generalization of on-line learning and an application to boosting. In European Conference on Computational Learning Theory, pages 23–37, 1995. [15] C. Rudin, I. Daubechies, and R.E. Schapire. The dynamics of adaboost: Cyclic behavior and convergence of margins. Journal of Machine Learning Research, 5(2):1557, 2005. [16] Z.J. Xiang and P.J. Ramadge. Sparse boosting. In IEEE International Conference on Acoustics, Speech and Signal Processing, 2009. [17] T. Zhang. Adaptive Forward-Backward Greedy Algorithm for Sparse Learning with Linear Models. In Proc. Neural Information Processing Systems, 2008. [18] H. Zou and T. Hastie. Regression shrinkage and selection via the elastic net, with applications to microarrays. JR Statist. Soc. B, 2004. [19] M.M. Nordstrøm, M. Larsen, J. Sierakowski, and M.B. Stegmann. The IMM face database-an annotated dataset of 240 face images. Technical report, DTU Informatics, Building 321, 2004. [20] A. Asuncion and D.J. Newman. UCI machine learning repository, 2007. [21] N. Kanwisher, J. McDermott, and M.M. Chun. The fusiform face area: a module in human extrastriate cortex specialized for face perception. Journal of Neuroscience, 17(11):4302–4311, 1997. [22] U. Hasson, M. Harel, I. Levy, and R. Malach. Large-scale mirror-symmetry organization of human occipito-temporal object areas. Neuron, 37(6):1027–1041, 2003. [23] U. Hasson, Y. Nir, I. Levy, G. Fuhrmann, and R. Malach. Intersubject synchronization of cortical activity during natural vision. Science, 303(5664):1634–1640, 2004. 9
2009
245
3,754
Time-rescaling methods for the estimation and assessment of non-Poisson neural encoding models Jonathan W. Pillow Departments of Psychology and Neurobiology University of Texas at Austin pillow@mail.utexas.edu Abstract Recent work on the statistical modeling of neural responses has focused on modulated renewal processes in which the spike rate is a function of the stimulus and recent spiking history. Typically, these models incorporate spike-history dependencies via either: (A) a conditionally-Poisson process with rate dependent on a linear projection of the spike train history (e.g., generalized linear model); or (B) a modulated non-Poisson renewal process (e.g., inhomogeneous gamma process). Here we show that the two approaches can be combined, resulting in a conditional renewal (CR) model for neural spike trains. This model captures both real-time and rescaled-time history effects, and can be fit by maximum likelihood using a simple application of the time-rescaling theorem [1]. We show that for any modulated renewal process model, the log-likelihood is concave in the linear filter parameters only under certain restrictive conditions on the renewal density (ruling out many popular choices, e.g. gamma with shape κ ̸= 1), suggesting that real-time history effects are easier to estimate than non-Poisson renewal properties. Moreover, we show that goodness-of-fit tests based on the time-rescaling theorem [1] quantify relative-time effects, but do not reliably assess accuracy in spike prediction or stimulus-response modeling. We illustrate the CR model with applications to both real and simulated neural data. 1 Introduction A central problem in computational neuroscience is to develop functional models that can accurately describe the relationship between external variables and neural spike trains. All attempts to measure information transmission in the nervous system are fundamentally attempts to quantify this relationship, which can be expressed by the conditional probability P({ti}|X), where {ti} is a set of spike times generated in response to an external stimulus X. Recent work on the neural coding problem has focused on extensions of the Linear-NonlinearPoisson (LNP) “cascade” encoding model, which describes the neural encoding process using a linear receptive field, a point nonlinearity, and an inhomogeneous Poisson spiking process [2, 3]. While this model provides a simple, tractable tool for characterizing neural responses, one obvious shortcoming is the assumption of Poisson spiking. Neural spike trains exhibit spike-history dependencies (e.g., refractoriness, bursting, adaptation), violating the Poisson assumption that spikes in disjoint time intervals are independent. Such dependencies, moreover, have been shown to be essential for extracting complete stimulus information from spike trains in a variety of brain areas [4, 5, 6, 7, 8, 9, 10, 11]. Previous work has considered two basic approaches for incorporating spike-history dependencies into neural encoding models. One approach is to model spiking as a non-Poisson inhomogeneous renewal process (e.g., a modulated gamma process [12, 13, 14, 15]). Under this approach, spike 1 A nonlinearity rescaled renewal spiking post-spike filter stimulus filter + 0 1 2 0 1 2 3 4 5 6 7 real time (s) rescaled time (unitless) rescaled time p(ISI) ... B renewal density 0 50 100 rate (Hz) Figure 1: The conditional renewal (CR) model and time-rescaling transform. (A) Stimuli are convolved with a filter k then passed through a nonlinearity f, whose output is the rate λ(t) for an inhomogeneous spiking process with renewal density q. The post-spike filter h provides recurrent additive input to f for every spike emitted. (B) Illustration of the time-rescaling transform and its inverse. Top: the intensity λ(t) (here independent of spike history) in response to a one-second stimulus. Bottom left: interspike intervals (left, intervals between red dots) are drawn i.i.d. in rescaled time from renewal density q, here set to gamma with shape κ = 20. Samples are mapped to spikes in real time (bottom) via Λ−1(t), the inverse of the cumulative intensity. Alternatively, Λ(t) maps the true spike times (bottom) to samples from a homogeneous renewal process in rescaled time (left edge). times are Markovian, depending on the most recent spike time via a (non-exponential) renewal density, which may be rescaled in proportion to the instantaneous spike rate. A second approach is to use a conditionally Poisson process in which the intensity (or spike rate) is a function of the recent spiking history [4, 16, 17, 18, 19, 20]. The output of such a model is a conditionally Poisson process, but not Poisson, since the spike rate itself depends on the spike history. The time-rescaling theorem, described elegantly for applications to neuroscience in [1] , provides a powerful tool for connecting these two basic approaches, which is the primary focus of this paper. We begin by reviewing inhomogeneous renewal models and generalized linear model point process models for neural spike trains. 2 Point process neural encoding models 2.1 Definitions and Terminology Let {ti} be a sequence of spike times on the interval (0, T], with 0 < t0 < t1 < . . . , < tn ≤T, and let λ(t) denote the intensity (or “spike rate”) for the point process, where λ(t) ≥0, ∀t. Generally, this intensity is a function of some external variable (e.g., a visual stimulus). The cumulative intensity function is given by the integrated intensity, Λ(t) = Z t 0 λ(s)ds, (1) and is also known as the time-rescaling transform [1]. This function rescales the original spike times into spikes from a (homogeneous) renewal process, that is, a process in which the intervals are i.i.d. samples from a fixed distribution. Let {ui} denote the inter-spike intervals (ISIs) of the rescaled process, which are given by the integral of the intensity between successive spikes, i.e., ui = Λti−1(ti) = Z ti ti−1 λ(s)ds. (2) Intuitively, this transformation stretches time in proportion to the spike rate λ(t) , so that when the rate λ(t) is high, ISIs are lengthened and when λ(t) is low, ISIs are compressed. (See fig. 1B for illustration). 2 Let q(u) denote the renewal density, the probability density function from which the rescaled-time intervals {ui} are drawn. A Poisson process arises if q is exponential, q(u) = e−u; for any other density, the probability of spiking depends on the most recent spike time. For example, if q(u) is zero for u ∈[0, a], the neuron exhibits a refractory period (whose duration varies with λ(t)). To sample from this model (illustrated in fig. 1B), we can draw independent intervals ui from renewal density q(u), then apply the inverse time-rescaling transform to obtain ISIs in real time: (ti −ti−1) = Λ−1 ti−1(ui), (3) where Λ−1 ti−1(t) is the inverse of time-rescaling transform (eq 2).1 We will generally define the intensity function (which we will refer to as the base intensity2) in terms of a linear-nonlinear cascade, with linear dependence on some external covariates of the response (optionally including spike-history), followed by a point nonlinearity. The intensity in this case can be written: λ(t) = f(xt · k + yt · h), (4) where xt is a vector representing the stimulus at time t, k is a stimulus filter, yt is a vector representing the spike history at t, and h is a spike-history filter. We assume that the nonlinearity f is fixed. 2.2 The conditional renewal model We refer to the most general version of this model, in which λ(t) is allowed to depend on both the stimulus and spike train history, and q(u) is an arbitrary (finite-mean) density on R+, as a conditional renewal (CR) model (see fig. 1A). The output of this model forms an inhomogeneous renewal process conditioned on the process history. Although it is mathematically straightforward to define such a model, to our knowledge, no previous work has sought to incorporate both real-time (via h) and rescaled-time (via q) dependencies in a single model. Specific (restricted) cases of the CR model include the generalized linear model (GLM) [17], and the modulated renewal model with λ = f(x · k) and q a right-skewed, non-exponential renewal density [13, 15]. (Popular choices for q include gamma, inverse Gaussian, and log-normal distributions). The conditional probability distribution over spike times {ti} given the external variables X can be derived using the time-rescaling transformation. In rescaled time, the CR model specifies a probability over the ISIs, P({ui}|X) = n Y i=1 q(ui). (5) A change-of-variables ti = Λ−1 ti−1(ui) + ti−1 (eq. 3) provides the conditional probability over spike times: P({ti}|X) = n Y i=1 λ(ti)q(Λti−1(ti)). (6) This probability, considered as a function of the parameters defining λ(t) and q(u), is the likelihood function for the CR model, as derived in [13].3 The log-likelihood function can be approximated in discrete time, with bin-size dt taken small enough to ensure ≤1 spike per bin: log P({ti}|X) = n X i=1 log λ(ti) + n X i=1 log q   ti X j=ti−1+1 λ(j)dt  , (7) where ti indicates the bin for the ith spike. This approximation becomes exact in the limit as dt →0. 1Note that Λt∗(t) is invertible for all spike times ti, since necessarily ti ∈{t; λ(t) > 0}. 2A note on terminology: we follow [13] in defining λ(t) to be the instantaneous rate for an inhomogeneous renewal process, which is not identical to the hazard function H(t) = P(ti ∈[t, t + ∆]|ti > ti−1)/∆, also known as the conditional intensity [1]. We will use “base intensity” for λ(t) to avoid this confusion. 3For simplicity, we have ignored the intervals (0, t0], the time to the first spike, and (tn, T], the time after the last spike, which are simple to compute but contribute only a small fraction to the total likelihood. 3 stimulus filter non-parametric 100 0 2 4 6 0 5 2 gamma 2 exponential ISI (rescaled time) 50 ms renewal density rate (Hz) (a) (b) (c) cross-validation 0 1 0 50 time (s) (c) (a/b) rasters (a) (b) (c) 0 10 20 bits/s 0 0.5 1 0 0.5 1 quantiles CDF KS plot Figure 2: Time-rescaling and likelihood-based goodness-of-fit tests with simulated data. : Left: Stimulus filter and renewal density for three point process models (all with nonlinearity f(x) = ex and history-independent intensity). “True” spikes were generated from (a), a conditional renewal model with a gamma renewal density (κ = 10). These responses were fit by: (b), a Poisson model with the correct stimulus filter; and (c), a modulated renewal process with incorrect stimulus filter (set to the negative of the correct filter), and renewal density estimated nonparametrically from the transformed intervals (eq. 10). Middle: Repeated responses from all three models to a novel 1-s stimulus, showing that spike rate is well predicted by (b) but not by (c). Right: KS plots (above) show time-rescaling based goodness-of-fit. Here, (b) fails badly, while (c) passes easily, with cdf entirely within within 99% confidence region (gray lines). Likelihood-based cross-validation tests (below) show that (b) preserves roughly 1/3 as much information about spike times as (a), while (c) carries slightly less information than a homogeneous Poisson process with the correct spike rate. 3 Convexity condition for inhomogeneous renewal models We now turn to the tractability of estimating the CR model parameters from data. Here, we present an extension to the results of [21], which proved a convexity condition for maximum-likelihood estimation of a conditionally Poisson encoding model (i.e., generalized linear model). Specifically, [21] showed that the log-likelihood for the filter parameters θ = {k, h} is concave (i.e., has no nonglobal local maxima) if the nonlinear function f is both convex and log-concave (meaning log f is concave). Under these conditions4, minimizing the negative log-likelihood is a convex optimization problem. By extension, we can ask whether the estimation problem remains convex when we relax the Poisson assumption and allow for a non-exponential renewal density q. Let us write the log-likelihood function for the linear filter parameters θ = [kT , hT ]T as L{D,q}(θ) = n X i log f(X(ti) · θ) + n X i=1 log q Z ti ti−1 f(X(t) · θ)dt ! , (8) where X(t) = [xT t , yT t ]T is a vector containing the relevant stimulus and spike history at time t, and D = {{ti}, {X(t)}} represents the full set of observed data. The condition we obtain is: Theorem 1. The CR model log-likelihood L{D,q}(θ) is concave in the filter parameters θ, for any observed data D, if: (1) the nonlinearity f is convex and log-concave; and (2) the renewal density q is log-concave and non-increasing on (0, ∞]. Proof. It suffices to show that both terms in the equation (8) are concave in θ, since the sum of two concave functions is concave. The first term is obviously concave, since log f is concave. For the 4Allowed nonlinearities must grow monotonically, at least linearly and at most exponentially: e.g., exp(x); log(1 + exp(x)); ⌊x⌋p, p ≥1. 4 second term, note that R f(X · θ) is a convex function, since it is the integral of a convex function over a convex region. Then log q[ R f(X · θ)] is a concave, non-increasing function of a convex function, since log q is concave and non-increasing; such a function is necessarily concave.5 The second term is therefore also a sum of concave functions, and thus concave. Maximum likelihood filter estimation under the CR model is therefore a convex problem so long as the renewal density q is both log-concave and non-increasing. This restriction rules out a variety of renewal densities that are commonly employed to model neural data [13, 14, 15]. Specifically, the log-normal and inverse-Gaussian densities both have increasing regimes on a subset of [0, ∞), as does the gamma density q(u) ∝uκ−1e−uκ when κ > 1. For κ < 1, gamma fails to be log-concave, meaning that the only gamma density satisfying both conditions is the exponential (κ = 1). There are nevertheless many densities (besides the exponential) for which these conditions are met, including • q(u) ∝e−up/σ2, for any p ≥1 • q(u) = uniform density • q(u) ∝⌊f(u)⌋, or q(u) ∝ef(u), for any concave, decreasing function f(u) Unfortunately, no density in this family can exhibit refractory effects, since this would require a q that is initially zero and then rises. From an estimation standpoint, this suggests that it is easier to incorporate certain well-known spike-history dependencies using recurrent spike-history filters (i.e., using the GLM framework) than via a non-Poisson renewal density. An important corollary of this convexity result is that the decoding problem of estimating stimuli {xt} from a set of observed spike times {ti} using the maximum of the posterior (i.e., computing the MAP estimate) is also a convex problem under the same restrictions on f and q, so long as the prior over stimuli is log-concave. 4 Nonparametric Estimation of the CR model In practice, we may wish to optimize both the filter parameters governing the base intensity λ(t) and the renewal density q, which is not in general a convex problem. We may proceed, however, bearing in mind that gradient ascent may not achieve the global maximum of the likelihood function. Here we formulate a slightly different interval-rescaling function that allows us to nonparametrically estimate renewal properties using a density on the unit interval. Let us define the mapping vi = 1 −exp(−Λti−1(ti)), (9) which is the cumulative density function (cdf) for the intervals from a conditionally Poisson process with cumulative intensity Λ(t). This function maps spikes from a conditionally Poisson process to i.i.d. samples from U[0, 1]. Any discrepancy between the distribution of {vi} and the uniform distribution represents failures of a Poisson model to correctly describe the renewal statistics. (This is the central idea underlying time-rescaling based goodness-of-fit test, which we will discuss shortly). We propose to estimate a density φ(v) for the rescaled intervals {vi} using cubic splines (piecewise 3rd-order polynomials with continuous 2nd derivatives), with evenly spaced knots on the interval [0, 1].6 This allows us to rewrite the likelihood function (6) as the product of two identifiable terms: P({ti}|X) = n Y i=1 λ(ti) e−Λ0(T ) ! n Y i=1 φ(vi) ! , (10) where the first term is the likelihood under the conditional Poisson model [17], and the second is the probability of the rescaled intervals {vi} under the density φ(v). This formulation allows us to separate the (real-time) contributions of the intensity function under the assumption of conditionally 5To see this, note that if g is concave (g′′ ≤0) and non-increasing (g′ ≤0), and f is convex (f ′′ ≥0), then d2 dx2 g(f(x)) = g′′(f(x))f ′(x)2 + g′(f(x))f ′′(x) ≤0, implying g(f(x)) is concave. 6ML estimation of the spline parameters is a convex problem with one linear equality constraint R 1 0 φ(v)dv = 1 and a family of inequality constraints q(v) ≥0, ∀v, which can be optimized efficiently. 5 0 1 0 1 Figure 3: Left: pairwise dependencies between successive rescaled ISIs from model (“a”, see fig. 2) when fit by a non-Poisson renewal model “c”. Center: fitted model of the conditional distribution over rescaled ISIs given the previous ISI, discretized into 7 intervals for the previous ISI. Right: rescaling the intervals using the cdf  , obtained from the conditional  (zi+1| zi), produces successive ISIs which are much more independent. This transformation adds roughly 3 bits/s to the likelihood-based crossvalidation performance of model (c). Poisson spiking, from the (rescaled-time) contributions of a non-Poisson renewal density. (For a conditionally Poisson process,  is the uniform density on [0,1], and makes zero contribution to the total log-likelihood). We fit this model to simulated data (fig. 2), and to real neural data using alternating coordinate ascent of the filter parameters and the renewal density parameters (fig. 4). In fig. 2, we plot the renewal distribution ˆq(u) (red trace), which can be obtained from the estimated ˆ (v) via the transformation ˆq(u) = ˆ (1  e u)e u. 4.1 Incorporating dependencies between intervals The cdf defined by the CR model,  (v) =  v 0  (s)ds, maps the transformed ISIs { vi} so that the marginal distribution over zi =  (vi) is uniform on [0,1]. However, there is no guarantee that the resulting random variables are independent, as assumed in the likelihood (eq. 10). We can examine dependencies between successive ISIs by making a scatter plot of pairs (zi,zi+1) (see fig. 3). Departures from independence can then be modeled by introducing a nonparametric estimator for the conditional distribution φ(zi| zi 1). In this case, the likelihood becomes P({ ti} | X) =  n  i=1  (ti) e  0(T )   n  i=1  (vi)   n  i=2 φ(zi| zi 1)  , (11) which now has three terms, corresponding (respectively) to the effects of the base intensity, nonconditionally Poisson renewal properties, and dependencies between successive intervals. 5 The time-rescaling goodness-of-fit test If a particular point-process model provides an accurate description of a neuron’s response, then the cumulative intensity function defines a mapping from the real time to rescaled-time such that the rescaled interspike intervals have a common distribution. Time-rescaling can therefore be used as a tool for assessing the goodness-of-fit of a point process model [1, 22]. Specifically, after remapping a set of observed spike times according to the (model-defined) cumulative intensity, one can perform a distributional test (e.g., Kolmogorov-Smirnov, or KS test) to assess whether the rescaled intervals have the expected distribution7. For example, for a conditionally Poisson model, the KS test can be applied to the rescaled intervals { vi} (eq. 9) to assess their fit to a uniform distribution. 7Although we have defined the time-rescaling transform using the base intensity instead of the conditional intensity as in [1], the resulting tests are equivalent provided the K-S test is applied using the appropriate distribution. 6 This approach to model validation has grown in popularity in recent years [14, 23], and has in some instances been used as the only metric for comparing models. We wish to point out that timerescaling based tests are sensitive to one kind of error (i.e., errors in modeling rescaled ISIs), but may be insensitive to other kinds of model error (i.e., errors in modeling the stimulus-dependent spike rate). Inspection of the CR model likelihood (eq. 10), makes it clear that time-rescaling based goodness-of-fit tests are sensitive only to accuracy with which φ(v) (or equivalently, q(u)) models the rescaled intervals. The test can in fact be independent of the accuracy with which the model describes the transformation from stimulus to spikes, a point that we illustrate with an (admittedly contrived) example in fig. 2. For this example, spikes were genereated from a “true” model (denoted “a”), a CR model with a biphasic stimulus filter and a gamma renewal density (κ = 10). Responses from this model were fit by two sub-optimal approximate models: “b”, a Poisson (LNP) model, which was specified to have the correct stimulus filter; and “c”, a CR model in which the stimulus filter was mis-specified (set to the negative of the true filter), and a renewal density φ(v) was estimated non-parametrically from the rescaled intervals {vi} (rescaled under the intensity defined by this model). Although the time-varying spike-rate predictions of model (c) were badly mis-matched to those of model (a) (fig. 2, middle), a KS-plot (upper right) shows that (c) exhibits near perfect goodness-of-fit on a time-rescaling test, which the Poisson model (b) fails badly. We cross-validated these models by computing the log-likelihood of novel data, which provides a measure of predictive information about novel spike trains in units of bits/s [24, 18]. Using this measure, the “true” model (a) provides approximately 24 bits/s about the spike response to a novel stimulus. The Poisson model (b) captures only 8 bits/s, but is still much more accurate than the mis-specified renewal model (c), for which the information is slightly negative (indicating that performance is slightly worse than that of a homogeneous Poisson process with the correct rate). Fig. 3 shows that model (c) can be improved by modeling the dependencies between successive rescaled interspike intervals. We constructed a spline-based non-parametric estimate of the density π(zi+1|zi), where zi = Φ(vi). (We discretized zi into 7 bins, based on visual inspection of the pairwise dependency structure, and fit a cubic spline with 10 evenly spaced knots on [0,1] to the density within each bin). Rescaling these intervals using the cdf of the augmented model yields intervals that are both uniform on [0, 1] and approximately independent (fig. 3, right; independence for nonsuccessive intervals not shown). The augmented model raises the cross-validation score of model (c) to 1 bit/s, meaning that by incorporating dependencies between intervals, the model carries slightly more predictive information than a homogeneous Poisson model, despite the mis-specified stimulus filter. However, this model—despite passing time-rescaling tests of both marginal distribution and independence—still carries less information about spike times than the inhomogeneous Poisson model (b). 6 Application to neural data Figure 4 shows several specific cases of the CR model fit to spiking data from an ON parasol cell in primate retina, which was visually stimulated with binary spatio-temporal white noise (i.e., flickering checkerboard, [18]). We fit parameters for the CR model with and without spike-history filters, and with and without a non-Poisson renewal density (estimated non-parametrically as described above). As expected, a non-parametric renewal density allows for remapping of ISIs to the correct (uniform) marginal distribution in rescaled time (fig. 4, left), and leads to near-perfect scores on the timerescaling goodness-of-fit test (middle). Even when incorporating spike-history filters, the model with conditionally Poisson spiking (red) fails the time-rescaling test at the 95% level, though not so badly as the the inhomogeneous Poisson model (blue). However, the conditional Poisson model with spike-history filter (red) outperforms the non-parametric renewal model without spike-history filter (dark gray) on likelihood-based cross-validation, carrying 14% more predictive information. For this neuron, incorporating non-Poisson renewal properties into a model with spike history dependent intensity (light gray) provides only a modest (<1%) increase in cross-validation performance. Thus, in addition to being more tractable for estimation, it appears that the generalized linear modeling framework captures spike-train dependencies more accurately than a non-Poisson renewal process (at least for this neuron). We are in the process of applying this analysis to more data. 7 0 1 stimulus only stimulus + spike-history conditional Poisson conditional renewal z P(z) b c d a bits/s model a b c d cross-validated log-likelihood 0 10 20 CDF - quantile KS statistic 0 1 0 quantile Figure 4: Evaluation of four specific cases of the conditional renewal model, fit to spike responses from a retinal ganglion cell stimulated with a time-varying white noise stimulus. Left: marginal distribution over the interspike intervals {zi}, rescaled according to their cdf defined under four different models: (a) Inhomogeneous Poisson (i.e., LNP) model, without spike-history filter. (b) Conditional renewal model without spike-history filter, with non-parametrically estimated renewal density φ. (c) Conditional Poison model, with spike-history filter (GLM). (d) Conditional renewal model with spikehistory filter and non-parametrically estimated renewal density. A uniform distribution indicates good model fit under the time-rescaling test. Middle: The difference between the empirical cdf of the rescaled intervals (under all four models) and their quantiles. As expected, (a) fares poorly, (c) performs better but slightly exceeds the 95% confidence interval (black lines), and (b) and (d) exhibit near-perfect time-rescaling properties. Right: Likelihood-based cross-validation performance. Adding a non-parametric renewal density adds 4% to the Poisson model performance, but <1% to the GLM performance. Overall, a spike-history filter improves cross-validation performance more than the use of non-Poisson renewal process. 7 Discussion We have connected two basic approaches for incorporating spike-history effects into neural encoding models: (1) non-Poisson renewal processes; and (2) conditionally Poisson processes with an intensity that depends on spike train history. We have shown that both kinds of effects can be regarded as special cases of a conditional renewal (CR) process model, and have formulated the model likelihood in a manner that separates the contributions from these two kinds of mechanisms. Additionally, we have derived a condition on the CR model renewal density under which the likelihood function over filter parameters is log-concave, guaranteeing that ML estimation of filters (and MAP stimulus decoding) is a convex optimization problem. We have shown that incorporating a non-parametric estimate of the CR model renewal density ensures near-perfect performance on the time-rescaling goodness-of-fit test, even when the model itself has little predictive accuracy (e.g., due to a poor model of the base intensity). Thus, we would argue that K-S tests based on the time-rescaled interspike intervals should not be used in isolation, but rather in conjunction with other tools for model comparison (e.g., cross-validated log-likelihood). Failure under the time-rescaling test indicates that model performance may be improved by incorporating a non-Poisson renewal density, which as we have shown, may be estimated directly from rescaled intervals. Finally, we have applied the CR model to neural data, and shown that it can capture spike-history dependencies in both real and rescaled time. In future work, we will examine larger datasets and explore whether rescaled-time or real-time models provide more accurate descriptions of the dependencies in spike trains from a wider variety of neural datasets. Acknowledgments Thanks to E. J. Chichilnisky, A. M. Litke, A. Sher and J. Shlens for retinal data, and to J. Shlens and L. Paninski for helpful discussions. 8 References [1] E. Brown, R. Barbieri, V. Ventura, R. Kass, and L. Frank. The time-rescaling theorem and its application to neural spike train data analysis. Neural Computation, 14:325–346, 2002. [2] E. J. Chichilnisky. A simple white noise analysis of neuronal light responses. Network: Computation in Neural Systems, 12:199–213, 2001. [3] E. P. Simoncelli, L. Paninski, J. W. Pillow, and O. Schwartz. Characterization of neural responses with stochastic stimuli. In M. Gazzaniga, editor, The Cognitive Neurosciences, III, chapter 23, pages 327–338. MIT Press, 2004. [4] M. Berry and M. Meister. Refractoriness and neural precision. Journal of Neuroscience, 18:2200–2211, 1998. [5] Daniel S. Reich, Ferenc Mechler, Keith P. Purpura, and Jonathan D. Victor. Interspike intervals, receptive fields, and information encoding in primary visual cortex. J. Neurosci., 20(5):1964–1974, 2000. [6] N. Brenner, W. Bialek, and R. de Ruyter van Steveninck. Adaptive rescaling optimizes information transmission. Neuron, 26:695–702, 2000. [7] W. Gerstner. Population dynamics of spiking neurons: Fast transients, asynchronous states, and locking. Neural Computation, 12(1):43–89, 2000. [8] P. Reinagel and R. C. Reid. Temporal coding of visual information in the thalamus. Journal of Neuroscience, 20:5392–5400, 2000. [9] J. W. Pillow, L. Paninski, V. J. Uzzell, E. P. Simoncelli, and E. J. Chichilnisky. Prediction and decoding of retinal ganglion cell responses with a probabilistic spiking model. The Journal of Neuroscience, 25:11003–11013, 2005. [10] M.A. Montemurro, S. Panzeri, M. Maravall, A. Alenda, M.R. Bale, M. Brambilla, and R.S. Petersen. Role of precise spike timing in coding of dynamic vibrissa stimuli in somatosensory thalamus. Journal of Neurophysiology, 98(4):1871, 2007. [11] A.L. Jacobs, G. Fridman, R.M. Douglas, N.M. Alam, P. Latham, et al. Ruling out and ruling in neural codes. Proceedings of the National Academy of Sciences, 106(14):5936, 2009. [12] M. Berman. Inhomogeneous and modulated gamma processes. Biometrika, 68(1):143–152, 1981. [13] R. Barbieri, M.C. Quirk, L.M. Frank, M.A. Wilson, and E.N. Brown. Construction and analysis of non-poisson stimulus-response models of neural spiking activity. Journal of Neuroscience Methods, 105(1):25–37, 2001. [14] E. Rossoni and J. Feng. A nonparametric approach to extract information from interspike interval data. Journal of neuroscience methods, 150(1):30–40, 2006. [15] K. Koepsell and F.T. Sommer. Information transmission in oscillatory neural activity. Biological Cybernetics, 99(4):403–416, 2008. [16] R.E. Kass and V. Ventura. A spike-train probability model. Neural computation, 13(8):1713–1720, 2001. [17] 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. [18] 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. [19] 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, 2008. [20] I.H. Stevenson, J.M. Rebesco, L.E. Miller, and K.P. K ”ording. Inferring functional connections between neurons. Current Opinion in Neurobiology, 18(6):582– 588, 2008. [21] L. Paninski. Maximum likelihood estimation of cascade point-process neural encoding models. Network: Computation in Neural Systems, 15:243–262, 2004. [22] J. W. Pillow. Likelihood-based approaches to modeling the neural code. In K. Doya, S. Ishii, A. Pouget, and R. P. Rao, editors, Bayesian Brain: Probabilistic Approaches to Neural Coding, pages 53–70. MIT Press, 2007. [23] T.P. Coleman and S. Sarma. Using convex optimization for nonparametric statistical analysis of point processes. In IEEE International Symposium on Information Theory, 2007. ISIT 2007, pages 1476–1480, 2007. [24] L. Paninski, M. Fellows, S. Shoham, N. Hatsopoulos, and J. Donoghue. Superlinear population encoding of dynamic hand trajectory in primary motor cortex. J. Neurosci., 24:8551–8561, 2004. 9
2009
246
3,755
Semi-supervised Regression using Hessian Energy with an Application to Semi-supervised Dimensionality Reduction Kwang In Kim1, Florian Steinke2,3, and Matthias Hein1 1Department of Computer Science, Saarland University Saarbr¨ucken, Germany 2Siemens AG Corporate Technology Munich, Germany 3MPI for Biological Cybernetics, Germany {kimki,hein}@cs.uni-sb.de, Florian.Steinke@siemens.com Abstract Semi-supervised regression based on the graph Laplacian suffers from the fact that the solution is biased towards a constant and the lack of extrapolating power. Based on these observations, we propose to use the second-order Hessian energy for semi-supervised regression which overcomes both these problems. If the data lies on or close to a low-dimensional submanifold in feature space, the Hessian energy prefers functions whose values vary linearly with respect to geodesic distance. We first derive the Hessian energy for smooth manifolds and continue to give a stable estimation procedure for the common case where only samples of the underlying manifold are given. The preference of ‘’linear” functions on manifolds renders the Hessian energy particularly suited for the task of semi-supervised dimensionality reduction, where the goal is to find a user-defined embedding function given some labeled points which varies smoothly (and ideally linearly) along the manifold. The experimental results suggest superior performance of our method compared with semi-supervised regression using Laplacian regularization or standard supervised regression techniques applied to this task. 1 Introduction Central to semi-supervised learning is the question how unlabeled data can help in either classification or regression. A large class of methods for semi-supervised learning is based on the manifold assumption, that is, the data points do not fill the whole feature space but they are concentrated around a low-dimensional submanifold. Under this assumption unlabeled data points can be used to build adaptive regularization functionals which penalize variation of the regression function only along the underlying manifold. One of the main goals of this paper is to propose an appropriate regularization functional on a manifold, the Hessian energy, and show that it has favourable properties for semi-supervised regression compared to the well known Laplacian regularization [2, 12]. Opposite to the Laplacian regularizer, the Hessian energy allows functions that extrapolate, i.e. functions whose values are not limited to the range of the training outputs. Particularly if only few labeled points are available, we show that this extrapolation capability leads to significant improvements. The second property of the proposed Hessian energy is that it favors functions which vary linearly along the manifold, so-called geodesic functions defined later. By linearity we mean that the output values of the functions change linearly along geodesics in the input manifold. This property makes it particularly useful as a tool for semisupervised dimensionality reduction [13], where the task is to construct user-defined embeddings based on a given subset of labels. These user-guided embeddings are supposed to vary smoothly or even linearly along the manifold, where the later case corresponds to a setting where the user tries to 1 recover a low-distortion parameterization of the manifold. Moreover, due to user defined labels the interpretability of the resulting parameterization is significantly improved over unsupervised methods like Laplacian [1] or Hessian [3] eigenmaps. The proposed Hessian energy is motivated by the recently proposed Eells energy for mappings between manifolds [11], which contains as a special case the regularization of real-valued functions on a manifold. In flavour, it is also quite similar to the operator constructed in Hessian eigenmaps [3]. However, we will show that their operator due to problems in the estimation of the Hessian, leads to useless results when used as regularizer for regression. On the contrary, our novel estimation procedure turns out to be more stable for regression and as a side effects leads also to a better estimation of the eigenvectors used in Hessian eigenmaps. We present experimental results on several datasets, which show that our method for semi-supervised regression is often superior to other semi-supervised and supervised regression techniques. 2 Regression on manifolds Our approach for regression is based on regularized empirical risk minimization. First, we will discuss the problem and the regularizer in the ideal case where we know the manifold exactly, corresponding to the case where we have access to an unlimited number of unlabeled data. In the following we denote by M the m-dimensional data-submanifold in Rd. The supervised regression problems for a training set of l points (Xi, Yi)l i=1 can then be formulated as, arg min f∈C∞(M) 1 l l X i=1 L(Yi, f(Xi)) + λ S(f), where C∞(M) is the set of smooth functions on M, L : R × R →R is the loss function and S : C∞(M) →R is the regularization functional. For simplicity we use the squared loss L(y, f(x)) = (y −f(x))2, but the framework can be easily extended to other convex loss functions. Naturally, we do not know the manifold M the data is lying on. However, we have unlabeled data which can be used to estimate it, or more precisely we can use the unlabeled data to build an estimate ˆS(f) of the true regularizer S(f). The proper estimation of S(f) will be the topic of the next section. For the moment we just want to discuss regularization functionals in the ideal case, where we know the manifold. However, we would like to stress already here that for our framework to work it does not matter if the data lies on or close to a low-dimensional manifold. Even the dimension can change from point to point. The only assumption we make is that the data generating process does not fill the whole space but is concentrated on a low-dimensional structure. Regularization on manifolds. Our main goal is to construct a regularization functional on manifolds, which is particularly suited for semi-supervised regression and semi-supervised dimensionality reduction. We follow here the framework of [11] who discuss regularization of mappings between manifolds, where we are interested in the special case of real-valued output. They propose to use the so called Eells-energy SEells(f), which can be written for real-valued functions, f : M →R, as, SEells(f) = Z M ∥∇a∇bf∥2 T ∗ x M⊗T ∗ x M dV (x), where ∇a∇bf is the second covariant derivative of f and dV (x) is the natural volume element, see [7]. Note, that the energy is by definition independent of the coordinate representation and depends only on the properties of M. For details we refer to [11]. This energy functional looks quite abstract. However, in a special coordinate system on M, the so called normal coordinates, one can evaluate it quite easily. In sloppy terms, normal coordinates at a given point p are coordinates on M such that the manifold looks as Euclidean as possible (up to second order) around p. Thus in normal coordinates xr centered at p, ∇a∇bf p = m X r,s=1 ∂2f ∂xr∂xs pdxr a ⊗dxs b =⇒ ∥∇a∇bf∥2 T ∗ p M⊗T ∗ p M = m X r,s=1  ∂2f ∂xr∂xs 2 , (1) so that at p the norm of the second covariant derivative is just the Frobenius norm of the Hessian of f in normal coordinates. Therefore we call the resulting functional the Hessian regularizer SHess(f). 2 −2 0 2 −2 0 2 −1 0 1 0 5 10 15 20 −2 −1 0 1 2 geodesic distance along spiral estimated output Laplacian regularization Hessian regularization Figure 1: Difference between semi-supervised regression using Laplacian and Hessian regularization for fitting two points on the one-dimensional spiral. The Laplacian regularization has always a bias towards the constant function (for a non-zero regularization parameter it will not fit the data exactly) and the extrapolation beyond data points to the boundary of the domain is always constant. The non-linearity of the fitted function between the data point arises due to the non-uniform sampling of the spiral. On the contrary the Hessian regularization fits the data perfectly and extrapolates nicely to unseen data, since it’s null space contains functions which vary linearly with the geodesic distance. Before we discuss the discretization, we would like to discuss some properties of this regularizer. In particular, its difference to the regularizer S∆(f) using the Laplacian, S∆(f) = Z M ∥∇f∥2 dV (x) proposed by Belkin and Niyogi [2] for semi-supervised classification and in the meantime also adopted for semi-supervised regression [12]. While this regularizer makes sense for classification, it is of limited use for regression. The problem is that the null space NS = {f ∈C∞(M) | S(f) = 0} of S∆, that is the functions which are not penalized, are only the constant functions on M. The following adaptation of a result in [4] shows that the Hessian regularizer has a richer null-space. Proposition 1 (Eells, Lemaire [4]) A function f : M →R with f ∈C∞(M) has zero second derivative, ∇a∇bf x = 0, ∀x ∈M, if and only if for any geodesic γ : (−ε, ε) →M parameterized by arc length s, there exists a constant cγ depending only on γ such that ∂ ∂sf γ(s)  = cγ, ∀−ε < s < ε. We call functions f which fulfill ∂ ∂sf(γ(s)) = const. geodesic functions. They correspond to linear maps in Euclidean space and encode a constant variation with respect to the geodesic distance of the manifold. It is however possible that apart from the trivial case f = const. no other geodesic functions exist on M. What is the implication of these results for regression? First, the use of Laplacian regularization leads always to a bias towards the constant function and does not extrapolate beyond data points. On the contrary, Hessian regularization is not biased towards constant functions if geodesic functions exist and extrapolates “linearly” (if possible) beyond data points. These crucial differences are illustrated in Figure 1 where we compare Laplacian regularization using the graph Laplacian as in [2] to Hessian regularization as introduced in the next section for a densely sampled spiral. Since the spiral is isometric to a subset of R, it allows “geodesic” functions. 3 Semi-supervised regression using Hessian energy As discussed in the last section unlabeled data provides us valuable information about the data manifold. We use this information to construct normal coordinates around each unlabeled point, which requires the estimation of the local structure of the manifold. Subsequently, we employ the normal coordinates to estimate the Hessian regularizer using the simple form of the second covariant derivative provided in Equation (1). It turns out that these two parts of our construction are similar to the one done in Hessian eigenmaps [3]. However, their estimate of the regularizer has stability problems when applied to semi-supervised regression as is discussed below. In contrast, the proposed method does not suffer from this short-coming and leads to significantly better performance. The solution of the semi-supervised regression problem is obtained by solving a sparse linear system. In the following, capital letters Xi correspond to sample points and xr denote normal coordinates. Construction of local normal coordinates. The estimation of local normal coordinates can be done using the set of k nearest neighbors (NN) Nk(Xi) of point Xi. The cardinality k will be chosen later on by cross-validation. In order to estimate the local tangent space TXiM (seen as an 3 m-dimensional affine subspace of Rd), we perform PCA on the points in Nk(Xi). The m leading eigenvectors then correspond to an orthogonal basis of TXiM. In the ideal case, where one has a densely sampled manifold, the number of dominating eigenvalues should be equal to the dimension m. However, for real-world datasets like images the sampling is usually not dense enough so that the dimension of the manifold can not be detected automatically. Therefore the number of dimensions has to be provided by the user using prior knowledge about the problem or alternatively, and this is the way we choose in this paper, by cross-validation. Having the exact tangent space TXiM one can determine the normal coordinates xr of a point Xj ∈Nk(Xi) as follows. Let {ur}m r=1 be the m leading PCA eigenvectors, which have been normalized, then the normal coordinates {xr}m r=1 of Xj are given as, xr(Xj) = ⟨ur, Xj −Xi⟩ dM(Xj, Xi)2 Pm r=1 ⟨ur, Xj −Xi⟩2 , where the first term is just the projection of the difference vector, Xj −Xi, on the basis vector ur ∈ TXiM and the second component is just a rescaling to fulfill the property of normal coordinates that the distance of a point Xj ∈M to the origin (corresponding to Xi) is equal to the geodesic distance dM(Xj, Xi) of Xj to Xi on M, ∥x(Xj)∥2 = Pm r=1 xr(Xi)2 = dM(Xj, Xi)2. The rescaling makes sense only if local geodesic distances can be accurately estimated. In our experiments, this was only the case for the 1D-toy dataset of Figure 1. For all other datasets we therefore use xr(Xj) = ⟨ur, Xj −Xi⟩as normal coordinates. In [11] it is shown that this replacement yields an error of order O(∥∇af∥2 κ2) in the estimation of ∥∇a∇bf∥2, where κ is the maximal principal curvature (the curvature of M with respect to the ambient space Rd). Estimation of the Hessian energy. The Hessian regularizer, the squared norm of the second covariant derivative, ∥∇a∇bf∥2, corresponds to the Frobenius norm of the Hessian of f in normal coordinates, see Equation 1. Thus, given normal coordinates xr at Xi we would like to have an operator H which given the function values f(Xj) on Nk(Xi) estimates the Hessian of f at Xi, ∂2f ∂xr∂xs Xi ≈ k X j=1 H(i) rsj f(Xj). This can be done by fitting a second-order polynomial p(x) in normal coordinates to {f(Xj)}k j=1, p(i)(x) = f(Xi) + n X r=1 Brxr + n X r n X s=r Arsxrxs, (2) where the zeroth-order term is fixed at f(Xi). In the limit as the neighborhood size tends to zero, p(i)(x) becomes the second-order Taylor expansion of f around Xi, that is, Br = ∂f ∂xr Xi , Ars = 1 2 ∂2f ∂xr∂xs Xi , (3) with Ars = Asr. In order to fit the polynomial we use standard linear least squares, arg min w∈RP k X j=1 f(Xj) −f(Xi)  −(Φw)j 2 , where Φ ∈Rk×P is the design matrix with P = m+ m(m+1) 2 . The corresponding basis functions φ, are the monomials, φ = [x1, . . . , xm, x1x1, x1x2, . . . , xmxm], of the normal coordinates (centered at Xi) of Xj ∈Nk(xi) up to second order. The solution w ∈RP is w = Φ+f, where f ∈Rk and fj = f(Xj) with Xj ∈Nk(Xi) and Φ+ denotes the pseudo-inverse of Φ. Note, that the last m(m+1) 2 components of w correspond to the coefficients Ars of the polynomial (up to rescaling for the diagonal components) and thus with Equation (3) we obtain the desired form H(i) rsj. An estimate of the Frobenius norm of the Hessian of f at Xi is thus given as, ∥∇a∇bf∥2 ≈ m X r,s=1  k X α=1 H(i) rsαfα 2 = k X α,β=1 fαfβB(i) αβ, 4 where B(i) αβ = Pm r,s=1 H(i) rsαH(i) rsβ and finally the total estimated Hessian energy ˆSHess(f) is the sum over all data points, where n denotes the number of unlabeled and labeled points, ˆSHess(f) = n X i=1 m X r,s=1  ∂2f ∂xr∂xs Xi 2 = n X i=1 X α∈Nk(Xi) X β∈Nk(Xi) fαfβB(i) αβ = ⟨f, Bf⟩, where B is the accumulated matrix summing up all the matrices B(i). Note, that B is sparse since each point Xi has only contributions from its neighbors. Moreover, since we sum up the energy over all points, the squared norm of the Hessian is actually weighted with the local density of the points leading to a stronger penalization of the Hessian in densely sampled regions. The same holds for the estimate ˆS∆(f) of Laplacian regularization, ˆS∆(f) = Pn i,j=1 wij(fi −fj)2, where one also sums up the contributions of all data points (the rigorous connection between ˆS∆(f) and S∆(f) has been established in [2, 5]). The effect of non-uniform sampling can be observed in Figure 1. There the samples of the spiral are generated by uniform sampling of the angle leading to a more densely sampled “interior” region, which leads to the non-linear behavior of the function for the Laplacian regularization. For the Hessian energy this phenomena cannot be seen in this example, since the Hessian of a “geodesic” function is zero everywhere and therefore it does not matter if it is weighted with the density. On the other hand for non-geodesic functions the weighting matters also for the Hessian energy. We did not try to enforce a weighting with respect to the uniform density. However, it would be no problem to compensate the effects of non-uniform sampling by using a weighted from of the Hessian energy. Final algorithm. Using the ideas of the previous paragraphs the final algorithmic scheme for semi-supervised regression can now be immediately stated. We have to solve, arg min f∈Rn 1 l l X i=1 (Yi −f(Xi))2 + λ ⟨f, Bf⟩, (4) where for notational simplicity we assume that the data is ordered such that the first l points are labeled. The solution is obtained by solving the following sparse linear system, (I′ + l λB)f = Y, where I′ is the diagonal matrix with I′ ii = 1 if i is labeled and zero else and Yi = 0 if i is not labeled. The sparsity structure of B is mainly influencing the complexity to solve this linear system. However, the number of non-zeros entries of B is between O(nk) and O(nk2) depending on how well behaved the neighborhoods are (the later case corresponds basically to random neighbors) and thus grows linearly with the number of data points. Stability of estimation procedure of Hessian energy. Since we optimize the objective in Equation (4) for any possible assignment of function values f on the data points, we have to ensure that the estimation of the Hessian is accurate for any possible function. However, the quality of the estimate of the Hessian energy depends on the quality of the local fit of p(i) for each data point Xi. Clearly, there are function assignments where the estimation goes wrong. If k < P (P is the number of parameters of the polynomial) p can overfit the function and if k > P then p generally underfits. In both cases, the Hessian estimation is inaccurate. Most dangerous are the cases where the norm of the Hessian is underestimated in particular if the function is heavily oscillating. Note that during the estimation of local Hessian, we do not use the full second-order polynomial but fix its zeroth-order term at the value of f (i.e. p(i)(Xi) = f(Xi); cf. Eq. (2)). The reason for this is that underfitting is much more likely if one fits a full second-order polynomial since the additional flexibility in fitting the constant term always reduces the Hessian estimate. In the worst case a function which is heavily oscillating can even have zero Hessian energy, if it allows a linear fit at each point, see Figure 3. If such a function fits the data well we get useless regression results1 see Fig. 3. While fixing the constant term does not completely rule out such undesired behavior, we did not observe such irregular solutions in any experiment. In the appendix we discuss a modification of (Eq. (4)) which rules out 1For the full second-order polynomial even cross-validation does not rule out these irregular solutions. 5 −5 0 5 −4 −2 0 2 4 −10 0 10 20 30 40 Regression results using full polynomial −0.2 −0.1 0 0.1 0.2 −10 −5 0 5 10 15 20 f Full polynomial Fixed zeroth−order −4 −2 0 2 4 −4 −2 0 2 4 −10 −5 0 5 10 0 10 20 −0.1 −0.05 0 0.05 0.1 1st eigenvector 2nd eigenvector 3rd eigenvector −4 −2 0 2 4 −4 −2 0 2 4 −10 −5 0 5 10 0 10 20 −0.1 −0.05 0 0.05 0.1 1st eigenvector 2nd eigenvector 3rd eigenvector Figure 2: Fitting two points on the spiral revisited (see Fig. 1): Left image shows the regression result f using the Hessian energy estimated by fitting a full polynomial in normal coordinates. The Hessian energy of this heavily oscillating function is 0, since every local fit is linear (an example shown in the right image; green curve). However, fixing the zeroth-order term yields a high Hessian energy as desired (local fit is shown as the red curve in the right image). Figure 3: Sinusoid on the spiral: Left two images show the result of semi-supervised regression using the Hessian estimate of [3] and the corresponding smallest eigenvectors of the Hessian “matrix”. One observes heavy oscillations, due to the bad estimation of the Hessian. The right two images show the result of our method. Note, that in particular the third eigenvector corresponding to a non-zero eigenvalue of B is much better behaved. for sure irregular solutions, but since it did not lead to significantly better experimental results and requires an additional parameter to tune we do not recommend to use it. Our estimation procedure of the Hessian has similar motivation as the one done in Hessian eigenmaps [3]. However, in their approach they do not fix the zeroth-order term. This seems to be suitable for Hessian eigenmaps as they do not use the full Hessian, but only its m+1-dimensional null space (where m is the intrinsic dimension of the manifold). Apparently, this resolves the issues discussed above so that the null space can still be well estimated also with their procedure. However, using their estimator for semi-supervised regression leads to useless results, see Fig. 3. Moreover, we would like to note that using our estimator not only the eigenvectors of the null space but also eigenvectors corresponding to higher eigenvalues can be well estimated, see Fig. 3. 4 Experiments We test our semi-supervised regression method using Hessian regularization on one synthetic and two real-world data sets. We compare with the results obtained using Laplacian-based regularization and kernel ridge regression (KRR) trained only with the labeled examples. The free parameters for our method are the number of neighbors k for k-NN, the dimensionality of the PCA subspace, and the regularization parameter λ while the parameters for the Laplacian regularization-based regression are: k for k-NN, the regularization parameter and the width of the Gaussian kernel. For KRR we used also the Gaussian kernel with the width as free parameter. These parameters were chosen for each method using 5-fold cross-validation on the labeled examples. For the digit and figure datasets, the experiments were repeated with 5 different assignments of labeled examples. Digit Dataset. In the first set of experiments, we generated 10000 random samples of artificially generated images (size 28 × 28) of the digit 1. There are four variations in the data: translation (two variations), rotation and line thickness. For this dataset we are doing semi-supervised dimensionality reduction since the task is to estimate the natural parameters which were used to generate the digits. This is done based on 50 and 100 labeled images. Each of the variation corresponds then to a separate regression problem which we finally stick together to get an embedding into four dimensions. Note, that this dataset is quite challenging since translation of the digit leads to huge Euclidean distances between digits although they look visually very similar. Fig. 2 and Table 1 summarize the results. As observed in the first row of Fig. 2, KRR (K) and Hessian (H) regularization recover well the two parameters of line width and rotation (all other embeddings can be found in the supplementary material). As discussed previously, the Laplacian (L) regularization tends to shrink the estimated parameters towards a constant as it penalizes the “geodesic” functions. This results in the poor estimation of parameters, especially the line-thickness parameter.2 Although KRR estimates well the thickness parameter, it fails for the rotation parameter (cf. the second row of Fig. 2 where we 2In this figure, each parameter is normalized to lie in the unit interval while the regression was performed in the original scale. The point (0.5, 0.5) corresponds roughly to the origin in the original parameters. 6 Figure 2: Results on the digit 1 dataset. First row: the 2D-embedding of the digits obtained by regression for the rotation and thickness parameter with 100 labels. Second row: 21 digit images sampled at regular intervals in the estimated parameter spaces: two reference points (inverted images) are sampled in the ground truth parameter space and then in the corresponding estimated embedding. Then, 19 points are sampled in the estimated parameter spaces based on linear inter/extrapolation of the parameters. The shown image samples are the ones which have parameters closest to the interpolated ones. In each parameter space the interpolated points, the corresponding closest data points and the reference points are marked with red dots, blue and cyan circles. Table 1: Results on digits: mean squared error (standard deviation) (both in units 10−3). 50 labeled points 100 labeled points h-trans. v-trans. rotation thickness h-trans. v-trans. rotation thickness K 0.78(0.13) 0.85(0.14) 45.49(7.20) 0.02(0.01) 0.39(0.10) 0.48(0.08) 26.02(2.98) 0.01(0.00) L 2.41(0.26) 3.91(0.59) 64.56(3.90) 0.39(0.02) 1.17(0.13) 2.20(0.22) 30.73(6.05) 0.34(0.01) H 0.34(0.03) 0.88(0.07) 4.03(1.15) 0.15(0.02) 0.16(0.03) 0.39(0.07) 1.48(0.26) 0.06(0.01) show the images corresponding to equidistant inter/extrapolation in the estimated parameter space between two fixed digits (inverted image)). The Hessian regularization provided a moderate level of accuracy in recovering the thickness parameter and performed best on the remaining ones. Figure Dataset. The second dataset consists of 2500 views of a toy figure (see Fig. 3) sampled based on regular intervals in zenith and azimuth angles on the upper hemisphere around the centered object [10]. Fig. 3 shows the results of regression for three parameters - the zenith angle, and the azimuth angle is transformed into Euclidean x,y coordinates.3 Both Laplacian and Hessian regularizers provided significantly better estimation of the parameters in comparison to KRR, which demonstrates the effectiveness of semi-supervised regression. However, the Laplacian shows again contracting behavior which is observed in the top view of hemisphere. Note that for our method this does not occur and the spacing of the points in the parameter space is much more regular, which again stresses the effectiveness of our proposed regularizer. Image Colorization. Image colorization refers to the task of estimating the color components of a given gray level image. Often, this problem is approached based on the color information of a subset of pixels in the image, which is specified by a user (cf. [8] for more details). This is essentially a semi-supervised regression problem where the user-specified color components correspond to the labels. To facilitate quantitative evaluation, we adopted 20 color images, sampled a subset of pixels in each image as labels, and used the corresponding gray levels as inputs. The number of labeled points were 30 and 100 for each images, which we regard as a moderate level of user intervention. As error measure, we use the mean square distance between the original image and the corresponding 3Although the underlying manifold is two dimensional, the parametrization cannot be directly found based on regression as the azimuth angle is periodic. This results in contradicting assignments of ground truth labels. 7 −1 0 1 −1 0 1 0 0.5 1 ground truth −1 0 1 −1 0 1 0 0.5 1 KRR −1 0 1 −1 0 1 0 0.5 1 Laplacian regularization −1 0 1 −1 0 1 0 0.5 1 Hessian regularization 10 25 50 100 0 0.05 0.1 0.15 0.2 x coord. Laplacian regularization KRR Hessian regularization 10 25 50 100 0 0.05 0.1 0.15 0.2 y coord. Laplacian regularization KRR Hessian regularization 10 25 50 100 0 0.05 0.1 0.15 0.2 number of labeled points error zenith coord. Laplacian regularization KRR Hessian regularization Figure 3: Results of regression on the figure dataset. First row: embedding in the three dimensional spaces with 50 labels. Second row: Left: some example images of the dataset, Right: error plots for each regression variable for different number of labeled points. Original image KRR L H Levin et al. [8] Figure 4: Example of image colorization with 30 labels. KRR failed in reconstructing (the color of) the red pepper at the lower-right corner, while the Laplacian regularizer produced overall, a greenish image. Levin et al’s method well-recovered the lower central part however failed in reconstructing the upper central pepper. Despite the slight diffusion of red color at the upper-left corner, overall, the result of Hessian regularization looks best which is also confirmed by the reconstruction error. reconstruction in the RGB space. During the colorization, we go over to the YUV color model such that the Y components, containing the gray level values, are used as the input, based on which the U and V components are estimated. The estimated U-V components are then combined with the Y component and converted into RGB format. For the regression, for each pixel, we use as features the 3 × 3-size image patch centered at the pixel of interest plus the 2-dimensional coordinate value of that pixel. The coordinate values are weighted by 10 such that the contribution of coordinate values and gray levels is balanced. For comparison, we performed experiments with the method of Levin et al. [8] as one of the state-of-the-art methods.4 Figure 4 shows an example and Table 2 summarizes the results. The Hessian regularizer clearly outperformed the KRR and the Laplacianbased regression and produced slightly better results than those of Levin et al. [8]. We expect that the performance can be further improved by exploiting a priori knowledge on structure of natural images (e.g., by exploiting the segmentation information (cf. [9, 6]) in the NN structure). 4Code is available at: http://www.cs.huji.ac.il/˜yweiss/Colorization/. Table 2: Results on colorization: mean squared error (standard deviation) (both in units 10−3). # labels K L H Levin et al. [8] 30 1.18(1.10) 0.83(0.64) 0.64(0.50) 0.74(0.61) 100 0.66(0.65) 0.50(0.33) 0.32(0.25) 0.37(0.26) 8 References [1] M. Belkin and P. Niyogi. Laplacian eigenmaps for dimensionality reduction and data representation. Neural Computation, 15(6):1373–1396, 2003. 2 [2] M. Belkin and P. Niyogi. Semi-supervised learning on manifolds. Machine Learning, 56:209– 239, 2004. 1, 3, 5 [3] D. Donoho and C. Grimes. Hessian eigenmaps: Locally linear embedding techniques for highdimensional data. Proc. of the National Academy of Sciences, 100(10):5591–5596, 2003. 2, 3, 6 [4] J. Eells and L. Lemaire. Selected topics in harmonic maps. AMS, Providence, RI, 1983. 3 [5] M. Hein. Uniform convergence of adaptive graph-based regularization. In G. Lugosi and H. Simon, editors, Proc. of the 19th Conf. on Learning Theory (COLT), pages 50–64, Berlin, 2006. Springer. 5 [6] R. Irony, D. Cohen-Or, and D. Lischinski. Colorization by example. In Proc. Eurographics Symposium on Rendering, pages 201–210, 2005. 8 [7] J. M. Lee. Riemannian Manifolds - An introduction to curvature. Springer, New York, 1997. 2 [8] A. Levin, D. Lischinski, and Y. Weiss. Colorization using optimization. In Proc. SIGGRAPH, pages 689–694, 2004. 7, 8 [9] Q. Luan, F. Wen, D. Cohen-Or, L. Liang, Y.-Q. Xu, and H.-Y. Shum. Natural image colorization. In Proc. Eurographics Symposium on Rendering, pages 309–320, 2007. 8 [10] G. Peters. Efficient pose estimation using view-based object representations. Machine Vision and Applications, 16(1):59–63, 2004. 7 [11] F. Steinke and M. Hein. Non-parametric regression between Riemannian manifolds. In Advances in Neural Information Processing Systems, pages 1561–1568, 2009. 2, 4 [12] J. J. Verbeek and N. Vlassis. Gaussian fields for semi-supervised regression and correspondence learning. Pattern Recognition, 39:1864–1875, 2006. 1, 3 [13] X. Yang, H. Fu, H. Zha, and J. Barlow. Semi-supervised nonlinear dimensionality reduction. In Proc. of the 23rd international conference on Machine learning, pages 1065–1072, New York, NY, USA, 2006. ACM. 1 9
2009
247
3,756
Localizing Bugs in Program Executions with Graphical Models Laura Dietz Max-Planck Institute for Computer Science Saarbruecken, Germany dietz@mpi-inf.mpg.de Valentin Dallmeier Saarland University Saarbruecken, Germany dallmeier@cs.uni-saarland.de Andreas Zeller Saarland University Saarbruecken, Germany zeller@cs.uni-saarland.de Tobias Scheffer Potsdam University Potsdam, Germany scheffer@cs.uni-potsdam.de Abstract We devise a graphical model that supports the process of debugging software by guiding developers to code that is likely to contain defects. The model is trained using execution traces of passing test runs; it reflects the distribution over transitional patterns of code positions. Given a failing test case, the model determines the least likely transitional pattern in the execution trace. The model is designed such that Bayesian inference has a closed-form solution. We evaluate the Bernoulli graph model on data of the software projects AspectJ and Rhino. 1 Introduction In today’s software projects, two types of source code are developed: product and test code. Product code, also referred to as the program, contains all functionality and will be shipped to the customer. The program and its subroutines are supposed to behave according to a specification. The example program in Figure 1 (left), is supposed to always return the value 10. It contains a defect in line number 20, which lets it return a wrong value if the input variable equals five. In addition to product code, developers write test code that consists of small test programs, each testing a single procedure or module for compliance with the specification. For instance, Figure 1 (right) shows three test cases, the second of which reveals the defect. Development environments provide support for running test cases automatically and would report failure of the second test case. Localizing defects in complex programs is a difficult problem because the failure of a test case confirms only the existence of a defect, not its location. When a program is executed, its trace through the source code can be recorded. An executed line of source code is identified by a code position s ∈S. The stream of code positions forms the trace t of a test case execution. The data that our model analyses consists of a set T of passing test cases t. In addition to the passing tests we are given a single trace ¯t of a failing test case. The passing test traces and the trace of the failing case refer to the same code revision; hence, the semantics of each code position remain constant. For the failing test case, the developer is to be provided with a ranking of code positions according to their likelihood of being defective. The semantics of code positions may change across revisions, and modifications of code may impact the distribution of execution patterns in the modified as well as other locations of the code. We focus on the problem of localizing defects within a current code revision. After each defect is localized, the code is typically revised and the semantics of code positions changes. Hence, in this setting, we 1 10 /** 11 * A procedure containing a defect. 12 * 13 * @param param an arbitrary parameter. 14 * @return 10 15 */ 16 public static int defect (int param) { 17 int i = 0; 18 while (i < 10) { 19 if (param == 5) { 20 return 100; 21 } 22 i++; 23 } 24 return i; 25 } public static class TestDefect extends TestCase { public void testParam1() { assertEquals(10, defect(1)); } /** Failing test case. */ public void testParam5() { assertEquals(10, defect(5)); } public void testParam10() { assertEquals(10, defect(10)); } } Figure 1: Example with product code (left) and test code (right). cannot assume that any negative training data—that is, previous failing test cases of the same code revision—are available. For that reason, discriminative models do not lend themselves to our task. Instead of representing the results as a ranked list of positions, we envision a tight integration in development environments. For instance, on failure of a test case, the developer could navigate between predicted locations of the defect, starting with top ranked positions. So far, Tarantula [1] is the standard reference model for localizing defects in execution traces. The authors propose an interface widget for test case results in which a pixel represents a code position. The hue value of the pixel is determined by the number of failing and passing traces that execute this position and correlates with the likelihood that s is faulty [1]. Another approach [2] includes return values and flags for executed code blocks and builds on sensitivity and increase of failure probability. This approach was continued in project Holmes [3] to include information about executed control flow paths. Andrzejewski et al. [4] extend latent Dirichlet allocation (LDA) [5] to find bug patterns in recorded execution events. Their probabilistic model captures low-signal bug patterns by explaining passing executions from a set of usage topics and failing executions from a mix of usage and bug topics. Since a vast amount of data is to be processed, our approach is designed to not require estimating latent variables during prediction as is necessary with LDA-based approaches [4]. Outline. Section 2 presents the Bernoulli graph model, a graphical, generative model that explains program executions. This section’s main result is the closed-form solution for Bayesian inference of the likelihood of a transitional pattern in a test trace given example execution traces. Furthermore, we discuss how to learn hyperparameters and smoothing coefficients from other revisions, despite the fragile semantics of code positions. In Section 3, reference methods and simpler probabilistic models are detailed. Section 4 reports on the prediction performance of the studied models for the AspectJ and Rhino development projects. Section 5 concludes. 2 Bernoulli Graph Model The Bernoulli graph model is a probabilistic model that generates program execution graphs. In contrast to an execution trace, the graph is a representation of an execution that abstracts from the number of iterations over code fragments. The model allows for Bayesian inference of the likelihood of a transition between code positions within an execution, given previously seen executions. The n-gram execution graph Gt = (Vt, Et, Lt) of an execution t connects vertices Vt by edges Et ⊆Vt × Vt. Labeling function Lt : Vt →S(n−1) injectively maps vertices to n −1-grams of code positions, where S is the alphabet of code positions. In the bigram execution graph, each vertex v represents a code position Lt(v); each arc (u, v) indicates that code position Lt(v) has been executed directly after code position Lt(u) at least once during the program execution. In n-gram execution graphs, each vertex v represents a fragment Lt(v) = s1 . . . sn−1 of consecutively executed statements. Vertices u and v can only be connected by an arc if the fragments are overlapping in all but the first code position of u and the last code position of v; that is, Lt(u) = s1 . . . sn−1 and Lt(v) = s2 . . . sn. Such vertices u and v are 2 e 17 19 22 22 18 e e 18 19 17 18 0 ~ y22 18 17 18 17 0 ~ y22 18 20 18 20 18 24 1 ~ y22 18 24 0 ~ y22 18 18 18 18 17 | 18 | 19 | 22 | 18 | 19 | 22 | …. | 22 | 18 | 24 1 ~ y22 18 19 ... 0 ~ y22 18 23 18 23 Figure 2: Expanding vertex “22 18” in the generation of a tri-gram execution graph corresponding to the trace at the bottom. Graph before expansion is drawn in black, new parts are drawn in solid red. connected by an arc if code positions s1 . . . sn are executed consecutively at least once during the execution. For the example program in Figure 1 the tri-gram execution graph is given in Figure 2. Generative process. The Bernoulli graph model generates one graph Gm,t = (Vm,t, Em,t, Lm,t) per execution t and procedure m. The model starts the graph generation with an initial vertex representing a fragment of virtual code positions ε. In each step, it expands a vertex u labeled Lm,t(u) = s1 . . . sn−1 that has not yet been expanded; e.g., vertex “22 18” in Figure 2. Expansion proceeds by tossing a coin with parameter ψm,s1...sn for each appended code position sn ∈S. If the coin toss outcome is positive, an edge to vertex v labeled Lm,t(v) = s2 . . . sn is introduced. If Vm,t does not yet include a vertex v with this labeling, it is added at this point. Each vertex is expanded only once. The process terminates if no vertex is left that has been introduced but not yet expanded. Parameters ψm,s1...sn are governed by a Beta distribution with fixed hyperparameters αψ and βψ. In the following we focus on the generation of edges, treating the vertices as observed. Figure 3a) shows a factor graph representation of the generative process and Algorithm 1 defines the generative process in detail. Inference. Given a collection Gm of previously seen execution graphs for method m and a new execution Gm = (Vm, Em, Lm), Bayesian inference determines the likelihood p((u, v) ∈ Em|Vm, Gm, αψ, βψ) of each of the edges (u, v), thus indicating unlikely transitions in the new execution of m represented by execution graph Gm. Since we employ independent models for all Algorithm 1 Generative process of the Bernoulli graph model. for all procedures m do for all s1...sn ∈(Sm)n do draw ψm,s1...sn ∼Beta(αψ, βψ). for all executions t do create a new graph Gm,t. add a vertex u labeled εε...ε. initialize queue Q = {u}. while queue Q is not empty do dequeue u ←Q, with L(u) = s1 . . . sn−1. for all sn ∈Sm do let v be a vertex with L(v) = s2 . . . sn. draw b ∼Bernoulli(ψm,s1...sn). if b = 1 then if v /∈Vm,t then add v to Vm,t. enqueue v →Q. add arc (u, v) to Em,t. 3 for each procedure m for each fragment f Sn for each trace t Fragment coin ψ αψ βψ Beta Bernoulli f t b αγ Procedure distr γ αϕ Code Pos. distr ϕ Symm. Dirichlet for each code position in t for each trace t Procedure m Code pos. s Fragment f=si-1,... Multinomial m,f for each procedure m for each fragment f Multi Symm. Dirichlet b) Bernoulli fragment c) Multinomial n-gram for each procedure m for each vertex u for each code position s Edge coin ψ αψ βψ Beta u V true false Bern (u,v) E b false a) Bernoulli graph for each graph G Equals γϕ Figure 3: Generative models in directed factor graph notation with dashed rectangles indicating gates [6]. methods m, inference can be carried out for each method separately. Since vertices Vm are observed, coin parameters Ψ are d-separated from each other (cf. Figure 3a). We yield independent Beta-Bernoulli models conditioned on the presence of start vertices u. Thus, predictive distributions for presence of edges in future graphs can be derived in closed form (Equation 1) where #G u denotes the number of training graphs containing vertices labeled L(u) and #G (u,v) denotes the number of training graphs containing edges between vertices labeled L(u) and L(v). See the appendix for a detailed derivation of Equation 1. p((u, v) ∈Em|Vm, Gm, αψ, βψ) = #G (u,v) + αψ #Gu + αψ + βψ . (1) By definition, an execution graph G for an execution contains a vertex if its label is a substring of the execution’s trace t. Likewise, an edge is contained if an aggregation of the vertex labels is a substring of t. It follows1 that the predictive distribution can be reformulated as in Equation 2 to predict the probability of seeing the code position ˜s = sn after a fragment of preceding statements ˜f = s1 . . . sn−1 using the trace representation of an execution. Thus, it is not neccessary to represent execution graphs G explicitly. p(˜s| ˜f, T, αψ, βψ) = #{t ∈T| ˜f˜s ∈t} + αψ #{t ∈T| ˜f ∈t} + αψ + βψ (2) Estimating interpolation coefficients and hyperparameters. For given hyperparameters and fixed context length n, Equation 2 predicts the likelihood for ˜si following a fragment ˜f = ˜si−1 . . . ˜si−n+1. To avoid sparsity issues while maintaining good expressiveness, we smooth various context lengths up to N by interpolation. p(˜si|˜si−1 . . . ˜si−N+1, T, αψ, βψ, θ) = N X n=1 p(n|θ) · p(˜si|˜si−1 . . . ˜si−n+1, T, αψ, βψ) We can learn from different revisions by integrating multiple Bernoulli graphs models in a generative process, in which coin parameters are not shared across revisions and context lengths n. This process generates a stream of statements with defect flags. We learn hyperparameters αψ and βψ jointly with θ using an automatically derived Gibbs sampling algorithm [7]. Predicting defective code positions. Having learned point estimates for ˆαψ, ˆβψ, and ˆθ from other revisions in a leave-one-out fashion, statements ˜s are scored by the complementary event of being normal for any preceding fragment ˜f. score(˜s) = max ˜ f preceding ˜s  1 −p(˜s| ˜f, T, ˆαψ, ˆβψ, ˆθ)  (3) The maximum is justified because an erroneous code line may show its defective behavior only in combination with some preceding code fragments, and even a single erroneous combination is enough to lead to defective behavior of the software. 1For a set A we denote its cardinality by #A rather than |A| to avoid confusion with conditioned signs. 4 3 Reference Methods The Tarantula model is a popular scoring heuristic for defect localization in software engineering. We will prove a connection between Tarantula and the unigram variant of a Bernoulli graph model. Furthermore, we will discuss other reference models which we will consider in the experiments. 3.1 Tarantula Tarantula [1] scores the likelihood of a code position s being defective according to the proportions of failing F and passing traces T that execute this position (Equation 4). scoreT arantula(˜s) = #{¯t∈F |˜s∈¯t} #{¯t∈F } #{¯t∈F |˜s∈¯t} #{¯t∈F } + #{t∈T |˜s∈t} #{t∈T } (4) For the case that only one test case fails, we can show an interesting relationship between Tarantula, the unigram Bernoulli graph model, and multivariate Bernoulli models (referred to in [8]). In the unigram case, the Bernoulli graph model generates a graph in which all statements in an execution are directly linked to an empty start vertex. In this case, the Bernoulli graph model is equal to a multi-variate Bernoulli model generating a set of statements for each execution. Using an improper prior αψ = βψ = 0, the unigram Bernoulli graph model scores a statement by scoreGraph(˜s) = 1 −#{t∈T |˜s∈t} #{t∈T } . Letting g(s) = #{t∈T |˜s∈t} #{t∈T } , the rank order of any two code positions s1, s2 is determined by 1 −g(s1) > 1 −g(s2) or equivalently 1 1+g(s1) > 1 1+g(s2) which is Tarantula’s ranking criterion if #F is 1. 3.2 Bernoulli Fragment Model Inspired by this equivalence, we study a naive n-gram extension to multi-variate Bernoulli models which we call Bernoulli fragment model. Instead of generating a set of statements, the Bernoulli model may generate a set of fragments for each execution. Given a fixed order n, the Bernoulli fragment model draws a coin parameter for each possible fragment f = s1 . . . sn over the alphabet Sm. For each execution the fragment set is generated by tossing a fragment’s coin and including all fragments with outcome b = 1 (cf. Figure 3b). The probability of an unseen fragment ˜f is given by p( ˜f|T, αψ, βψ) = #{t∈T | ˜ f∈t}+αψ #{t∈T }+αψ+βψ . The model deviates from reality in that it may generate fragments that may not be aggregateable into a consistent sequence of code positions. Thus, non-zero probability mass is given to impossible events, which is a potential source of inaccuracy. 3.3 Multinomial Models The multinomial model is popular in the text domain—e.g., [8]. In contrast to the Bernoulli graph model, the multinomial model takes the number of occurrences of a pattern within an execution into account. It consists of a hierarchical process in which first a procedure m is drawn from multinomial distribution γ, then a code position s is drawn from the multinomial distribution φm ranging over all code positions Sm in the procedure. The n-gram model is a well-known extension of the unigram multinomial model, where the distributions φ are conditioned on the preceding fragment of code positions f = s1 . . . sn−1 to draw a follow-up statement sn ∼φm,f. Using fixed symmetric Dirichlet distributions with parameter αγ and αφ as priors for the multinomial distributions, the probability for unseen code positions ˜s following on fragment ˜f is given in Equation 5. Shorthand #T s∈m denotes how often statements in prodecure m are executed (summing over all traces t ∈T in the training set); and #T m,s1...sn denotes the number times statements s1 . . . sn are executed subsequently by procedure m. p(˜s, ˜m| ˜f, T, αγ, αφ) ∝ #T s∈˜m + αγ P m′∈M #T s∈m′ + αγ#M | {z } γ( ˜m) · #T ˜m, ˜ f ˜s + αφ #T ˜m, ˜ f + αφ#S ˜m | {z } φ ˜ m, ˜ f (˜s) (5) 5 3.4 Holmes Chilimbi et al. [3] propose an approach that relies on a stream of sampled boolean predicates P, each corresponding to an executed control flow branch starting at code position s. The approach evaluates whether P being true increases the probability of failure in contrast to reaching the code position by chance. Each code position is scored according to the importance of its predicate P which is the harmonic mean of sensitivity and increase in failure probability. Shorthands Fe(P) and Se(P) refer to the failing/passing traces that executed the path P, where Fo(P) and So(P) refer to failing/passing traces that executed the start point of P. Importance(P) = 2 log #F log Fe(P ) +  Fe(P ) Se(P )+Fe(P ) − Fo(P ) So(P )+Fo(P ) −1 This scoring procedure is not applicable to cases where a path is executed in only one failing trace, as a division by zero occurs in the first term when Fe(P) = 1. This issue renders Holmes inapplicable to our case study where typically only one test case fails. 3.5 Delta LDA Andrzejewski et al. [4] use a variant of latent Dirichlet Allocation (LDA) [5] to identify topics of co-occurring statements. Most topics may be used to explain passing and failing traces, where some topics are reserved to explain statements in the failing traces only. This is obtained by running LDA with different Dirichlet priors on passing and failing traces. After inference, the topic specific statement distributions φ = p(s|z) are converted to p(z|s) via Bayes’ rule. Then statements j are ranked according to the confidence Sij = p(z = i|s = j) −maxk̸=i p(z = k|s = j) of being rather about a bug topic i than any other topic k. 4 Experimental Evaluation In this section we study empirically how accurately the Bernoulli graph model and the reference models discussed in Section 3 localize defects that occurred in two large-scale development projects. We find that data used for previous studies is not appropriate for our investigation. The SIR repository [9] provides traces of small programs into which defects have been injected. However, as pointed out in [10], there is no strong argument as to why results obtained on specifically designed programs with artificial defects should necessarily transfer to realistic software development projects with actual defects. The Cooperative Bug Isolation project [11], on the other hand, collects execution data from real applications, but records only a random sample of 1% of the executed code positions; complete execution traces cannot be reconstructed. Therefore, we use the development history of two large-scale open source development projects, AspectJ and Rhino, as gathered in [12]. Data set. From Rhino’s and AspectJ’s bug database, we select defects which are reproducable by a test case and identify corresponding revisions in the source code repository. For such revisions, the test code contains a test case that fails in one revision, but passes in the following revision. We use the code positions that were modified between the two revisions as ground truth for the defective code positions D. For AspectJ, these are one or two lines of code; the Rhino project contains larger code changes. For each such revision, traces T of passing test cases are recorded on a line number basis. In the same manner, the failing trace t (in which the defective code is to be identified) is recorded. The AspectJ data set consists of 41 defective revisions and a total of 45 failing traces. Each failing trace has a length of up to 2,000,000 executed statements covering approx. 10,000 different code positions (of the 75,000 lines in the project), spread across 300 to 600 files and 1,000 to 4,000 procedures. For each revision, we recorded 100 randomly selected valid test cases (drawn out of approx. 1000). Rhino consists of 15 defective revisions with one failing trace per bug. Failing traces have an average length of 3,500,000 executed statements, covering approx. 2,000 of 38,000 6 0 0.1 0.2 0.3 0.4 0.5 0.6 0 0.2 0.4 0.6 0.8 1 Recall Top k% AspectJ: h = 0 n-gram Bernoulli Graph n-gram Bernoulli Fragment n-gram Multinomial Unigram Multinomial Tarantula Delta LDA 0 0.1 0.2 0.3 0.4 0.5 0.6 0 0.2 0.4 0.6 0.8 1 Recall Top k% AspectJ: h = 1 0 0.1 0.2 0.3 0.4 0.5 0.6 0 0.2 0.4 0.6 0.8 1 Recall Top k% AspectJ: h = 10 0 0.1 0.2 0.3 0.4 0.5 0.6 0 0.2 0.4 0.6 0.8 1 Recall Top k% Rhino: h = 0 0 0.1 0.2 0.3 0.4 0.5 0.6 0 0.2 0.4 0.6 0.8 1 Recall Top k% Rhino: h = 1 0 0.1 0.2 0.3 0.4 0.5 0.6 0 0.2 0.4 0.6 0.8 1 Recall Top k% Rhino: h = 10 Figure 4: Recall of defective code positions within the 1% highest scored statements for AspectJ (top) and Rhino (bottom), for windows of h = 0, h = 1, and h = 10 code lines. code positions, spread across 70 files and 650 procedures. We randomly selected 100 of the 1500 valid traces for each revision as training data. Both data sets are available at http://www.mpi-inf.mpg.de/~dietz/debugging.html. Evaluation criterion. Following the evaluation in [1], we evaluate how well the models are able to guide the user into the vicinity of a defective code position. The models return a ranked list of code positions. Envisioning that the developer can navigate from the ranking into the source code to inspect a code line within its context, we evaluate the rank k at which a line of code occurs that lies within a window of ±h lines of code of a defective line. We plot relative ranks; that is, absolute ranks divided by the number of covered code lines, corresponding to the fraction of code that the developer has to walk through in order to find the defect. We examine the recall@k%, that is the fraction of successfully localized defects over the fraction of code the user has to inspect. We expect a typical developer to inspect the top 0.25% of the ranking, corresponding to approximately 25 ranks for AspectJ. Neither the AUC nor the Normalized Discounted Cummulative Gain (NDCG) appropriately measure performance in our application. AUC does not allow for a cut-off rank; NDCG will inappropriately reward cases in which many statements in a defect’s vicinity are ranked highly. Reference methods. In order to study the helpfulness of each generative model, we evaluate smoothed models with maximum length N = 5 for each the multinomial, Bernoulli fragment and Bernoulli graph model. We compare those to the unigram multinomial model and Tarantula. Tuning and prediction of reference methods follow in accordance to Section 2. In addition, we compare to the latent variable model Delta LDA with nine usage and one bug topics, α = 0.5, β = 0.1, and 50 sampling iterations. Results. The results are presented in Figure 4. The Bernoulli graph model is always ahead of the reference methods that have a closed form solution in the top 0.25% and top 0.5% of the ranking. This improvement is significant with level 0.05 in comparison to Tarantula for h = 1 and h = 10. It is significantly better than the n-gram multinomial model for h = 1. Although increasing h makes the prediction problem generally easier, only Bernoulli graph and the multinomial n-gram model play to their strength. A comparison by Area under the Curve in top 0.25% and top 0.5% indicates that the Bernoulli graph is more than twice as effective as Tarantula for the data sets for h = 1 and h = 10. Using the 7 Bernoulli graph model, a developer finds nearly every second bug in the top 1% in both data sets, where ranking a failing trace takes between 10 and 20 seconds. According to a pair-t-test with 0.05-level, Bernoulli graph’s prediction performance is significantly better than Delta LDA for the Rhino data set. No significant diffference is found for the AspectJ data set, but Delta LDA takes much longer to compute (approx. one hour versus 20 seconds) since parameters can not be obtained in closed form but require iterative sampling. Analysis. Most revisions in our data sets had bugs that were equally difficult for most of the models. From revisions where one model drastically outperformed the others we identified different categories of suspicious code areas. In some cases, the defective procedures were executed in very few or no passing trace; we refer such code as being insufficiently covered. Another category refers to defective code lines in the vicinity of branching points such as if-statements. If code before the branch point is executed in many passing traces, but code in one of the branches only rarely, we call this a suspicious branch point. The Bernoulli fragment model treats both kinds of suspicious code areas in a similar way. They have a different effect on the predictive Beta-posteriors in the Bernoulli graph model: insufficient coverage decreases the confidence; suspicious branch points will decrease the mean. The Betapriors αψ and βψ play a crucial role in weighting these two types of potential bugs in the ranking and encode prior beliefs on expecting one or the other. Our hyperparameter estimation procedure usually selects αψ = 1.25 and βψ = 1.03 for all context lengths. Revisions in which Bernoulli fragment outperformed Bernoulli graph contained defects in insufficiently covered areas. Presumably, Bernoulli graph identified many suspicious branching points, and assigned them a higher score. Revisions in which Bernoulli graph outperformed Bernoulli fragment contained bugs at suspicious branching points. In contrast to the Bernoulli-style models, the multinomial models take the number of occurrences of a code position within a trace into account. Presumably, multiple occurrences of code lines within a trace do not indicate their defectiveness. 5 Conclusions We introduced the Bernoulli graph model, a generative model that implements a distribution over program executions. The Bernoulli graph model generates n-gram execution graphs. Compared to execution traces, execution graphs abstract from the number of iterations that sequences of code positions have been executed for. The model allows for Bayesian inference of the likelihood of transitional patterns in a new trace, given execution traces of passing test cases. We evaluated the model and several less complex reference methods with respect to their ability to localize defects that occurred in the development history of AspectJ and Rhino. Our evaluation does not rely on artificially injected defects. We find that the Bernoulli graph model outperforms Delta LDA on Rhino and performs as good as Delta LDA on the AspectJ project, but in substantially less time. Delta LDA is based on a multinomial unigram model, which performs worst in our study. This gives raise to the conjecture that Delta LDA might benefit from replacing the multinomial model with a Bernoulli graph model. this conjecture would need to be studied empirically. The Bernoulli graph model outperforms the reference models with closed-form solution with respect to giving a high rank to code positions that lie in close vicinity of the actual defect. In order to find every second defect in the release history of Rhino, the Bernoulli graph model walks the developer through approximately 0.5% of the code positions and 1% in the AspectJ project. Acknowledgements Laura Dietz is supported by a scholarship of Microsoft Research Cambridge. Andreas Zeller and Tobias Scheffer are supported by a Jazz Faculty Grant. 8 References [1] James A. Jones and Mary J. Harrold. Empirical evaluation of the tarantula automatic faultlocalization technique. In Proceedings of the International Conference on Automated Software Engineering, 2005. [2] Ben Liblit, Mayur Naik, Alice X. Zheng, Alex Aiken, and Michael I. Jordan. Scalable statistical bug isolation. In Proceedings of the Conference on Programming Language Design and Implementation, 2005. [3] Trishul Chilimbi, Ben Liblit, Krishna Mehra, Aditya Nori, and Kapil Vaswani. Holmes: Effective statistical debugging via efficient path profiling. In Proceedings of the International Conference on Software Engineering, 2009. [4] David Andrzejewski, Anne Mulhern, Ben Liblit, and Xiaojin Zhu. Statistical debugging using latent topic models. In Proceedings of the European Conference on Machine Learning, 2007. [5] David M. Blei, Andrew Y. Ng, and Michael I. Jordan. Latent Dirichlet allocation. Journal of Machine Learning Research, 3:993–1022, 2003. [6] Tom Minka and John Winn. Gates. In Advances in Neural Information Processing Systems, 2008. [7] Hal Daume III. Hbc: Hierarchical Bayes Compiler. http://hal3.name/HBC, 2007. [8] Andrew McCallum and Kamal Nigam. A comparison of event models for Naive Bayes text classification. In Proceedings of the AAAI Workshop on Learning for Text Categorization, 1998. [9] Hyunsook Do, Sebastian Elbaum, and Gregg Rothermel. Supporting controlled experimentation with testing techniques: An infrastructure and its potential impact. Empirical Software Engineering, 10(4):405–435, October 2005. [10] Lionel C. Briand. A critical analysis of empirical research in software testing. In Proceedings of the Symposium on Empirical Software Engineering and Measurement, 2007. [11] Ben Liblit, Mayur Naik, Alice X. Zheng, Alex Aiken, and Michael I. Jordan. Public deployment of cooperative bug isolation. In Proceedings of the Workshop on Remote Analysis and Measurement of Software Systems, 2004. [12] Valentin Dallmeier and Thomas Zimmermann. Extraction of bug localization benchmarks from history. In Proceedings of the International Conference on Automated Software Engineering, 2007. 9
2009
248
3,757
Human Rademacher Complexity Xiaojin Zhu1, Timothy T. Rogers2, Bryan R. Gibson1 Department of {1Computer Sciences, 2Psychology} University of Wisconsin-Madison. Madison, WI 15213 jerryzhu@cs.wisc.edu, ttrogers@wisc.edu, bgibson@cs.wisc.edu Abstract We propose to use Rademacher complexity, originally developed in computational learning theory, as a measure of human learning capacity. Rademacher complexity measures a learner’s ability to fit random labels, and can be used to bound the learner’s true error based on the observed training sample error. We first review the definition of Rademacher complexity and its generalization bound. We then describe a “learning the noise” procedure to experimentally measure human Rademacher complexities. The results from empirical studies showed that: (i) human Rademacher complexity can be successfully measured, (ii) the complexity depends on the domain and training sample size in intuitive ways, (iii) human learning respects the generalization bounds, (iv) the bounds can be useful in predicting the danger of overfitting in human learning. Finally, we discuss the potential applications of human Rademacher complexity in cognitive science. 1 Introduction Many problems in cognitive psychology arise from questions of capacity. How much information can human beings hold in mind and deploy in simple memory tasks [19, 15, 6]? What kinds of functions can humans easily acquire when learning to classify items [29, 7], and do they have biases for learning some functions over others[10]? Is there a single domain-general answer to these questions, or is the answer domain-specific [28]? How do human beings avoid over-fitting learning examples when acquiring knowledge that allows them to generalize [20]? Such questions are central to a variety of research in cognitive psychology, but only recently have they begun to be placed on a formal mathematical footing [7, 9, 5]. Machine learning offers a variety of formal approaches to measuring the capacity of a learning system, with concepts such as Vapnik-Chervonenkis (VC) dimension [27, 25, 12] and Rademacher complexity [1, 13, 24]. Based on these notions of capacity, one can quantify the generalization performance of a classifier, and the danger of over-fitting, by bounding its future test error using its observed training sample error. In this paper, we show how one such concept–Rademacher complexity–can be measured in humans, based on their performance in a “learning the noise” procedure. We chose Rademacher complexity (rather than the better-known VC dimension) because it is particularly amenable to experimental studies, as discussed in Section 5. We assess whether human capacity varies depending on the nature of the materials to be categorized, and empirically test whether human generalization behavior respects the error bounds in a variety of categorization tasks. The results validate Rademacher complexity as a meaningful measure of human learning capacity, and provide a new perspective on the human tendency to overfit training data in category learning tasks. We note that our aim is not to develop a new formal approach to complexity, but rather to show how a well-studied formal measure can be computed for human beings. 1 2 Rademacher Complexity Background and definitions. Let X be a domain of interest, which in psychology corresponds to a stimulus space. For example, X could be an infinite set of images parametrized by some continuous parameters, a finite set of words, etc.. We will use x ∈X to denote an instance (e.g., an image or a word) from the domain; precisely how x is represented is immaterial. We assume there is an underlying marginal distribution PX on X, such that x is sampled with probability PX(x) during training and testing. For example, PX can be uniform on the set of words. Let f : X 7→R be a real-valued function. This corresponds to a hypothesis that predicts the label of any instance in the domain. The label can be a continuous value for regression, or {−1, 1} for binary classification. Let F be the set of such functions, or the hypothesis space, that we consider. For example, in machine learning F may be the set of linear classifiers. In the present work, we will take F to be the (possibly infinite) set of hypotheses from X to binary classes {−1, 1} that humans can come up with. Rademacher complexity (see for example [1]) measures the capacity of the hypothesis space F by how easy it is for F to fit random noise. Consider a sample of n instances: x1, . . . , xn drawn i.i.d. from PX. Now generate n random numbers σ1, . . . , σn, each taking value -1 or 1 with equal probability. For a given function f ∈F, its fit to the random numbers is defined as |Pn i=1 σif(xi)|. This is easier to understand when f produces -1, 1 binary labels. In this case, the σ’s can be thought of as random labels, and {(xi, σi)}n i=1 as a training sample. The fit measures how f’s predictions match the random labels on the training sample: if f perfectly predicts the σ’s, or completely the opposite by flipping the classes, then the fit is maximized at n; if f’s predictions are orthogonal to the σ’s, the fit is minimized at 0. The fit of a set of functions F is defined as supf∈F |Pn i=1 σif(xi)|. That is, we are fitting the particular training sample by finding the hypothesis in F with the best fit. If F is rich, it will be easier to find a hypothesis f ∈F that matches the random labels, and its fit will be large. On the other hand, if F is simple (e.g., in the extreme containing only one function f), it is unlikely that f(xi) will match σi, and its fit will be close to zero. Finally, recall that {(xi, σi)}n i=1 is a particular random training sample. If, for every random training sample of size n, there always exists some f ∈F (which may be different each time) that matches it, then F is very good at fitting random noise. This also means that F is prone to overfitting, whose very definition is to learn noise. This is captured by taking the expectation over training samples: Definition 1 (Rademacher Complexity). For a set of real-valued functions F with domain X, a distribution PX on X, and a size n, the Rademacher complexity R(F, X, PX, n) is R(F, X, PX, n) = Exσ " sup f∈F 2 n n X i=1 σif(xi) # , (1) where the expectation is over x = x1, . . . , xn iid ∼PX, and σ = σ1, . . . , σn iid ∼Bernoulli( 1 2, 1 2) with values ±1. Rademacher complexity depends on the hypothesis space F, the domain X, the distribution on the domain PX, as well as the training sample size n. The size n is relevant because for a fixed F, it will be increasingly difficult to fit random noise as n gets larger. On the other hand, it is worth noting that Rademacher complexity is independent of any future classification tasks. For example, in Section 4 we will discuss two different tasks on the same X (set of words): classifying a word by its emotional valence, or by its length. These two tasks will share the same Rademacher complexity. In general, the value of Rademacher complexity will depend on the range of F. In the special case when F is a set of functions mapping x to {−1, 1}, R(F, X, PX, n) is between 0 and 2. A particularly important property of Rademacher complexity is that it can be estimated from random samples. Let {(x(1) i , σ(1) i )}n i=1, . . . , {(x(m) i , σ(m) i )}n i=1 be m random samples of size n each. In Section 3, these will correspond to m different subjects. The following theorem is an extension of Theorem 11 in [1]. The proof follows from McDiarmid’s inequality [16]. 2 Theorem 1. Let F be a set of functions mapping to [−1, 1]. For any integers n, m, P    R(F, X, PX, n) −1 m m X j=1 sup f∈F 2 n n X i=1 σ(j) i f(x(j) i ) ≥ϵ   ≤2 exp  −ϵ2nm 8  (2) Theorem 1 allows us to estimate the expectation in (1) with random samples, which is of practical importance. It remains to compute the supremum in (1). In Section 3, we will discuss our procedure to approximate the supremum in the case of human learning. Generalization Error Bound. We state a generalization error bound by Bartlett and Mendelson (Theorem 5 in [1]) as an important application of Rademacher complexity. Consider any binary classification task of predicting a label in Y = {−1, 1} for x ∈X. For example, the label y could be the emotional valence (positive=1 vs. negative=-1) of a word x. In general, a binary classification task is characterized by a joint distribution PXY on X × {−1, 1}. Training data and future test data consist of instance-label pairs (x, y) iid ∼PXY . Let F be a set of binary classifiers that map X to {−1, 1}. For f ∈F, let (y ̸= f(x)) be an indicator function which is 1 if y ̸= f(x), and 0 otherwise. On a training sample {(xi, yi)}n i=1 of size n, the observed training sample error of f is ˆe(f) = 1 n Pn i=1(yi ̸= f(xi)). The more interesting quantity is the true error of f, i.e., how well f can generalize to future test data: e(f) = E(x,y) iid ∼PXY [(y ̸= f(x))]. Rademacher complexity allows us to bound the true error using training sample error as follows. Theorem 2. (Bartlett and Mendelson) Let F be a set of functions mapping X to {−1, 1}. Let PXY be a probability distribution on X × {−1, 1} with marginal distribution PX on X. Let {(xi, yi)}n i=1 iid ∼PXY be a training sample of size n. For any δ > 0, with probability at least 1 −δ, every function f ∈F satisfies e(f) −ˆe(f) ≤R(F, X, PX, n) 2 + r ln(1/δ) 2n . (3) The probability 1 −δ is over random draws of the training sample. That is, if one draws a large number of training samples of size n each, then (3) is expected to hold on 1 −δ fraction of those samples. The bound has two factors, one from the Rademacher complexity and the other from the confidence parameter δ and training sample size n. When the bound is tight, training sample error is a good indicator of true error, and we can be confident that overfitting is unlikely. A tight bound requires the Rademacher complexity to be close to zero. On the other hand, if the Rademacher complexity is large, or n is too small, or the requested confidence 1−δ is overly stringent, the bound can be loose. In that case, there is a danger of overfitting. We will demonstrate this generalization error bound on four different human classification tasks in Section 4. 3 Measuring Human Rademacher Complexity by Learning the Noise Our aim is to measure the Rademacher complexity of the human learning system for a given stimulus space X, distribution of instances PX, and sample-size n. By “human learning system,” we mean the set of binary classification functions that an average human subject can come up with on the domain X, under the experiment conditions described below. We will denote this set of functions F with Ha, that is, “average human.” We make two assumptions. The first is the assumption of universality [2]: every individual has the same Ha. It allows us to pool subjects together. This assumption can be loosened in the future. For instance, F could be defined as the set of functions that a particular individual or group can employ in the learning task, such as a given age-group, education level, or other special population. A second assumption is required to compute the supremum on Ha. Obviously, we cannot measure and compare the performance of every single function contained in Ha. Instead, we assume that, when making their classification judgments, participants use the best function at their disposal–so that the errors they make when tested on the training instances reflect the error generated by the best-performing function in Ha, thus providing a direct measure of the supremum. In essence, the assumption is that participants are doing their best to perform the task. 3 With the two assumptions above, we can compute human Rademacher complexity for a given stimulus domain X, distribution PX, and sample size n, by assessing how well human participants are able to learn randomly-assigned labels. Each participant is presented with a training sample {(xi, σi)}n i=1 where the σ’s are random ±1 labels, and asked to learn the instance-label mapping. The subject is not told that the labels are random. We assume that the subject will search within Ha for the best hypothesis (“rule”), which is the one that minimizes training error: f ∗= argmaxf∈Ha Pn i=1 σif(xi) = argminf∈Haˆe(f). We do not directly observe f ∗. Later, we ask the subject to classify the same training instances {xi}n i=1 using what she has learned. Her classification labels will be f ∗(x1), . . . , f ∗(xn), which we do observe. We then approximate the supremum as follows: supf∈Ha 2 n Pn i=1 σif(xi) ≈ 2 n Pn i=1 σif ∗(xi) . For the measured Rademacher complexity to reflect actual learning capacity on the set Ha, it is important to prevent participants from simply doing rote learning. With these considerations, we propose the following procedure to estimate human Rademacher complexity. Procedure. Given domain X, distribution PX, training sample size n, and number of subjects m, we generate m random samples of size n each: {(x(1) i , σ(1) i )}n i=1, . . . , {(x(m) i , σ(m) i )}n i=1, where x(j) i iid ∼PX and σ(j) i iid ∼Bernoulli( 1 2, 1 2) with value ±1, for j = 1 . . . m. The procedure is paperand-pencil based, and consists of three steps: Step 1. Participant j is shown a printed sheet with the training sample {(x(j) i , σ(j) i )}n i=1, where each instance x(j) i is paired with its random label σ(j) i (shown as “A” and “B” instead of -1,1 for convenience). the participant is informed that there are only two categories; the order does not matter; they have three minutes to study the sheet; and later they will be asked to use what they have learned to categorize more instances into “A” or “B”. Step 2. After three minutes the sheet is taken away. To prevent active maintenance of training items in working memory the participant performs a filler task consisting of ten two-digit addition/subtraction questions. Step 3. The participant is given another sheet with the same training instances {x(j) i }n i=1 but no labels. The order of the n instances is randomized and different from step 1. The participant is not told that they are the same training instances, and is asked to categorize each instance as “A” or “B” and is encouraged to guess if necessary. There is no time limit. Let f (j)(x(j) 1 ), . . . , f (j)(x(j) n ) be subject j’s answers (encoded as ±1). We estimate R(Ha, X, PX, n) by 1 m Pm j=1 2 n Pn i=1 σ(j) i f (j)(x(j) i ) . We also conduct a post-experiment interview where the subject reports any insights or hypotheses they may have on the categories. Materials To instantiate the general procedure, one needs to specify the domain X and an associated marginal distribution PX. For simplicity, in all our experiments PX is the uniform distribution over the corresponding domain. We conducted experiments on example domains. They are not of specific interest in themselves but nicely illustrate many interesting properties of human Rademacher complexity: (1) The “Shape” Domain. X consists of 321 computer-generated 3D shapes [3]. The shapes are parametrized by a real number x ∈[0, 1], such that small x produces spiky shapes, while large x produces smooth ones. A few instances and their parameters are shown in Figure 1(a). It is important to note that this internal structure is unnecessary to the definition or measurement of Rademacher complexity per se. However, in Section 4 we will define some classification tasks that utilize this internal structure. Participants have little existing knowledge about this domain. (2) The “Word” Domain. X consists of 321 English words. We start with the Wisconsin Perceptual Attribute Ratings Database [18], which contains words rated by 350 undergraduates for their emotional valence. We sort the words by their emotion valence, and take the 161 most positive and the 160 most negative ones for use in the study. A few instances and their emotion ratings are shown in Figure 1(b). Participants have rich knowledge about this domain. The size of the domain for shapes and words was matched to facilitate comparison. Participants were 80 undergraduate students, participating for partial course credit. They were divided evenly into eight groups. Each group of m = 10 subjects worked on a unique combination of the Shape or the Word domain, and training sample size n in 5, 10, 20, or 40, using the procedure defined previously. 4 0 1/4 1/2 3/4 1 rape killer funeral · · · fun laughter joy -5.60 -5.55 -5.47 · · · 4.91 4.95 5.19 (a) examples from the Shape domain (b) examples from the Word domain 0 10 20 30 40 0 0.5 1 1.5 2 n Rademacher complexity 0 10 20 30 40 0 0.5 1 1.5 2 n Rademacher complexity (c) R(Ha, Shape, uniform, n) (d) R(Ha, Word, uniform, n) Figure 1: Human Rademacher complexity on the “Shape” and “Word” domains. Results. Figures 1(c,d) show the measured human Rademacher complexities on the domains X=Shape and Word respectively, with distribution PX=uniform, and with different training sample sizes n. The error bars are 95% confidence intervals. Several interesting observations can be made from the data: Observation 1: human Rademacher complexities in both domains decrease as n increases. This is anticipated, as it should be harder to learn a larger number of random labels. Indeed, when n = 5, our interviews show that, in both domains, 9 out of 10 participants offered some spurious rules of the random labels. For example, one subject thought the shape categories were determined by whether the shape “faces” downward; another thought the word categories indicated whether the word contains the letter T. Such beliefs, though helpful in learning the particular training samples, amount to over-fitting the noise. In contrast, when n = 40, about half the participants indicated that they believed the labels to be random, as spurious “rules” are more difficult to find. Observation 2: human Rademacher complexities are significantly higher in the Word domain than in the Shape domain, for n = 10, 20, 40 respectively (t-tests, p < 0.05). The higher complexity indicates that, for the same sample sizes, participants are better able to find spurious explanations of the training data for the Words than for the Shapes. Two distinct strategies were apparent in the Word domain interviews: (i) Some participants created mnemonics. For example, one subject received the training sample (grenade, B), (skull, A), (conflict, A), (meadow, B), (queen, B), and came up with the following story: “a queen was sitting in a meadow and then a grenade was thrown (B = before), then this started a conflict ending in bodies & skulls (A = after).” (ii) Other participants came up with idiosyncratic, but often imperfect, rules. For instance, whether the item “tastes good,” “relates to motel service,” or “physical vs. abstract.” We speculate that human Rademacher complexities on other domains can be drastically different too, reflecting the richness of the participant’s pre-existing knowledge about the domain. Observation 3: many of these human Rademacher complexities are relatively large. This means that under those X, PX, n, humans have a large capacity to learn arbitrary labels, and so will be more prone to overfit on real (i.e., non-random) tasks. We will present human generalization experiments in Section 4. It is also interesting to note that both Rademacher complexities at n = 5 are less than 2: under our procedure, participants are not perfect at remembering the labels of merely five instances. 4 Bounding Human Generalization Errors We reiterate the interpretation of human Rademacher complexity for psychology. It does not predict ˆe (how well humans perform when training for a given task). Instead, Theorem 2 bounds e −ˆe, the “amount of overfitting” (sometimes also called “instability”) when the subject switches from training to testing. A tight (close to 0) bound guarantees no severe overfitting: humans’ future 5 Table 1: Human learning performance abides by the generalization error bounds. condition ID ˆe bound e e Shape-+ 81 0.00 1.35 0.05 n=5 82 0.00 1.35 0.22 83 0.00 1.35 0.10 84 0.00 1.35 0.09 85 0.00 1.35 0.07 Shape-+ 86 0.05 0.39 0.04 n=40 87 0.03 0.36 0.14 88 0.03 0.36 0.03 89 0.00 0.34 0.04 90 0.00 0.34 0.01 Shape-+91 0.00 1.35 0.23 n=5 92 0.00 1.35 0.27 93 0.00 1.35 0.21 94 0.00 1.35 0.40 95 0.20 1.55 0.18 Shape-+96 0.12 0.46 0.16 n=40 97 0.32 0.66 0.50 98 0.15 0.49 0.08 99 0.15 0.49 0.11 100 0.03 0.36 0.10 condition ID ˆe bound e e WordEmotion 101 0.00 1.43 0.58 n=5 102 0.00 1.43 0.46 103 0.00 1.43 0.04 104 0.00 1.43 0.03 105 0.00 1.43 0.31 WordEmotion 106 0.70 1.23 0.65 n=40 107 0.00 0.53 0.04 108 0.00 0.53 0.00 109 0.62 1.15 0.53 110 0.00 0.53 0.05 WordLength 111 0.00 1.43 0.46 n=5 112 0.00 1.43 0.69 113 0.00 1.43 0.55 114 0.00 1.43 0.26 115 0.00 1.43 0.57 WordLength 116 0.12 0.65 0.51 n=40 117 0.45 0.98 0.55 118 0.00 0.53 0.00 119 0.15 0.68 0.29 120 0.15 0.68 0.37 test performance e will be close to their training performance ˆe. This does not mean they will do well: ˆe could be large and thus e is similarly large. A loose bound, in contrast, is a warning sign for overfitting: good training performance (small ˆe) may not reflect learning of the correct categorization rule, and so does not entail good performance on future samples (i.e., e can be much larger than ˆe). We now present four non-random category-learning tasks to illustrate these points. Materials. We consider four very different binary classification tasks to assess whether Theorem 2 holds for all of them. The tasks are: (1) Shape-+: Recall the Shape domain is parametrized by x ∈[0, 1]. The task has a linear decision boundary at x = 0.5, i.e., P(y = 1|x) = 0 if x < 0.5, and 1 if x ≥0.5. It is well-known that people can easily learn such boundaries, so this is a fairly easy task on the domain. (2) Shape-+-: This task is also on the Shape domain, but with a nonlinear decision boundary. The negative class is on both ends while the positive class is in the middle: P(y = 1|x) = 0 if x ∈[0, 0.25) ∪(0.75, 1], and 1 if x ∈[0.25, 0.75]. Prior research suggests that people have difficulty learning nonlinearly separable categories [28, 7], so this is a harder task. Note, however, that the two shape tasks share the same Rademacher complexity, and therefore have the same bound for the same n. (3) WordEmotion: This task is on the Word domain. P(y = 1|x) = 0 if word x has a negative emotion rating in the Wisconsin Perceptual Attribute Ratings Database, and P(y = 1|x) = 1 otherwise. (4) WordLength: P(y = 1|x) = 0 if word x has 5 or less letters, and P(y = 1|x) = 1 otherwise. The two word tasks are drastically different in that one focuses on semantics and the other on orthography, but they share the same Rademacher complexity and thus the same bound (for the same n), because the underlying domain is the same. Procedure. The procedure is identical to that in Section 3 except for two things: (i) Instead of random labels σ, we sample labels y iid ∼P(y|x) appropriate for each task. (ii) In step 3, in addition to the training instances {x(j) i }n i=1, the jth subject is also given 100 test instances {x(j) i }n+100 i=n+1, sampled from PX. The order of the training and test instances is randomized. The true test labels y are sampled from P(y|x). We compute the participant’s training sample error as ˆe(f (j)) = 1/n Pn i=1  yi ̸= f (j)(x(j) i )  , and estimate her generalization error as e(f (j)) = 1/100 Pn+100 i=n+1  yi ̸= f (j)(x(j) i )  . Participants were 40 additional students, randomly divided into 8 groups of five each. Each group worked on one of the four tasks, with training sample size n=5 or 40. Results. We present the performance of individual participants in Table 1: ˆe is the observed training error for that subject, “bound e” is the 95% confidence (i.e., δ = 0.05) bound on test error: 6 0 0.5 1 1.5 2 0 0.5 1 1.5 Rademacher complexity e − e ^ Shape,40 Word,40 Shape,5 Word,5 bound observed Figure 2: Human Rademacher complexity predicts the trend of overfitting. ˆe(f) + R(F, X, PX, n)/2 + p ln(1/δ)/2n, and e is the observed test error. We also present the aggregated results across subjects and tasks in Figure 2, comparing the bound on e−ˆe (the “amount of overfitting,” RHS of (3)) vs. the observed e−ˆe, as the underlying Rademacher complexity varies. We make two more observations: Observation 4: Theorem 2 holds for every participant. Table 1 provides empirical support that our application of computational learning theory to human learning is viable. In fact, for our choice of δ = 0.05, Theorem 2 allows the bound to fail on about two (5% of 40) participants – which did not happen. Of course, some of the “bound e” are vacuous (greater than 1) as it is well-known that bounds in computational learning theory are not always tight [14], but others are reasonably tight (e.g., on Shape-+ with n = 40). Observation 5: the larger the Rademacher complexity, the worse the actual amount of overfitting e −ˆe. Figure 2 shows that as R increases, e −ˆe increases (solid line; error bar ±standard error; averaged over the two different tasks with the same domain and n, as noted in the graph). The bound on e −ˆe (dotted line; RHS of (3)) has the same trend, although, being loose, it is higher up. This seems to be true regardless of the classification task. For example, the Word domain and n = 5 has a large Rademacher complexity 1.76, and both task WordLength and task WordEmotion severely overfit: In task WordLength with n = 5, all subjects had zero training error but had large test error, suggesting that their good performance on the training items reflects overfitting. Accordingly, the explanations offered during the post-test interviews for this group spuriously fit the training items but did not reflect the true categorization rule. Subject 111 thought that the class decision indicated “things you can go inside,” while subject 114 thought the class indicated an odd or even number of syllables. Similarly, on task WordEmotion with n = 5, three out of five subjects overfit the training items. Subject 102 received the training items (daylight, 1), (hospital, -1), (termite, -1), (envy, -1), (scream, -1), and concluded that class 1 is “anything related to omitting[sic] light,” and proceeded to classify the test items as such. 5 Discussions and Future Work Is our study on memory or learning? This distinction is not necessarily relevant here, as we adopt an abstract perspective which analyzes the human system as a black box that produces labels, and both learning and memory contribute to the process being executed in that black box. We do have evidence from post-interviews that Figure 1 does not merely reflect list-length effects from memory studies: (i) participants treated the study as a category-learning and not a memory task – they were not told that the training and test items are the same when we estimate R; (ii) the memory load was identical in the shape and the word domains, yet the curves differ markedly; (iii) participants were able to articulate the “rules” they were using to categorize the items. Much recent research has explored the relationship between the statistical complexity of some categorization task and the ease with which humans learn the task [7, 5, 9, 11]. Rademacher complexity is different: it indexes not the complexity of the X 7→Y categorization task, but the sophistication of the learner in domain X (note Y does not appear in Rademacher complexity). Greater complexity indicates, not a more difficult categorization task, but a greater tendency to overfit sparse data. 7 On the other hand, our definition of Rademacher complexity depends only on the domain, distribution, and sample size. In human learning, other factors also contribute to learnability, such as the instructions, motivation, time to study, and should probably be incorporated into the complexity. Human Rademacher complexity has interesting connections to other concepts. The VCdimension [27, 25, 12] is another capacity measure. Let {x1, . . . , xm} ⊆X be a subset of the domain. Let (f(x1), . . . , f(xm)) be a ±1-valued vector which is the classifications made by some f ∈F. If F is rich enough such that its members can produce all 2m vectors: {(f(x1), . . . , f(xm)) : f ∈F} = {−1, 1}m, then we say that the subset is shattered by F. The VC-dimension of F is the size of the largest subset that can be shattered by F, or ∞if F can shatter arbitrarily large subsets. Unfortunately, human VC-dimension seems difficult to measure experimentally: First, shattering requires validating an exponential (2m) number of classifications on a given subset. Second, to determine that the VC-dimension is m, one needs to show that no subset of size m + 1 can be shattered. However, the number of such subsets can be infinite. A variant, “effective VC-dimension”, may be empirically estimated from a training sample [26]. This is left for future research. Normalized Maximum Likelihood (NML) uses a similar complexity measure for a model class [21], the connection merits further study ([23], p.50). Human Rademacher complexity might help to advance theories of human cognition in many ways. First, human Rademacher complexity can provide a means of testing computational models of human concept learning. Traditionally, such models are assessed by comparing their performance to human performance in terms of classification error. A new approach would be to derive or empirically estimate the Rademacher complexity of the computational models, and compare that to human Rademacher complexity. A good computational model should match humans in this regard. Second, our procedure could be used to measure human Rademacher complexity in individuals or special populations, including typically and atypically-developing children and adults. Relating individual Rademacher complexity to standard measures of learning ability or IQ may shed light on the relationship between complexity, learning, and intelligence. Many IQ tests measure the participant’s ability to generalize the pattern in words or images. Individuals with very high Rademacher complexity may actually perform worse by being “distracted” by other potential hypotheses. Third, human Rademacher complexity may help explain the human tendency to discern patterns in random stimuli, such as the well-known Rorschach inkblot test, “illusory correlations” [4], or “falsememory” effect [22]. These effects may be viewed as spurious rule-fitting to (or generalization of) the observed data, and Human Rademacher complexity may quantify the possibility of observing such an effect. Fourth, cognitive psychologists have long entertained an interest in characterizing the capacity of different mental processes such as, for instance, the capacity limitations of short-term memory [19, 6]. In this vein, our work suggests a different kind of metric for assessing the capacity of the human learning system. Finally, human Rademacher complexity can help experimental psychologists to determine the propensity of overfitting in their stimulus materials. We have seen that human Rademacher complexity can be much higher in some domains (e.g. Word) than others (e.g. Shape). Our procedure could be used to measure the human Rademacher complexity of many standard concept-learning materials in cognitive science, such as the Greebles used by Tarr and colleagues [8] and the circle-and-line stimuli of McKinley & Nosofsky [17]. Acknowledgment: We thank the reviewers for their helpful comments. XZ thanks Michael Coen for discussions that lead to the realization of the difficulties in measuring human VC dimension. This work is supported in part by AFOSR grant FA9550-09-1-0313 and the Wisconsin Alumni Research Foundation. References [1] P. L. Bartlett and S. Mendelson. Rademacher and Gaussian complexities: risk bounds and structural results. Journal of Machine Learning Research, 3:463–482, 2002. [2] A. Caramazza and M. McCloskey. The case for single-patient studies. Cognitive Neuropsychology, 5(5):517–527, 1988. [3] R. Castro, C. Kalish, R. Nowak, R. Qian, T. Rogers, and X. Zhu. Human active learning. In Advances in Neural Information Processing Systems (NIPS) 22. 2008. 8 [4] L. J. Chapman. Illusory correlation in observational report. Journal of Verbal Learning and Verbal Behavior, 6:151–155, 1967. [5] N. Chater and P. Vitanyi. Simplicity: A unifying principle in cognitive science? Trends in Cognitive Science, 7(1):19–22, 2003. [6] N. Cowan. The magical number 4 in short-term memory: A reconsideration of mental storage capacity. Behavioral and Brain Sciences, 24:87–185, 2000. [7] J. Feldman. Minimization of boolean complexity in human concept learning. Nature, 407:630–633, 2000. [8] I. Gauthier and M. Tarr. Becoming a ”greeble” expert: Exploring mechanisms for face recognition. Vision Research, 37(12):1673–1682, 1998. [9] N. Goodman, J. B. Tenenbaum, J. Feldman, and T. L. Griffiths. A rational analysis of rule-based concept learning. Cognitive Science, 32(1):108–133, 2008. [10] T. L. Griffiths, B. R. Christian, and M. L. Kalish. Using category structures to test iterated learning as a method for identifying inductive biases. Cognitive Science, 32:68–107, 2008. [11] T. L. Griffiths and J. B. Tenenbaum. From mere coincidences to meaningful discoveries. Cognition, 103(2):180–226, 2007. [12] M. J. Kearns and U. V. Vazirani. An Introduction to Computational Learning Theory. MIT Press, 1994. [13] V. I. Koltchinskii and D. Panchenko. Rademacher processes and bounding the risk of function learning. In E. Gine, D. Mason, and J. Wellner, editors, High Dimensional Probability II, pages 443–459. MIT Press, 2000. [14] J. Langford. Tutorial on practical prediction theory for classification. Journal of Machine Learning Research, 6:273–306, 2005. [15] R. L. Lewis. Interference in short-term memory: The magical number two (or three) in sentence processing. Journal of Psycholinguistic Research, 25(1):93–115, 1996. [16] C. McDiarmid. On the method of bounded differences. In Surveys in Combinatorics 1989, pages 148– 188. Cambridge University Press, 1989. [17] S. C. McKinley and R. M. Nosofsky. Selective attention and the formation of linear decision boundaries. Journal of Experimental Psychology: Human Perception & Performance, 22(2):294–317, 1996. [18] D. Medler, A. Arnoldussen, J. Binder, and M. Seidenberg. The Wisconsin perceptual attribute ratings database, 2005. http://www.neuro.mcw.edu/ratings/. [19] G. Miller. The magical number seven plus or minus two: Some limits on our capacity for processing information. Psychological Review, 63(2):81–97, 1956. [20] R. C. O’Reilly and J. L. McClelland. Hippocampal conjunctive encoding, storage, and recall: Avoiding a tradeoff. Hippocampus, 4:661–682, 1994. [21] J. Rissanen. Strong optimality of the normalized ML models as universal codes and information in data. IEEE Transaction on Information Theory, 47(5):17121717, 2001. [22] H. L. Roediger and K. B. McDermott. Creating false memories: Remembering words not presented in lists. Journal of Experimental Psychology: Learning, Memory and Cognition, 21(4):803–814, 1995. [23] T. Roos. Statistical and Information-Theoretic Methods for Data Analysis. PhD thesis, Department of Computer Science, University of Helsinki, 2007. [24] J. Shawe-Taylor and N. Cristianini. Kernel Methods for Pattern Analysis. Cambridge University Press, New York, NY, USA, 2004. [25] V. Vapnik. Statistical Learning Theory. Wiley-Interscience, 1998. [26] V. Vapnik, E. Levin, and Y. Le Cun. Measuring the VC-dimension of a learning machine. Neural Computation, 6:851–876, 1994. [27] V. N. Vapnik and A. Y. Chervonenkis. On the uniform convergence of relative frequencies of events to their probabilities. Theory of Probability and its Applications, 16(2):264–280, 1971. [28] W. D. Wattenmaker. Knowledge structures and linear separability: Integrating information in object and social categorization. Cognitive Psychology, 28(3):274–328, 1995. [29] W. D. Wattenmaker, G. I. Dewey, T. D. Murphy, and D. L. Medin. Linear separability and concept learning: Context, relational properties, and concept naturalness. Cognitive Psychology, 18(2):158–194, 1986. 9
2009
249
3,758
Bilinear classifiers for visual recognition Hamed Pirsiavash Deva Ramanan Charless Fowlkes Department of Computer Science University of California at Irvine {hpirsiav,dramanan,fowlkes}@ics.uci.edu Abstract We describe an algorithm for learning bilinear SVMs. Bilinear classifiers are a discriminative variant of bilinear models, which capture the dependence of data on multiple factors. Such models are particularly appropriate for visual data that is better represented as a matrix or tensor, rather than a vector. Matrix encodings allow for more natural regularization through rank restriction. For example, a rank-one scanning-window classifier yields a separable filter. Low-rank models have fewer parameters and so are easier to regularize and faster to score at run-time. We learn low-rank models with bilinear classifiers. We also use bilinear classifiers for transfer learning by sharing linear factors between different classification tasks. Bilinear classifiers are trained with biconvex programs. Such programs are optimized with coordinate descent, where each coordinate step requires solving a convex program - in our case, we use a standard off-the-shelf SVM solver. We demonstrate bilinear SVMs on difficult problems of people detection in video sequences and action classification of video sequences, achieving state-of-the-art results in both. 1 Introduction Linear classifiers (i.e., wT x > 0) are the basic building block of statistical prediction. Though quite standard, they produce many competitive approaches for various prediction tasks. We focus here on the task of visual recognition in video - “does this spatiotemporal window contain an object”? In this domain, scanning-window templates trained with linear classification yield state of the art performance on many benchmark datasets [6, 10, 7]. Bilinear models, introduced into the vision community by [23], provide an interesting generalization of linear models. Here, data points are modelled as the confluence of a pair of factors. Typical examples include digits affected by style and content factors or faces affected by pose and illumination factors. Conditioned on one factor, the model is linear in the other. More generally, one can define multilinear models [25] that are linear in one factor conditioned on the others. Inspired by the success of bilinear models in data modeling, we introduce discriminative bilinear models for classification. We describe a method for training bilinear (multilinear) SVMs with biconvex (multiconvex) programs. A function f : X × Y →R is called biconvex if f(x, y) is convex in y for fixed x ∈X and is convex in x for fixed y ∈Y . Such functions are well-studied in the optimization literature [1, 14]. While not convex, they admit efficient coordinate descent algorithms that solve a convex program at each step. We show bilinear SVM classifiers can be optimized with an off-the-shelf linear SVM solver. This is advantageous because we can leverage large-scale, highly-tuned solvers (we use [13]) to learn bilinear classifiers with tens of thousands of features with hundreds of millions of examples. While bilinear models are often motivated from the perspective of increasing the flexibility of a linear model, our motivation is reversed - we use them to reduce the number of parameters of a 1 Figure 1: Many approaches for visual recognition employ linear classifiers on scanned windows. Here we illustrate windows processed into gradient-based features [6, 12]. We show an image window (left) and a visualization of the extracted HOG descriptor (middle), which itself is better represented as gradient features extracted from different orientation channels (right). Most learning formulations ignore this natural representation of visual data as matrices or tensors. Wolf et al. [26] show that one can produce more meaningful schemes for regularization and parameter reduction through low-rank approximations of a tensor model. Our contribution involves casting the resulting learning problem as a biconvex optimization. Such formulations can leverage off-the-shelf solvers in an efficient two-stage optimization. We also demonstrate that bilinear models have additional advantages for transfer learning and run-time efficiency. weight vector that is naturally represented as a matrix or tensor W. We reduce parameters by factorizing W into a product of low-rank factors. This parameter reduction can reduce over-fitting and improve run-time efficiency because fewer operations are needed to score an example. These are important considerations when training large-scale spatial or spatiotemporal template-classifiers. In our case, the state-of-the-art features we use to detect pedestrians are based on histograms of gradient (HOG) features [6] or spatio-temporal generalizations [7] as shown in Fig.1. The extracted feature set of both gradient and optical flow histogram is quite large, motivating the need for dimensionality reduction. Finally, by sharing factors across different classification problems, we introduce a novel formulation of transfer learning. We believe that transfer through shared factors is an important benefit of multilinear classifiers which can help ameliorate overfitting. We begin with a discussion of related work in Sec.2. We then explicitly define our bilinear classifier in Sec. 3. We illustrate several applications and motivations for the bilinear framework in Sec. 4. In Sec. 5, We describe extensions to our model for the multilinear and multiclass case. We provide several experiments on visual recognition in the video domain in Sec. 6, significantly improving on the state-of-the-art system for finding people in video sequences [7] both in performance and speed. We also illustrate our approach on the task of action recognition, showing that transfer learning can ameliorate the small-sample problem that plagues current benchmark datasets [18, 19]. 2 Related Work Tenenbaum and Freeman [23] introduced bilinear models into the vision community to model data generated from multiple linear factors. Such methods have been extended to the multilinear setting, e.g. by [25], but such models were generally used as a factor analysis or density estimation technique. Recent work has explored extensions of tensor models to discriminant analysis [22, 27], while our work focuses on an efficient max-margin formulation of multilinear models. There is also a body of related work on learning low-rank matrices from the collaborative filtering literature [21, 17, 16]. Such approaches typically define a convex objective by replacing the Tr(W T W) regularization term in our objective (6) with the trace norm Tr( √ W T W). This can be seen as an alternate “soft” rank restriction on W that retains convexity. This is because the trace norm of a matrix is equivalent to the sum of its singular values rather than the number of nonzero eigenvalues (the rank) [3]. Such a formulation would be interesting to pursue in our scenario, but as [17, 16] note, the resulting SDP is difficult to solve. Our approach, though non-convex, leverages existing SVM solvers in the inner loop of a coordinate descent optimization that enforces a hard low-rank condition. 2 Our bilinear-SVM formulation is closely related to the low-rank SVM formulation of [26]. Wolf et. al. convincingly argue that many forms of visual data are better modeled as matrices rather than vectors - an important motivation for our work (see Fig.1). They analyze the VC dimension of rank constrained linear classifiers and demonstrate an iterative weighting algorithm for approximately solving an SVM problem in which the rank of W acts as a regularizer. They also outline an algorithm similar to the one we propose here which has a hard constraint on the rank, but they include an additional orthogonality constraint on the columns of the factors that compose W. This requires cycling through each column separately during the optimization which is presumably slower and may introduce additional local minima. This in turn may explain why they did not present experimental results for their hard-rank formulation. Our work also stands apart from Wolf et. al. in our focus on the multi-task learning, which dates back at least to the work of Caruna [4]. Our formulation is most similar to that of Ando and Zhang [2]. They describe a procedure for learning linear prediction models for multiple tasks with the assumption that all models share a component living in a common low-dimensional subspace. While this formulation allows for sharing, it does not reduce the number of model parameters as does our approach of sharing factors. 3 Model definition Linear predictors are of the form fw(x) = wT x. (1) Existing formulations of linear classification typically treat x as a vector. We argue for many problems, particularly in visual recognition, x is more naturally represented as a matrix or tensor. For example, many state-of-the-art window scanning approaches train a classifier defined over local feature vectors extracted over a spatial neighborhood. The Dalal and Triggs detector [6] is a particularly popular pedestrian detector where x is naturally represented as a concatenation of histogram of gradient (HOG) feature vectors extracted from a spatial grid of ny × nx, where each local HOG descriptor is itself composed of nf features. In this case, it is natural to represent an example x as a tensor X ∈Rny×nx×nf . For ease of exposition, we develop the mathematics for a simpler matrix representation, fixing nf = 1. This holds, for example, when learning templates defined on grayscale pixel values. We generalize (1) for a matrix X with fW (X) = Tr(W T X). (2) where both X and W are ny × nx matrices. One advantage of the matrix representation is that it is more natural to regularize W and restrict the number of parameters. For example, one natural mechanism for reducing the degrees of freedom in a matrix is to reduce its rank. We show that one can obtain a biconvex objective function by enforcing a hard restriction on the rank. Specifically, we enforce the rank of W to be at most d ≤min(ny, nx). This restriction can be implemented by writing W = WyW T x where Wy ∈Rny×d, Wx ∈Rnx×d. (3) This allows us to write the final predictor explicitly as the following bilinear function: fWy,Wx(X) = Tr(WyW T x X) = Tr(W T y XWx). (4) 3.1 Learning Assume we are given a set of training data and label pairs {xn, yn}. We would like to learn a model with low error on the training data. One successful approach is a support vector machine (SVM). We can rewrite the linear SVM formulation for w and xn with matrices W and Xn using the trace operator. L(w) = 1 2wT w + C X n max(0, 1 −ynwT xn). (5) L(W) = 1 2 Tr(W T W) + C X n max(0, 1 −yn Tr(W T Xn)). (6) 3 The above formulations are identical when w and xn are the vectorized elements of matrices W and Xn. Note that (6) is convex. We wish to restrict the rank of W to be d. Plugging in W = WyW T x , we obtain our biconvex objective function: L(Wy, Wx) = 1 2 Tr(WxW T y WyW T x ) + C X n max(0, 1 −yn Tr(WxW T y Xn)). (7) In the next section, we show that optimizing (7) over one matrix holding the other fixed is a convex program - specifically, a QP equivalent to a standard SVM. This makes (7) biconvex. 3.2 Coordinate descent We can optimize (7) with a coordinate descent algorithm that solves for one set of parameters holding the other fixed. Each step in this descent is a convex optimization that can be solved with a standard SVM solver. Specifically, consider min Wy L(Wy, Wx) = 1 2 Tr(WyAW T y ) + C X n max(0, 1 −yn Tr(W T y XnWx)). (8) The above optimization is convex in Wy but does not directly translate into the trace-based SVM formulation from (6). To do so, let us reparametrize Wy as ˜Wy: min ˜ Wy L( ˜Wy, Wx) = 1 2 Tr( ˜W T y ˜Wy) + C X n max(0, 1 −yn Tr( ˜W T y ˜Xn)) (9) where ˜Wy = WyA 1 2 and ˜Xn = XnWxA−1 2 and A = W T x Wx. One can see that (9) is structurally equivalent to (6) and hence (5). Hence it can be solved with a standard off-the-shelf SVM solver. Given a solution, we can recover the original parameters by Wy = ˜WyA−1 2 . Recall that A = W T x Wx is matrix of size d × d that is in general invertible for small d. Using a similar derivation, one can show that minWx L(Wy, Wx) is also equivalent to a standard convex SVM formulation. 4 Motivation We outline here a number of motivations for the biconvex objective function defined above. 4.1 Regularization Bilinear models allow a natural way of restricting the number of parameters in a linear model. From this perspective, they are similar to approaches that apply PCA for dimensionality reduction prior to learning. Felzenszwalb et al. [11] find that PCA can reduce the size of HOG features by a factor of 4 without a loss in performance. Image windows are naturally represented as a 3D tensor X ∈Rny×nx×nf , where nf is the dimensionality of a HOG feature. Let us “reshape” X into a 2D matrix X ∈Rnxy×nf where nxy = nxny. We can restrict the rank of the corresponding model to d by defining W = WxyW T f . Wxy ∈Rnxy×d is equivalent to a vectorized spatial template defined over d features at each spatial location, while Wf ∈Rnf ×d defines a set of d basis vectors spanning Rnf . This basis can be loosely interpreted as the PCA-basis estimated in [11]. In our biconvex formulation, the basis vectors are not constrained to be orthogonal, but they are learned discriminatively and jointly with the template Wxy. We show in Sec. 6 this often significantly outperforms PCA-based dimensionality reduction. 4.2 Efficiency Scanning window classifiers are often implemented using convolutions [6, 12]. For example, the product Tr(W T X) can be computed for all image windows X with nf convolutions. By restricting W to be WxyW T f , we project features into a d dimensional subspace spanned by Wf, and compute the final score with d convolutions. One can further improve efficiency by using the same 4 d-dimensional feature space for a large number of different object templates - this is precisely the basis of our transfer approach in Sec.4.3. This can result in significant savings in computation. For example, spatio-temporal templates for finding objects in video tend to have large nf since multiple features are extracted from each time-slice. Consider a rank-1 restriction of Wx and Wy. This corresponds to a separable filter Wxy. Hence, our formulation can be used to learn separable scanning-window classifiers. Separable filters can be evaluated efficiently with two one-dimensional convolutions. This can result in significant savings because computing the score at the window is now O(nx + ny) rather than O(nxny). 4.3 Transfer Assume we wish to train M predictors and are given {xm n , ym n } training data pairs for each prediction problem 1 ≤m ≤M. One can write all M learning problems with a single optimization: L(W 1, . . . , W M) = 1 2 X m Tr(W mT W m) + X m Cm X n max(0, 1 −ym n Tr(W mT Xm n )). (10) As written, the problem above can be optimized over each W m independently. We can introduce a rank constraint on W m that induces a low-dimensional subspace projection of Xm n . To transfer knowledge between the classification tasks, we require all tasks to use the same low-dimensional subspace projection by sharing the same feature matrix: W m = W m xyW T f Note that the leading dimension of W m xy can depend on m. This fact allows for Xm n from different tasks to be of varying sizes. In our motivating application, we can learn a family of HOG templates of varying spatial dimension that share a common HOG feature subspace. The coordinate descent algorithm from Sec.3.2 naturally applies to the multi-task setting. Given a fixed Wf, it is straightforward to independently optimize W m xy by defining A = W T f Wf. Given a fixed set of W m xy, a single matrix Wf is learned for all classes by computing: min ˜ Wf L( ˜Wf, W 1 xy, . . . , W M xy ) = 1 2 Tr( ˜W T f ˜Wf) + X m Cm X n max(0, 1 −ym n Tr( ˜W T f ˜Xm n )) where ˜Wf = WfA 1 2 and ˜Xm n = Xm n W m xyA−1 2 and A = X m W mT xy W m xy. If all problems share the same slack penalty (Cm = C), the above can be optimized with an off-theshelf SVM solver. In the general case, a minor modification is needed to allow for slack-rescaling [24]. In practice, nf can be large for spatio-temporal features extracted from multiple temporal windows. The above formulation is convenient in that we can use data examples from many classification tasks to learn a good subspace for spatiotemporal features. 5 Extensions 5.1 Multilinear In many cases, a data point x is more natural represented as a multidimensional matrix or a highorder tensor. For example, spatio-temporal templates are naturally represented as a 4th-order tensor capturing the width, height, temporal extent, and the feature dimension of a spatio-temporal window. For ease of exposition let us assume the feature dimension is 1 and so we write a feature vector x as X ∈Rnx×ny×nt. We denote the element of a tensor X as xijk. Following [15], we define a scalar product of two tensors W and X as the sum of their element-wise products: ⟨W, X⟩= X ijk wijkxijk. (11) With the above definition, we can generalize our trace-based objective function (6) to higher-order tensors: L(W) = 1 2 ⟨W, W⟩+ C X n max(0, 1 −yn ⟨W, Xn⟩). (12) 5 We wish to impose a rank restriction on the tensor W. The notion of rank for tensors of order greater than two is subtle - for example, there are alternate approaches for defining a high-order SVD [25, 15]. For our purposes, we follow [20] and define W as a rank d tensor by writing it as product of matrices W y ∈Rny×d, W x ∈Rnx×d, W t ∈Rnt×d: wijk = d X s=1 wy iswx jswt ks. (13) Combining (11) - (13), it is straightforward to show that L(W y, W x, W t) is convex in one matrix given the others. This means our coordinate descent algorithm from Sec.3.2 still applies. As an example, consider the case when d = 1. This rank restriction forces the spatio-temporal template W to be separable in along the x, y, and t axes, allowing for window-scan scoring by three onedimensional convolutions. This greatly increases run-time efficiency for spatio-temporal templates. 5.2 Bilinear structural SVMs We outline here an extension of our formalism to structural SVMs [24]. Structural SVMs learn models that predict a structured label yn given a data point xn. Given training data of the form {xn, yn}, the learning problem is: L(w) = 1 2wT w + C X n max y (l(yn, y) −wT ∆φ(xn, yn, y)) (14) where ∆φ(xn, yn, y) = φ(xn, yn) −φ(xn, y), and where l(yn, y) is the loss of assigning example i with label y given that its true label is yn. The above optimization problem is convex in w. As a concrete example, consider the task of learning a multiclass SVM for nc classes using the formalism of Crammer and Singer [5]. Here, w =  wT 1 . . . wT nc  , where each wi ∈Rnx can be interpreted as a classifier for class i. The corresponding φ(x, y) will be a sparse vector with nx nonzero values at those indices associated with the yth class. It is natural to model the relevant vectors as matrices W, Xn, ∆Φ that lie in Rnc×nx. We can enforce W to be of rank d < min(nc, nx) by defining W = WcW T x where Wc ∈Rnc×d and Wx ∈Rnx×d. For example, one may expect template classifiers that classify nc different human actions to reside in a d dimensional subspace. The resulting biconvex objective function is L(Wc, Wx) = 1 2 Tr(WxW T c WcW T x ) + C X n max y (l(yn, y) −Tr(WxW T c Φ(Xn, yn, y)). (15) Using our previous arguments, it is straightforward to show that the above objective is biconvex and that each step of the coordinate descent algorithm reduces to a standard structural SVM problem. 6 Experiments We focus our experiments on the task of visual recognition using spatio-temporal templates. This problem domain has large feature sets obtained by histograms of gradients and histograms of optical flow computing from a frame pair. We illustrate our method on two challenging tasks using two benchmark datasets - detecting pedestrians in video sequences from the INRIA-Motion database [7] and classifying human actions in UCF-Sports dataset [18]. We model features computed from frame pairs x as matrices X ∈Rnxy×nf , where nxy = nxny is the vectorized spatial template and nf is the dimensionality of our combined gradient and flow feature space. We use the histogram of gradient and flow feature set from [7]. Our bilinear model learns a classifier of the form WxyW T f where Wxy ∈Rnxy×d and Wf ∈Rnf ×d. Typical values include ny = 14, nx = 6, nf = 84, and d = 5 or 10. 6 6.1 Spatiotemporal pedestrian detection Scoring a detector: Template classifiers are often scored using missed detections versus falsepositives-per-window statistics. However, recent analysis suggests such measurements can be misleading [9]. We opt for the scoring criteria outlined by the widely-acknowledged PASCAL competition [10], which looks at average precision (AP) results obtained after running the detector on cluttered video sequences and suppressing overlapping detections. Baseline: We compare with the linear spatiotemporal-template classifier from [7]. The static-image detector counterpart is a well-known state-of-the-art system for finding pedestrians [6]. Surprisingly, when scoring AP for person detection in the INRIA-motion dataset, we find the spatiotemporal model performed worse than the static-image model. This is corroborated by personal communication with the authors as well as Dalal’s thesis [8]. We found that aggressive SVM cutting-plane optimization algorithms [13] were needed for the spatiotemporal model to outperform the spatial model. This suggests our linear baseline is the true state-of-the-art system for finding people in video sequences. We also compare results with an additional rank-reduced baseline obtained by setting wf to the basis returned by a PCA projection of the feature space from nf to d dimensions. We use this PCA basis to initialize our coordinate descent algorithm when training our bilinear models. We show precision-recall curves in Fig.2. We refer the reader to the caption for a detailed analysis, but our bilinear optimization seems to produce the state-of-the-art system for finding people in video sequences, while being an order-of-magnitude faster than previous approaches. 6.2 Human action classification Action classification requires labeling a video sequence with one of nc action labels. We do this by training nc 1-vs-all action templates. Template detections from a video sequence are pooled together to output a final action label. We experimented with different voting schemes and found that a second-layer SVM classifier defined over the maximum score (over the entire video) for each template performed well. Our future plan is to integrate the video class directly into the training procedure using our bilinear structural SVM formulation. Action recognition datasets tend to be quite small and limited. For example, up until recently, the norm consisted of scripted activities on controlled, simplistic backgrounds. We focus our results on the relatively new UCF Sports Action dataset, consisting of non-scripted sequences of cluttered sports videos. Unfortunately, there has been few published results on this dataset, and the initial work [18] uses a slightly different set of classes than those which are available online. The published average class confusion is 69.2%, obtained with leave-one-out cross validation. Using 2-fold cross validation (and hence significantly less training data), our bilinear template achieves a score of 64.8% (Fig. 3). Again, we see a large improvement over linear and PCA-based approaches. While not directly comparable, these results suggest our model is competitive with the state of the art. Transfer: We use the UCF dataset to evaluate transfer-learning in Fig.4. We consider a smallsample scenario when one has only two example video sequences of each action class. Under this scenario, we train one bilinear model in which the feature basis Wf is optimized independently for each action class, and another where the basis is shared across all classes. The independently-trained model tends to overfit to the training data for multiple values of C, the slack penalty from (6). The joint model clearly outperforms the independently-trained models. 7 Conclusion We have introduced a generic framework for multilinear classifiers that are efficient to train with existing linear solvers. Multilinear classifiers exploit the natural matrix and/or tensor representation of spatiotemporal data. For example, this allows one to learn separable spatio-temporal templates for finding objects in video. Multilinear classifiers also allow for factors to be shared across classification tasks, providing a novel form of transfer learning. In our future experiments, we wish to demonstrate transfer between domains such as pedestrian detection and action classification. 7 0 0.2 0.4 0.6 0.8 1 0 0.2 0.4 0.6 0.8 1 Recall Precision Prec/Rec curve Bilinear AP = 0.795 Baseline AP = 0.765 PCA AP = 0.698 Figure 2: Our results on the INRIA-motion database [7]. We evaluate results using average precision, using the well-established protocol outlined in [10]. The baseline curve is our implementation of the HOG+flow template from [7]. The size of the feature vector is over 7,000 dimensions. Using PCA to reduce the dimensionality by 10X results in a significant performance hit. Using our bilinear formulation with the same low-dimensional restriction, we obtain better performance than the original detector while being 10X faster. We show example detections on video clips on the right. Dive−Side Golf−Back Golf−Front Golf−Side Kick−Front Kick−Side Ride−Horse Run−Side Skate−Front Swing−Bench Swing−Side Walk−Front Dive−Side Golf−Back Golf−Front Golf−Side Kick−Front Kick−Side Ride−Horse Run−Side Skate−Front Swing−Bench Swing−Side Walk−Front Dive−Side Golf−Back Golf−Front Golf−Side Kick−Front Kick−Side Ride−Horse Run−Side Skate−Front Swing−Bench Swing−Side Walk−Front Dive−Side Golf−Back Golf−Front Golf−Side Kick−Front Kick−Side Ride−Horse Run−Side Skate−Front Swing−Bench Swing−Side Walk−Front Dive−Side Golf−Back Golf−Front Golf−Side Kick−Front Kick−Side Ride−Horse Run−Side Skate−Front Swing−Bench Swing−Side Walk−Front Dive−Side Golf−Back Golf−Front Golf−Side Kick−Front Kick−Side Ride−Horse Run−Side Skate−Front Swing−Bench Swing−Side Walk−Front Bilinear (.648) Linear (.518) PCA (.444) Figure 3: Our results on the UCF Sports Action dataset [18]. We show classification results obtained from 2-fold cross validation. Our bilinear model provides a strong improvement over both the linear and PCA baselines. We show class confusion matrices, where light values correspond to correct classification. We label each matrix with the average classification rate over all classes. Iter1 Iter2 Ind (C=.01) .222 .289 Joint (C=.1) .267 .356 Walk−Iter2 Walk−Iter1 (2 training videos per class) UCF Sport Action Dataset closeup Walk−Iter2 closeup Walk−Iter1 Figure 4: We show results for transfer learning on the UCF action recognition dataset with limited training data - 2 training videos for each of 12 action classes. In the top table row, we show results for independently learning a subspace for each action class. In the bottom table row, we show results for jointly learning a single subspace that is transfered across classes. In both cases, the regularization parameter C was set on held-out data. The jointly-trained model is able to leverage training data from across all classes to learn the feature space Wf, resulting in overall better performance. On the right, We show low-rank models W = WxyW T f during iterations of the coordinate descent. Note that the head and shoulders of the model are blurred out in iteration 1 which uses PCA, but after the biconvex training procedure discriminatively updates the basis, the final model is sharper at the head and shoulders. References [1] F.A. Al-Khayyal and J.E. Falk. Jointly constrained biconvex programming. Mathematics of Operations Research, pages 273–286, 1983. 8 [2] R.K. Ando and T. Zhang. A framework for learning predictive structures from multiple tasks and unlabeled data. The Journal of Machine Learning Research, 6:1817–1853, 2005. [3] S.P. Boyd and L. Vandenberghe. Convex optimization. Cambridge university press, 2004. [4] R. Caruana. Multitask learning. Machine Learning, 28(1):41–75, 1997. [5] K. Crammer and Y. Singer. On the algorithmic implementation of multiclass kernel-based vector machines. The Journal of Machine Learning Research, 2:265–292, 2002. [6] N. Dalal and B. Triggs. Histograms of oriented gradients for human detection. In IEEE Computer Society Conference on Computer Vision and Pattern Recognition, 2005. CVPR 2005, volume 1, 2005. [7] N. Dalal, B. Triggs, and C. Schmid. Human detection using oriented histograms of flow and appearance. Lecture Notes in Computer Science, 3952:428, 2006. [8] Navneet Dalal. Finding People in Images and Video. PhD thesis, Institut National Polytechnique de Grenoble / INRIA Grenoble, July 2006. [9] P. Doll´ar, C. Wojek, B. Schiele, and P. Perona. Pedestrian detection: A benchmark. In CVPR, June 2009. [10] M. Everingham, L. Van Gool, C. K. I. Williams, J. Winn, and A. Zisserman. The PASCAL Visual Object Classes Challenge 2008 (VOC2008) Results. http://www.pascalnetwork.org/challenges/VOC/voc2008/workshop/index.html. [11] P. Felzenszwalb, R. Girshick, D. McAllester, and D. Ramanan. Object detection with discriminatively trained part based models. PAMI, In submission. [12] P. Felzenszwalb, D. McAllester, and D. Ramanan. A discriminatively trained, multiscale, deformable part model. Computer Vision and Pattern Recognition, Anchorage, USA, June, 2008. [13] V. Franc and S. Sonnenburg. Optimized cutting plane algorithm for support vector machines. In Proceedings of the 25th international conference on Machine learning, pages 320–327. ACM New York, NY, USA, 2008. [14] J. Gorski, F. Pfeuffer, and K. Klamroth. Biconvex sets and optimization with biconvex functions: a survey and extensions. Mathematical Methods of Operations Research, 66(3):373–407, 2007. [15] L.D. Lathauwer, B.D. Moor, and J. Vandewalle. A multilinear singular value decomposition. SIAM J. Matrix Anal. Appl, 1995. [16] N. Loeff and A. Farhadi. Scene Discovery by Matrix Factorization. In Proceedings of the 10th European Conference on Computer Vision: Part IV, pages 451–464. Springer-Verlag Berlin, Heidelberg, 2008. [17] J.D.M. Rennie and N. Srebro. Fast maximum margin matrix factorization for collaborative prediction. In International Conference on Machine Learning, volume 22, page 713, 2005. [18] M.D. Rodriguez, J. Ahmed, and M. Shah. Action MACH a spatio-temporal Maximum Average Correlation Height filter for action recognition. In IEEE Conference on Computer Vision and Pattern Recognition, 2008. CVPR 2008, pages 1–8, 2008. [19] C. Schuldt, I. Laptev, and B. Caputo. Recognizing human actions: A local SVM approach. In Pattern Recognition, 2004. ICPR 2004. Proceedings of th e17th International Conference on, volume 3, 2004. [20] A. Shashua and T. Hazan. Non-negative tensor factorization with applications to statistics and computer vision. In International Conference on Machine Learning, volume 22, page 793, 2005. [21] N. Srebro, J.D.M. Rennie, and T.S. Jaakkola. Maximum-margin matrix factorization. Advances in Neural Information Processing Systems, 17:1329–1336, 2005. [22] D. Tao, X. Li, X. Wu, and S.J. Maybank. General tensor discriminant analysis and Gabor features for gait recognition. IEEE Transactions on Pattern Analysis and Machine Intelligence, 29(10):1700, 2007. [23] J.B. Tenenbaum and W.T. Freeman. Separating style and content with bilinear models. Neural Computation, 12(6):1247–1283, 2000. [24] I. Tsochantaridis, T. Joachims, T. Hofmann, and Y. Altun. Large margin methods for structured and interdependent output variables. Journal of Machine Learning Research, 6(2):1453, 2006. [25] M.A.O. Vasilescu and D. Terzopoulos. Multilinear analysis of image ensembles: Tensorfaces. Lecture Notes in Computer Science, pages 447–460, 2002. [26] L. Wolf, H. Jhuang, and T. Hazan. Modeling appearances with low-rank SVM. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 1–6. Citeseer, 2007. [27] S. Yan, D. Xu, Q. Yang, L. Zhang, X. Tang, and H.J. Zhang. Discriminant analysis with tensor representation. In IEEE Computer Society Conference on Computer Vision and Pattern Recognition, volume 1, page 526. Citeseer, 2005. 9
2009
25
3,759
Online Submodular Minimization Elad Hazan IBM Almaden Research Center 650 Harry Rd, San Jose, CA 95120 hazan@us.ibm.com Satyen Kale Yahoo! Research 4301 Great America Parkway, Santa Clara, CA 95054 skale@yahoo-inc.com Abstract We consider an online decision problem over a discrete space in which the loss function is submodular. We give algorithms which are computationally efficient and are Hannan-consistent in both the full information and bandit settings. 1 Introduction Online decision-making is a learning problem in which one needs to choose a decision repeatedly from a given set of decisions, in an effort to minimize costs over the long run, even in the face of complete uncertainty about future outcomes. The performance of an online learning algorithm is measured in terms of its regret, which is the difference between the total cost of the decisions it chooses, and the cost of the optimal decision chosen in hindsight. A Hannan-consistent algorithm is one that achieves sublinear regret (as a function of the number of decision-making rounds). Hannanconsistency implies that the average per round cost of the algorithm converges to that of the optimal decision in hindsight. In the past few decades, a variety of Hannan-consistent algorithms have been devised for a wide range of decision spaces and cost functions, including well-known settings such as prediction from expert advice [10], online convex optimization [15], etc. Most of these algorithms are based on an online version of convex optimization algorithms. Despite this success, many online decisionmaking problems still remain open, especially when the decision space is discrete and large (say, exponential size in the problem parameters) and the cost functions are non-linear. In this paper, we consider just such a scenario. Our decision space is now the set of all subsets of a ground set of n elements, and the cost functions are assumed to be submodular. This property is widely seen as the discrete analogue of convexity, and has proven to be a ubiquitous property in various machine learning tasks (see [4] for references). A crucial component in these latter results are the celebrated polynomial time algorithms for submodular function minimization [7]. To motivate the online decision-making problem with submodular cost functions, here is an example from [11]. Consider a factory capable of producing any subset from a given set of n products E. Let f : 2E 7→R be the cost function for producing any such subset (here, 2E stands for the set of all subsets of E). Economics tells us that this cost function should satisfy the law of diminishing returns: i.e., the additional cost of producing an additional item is lower the more we produce. Mathematically stated, for all sets S, T ⊆E such that T ⊆S, and for all elements i ∈E, we have f(T ∪{i}) −f(T) ≥f(S ∪{i}) −f(S). Such cost functions are called submodular, and frequently arise in real-world economic and other scenarios. Now, for every item i, let pi be the market price of the item, which is only determined in the future based on supply and demand. Thus, the profit from producing a subset S of the items is P(S) = P i∈S pi −f(S). Maximizing profit is equivalent to minimizing the function −P, which is easily seen to be submodular as well. The online decision problem which arises is now to decide which set of products to produce, to maximize profits in the long run, without knowing in advance the cost function or the market prices. A 1 more difficult version of this problem, perhaps more realistic, is when the only information obtained is the actual profit of the chosen subset of items, and no information on the profit possible for other subsets. In general, the Online Submodular Minimization problem is the following. In each iteration, we choose a subset of a ground set of n elements, and then observe a submodular cost function which gives the cost of the subset we chose. The goal is to minimize the regret, which is the difference between the total cost of the subsets we chose, and the cost of the best subset in hindsight. Depending on the feedback obtained, we distinguish between two settings, full-information and bandit. In the full-information setting, we can query each cost function at as many points as we like. In the bandit setting, we only get to observe the cost of the subset we chose, and no other information is revealed. Obviously, if we ignore the special structure of these problems, standard algorithms for learning with expert advice and/or with bandit feedback can be applied to this setting. However, the computational complexity of these algorithms would be proportional to the number of subsets, which is 2n. In addition, for the submodular bandits problem, even the regret bounds have an exponential dependence on n. It is hence of interest to design efficient algorithms for these problems. For the bandit version an even more basic question arises: does there exist an algorithm with regret which depends only polynomially on n? In this paper, we answer these questions in the affirmative. We give efficient algorithms for both problems, with regret which is bounded by a polynomial in n – the underlying dimension – and sublinearly in the number of iterations. For the full information setting, we give two different randomized algorithms with expected regret O(n √ T). One of these algorithms is based on the followthe-perturbed-leader approach [5, 9]. We give a new way of analyzing such an algorithm. This analysis technique should have applications for other problems with large decision spaces as well. This algorithm is combinatorial, strongly polynomial, and can be easily generalized to arbitrary distributive lattices, rather than just all subsets of a given set. The second algorithm is based on convex analysis. We make crucial use of a continuous extension of a submodular function known as the Lov´asz extension. We obtain our regret bounds by running a (sub)gradient descent algorithm in the style of Zinkevich [15]. For the bandit setting, we give a randomized algorithm with expected regret O(nT 2/3). This algorithm also makes use of the Lov´asz extension and gradient descent. The algorithm folds exploration and exploitation steps into a single sample and obtains the stated regret bound. We also show that these regret bounds hold with high probability. Note that the technique of Flaxman, Kalai and McMahan [1], when applied to the Lov´asz extension, gives a worse regret bound of O(nT 3/4). 2 Preliminaries and Problem Statement Submodular functions. The decision space is the set of all subsets of a universe of n elements, [n] = {1, 2, . . . , n}. The set of all subsets of [n] is denoted 2[n]. For a set S ⊆[n], denote by χS its characteristic vector in {0, 1}n, i.e. χS(i) = 1 if i ∈S, and 0 otherwise. A function f : 2[n] →R is called submodular if for all sets S, T ⊆[n] such that T ⊆S, and for all elements i ∈E, we have f(T + i) −f(T) ≥f(S + i) −f(S). Here, we use the shorthand notation S + i to indicate S ∪{i}. An explicit description of f would take exponential space. We assume therefore that the only way to access f is via a value oracle, i.e. an oracle that returns the value of f at any given set S ⊆[n]. Given access to a value oracle for a submodular function, it is possible to minimize it in polynomial time [3], and indeed, even in strongly polynomial time [3, 7, 13, 6, 12, 8]. The current fastest strongly polynomial algorithm are those of Orlin[12] and Iwata-Orlin [8], which takes time O(n5EO + n6), where EO is the time taken to run the value oracle. The fastest weakly polynomial algorithm is that of Iwata [6] and Iwata-Orlin [8] which runs in time ˜O(n4EO + n5). Online Submodular Minimization. In the Online Submodular Minimization problem, over a sequence of iterations t = 1, 2, . . ., an online decision maker has to repeatedly chose a subset 2 St ⊆[n]. In each iteration, after choosing the set St, the cost of the decision is specified by a submodular function ft : 2[n] →[−1, 1]. The decision maker incurs cost ft(St). The regret of the decision maker is defined to be RegretT := T X t=1 ft(St) −min S⊆[n] T X t=1 ft(S). If the sets St are chosen by a randomized algorithm, then we consider the expected regret over the randomness in the algorithm. An online algorithm to choose the sets St will be said to be Hannan-consistent if it ensures that RegretT = o(T). The algorithm will be called efficient if it computes each decision St in poly(n, t) time. Depending on the kind of feedback the decision maker receives, we distinguish between two settings of the problem: • Full information setting. In this case, in each round t, the decision maker has unlimited access to the value oracles of the previously seen cost function f1, f2, . . . ft−1. • Bandit setting. In this case, in each round t, the decision maker only observes the cost of her decision St, viz. ft(St), and receives no other information. Main Results. In the setup of the Online Submodular Minimization, we have the following results: Theorem 1. In the full information setting of Online Submodular Minimization, there is an efficient randomized algorithm that attains the following regret bound: E[RegretT ] ≤O(n √ T). Furthermore, RegretT ≤O((n + p log(1/ε)) √ T) with probability at least 1 −ε. Theorem 2. In the bandit setting of Online Submodular Minimization, there is an efficient randomized algorithm that attains the following regret bound: E[RegretT ] ≤O(nT 2/3). Furthermore, RegretT ≤O(nT 2/3p log(1/ε)) with probability at least 1 −ε. Both of the theorems above hold against both oblivious as well as adaptive adversaries. The Lov´asz Extension. A major technical construction we need for the algorithms is the Lov´asz extension ˆf of the submodular function f. This is defined on the Boolean hypercube K = [0, 1]n and takes real values. Before defining the Lov´asz extension, we need the concept of a chain of subsets of [n]: Definition 1. A chain of subsets of [n] is a collection of sets A0, A1, . . . , Ap such that A0 ⊂A1 ⊂A2 ⊂· · · ⊂Ap. A maximal chain is one where p = n. For a maximal chain, we have A0 = ∅, An = [n], and there is a unique associated permutation π : [n] →[n] such that for all i ∈[n], we have Aπ(i) = Aπ(i)−1+i. Now let x ∈K. There is a unique chain A0 ⊂A2 ⊂· · · Ap such that x can be expressed as a convex combination x = Pp i=0 µiχAi where µi > 0 and Pp i=0 µi = 1. A nice way to construct this combination is the following random process: choose a threshold τ ∈[0, 1] uniformly at random, and consider the level set Sτ = {i : xi > τ}. The sets in the required chain are exactly the level sets which are obtained with positive probability, and for any such set Ai, µi = Pr[Sτ = Ai]. In other words, we have x = Eτ[χSτ ]. This follows immediately by noting that for any i, we have Prτ[i ∈Sτ] = xi. Of course, the chain and the weights µi can also be constructed deterministically simply by sorting the coordinates of x. Now, we are ready to define1 the Lov´asz extension ˆf: 1Note that this is not the standard definition of the Lov´asz extension, but an equivalent characterization. 3 Definition 2. Let x ∈K. Let A0 ⊂A2 ⊂· · · Ap such that x can be expressed as a convex combination x = Pp i=0 µiχAi where µi > 0 and Pp i=0 µi = 1. Then the value of the Lov´asz extension ˆf at x is defined to be ˆf(x) := p X i=0 µif(Ai). The preceding discussion gives an equivalent way of defining the Lov´asz extension: choose a threshold τ ∈[0, 1] uniformly at random, and consider the level set Sτ = {i : xi > τ}. Then we have ˆf(x) = Eτ[f(Sτ)]. Note that the definition immediately implies that for all sets S ⊆[n], we have ˆf(χS) = f(S). We will also need the notion of a maximal chain associated to a point x ∈K in order to define subgradients of the Lov´asz extension: Definition 3. Let x ∈K, and let A0 ⊂A2 ⊂· · · Ap be the unique chain such that x = Pp i=0 µiχAi where µi > 0 and Pp i=0 µi = 1. A maximal chain associated with x is any maximal completion of the Ai chain, i.e. a maximal chain ∅= B0 ⊂B1 ⊂B2 ⊂· · · Bn = [n] such that all sets Ai appear in the Bj chain. We have the following key properties of the Lov´asz extension. For proofs, refer to Fujishige [2], chapter IV. Proposition 3. The following properties of the Lov´asz extension ˆf : K →R hold: 1. ˆf is convex. 2. Let x ∈K. Let ∅= B0 ⊂B1 ⊂B2 ⊂· · · Bn = [n] be an arbitrary maximal chain associated with x, and let π : [n] →[n] be the corresponding permutation. Then, a subgradient g of ˆf at x is given as follows: gi = f(Bπ(i)) −f(Bπ(i)−1). 3 The Full Information Setting In this section we give two algorithms for regret minimization in the full information setting, both of which attain the same regret bound of O(n √ T). The first is a randomized combinatorial algorithm, based on the “follow the leader” approach of Hannan [5] and Kalai-Vempala [9], and the second is an analytical algorithm based on (sub)gradient descent on the Lov´asz extension. Both algorithms have pros and cons: while the second algorithm is much simpler and more efficient, we do not know how to extend it to distributive lattices, for which the first algorithm readily applies. 3.1 A Combinatorial Algorithm In this section we analyze a combinatorial, strongly polynomial, algorithm for minimizing regret in the full information Online Submodular Minimization setting: Algorithm 1 Submodular Follow-The-Perturbed-Leader 1: Input: parameter η > 0. 2: Initialization: For every i ∈[n], choose a random number ri ∈[−1/η, 1/η] uniformly at random. Define R : 2[n] →R as R(S) = P i∈S ri. 3: for t = 1 to T do 4: Use the set St = arg minS⊆[n] Pt−1 τ=1 fτ(S) + R(S), and obtain cost ft(St). 5: end for Define Φt : 2[n] →R as Φt(S) = Pt−1 τ=1 fτ(S) + R(S). Note that R is a submodular function, and Φt, being the sum of submodular functions, is itself submodular. Furthermore, it is easy to construct 4 a value oracle for Φt simply by using the value oracles for the fτ. Thus, the optimization in step 3 is poly-time solvable given oracle access to Φt. While the algorithm itself is a simple extension of Hannan’s [5] follow-the-perturbed-leader algorithm, previous analysis (such as Kalai and Vempala [9]), which rely on linearity of the cost functions, cannot be made to work here. Instead, we introduce a new analysis technique: we divide the decision space using n different cuts so that any two decisions are separated by at least one cut, and then we give an upper bound on the probability that the chosen decision switches sides over each such cut. This new technique may have applications to other problems as well. We now prove the regret bound of Theorem 1: Theorem 4. Algorithm 1 run with parameter η = 1/ √ T achieves the following regret bound: E[RegretT ] ≤6n √ T. Proof. We note that the algorithm is essentially running a “follow-the-leader” algorithm on the cost functions f0, f1, . . . , ft−1, where f0 = R is a fictitious “period 0” cost function used for regularization. The first step to analyzing this algorithm is to use a stability lemma, essentially proved in Theorem 1.1 of [9], which bounds the regret as follows: RegretT ≤ T X t=1 ft(St) −ft(St+1) + R(S∗) −R(S1). Here, S∗= arg minS⊆[n] PT t=1 ft(S). To bound the expected regret, by linearity of expectation, it suffices to bound E[f(St) −f(St+1)], where for the purpose of analysis, we assume that we re-randomize in every round (i.e. choose a fresh random function R : 2[n] →R). Naturally, the expectation E[f(St) −f(St+1)] is the same regardless of when R is chosen. To bound this, we need the following lemma: Lemma 5. Pr[St ̸= St+1] ≤2nη. Proof. First, we note the following simple union bound: Pr[St ̸= St+1] ≤ X i∈[n] Pr[i ∈St and i /∈St+1] + Pr[i /∈St and i ∈St+1]. (1) Now, fix any i, and we aim to bound Pr[i ∈St and i /∈St+1]. For this, we condition on the randomness in choosing rj for all j ̸= i. Define R′ : 2[n] →R as R′(S) = P j∈S,j̸=i rj, and Φ′ t : 2[n] →R as Φ′ t(S) = Pt−1 τ=1 fτ(S) + R′(S). Note that if i /∈S, then R′(S) = R(S) and Φ′ t(S) = Φt(S). Let A = arg min S⊆[n]:i∈S Φ′(S) and B = arg min S⊆[n]:i/∈S Φ′(S). Now, we note that the event i ∈St happens only if Φ′ t(A) + ri < Φ′ t(B), and St = A. But if Φ′ t(A) + ri < Φ′ t(B) −2, then we must have i ∈St+1, since for any C such that i /∈C, Φt+1(A) = Φ′ t(A) + ri + ft(A) < Φ′ t(B) −1 < Φ′ t(C) + ft(C) = Φt(C). The inequalities above use the fact that ft(S) ∈[−1, 1] for all S ⊆[n]. Thus, if v := Φ′ t(B) − Φ′ t(A), we have Pr[i ∈St and i /∈St+1 | rj, j ̸= i] ≤Pr[ri ∈[v −2, v] | rj, j ̸= i] ≤η, since ri is chosen uniformly from [−1/η, 1/η]. We can now remove the conditioning on rj for j ̸= i, and conclude that Pr[i ∈St and i /∈St+1] ≤η. Similarly, we can bound Pr[i /∈St and i ∈St+1] ≤η. Finally, the union bound (1) over all choices of i yields the required bound on Pr[St ̸= St+1]. 5 Continuing the proof, we have E[f(St) −f(St+1)] = E[f(St) −f(St+1) | St ̸= St+1] · Pr[St ̸= St+1] ≤0 + 2 · Pr[St ̸= St+1] ≤4nη. The last inequality follows from Lemma 5. Now, we have R(S∗) −R(S1) ≤2n/η, and so E[RegretT ] ≤ T X t=1 E[f(St) −f(St+1)] + E[R(S∗) −R(S1)] ≤4nηT + 2n/η ≤6n √ T, since η = 1/ √ T. 3.2 An Analytical Algorithm In this section, we give a different algorithm based on the Online Gradient Descent method of Zinkevich [15]. We apply this technique to the Lov´asz extension of the cost function coupled with a simple randomized construction of the subgradient, as given in definition 2. This algorithm requires the concept of a Euclidean projection of a point in Rn on to the set K, which is a function ΠK : Rn →K defined by ΠK(y) := arg min x∈K ∥x −y∥. Since K = [0, 1]n, it is easy to implement this projection: indeed, for a point y ∈Rn, the projection x = ΠK(y) is defined by xi =    yi if yi ∈[0, 1] 0 if yi < 0 1 if yi > 1 Algorithm 2 Submodular Subgradient Descent 1: Input: parameter η > 0. Let x1 ∈K be an arbitrary initial point. 2: for t = 1 to T do 3: Choose a threshold τ ∈[0, 1] uniformly at random, and use the set St = {i : xt(i) > τ} and obtain cost ft(St). 4: Find a maximal chain associated with xt, ∅= B0 ⊂B1 ⊂B2 ⊂· · · Bn = [n], and use ft(B0), ft(B1), . . . , ft(Bn) to compute a subgradient gt of ˆft at xt as in part 2 of Proposition 3. 5: Update: set xt+1 = ΠK(xt −ηgt). 6: end for In the analysis of the algorithm, we need the following regret bound. It is a simple extension of Zinkevich’s analysis of Online Gradient Descent to vector-valued random variables whose expectation is the subgradient of the cost function (the generality to random variables is not required for this section, but it will be useful in the next section): Lemma 6. Let ˆf1, ˆf2, . . . , ˆfT : K →[−1, 1] be a sequence of convex cost functions over the cube K. Let x1, x2, . . . , xT ∈K be defined by x1 = 0 and xt+1 = ΠK(xt −ηˆgt), where ˆg1, ˆg2, . . . , ˆgT are vector-valued random variables such that E[ˆgt|xt] = gt, where gt is a subgradient of ˆft at xt. Then the expected regret of playing x1, x2, . . . , xT is bounded by T X t=1 E[ ˆft(xt)] −min x∈K T X t=1 ˆfT (x) ≤ n 2η + 2ηn X t E[∥ˆgt∥2]. Since this Lemma follows rather easily from [15], we omit the proof in this extended abstract. We can now prove the following regret bound: 6 Theorem 7. Algorithm 2, run with parameter η = 1/ √ T, achieves the following regret bound: E[RegretT ] ≤3n √ T. Furthermore, with probability at least 1 −ε, RegretT ≤(3n + p 2 log(1/ε)) √ T. Proof. Note that be Definition 2, we have that E[ft(St)] = ˆft(xt). Since the algorithm runs Online Gradient Descent (from Lemma 6) with ˆgt = gt (i.e. no randomness), we get the following bound on the regret. Here, we use the bound ∥ˆgt∥2 = ∥gt∥2 ≤4n. E[RegretT ] = T X t=1 E[ft(St)] −min S⊆[n] T X t=1 f(S) ≤ T X t=1 ˆft(xt) −min x∈K T X t=1 ˆfT (x) ≤ n 2η + 2ηnT. Since η = 1/ √ T, we get the required regret bound. Furthermore, by a simple Hoeffding bound, we also get that with probability at least 1 −ε, T X t=1 ft(St) ≤ T X t=1 E[ft(St)] + p 2T log(1/ε), which implies the high probability regret bound. 4 The Bandit Setting We now present an algorithm for the Bandit Online Submodular Minimization problem. The algorithm is based on the Online Gradient Descent algorithm of Zinkevich [15]. The main idea is use just one sample for both exploration (to construct an unbiased estimator for the subgradient) and exploitation (to construct an unbiased estimator for the point chosen by the Online Gradient Descent algorithm). Algorithm 3 Bandit Submodular Subgradient Descent 1: Input: parameters η, δ > 0. Let x1 ∈K be arbitrary. 2: for t = 1 to T do 3: Find a maximal chain associated with xt, ∅= B0 ⊂B1 ⊂B2 ⊂· · · Bn = [n], and let π be the associated permutation as in part 2 of Proposition 3. Then xt can be written as xt = Pn i=0 µiχBi, where µi = 0 for the extra sets Bi that were added to complete the maximal chain for xt. 4: Choose the set St as follows: St = Bi with probability ρi = (1 −δ)µi + δ n + 1. Use the set St and obtain cost ft(St). 5: If St = B0, then set ˆgt = −1 ρ0 ft(St)eπ(1), and if St = Bn then set ˆgt = 1 ρn ft(St)eπ(n). Otherwise, St = Bi for some i ∈[2, n −1]. Choose εt ∈{+1, −1} uniformly at random, and set: ˆgt =    2 ρi ft(St)eπ(i) if εt = 1 −2 ρi ft(St)eπ(i+1) if εt = −1 6: Update: set xt+1 = ΠK(xt −η ˆgt). 7: end for Before launching into the analysis, we define some convenient notation first. For a random variable Xt defined in round t of the algorithm, define Et[Xt] (resp. VARt[Xt]) to be the expectation (resp. variance) of Xt conditioned on all the randomness chosen by the algorithm until round t. A first observation is that on the expectation, the regret of the algorithm above is almost the same as if it had played xt all along and the loss functions were replaced by the Lov´asz extensions of the actual loss functions. 7 Lemma 8. For all t, we have E[f(St)] ≤E[ ˆft(xt)] + 2δ. Proof. From Definition 2 we have that ˆf(xt) = P i µif(Bi). On the other hand, Et[f(St)] = P i ρif(Bi), and hence: Et[f(St)] −ˆft(xt) = n X i=0 (ρi −µi)f(Bi) ≤δ n X i=0 · 1 n + 1 + µi ¸ |f(Bi)| ≤2δ. The lemma now follows by taking the expectation of both sides of this inequality with respect to the randomness chosen in the first t −1 rounds. Next, by Proposition 3, the subgradient of the Lov´asz extension of ft at point xt corresponding to the maximal chain B0 ⊂B1 ⊂· · · ⊂Bn is given by gt(i) = f(Bπ(i)) −f(Bπ(i)−1). Using this fact, it is easy to check that the random vector ˆgt is constructed in such a way that E[ˆgt|xt] = gt. Furthermore, we can bound the norm of this estimator as follows: Et[∥ˆgt∥2] ≤ n X i=0 4 ρ2 i ft(Bi)2 · ρi ≤4(n + 1)2 δ ≤16n2 δ . (2) We can now remove the conditioning, and conclude that E[∥ˆgt∥2] ≤16n2 δ . Theorem 9. Algorithm 3, run with parameters δ = n T 1/3 , η = 1 T 2/3 , achieves the following regret bound: E[RegretT ] ≤12nT 2/3. Proof. We bound the expected regret as follows: T X t=1 E[ft(St)] −min S⊆[n] T X t=1 ft(S) ≤2δT + T X t=1 E[ ˆft(xt)] −min x∈K T X t=1 ˆft(x) (By Lemma 8) ≤2δT + n 2η + η 2 T X t=1 E[∥ˆgt∥2] (By Lemma 6) ≤2δT + n 2η + 8n2ηT δ . (By (2)) The bound is now obtained for δ = n T 1/3 , η = 1 T 2/3 . 4.1 High probability bounds on the regret The theorem of the previous section gave a bound on the expected regret. However, a much stronger claim can be made that essentially the same regret bound holds with very high probability (exponential tail). In addition, the previous theorem (which only bounds expected regret) holds against an oblivious adversary, but not necessarily against a more powerful adaptive adversary. The following gives high probability bounds against an adaptive adversary. Theorem 10. With probability 1 −4ε, Algorithm 3, run with parameters δ = n T 1/3 , η = 1 T 2/3 , achieves the following regret bound: RegretT ≤O(nT 2/3p log(1/ε)). The proof of this theorem is deferred to the full version of this paper. 5 Conclusions and Open Questions We have described efficient regret minimization algorithms for submodular cost functions, in both the bandit and full information settings. This parallels the work of Streeter and Golovin [14] who study two specific instances of online submodular maximization (for which the offline problem is NP-hard), and give (approximate) regret minimizing algorithms. An open question is whether it is possible to attain O( √ T) regret bounds for online submodular minimization in the bandit setting. 8 References [1] A. D. Flaxman, A. T. Kalai, and H. B. McMahan, Online convex optimization in the bandit setting: gradient descent without a gradient, SODA, 2005, pp. 385–394. [2] Satoru Fujishige, Submodular functions and optimization, Elsevier, 2005. [3] M. Gr¨otschel, L. Lov´asz, and A. Schrijver, Geometric Algorithms and Combinatorial Optimization, Springer Verlag, 1988. [4] Carlos Guestrin and Andreas Krause, Beyond convexity - submodularity in machine learning., Tutorial given in the 25rd International Conference on Machine Learning (ICML), 2008. [5] J. Hannan, Approximation to bayes risk in repeated play, In M. Dresher, A. W. Tucker, and P. Wolfe, editors, Contributions to the Theory of Games, volume III (1957), 97–139. [6] Satoru Iwata, A faster scaling algorithm for minimizing submodular functions, SIAM J. Comput. 32 (2003), no. 4, 833–840. [7] Satoru Iwata, Lisa Fleischer, and Satoru Fujishige, A combinatorial strongly polynomial algorithm for minimizing submodular functions, J. ACM 48 (2001), 761–777. [8] Satoru Iwata and James B. Orlin, A simple combinatorial algorithm for submodular function minimization, SODA ’09: Proceedings of the Nineteenth Annual ACM -SIAM Symposium on Discrete Algorithms (Philadelphia, PA, USA), Society for Industrial and Applied Mathematics, 2009, pp. 1230–1237. [9] Adam Kalai and Santosh Vempala, Efficient algorithms for online decision problems, Journal of Computer and System Sciences 71(3) (2005), 291–307. [10] N. Littlestone and M. K. Warmuth, The weighted majority algorithm, Proceedings of the 30th Annual Symposium on the Foundations of Computer Science, 1989, pp. 256–261. [11] S. T. McCormick, Submodular function minimization., Chapter 7 in the Handbook on Discrete Optimization (G. Nemhauser K. Aardal and R. Weismantel, eds.), Elsevier, 2006, pp. 321–391. [12] James B. Orlin, A faster strongly polynomial time algorithm for submodular function minimization, Math. Program. 118 (2009), no. 2, 237–251. [13] Alexander Schrijver, A combinatorial algorithm minimizing submodular functions in strongly polynomial time, 1999. [14] Matthew J. Streeter and Daniel Golovin, An online algorithm for maximizing submodular functions, NIPS, 2008, pp. 1577–1584. [15] Martin Zinkevich, Online convex programming and generalized infinitesimal gradient ascent., Proceedings of the Twentieth International Conference (ICML), 2003, pp. 928–936. 9
2009
250
3,760
Learning from Multiple Partially Observed Views – an Application to Multilingual Text Categorization Massih R. Amini Interactive Language Technologies Group National Research Council Canada Massih-Reza.Amini@cnrc-nrc.gc.ca Nicolas Usunier Laboratoire d’Informatique de Paris 6 Universit´e Pierre et Marie Curie, France Nicolas.Usunier@lip6.fr Cyril Goutte Interactive Language Technologies Group National Research Council Canada Cyril.Goutte@cnrc-nrc.gc.ca Abstract We address the problem of learning classifiers when observations have multiple views, some of which may not be observed for all examples. We assume the existence of view generating functions which may complete the missing views in an approximate way. This situation corresponds for example to learning text classifiers from multilingual collections where documents are not available in all languages. In that case, Machine Translation (MT) systems may be used to translate each document in the missing languages. We derive a generalization error bound for classifiers learned on examples with multiple artificially created views. Our result uncovers a trade-off between the size of the training set, the number of views, and the quality of the view generating functions. As a consequence, we identify situations where it is more interesting to use multiple views for learning instead of classical single view learning. An extension of this framework is a natural way to leverage unlabeled multi-view data in semi-supervised learning. Experimental results on a subset of the Reuters RCV1/RCV2 collections support our findings by showing that additional views obtained from MT may significantly improve the classification performance in the cases identified by our trade-off. 1 Introduction We study the learning ability of classifiers trained on examples generated from different sources, but where some observations are partially missing. This problem occurs for example in non-parallel multilingual document collections, where documents may be available in different languages, but each document in a given language may not be translated in all (or any) of the other languages. Our framework assumes the existence of view generating functions which may approximate missing examples using the observed ones. In the case of multilingual corpora these view generating functions may be Machine Translation systems which for each document in one language produce its translations in all other languages. Compared to other multi-source learning techniques [6], we address a different problem here by transforming our initial problem of learning from partially observed examples obtained from multiple sources into the classical multi-view learning. The contributions of this paper are twofold. We first introduce a supervised learning framework in which we define different multi-view learning tasks. Our main result is a generalization error bound for classifiers trained over multi-view observations. From this result we induce a trade-off between the number of training examples, the number of views and the ability of view generating functions to produce accurate additional views. This trade-off helps us identify situations in which artificially generated views may lead to substantial performance gains. We then show how the agreement of classifiers over their class predictions on unlabeled training data may lead to a much tighter trade-off. Experiments are carried out on a large part of the Reuters RCV1/RCV2 collections, freely available from Reuters, using 5 well-represented languages for text classification. Our results show that our approach yields improved classification performance in both the supervised and semi-supervised settings. In the following two sections, we first define our framework, then the learning tasks we address. Section 4 describes our trade-off bound in the Empirical Risk Minimization (ERM) setting, and shows how and when the additional, artificially generated views may yield a better generalization performance in a supervised setting. Section 5 shows how to exploit these results when additional unlabeled training data are available, in order to obtain a more accurate trade-off. Finally, section 6 describes experimental results that support this approach. 2 Framework and Definitions In this section, we introduce basic definitions and the learning objectives that we address in our setting of artificially generated representations. 2.1 Observed and Generated Views A multi-view observation is a sequence x def= (x1, ..., xV ), where different views xv provide a representation of the same object in different sets Xv. A typical example is given in [3] where each Web-page is represented either by its textual content (first view) or by the anchor texts which point to it (second view). In the setting of multilingual classification, each view is the textual representation of a document written in a given language (e.g. English, German, French). We consider binary classification problems where, given a multi-view observation, some of the views are not observed (we obviously require that at least one view is observed). This happens, for instance, when documents may be available in different languages, yet a given document may only be available in a single language. Formally, our observations x belong to the input set X def= (X1 ∪{⊥}) × ... × (XV ∪{⊥}), where xv =⊥means that the v-th view is not observed. In binary classification, we assume that examples are pairs (x, y), with y ∈Y def= {0, 1}, drawn according to a fixed, but unknown distribution D over X ×Y, such that P(x,y)∼D (∀v : xv =⊥) = 0 (at least one view is available). In multilingual text classification, a parallel corpus is a dataset where all views are always observed (i.e. P(x,y)∼D (∃v : xv =⊥) = 0), while a comparable corpus is a dataset where only one view is available for each example (i.e. P(x,y)∼D (|{v : xv ̸=⊥}| ̸= 1) = 0). For a given observation x, the views v such that xv ̸=⊥will be called the observed views. The originality of our setting is that we assume that we have view generating functions Ψv→v′ : Xv → Xv′ which take as input a given view xv and output an element of Xv′, that we assume is close to what xv′ would be if it was observed. In our multilingual text classification example, the view generating functions are Machine Translation systems. These generating functions can then be used to create surrogate observations, such that all views are available. For a given partially observed x, the completed observation x is obtained as: ∀v, xv =  xv if xv ̸=⊥ Ψv′→v(xv′) otherwise, where v′ is such that xv′ ̸=⊥ (1) In this paper, we focus on the case where only one view is observed for each example. This setting corresponds to the problem of learning from comparable corpora, which will be the focus of our experiments. Our study extends to the situation where two or more views may be observed in a straightforward manner. Our setting differs from previous multi-view learning studies [5] mainly on the straightforward generalization to more than two views and the use of view generating functions to induce the missing views from the observed ones. 2.2 Learning objective The learning task we address is to find, in some predefined classifier set C, the stochastic classifier c that minimizes the classification error on multi-view examples (with, potentially, unobserved views) drawn according to some distribution D as described above. Following the standard multi-view framework, in which all views are observed [3, 13], we assume that we are given V deterministic classifier sets (Hv)V v=1, each working on one specific view1. That is, for each view v, Hv is a set of functions hv : Xv →{0, 1}. The final set of classifiers C contains stochastic classifiers, whose output only depends on the outputs of the view-specific classifiers. That is, associated to a set of classifiers C, there is a function ΦC : (Hv)V v=1 × X →[0, 1] such that: C = {x 7→ΦC(h1, ..., hV , x) |∀v, hv ∈Hv } For simplicity, in the rest of the paper, when the context is clear, the function x 7→ΦC(h1, ..., hV , x) will be denoted by ch1,...,hV . The overall objective of learning is therefore to find c ∈C with low generalization error, defined as: ǫ(c) = E (x,y)∼D e (c, (x, y)) (2) where e is a pointwise error, for instance the 0/1 loss: e(c, (x, y)) = c(x)(1 −y) + (1 −c(x))y. In the following sections, we address this learning task in our framework in terms of supervised and semi-supervised learning. 3 Supervised Learning Tasks We first focus on the supervised learning case. We assume that we have a training set S of m examples drawn i.i.d. according to a distribution D, as presented in the previous section. Depending on how the generated views are used at both training and test stages, we consider the following learning scenarios: - Baseline: This setting corresponds to the case where each view-specific classifier is trained using the corresponding observed view on the training set, and prediction for a test example is done using the view-specific classifier corresponding to the observed view: ∀v, hv ∈arg min h∈Hv X (x,y)∈S:xv̸=⊥ e(h, (xv, y)) (3) In this case we pose ∀x, cb h1,...,hV (x) = hv(xv), where v is the observed view for x. Notice that this is the most basic way of learning a text classifier from a comparable corpus. - Generated Views as Additional Training Data: The most natural way to use the generated views for learning is to use them as additional training material for the view-specific classifiers: ∀v, hv ∈arg min h∈Hv X (x,y)∈S e(h, (xv, y)) (4) with x defined by eq. (1). Prediction is still done using the view-specific classifiers corresponding to the observed view, i.e. ∀x, cb h1,...,hV (x) = hv(xv). Although the test set distribution is a subdomain of the training set distribution [2], this mismatch is (hopefully) compensated by the addition of new examples. - Multi-view Gibbs Classifier: In order to avoid the potential bias introduced by the use of generated views only during training, we consider them also during testing. This becomes a standard multi-view setting, where generated views are used exactly as if they were observed. The view-specific classifiers are trained exactly as above (eq. 4), but the prediction is carried out with respect to the probability distribution of classes, by estimating the probability of class membership in class 1 from the mean prediction of each view-specific classifier: ∀x, cmg h1,...,hV (x) = 1 V V X v=1 hv(xv) (5) 1We assume deterministic view-specific classifiers for simplicity and with no loss of generality. - Multi-view Majority Voting: With view generating functions involved in training and test, a natural way to obtain a (generally) deterministic classifier with improved performance is to take the majority vote associated with the Gibbs classifier. The view-specific classifiers are again trained as in eq. 4, but the final prediction is done using a majority vote: ∀x, cmv h1,...,hV (x) = ( 1 2 if PV v=1 hv(xv) = V 2 I PV v=1 hv(xv) > V 2  otherwise (6) Where I(.) is the indicator function. The classifier outputs either the majority voted class, or either one of the classes with probability 1/2 in case of a tie. 4 The trade-offs with the ERM principle We now analyze how the generated views can improve generalization performance. Essentially, the trade-off is that generated views offer additional training material, therefore potentially helping learning, but can also be of lower quality, which may degrade learning. The following theorem sheds light on this trade-off by providing bounds on the baseline vs. multiview strategies. Note that such trade-offs have already been studied in the literature, although in different settings (see e.g. [2, 4]). Our first result is the following theorem. The notion of function class capacity used here is the empirical Rademacher complexity [1]. Proof is given in the supplementary material. Theorem 1 Let D be a distribution over X × Y, satisfying P(x,y)∼D (|{v : xv ̸=⊥}| ̸= 1) = 0. Let S = ((xi, yi))m i=1 be a dataset of m examples drawn i.i.d. according to D. Let e be the 0/1 loss, and let (Hv)V v=1 be the view-specific deterministic classifier sets. For each view v, denote e ◦Hv def= {(xv, y) 7→e(h, (xv, y))|h ∈Hv}, and denote , for any sequence Sv ∈(Xv × Y)mv of size mv, ˆRmv(e ◦Hv, Sv) the empirical Rademacher complexity of e ◦Hv on Sv. Then, we have: Baseline setting: for all 1 > δ > 0, with probability at least 1 −δ over S: ǫ(cb h1,...,hV ) ≤ inf h′ v∈Hv h ǫ(cb h′ 1,...,h′ V ) i + 2 V X v=1 mv m ˆRmv(e ◦Hv, Sv) + 6 r ln(2/δ) 2m where, for all v, Sv def= {(xv i , yi)|i = 1..m and xv i ̸=⊥}, mv = |Sv| and hv ∈Hv is the classifier minimizing the empirical risk on Sv. Multi-view Gibbs classification setting: for all 1 > δ > 0, with probability at least 1 −δ over S: ǫ(cmg h1,...,hV ) ≤ inf h′v∈Hv h ǫ(cb h′ 1,...,h′ V ) i + 2 V V X v=1 ˆRm(e ◦Hv, Sv) + 6 r ln(2/δ) 2m + η where, for all v, Sv def= {(xv i , yi)|i = 1..m}, hv ∈Hv is the classifier minimizing the empirical risk on Sv, and η = inf h′v∈Hv h ǫ(cmg h′ 1,...,h′ V ) i − inf h′v∈Hv h ǫ(cb h′ 1,...,h′ V ) i (7) This theorem gives us a rule for whether it is preferable to learn only with the observed views (the baseline setting) or preferable to use the view-generating functions in the multi-view Gibbs classification setting: we should use the former when 2 P v mv m ˆRmv(e ◦Hv, Sv) < 2 V P v ˆRm(e ◦ Hv, Sv) + η, and the latter otherwise. Let us first explain the role of η (Eq. 7). The difference between the two settings is in the train and test distributions for the view-specific classifiers. η compares the best achievable error for each of the distribution. infh′ v∈Hv h ǫ(cb h′ 1,...,h′ V ) i is the best achievable error in the baseline setting (i.e. without generated views), with the automatically generated views, the best achievable error becomes infh′ v∈Hv h ǫ(cmg h′ 1,...,h′ V ) i . Therefore η measures the loss incurred by using the view generating functions. In a favorable situation, the quality of the generating functions will be sufficient to make η small. The terms depending on the complexity of the class of functions may be better explained using orders of magnitude. Typically, the Rademacher complexity for a sample of size n is usually of order O( 1 √n) [1]. Assuming, for simplicity, that all empirical Rademacher complexities in Theorem 1 are approximately equal to d/√n, where n is the size of the sample on which they are computed, and assuming that mv = m/V for all v. The trade-off becomes: Choose the Multi-view Gibbs classification setting when: d q V m − 1 √m  > η This means that we expect important performance gains when the number of examples is small, the generated views of sufficiently high quality for the given classification task, and/or there are many views available. Note that our theoretical framework does not take the quality of the MT system in a standard way: in our setup, a good translation system is (roughly) one which generates bag-of-words representations that allow to correctly discriminate between classes. Majority voting One advantage of the multi-view setting at prediction time is that we can use a majority voting scheme, as described in Section 2. In such a case, we expect that ǫ(cmv h′ 1,...,h′ V ) ≤ ǫ(cmg h′ 1,...,h′ V ) if the view-specific classifiers are not correlated in their errors. It can not be guaranteed in general, though, since, in general, we can not prove any better than ǫ(cmv h′ 1,...,h′ V ) ≤2ǫ(cmg h′ 1,...,h′ V ) (see e.g. [9]). 5 Agreement-Based Semi-Supervised Learning One advantage of the multi-view settings described in the previous section is that unlabeled training examples may naturally be taken into account in a semi–supervised learning scheme, using existing approaches for multi-view learning (e.g. [3]). In this section, we describe how, under the framework of [11], the supervised learning trade-off presented above can be improved using extra unlabeled examples. This framework is based on the notion of disagreement between the various view-specific classifiers, defined as the expected variance of their outputs: V (h1, ..., hV ) def= E (x,y)∼D  1 V X v hv(xv)2 − 1 V X v hv(xv) !2  (8) The overall idea is that a set of good view-specific classifiers should agree on their predictions, making the expected variance small. This notion of disagreement has two key advantages. First, it does not depend on the true class labels, making its estimation easy over a large, unlabeled training set. The second advantage is that if, during training, it turns out that the view-specific classifiers have a disagreement of at most µ on the unlabeled set, the set of possible view-specific classifiers that needs be considered in the supervised learning stage is reduced to: H∗ v(µ) def= {h′ v ∈Hv |∀v′ ̸= v, ∃h′ v′ ∈Hv′, V(h′ 1, ..., h′ V ) ≤µ} Thus, the more the various view-specific classifiers tend to agree, the smaller the possible set of functions will be. This suggests a simple way to do semi-supervised learning: the unlabeled data can be used to choose, among the classifiers minimizing the empirical risk on the labeled training set, those with best generalization performance (by choosing the classifiers with highest agreement on the unlabeled set). This is particularly interesting when the number of labeled examples is small, as the train error is usually close to 0. Theorem 3 of [11] provides a theoretical value B(ǫ, δ) for the minimum number of unlabeled examples required to estimate Eq. 8 with precision ǫ and probability 1 −δ (this bound depends on {Hv}v=1..V ). The following result gives a tighter bound of the generalization error of the multi-view Gibbs classifier when unlabeled data are available. The proof is similar to Theorem 4 in [11]. Proposition 2 Let 0 ≤µ ≤1 and 0 < δ < 1. Under the conditions and notations of Theorem 1, assume furthermore that we have access to u ≥B(µ/2, δ/2) unlabeled examples drawn i.i.d. according to the marginal distribution of D on X. Then, with probability at least 1 −δ, if the empirical risk minimizers hv ∈ arg minh∈Hv P (xv,y)∈Sv e(h, (xv, y)) have a disagreement less than µ/2 on the unlabeled set, we have: ǫ(cmg h1,...,hV ) ≤ inf h′v∈Hv h ǫ(cb h′ 1,...,h′ V ) i + 2 V V X v=1 ˆRm(e ◦H∗ v(µ), Sv) + 6 r ln(4/δ) 2m + η We can now rewrite the trade-off between the baseline setting and the multi-view Gibbs classifier, taking semi-supervised learning into account. Using orders of magnitude, and assuming that for each view, ˆRm(e ◦H∗ v(µ), Sv) is O(du/√m), with the proportional factor du ≪d, the trade-off becomes: Choose the mutli-view Gibbs classification setting when: d p V/m −du/√m > η. Thus, the improvement is even more important than in the supervised setting. Also note that the more views we have, the greater the reduction in classifier set complexity should be. Notice that this semi-supervised learning principle enforces agreement between the view specific classifiers. In the extreme case where they almost always give the same output, majority voting is then nearly equivalent to the Gibbs classifier (when all voters agree, any vote is equal to the majority vote). We therefore expect the majority vote and the Gibbs classifier to yield similar performance in the semi-supervised setting. 6 Experimental Results In our experiments, we address the problem of learning document classifiers from a comparable corpus. We build the comparable corpus by sampling parts of the Reuters RCV1 and RCV2 collections [12, 14]. We used newswire articles written in 5 languages, English, French, German, Italian and Spanish. We focused on 6 relatively populous classes: C15, CCAT, E21, ECAT, GCAT, M11. For each language and each class, we sampled up to 5000 documents from the RCV1 (for English) or RCV2 (for other languages). Documents belonging to more than one of our 6 classes were assigned the label of their smallest class. This resulted in 12-30K documents per language, and 11-34K documents per class (see Table 1). In addition, we reserved a test split containing 20% of the documents (respecting class and language proportions) for testing. For each document, we indexed the text appearing in the title (headline tag), and the body (body tags) of each article. As preprocessing, we lowercased, mapped digits to a single digit token, and removed non alphanumeric tokens. We also filtered out function words using a stop-list, as well as tokens occurring in less than 5 documents. Documents were then represented as a bag of words, using a TFIDF-based weighting scheme. The final vocabulary size for each language is given in table 1. The artificial views were produced using Table 1: Distribution of documents over languages and classes in the comparable corpus. Language # docs (%) # tokens English 18, 758 16.78 21, 531 French 26, 648 23.45 24, 893 German 29, 953 26.80 34, 279 Italian 24, 039 21.51 15, 506 Spanish 12, 342 11.46 11, 547 Total 111, 740 Class Size (all lang.) (%) C15 18, 816 16.84 CCAT 21, 426 19.17 E21 13, 701 12.26 ECAT 19, 198 17.18 GCAT 19, 178 17.16 M11 19, 421 17.39 PORTAGE, a statistical machine translation system developed at NRC [15]. Each document from the comparable corpus was thus translated to the other 4 languages.2 For each class, we set up a binary classification task by using all documents from that class as positive examples, and all others as negative. We first present experimental results obtained in supervised learning, using various amounts of labeled examples. We rely on linear SVM models as base classifiers, using the SVM-Perf package [8]. For comparisons, we employed the four learning strategies described in section 3: 1−the single-view baseline svb (Eq. 3), 2−generated views as additional training data gvb (Eq. 4), 3−multi-view Gibbs mvg (Eq. 5), and 4−multi-view majority voting mvm (Eq. 6). Recall that the second setting, gvb, is the most straightforward way to train and test classifiers when additional examples are available (or generated) from different sources. It can thus be seen as a baseline approach, as opposed to the last two strategies (mvg and mvm), where view-specific classifiers are both trained and tested over both original and translated documents. Note also that in our case (V = 5 views), additional training examples obtained from machine translation represent 4 times as many labeled examples as the original texts used to train the baseline svb. All test results were averaged over 10 randomly sampled training sets. Table 2: Test classification accuracy and F1 in the supervised setting, for both baselines (svb, gvb), Gibbs (mvg) and majority voting (mvw) strategies, averaged over 10 random sets of 10 labeled examples per view. ↓indicates statistically significantly worse performance that the best result, according to a Wilcoxon rank sum test (p < 0.01) [10]. Strategy C15 CCAT E21 ECAT GCAT M11 Acc. F1 Acc. F1 Acc. F1 Acc. F1 Acc. F1 Acc. F1 svb .559↓ .388↓.639↓.403↓.557↓.294↓ .579↓.374↓ .800↓.501↓ .651↓.483↓ gvb .705 .474↓.691↓.464↓.665↓.351↓ .623↓.424↓ .835↓.595↓ .786↓.589↓ mvg .693↓ .494↓.681↓.445↓.665↓.375↓ .620↓.420↓ .834↓.594↓ .787↓.600↓ mvm .716 .521 .708 .478 .693 .405 .636 .441 .860 .642 .820 .644 Results obtained in a supervised setting with only 10 labeled documents per language for training are summarized in table 2. All learning strategies using the generated views during training outperform the single-view baseline. This shows that, although imperfect, artificial views do bring additional information that compensates the lack of labeled data. Although the multi-view Gibbs classifier predicts based on a translation rather than the original in 80% of cases, it produces almost identical performance to the gvb run (which only predicts using the original text). These results indicate that the translation produced by our MT system is of sufficient quality for indexing and classification purposes. Multi-view majority voting reaches the best performance, yielding a 6 −17% improvement in accuracy over the baseline. A similar increase in performance is observed using F1, which suggests that the multi-view SVM appropriately handles unbalanced classes. Figure 1 shows the learning curves obtained on 3 classes, C15, ECAT and M11. These figures show that when there are enough labeled examples (around 500 for these 3 classes), the artificial views do not provide any additional useful information over the original-language examples. These empirical results illustrate the trade-off discussed at the previous section. When there are sufficient original labeled examples, additional generated views do not provide more useful information for learning than what view-specific classifiers have available already. We now investigate the use of unlabeled training examples for learning the view-specific classifiers. Our overall aim is to illustrate our findings from section 5. Recall that in the case where view-specific classifiers are in agreement over the class labels of a large number of unlabeled examples, the multiview Gibbs and majority vote strategies should have the same performance. In order to enforce agreement between classifiers on the unlabeled set, we use a variant of the iterative co-training algorithm [3]. Given the view-specific classifiers trained on an initial set of labeled examples, we iteratively assign pseudo-labels to the unlabeled examples for which all classifier predictions agree. We then train new view-specific classifiers on the joint set of the original labeled examples, and those unanimously (pseudo-)labeled ones. Key differences between this algorithm and co-training are the number of views used for learning (5 instead of 2), and the use of unanimous and simultaneous labeling. 2The dataset is available from http://multilingreuters.iit.nrc.ca/ReutersMultiLingualMultiView.htm 0.35 0.4 0.45 0.5 0.55 0.6 0.65 0.7 0.75 0.8 10 20 50 100 200 500 F1 Labeled training size C15 svb mvg mvm 0.35 0.4 0.45 0.5 0.55 0.6 0.65 0.7 0.75 0.8 10 20 50 100 200 500 F1 Labeled training size ECAT svb mvg mvm 0.35 0.4 0.45 0.5 0.55 0.6 0.65 0.7 0.75 0.8 10 20 50 100 200 500 F1 Labeled training size M11 svb mvg mvm Figure 1: F1 vs. size of the labeled training set for classes C15, ECAT and M11. We call this iterative process self-learning multiple-view algorithm, as it also bears a similarity with the self-training paradigm [16]. Prediction from the multi-view SVM models obtained from this self-learning multiple-view algorithm is done either using Gibbs (mvs g) or majority voting (mvs m). These results are shown in table 3. For comparison we also trained a TSVM model [7] on each view separately, a semi-supervised equivalent to the single-view baseline strategy. Note that the TSVM model mostly out-performs the supervised baseline svb, although the F1 suffers on some classes. This suggests that the TSVM has trouble handling unbalanced classes in this setting. Table 3: Test classification accuracy and F1 in the semi-supervised setting, for single-view TSVM and multi-view self-learning using either Gibbs (mvs g) or majority voting (mvs m), averaged over 10 random sets using 10 labeled examples per view to start. For comparison we provide the single-view baseline and multi-view majority voting performance for supervised learning. Strategy C15 CCAT E21 ECAT GCAT M11 Acc. F1 Acc. F1 Acc. F1 Acc. F1 Acc. F1 Acc. F1 svb .559↓ .388↓ .639↓ .403↓ .557↓ .294↓ .579↓.374↓ .800↓.501↓ .651↓.483↓ mvm .716↓ .521↓ .708↓ .478↓ .693↓ .405↓ .636↓.441↓ .860↓.642↓ .820↓.644↓ TSVM .721↓ .482↓ .721↓ .405↓ .746↓ .269↓ .665↓.263↓ .876↓.606↓ .834↓.706↓ mvs g .772 .586 .762 .538 .765 .470 .691 .504 .903 .729 .900 .764 mvs m .773 .589 .766 .545 .767 .473 .701 .508 .905 .734 .901 .766 The multi-view self-learning algorithm achieves the best classification performance in both accuracy and F1, and significantly outperforms both the TSVM and the supervised multi-view strategy in all classes. As expected, the performance of both mvs g and mvs m strategies are similar. 7 Conclusion The contributions of this paper are twofold. First, we proposed a bound on the risk of the Gibbs classifier trained over artificially completed multi-view observations, which directly corresponds to our target application of learning text classifiers from a comparable corpus. We showed that our bound may lead to a trade-off between the size of the training set, the number of views, and the quality of the view generating functions. Our result identifies in which case it is advantageous to learn with additional artificial views, as opposed to sticking with the baseline setting in which a classifier is trained over single view observations. This result leads to our second contribution, which is a natural way of using unlabeled data in semi-supervised multi-view learning. We showed that in the case where view-specific classifiers agree over the class labels of additional unlabeled training data, the previous trade-off becomes even much tighter. Empirical results on a comparable multilingual corpus support our findings by showing that additional views obtained using a Machine Translation system may significantly increase classification performance in the most interesting situation, when there are few labeled data available for training. Acknowlegdements This work was supported in part by the IST Program of the European Community, under the PASCAL2 Network of Excellence, IST-2002-506778. References [1] P. L. Bartlett and S. Mendelson. Rademacher and gaussian complexities: risk bounds and structural results. Journal of Machine Learning Research, 3:463–482, 2003. [2] J. Blitzer, K. Crammer, A. Kulesza, F. Pereira, and J. Wortman. Learning bounds for domain adaptation. In NIPS, 2007. [3] A. Blum and T. M. Mitchell. Combining labeled and unlabeled sata with co-training. In COLT, pages 92–100, 1998. [4] K. Crammer, M. Kearns, and J. Wortman. Learning from multiple sources. Journal of Machine Learning Research, 9:1757–1774, 2008. [5] J. D. R. Farquhar, D. Hardoon, H. Meng, J. Shawe-Taylor, and S. Szedmak. Two view learning: Svm-2k, theory and practice. In Advances in Neural Information Processing Systems 18, pages 355–362. 2006. [6] D. R. Hardoon, G. Leen, S. Kaski, and J. S.-T. (eds). Nips workshop on learning from multiple sources. 2008. [7] T. Joachims. Transductive inference for text classification using support vector machines. In ICML, pages 200–209, 1999. [8] T. Joachims. Training linear svms in linear time. In Proceedings of the ACM Conference on Knowledge Discovery and Data Mining (KDD), pages 217–226, 2006. [9] J. Langford and J. Shawe-taylor. Pac-bayes & margins. In NIPS 15, pages 439–446, 2002. [10] E. Lehmann. Nonparametric Statistical Methods Based on Ranks. McGraw-Hill, New York, 1975. [11] B. Leskes. The value of agreement, a new boosting algorithm. In COLT, pages 95–110, 2005. [12] D. D. Lewis, Y. Yang, T. Rose, and F. Li. RCV1: A new benchmark collection for text categorization research. Journal of Machine Learning Research, 5:361–397, 2004. [13] I. Muslea. Active learning with multiple views. PhD thesis, USC, 2002. [14] Reuters. Corpus, volume 2, multilingual corpus, 1996-08-20 to 1997-08-19. 2005. [15] N. Ueffing, M. Simard, S. Larkin, and J. H. Johnson. NRC’s PORTAGE system for WMT. In In ACL-2007 Second Workshop on SMT, pages 185–188, 2007. [16] X. Zhu. Semi-supervised learning literature survey. Technical report, Univ. Wisconsis, 2007.
2009
251
3,761
Measuring model complexity with the prior predictive Wolf Vanpaemel ∗ Department of Psychology University of Leuven Belgium. wolf.vanpaemel@psy.kuleuven.be Abstract In the last few decades, model complexity has received a lot of press. While many methods have been proposed that jointly measure a model’s descriptive adequacy and its complexity, few measures exist that measure complexity in itself. Moreover, existing measures ignore the parameter prior, which is an inherent part of the model and affects the complexity. This paper presents a stand alone measure for model complexity, that takes the number of parameters, the functional form, the range of the parameters and the parameter prior into account. This Prior Predictive Complexity (PPC) is an intuitive and easy to compute measure. It starts from the observation that model complexity is the property of the model that enables it to fit a wide range of outcomes. The PPC then measures how wide this range exactly is. keywords: Model Selection & Structure Learning; Model Comparison Methods; Perception The recent revolution in model selection methods in the cognitive sciences was driven to a large extent by the observation that computational models can differ in their complexity. Differences in complexity put models on unequal footing when their ability to approximate empirical data is assessed. Therefore, models should be penalized for their complexity when their adequacy is measured. The balance between descriptive adequacy and complexity has been termed generalizability [1, 2]. Much attention has been devoted to developing, advocating, and comparing different measures of generalizability (for a recent overview, see [3]). In contrast, measures of complexity have received relatively little attention. The aim of the current paper is to propose and illustrate a stand alone measure of model complexity, called the Prior Predictive Complexity (PPC). The PPC is based on the intuitive idea that a complex model can predict many outcomes and a simple model can predict a few outcomes only. First, I discuss existing approaches to measuring model complexity and note some of their limitations. In particular, I argue that currently existing measures ignore one important aspect of a model: the prior distribution it assumes over the parameters. I then introduce the PPC, which, unlike the existing measures, is sensitive to the parameter prior. Next, the PPC is illustrated by calculating the complexities of two popular models of information integration. 1 Previous approaches to measuring model complexity A first approach to assess the (relative) complexity of models relies on simulated data. Simulationbased methods differ in how these artificial data are generated. A first, atheoretical approach uses random data [4, 5]. In the semi-theoretical approach, the data are generated from some theoretically ∗I am grateful to Michael Lee and Liz Bonawitz. 1 interesting functions, such as the exponential or the logistic function [4]. Using these approaches, the models under consideration are equally complex if each model provides the best optimal fit to roughly the same number of data sets. A final approach to generating artificial data is a theoretical one, in which the data are generated from the models of interest themselves [6, 7]. The parameter sets used in the generation can either be hand-picked by the researcher, estimated from empirical data or drawn from a previously specified distribution. If the models under consideration are equally complex, each model should provide the best optimal fit to self-generated data more often than the other models under consideration do. One problem with this simulation-based approach is that it is very labor intensive. It requires generating a large amount of artificial data sets, and fitting the models to all these data sets. Further, it relies on choices that are often made in an arbitrary fashion that nonetheless bias the results. For example, in the semi-theoretical approach, a crucial choice is which functions to use. Similarly, in the theoretical approach, results are heavily influenced by the parameter values used in generating the data. If they are fixed, on what basis? If they are estimated from empirical data, from which data? If they are drawn randomly, from which distribution? Further, a simulation study only gives a rough idea of complexity differences but provides no direct measure reflecting the complexity. A number of proposals have been made to measure model complexity more directly. Consider a model M with k parameters, summarized in the parameter vector θ = (θ1, θ2, . . . , θk, ) which has a range indicated by Ω. Let d denote the data and p(d|θ, M) the likelihood. The most straightforward measure of model complexity is the parametric complexity (PC), which simply counts the number of parameters: PC = k. (1) PC is attractive as a measure of model complexity since it is very easy to calculate. Further, it has a direct and well understood relation toward complexity: the more parameters, the more complex the model. It is included as the complexity term of several generalizability measures such as AIC [8] and BIC [9], and it is at the heart of the Likelihood Ratio Test. Despite this intuitive appeal, PC is not free from problems. One problem with PC is that it reflects only a single aspect of complexity. Also the parameter range and the functional form (the way the parameters are combined in the model equation) influence a model’s complexity, but these dimensions of complexity are ignored in PC [2, 6]. A complexity measure that takes these three dimensions into account is provided by the geometric complexity (GC) measure, which is inspired by differential geometry [10]. In GC, complexity is conceptualized as the number of distinguishable probability distributions a model can generate. It is defined by GC = k 2 ln n 2π + ln Z Ω p det I(θ|M)dθ, (2) where n indicates the size of the data sample and I(θ) is the Fisher Information Matrix: Iij(θ|M) = −Eθ ∂2 ln p(d|θ, M) ∂θi∂θj . (3) Note that I(θ|M) is determined by the likelihood function p(d|θ, M), which is in turn determined by the model equation. Hence GC is sensitive to the number of parameters (through k), the functional form (through I), and the range (through Ω). Quite surprisingly, GC turns out to be equal to the complexity term used in one version of Minimum Description Length (MDL), a measure of generalizability developed within the domain of information theory [2, 11, 12, 13]. GC contrasts favorably with PC, in the sense that it takes three dimensions of complexity into account rather than a single one. A major drawback of GC is that, unlike PC, it requires considerable technical sophistication to be computed, as it relies on the second derivative of the likelihood. A more important limitation of both PC and GC is that these measures are insensitive to yet another important dimension contributing to model complexity: the prior distribution over the model parameters. The relation between the parameter prior distribution and model complexity is discussed next. 2 2 Model complexity and the parameter prior The growing popularity of Bayesian methods in psychology has not only raised awareness that model complexity should be taken into account when testing models [6], it has also drawn attention to the fact that in many occasions, relevant prior information is available [14]. In Bayesian methods, there is room to incorporate this information in two different flavors: as a prior distribution over the models, or as a prior distribution over the parameters. Specifying a model prior is a daunting task, so almost invariably, the model prior is taken to be uniform (but see [15] for an exception). In contrast, information regarding the parameter is much easier to include, although still challenging (e.g., [16]). There are two ways to formalize prior information about a model’s parameters: using the parameter prior range (often referred to as simply the range) and using the parameter prior distribution (often referred to as simply the prior). The prior range indicates which parameter values are allowed and which are forbidden. The prior distribution indicates which parameter values are likely and which are unlikely. Models that share the same equation and the same range but differ in the prior distribution can be considered different models (or at least different model versions), just like models that share the same equation but differ in range are different model versions. Like the parameter prior range, the parameter prior distribution influences the model complexity. In general, a model with a vague parameter prior distribution is more complex than a model with a sharply peaked parameter prior distribution, much as a model with a broad-ranged parameter is more complex than the same model where the parameter is heavily restricted. To drive home the point that the parameter prior should be considered when model complexity is assessed, consider the following “fair coin” model Mf and a “biased coin” model Mb. There is a clear intuitive complexity difference between these models: Mb is more complex than Mf. The most straightforward way to formalize these models is as follows, where ph denotes the probability of observing heads: ph = 1/2, (4) for model Mf and the triplet of equations ph = θ (5) 0 ≤θ ≤1 p(θ) = 1, jointly define model Mb. The range forbids values smaller than 0 or greater than 1 because ph is a proportion. As Mf and Mb have a different number of parameters, both PC and GC, being sensitive to the number of parameters, pick up the difference in model complexity between the models. Alternatively, model Mf could be defined as follows: ph = θ (6) 0 ≤θ ≤1 p(θ) = δ(θ −1 2), where δ(x) is the Dirac delta. Note that the model formalized in Equation 6 is exactly identical the model formalized in Equation 4. However, relying on the formulation of model Mf in Equation 6, PC and GC now judge Mf and Mb to be equally complex: both models share the same model equation (which implies they have the same number of parameters and the same functional form) and the same range for the parameter. Hence, PC and GC make an incorrect judgement of the complexity difference between both models. This misjudgement is a direct result of the insensitivity of these measures to the parameter prior. As models Mf and Mb have different prior distributions over their parameter, a measure sensitive to the prior would pick up the complexity difference between these models. Such a measure is introduced next. 3 The Prior Predictive Complexity Model complexity refers to the property of the model that enables it to predict a wide range of data patterns [2]. The idea of the PPC is to measure how wide this range exactly is. A complex model 3 can predict many outcomes, and a simple model can predict a few outcomes only. Model simplicity, then, refers to the property of placing restrictions on the possible outcomes: the greater restrictions, the greater the simplicity. To understand how model complexity is measured in the PPC, it is useful to think about the universal interval (UI) and the predicted interval (PI). The universal interval is the range of outcomes that could potentially be observed, irrespective of any model. For example, in an experiment with n binomial trials, it is impossible to observe less that zero successes, or more than n successes, so the range of possible outcomes is [0, n] . Similarly, the universal interval for a proportion is [0, 1]. The predicted interval is the interval containing all outcomes the model predicts. An intuitive way to gauge model complexity is then the cardinality of the predicted interval, relative to the cardinality of the universal interval, averaged over all m conditions or stimuli: PPC = 1 m m X i=1 |PIi| |UIi|. (7) A key aspect of the PPC is deriving the predicted interval. For a parameterized likelihood-based model, prediction takes the form of a distribution over all possible outcomes for some future, yet-tobe-observed data d under some model M. This distribution is called the prior predictive distribution (ppd) and can be calculated using the law of total probability: p(d|M) = Z Ω p(d|θ, M)p(θ|M)dθ. (8) Predicting the probability of unseen future data d arising under the assumption that model M is true involves integrating the probability of the data for each of the possible parameter values, p(d|θ, M), as weighted by the prior probability of each of these values, p(θ|M). Note that the ppd relies on the number of parameters (through the number of integrals and the likelihood), the model equation (through the likelihood), and the parameter range (through Ω). Therefore, as GC, the PPC is sensitive to all these aspects. In contrast to GC, however, the ppd, and hence the PPC, also relies on the parameter prior. Since predictions are made probabilistically, virtually all outcomes will be assigned some prior weight. This implies that, in principle, the predicted interval equals the universal interval. However, for some outcomes the assigned weight will be extremely small. Therefore, it seems reasonable to restrict the predicted interval to the smallest interval that includes some predetermined amount of the prior mass. For example, the 95% predictive interval is defined by those outcomes with the highest prior mass that together make up 95% of the prior mass. Analytical solutions to the integral defining the ppd are rarely available. Instead, one should rely on approximations to the ppd by drawing samples from it. In the current study, sampling was performed using WinBUGS [17, 18], a highly versatile, user friendly, and freely available software package. It contains sophisticated and relatively general-purpose Markov Chain Monte Carlo (MCMC) algorithms to sample from any distribution of interest. 4 An application example The PPC is illustrated by comparing the complexity of two popular models of information integration, which attempt to account for how people merge potentially ambiguous or conflicting information from various sensorial sources to create subjective experience. These models either assume that the sources of information are combined additively (the Linear Integration Model; LIM; [19]) or multiplicatively (the Fuzzy Logical Model of Perception; FLMP; [20, 21]). 4.1 Information integration tasks A typical information integration task exposes participants simultaneously to different sources of information and requires this combined experience to be identified in a forced-choice identification task. The presented stimuli are generated from a factorial manipulation of the sources of information by systematically varying the ambiguity of each of the sources. The relevant empirical data consist 4 of, for each of the presented stimuli, the counts km of the number of times the mth stimulus was identified as one of the response alternatives, out of the tm trials on which it was presented. For example, an experiment in phonemic identification could involve two phonemes to be identified, /ba/ and /da/ and two sources of information, auditory and visual. Stimuli are created by crossing different levels of audible speech, varying between /ba/ and /da/, with different levels of visible speech, also varying between these alternatives. The resulting set of stimuli spans a continuum between the two syllables. The participant is then asked to listen and to watch the speaker, and based on this combined audiovisual experience, to identify the syllable as being either /ba/ or /da/. In the so-called expanded factorial design, not only bimodal stimuli (containing both auditory and visual information) but also unimodal stimuli (providing only a single source of information) are presented. 4.2 Information integration models In what follows, the formal description of the LIM and the FLMP is outlined for a design with two response alternatives (/da/ or /ba/) and two sources (auditory and visual), with I and J levels, respectively. In such a two-choice identification task, the counts km follow a Binomial distribution: km ∼Binomial(pm, tm), (9) where pm indicates the probability that the mth stimulus is identified as /da/. 4.2.1 Model equation The probability for the stimulus constructed with the ith level of the first source and the jth level of the second being identified as /da/ is computed according to the choice rule: pij = s (ij, /da/) s (ij, /da/) + s (ij, /ba/), (10) where s (ij, /da/) represents the overall degree of support for the stimulus to be /da/. The sources of information are assumed to be evaluated independently, implying that different parameters are used for the different modalities. In the present example, the degree of auditory support for /da/ is denoted by ai (i = 1, . . . , I) and the degree of visual support for /da/ by bj (j = 1, . . . , J). When a unimodal stimulus is presented, the overall degree of support for each alternative is given by s (i∗, /da/) = ai and s (∗j, /da/) = bj, where the asterisk (*) indicates the absence of information, implying that Equation 10 reduces to pi∗= ai and p∗j = bj. (11) When a bimodal stimulus is presented, the overall degree of support for each alternative is based on the integration or blending of both these sources. Hence, for bimodal stimuli, s (ij, /da/) = ai N bj, where the operator N denotes the combination of both sources. Hence, Equation 10 reduces to pij = ai N bj ai N bj + (1 −ai) N(1 −bj). (12) The LIM assumes an additive combination, i.e., N = +, so Equation 12 becomes pij = ai + bj 2 . (13) The FLMP, in contrast, assumes a multiplicative combination, i.e., N = ×, so Equation 12 becomes pij = aibj aibj + (1 −ai)(1 −bj). (14) 5 4.2.2 Parameter prior range and distribution Each level of auditory and visual support for /da/ (i.e., ai and bj, respectively) is associated with a free parameter, which implies that the FLMP and the LIM have an equal number of free parameters, I + J. Each of these parameters is constrained to satisfy 0 ≤ai, bj ≤1. The original formulations of the LIM and FLMP unfortunately left the parameter priors unspecified. However, an implicit assumption that has been commonly used is a uniform prior for each of the parameters. This assumption implicitly underlies classical and widely adopted methods for model evaluation using accounted percentage of variance or maximum likelihood. ai ∼Uniform(0, 1) and bi ∼Uniform(0, 1) for i = 1, . . . , I; j = 1, . . . , J. (15) The models relying on this set of uniform priors will be referred to as LIMu and FLMPu. Note that LIMu and FLMPu treat the different parameters as independent. This approach misses important information. In particular, the experimental design is such that the amount of support for each level i + 1 is always higher than for level i. Because parameter ai (or bi) corresponds to the degree of auditory (or visual) support for a unimodal stimulus at the ith level, it seems reasonable to expect the following orderings among the parameters to hold (see also [6]): aj > ai and bj > bi for j > i. (16) The models relying on this set of ordered priors will be referred to as LIMo and FLMPo. 4.3 Complexity and experimental design It is tempting to consider model complexity as an inherent characteristic of a model. For some models and for some measures of complexity this is clearly the case. Consider, for example, model Mb. In any experimental design (i.e., a number of coin tosses), PCMb = 1. However, more generally, this is not the case. Focusing on the FLMP and the LIM, it is clear that even a simple measure as PC depends crucially on (some aspects of) the experimental design. In particular, every level corresponds to a new parameter, so PC = I + J . Similarly, GC is dependent on design choices. The PPC is not different in this respect. The design sensitivity implies that one can only make sensible conclusions about differences in model complexity by using different designs. In an information integration task, the design decisions include the type of design (expanded or not), the number of sources, the number of response alternatives, the number of levels for each source, and the number of observations for each stimulus (sample size). The present study focuses on the expanded factorial designs with two sources and two response alternatives. The additional design features were varied: both a 5 × 5 and a 8 × 2 design were considered, using three different sample sizes (20, 60 and 150, following [2]). 4.4 Results Figure 1 shows the 99% predicted interval in the 8×2 design with n = 150. Each panel corresponds to a different model. In each panel, each of the 26 stimuli is displayed on the x-axis. The first eight stimuli correspond to the stimuli with the lowest level of visual support, and are ordered in increasing order of auditory support. The next eight stimuli correspond to the stimuli with the highest level of visual support. The next eight stimuli correspond to the unimodal stimuli where only auditory information is provided (again ranked in increasing order). The final two stimuli are the unimodal visual stimuli. Panel A shows that the predicted interval of LIMu nearly equals the universal interval, ranging between 0 and 1. This indicates that almost all outcomes are given a non-negligible prior mass by LIMu, making it almost maximally complex. FLMPu is even more complex. The predicted interval, shown in Panel B, virtually equals the universal interval, indicating that the model predicts virtually every possible outcome. Panels C and D show the dramatic effect of incorporating relevant prior information in the models. The predicted intervals of both LIMo and FLMPo are much smaller than their counterparts using the uniform priors. Focusing on the comparison between LIM and FLMP, the PPC indicates that the latter is more complex than the former. This observation holds irrespective of the model version (assuming uniform 6 11 21 1* *1 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 Proportion of /da/ responses 11 21 1* *1 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 Proportion of /da/ responses A B 11 21 1* *1 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 Proportion of /da/ responses 11 21 1* *1 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 Proportion of /da/ responses C D Figure 1: The 99% predicted interval for each of the 26 stimuli (x-axis) according to LIMu (Panel A), FLMPu (Panel B), LIMo (Panel C), and FLMPo (Panel D). Table 1: PPC, based on the 99% predicted interval, for four models across six different designs. 5 × 5 8 × 2 20 60 150 20 60 150 LIMu 0.97 0.94 0.93 .97 0.95 0.94 FLMPu 1 1 0.99 1 1 0.99 LIMo 0.75 0.67 0.64 0.77 0.69 0.66 FLMPo 0.83 0.80 0.78 0.86 0.82 0.81 7 vs. ordered priors). The smaller complexity of LIM is in line with previous attempts to measure the relative complexities of LIM and FLMP, such as the atheoretical simulation-based approach ([4] but see [5]), the semi-theoretical simulation-based approach [4], the theoretical simulation-based approach [2, 6, 22], and a direct computation of the GC [2]. The PPC’s for all six designs considered are displayed in Table 1. It shows that the observations made for the 8 × 2, n = 150 design holds across the five remaining designs as well: LIM is simpler than FLMP; and models assuming ordered priors are simpler than models assuming uniform priors. Note that these conclusions would not have been possible based on PC or GC. For PC, all four models have the same complexity. GC, in contrast, would detect complexity differences between LIM and FLMP (i.e., the first conclusion), but due to its insensitivity to the parameter prior, the complexity differences between LIMu and LIMo on the one hand, and FLMPu and FLMPo on the other hand (i.e., the second conclusion) would have gone unnoticed. 5 Discussion A theorist defining a model should clearly and explicitly specify at least the three following pieces of information: the model equation, the parameter prior range, and the parameter prior distribution. If any of these pieces is missing, the model should be regarded as incomplete, and therefore untestable. Consequently, any measure of generalizability should be sensitive to all three aspects of the model definition. Many currently popular generalizability measures do not satisfy this criterion, including AIC, BIC and MDL. A measure of generalizability that does take these three aspects of a model into account is the marginal likelihood [6, 7, 14, 23]. Often, the marginal likelihood is criticized exactly for its sensitivity to the prior range and distribution (e.g., [24]). However, in the light of the fact that the prior is a part of the model definition, I see the sensitivity of the marginal likelihood to the prior as an asset rather than a nuisance. It is precisely the measures of generalizability that are insensitive to the prior that miss an important aspect of the model. Similarly, any stand alone measure of model complexity should be sensitive to all three aspects of the model definition, as all three aspects contribute to the model’s complexity (with the model equation contributing two factors: the number of parameters and the functional form). Existing measures of complexity do not satisfy this requirement and are therefore incomplete. PC takes only part of the model equation into account, whereas GC takes only the model equation and the range into account. In contrast, the PPC currently proposed is sensitive to all these three aspects. It assesses model complexity using the predicted interval which contains all possible outcomes a model can generate. A narrow predicted interval (relative to the universal interval) indicates a simple model; a complex model is characterized by a wide predicted interval. There is a tight coupling between the notions of information, knowledge and uncertainty, and the notion of model complexity. As parameters correspond to unknown variables, having more information available leads to fewer parameters and hence to a simpler model. Similarly, the more information there is available, the sharper the parameter prior, implying a simpler model. To put it differently, the less uncertainty present in a model, the narrower its predicted interval, and the simpler the model. For example, in model Mb, there is maximal uncertainty. Nothing but the range is known about θ, so all values of θ are equally likely. In contrast, in model Mf, there is minimal uncertainty. In fact, ph is known for sure, so only a single value of θ is possible. This difference in uncertainty is translated in a difference in complexity. The same is true for the information integration models. Incorporating the order constraints in the priors reduces the uncertainty compared to the models without these constraints (it tells you, for example, that parameter a1 is smaller than a2). This reduction in uncertainty is reflected by a smaller complexity. There are many different sources of prior information that can be translated in a range or distribution. The illustration using the information integration models highlighted that prior information can reflect meaningful information in the design. Alternatively, priors can be informed by previous applications of similar models in similar settings. Probably the purest form of priors are those that translate theoretical assumptions made by a model (see [16]). The fact that it is often difficult to formalize this prior information may not be used as an excuse to leave the prior unspecified. Sure it is a challenging task, but so is translating theoretical assumptions into the model equation. Formalizing theory, intuitions, and information is what model building is all about. 8 References [1] Myung, I. J. (2000) The importance of complexity in model selection. Journal of Mathematical Psychology, 44, 190–204. [2] Pitt, M. A., Myung, I. J., and Zhang, S. (2002) Toward a method of selecting among computational models of cognition. Psychological Review, 109, 472–491. [3] Shiffrin, R. M., Lee, M. D., Kim, W., and Wagenmakers, E. J. (2008) A survey of model evaluation approaches with a tutorial on hierarchical Bayesian methods. Cognitive Science, 32, 1248–1284. [4] Cutting, J. E., Bruno, N., Brady, N. P., and Moore, C. (1992) Selectivity, scope, and simplicity of models: A lesson from fitting judgments of perceived depth. Journal of Experimental Psychology: General, 121, 364–381. [5] Dunn, J. (2000) Model complexity: The fit to random data reconsidered. Psychological Research, 63, 174–182. [6] Myung, I. J. and Pitt, M. A. (1997) Applying Occam’s razor in modeling cognition: A Bayesian approach. Psychonomic Bulletin & Review, 4, 79–95. [7] Vanpaemel, W. and Storms, G. (in press) Abstraction and model evaluation in category learning. Behavior Research Methods. [8] Akaike, H. (1973) Information theory and an extension of the maximum likelihood principle. Petrov, B. and Csaki, B. (eds.), Second International Symposium on Information Theory, pp. 267–281, Academiai Kiado. [9] Schwarz, G. (1978) Estimating the dimension of a model. Annals of Statistics, 6, 461–464. [10] Myung, I. J., Balasubramanian, V., and Pitt, M. A. (2000) Counting probability distributions: Differential geometry and model selection. Proceedings of the National Academy of Sciences, 97, 11170–11175. [11] Lee, M. D. (2002) Generating additive clustering models with minimal stochastic complexity. Journal of Classification, 19, 69–85. [12] Rissanen, J. (1996) Fisher information and stochastic complexity. IEEE Transactions on Information Theory, 42, 40–47. [13] Gr¨unwald, P. (2000) Model selection based on minimum description length. Journal of Mathematical Psychology, 44, 133–152. [14] Lee, M. D. and Wagenmakers, E. J. (2005) Bayesian statistical inference in psychology: Comment on Trafimow (2003). Psychological Review, 112, 662–668. [15] Lee, M. D. and Vanpaemel, W. (2008) Exemplars, prototypes, similarities and rules in category representation: An example of hierarchical Bayesian analysis. Cognitive Science, 32, 1403–1424. [16] Vanpaemel, W. and Lee, M. D. (submitted) Using priors to formalize theory: Optimal attention and the generalized context model. [17] Lee, M. D. (2008) Three case studies in the Bayesian analysis of cognitive models. Psychonomic Bulletin & Review, 15, 1–15. [18] Spiegelhalter, D., Thomas, A., Best, N., and Lunn, D. (2004) WinBUGS User Manual Version 2.0. Medical Research Council Biostatistics Unit. Institute of Public Health, Cambridge. [19] Anderson, N. H. (1981) Foundations of information integration theory. Academic Press. [20] Oden, G. C. and Massaro, D. W. (1978) Integration of featural information in speech perception. Psychological Review, 85, 172–191. [21] Massaro, D. W. (1998) Perceiving Talking Faces: From Speech Perception to a Behavioral Principle. MIT Press. [22] Massaro, D. W., Cohen, M. M., Campbell, C. S., and Rodriguez, T. (2001) Bayes factor of model selection validates FLMP. Psychonomic Bulletin and Review, 8, 1–17. [23] Kass, R. E. and Raftery, A. E. (1995) Bayes factors. Journal of the American Statistical Association, 90, 773–795. [24] Liu, C. C. and Aitkin, M. (2008) Bayes factors: Prior sensitivity and model generalizability. Journal of Mathematical Psychology, 53, 362–375. 9
2009
252
3,762
Nonparametric Bayesian Texture Learning and Synthesis Long (Leo) Zhu1 Yuanhao Chen2 William Freeman1 Antonio Torralba1 1CSAIL, MIT {leozhu, billf, antonio}@csail.mit.edu 2Department of Statistics, UCLA yhchen@stat.ucla.edu Abstract We present a nonparametric Bayesian method for texture learning and synthesis. A texture image is represented by a 2D Hidden Markov Model (2DHMM) where the hidden states correspond to the cluster labeling of textons and the transition matrix encodes their spatial layout (the compatibility between adjacent textons). The 2DHMM is coupled with the Hierarchical Dirichlet process (HDP) which allows the number of textons and the complexity of transition matrix grow as the input texture becomes irregular. The HDP makes use of Dirichlet process prior which favors regular textures by penalizing the model complexity. This framework (HDP-2DHMM) learns the texton vocabulary and their spatial layout jointly and automatically. The HDP-2DHMM results in a compact representation of textures which allows fast texture synthesis with comparable rendering quality over the state-of-the-art patch-based rendering methods. We also show that the HDP2DHMM can be applied to perform image segmentation and synthesis. The preliminary results suggest that HDP-2DHMM is generally useful for further applications in low-level vision problems. 1 Introduction Texture learning and synthesis are important tasks in computer vision and graphics. Recent attempts can be categorized into two different styles. The first style emphasizes the modeling and understanding problems and develops statistical models [1, 2] which are capable of representing texture using textons and their spatial layout. But the learning is rather sensitive to the parameter settings and the rendering quality and speed is still not satisfactory. The second style relies on patch-based rendering techniques [3, 4] which focus on rendering quality and speed, but forego the semantic understanding and modeling of texture. This paper aims at texture understanding and modeling with fast synthesis and high rendering quality. Our strategy is to augment the patch-based rendering method [3] with nonparametric Bayesian modeling and statistical learning. We represent a texture image by a 2D Hidden Markov Model (2D-HMM) (see figure (1)) where the hidden states correspond to the cluster labeling of textons and the transition matrix encodes the texton spatial layout (the compatibility between adjacent textons). The 2D-HMM is coupled with the Hierarchical Dirichlet process (HDP) [5, 6] which allows the number of textons (i.e. hidden states) and the complexity of the transition matrix to grow as more training data is available or the randomness of the input texture becomes large. The Dirichlet process prior penalizes the model complexity to favor reusing clusters and transitions and thus regular texture which can be represented by compact models. This framework (HDP-2DHMM) discovers the semantic meaning of texture in an explicit way that the texton vocabulary and their spatial layout are learnt jointly and automatically (the number of textons is fully determined by HDP-2DHMM). Once the texton vocabulary and the transition matrix are learnt, the synthesis process samples the latent texton labeling map according to the probability encoded in the transition matrix. The final 1 Figure 1: The flow chart of texture learning and synthesis. The colored rectangles correspond to the index (labeling) of textons which are represented by image patches. The texton vocabulary shows the correspondence between the color (states) and the examples of image patches. The transition matrices show the probability (indicated by the intensity) of generating a new state (coded by the color of the top left corner rectangle), given the states of the left and upper neighbor nodes (coded by the top and left-most rectangles). The inferred texton map shows the state assignments of the input texture. The top-right panel shows the sampled texton map according to the transition matrices. The last panel shows the synthesized texture using image quilting according to the correspondence between the sampled texton map and the texton vocabulary. image is then generated by selecting the image patches based on the sampled texton labeling map. Here, image quilting [3] is applied to search and stitch together all the patches so that the boundary inconsistency is minimized. By contrast to [3], our method is only required to search a much smaller set of candidate patches within a local texton cluster. Therefore, the synthesis cost is dramatically reduced. We show that the HDP-2DHMM is able to synthesize texture in one second (25 times faster than image quilting) with comparable quality. In addition, the HDP-2DHMM is less sensitive to the patch size which has to be tuned over different input images in [3]. We also show that the HDP-2DHMM can be applied to perform image segmentation and synthesis. The preliminary results suggest that the HDP-2DHMM is generally useful for further applications in low-level vision problems. 2 Previous Work Our primary interest is texture understanding and modeling. The FRAME model [7] provides a principled way to learn Markov random field models according to the marginal image statistics. This model is very successful in capturing stochastic textures, but may fail for more structured textures due to lack of spatial modeling. Zhu et al. [1, 2] extend it to explicitly learn the textons and their spatial relations which are represented by extra hidden layers. This new model is parametric (the number of texton clusters has to be tuned by hand for different texture images) and model selection which might be unstable in practice, is needed to avoid overfitting. Therefore, the learning is sensitive to the parameter settings. Inspired by recent progress in machine learning, we extend the nonparametric Bayesian framework of coupling 1D HMM and HDP [6] to deal with 2D texture image. A new model (HDP-2DHMM) is developed to learn texton vocabulary and spatial layouts jointly and automatically. Since the HDP-2DHMM is designed to generate appropriate image statistics, but not pixel intensity, a patch-based texture synthesis technique, called image quilting [3], is integrated into our system to sample image patches. The texture synthesis algorithm has also been applied to image inpainting [8]. 2 ȕ Ȗ Į ... ... ... ... Į' ʌ ș z1 z2 x1 z3 x3 z4 x2 x4 ’ z Figure 2: Graphical representation of the HDP-2DHMM. α, α′, γ are hyperparameters set by hand. β are state parameters. θ and π are emission and transition parameters, respectively. i is the index of nodes in HMM. L(i) and T(i) are two nodes on the left and top of node i. zi are hidden states of node i. xi are observations (features) of the image patch at position i. Malik et al. [9, 10] and Varma and Zisserman [11] study the filter representations of textons which are related to our implementations of visual features. But the interactions between textons are not explicitly considered. Liu et al. [12, 13] address texture understanding by discovering regularity without explicit statistical texture modeling. Our work has partial similarities with the epitome [14] and jigsaw [15] models for non-texture images which also tend to model appearance and spatial layouts jointly. The major difference is that their models, which are parametric, cannot grow automatically as more data is available. Our method is closely related to [16] which is not designed for texture learning. They use hierarchical Dirichlet process, but the models and the image feature representations, including both the image filters and the data likelihood model, are different. The structure of 2DHMM is also discussed in [17]. Other work using Dirichlet prior includes [18, 19]. Tree-structured vector quantization [20] has been used to speed up existing image-based rendering algorithms. While this is orthogonal to our work, it may help us optimize the rendering speed. The meaning of “nonparametric” in this paper is under the context of Bayesian framework which differs from the non-Bayesian terminology used in [4]. 3 Texture Modeling 3.1 Image Patches and Features A texture image I is represented by a grid of image patches {xi} with size of 24 × 24 in this paper where i denotes the location. {xi} will be grouped into different textons by the HDP-2DHMM. We begin with a simplified model where the positions of textons represented by image patches are pre-determined by the image grid, and not allowed to shift. We will remove this constraint later. Each patch xi is characterized by a set of filter responses {wl,h,b i } which correspond to values b of image filter response h at location l. More precisely, each patch is divided into 6 by 6 cells (i.e. l = 1..36) each of which contains 4 by 4 pixels. For each pixel in cell l, we calculate 37 (h = 1..37) image filter responses which include the 17 filters used in [21], Difference of Gaussian (DOG, 4 filters), Difference of Offset Gaussian (DOOG, 12 filters ) and colors (R,G,B and L). wl,h,b i equals one if the averaged value of filter responses of the 4*4 pixels covered by cell l falls into bin b (the response values are divided into 6 bins), and zero otherwise. Therefore, each patch xi is represented by 7992 (= 37 ∗36 ∗6) dimensional feature responses {wl,h,b i } in total. We let q = 1..7992 denote the index of the responses of visual features. It is worth emphasizing that our feature representation differs from standard methods [10, 2] where k-means clustering is applied to form visual vocabulary first. By contrast, we skip the clustering step and leave the learning of texton vocabulary together with spatial layout learning into the HDP2DHMM which takes over the role of k-means. 3.2 HDP-2DHMM: Coupling Hidden Markov Model with Hierarchical Dirichlet Process A texture is modeled by a 2D Hidden Markov Model (2DHMM) where the nodes correspond to the image patches xi and the compatibility is encoded by the edges connecting 4 neighboring nodes. See the graphical representation of 2DHMM in figure 2. For any node i, let L(i), T(i), R(i), D(i) denote the four neighbors, left, upper, right and lower, respectively. We use zi to index the states 3 • β ∼GEM(α) • For each state z ∈{1, 2, 3, ...} – θz ∼Dirichlet(γ) – πzL ∼DP(α′, β) – πzT ∼DP(α′, β) • For each pair of states (zL, zT ) – πzL,zT ∼DP(α′, β) • For each node i in the HMM – if L(i) ̸= ∅and T(i) ̸= ∅: zi|(zL(i), zT (i)) ∼Multinomial(πzL,zT ) – if L(i) ̸= ∅and T(i) = ∅: zi|zL(i) ∼Multinomial(πzL) – if L(i) = ∅and T(i) ̸= ∅: zi|zT (i) ∼Multinomial(πzT ) – xi ∼Multinomial(θzi) Figure 3: HDP-2DHMM for texture modeling of node i which correspond to the cluster labeling of textons. The likelihood model p(xi|zi) which specifies the probability of visual fetures is defined by multinomial distribution parameterized by θzi specific to its corresponding hidden state zi: xi ∼Multinomial(θzi) (1) where θzi specify the weights of visual features. For node i which is connected to the nodes above and on the left (i.e. L(i) ̸= ∅and T(i) ̸= ∅), the probability p(zi|zL(i), zT (i)) of its state zi is only determined by the states (zL(i), zT (i)) of the connected nodes. The distribution has a form of multinomial distribution parameterized by πzL(i),zT (i): zi ∼Multinomial(πzL(i),zT (i)) (2) where πzL(i),zT (i) encodes the transition matrix and thus the spatial layout of textons. For the nodes which are on the top row or the left-most column (i.e. L(i) = ∅or T(i) = ∅), the distribution of their states are modeled by Multinomial(πzL(i)) or Multinomial(πzT (i)) which can be considered as simpler cases. We assume the top left corner can be sampled from any states according to the marginal statistics of states. Without loss of generality, we will skip the details of the boundary cases, but only focus on the nodes whose states should be determined by their top and left nodes jointly. To make a nonparametric Bayesian representation, we need to allow the number of states zi countably infinite and put prior distributions over the parameters θzi and πzL(i),zT (i). We can achieve this by tying the 2DHMM together with the hierarchical Dirichlet process [5]. We define the prior of θz as a conjugate Dirichlet prior: θz ∼Dirichlet(γ) (3) where γ is the concentration hyperparameter which controls how uniform the distribution of θz is (note θz specify weights of visual features): as γ increases, it becomes more likely that the visual features have equal probability. Since the likelihood model p(xi|zi) is of multinomial form, the posterior distribution of θz has a analytic form, still a Dirichlet distribtion. The transition parameters πzL,zT are modeled by a hierarchical Dirichlet process (HDP): β ∼GEM(α) (4) πzL,zT ∼DP(α′, β) (5) where we first draw global weights β according to the stick-breaking prior distribution GEM(α). The stick-breaking weights β specify the probability of state which are globally shared among all nodes. The stick-breaking prior produces exponentially decayed weights in expectation such that simple models with less representative clusters (textons) are favored, given few observations, but, there is always a low-probability that small clusters are created to capture details revealed by large, complex textures. The concentration hyperparameter α controls the sparseness of states: a larger α leads to more states. The prior of the transition parameter πzL,zT is modeled by a Dirichlet 4 process DP(α′, β) which is a distribution over the other distribution β. α′ is a hyperparameter which controls the variability of πzL,zT over different states across all nodes: as α′ increases, the state transitions become more regular. Therefore, the HDP makes use of a Dirichlet process prior to place a soft bias towards simpler models (in terms of the number of states and the regularity of state transitions) which explain the texture. The generative process of the HDP-2DHMM is described in figure (3).We now have the full representation of the HDP-2DHMM. But this simplified model does not allow the textons (image patches) to be shifted. We remove this constraint by introducing two hidden variables (ui, vi) which indicate the displacements of textons associated with node i. We only need to adjust the correspondence between image features xi and hidden states zi. xi is modified to be xui,vi which refers to image features located at the position with displacement of (ui, vi) to the position i. Random variables (ui, vi) are only connected to the observation xi (not shown in figure 2). (ui, vi) have a uniform prior, but are limited to the small neighborhood of i (maximum 10% shift on one side). 4 Learning HDP-2DHMM In a Bayesian framework, the task of learning HDP-2DHMM (also called Bayesian inference) is to compute the posterior distribution p(θ, π, z|x). It is trivial to sample the hidden variables (u, v) because of their uniform prior. For simplicity, we skip the details of sampling u, v. Here, we present an inference procedure for the HDP-2DHMM that is based on Gibbs sampling. Our procedure alternates between two sampling stages: (i) sampling the state assignments z, (ii) sampling the global weights β. Given fixed values for z, β, the posterior of θ can be easily obtained by aggregating statistics of the observations assigned to each state. The posterior of π is Dirichlet. For more details on Dirichlet processes, see [5]. We first instantiate a random hidden state labeling and then iteratively repeat the following two steps. Sampling z. In this stage we sample a state for each node. The probability of node i being assigned state t is given by: P(zi = t|z−i, β) ∝f −xi t (xi)P(zi = t|zL(i), zT (i)) ·P(zR(i)|zi = t, zT (R(i)))P(zD(i)|zL(D(i)), zi = t) (6) The first term f −xi t (xi) denotes the posterior probability of observation xi given all other observations assigned to state t, and z−i denotes all state assignments except zi. Let nqt be the number of observations of feature wq with state t. f −xi t (xi) is calculated by: f −xi t (xi) = Y q ( nqt + γq P q′ nq′t + P q′ γq′ )wq i (7) where γq is the weight for visual feature wq. The next term P(zi = t|zL(i) = r, zT (i) = s) is the probability of state of t, given the states of the nodes on the left and above, i.e. L(i) and T(i). Let nrst be the number of observations with state t whose the left and upper neighbor nodes’ states are r for L(i) and s for T(i). The probability of generating state t is given by: P(zi = t|zL(i) = r, zT (i) = s) = nrst + α′βt P t′ nrst′ + α′ (8) where βt refers to the weight of state t. This calculation follows the properties of Dirichlet distribution [5]. The last two terms P(zR(i)|zi = t, zT (R(i))) and P(zD(i)|zL(D(i)), zi = t) are the probability of the states of the right and lower neighbor nodes (R(i), D(i)) given zi. These two terms can be computed in a similar form as equation (8). Sampling β. In the second stage, given the assignments z = {zi}, we sample β using the Dirichlet distribution as described in [5]. 5 Figure 4: The color of rectangles in columns 2 and 3 correspond to the index (labeling) of textons which are represented by 24*24 image patches. The synthesized images are all 384*384 (16*16 textons /patches). Our method captures both stochastic textures (the last two rows) and more structured textures (the first three rows, see the horizontal and grided layouts). The inferred texton maps for structured textures are simpler (less states/textons) and more regular (less cluttered texton maps) than stochastic textures. 5 Texture Synthesis Once the texton vocabulary and the transition matrix are learnt, the synthesis process first samples the latent texton labeling map according to the probability encoded in the transition matrix. But the HDP-2DHMM is generative only for image features, but not image intensity. To make it practical for image synthesis, image quilting [3] is integrated with the HDP-2DHMM. The final image is then generated by selecting image patches according to the texton labeling map. Image quilting is applied to select and stitch together all the patches in a top-left-to-bottom-right order so that the boundary inconsistency is minimized . The width of the overlap edge is 8 pixels. By contrast to [3] which need to search over all image patches to ensure high rendering quality, our method is only required to search the candidate patches within a local cluster. The HDP-2DHMM is capable of producing high rendering quality because the patches have been grouped based on visual features. Therefore, the synthesis cost is dramatically reduced. We show that the HDP-2DHMM is able to synthesize a 6 Figure 5: More synthesized texture images (for each pair, left is input texture, right is synthesized). texture image with size of 384*384 and with comparable quality in one second (25 times faster than image quilting). 6 Experimental Results 6.1 Texture Learning and Synthesis We use the texture images in [3]. The hyperparameters {α, α′, γ} are set to 10, 1, and 0.5, respectively. The image patch size is fixed to 24*24. All the parameter settings are identical for all images. The learning runs with 10 random initializations each of which takes about 30 sampling iterations to converge. A computer with 2.4 GHz CPU was used. For each image, it takes 100 seconds for learning and 1 second for synthesis (almost 25 times faster than [3]). Figure (4) shows the inferred texton labeling maps, the sampled texton maps and the synthesized texture images. More synthesized images are shown in figure (5). The rendering quality is visually comparable with [3] (not shown) for both structured textures and stochastic textures. It is interesting to see that the HMM-HDP captures different types of texture patterns, such as vertical, horizontal and grided layouts. It suggests that our method is able to discover the semantic texture meaning by learning texton vocabulary and their spatial relations. 7 Figure 6: Image segmentation and synthesis. The first three rows show the HDP-2DHMM is able to segment images with mixture of textures and synthesize new textures. The last row shows a failure example where the texton is not well aligned. 6.2 Image Segmentation and Synthesis We also apply the HDP-2DHMM to perform image segmentation and synthesis. Figure (6) shows several examples of natural images which contain mixture of textured regions. The segmentation results are represented by the inferred state assignments (the texton map). In figure (6), one can see that our method successfully divides images into meaningful regions and the synthesized images look visually similar to the input images. These results suggest that the HDP-2DHMM framework is generally useful for low-level vision problems. The last row in figure (6) shows a failure example where the texton is not well aligned. 7 Conclusion This paper describes a novel nonparametric Bayesian method for textrure learning and synthesis. The 2D Hidden Markov Model (HMM) is coupled with the hierarchical Dirichlet process (HDP) which allows the number of textons and the complexity of transition matrix grows as the input texture becomes irregular. The HDP makes use of Dirichlet process prior which favors regular textures by penalizing the model complexity. This framework (HDP-2DHMM) learns the texton vocabulary and their spatial layout jointly and automatically. We demonstrated that the resulting compact representation obtained by the HDP-2DHMM allows fast texture synthesis (under one second) with comparable rendering quality to the state-of-the-art image-based rendering methods. Our results on image segmentation and synthesis suggest that the HDP-2DHMM is generally useful for further applications in low-level vision problems. Acknowledgments. This work was supported by NGA NEGI-1582-04-0004, MURI Grant N0001406-1-0734, ARDA VACE, and gifts from Microsoft Research and Google. Thanks to the anonymous reviewers for helpful feedback. 8 References [1] Y. N. Wu, S. C. Zhu, and C.-e. Guo, “Statistical modeling of texture sketch,” in ECCV ’02: Proceedings of the 7th European Conference on Computer Vision-Part III, 2002, pp. 240–254. [2] S.-C. Zhu, C.-E. Guo, Y. Wang, and Z. Xu, “What are textons?” International Journal of Computer Vision, vol. 62, no. 1-2, pp. 121–143, 2005. [3] A. A. Efros and W. T. Freeman, “Image quilting for texture synthesis and transfer,” in Siggraph, 2001. [4] A. Efros and T. Leung, “Texture synthesis by non-parametric sampling,” in International Conference on Computer Vision, 1999, pp. 1033–1038. [5] Y. W. Teh, M. I. Jordan, M. J. Beal, and D. M. Blei, “Hierarchical dirichlet processes,” Journal of the American Statistical Association, 2006. [6] M. J. Beal, Z. Ghahramani, and C. E. Rasmussen, “The infinite hidden markov model,” in NIPS, 2002. [7] S. C. Zhu, Y. Wu, and D. Mumford, “Filters, random fields and maximum entropy (frame): Towards a unified theory for texture modeling,” International Journal of Computer Vision, vol. 27, pp. 1–20, 1998. [8] A. Criminisi, P. Perez, and K. Toyama, “Region filling and object removal by exemplar-based inpainting,” IEEE Trans. on Image Processing, 2004. [9] J. Malik, S. Belongie, J. Shi, and T. Leung, “Textons, contours and regions: Cue integration in image segmentation,” IEEE International Conference on Computer Vision, vol. 2, 1999. [10] T. Leung and J. Malik, “Representing and recognizing the visual appearance of materials using three-dimensional textons,” International Journal of Computer Vision, vol. 43, pp. 29–44, 2001. [11] M. Varma and A. Zisserman, “Texture classification: Are filter banks necessary?” IEEE Computer Society Conference on Computer Vision and Pattern Recognition, vol. 2, 2003. [12] Y. Liu, W.-C. Lin, and J. H. Hays, “Near regular texture analysis and manipulation,” ACM Transactions on Graphics (SIGGRAPH 2004), vol. 23, no. 1, pp. 368 – 376, August 2004. [13] J. Hays, M. Leordeanu, A. A. Efros, and Y. Liu, “Discovering texture regularity as a higherorder correspondence problem,” in 9th European Conference on Computer Vision, May 2006. [14] N. Jojic, B. J. Frey, and A. Kannan, “Epitomic analysis of appearance and shape,” in In ICCV, 2003, pp. 34–41. [15] A. Kannan, J. Winn, and C. Rother, “Clustering appearance and shape by learning jigsaws,” in In Advances in Neural Information Processing Systems. MIT Press, 2007. [16] J. J. Kivinen, E. B. Sudderth, and M. I. Jordan, “Learning multiscale representations of natural scenes using dirichlet processes,” IEEE International Conference on Computer Vision, vol. 0, 2007. [17] J. Domke, A. Karapurkar, and Y. Aloimonos, “Who killed the directed model?” in IEEE Computer Society Conference on Computer Vision and Pattern Recognition, 2008. [18] L. Cao and L. Fei-Fei, “Spatially coherent latent topic model for concurrent object segmentation and classification,” in Proceedings of IEEE International Conference on Computer Vision, 2007. [19] X. Wang and E. Grimson, “Spatial latent dirichlet allocation,” in NIPS, 2007. [20] L.-Y. Wei and M. Levoy, “Fast texture synthesis using tree-structured vector quantization,” in SIGGRAPH ’00: Proceedings of the 27th annual conference on Computer graphics and interactive techniques, 2000, pp. 479–488. [21] J. Winn, A. Criminisi, and T. Minka, “Object categorization by learned universal visual dictionary,” in Proceedings of the Tenth IEEE International Conference on Computer Vision, 2005. 9
2009
253
3,763
A Bayesian Model for Simultaneous Image Clustering, Annotation and Object Segmentation Lan Du, Lu Ren, 1David B. Dunson and Lawrence Carin Department of Electrical and Computer Engineering 1Statistics Department Duke University Durham, NC 27708-0291, USA {ld53, lr, lcarin}@ee.duke.edu, dunson@stats.duke.edu Abstract A non-parametric Bayesian model is proposed for processing multiple images. The analysis employs image features and, when present, the words associated with accompanying annotations. The model clusters the images into classes, and each image is segmented into a set of objects, also allowing the opportunity to assign a word to each object (localized labeling). Each object is assumed to be represented as a heterogeneous mix of components, with this realized via mixture models linking image features to object types. The number of image classes, number of object types, and the characteristics of the object-feature mixture models are inferred nonparametrically. To constitute spatially contiguous objects, a new logistic stick-breaking process is developed. Inference is performed efficiently via variational Bayesian analysis, with example results presented on two image databases. 1 Introduction There has recently been much interest in developing statistical models for analyzing and organizing images, based on image features and, when available, auxiliary information, such as words (e.g., annotations). Three important aspects of this problem are: (i) sorting multiple images into scene-level classes, (ii) image annotation, and (iii) segmenting and labeling localized objects within images. Probabilistic topic models, originally developed for text analysis [8, 12], have been adapted and extended successfully for many image-understanding problems [3, 6, 9–11, 16, 23, 24]. Moreover, recent work has also used the Dirichlet process (DP) [5] or similar non-parametric priors to enhance the topic-model structure [2, 20, 26]. Using such statistical models, researchers [2, 3, 6, 10, 16, 20, 23, 24, 26] have addressed two or all three of the objectives simultaneously within a single setting. Such unified formalisms have realized marked improvements in overall algorithm performance. A relatively complete summary of the literature may be found in [16, 23], where the advantages of the approaches in [16, 23] are described relative to previous related approaches [3, 6, 10, 11, 18, 24, 27]. The work in [16, 23] is based on the correspondence LDA (Corr-LDA) model [6]. The approach in [23] integrates the Corr-LDA model and the supervised LDA (sLDA) model [7] into a single framework. Although good classification performance was achieved using this approach, the model is employed in a supervised manner, utilizing scene-labeled images for scene classification. A class label variable is introduced in [16] to cluster all images in an unsupervised manner, and a switching variable to address noisy annotations. Nevertheless, to improve performance, in [16] some images are required for supervised learning, based on the segmented and labeled objects obtained via the method proposed in [10], with these used to initialize the algorithm. The research reported here seeks to build upon and extend recent research on unified image-analysis models. Specifically, motivated by [16, 23], we develop a novel non-parametric Bayesian model 1 that simultaneously addresses all three objectives discussed above. The four main contributions of this paper are: • Each object in an image is represented as a mixture of image-feature model parameters, accounting for the heterogeneous character of individual objects. This framework captures the idea that a particular object may be composed as an aggregation of distinct parts. By contrast, each object is only associated with one image-feature component/atom in the Corr-LDA-like models [6, 16, 23]. • Multiple images are processed jointly; all, none or a subset of the images may be annotated. The model infers the linkage between image-feature parameters and object types, with this linkage used to yield localized labeling of objects within all images. The unsupervised framework is executed without the need for a human to constitute training data. • A novel logistic stick-breaking process (LSBP) is proposed, imposing the belief that proximate portions of an image are more likely to reside within the same segment (object). This spatially constrained prior yields contiguous objects with sharp boundaries, and via the aforementioned mixture models the segmented objects may be composed of heterogeneous building blocks. • The proposed model is nonparametric, based on use of stick-breaking constructions [13], which can be easily implemented by fast variational Bayesian (VB) inference [14]. The number of image classes, number of object types, number of image-feature mixture components per object, and the linkage between words and image model parameters are inferred nonparametrically. 2 The Hierarchical Generative Model 2.1 Bag of image features We jointly process data from M images, and each image is assumed to come from an associated class type (e.g., city scene, beach scene, office scene, etc.). The class type associated with image m is denoted by zm ∈{1, . . ., I}, and it is drawn from the mixture model zm ∼ I X i=1 uiδi , u ∼StickI(αu) (1) where StickI(αu) is a stick-breaking process [13] that is truncated to I sticks, with hyper-parameter αu > 0. The symbol δi represents a unit measure at the integer i, and the parameter ui denotes the probability that image type i will be observed across the M images. The observed data are image feature vectors, each tied to a local region in the image (for example, associated with an over-segmented portion of the image). The Lm observed image feature vectors associated with image m are {xml}Lm l=1, and the lth feature vector is assumed drawn xml ∼F(θml). The expression F(·) represents the feature model, and θml represents the model parameters. Each image is assumed to be composed of a set of latent objects. An indicator variable ζml defines which object type the lth feature vector from image m is associated with, and it is drawn ζml ∼ K X k=1 wzmkδk , wi ∼StickK(αw) (2) where index k corresponds to the kth type of object that may reside within an image. The vector wi defines the probability that each of the K object types will occur, conditioned on the image type i ∈{1, . . ., I}; the kth component of wzm, wzmk, denotes the probability of observing object type k in image m, when image m was drawn from class zm ∈{1, . . . , I}. The image class zm and corresponding objects {ζml}Lm l=1 associated with image m are latent variables. The generative process for the observed data, {xml}Lm l=1, is manifested via mixture models with respect to model parameter θ. Specifically, a separate such mixture model is manifested for each of the K object types, motivated by the idea that each object will in general be composed of a different set of image-feature building blocks. The mixture model for object type k ∈{1, . . ., K} is represented as Gk = J X j=1 hkjδθ∗ j , hk ∼StickJ(αh) , θ∗ j ∼H (3) where H is a base measure, usually selected to be conjugate to F(·). 2.2 Bag of clustered image features While the model described above is straightforward to understand, it has been found to be ineffective. This is because each of the ζml is drawn i.i.d. from PK k=1 wzmkδk, and therefore there is 2 nothing in the model that encourages the image features, xml and xml′, which are associated with the same image-feature atom θ∗ j, to be assigned to the same object k. To address this limitation, we add a clustering step within each of the images; this is similar to the structure of the hierarchical Dirichlet process (HDP) [21]. Specifically, consider the following augmented model: xml ∼F(θml) , θml ∼Gcml , cml ∼ T X t=1 vmtδζmt , ζmt ∼ K X k=1 wzmkδk , zm ∼ I X i=1 uiδi (4) where vm ∼StickT (αv), and Gk is as defined in (3). We make truncation level T < K, to encourage a relatively small number of objects in a given image. 2.3 Linking words with images In the above discussion it was assumed that the only observed data are the image feature vectors {xml}Lm l=1. However, there are situations for which annotations (words) may be available for at least a subset of the M images. In this setting we assume that we have a K-dimensional dictionary of words associated with objects in images, and a word is assigned to each of the objects k ∈ {1, . . . , K}. Of the collection of M images, some may be annotated and some not, and all will be processed simultaneously by the joint model; in so doing, annotations will be inferred for the originally non-annotated images. For an image for which no annotation is given, the image is assumed generated via (4). When an annotation is available, the words associated with image m are represented as a vector ym = [ym1, · · · , ymK]T, where ymk denotes the number of times word k is present in the annotation to image m (typically ymk will either be one or zero), and ym is assumed drawn from a multinomial distribution associated with a parameter ϕm: ym ∼Mult(ϕm). If image m is in class zm, then we simply set ym ∼Mult(wzm) , wi ∼StickK(αw) (5) Namely, ϕm = wzm, recalling that wi defines the probability of observing each object type for image class i. When a dictionary of K words is available, we generally use wi ∼ Dir(αw/K, . . . , αw/K), consistent with LDA [8]. 3 Encouraging Spatially Contiguous Objects 3.1 Logistic stick-breaking process (LSBP) In (5), note that once the image class zm is drawn for image m, the order/location of the xml within the image may be interchanged, and nothing in the generative process will change. This is because the indicator variable cml, which defines the object class associated with feature vector l in image m, is drawn i.i.d. cml ∼PT t=1 vmtδζmt. It is therefore desirable to impose that if two feature vectors are proximate within the image, they are likely to be associated with the same object. With each feature vector xml there is an associated spatial location, which we denote sml (this is a two-dimensional vector). We wish to draw cml ∼ T X t=1 vmt(sml)δζmt , ζmt ∼ K X k=1 wzmkδk (6) where the cluster probabilities vmt(sml) are now a function of position sml (the ζmt ∈{1, . . ., K} correspond to object types). The challenge, therefore, becomes developmentof a means of constructing vmt(s) to encourage nearby feature vectors to come from the same object type. Toward this goal, let σ[gmt(s)] represent a logistic link function, which is a function of s. For t = 1, . . . , T −1 we impose vmt(s) = σ[gmt(s)] t−1 Y τ=1 {1 −σ[gmτ(s)]} (7) where vmT (s) = 1 −PT −1 t=1 vmt(s). We define gmt(s) = PLm l=1 W (m) tl K(s, sml) + W (m) t0 where K(s, sml) is a kernel, and here we utilize the radial basis function kernel K(s, sml) = exp[−∥s −sml∥2/φmt]. The parameter kernel width φmt plays an important role in dictating the size of segments associated with stick t, and therefore these parameters should be learned by the data in the analysis. In practice we define a library of discrete kernel widths φ∗= {φ∗ d}D d=1, and infer each φmt, placing a uniform prior on the elements of φ∗. 3 We desire that a given stick vmt(s) has importance (at most) over a localized region, and therefore we impose sparseness priors on parameters {W (m) tl }Lm l=0. Specifically, W (m) tl ∼N(0, (η(m) tl )−1), and η(m) tl is drawn from a gamma prior, with hyper-parameters set to encourage most η(m) tl →∞. Such a Student-t prior is also applied in [4]. The model described above is termed a logistic stick-breaking process (LSBP). For notational convenience, cml ∼PT t=1 vmt(sml)δζmt and ζmt ∼PK k=1 wzmkδk constructed as above is represented as a draw from LSBPT (wzm). Figure 1 depicts the detailed generative process of the proposed model with LSBP. 1 ~ I m i i i z u d =å ~ L S B P ( ) m m l T z c w S k y ~ m l G θ T r e e ~ m l G θ G r a s s ~ m l G θ B u i l d i n g ~ m l G θ S k y B u i l d i n g G r a s s T r e e ( ) i i ( ) i i i ( ) i v L L S c e n e 1 S c e n e 2 S c e n e i S c e n e I i I ( ) i Figure 1: Depiction of the generative process. (i) A scene-class indicator zm ∈{1, . . . , I} is drawn to define the image class; (ii) conditioned on zm, and using the LSBP, contiguous segmented blocks are constituted, with associated words defined by object indicator cml ∈{1, · · · , K}, where wi defines the probability of observing each object type for image class i; (iii) conditioned on cml, image-feature atoms are drawn from appropriate mixture models Gcml, linked to over-segmented regions within each of the object clusters; (iv) the image-feature model parameters are responsible for generating the image features, via the model F(θ), where θ is the image-feature parameter. 3.2 Discussion of LSBP properties and comparison with KSBP There are two key components of the LSBP construction: (i) sparseness promotion on the W (m) tl , and (ii) the use of a logistic link function to define spatial stick weights. A particular non-zero W (m) tl is (via the kernel) associated with the lth local spatial region, with spatial extent defined by φmt. If W (m) tl is sufficiently large, the “clipping” property of the logistic link yields a spatially contiguous and extended region over which the tth LSBP layer will dominate. Specifically, c(t) ml will likely be the same for data samples located near (defined by φmt) where a large W (m) tl resides, since in this region σ[gmt(s)] →1. All locations s for which (roughly) gmt(s) ≥4 will have – via the “clipping” manifested via the logistic – nearly the same high probability of being associated with model layer t. Sharp segment boundaries are also encouraged by the steep slope of the logistic function. A related use of spatial information is constituted via the kernel stick-breaking process (KSBP) [2]. With the KSBP, rather than assuming exchangeable data, the vmt(s) in (6) is defined as: vmt(s) = VmtK(s, Γmt) t−1 Y τ [1 −VmtK(s, Γmτ; φ)] , Vmt ∼Beta(1, α0) (8) where K(s, Γmt) represents a kernel distance between the feature-vector spatial coordinate s and a local basis location Γmt associated with the tth stick. Although such a model also establishes spatial dependence within local regions, the form of the prior has not been found explicit enough to impose smooth segments with sharp boundaries, as demonstrated in [2]. 4 Using the Proposed Model 4.1 Inference Bayesian inference seeks to estimate the posterior distribution of the latent variables Ψ , given the observed data D and hyper-parameters Υ. We employ variational Bayesian (VB) [14] inference as a compromise between accuracy and efficiency. This method approximates an intractable joint posterior p(Ψ|D) of all the hidden variables by a product of marginal distributions q(Ψ) = Q f qf(Ψf), each over only a single hidden variable Ψf. The optimal parameterization of qf(Ψf) for each variable is obtained by minimizing the Kullback-Leibler divergence between the variational approximation q(Ψ) and the true joint posterior p(Ψ). 4 4.2 Processing images with no words given If one is given M images, all non-annotated, then the model may be employed on the data {xml}Lm l=1, for m = 1, . . . , M, from which a posterior distribution is inferred on the image model parameters {θ∗ j}J j=1, and on {Gk}K k=1. Note that properties of the image classes and of the objects within images is inferred by processing all M images jointly. By placing all images within the context of each other, the model is able to infer which building blocks (classes and objects) are responsible for all of the data. In this sense the simultaneous processing of multiple images is critical: the learning of properties of objects in one image is aided by the properties being learned for objects in all other images, through the inference of inter-relationships and commonalities. After the M images are analyzed in the absence of annotations, one may observe example portions of the M images, to infer the link between actual object characteristics within imagery and the associated latent object indicator to which it was assigned. With this linkage made, one may assign words to all or a subset of the K object types. After words are assigned to previously latent object types, the results of the analysis (with no additional processing) may be used to automatically label regions (objects) in all of the images. This is manifested because each of the cluster indicators cml is associated with a latent localized object type (to which a word may now be assigned). 4.3 Joint processing of images and annotations We may consider problems for which a subset of the images are provided with annotations (but not the explicit location and segmented-out objects); the words are assumed to reside in a prescribed dictionary of object types. The generation of the annotations (and images) is constituted via the model in (5), with the LSBP employed as discussed. We do not require that all images are annotated (the non-annotated images help learn the properties of the image features, and are therefore useful even if they do not provide information about the words). It is desirable that the same word be annotated for multiple images. The presence of the same word within the annotations of multiple images encourages the model to infer what objects (represented in terms of image features) are common to the associated images, aiding the learning. Hence, the presence of annotations serves as a learning aid (encourages looking for commonalities between particular images, if words are shared in the associated annotations). Further, the annotations associated with images may disambiguate objects that appear similar in image-feature space (because they will have different annotations). From the above discussion, the model performance will improve as more images are annotated with each word, but presumably this annotation is much easier for the human than requiring one to segment out and localize words within a scene. 5 Experimental Results Experiments are performed on two real-world data sets: subsets of Microsoft Research (MSRC) data ( http://research.microsoft.com/en-us/projects/objectclassrecognition/) and UIUC-Sport data from [15, 16], the latter images originally obtained from the Flickr website and available online ( http://vision.cs.princeton.edu/lijiali/event dataset/). For the MSRC dataset, 10 categories of images with manual annotations are selected: “tree”, “building”, “cow”, “face”, “car”, “sheep”, “flower”, “sign”, “book” and “chair”. The number of images in the “cow” class is 45, and in the “sheep” class there are 35; there are 30 images in all other classes. From each category, we randomly choose 10 images, and remove the annotations, treating these as non-annotated images within the analysis (to allow quantification of inferred-annotation quality). Each image is of size 213 × 320 or 320 × 213. In addition, we remove all words that occur less that 8 times (approximately 1% of all words). There are 14 unique words: “void”, “building”, “grass”, “tree”, “cow”, “sheep”, “sky”, “face”, “car”, “flower”, “sign”, “book”, “chair” and “road”. We assume that each word corresponds to a visual object in the image. Regarding the case in which multiple words may refer to the same object, one may use the method mentioned in [16] to group synonyms in the preprocessing phase (not necessary here). The following analysis, in which annotated and non-annotated images are processed jointly, is executed as discussed in Section 4.3. The UIUC-Sport dataset [15, 16] contains 8 types of sports: “badminton”, “bocce”, “croquet”, “polo”, “rock climbing”, “rowing”, “sailing” and “snowboarding”. Here we randomly choose 25 images for each category, and each image is resized to a dimension of 240 × 320 or 320 × 240. Since the annotations are not available at the cited website, the analysis is initially performed with no words, as discussed in Section 4.2. After performing this analysis, and upon examining the properties of segmented data associated with each (latent) object class on a small subset of the data, 5 we can infer words associated with some important Gk, and then label portions (objects) within each image via the inferred words. This process is different than in [6, 16, 23], in which annotations were employed. When investigating algorithm performance, we make comparisons to Corr-LDA [6]. Our objectives are related to those in [16, 23], but to the authors’ knowledge the associated software is not currently available. The Corr-LDA model [6] is relatively simple, and has been coded ourselves. We also examine our model with the proposed LSBP replaced with with KSBP. 5.1 Image preprocessing Each image is first segmented into 800 “superpixels”, which are local, coherent and preserve most of the structure necessary for segmentation at the scale of interest [19]. The software used for over-segmentation is discussed in [17] and is available online (http://www.cs.sfu.ca/∼mori/research/superpixels/). Each superpixel is represented by both color and texture descriptors, based on the local RGB, hue [25] feature vectors and also the output of maximum response (MR) filter banks [22] (http://www.robots.ox.ac.uk/∼vgg/research/texclass/filters.html). We discretize these features using a codebook of size 64 (other codebook sizes gave similar performance), and then calculate the distribution [1] for each feature within each superpixel as visual words [3, 6, 10, 11, 20, 23, 24]. Since each superpixel is represented by three visual words, the mixture atoms θ∗ j are three multinomial distributions {Mult(Θ∗ 1j) N Mult(Θ∗ 2j) N Mult(Θ∗ 3j)} for j = 1, · · · , J. Accordingly, the variational distribution in the VB [14] analysis is q(θ∗ j) = Dir(Θ∗ 1j|˜ρ1j) N Dir(Θ∗ 2j|˜ρ2j) N Dir(Θ∗ 3j|˜ρ3j). The center of each superpixel is recorded as the location coordinate sml. The set of discrete kernel widths φ∗are defined by 30, 35, · · · , 160, and a uniform multinomial prior is placed on these parameters (the size of each kernel is inferred, for each of the T LSBP layers, and separately in each of the M images). To save computational resources, rather than centering a kernel at each of the Lm points associated with the superpixels, the kernel spatial centers are placed once every 20 superpixels. We set truncation levels I = 20, J = 50 and T = 10 (similar results were found for larger truncations). For analysis on UIUC-Sport dataset, K = 40. All gamma priors for precision parameters αw, αv or {η(m) tl }T,Lm,M t=1,l=0,m=1, αu and αh are set as (10−6, 10−6). All these hyper-parameters and truncation levels have not been optimized or tuned. In the following comparisons, the number of topics is set to be same as the atom number, J = 50, and the Dirichlet hyperparameters are set as (1/J, . . . , 1/J)T for Corr-LDA model; a gamma prior is also used for the KSBP precision parameter, α0 in (8), also set as (10−6, 10−6). 5.2 Scene clustering The proposed model automatically learns a posterior distribution on mixture-weights u and in so doing infers an estimate of the proper number of scene classes. As shown in Figure 2, although we initialized the truncation level to I = 20, for the MSRC dataset only the first 10 clusters are selected as being important (the mixture weights for other clusters are very small); recall that “truth” indicated that there were 10 classes. In addition, based on the learned posterior word distribution wi for each image class i, we can further infer which words/objects are probable for each scene class. In Figure 2, we show two example wi for the MSRC “building” and “cow” classes. Although not shown here for brevity, the analysis on UIUC features correctly inferred the 8 image classes associated with that data (without using annotations). By examining the words and segmented objects extracted with high probability as represented by wi, we may also assign names to each of the 18 image classes across both the MSRC and UIUC data, consistent with the associated class labels provided with the data. For each image m ∈{1, . . . , M} we also have a posterior distribution on the associated class indicator zm. We approximate the membership for each image by assigning it to the mixture with largest probability. This “hard” decision is employed to provide scene-level label for each image (the Bayesian analysis can also yield a “soft” decision in terms of a full posterior distribution). Figure 3 presents the confusion matrices for the proposed model with and without LSBP, on both the MSRC and UIUC datasets. Both forms of the model yield relatively good results, but the average accuracy indicates that the model with LSBP performs better than that without LSBP for both datasets. Note 6 that the results in Figure 3 for the UIUC-Sport data cannot be directly compared with those in [6, 16], since our experiments were performed on non-annotated images. Using the concepts discussed in Section 4.2, and employing results from the processed nonannotated UIUC-Sport data, we examined the properties of segmented data associated with each (latent) object type. We inferred the presence of 12 unique objects, and these objects were assigned the following words: “human”, “horse”, “grass”, “sky”, “tree”, “ground”,“water”, “rock”, “court”, “boat”, “sailboat” and “snow”. Using these words, we annotated each image and re-trained our model in the presence of annotations. After doing so, the average accuracies of scene-level clustering are improved to 72.0% and 69.0% with and without LSBP, respectively. The improvement in performance, relative to processing the images without annotations, is attributed to the ability of words to disambiguate distinct objects that have similar properties in image-feature space (e.g., the distinct use of “boat” and “sailboat”, which helps distinguish rowing and sailing). 0 5 10 15 20 0 0.05 0.1 0.15 0.2 Cluster Index Mixture Weight Microsoft Research Data Building Sky Grass Tree Void 0 0.1 0.2 0.3 0.4 Object Index Probability building Grass Cow Tree Void Building 0 0.1 0.2 0.3 0.4 Object Index Probability cow Figure 2: Example inferred latent properties associated with MSRC dataset. Left: Posterior distribution on the mixture-weights u, quantifying the probability of scene classes (10 classes are inferred). Middle and Right: Example probability of objects for a given class, wi (probability of object/words); here we only give the top 5 words for each class. .83 .13 .00 .03 .00 .00 .00 .00 .00 .00 .10 .80 .00 .03 .00 .00 .00 .00 .07 .00 .04 .02 .87 .00 .00 .07 .00 .00 .00 .00 .03 .10 .00 .73 .00 .00 .07 .07 .00 .00 .03 .10 .00 .00 .87 .00 .00 .00 .00 .00 .03 .03 .09 .00 .00 .86 .00 .00 .00 .00 .00 .07 .00 .03 .00 .00 .83 .07 .00 .00 .03 .03 .00 .00 .00 .00 .10 .80 .03 .00 .00 .00 .00 .03 .00 .00 .00 .13 .83 .00 .10 .03 .00 .00 .00 .00 .00 .00 .00 .87 without LSBP tree building cow face car sheep flower sign book chair .87 .10 .00 .03 .00 .00 .00 .00 .00 .00 .13 .83 .00 .03 .00 .00 .00 .00 .00 .00 .04 .00 .89 .00 .00 .07 .00 .00 .00 .00 .03 .07 .00 .80 .00 .00 .07 .03 .00 .00 .00 .17 .00 .00 .83 .00 .00 .00 .00 .00 .00 .00 .11 .00 .00 .89 .00 .00 .00 .00 .00 .00 .00 .10 .00 .00 .87 .03 .00 .00 .00 .07 .00 .00 .00 .00 .03 .87 .03 .00 .00 .00 .00 .03 .00 .00 .00 .10 .87 .00 .07 .03 .00 .00 .00 .00 .00 .00 .00 .90 with LSBP tree building cow face car sheep flower sign book chair .76 .00 .08 .04 .00 .04 .04 .04 .08 .44 .24 .04 .04 .08 .00 .08 .04 .08 .72 .08 .04 .04 .00 .00 .04 .04 .12 .64 .04 .04 .04 .04 .00 .04 .04 .00 .76 .04 .04 .08 .04 .04 .04 .04 .00 .44 .32 .08 .04 .04 .04 .04 .04 .28 .44 .08 .04 .08 .04 .04 .08 .04 .04 .64 without LSBP badmi. bocce croquet polo rockc sailing rowing snowb. .76 .04 .04 .04 .00 .04 .04 .04 .04 .48 .24 .04 .04 .04 .04 .08 .04 .08 .72 .08 .04 .04 .00 .00 .04 .04 .12 .64 .04 .04 .04 .04 .00 .08 .04 .00 .76 .04 .00 .08 .04 .04 .00 .04 .00 .52 .28 .08 .04 .04 .04 .04 .04 .24 .52 .04 .04 .08 .00 .04 .08 .04 .04 .68 with LSBP badmi. bocce croquet polo rockc sailing rowing snowb. Figure 3: Comparisons using confusion matrices for all images in each dataset (all of the annotated and nonannotated images in MSRC; all the non-annotated images in UIUC-Sport). The left two results are for MSRC, and the right two for UIUC-Sport. In each pair, the result is without LSBP, and the right is with LSBP. Average performance, left to right: 82.90%, 86.80%, 60.50% and 63.50%. 5.3 Image annotation The proposed model infers a posterior distribution for the indicator variables cml (defining the object/word for super-pixel l in image m). Similar to the “hard” image-class assignment discussed above, a “hard” segmentation is employed here to provide object labels for each super-pixel. For the MSRC images for which annotations were held out, we evaluate whether the words associated with objects in a given image were given in the associated annotation (thus, our annotation is defined by the words we have assigned to objects in an image). Table 1: Comparison of precision and recall values for annotation and segmentation with Corr-LDA [6], our model without LSBP (Simp. Model) and the extended models with KSBP (Ext. with KSBP) and LSBP (Ext. with LSBP) on MSRC datasets. To evaluate annotation performance, the results are just calculated based on non-annotated images; while for segmentation, the results are based on all images. Annotation Segmentation Corr-LDA Simp. Model Ext. with LSBP Corr-LDA Simp. Model Ext. with KSBP Ext. with LSBP Object Prec Rec F Prec Rec F Prec Rec F Prec Rec F Prec Rec F Prec Rec F Prec Rec F car .18 .60 .28 .70 .70 .70 .70 .70 .70 .13 .08 .10 .49 .38 .43 .56 .50 .53 .61 .58 .60 tree .30 .50 .38 .50 .60 .55 .55 .60 .57 .06 .03 .04 .43 .38 .40 .48 .44 .46 .51 .48 .50 sheep .17 .60 .27 .70 .70 .70 .70 .70 .70 .02 .02 .02 .53 .63 .58 .57 .63 .60 .60 .62 .61 sky .38 .65 .48 .66 .60 .63 .68 .60 .64 .39 .29 .33 .40 .51 .45 .49 .54 .51 .55 .55 .55 chair .14 .60 .22 .70 .70 .70 .70 .70 .70 .13 .16 .15 .57 .55 .56 .58 .55 .57 .59 .55 .57 Mean .23 .63 .32 .65 .63 .64 .67 .65 .65 .17 .18 .16 .49 .51 .50 .53 .53 .53 .56 .54 .54 We use precision-recall and F-measures [16, 23] to quantitatively evaluate the annotation performance. The left part of Table 1 lists detailed annotation results for five objects, as well as the overall scores from all objects classes for the MSRC data. Our annotation results consistently and significantly outperform Corr-LDA, especially for the precision values. 7 5.4 Object segmentation Figure 4 shows some detailed object-segmentation results of Corr-LDA and the proposed model (with and without LSBP). We observe that our models generally yield visibly better segmentation relative to Corr-LDA. For example, for complicated objects the Corr-LDA segmentation results are very sensitive to the feature variance, and an object is generally segmented into many small, detailed parts. By contrast, due to the imposed mixture structure on each object, our models cluster small parts into one aggregate object. Furthermore, LSBP encourages local contiguous regions to be grouped in the same segment, and therefore it is less sensitive to localized variability. In addition, compared with results shown in [2], which also used the MSRC dataset, one may observe KSBP cannot do as well as LSBP in maintaining spatial contiguity, as discussed in Section 3.2. Due to space limitations, detailed example comparison between LSBP and KSBP will be shown elsewhere in a longer report; the quantitative comparison in Table 1 further demonstrate the advantages of LSBP over KSBP. t r e e b u i l d i n g s i g n c r o q u e t p o l o r o c k c R o a d G r a s s V o i d B u i l d i n g T r e e C a r S k y C o w B u i l d i n g T r e e B u i l d i n g S k y W a t e r B o a t H u m a n S a i l b o a t W a t e r H u m a n R o c k S a i l b o a t H u m a n R o c k C o u r t T r e e S k y G r a s s S k y B u i l d i n g T r e e G r a s s S i g n B u i l d i n g H u m a n T r e e G r a s s G r a s s H o r s e T r e e R o c k H u m a n T r e e G r a s s S k y S k y B u i l d i n g T r e e G r a s s S i g n B u i l d i n g T r e e H u m a n G r a s s H o r s e G r a s s T r e e R o c k H u m a n Figure 4: Example segmentation and labeling results. First row: original images; second row: Corr-LDA [6]; third row: proposed model without LSBP; fourth row: proposed model with LSBP. Columns 1-3 from MSRC dataset; Columns 4-6 from UIUC-Sport dataset. The name of original images are inferred by scene-level classification via our model. The UIUC-Sport results are based on the words inferred by our model. The MSRC database provides manually defined segmentations, to which we quantitatively compare. The right part of Table 1 compares results of the proposed model with Corr-LDA. As indicated in Table 1, the proposed model (with and without LSBP) significantly outperforms Corr-LDA for all objects. Moreover, due to imposed spatial contiguity, the models with KSBP and LSBP are better than without. The experiments have been performed in non-optimized software written in Matlab, on a Pentium PC with 1.73 GHz CPU and 4G RAM. One VB run of our model with LSBP, for 70 VB iterations, required nearly 7 hours for 320 images from MSRC dataset. Typically 50 VB iterations are required to achieve convergence. The UIUC-Sport data required comparable CPU time. It typically took less than half the CPU time for our model without LSBP on a same dataset. All results are based on a single VB run, with random initialization. 6 Conclusions A nonparametric Bayesian model has been developed for clustering M images into classes; the images are represented as a aggregation of distinct localized objects, to which words may be assigned. To infer the relationships between image objects and words (labels), we only need to make the association between inferred model parameters and words. This may be done as a post-processing step if no words are provided, and it may done in situ if all or a subset of the M images are annotated. Spatially contiguous objects are realized via a new logistic stick-breaking process. Quantitative model performance is highly competitive relative to competing approaches, with relatively fast inference realized via variational Bayesian analysis. The authors acknowledge partial support from ARO, AFOSR, DOE, NGA and ONR. 8 References [1] T. Ahonen and M. Pietik¨ainen. Image description using joint distribution of filter bank responses. Pattern Recogntion Letters, 30:368–376, 2009. [2] Q. An, C. Wang, I. Shterev, E. Wang, L. Carin, and D. B. Dunson. Hierarchical kernel stick-breaking process for multi-task image analysis. In ICML, 2008. [3] K. Barnard, P. Duygulu, N. de Freitas, D. Forsyth, D. M. Blei, and M. I. Jordan. Matching words and pictures. JMLR, 3:1107–1135, 2003. [4] C. M. Bishop and M. E. Tipping. Variational relevance vector machines. In UAI, 2000. [5] D. Blackwell and J. B. MacQueen. Ferguson distributions via Polya urn schemes. Ann. Statist., 1(2):353– 355, 1973. [6] D. M. Blei and M. Jordan. Modeling annotated data. In SIGIR, 2003. [7] D. M. Blei and J. D. McAuliffe. Supervised topic model. In NIPS, 2007. [8] D. M. Blei, A. Ng, and M. I. Jordan. Latent Dirichlet allocation. JMLR, 3:993–1022, 2003. [9] A. Bosch, A. Zisserman, and X. Munoz. Scene classification via plsa. In ECCV, 2006. [10] L. Cao and L. Fei-Fei. Spatially coherent latent topic model for concurrent segmentation and classification of objects and scenes. In ICCV, 2007. [11] L. Fei-Fei and P. Perona. A Bayesian hieratchical model for learning natural scence categories. In CVPR, 2005. [12] T. Hofmann. Unsupervised learning by probabilistic latent semantic analysis. Mach. Learn., 42(1-2):177– 196, 2001. [13] H. Ishwaran and L. F. James. Gibbs sampling methods for stick-breaking priors. JASA, 96(453):161–173, 2001. [14] M. I. Jordan, Z. Ghahramani, T. S. Jaakkola, and L. Saul. An introduction to variational methods for graphical models. Mach. Learn., 37(2):183–233, 1999. [15] J. Li and L. Fei-Fei. What, where and who? classfying events by scene and object recognition. In ICCV, 2007. [16] J. Li, R. Socher, and L. Fei-Fei. Towards total scene understaning: classification, annotation and segmentation in an automatic framework. In CVPR, 2009. [17] G. Mori. Guiding model search using segmentation. In ICCV, 2005. [18] A. Rabinovich, A. Vedaldi, C. Galleguillos, and E. Wiewiora. Objects in context. In ICCV, 2007. [19] X. Ren and J. Malik. Learning a classification model foe segmentation. In ICCV, 2003. [20] E. B. Sudderth and M. I. Jordan. Shared segementation of natural scenes using dependent pitman-yor processes. In NIPS, 2008. [21] Y. Teh, M. Jordan, M. Beal, and D. Blei. Hierarchical Dirichlet processes. JASA, 101:1566–1582, 2005. [22] M. Varma and A. Zisserman. Classifying images of materials: Achieving viewpoint and illumination independence. In ECCV, 2002. [23] C. Wang, D. M. Blei, and L. Fei-Fei. Simultaneous image classification and annotation. In CVPR, 2009. [24] X. Wang and E. Grimson. Spatial latent dirichlet allocation. In NIPS, 2007. [25] J. V. D. Weijer and C. Schmid. Coloring local feature extraction. In ECCV, 2006. [26] O. Yakhnenko and V. Honavar. Multi-modal hierarchical Dirichlet process model for predicting image annotation and image-object label correspondence. In SIAM SDM, 2009. [27] Z.-H. Zhou and M.-L. Zhang. Mutlti-instance multi-label learning with application to scene classification. In NIPS, 2006. 9
2009
254
3,764
Whose Vote Should Count More: Optimal Integration of Labels from Labelers of Unknown Expertise Jacob Whitehill, Paul Ruvolo, Tingfan Wu, Jacob Bergsma, and Javier Movellan Machine Perception Laboratory University of California, San Diego La Jolla, CA, USA { jake, paul, ting, jbergsma, movellan }@mplab.ucsd.edu Abstract Modern machine learning-based approaches to computer vision require very large databases of hand labeled images. Some contemporary vision systems already require on the order of millions of images for training (e.g., Omron face detector [9]). New Internet-based services allow for a large number of labelers to collaborate around the world at very low cost. However, using these services brings interesting theoretical and practical challenges: (1) The labelers may have wide ranging levels of expertise which are unknown a priori, and in some cases may be adversarial; (2) images may vary in their level of difficulty; and (3) multiple labels for the same image must be combined to provide an estimate of the actual label of the image. Probabilistic approaches provide a principled way to approach these problems. In this paper we present a probabilistic model and use it to simultaneously infer the label of each image, the expertise of each labeler, and the difficulty of each image. On both simulated and real data, we demonstrate that the model outperforms the commonly used “Majority Vote” heuristic for inferring image labels, and is robust to both noisy and adversarial labelers. 1 Introduction In recent years machine learning-based approaches to computer vision have helped to greatly accelerate progress in the field. However, it is now becoming clear that many practical applications require very large databases of hand labeled images. The labeling of very large datasets is becoming a bottleneck for progress. One approach to address this incoming problem is to make use of the vast human resources on the Internet. Indeed, projects like the ESP game [17], the Listen game[16], Soylent Grid [15], and reCAPTCHA [18] have revealed the possibility of harnessing human resources to solve difficult machine learning problems. While these approaches use clever schemes to obtain data from humans for free, a more direct approach is to hire labelers online. Recent Web tools such as Amazon’s Mechanical Turk [1] provide ideal solutions for high-speed, low cost labeling of massive databases. Due to the distributed and anonymous nature of these tools, interesting theoretical and practical challenges arise. For example, principled methods are needed to combine the labels from multiple experts and to estimate the certainty of the current labels. Which image should be labeled (or relabeled) next must also be decided – it may be prudent, for example, to collect many labels for each image in order to increase one’s confidence in that image’s label. However, if an image is easy and the labelers of that image are reliable, a few labels may be sufficient and valuable resources may be used to label other images. In practice, combining the labels of multiple coders is a challenging process due to the fact that: (1) The labelers may have wide ranging levels of expertise which are unknown a priori, and in some cases may be adversarial; (2) images may also vary in their level of difficulty, in a manner that may also be unknown a priori. Probabilistic methods provide a principled way to approach this problem using standard inference tools. We explore one such approach by formulating a probabilistic model of the labeling process, which we call GLAD (Generative model of Labels, Abilities, and Difficulties), and using inference methods to simultaneously infer the expertise of each labeler, the difficulty of each image, and the most probable label for each image. On both simulated and real-life data, we demonstrate that the model outperforms the commonly used “Majority Vote” heuristic for inferring image labels, and is robust to both adversarial and noisy labelers. 2 Modeling the Labeling Process Consider a database of n images, each of which belongs to one of two possible categories of interest (e.g., face/non-face; male/female; smile/non-smile; etc.). We wish to determine the class label Zj (0 or 1) of each image j by querying from m labelers. The observed labels depend on several causal factors: (1) the difficulty of the image; (2) the expertise of the labeler; and (3) the true label. We model the difficulty of image j using the parameter 1/βj ∈[0, ∞) where βj is constrained to be positive. Here 1/βj = ∞means the image is very ambiguous and hence even the most proficient labeler has a 50% chance of labeling it correctly. 1/βj = 0 means the image is so easy that even the most obtuse labeler will always label it correctly. The expertise of each labeler i is modeled by the parameter αi ∈(−∞, +∞). Here an α = +∞ means the labeler always labels images correctly; −∞means the labeler always labels the images incorrectly, i.e., he/she can distinguish between the two classes perfectly but always inverts the label, either maliciously or because of a consistent misunderstanding. In this case (αi < 0), the labeler is said to be adversarial. Finally, αi = 0 means that the labeler cannot discriminate between the two classes – his/her labels carry no information about the true image label Zj. Note that we do not require the labelers to be human – labelers can also be, for instance, automatic classifiers. Hence, the proposed approach will provide a principled way of combining labels from any combination of human and previously existing machine-based classifiers. The labels given by labeler i to image j (which we call the given labels) are denoted as Lij and, under the model, are generated as follows: p(Lij = Zj|αi, βj) = 1 1 + e−αiβj (1) Thus, under the model, the log odds for the obtained labels being correct are a bilinear function function of the difficulty of the label and the expertise of the labeler, i.e., log p(Lij = Zj) 1 −p(Lij = Zj) = αiβj (2) More skilled labelers (higher αi) have a higher probability of labeling correctly. As the difficulty 1/βj of an image increases, the probability of the label being correct moves toward 0.5. Similarly, as the labeler’s expertise decreases (lower αi), the chance of correctness likewise drops to 0.5. Adversarial labelers are simply labelers with negative α. Figure 1 shows the causal structure of the model. True image labels Zj, labeler accuracy values αi, and image difficulty values βj are sampled from a known prior distribution. These determine the observed labels according to Equation 1. Given a set of observed labels l = {lij}, the task is to infer simultaneously the most likely values of Z = {Zj} (the true image labels) as well as the labeler accuracies α = {αi} and the image difficulty parameters β = {βj}. In the next section we derive the Maximum Likelihood algorithm for inferring these values. 3 Inference The observed labels are samples from the {Lij} random variables. The unobserved variables are the true image labels Zj, the different labeler accuracies αi, and the image difficulty parameters 1/βj. Our goal is to efficiently search for the most probable values of the unobservable variables 2 Observed labels Labeler accuracies True labels Z1 Z2 Z3 Zn ... α2 α3 αm ... L11 L21 L22 ... Image difficulties β1 β2 β3 βn ... α1 ... L32 L12 ... Figure 1: Graphical model of image difficulties, true image labels, observed labels, and labeler accuracies. Only the shaded variables are observed. Z, α and β given the observed data. Here we can use Expectation-Maximization approach (EM) to obtain maximum likelihood estimates of the parameters of interest (the full derivation is in the Supplementary Materials): E step: Let the set of all given labels for an image j be denoted as lj = {lij′ | j′ = j}. Note that not every labeler must label every single image. In this case, the index variable i in lij′ refers only to those labelers who labeled image j. We need to compute the posterior probabilities of all zj ∈{0, 1} given the α, β values from the last M step and the observed labels: p(zj|l, α, β) = p(zj|lj, α, βj) ∝ p(zj|α, βj)p(lj|zj, α, βj) ∝ p(zj) Y i p(lij|zj, αi, βj) where we noted that p(zj|α, βj) = p(zj) using the conditional independence assumptions from the graphical model. M step: We maximize the standard auxiliary function Q, which is defined as the expectation of the joint log-likelihood of the observed and hidden variables (l, Z) given the parameters (α, β), w.r.t. the posterior probabilities of the Z values computed during the last E step: Q(α, β) = E [ln p(l, z|α, β)] = E  ln Y j p(zj) Y i p(lij|zj, αi, βj) !  since lij are cond. indep. given z, α, β = X j E [ln p(zj)] + X ij E [ln p(lij|zj, αi, βj)] where the expectation is taken over z given the old parameter values αold, βold as estimated during the last E-step. Using gradient ascent, we find values of α and β that locally maximize Q. 3.1 Priors on α, β The Q function can be modified straightforwardly to handle a prior over each αi and βj by adding a log-prior term for each of these variables. These priors may be useful, for example, if we know that most labelers are not adversarial. In this case, the prior for α can be made very low for α < 0. The prior probabilities are also useful when the ground-truth Z value of particular images is (somehow) known for certain. By “clamping” the Z values (using the prior) for the images on which the 3 true label is known for sure, the model may be able to better estimate the other parameters. The Z values for such images can be clamped by setting the prior probability p(zj) (used in the E-Step) for these images to be very high towards one particular class. In our implementation we used Gaussian priors (µ = 1, σ = 1) for α. For β, we need a prior that does not generate negative values. To do so we re-parameterized β .= eβ′ and imposed a Gaussian prior (µ = 1, σ = 1) on β′. 3.2 Computational Complexity The computational complexity of the E-Step is linear in the number of images and the total number of labels. For the M-Step, the values of Q and ∇Q must be computed repeatedly until convergence.1 Computing each function is linear in the number of images, number of labelers, and total number of image labels. Empirically when using the approach on a database of 1 million images that we recently collected and labeled we found that the EM procedure converged in about 10 minutes using a single core of a Xeon 2.8 GHz processor. The algorithm is parallelizable and hence this running time could be reduced substantially using multiple cores. Real time inference may also be possible if we maintain parameters close to the solution that are updated as new labels become available. This would allow using the algorithm in an active manner to choose in real-time which images should be labeled next so as to minimize the uncertainty about the image labels. 4 Simulations Here we explore the performance of the model using a set of image labels generated by the model itself. Since, in this case we know the parameters Z, α, and β that generated the observed labels, we can compare them with corresponding parameters estimated using the EM procedure. In particular, we simulated between 4 and 20 labelers, each labeling 2000 images, whose true labels Z were either 0 or 1 with equal probability. The accuracy αi of each labeler was drawn from a normal distribution with mean 1 and variance 1. The inverse-difficulty for each image βj was generated by exponentiating a draw from a normal distribution with mean 1 and variance 1. Given these labeler abilities and image difficulties, the observed labels lij were sampled according to Equation 1 using Z. Finally, the EM inference procedure described above was executed to estimate α, β, Z. This procedure was repeated 40 times to smooth out variability between trials. On each trial we computed the correlation between the parameter estimates ˆα, ˆβ and the true parameter values α, β. The results (averaged over all 40 experimental runs) are shown in Figure 2. As expected, as the number of labelers grows, the parameter estimates converge to the true values. We also computed the proportion of label estimates ˆZ that matched the true image labels Z. We compared the maximum likelihood estimates of the GLAD model to estimates obtained by taking the majority vote as the predicted label. The predictions of the proposed GLAD model were obtained by thresholding at 0.5 the posterior probability of the label of each image being of class 1 given the accuracy and difficulty parameters returned by EM (see Section 3). Results are shown in Figure 2. GLAD makes fewer errors than the majority vote heuristic. The difference between the two approaches is particularly pronounced when the number of labelers per image is small. On many images, GLAD correctly infers the true image label Z even when that Z value was the minority opinion. In essence, GLAD is exploiting the fact that some labelers are experts (which it infers automatically), and hence their votes should count more on these images than the votes of less skilled labelers. Modeling Image Difficulty : To explore the importance of estimating image difficulty we performed a simple simulation: Image labels (0 or 1) were assigned randomly (with equal probability) to 1000 images. Half of the images were “hard”, and half were “easy.” Fifty simulated labelers labeled all 1000 images. The proportion of “good” to “bad” labelers is 25:1. The probability of correctness for each image difficulty and labeler quality combination was given by the table below: 1The libgsl conjugate gradient descent optimizer we used requires both Q and ∇Q. 4 5 10 15 20 0.75 0.8 0.85 0.9 0.95 1 Effect of Number of Labelers on Accuracy Number of Labelers Proportion of Labels Correct GLAD Majority vote 5 10 15 20 0 0.2 0.4 0.6 0.8 1 Effect of Number of Labelers on Parameter Estimates Number of Labelers Correlation Beta: Spearman Corr. Alpha: Pearson Corr. Figure 2: Left: The accuracies of the GLAD model versus simple voting for inferring the underlying class labels on simulation data. Right: The ability of GLAD to recover the true alpha and beta parameters on simulation data. Image Type Labeler type Hard Easy Good 0.95 1 Bad 0.54 1 We measured performance in terms of proportion of correctly estimated labels. We compared three approaches: (1) our proposed method, GLAD; (2) the method proposed in [5], which models labeler ability but not image difficulty; and (3) Majority Vote. The simulations were repeated 20 times and average performance calculated for the three methods. The results shown below indicated that modeling image difficulty can result in significant performance improvements. Method Error GLAD 4.5% Majority Vote 11.2% Dawid & Skene [5] 8.4% 4.1 Stability of EM under Various Starting Points Empirically we found that the EM procedure was fairly insensitive to varying the starting point of the parameter values. In a simulation study of 2000 images and 20 labelers, we randomly selected each αi ∼U[0, 4] and log(βj) ∼U[0, 3], and EM was run until convergence. Over the 50 simulation runs, the average percent-correct of the inferred labels was 85.74%, and the standard deviation of the percent-correct over all the trials was only 0.024%. 5 Empirical Study I: Greebles As a first test-bed for GLAD using real data obtained from the Mechanical Turk, we posted pictures of 100 “Greebles” [6], which are synthetically generated images that were originally created to study human perceptual expertise. Greebles somewhat resemble human faces and have a “gender”: Males have horn-like organs that point up, whereas for females the horns point down. See Figure 3 (left) for examples. Each of the 100 Greeble images was labeled by 10 different human coders on the Turk for gender (male/female). Four greebles of each gender (separate from the 100 labeled images) were given as examples of each class. Shown at a resolution of 48x48 pixels, the task required careful inspection of the images in order to label them correctly. The ground-truth gender values were all known with certainty (since they are rendered objects) and thus provided a means of measuring the accuracy of inferred image labels. 5 2 3 4 5 6 7 8 0.85 0.9 0.95 1 Number of labels per image Accuracy (% correct) Inferred Label Accuracy of Greeble Images GLAD Majority Vote Figure 3: Left: Examples of Greebles. The top two are “male” and the bottom two are “female.” Right: Accuracy of the inferred labels, as a function of the number of labels M obtained for each image, of the Greeble images using either GLAD or Majority Vote. Results were averaged over 100 experimental runs. We studied the effect of varying the number of labels M obtained from different labelers for each image, on the accuracy of the inferred Z. Hence, from the 10 labels total we obtained per Greeble image, we randomly sampled 2 ≤M ≤8 labels over all labelers during each experimental trial. On each trial we compared the accuracy of labels Z as estimated by GLAD (using a threshold of 0.5 on p(Z)) to labels as estimated by the Majority Vote heuristic. For each value of M we averaged performance for each method over 100 trials. Results are shown in Figure 3 (right). For all values of M we tested, the labels as inferred by GLAD are significantly higher than for Majority Vote (p < 0.01). This means that, in order to achieve the same level of accuracy, fewer labels are needed. Moreover, the variance in accuracy was less for GLAD than for Majority Vote for all M that were tested, suggesting that the quality of GLAD’s outputs is more stable than of the heuristic method. Finally, notice how, for the even values of M, the Majority Vote accuracy decreases. This may stem from the lack of optimal decision rule under Majority Vote when an equal number of labelers say an image is Male as who say it is Female. GLAD, since it makes its decisions by also taking ability and difficulty into account, does not suffer from this problem. 6 Empirical Study II: Duchenne Smiles As a second experiment, we used the Mechanical Turk to label face images containing smiles as either Duchenne or Non-Duchenne. A Duchenne smile (“enjoyment” smile) is distinguished from a Non-Duchenne (“social” smile) through the activation of the Orbicularis Oculi muscle around the eyes, which the former exhibits and the latter does not (see Figure 4 for examples). Distinguishing the two kinds of smiles has applications in various domains including psychology experiments, human-computer interaction, and marketing research. Reliable coding of Duchenne smiles is a difficult task even for certified experts in the Facial Action Coding System. We obtained Duchenne/Non-Duchenne labels for 160 images from 20 different Mechanical Turk labelers; in total, there were 3572 labels. (Hence, labelers labeled each image a variable number of times.) For ground truth, these images were also labeled by two certified experts in the Facial Action Coding System. According to the expert labels, 58 out of 160 images contained Duchenne smiles. Using the labels obtained from the Mechanical Turk, we inferred the image labels using either GLAD or the Majority Vote heuristic, and then compared them to ground truth. 6 Duchenne Smiles Non-Duchenne Smiles Figure 4: Examples of Duchenne (left) and Non-Duchenne (right) smiles. The distinction lies in the activation of Orbicularis Oculi muscle around the eyes, and is difficult to discriminate even for experts. 0 1000 2000 3000 4000 5000 0.66 0.68 0.7 0.72 0.74 0.76 0.78 0.8 Num of Noisy Labels Accuracy Accuracy under Noise GLAD Majority Vote 0 200 400 600 800 0.4 0.5 0.6 0.7 0.8 0.9 1 Num of Adversarial Labels Accuracy Accuracy under Adversarialness GLAD Majority Vote Figure 5: Accuracy (percent correct) of inferred Duchenne/Non-Duchenne labels using either GLAD or Majority Vote under (left) noisy labelers or (right) adversarial labelers. As the number of noise/adversarial labels increases, the performance of labels inferred using Majority Vote decreases. GLAD, in contrast, is robust to these conditions. Results: Using just the raw labels obtained from the Mechanical Turk, the labels inferred using GLAD matched the ground-truth labels on 78.12% of the images, whereas labels inferred using Majority Vote were only 71.88% accurate. Hence, GLAD resulted in about a 6% performance gain. Simulated Noisy and Adversarial Labelers: We also simulated noisy and adversarial labeler conditions. It is to be expected, for example, that in some cases labelers may just try to complete the task in a minimum amount of time disregarding accuracy. In other cases labelers may misunderstand the instructions, or may be adversarial, thus producing labels that tend to be opposite to the true labels. Robustness to such noisy and adversarial labelers is important, especially as the popularity of Webbased labeling tools increases, and the quality of labelers becomes more diverse. To investigate the robustness of the proposed approaches we generated data from virtual “labelers” whose labels were completely uninformative, i.e., uniformly random. We also added artificial “adversarial” labelers whose labels tended to be the opposite of the true label for each image. The number of noisy labels was varied from 0 to 5000 (in increments of 500), and the number of adversarial labels was varied from 0 to 750 (in increments of 250). For each setting, label inference accuracy was computed for both GLAD and the Majority Vote method. As shown in Figure 5, the accuracy of GLAD-based label inference is much less affected from labeling noise than is Majority Vote. When adversarial labels are introduced, GLAD automatically inferred that some labelers were purposely giving the opposite label and automatically flipped their labels. The Majority Vote heuristic, in contrast, has no mechanism to recover from this condition, and the accuracy falls steeply. 7 7 Related Work To our knowledge GLAD is the first model in the literature to simultaneously estimate the true label, item difficulty, and coder expertise in an unsupervised and efficient manner. Our work is related to the literature on standardized tests, particularly the Item Response Theory (IRT) community (e.g., Rasch [10], Birnbaum [3]). The GLAD model we propose in this paper can be seen as an unsupervised version of previous IRT models for the case in which the correct answers (i.e., labels) are unknown. Snow, et al [14] used a probabilistic model similar to Naive Bayes to show that by averaging multiple naive labelers (<= 10) one can obtain labels as accurate as a few expert labelers. Two key differences between their model and GLAD are that: (1) they assume a significant proportion of images have been pre-labeled with ground truth values, and (2) all the images have equal difficulty. As we show in this paper, modeling image difficulty may be very important in some cases. Sheng, et al [12] examine how to identify which images of an image dataset to label again in order to reduce uncertainty in the posterior probabilities of latent class labels. Dawid and Skene [5] developed a method to handle polytomous latent class variables. In their case the notion of “ability” is handled using full confusion matrices for each labeler. Smyth, et al [13] used a similar approach to combine labels from multiple experts for items with homogeneous levels of difficulty. Batchelder and Romney [2] infer test answers and test-takers’ abilities simultaneously, but do not estimate item difficulties and do not admit adversarial labelers. Other approaches employ a Bayesian model of the labeling process that considers both variability in labeler accuracies as well as item difficulty (e.g. [8, 7, 11]). However, inference in these models is based on MCMC which is likely to suffer from high computational expense, and the need to wait (arbitrarily long) for parameters to “burn in” during sampling. 8 Summary and Further Research An important bottleneck facing the machine learning community is the need for very large datasets with hand-labeled data. Datasets whose scale was unthinkable a few years ago are becoming commonplace today. The Internet makes it possible for people around the world to cooperate on the labeling of these datasets. However, this makes it unrealistic for individual researchers to obtain the ground truth of each label with absolute certainty. Algorithms are needed to automatically estimate the reliability of ad-hoc anonymous labelers, the difficulty of the different items in the dataset, and the probability of the true labels given the currently available data. We proposed one such system, GLAD, based on standard probabilistic inference on a model of the labeling process. The approach can handle the millions of parameters (one difficulty parameter per image, and one expertise parameter per labeler) needed to process large datasets, at little computational cost. The model can be used seamlessly to combine labels from both human labelers and automatic classifiers. Experiments show that GLAD can recover the true data labels more accurately than the Majority Vote heuristic, and that it is highly robust to both noisy and adversarial labelers. Active Sampling: One advantage of probabilistic models is that they lend themselves to implementing active methods (e.g., Infomax [4]) for selecting which images should be re-labeled next. We are currently pursuing the development of control policies for optimally choosing whether to obtain more labels for a particular item – so that the inferred Z label for that item becomes more certain – versus obtaining more labels from a particular labeler – so that his/her accuracy α may be better estimated, and all the images that he/she labeled can have their posterior probability estimates of Z improved. A software implementation of GLAD is available at http://mplab.ucsd.edu/∼jake. References [1] Amazon. Mechanical turk. http://www.mturk.com. [2] W. H. Batchelder and A. K. Romney. Test theory without an answer key. Psychometrika, 53(1):71–92, 1988. 8 [3] A. Birnbaum. Some latent trait models and their use in inferring an examinee’s ability. Statistical theories of mental test scores, 1968. [4] N. Butko and J. Movellan. I-POMDP: An infomax model of eye movement. In Proceedings of the International Conference on Development and Learning, 2008. [5] A. Dawid and A. Skene. Maximum likelihood estimation of observer error-rates using the em algorithm. Applied Statistics, 28(1):20–28, 1979. [6] I. Gauthier and M. Tarr. Becoming a “greeble” expert: Exploring mechanisms for face recognition. Vision Research, 37(12), 1997. [7] V. Johnson. On bayesian analysis of multi-rater ordinal data: An application to automated essay grading. Journal of the American Statistical Association, 91:42–51, 1996. [8] G. Karabatsos and W. H. Batchelder. Markov chain estimation for test theory without an answer key. Psychometrika, 68(3):373–389, 2003. [9] Omron. OKAO vision brochure, July 2008. [10] G. Rasch. Probabilistic Models for Some Intelligence and Attainment Tests. Denmark, 1960. [11] S. Rogers, M. Girolami, and T. Polajnar. Semi-parametric analysis of multi-rater data. Statistics and Computing, 2009. [12] V. Sheng, F. Provost, and P. Ipeirotis. Get another label? improving data quality and data mining using multiple noisy labelers. In Knowledge Discovery and Data Mining, 2008. [13] P. Smyth, U. Fayyad, M. Burl, P. Perona, and P. Baldi. Inferring ground truth from subjective labelling of venus images. In Advances of Neural Information Processing Systems, 1994. [14] R. Snow, B. O’Connor, D. Jurafsky, and A. Y. Ng. Cheap and fast - but is it good? evaluating non-expert annotations for natural language tasks. In Proceedings of the 2008 Conference on Empirical Methods on Natural Language Processing, 2008. [15] S. Steinbach, V. Rabaud, and S. Belongie. Soylent grid: it’s made of people! In International Conference on Computer Vision, 2007. [16] D. Turnbull, R. Liu, L. Barrington, and G. Lanckriet. A Game-based Approach for Collecting Semantic Annotations of Music. In 8th International Conference on Music Information Retrieval (ISMIR), 2007. [17] L. von Ahn and L. Dabbish. Labeling Images with A Computer Game. In Proceedings of the SIGCHI conference on Human factors in computing systems, pages 319–326. ACM Press New York, NY, USA, 2004. [18] L. von Ahn, B. Maurer, C. McMillen, D. Abraham, and M. Blum. reCAPTCHA: Human-Based Character Recognition via Web Security Measures. Science, 321(5895):1465, 2008. 9
2009
255
3,765
Reading Tea Leaves: How Humans Interpret Topic Models Jonathan Chang ∗ Facebook 1601 S California Ave. Palo Alto, CA 94304 jonchang@facebook.com Jordan Boyd-Graber ∗ Institute for Advanced Computer Studies University of Maryland jbg@umiacs.umd.edu Sean Gerrish, Chong Wang, David M. Blei Department of Computer Science Princeton University {sgerrish,chongw,blei}@cs.princeton.edu Abstract Probabilistic topic models are a popular tool for the unsupervised analysis of text, providing both a predictive model of future text and a latent topic representation of the corpus. Practitioners typically assume that the latent space is semantically meaningful. It is used to check models, summarize the corpus, and guide exploration of its contents. However, whether the latent space is interpretable is in need of quantitative evaluation. In this paper, we present new quantitative methods for measuring semantic meaning in inferred topics. We back these measures with large-scale user studies, showing that they capture aspects of the model that are undetected by previous measures of model quality based on held-out likelihood. Surprisingly, topic models which perform better on held-out likelihood may infer less semantically meaningful topics. 1 Introduction Probabilistic topic models have become popular tools for the unsupervised analysis of large document collections [1]. These models posit a set of latent topics, multinomial distributions over words, and assume that each document can be described as a mixture of these topics. With algorithms for fast approxiate posterior inference, we can use topic models to discover both the topics and an assignment of topics to documents from a collection of documents. (See Figure 1.) These modeling assumptions are useful in the sense that, empirically, they lead to good models of documents. They also anecdotally lead to semantically meaningful decompositions of them: topics tend to place high probability on words that represent concepts, and documents are represented as expressions of those concepts. Perusing the inferred topics is effective for model verification and for ensuring that the model is capturing the practitioner’s intuitions about the documents. Moreover, producing a human-interpretable decomposition of the texts can be a goal in itself, as when browsing or summarizing a large collection of documents. In this spirit, much of the literature comparing different topic models presents examples of topics and examples of document-topic assignments to help understand a model’s mechanics. Topics also can help users discover new content via corpus exploration [2]. The presentation of these topics serves, either explicitly or implicitly, as a qualitative evaluation of the latent space, but there is no explicit quantitative evaluation of them. Instead, researchers employ a variety of metrics of model fit, such as perplexity or held-out likelihood. Such measures are useful for evaluating the predictive model, but do not address the more explatory goals of topic modeling. ∗Work done while at Princeton University. 1 computer, technology, system, service, site, phone, internet, machine play, film, movie, theater, production, star, director, stage sell, sale, store, product, business, advertising, market, consumer TOPIC 1 TOPIC 2 TOPIC 3 (a) Topics Forget the Bootleg, Just Download the Movie Legally Multiplex Heralded As Linchpin To Growth The Shape of Cinema, Transformed At the Click of a Mouse A Peaceful Crew Puts Muppets Where Its Mouth Is Stock Trades: A Better Deal For Investors Isn't Simple The three big Internet portals begin to distinguish among themselves as shopping malls Red Light, Green Light: A 2-Tone L.E.D. to Simplify Screens TOPIC 2 TOPIC 3 TOPIC 1 (b) Document Assignments to Topics Figure 1: The latent space of a topic model consists of topics, which are distributions over words, and a distribution over these topics for each document. On the left are three topics from a fifty topic LDA model trained on articles from the New York Times. On the right is a simplex depicting the distribution over topics associated with seven documents. The line from each document’s title shows the document’s position in the topic space. In this paper, we present a method for measuring the interpretatability of a topic model. We devise two human evaluation tasks to explicitly evaluate both the quality of the topics inferred by the model and how well the model assigns topics to documents. The first, word intrusion, measures how semantically “cohesive” the topics inferred by a model are and tests whether topics correspond to natural groupings for humans. The second, topic intrusion, measures how well a topic model’s decomposition of a document as a mixture of topics agrees with human associations of topics with a document. We report the results of a large-scale human study of these tasks, varying both modeling assumptions and number of topics. We show that these tasks capture aspects of topic models not measured by existing metrics and–surprisingly–models which achieve better predictive perplexity often have less interpretable latent spaces. 2 Topic models and their evaluations Topic models posit that each document is expressed as a mixture of topics. These topic proportions are drawn once per document, and the topics are shared across the corpus. In this paper we will consider topic models that make different assumptions about the topic proportions. Probabilistic Latent Semantic Indexing (pLSI) [3] makes no assumptions about the document topic distribution, treating it as a distinct parameter for each document. Latent Dirichlet allocation (LDA) [4] and the correlated topic model (CTM) [5] treat each document’s topic assignment as a multinomial random variable drawn from a symmetric Dirichlet and logistic normal prior, respectively. While the models make different assumptions, inference algorithms for all of these topic models build the same type of latent space: a collection of topics for the corpus and a collection of topic proportions for each of its documents. While this common latent space has explored for over two decades, its interpretability remains unmeasured. Pay no attention to the latent space behind the model Although we focus on probabilistic topic models, the field began in earnest with latent semantic analysis (LSA) [6]. LSA, the basis of pLSI’s probabilistic formulation, uses linear algebra to decompose a corpus into its constituent themes. Because LSA originated in the psychology community, early evaluations focused on replicating human performance or judgments using LSA: matching performance on standardized tests, comparing sense distinctions, and matching intuitions about synonymy (these results are reviewed in [7]). In information retrieval, where LSA is known as latent semantic indexing (LSI) [8], it is able to match queries to documents, match experts to areas of expertise, and even generalize across languages given a parallel corpus [9]. 2 The reticence to look under the hood of these models has persisted even as models have moved from psychology into computer science with the development of pLSI and LDA. Models either use measures based on held-out likelihood [4, 5] or an external task that is independent of the topic space such as sentiment detection [10] or information retrieval [11]. This is true even for models engineered to have semantically coherent topics [12]. For models that use held-out likelihood, Wallach et al. [13] provide a summary of evaluation techniques. These metrics borrow tools from the language modeling community to measure how well the information learned from a corpus applies to unseen documents. These metrics generalize easily and allow for likelihood-based comparisons of different models or selection of model parameters such as the number of topics. However, this adaptability comes at a cost: these methods only measure the probability of observations; the internal representation of the models is ignored. Griffiths et al. [14] is an important exception to the trend of using external tasks or held-out likelihood. They showed that the number of topics a word appears in correlates with how many distinct senses it has and reproduced many of the metrics used in the psychological community based on human performance. However, this is still not a deep analysis of the structure of the latent space, as it does not examine the structure of the topics themselves. We emphasize that not measuring the internal representation of topic models is at odds with their presentation and development. Most topic modeling papers display qualitative assessments of the inferred topics or simply assert that topics are semantically meaningful, and practitioners use topics for model checking during the development process. Hall et al. [15], for example, used latent topics deemed historically relevant to explore themes in the scientific literature. Even in production environments, topics are presented as themes: Rexa (http://rexa.info), a scholarly publication search engine, displays the topics associated with documents. This implicit notion that topics have semantic meaning for users has even motivated work that attempts to automatically label topics [16]. Our goal is to measure the success of interpreting topic models across number of topics and modeling assumptions. 3 Using human judgments to examine the topics Although there appears to be a longstanding assumption that the latent space discovered by topic models is meaningful and useful, evaluating such assumptions is difficult because discovering topics is an unsupervised process. There is no gold-standard list of topics to compare against for every corpus. Thus, evaluating the latent space of topic models requires us to gather exogenous data. In this section we propose two tasks that create a formal setting where humans can evaluate the two components of the latent space of a topic model. The first component is the makeup of the topics. We develop a task to evaluate whether a topic has human-identifiable semantic coherence. This task is called word intrusion, as subjects must identify a spurious word inserted into a topic. The second task tests whether the association between a document and a topic makes sense. We call this task topic intrusion, as the subject must identify a topic that was not associated with the document by the model. 3.1 Word intrusion To measure the coherence of these topics, we develop the word intrusion task; this task involves evaluating the latent space presented in Figure 1(a). In the word intrusion task, the subject is presented with six randomly ordered words. The task of the user is to find the word which is out of place or does not belong with the others, i.e., the intruder. Figure 2 shows how this task is presented to users. When the set of words minus the intruder makes sense together, then the subject should easily identify the intruder. For example, most people readily identify apple as the intruding word in the set {dog, cat, horse, apple, pig, cow} because the remaining words, {dog, cat, horse, pig, cow} make sense together — they are all animals. For the set {car, teacher, platypus, agile, blue, Zaire}, which lacks such coherence, identifying the intruder is difficult. People will typically choose an intruder at random, implying a topic with poor coherence. In order to construct a set to present to the subject, we first select at random a topic from the model. We then select the five most probable words from that topic. In addition to these words, an intruder 3 Word Intrusion Topic Intrusion Figure 2: Screenshots of our two human tasks. In the word intrusion task (left), subjects are presented with a set of words and asked to select the word which does not belong with the others. In the topic intrusion task (right), users are given a document’s title and the first few sentences of the document. The users must select which of the four groups of words does not belong. word is selected at random from a pool of words with low probability in the current topic (to reduce the possibility that the intruder comes from the same semantic group) but high probability in some other topic (to ensure that the intruder is not rejected outright due solely to rarity). All six words are then shuffled and presented to the subject. 3.2 Topic intrusion The topic intrusion task tests whether a topic model’s decomposition of documents into a mixture of topics agrees with human judgments of the document’s content. This allows for evaluation of the latent space depicted by Figure 1(b). In this task, subjects are shown the title and a snippet from a document. Along with the document they are presented with four topics (each topic is represented by the eight highest-probability words within that topic). Three of those topics are the highest probability topics assigned to that document. The remaining intruder topic is chosen randomly from the other low-probability topics in the model. The subject is instructed to choose the topic which does not belong with the document. As before, if the topic assignment to documents were relevant and intuitive, we would expect that subjects would select the topic we randomly added as the topic that did not belong. The formulation of this task provides a natural way to analyze the quality of document-topic assignments found by the topic models. Each of the three models we fit explicitly assigns topic weights to each document; this task determines whether humans make the same association. Due to time constraints, subjects do not see the entire document; they only see the title and first few sentences. While this is less information than is available to the algorithm, humans are good at extrapolating from limited data, and our corpora (encyclopedia and newspaper) are structured to provide an overview of the article in the first few sentences. The setup of this task is also meaningful in situations where one might be tempted to use topics for corpus exploration. If topics are used to find relevant documents, for example, users will likely be provided with similar views of the documents (e.g. title and abstract, as in Rexa). For both the word intrusion and topic intrusion tasks, subjects were instructed to focus on the meanings of words, not their syntactic usage or orthography. We also presented subjects with the option of viewing the “correct” answer after they submitted their own response, to make the tasks more engaging. Here the “correct” answer was determined by the model which generated the data, presented as if it were the response of another user. At the same time, subjects were encouraged to base their responses on their own opinions, not to try to match other subjects’ (the models’) selections. In small experiments, we have found that this extra information did not bias subjects’ responses. 4 Experimental results To prepare data for human subjects to review, we fit three different topic models on two corpora. In this section, we describe how we prepared the corpora, fit the models, and created the tasks described in Section 3. We then present the results of these human trials and compare them to metrics traditionally used to evaluate topic models. 4 4.1 Models and corpora In this work we study three topic models: probabilistic latent semantic indexing (pLSI) [3], latent Dirichlet allocation (LDA) [4], and the correlated topic model (CTM) [5], which are all mixed membership models [17]. The number of latent topics, K, is a free parameter in each of the models; here we explore this with K = 50, 100 and 150. The remaining parameters – βk, the topic multinomial distribution for topic k; and θd, the topic mixture proportions for document d – are inferred from data. The three models differ in how these latent parameters are inferred. pLSI In pLSI, the topic mixture proportions θd are a parameter for each document. Thus, pLSI is not a fully generative model, and the number of parameters grows linearly with the number of documents. We fit pLSI using the EM algorithm [18] but regularize pLSI’s estimates of θd using pseudo-count smoothing, α = 1. LDA LDA is a fully generative model of documents where the mixture proportions θd are treated as a random variable drawn from a Dirichlet prior distribution. Because the direct computation of the posterior is intractable, we employ variational inference [4] and set the symmetric Dirichlet prior parameter, α, to 1. CTM In LDA, the components of θd are nearly independent (i.e., θd is statistically neutral). CTM allows for a richer covariance structure between topic proportions by using a logistic normal prior over the topic mixture proportions θd. For each topic, k, a real γ is drawn from a normal distribution and exponentiated. This set of K non-negative numbers are then normalized to yield θd. Here, we train the CTM using variational inference [5]. We train each model on two corpora. For each corpus, we apply a part of speech tagger [19] and remove all tokens tagged as proper nouns (this was for the benefit of the human subjects; success in early experiments required too much encyclopedic knowledge). Stop words [20] and terms occurring in fewer than five documents are also removed. The two corpora we use are 1.) a collection of 8447 articles from the New York Times from the years 1987 to 2007 with a vocabulary size of 8269 unique types and around one million tokens and 2.) a sample of 10000 articles from Wikipedia (http://www.wikipedia.org) with a vocabulary size of 15273 unique types and three million tokens. 4.2 Evaluation using conventional objective measures There are several metrics commonly used to evaluate topic models in the literature [13]. Many of these metrics are predictive metrics; that is, they capture the model’s ability to predict a test set of unseen documents after having learned its parameters from a training set. In this work, we set aside 20% of the documents in each corpus as a test set and train on the remaining 80% of documents. We then compute predictive rank and predictive log likelihood. To ensure consistency of evaluation across different models, we follow Teh et al.’s [21] approximation of the predictive likelihood p(wd|Dtrain) using p(wd|Dtrain) ≈p(wd|ˆθd), where ˆθd is a point estimate of the posterior topic proportions for document d. For pLSI ˆθd is the MAP estimate; for LDA and CTM ˆθd is the mean of the variational posterior. With this information, we can ask what words the model believes will be in the document and compare it with the document’s actual composition. Given document wd, we first estimate ˆθd and then for every word in the vocabulary, we compute p(w|ˆθd) = P z p(w|z)p(z|ˆθd). Then we compute the average rank for the terms that actually appeared in document wd (we follow the convention that lower rank is better). The average word likelihood and average rank across all documents in our test set are shown in Table 1. These results are consistent with the values reported in the literature [4, 5]; in most cases CTM performs best, followed by LDA. 4.3 Analyzing human evaluations The tasks described in Section 3 were offered on Amazon Mechanical Turk (http://www.mturk.com), which allows workers (our pool of prospective subjects) to perform small jobs for a fee through a Web interface. No specialized training or knowledge is typically expected of the workers. Amazon Mechanical Turk has been successfully used in the past to develop gold-standard data for natural language processing [22] and to label images [23]. For both the word intrusion and topic intrusion 5 Table 1: Two predictive metrics: predictive log likelihood/predictive rank. Consistent with values reported in the literature, CTM generally performs the best, followed by LDA, then pLSI. The bold numbers indicate the best performance in each row. CORPUS TOPICS LDA CTM PLSI NEW YORK TIMES 50 -7.3214 / 784.38 -7.3335 / 788.58 -7.3384 / 796.43 100 -7.2761 / 778.24 -7.2647 / 762.16 -7.2834 / 785.05 150 -7.2477 / 777.32 -7.2467 / 755.55 -7.2382 / 770.36 WIKIPEDIA 50 -7.5257 / 961.86 -7.5332 / 936.58 -7.5378 / 975.88 100 -7.4629 / 935.53 -7.4385 / 880.30 -7.4748 / 951.78 150 -7.4266 / 929.76 -7.3872 / 852.46 -7.4355 / 945.29 Model Precision 0.0 0.2 0.4 0.6 0.8 1.0 0.0 0.2 0.4 0.6 0.8 1.0 50 topics G G CTM LDA pLSI 100 topics G G G G CTM LDA pLSI 150 topics G G G G G G G G G CTM LDA pLSI New York Times Wikipedia Figure 3: The model precision (Equation 1) for the three models on two corpora. Higher is better. Surprisingly, although CTM generally achieves a better predictive likelihood than the other models (Table 1), the topics it infers fare worst when evaluated against human judgments. tasks, we presented each worker with jobs containing ten of the tasks described in Section 3. Each job was performed by 8 separate workers, and workers were paid between $0.07 – $0.15 per job. Word intrusion As described in Section 3.1, the word intrusion task measures how well the inferred topics match human concepts (using model precision, i.e., how well the intruders detected by the subjects correspond to those injected into ones found by the topic model). Let ωm k be the index of the intruding word among the words generated from the kth topic inferred by model m. Further let im k,s be the intruder selected by subject s on the set of words generated from the kth topic inferred by model m and let S denote the number of subjects. We define model precision by the fraction of subjects agreeing with the model, MPm k = P s 1(im k,s = ωm k )/S. (1) Figure 3 shows boxplots of the precision for the three models on the two corpora. In most cases LDA performs best. Although CTM gives better predictive results on held-out likelihood, it does not perform as well on human evaluations. This may be because CTM finds correlations between topics and correlations within topics are confounding factors; the intruder for one topic might be selected from another highly correlated topic. The performance of pLSI degrades with larger numbers of topics, suggesting that overfitting [4] might affect interpretability as well as predictive power. Figure 4 (left) shows examples of topics with high and low model precisions from the NY Times data fit with LDA using 50 topics. In the example with high precision, the topic words all coherently express a painting theme. For the low precision example, “taxis” did not fit in with the other political words in the topic, as 87.5% of subjects chose “taxis” as the intruder. The relationship between model precision, MPm k , and the model’s estimate of the likelihood of the intruding word in Figure 5 (top row) is surprising. The highest probability did not have the best interpretability; in fact, the trend was the opposite. This suggests that as topics become more fine-grained in models with larger number of topics, they are less useful for humans. The downward 6 Model Precision Number of Topics 0 5 10 15 0.000 0.125 0.250 0.375 0.500 0.625 0.750 0.875 1.000 committee legislation proposal republican taxis fireplace garage house kitchen list americans japanese jewish states terrorist artist exhibition gallery museum painting Topic Log Odds Number of Documents !3.5 !3.0 !2.5 !2.0 !1.5 !1.0 !0.5 0.0 0 5 10 15 20 25 Book John Quincy Adams Microsoft Word Lindy Hop Figure 4: A histogram of the model precisions on the New York Times corpus (left) and topic log odds on the Wikipedia corpus (right) evaluated for the fifty topic LDA model. On the left, example topics are shown for several bins; the topics in bins with higher model precision evince a more coherent theme. On the right, example document titles are shown for several bins; documents with higher topic log odds can be more easily decomposed as a mixture of topics. Predictive Log Likelihood 0.65 0.70 0.75 0.80 −2.5 −2.0 −1.5 −1.0 New York Times ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● −7.32 −7.30 −7.28 −7.26 −7.24 Wikipedia ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● −7.52 −7.50 −7.48 −7.46 −7.44 −7.42 −7.40 Model Precision Topic Log Odds Model ● CTM ● LDA ● pLSI Number of topics ● 50 ● 100 ● 150 Figure 5: A scatter plot of model precision (top row) and topic log odds (bottom row) vs. predictive log likelihood. Each point is colored by model and sized according to the number of topics used to fit the model. Each model is accompanied by a regression line. Increasing likelihood does not increase the agreement between human subjects and the model for either task (as shown by the downward-sloping regression lines). sloping trend lines in Figure 5 implying that the models are often trading improved likelihood for lower interpretability. The model precision showed a negative correlation (Spearman’s  =  0.235 averaged across all models, corpora, and topics) with the number of senses in WordNet of the words displayed to the subjects [24] and a slight positive correlation ( = 0.109) with the average pairwise Jiang-Conrath similarity of words1 [25]. Topic intrusion In Section 3.2, we introduced the topic intrusion task to measure how well a topic model assigns topics to documents. We define the topic log odds as a quantitative measure of the agreement between the model and human judgments on this task. Let ˆ m d denote model m’s point estimate of the topic proportions vector associated with document d (as described in Section 4.2). Further, let jm d,s  { 1 ...K} be the intruding topic selected by subject s for document d on model m and let jm d, denote the “true” intruder, i.e., the one generated by the model. We define the topic log odds as the log ratio of the probability mass assigned to the true intruder to the probability mass 1Words without entries in WordNet were ignored; polysemy was handled by taking the maximum over all senses of words. To handle words in the same synset (e.g. “fight” and “battle”), the similarity function was capped at 10.0. 7 Topic Log Odds −5 −4 −3 −2 −1 0 −7 −6 −5 −4 −3 −2 −1 0 50 topics G G G G G GG G G CTM LDA pLSI 100 topics G G GG GGG GGG CTM LDA pLSI 150 topics G G G G G G G G G G G G CTM LDA pLSI New York Times Wikipedia Figure 6: The topic log odds (Equation 2) for the three models on two corpora. Higher is better. Although CTM generally achieves a better predictive likelihood than the other models (Table 1), the topics it infers fare worst when evaluated against human judgments. assigned to the intruder selected by the subject, TLOm d = (P s log ˆθm d,jm d,∗−log ˆθm d,jm d,s)/S. (2) The higher the value of TLOm d , the greater the correspondence between the judgments of the model and the subjects. The upper bound on TLOm d is 0. This is achieved when the subjects choose intruders with a mixture proportion no higher than the true intruder’s. Figure 6 shows boxplots of the topic log odds for the three models. As with model precision, LDA and pLSI generally outperform CTM. Again, this trend runs counter to CTM’s superior performance on predictive likelihood. A histogram of the TLO of individual Wikipedia documents is given in Figure 4 (right) for the fifty-topic LDA model. Documents about very specific, unambiguous concepts, such as “Lindy Hop,” have high TLO because it is easy for both humans and the model to assign the document to a particular topic. When documents express multiple disparate topics, human judgments diverge from those of the model. At the low end of the scale is the article “Book” which touches on diverse areas such as history, science, and commerce. It is difficult for LDA to pin down specific themes in this article which match human perceptions. Figure 5 (bottom row) shows that, as with model precision, increasing predictive likelihood does not imply improved topic log odds scores. While the topic log odds are nearly constant across all numbers of topics for LDA and pLSI, for CTM topic log odds and predictive likelihood are negatively correlated, yielding the surprising conclusion that higher predictive likelihoods do not lead to improved model interpretability. 5 Discussion We presented the first validation of the assumed coherence and relevance of topic models using human experiments. For three topic models, we demonstrated that traditional metrics do not capture whether topics are coherent or not. Traditional metrics are, indeed, negatively correlated with the measures of topic quality developed in this paper. Our measures enable new forms of model selection and suggest that practitioners developing topic models should thus focus on evaluations that depend on real-world task performance rather than optimizing likelihood-based measures. In a more qualitative vein, this work validates the use of topics for corpus exploration and information retrieval. Humans appreciate the semantic coherence of topics and can associate the same documents with a topic that a topic model does. An intriguing possibility is the development of models that explicitly seek to optimize the measures we develop here either by incorporating human judgments into the model-learning framework or creating a computational proxy that simulates human judgments. Acknowledgements David M. Blei is supported by ONR 175-6343, NSF CAREER 0745520 and grants from Google and Microsoft. We would also like to thank Dan Osherson for his helpful comments. 8 References [1] Blei, D., J. Lafferty. Text Mining: Theory and Applications, chap. Topic Models. Taylor and Francis, 2009. [2] Mimno, D., A. Mccallum. Organizing the OCA: learning faceted subjects from a library of digital books. In JCDL. 2007. [3] Hofmann, T. Probabilistic latent semantic analysis. In UAI. 1999. [4] Blei, D., A. Ng, M. Jordan. Latent Dirichlet allocation. JMLR, 3:993–1022, 2003. [5] Blei, D. M., J. D. Lafferty. Correlated topic models. In NIPS. 2005. [6] Landauer, T., S. Dumais. Solutions to Plato’s problem: The latent semantic analsyis theory of acquisition, induction, and representation of knowledge. Psychological Review, 2(104):211–240, 1997. [7] Landauer, T. K. On the computational basis of learning and cognition: Arguments from LSA. The Psychology of Learning and Motivation, 41:43–84, 2002. [8] Deerwester, S., S. Dumais, T. Landauer, et al. Indexing by latent semantic analysis. Journal of the American Society of Information Science, 41(6):391–407, 1990. [9] Berry, M. W., S. T. Dumais, T. A. Letsche. Computational methods for intelligent information access. In Supercomputing. 1995. [10] Titov, I., R. McDonald. A joint model of text and aspect ratings for sentiment summarization. In HLT. 2008. [11] Wei, X., B. Croft. LDA-based document models for ad-hoc retrieval. In SIGIR. 2006. [12] Boyd-Graber, J. L., D. M. Blei, X. Zhu. Probabalistic walks in semantic hierarchies as a topic model for WSD. In HLT. 2007. [13] Wallach, H. M., I. Murray, R. Salakhutdinov, et al. Evaluation methods for topic models. In ICML. 2009. [14] Griffiths, T., M. Steyvers. Probabilistic topic models. In T. Landauer, D. McNamara, S. Dennis, W. Kintsch, eds., Latent Semantic Analysis: A Road to Meaning. Laurence Erlbaum, 2006. [15] Hall, D., D. Jurafsky, C. D. Manning. Studying the history of ideas using topic models. In EMNLP. 2008. [16] Mei, Q., X. Shen, C. Zhai. Automatic labeling of multinomial topic models. In KDD. 2007. [17] Erosheva, E., S. Fienberg, J. Lafferty. Mixed-membership models of scientific publications. PNAS, 101(Suppl 1):5220 — 5227, 2004. [18] Dempster, A., N. Laird, D. Rubin, et al. Maximum likelihood from incomplete data via the EM algorithm. Journal of the Royal Statistical Society. Series B, 39(1):1–38, 1977. [19] Schmid, H. Probabilistic part-of-speech tagging using decision trees. In Proceedings of International Conference on New Methods in Language Processing. 1994. [20] Loper, E., S. Bird. NLTK: the natural language toolkit. In Proceedings of the ACL-02 Workshop on Effective tools and methodologies for teaching natural language processing and computational linguistics. 2002. [21] Teh, Y. W., K. Kurihara, M. Welling. Collapsed variational inference for HDP. In NIPS. 2008. [22] Snow, R., B. O’Connor, D. Jurafsky, et al. Cheap and fast—but is it good? evaluating non-expert annotations for natural language tasks. In EMNLP. 2008. [23] Deng, J., W. Dong, R. Socher, et al. ImageNet: A Large-Scale Hierarchical Image Database. In CVPR. 2009. [24] Miller, G. A. Nouns in WordNet: A lexical inheritance system. International Journal of Lexicography, 3(4):245–264, 1990. [25] Jiang, J. J., D. W. Conrath. Semantic similarity based on corpus statistics and lexical taxonomy. In Proceedings on International Conference on Research in Computational Linguistics. 1997. 9
2009
256
3,766
Segmenting Scenes by Matching Image Composites Bryan C. Russell1 Alexei A. Efros2,1 Josef Sivic1 William T. Freeman3 Andrew Zisserman4,1 1INRIA∗ 2Carnegie Mellon University 3CSAIL MIT 4University of Oxford Abstract In this paper, we investigate how, given an image, similar images sharing the same global description can help with unsupervised scene segmentation. In contrast to recent work in semantic alignment of scenes, we allow an input image to be explained by partial matches of similar scenes. This allows for a better explanation of the input scenes. We perform MRF-based segmentation that optimizes over matches, while respecting boundaryinformation. The recoveredsegments are then used to re-query a large database of images to retrieve better matches for the target regions. We show improved performance in detecting the principal occluding and contact boundaries for the scene over previous methods on data gathered from the LabelMe database. 1 Introduction Segmenting semantic objects, and more broadly image parsing, is a fundamentally challenging problem. The task is painfully under-constrained – given a single image, it is extremely difficult to partition it into semantically meaningful elements, not just blobs of similar color or texture. For example, how would the algorithm figure out that doors and windows on a building, which look quite different, belong to the same segment? Or that the grey pavement and a grey house next to it are different segments? Clearly, information beyond the image itself is required to solve this problem. In this paper, we argue that some of this extra information can be extracted by also considering images that are visually similar to the given one. With the increasing availability of Internetscale image collections (in the millions of images!), this idea of data-driven scene matching has recently shown much promise for a variety of tasks. Simply by finding matching images using a low-dimentinal descriptor and transfering any associated labels onto the input image, impressive results have been demonstrated for object and scene recognition [22], object detection [18, 11], image geo-location [7], and particular object and event annotation [15], among others. Even if the image collection does not contain any labels, it has been shown to help tasks such as image completion and exploration [6, 21], image colorization [22], and 3D surface layout estimation [5]. However, as noted by several authors and illustrated in Figure 1, the major stumbling block of all the scene-matching approaches is that, despite the large quantities of data, for many types of images the quality of the matches is still not very good. Part of the reason is that the low-level image descriptors used for matching are just not powerful enough to capture some of the more semantic similarity. Several approaches have been proposed to address this shortcoming, including synthetically increasing the dataset with transformed copies of images [22], cleaning matching results using clustering [18, 7, 5], automatically prefiltering the dataset [21], or simply picking good matches by hand [6]. All these appraoches improve performance somewhat but don’t alleviate this issue entirely. We believe that there is a more fundamental problem – the variability of the visual world is just so vast, with exponential number of different object combinations within each scene, that it might be ∗WILLOW project-team, Laboratoire d’Informatique de l’´Ecole Normale Sup´erieure ENS/INRIA/CNRS UMR 8548 1 Figure 1: Illustration of the scene matching problem. Left: Input image (along with the output segmentation given by our system overlaid) to be matched to a dataset of 100k street images. Notice that the output segment boundaries align well with the depicted objects in the scene. Top right: top three retrieved images, based on matching the gist descriptor [14] over the entire image. The matches are not good. Bottom right: Searching for matches within each estimated segment (using the same gist representation within the segment) and compositing the results yields much better matches to the input image. futile to expect to always find a single overall good match at all! Instead, we argue that an input image should be explained by a spatial composite of different regions taken from different database images. The aim is to break-up the image into chunks that are small enough to have good matches within the database, but still large enough that the matches retain their informative power. 1.1 Overview In this work, we propose to apply scene matching to the problem of segmenting out semantically meaningful objects (i.e. we seek to segment objects enclosed by the principal occlusion and contact boundaries and not objects that are part-of or attached to other objects). The idea is to turn to our advantage the fact that scene matches are never perfect. What typically happens during scene matching is that some part of the image is matched quite well, while other parts are matched only approximately, at a very coarse level. For example, for a street scene, one matching image could have a building match very well, but getting the shape of the road wrong, while another matching image could get the road exactly right, but have a tree instead of a building. These differences in matching provide a powerful signal to identify objects and segmentation boundaries. By computing a matching image composite, we should be able to better explain the input image (i.e. match each region in the input image to semantically similar regions in other images) than if we used a single best match. The starting point of our algorithm is an input image and an “image stack” – a set of coarsely matching images (5000 in our case) retrieved from a large dataset using a standard image matching technique (gist [14] in our case). In essence, the image stack is itself a dataset, but tailor-made to match the overall scene structure for the particular input image. Intuitively, our goal is to use the image stack to segment (and “explain”) the input image in a semantically meaningful way. The idea is that, since the stack is already more-or-less aligned, the regions corresponding to the semantic objects that are present in many images will consistently appear in the same spatial location. The input image can then be explained as a patch-work of these consistent regions, simultaneously producing a segmentation, as well as composite matches, that are better than any of the individual matches within the stack. There has been prior work on producing a resulting image using a stack of aligned images depicting the same scene, in particular the PhotoMontage work [1], which optimally selects regions from the globally aligned images based on a quality score to composite a visually pleasing output image. Recently, there has been work based on the PhotoMontage framework that tries to automatically align images depicting the same scene or objects to perform segmentation [16], region-filling [23], and outlier detection [10]. In contrast, in this work, we are attempting to work on a stack of visually similar, but physically different, scenes. This is in the same spirit as the contemporary work of [11], 2 except they work on supervised data, whereas we are completely unsupervised. Also related is the contemporary work of [9]. Our approach combines boundary-based and region-based segmentation processes together within a single MRF framework. The boundary process (Section 2) uses the stack to determine the likely semantic boundaries between objects. The region process (Section 3) aims to group pixels belonging to the same object across the stack. These cues are combined together within an MRF framework which is solved using GraphCut optimization (Section 4). We present results in Section 5. 2 Boundary process: data driven boundary detection Information from only a single image is in many cases not sufficient for recovering boundaries between objects. Strong image edges could correspond to internal object structures, such as a window or a wheel of a car. Additionally, boundaries between objects often produce weak image evidence, as for example the boundary between a building and road of similar color partially occluding each other. Here, we propose to analyze the statistics of a large number of related images (the stack) to help recover boundaries between objects. We will exploit the fact that objects tend not to rest at exactly the same location relative to each other in a scene. For example, in a street scene, a car may be adjacent to regions belonging to a number of objects, such as building, person, road, etc. On the other hand, relative positions of internal object structures will be consistent across many images. For example, wheels and windows on a car will appear consistently at roughly similar positions across many images. To recover object boundaries, we will measure the ability to consistently match locally to the same set of images in the stack. Intuitively, regions inside an object will tend to match to the same set of images, each having similar appearance, while regions on opposite sides of a boundary will match to different sets of images. More formally, given an oriented line passing through an image point p at orientation θ, we wish to analyze the statistics of two sets of images with similar appearance on each side of the line. For each side of the oriented line, we independently query the stack of images by forming a local image descriptor modulated by a weighted mask. We use a half-Gaussian weighting mask oriented along the line and centered at image point p. This local mask modulates the Gabor filter responses (8 orientations over 4 scales) and the RGB color channels, with a descriptor formed by averaging the Gabor energy and color over 32×32 pixel spatial bins. The Gaussian modulated descriptor g(p, θ) captures the appearance information on one side of the boundary at point p and orientation θ. Appearance descriptors extracted in the same manner across the image stack are compared with the query image descriptor using the L1 distance. Images in the stack are assumed to be coarsely aligned, and hence matches are considered only at the particular query location p and orientation θ across the stack, i.e. matching is not translation invariant. We believe this type of spatially dependent matching is suitable for scene images with consistent spatial layout considered in this work. The quality of the matches can be further improved by fine aligning the stack images with the query [12]. For each image point p and orientation θ, the output of the local matching on the two sides of the oriented line are two ranked lists of image stack indices, Sr and Sl, where the ordering of each list is given by the L1 distance between the local descriptors g(p, θ) of the query image and each image in the stack. We compute Spearman’s rank correlation coefficient between the two rank-ordered lists ρ(p, θ) = 1 −6 n i=1 d2 i n(n2 −1), (1) where n is the number of images in the stack and di is the difference between ranks of the stack image i in the two ranked lists, Sr and Sl. A high rank correlation should indicate that point p lies inside an object’s extent, whereas a low correlation should indicate that point p is at an object boundary with orientation θ. We note however, that low rank correlations could be also caused by poor quality of local matches. Figure 2 illustrates the boundary detection process. For efficiency reasons, we only compute the rank correlation score along points and orientations marked as boundaries by the probability of boundary edge detector (PB) [13], with boundary orientations θ ∈[0, π) quantized in steps of π/8. The final boundary score P DB of the proposed data 3 B A B A Figure 2: Data driven boundary detection. Left: Input image with query edges shown. Right: The top 9 matches in a large collection of images for each side of the query edges. Rank correlation for occlusion boundary (A): -0.0998; rank correlation within the road region (B): 0.6067. Notice that for point B lying inside an object (the road), the ranked sets of retrieved images for the two sides of the oriented line are similar, resulting in a high rank correlation score. At point A lying at an occlusion boundary between the building and the sky, the sets of retrieved images are very different, resulting in a low rank correlation score. driven boundary detector is a gating of the maximum PB response over all orientations, P B, and the rank correlation coefficient ρ, PDB(p, θ) = PB(p, θ)1 −ρ(p, θ) 2 δ[PB(p, θ) = max ¯θ PB(p, ¯θ)]. (2) Note that this type of data driven boundary detection is very different from image based edge detection [4, 13] as (i) strong image edges can receive a low score provided the matched image structures on each side of the boundary co-occur in many places in the image collection, and (ii) weak image edges can receive a high score, provided the neighboring image structures on each side of the weak image boundary do not co-occur often in the database. In contrast to the PB detector, which is trained from manually labelled object boundaries, data driven boundary scores are determined based on co-occurrence statistics of similar scenes and require no additional manual supervision. Figure 3 shows examples of data driven boundary detection results. Quantitative evaluation is given in section 5. 3 Region process: data driven image grouping The goal is to group pixels in a query image that are likely to belong to the same object or a major scene element (such as a building, a tree, or a road). Instead of relying on local appearance similarity, such as color or texture, we again turn to the dataset of scenes in the image stack to suggest the groupings. Our hypothesis is that regions corresponding to semantically meaningful objects would be coherent across a large part of the stack. Therefore, our goal is to find clusters within the stack that are both (i) self-consistent, and (ii) explain well the query image. Note that for now, we do not want to make any hard decisions, therefore, we want to allow multiple clusters to be able to explain overlapping parts of the query image. For example, a tree cluster and a building cluster (drawn from different parts of the stack) might be able to explain the same patch of the image, and both hypotheses should be retained. This way, the final segmentation step in the next section will be free to chose the best set of clusters based on all the information available within a global framework. Therefore our approach is to find clusters of image patches that match the same images within the stack. In other words, two patches in the query image will belong to the same group if the sets of their best matching images from the database are similar. As in the boundary process described in section 2, the query image is compared with each database image only at the particular query patch location, i.e. the matching is not translation invariant. Note that patches with very different appearance can be grouped together as long as they match the same database images. For example, a 4 (a) (b) (c) (d) Figure 3: Data driven boundarydetection. (a) Input image. (b) Ground truth boundaries. (c) P B [13]. (d) Proposed data driven boundary detection. Notice enhanced object boundaries and suppressed false positives boundaries inside objects. door and a window of a building can be grouped together despite their different shape and appearance as long as they co-occur together (and get matched) in other images. This type of matching is different from self-similarity matching [20] where image patches within the same image are grouped together if they look similar. Formally, given a database of N scene images, each rectangular patch in the query image is described by an N dimensional binary vector, y, where the i-th element y [i] is set to 1 if the i-th image in the database is among the m = 1000 nearest neighbors of the patch. Other elements of y are set to 0. The nearest neighbors for each patch are obtained by matching the local gist and color descriptors at the particular image location as described in section 2, but here center weighted by a full Gaussian mask with σ = 24 pixels. We now wish to find cluster centers ck for k ∈{1, . . . , K}. Many methods exist for finding clusters in such space. For example, one can think of the desired object clusters as “topics of an image stack” and apply one of the standard topic discovery methods like probabilistic latent semantic analysis (pLSA) [8] or Latent Dirichlet Allocation (LDA) [2]. However, we found that a simple K-means algorithm applied to the indicator vectors produced good results. Clearly, the number of clusters, K, is an important parameter. Because we are not trying to discover all the semantic objects within a stack, but only those that explain well the query image, we found that a relatively small number of clusters (e.g. 5) is sufficient. Figure 4 shows heat maps of the similarity (measured as c T k y) of each binary vector to the recovered cluster centers. Notice that regions belonging to the major scene components are highlighted. Although hard K-means clustering is applied to cluster patches at this stage, a soft similarity score for each patch under each cluster is used in a segmentation cost function incorporating both region and boundary cues, described next. 4 Image segmentation combining boundary and region cues In the preceding two sections we have developed models for estimating data-driven scene boundaries and coherent regions from the image stack. Note that while both the boundary and the region processes use the same data, they are in fact producing very different, and complementary, types of information. The region process aims to find large groups of coherent pixels that co-occur together often, but is not too concerned about precise localization. The boundary process, on the other hand, focuses rather myopically on the local image behavior around boundaries but has excellent localiza5 Figure 4: Data driven image grouping. Left: input image. Right: heat maps indicating groupings of pixels belonging to the same scene component, which are found by clustering image patches that match the same set of images in the stack (warmer colors correspond to higher similarity to a cluster center). Notice that regions belonging to the major scene components are highlighted. Also, local regions with different appearances (e.g. doors and windows in the interior of the building) can map to the same cluster since they only need to match to the same set of images. Finally, the highlighted regions tend to overlap, thereby providing multiple hypotheses for a local region. tion. Both pieces of information are needed for a successful scene segmentation and explanation. In this section, we propose to use a single MRF-based optimization framework for this task, that will negotiate between the more global region process and the well-localized boundary process. We set up a multi-state MRF on pixels for segmentation, where the states correspond to the K different image stack groups from section 3. The MRF is formulated as follows: min x  i φi(xi, yi) +  (i,j) ψi,j(xi, xj) (3) where xi ∈{0, 1, . . ., K} is the state at pixel i corresponding to one of K different image stack groups (section 3), φi are unary costs defined by similarity of a patch at pixel i, described by an indicator vector yi (section 3), to each of the K image stack groups, and ψ i,j are binary costs for a boundary-dependent Potts model (section 2). We also allow an additional outlier state x i = 0 for regions that do not match any of the clusters well. For the pairwise term, we assume a 4neighbourhood structure, i.e. the extent is over adjacent horizontal and vertical neighbors. The unary term in Equation 3 encourages pixels explained well by the same group of images from the stack to receive the same label. The binary term encourages neighboring pixels to have the same label, except in a case of a strong boundary evidence. In more details, the unary term is given by φi(xi = k, yi) =  −s(ck, yi) k ∈{1, . . ., K} γ k = 0 (4) where γ is a scalar parameter, and s(ck, yi) = cT k yi is the similarity between indicator vector yi describing the local image appearance at pixel i (section 3) and the k-th cluster center c k. The pairwise term is defined as ψi,j(xi, xj) = (α + βf(i, j)) δ[xi = xj] (5) where f(i, j) is a function dependent on the output of the data-driven boundary detector P DB (Equation 2), and α and β are scalar parameters. Since PDB is a line process with output strength and orientation defined at pixels rather than between pixels, as in the standard contrast dependent pairwise term [3], we must take care to place the pairwise costs consistently along one side of each continuous boundary. For this, let Pi = maxθ PDB(i, θ) and θi = argmaxθ PDB(i, θ). If i and j are vertical neighbors, with i on top, then f(i, j) = max{0, Pj −Pi}. If i and j are horizontal neighbors, with i on the left, then f(i, j) = max{0, (Pj −Pi)δ[θj < π/2], (Pi −Pj)δ[θi ≥π/2]}. Notice that since PDB is non-negative everywhere, we only incorporate a cost into the model when the difference between adjacent PDB elements is positive. We minimize Equation (3) using graph cuts with alpha-beta swaps [3]. We optimized the parameters on a validation set by manual tuning on the boundary detection task (section 5). We set α = −0.1, β = 0.25, and γ = −0.25. Note that the number of recovered segments is not necessarily equal to the number of image stack groups K. 6 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 Recall Precision PB Data−driven detector (PDB) Segmentation Figure 5: Evaluation of the boundary detection task on the principal occlusion and contact boundaries extracted from the LabelMe database [17]. We show precision-recall curves for PB [13] (blue triangle line) and our data-driven boundary detector (red circle line). Notice that we achieve improved performance across all recalls. We also show the precision and recall of the output segmentations (green star), which achieves 0.55 precision at 0.09 recall. At the same recall level, PB and the data-driven boundary detector achieves 0.45 and 0.50 precision, respectively. 5 Experimental evaluation In this section, we evaluate the data-driven boundary detector and the proposed image segmentation model on a challenging dataset of complex street scenes from the LabelMe database [19]. For the unlabelled scene database, we use a dataset of 100k street scene images gathered from Flickr [21]. Boundary detection and image grouping are then applied only within this candidate set of images. Figure 6 shows several final segmentations. Notice that the recovered segments correspond to the large objects depicted in the images, with the segment boundaries aligning along the objects’ boundaries. For each segment, we re-query the image stack by using the segment as a weighted mask to retrieve images that match the appearance within the segment. The top matches for each segment are stitched together to form a composite, which are shown in Figure 6. As a comparison, we show the top matches using the global descriptor. Notice that the composites better align with the contents depicted in the input image. We quantitatively evaulate our system by measuring how well we can detect ground truth object boundaries provided by human labelers. To evaluate object boundary detection, we use 100 images depicting street scenes from the benchmark set of the LabelMe database [19]. The benchmark set consists of fully labeled images taken from around the world. A number of different types of edges are implicitly labeled in the LabelMe database, such as those arising through occlusion, attachment, and contact with the ground. For this work, we filter out attached objects (e.g. a window is attached to a building and hence does not generate any object boundaries) using the techniques outlined in [17]. Note that this benchmark is more appropriate for our task than the BSDS [13] since the dataset explicitly contains occlusion boundaries and not interior contours. To measure performance, we used the evaluation procedure outlined in [13], which aligns output boundaries for a given threshold to the ground truth boundaries to compute precision and recall. A curve is generated by evaluating at all thresholds. For a boundary to be considered correct, we assume that it must lie within 6 pixels of the ground truth boundary. Figure 5 shows a precision-recall curve for the data-driven boundary detector. We compare against PB using color [13]. Notice that we achieve higher precision at all recall levels. We also plot the precision and recall of the output segmentation produced by our system. Notice that the segmentation produced the highest precision (0.55) at 0.09 recall. The improvement in performance at low recall is largely due to the ability to suppress interior contours due to attached objects (c.f. Figure 3). However, we tend to miss small, moveable objects, which accounts for the lower performance at high recall. 6 Conclusion We have shown that unsupervised analysis of a large image collection can help segmenting complex scenes into semantically coherent parts. We exploit object variations over related images using MRF-based segmentation that optimizes over matches while preserving scene boundaries obtained by a data driven boundary detection process. We have demonstrated an improved performance in detecting the principal occlusion and contact boundaries over previous methods on a challenging dataset of complex street scenes from LabelMe. Our work also suggests that other applications of 7 Figure 6: Left: Output segmentation produced by our system. Notice that the segment boundaries align well with the depicted objects in the scene. Top right: Top matches for each recovered segment, which are stitched together to form a composite. Bottom right: Top whole-image matches using the gist descriptor. By recovering the segmentation, we are able to recover improved semantic matches. scene matching, such as object recognition or computer graphics, might benefit from segment-based explanations of the query scene. Acknowledgments: This work was partially supported by ONR MURI N00014-06-1-0734, ONR MURI N00014-07-1-0182, NGA NEGI-1582-04-0004, NSF grant IIS-0546547, gifts from Microsoft Research and Google, and Guggenheim and Sloan fellowships. 8 References [1] A. Agarwala, M. Dontcheva, M. Agrawala, S. Drucker, A. Colburn, B. Curless, D. Salesin, and M. Cohen. Interactive digital photomontage. In SIGGRAPH, 2004. [2] D. Blei, A. Ng, and M. Jordan. Latent dirichlet allocation. Journal of Machine Learning Research, 3:993–1022, 2003. [3] Y. Boykov, O. Veksler, and R. Zabih. Fast approximate energy minimization via graph cuts. IEEE Trans. on Pattern Analysis and Machine Intelligence, 23(11), 2001. [4] J. F. Canny. A computational approach to edge detection. IEEE Trans. on Pattern Analysis and Machine Intelligence, 8(6):679–698, 1986. [5] S. K. Divvala, A. A. Efros, and M. Hebert. Can similar scenes help surface layout estimation? In IEEE Workshop on Internet Vision, associated with CVPR, 2008. [6] J. Hays and A. Efros. Scene completion using millions of photographs. In ”SIGGRAPH”, 2007. [7] J. Hays and A. A. Efros. IM2GPS: estimating geographic information from a single image. In CVPR, 2008. [8] T. Hofmann. Unsupervised learning by probabilistic latent semantic analysis. Machine Learning, 43:177– 196, 2001. [9] M. K. Johnson, K. Dale, S. Avidan, H. Pfister, W. T. Freeman, and W. Matusik. CG2Real: Improving the realism of computer-generated images using a large collection of photographs. Technical Report 2009-034, MIT CSAIL, 2009. [10] H. Kang, A. A. Efros, M. Hebert, and T. Kanade. Image composition for object pop-out. In IEEE Workshop on 3D Representation for Recognition (3dRR-09), in assoc. with CVPR, 2009. [11] C. Liu, J. Yuen, and A. Torralba. Nonparametric scene parsing: label transfer via dense scene alignment. In CVPR, 2009. [12] C. Liu, J. Yuen, A. Torralba, J. Sivic, and W. T. Freeman. SIFT flow: dense correspondence across different scenes. In ECCV, 2008. [13] D. Martin, C. Fowlkes, and J. Malik. Learning to detect natural image boundaries using local brightness, color, and texture cues. IEEE Trans. on Pattern Analysis and Machine Intelligence, 26(5):530–549, 2004. [14] A. Oliva and A. Torralba. Modeling the shape of the scene: a holistic representation of the spatial envelope. IJCV, 42(3):145–175, 2001. [15] T. Quack, B. Leibe, and L. V. Gool. World-scale mining of objects and events from community photo collections. In CIVR, 2008. [16] C. Rother, V. Kolmogorov, T. Minka, and A. Blake. Cosegmentation of image pairs by histogram matching - incorporating a global constraint into MRFs. In CVPR, 2006. [17] B. C. Russell and A. Torralba. Building a database of 3D scenes from user annotations. In CVPR, 2009. [18] B. C. Russell, A. Torralba, C. Liu, R. Fergus, and W. T. Freeman. Object recognition by scene alignment. In Advances in Neural Info. Proc. Systems, 2007. [19] B. C. Russell, A. Torralba, K. P. Murphy, and W. T. Freeman. LabelMe: a database and web-based tool for image annotation. IJCV, 77(1-3):157–173, 2008. [20] E. Shechtman and M. Irani. Matching local self-similarities across images and videos. In CVPR, 2007. [21] J. Sivic, B. Kaneva, A. Torralba, S. Avidan, and W. T. Freeman. Creating and exploring a large photorealistic virtual space. In First IEEE Workshop on Internet Vision, associated with CVPR, 2008. [22] A. Torralba, R. Fergus, and W. T. Freeman. 80 million tiny images: a large dataset for non-parametric object and scene recognition. IEEE Trans. on Pattern Analysis and Machine Intelligence, 30(11):1958– 1970, 2008. [23] O. Whyte, J. Sivic, and A. Zisserman. Get out of my picture! Internet-based inpainting. In British Machine Vision Conference, 2009. 9
2009
257
3,767
Generalization Errors and Learning Curves for Regression with Multi-task Gaussian Processes Kian Ming A. Chai School of Informatics, University of Edinburgh, 10 Crichton Street, Edinburgh EH8 9AB, UK k.m.a.chai@ed.ac.uk Abstract We provide some insights into how task correlations in multi-task Gaussian process (GP) regression affect the generalization error and the learning curve. We analyze the asymmetric two-tasks case, where a secondary task is to help the learning of a primary task. Within this setting, we give bounds on the generalization error and the learning curve of the primary task. Our approach admits intuitive understandings of the multi-task GP by relating it to single-task GPs. For the case of one-dimensional input-space under optimal sampling with data only for the secondary task, the limitations of multi-task GP can be quantified explicitly. 1 Introduction Gaussian processes (GPs) (see e.g., [1]) have been applied to many practical problems. In recent years, a number of models for multi-task learning with GPs have been proposed to allow different tasks to leverage on one another [2–5]. While it is generally assumed that learning multiple tasks together is beneficial, we are not aware of any work that quantifies such benefits, other than PACbased theoretical analysis for multi-task learning [6–8]. Following the tradition of the theoretical works on GPs in machine learning, our goal is to quantify the benefits using average-case analysis. We concentrate on the asymmetric two-tasks case, where the secondary task is to help the learning of the primary task. Within this setting, the main parameters are (1) the degree of “relatedness” ρ between the two tasks, and (2) the ratio πS of total training data for the secondary task. While higher |ρ| and lower πS is clearly more beneficial to the primary task, the extent and manner that this is so has not been clear. To address this, we measure the benefits using generalization error, learning curve and optimal error, and investigate the influence of ρ and πS on these quantities. We will give non-trivial lower and upper bounds on the generalization error and the learning curve. Both types of bounds are important in providing assurance on the quality of predictions: an upper bound provides an estimate of the amount of training data needed to attain a minimum performance level, while a lower bound provides an understanding of the limitations of the model [9]. Our approach relates multi-task GPs to single-task GPs and admits intuitive understandings of multi-task GPs. For one-dimensional input-space under optimal sampling with data only for the secondary task, we show the limit to which error for the primary task can be reduced. This dispels any misconception that abundant data for the secondary task can remedy no data for the primary task. 2 Preliminaries and problem statement 2.1 Multi-task GP regression model and setup The multi-task Gaussian process regression model in [5] learns M related functions {fm}M m=1 by placing a zero mean GP prior which directly induces correlations between tasks. Let ym be an 1 observation of the mth function at x. Then the model is given by ⟨fm(x)fm′(x′)⟩def= Kf mm′kx(x, x′) ym ∼N(fm(x), σ2 m), (1) where kx is a covariance function over inputs, and Kf is a positive semi-definite matrix of inter-task similarities, and σ2 m is the noise variance for the mth task. The current focus is on the two tasks case, where the secondary task S is to help improve the performance of the primary task T; this is the asymmetric multi-task learning as coined in [10]. We fix Kf to be a correlation matrix, and let the variance be explained fully by kx (the converse has been done in [5]). Thus Kf is fully specified by the correlation ρ ∈[−1, 1] between the two tasks. We further fix the noise variances of the two tasks to be the same, say σ2 n. For the training data, there are nT (resp. nS) observations at locations XT (resp. XS) for task T (resp. S). We use n def= nT + nS for the total number of observations, πS def= nS/n for the proportion of observations for task S, and also X def= XT ∪XS. The aim is to infer the noise-free response fT ∗for task T at x∗. See Figure 1. The covariance matrix of the noisy training data is K(ρ) + σ2 nI, where K(ρ) def=  Kx T T ρKx T S ρKx ST Kx SS  ; (2) and Kx T T (resp. Kx SS) is the matrix of covariances (due to kx) between locations in XT (resp. XS); Kx T S is the matrix of cross-covariances from locations in XT to locations in XS; and Kx ST is Kx T S transposed. The posterior variance at x∗for task T is σ2 T (x∗, ρ, σ2 n, XT , XS) = k∗∗−kT ∗(K(ρ) + σ2 nI)−1k∗, where kT ∗ def= (kx T ∗)T ρ(kx S∗)T ; (3) and k∗∗is the prior variance at x∗, and kx T ∗(resp. kx S∗) is the vector of covariances (due to kx) between locations in XT (resp. XS) and x∗. Where appropriate and clear from context, we will suppress some of the parameters in σ2 T (x∗, ρ, σ2 n, XT , XS), or use X for (XT , XS). Note that σ2 T (ρ) = σ2 T (−ρ), so that σ2 T (1) is the same as σ2 T (−1); for brevity, we only write the former. If the GP prior is correctly specified, then the posterior variance (3) is also the generalization error at x∗[1, §7.3]. The latter is defined as ⟨(f ⋆ T (x∗) −¯fT (x∗))2⟩f ⋆ T , where ¯fT (x∗) is the posterior mean at x∗for task T, and the expectation is taken over the distribution from which the true function f ⋆ T is drawn. In this paper, in order to distinguish succinctly from the generalization error introduced in the next section, we use posterior variance to mean the generalization error at x∗. Note that the actual y-values observed at X do not effect the posterior variance at any test location. Problem statement Given the above setting, the aim is to investigate how training observations for task S can benefit the predictions for task T. We measure the benefits using generalization error, learning curve and optimal error, and investigate how these quantities vary with ρ and πS. 2.2 Generalization errors, learning curves and optimal errors We outline the general approach to obtain the generalization error and the learning curve [1, §7.3] under our setting, where we have two tasks and are concerned with the primary task T. Let p(x) be the probability density, common to both tasks, from which test and training locations are drawn, and assume that the GP prior is correctly specified. The generalization error for task T is obtained by averaging the posterior variance for task T over x∗, and the learning curve for task T is obtained by averaging the generalization error over training sets X: generalization error: ϵT (ρ, σ2 n, XT , XS) def= R σ2 T (x∗, ρ, σ2 n, XT , XS)p(x∗)dx∗ (4) learning curve: ϵavg T (ρ, σ2 n, πS, n) def= R ϵT (ρ, σ2 n, XT , XS)p(X)dX, (5) where the training locations in X are drawn i.i.d, that is, p(X) factorizes completely into a product of p(x)s. Besides averaging ϵT to obtain the learning curve, one may also use the optimal experimental design methodology and minimize ϵT over X to find the optimal generalization error [11, chap. II]: optimal error: ϵopt T (ρ, σ2 n, πS, n) def= minX ϵT (ρ, σ2 n, XT , XS). (6) Both ϵT (0, σ2 n, XT , XS) and ϵT (1, σ2 n, XT , XS) reduce to single-task GP cases; the former discards training observations at XS, while the latter includes them. Similar analogues to single-task GP cases for ϵavg T (0, σ2 n, πS, n) and ϵavg T (1, σ2 n, πS, n), and ϵopt T (0, σ2 n, πS, n) and ϵopt T (1, σ2 n, πS, n) can be obtained. Note that ϵavg T and ϵopt T are well-defined since πSn = nS ∈N0 by the definition of πS. 2 ⊛ T Task-space S ρ kx(x, x′) Input space |XS| = nS |XT | = nT Figure 1: The two tasks S and T have task correlation ρ. The data set XT (resp. XS) for task T (resp. S) consists of the •s (resp. s). The test location x∗for task T is denoted by ⊛. 0 0.2 0.4 0.6 0.8 1 0 0.2 0.4 0.6 0.8 1 σ2 T (x∗) x∗ ρ = 0 ρ = 1 Figure 2: The posterior variances of each test location within [0, 1] given data •s at 1/3 and 2/3 for task T, and s at 1/5, 1/2 and 4/5 for task S. 2.3 Eigen-analysis We now state known results of eigen-analysis used in this paper. Let ¯κ def= κ1 > κ2 > . . . and φ1(·), φ2(·), . . . be the eigenvalues and eigenfunctions of the covariance function kx under the measure p(x)dx: they satisfy the integral equation R kx(x, x′)φi(x)p(x)dx = κiφi(x′). Let ¯λ def= λ1 > λ2 > . . . > λnS def= ¯λ be the eigenvalues of Kx SS. If the locations in XS are sampled from p(x), then κi = limnS→∞λi/nS, i = 1 . . . nS; see e.g., [1, §4.3.2] and [12, Theorem 3.4]. However, for finite nS used in practice, the estimate λi/nS for κi is better for the larger eigenvalues than for the smaller ones. Additionally, in one-dimension with uniform p(x) on the unit interval, if kx satisfies the Sacks-Ylvisaker conditions of order r, then κi ∝(πi)−2r−2 in the limit i →∞ [11, Proposition IV.10, Remark IV.2]. Broadly speaking, an order r process is exactly r times mean square differentiable. For example, the stationary Ornstein-Uhlenbeck process is of order r = 0. 3 Generalization error In this section, we derive expressions for the generalization error (and the bounds thereon) for the two-tasks case in terms of the single-task one. To illustrate and further motivate the problem, Figure 2 plots the posterior variance σ2 T (x∗, ρ) as a function of x∗given two observations for task T and three observations for task S. We roughly follow [13, Fig. 2], and use squared exponential covariance function with length-scale 0.11 and noise variance σ2 n = 0.05. Six solid curves are plotted, corresponding, from top to bottom, to ρ2 = 0, 1/8, 1/4, 1/2, 3/4 and 1. The two dashed curves enveloping each solid curve are the lower and upper bounds derived in this section; the dashed curves are hardly visible because the bounds are rather tight. The dotted line is the prior noise variance. Similar to the case of single-task learning, each training point creates a depression on the σ2 T (x∗, ρ) surface [9, 13]. However, while each training point for task T creates a “full” depression that reaches the prior noise variance (horizontal dotted line at 0.05), the depression created by each training point for task S depends on ρ, “deeper” depressions for larger ρ2. From the figure, and also from definition, it is clear that the following trivial bounds on σ2 T (x∗, ρ) hold: Proposition 1. For all x∗, σ2 T (x∗, 1) ⩽σ2 T (x∗, ρ) ⩽σ2 T (x∗, 0). Integrating wrt to x∗then gives the following corollary: Corollary 2. ϵT (1, σ2 n, XT , XS) ⩽ϵT (ρ, σ2 n, XT , XS) ⩽ϵT (0, σ2 n, XT , XS). Sections 3.2 and 3.3 derive lower and upper bounds that are tighter than the above trivial bounds. Prior to the bounds, we consider a degenerate case to illustrate the limitations of multi-task learning. 3.1 The degenerate case of no training data for primary task It is clear that if there is no training data for the secondary task, that is, if XS = ∅, then σ2 T (x∗1) = σ2 T (x∗, ρ) = σ2 T (x∗0) for all x∗and ρ. In the converse case where there is no training data for the primary task, that is, XT = ∅, we instead have the following proposition: 3 Proposition 3. For all x∗, σ2 T (x∗, ρ, ∅, XS) = ρ2σ2 T (x∗, 1, ∅, XS) + (1 −ρ2)k∗∗. Proof. σ2 T (x∗, ρ, ∅, XS) = k∗∗−ρ2(kx S∗)T(Kx SS + σ2 nI)−1kx S∗ = (1 −ρ2)k∗∗+ ρ2  k∗∗−(kx S∗)T(Kx SS + σ2 nI)−1kx S∗  = (1 −ρ2)k∗∗+ ρ2σ2 T (x∗, 1, ∅, XS). Hence the posterior variance is a weighted average of the prior variance k∗∗and the posterior variance at perfect correlation. When the cardinality of XS increases under infill asymptotics [14, §3.3], limnS→∞σ2 T (x∗, 1, ∅, XS) = 0 =⇒ limnS→∞σ2 T (x∗, ρ, ∅, XS) = (1 −ρ2)k∗∗. (7) This is the limit for the posterior variance at any test location for task T, if one has training data only for the secondary task S. This is because a correlation of ρ between the tasks prevents any training location for task S from having correlation higher than ρ with a test location for task T. Suppose correlations in the input-space are given by an isotropic covariance function kx(|x −x′|). If we translate correlations into distances between data locations, then any training location from task S is beyond a certain radius from any test location for task T. In contrast, a training location from task T may lay arbitrarily close to a test location for task T, subject to the constraints of noise. We obtain the generalization error in this degenerate case, by integrating Proposition 3 wrt p(x∗)dx∗ and using the fact that the mean prior variance is given by the sum of the process eigenvalues. Corollary 4. ϵT (ρ, σ2 n, ∅, XS) = ρ2ϵT (1, σ2 n, ∅, XS) + (1 −ρ2) P∞ i=1 κi. 3.2 A lower bound When XT ̸= ∅, the correlations between locations in XT and locations in XS complicate the situation. However, since σ2 T (ρ) is a continuous and monotonically decreasing function of ρ, there exists an α ∈[0, 1], which depends on ρ, x∗and X, such that σ2 T (ρ) = ασ2 T (1) + (1 −α)σ2 T (0). That α depends on x∗obstructs further analysis. The next proposition gives a lower bound ¯σ2 T (ρ) of the same form satisfying σ2 T (1) ⩽¯σ2 T (ρ) ⩽σ2 T (ρ), where the mixing proportion is independent of x∗. Proposition 5. Let ¯σ2 T (x∗, ρ) def= ρ2σ2 T (x∗, 1) + (1 −ρ2)σ2 T (x∗, 0). Then for all x∗: (a) ¯σ2 T (x∗, ρ) ⩽σ2 T (x∗, ρ) (b) σ2 T (x∗, ρ) −¯σ2 T (x∗, ρ) ⩽ρ2(σ2 T (x∗, 0) −σ2 T (x∗, 1)) (c) arg maxρ2  σ2 T (x∗, ρ) −¯σ2 T (x∗, ρ)  ⩾1/2. The proofs are in supplementary material §S.2. The lower bound ¯σ2 T (ρ) depends explicitly on ρ2. It depends implicitly on πS, which is the proportion of observations for task S, through the gap between σ2 T (1) and σ2 T (0). If there is no training data for the primary task, i.e., if πS = 1, the bound reduces to Proposition 3, and becomes exact for all values of ρ. If πS = 0, the bound is also exact. For πS ̸∈{0, 1}, the bound is exact when ρ ∈{−1, 0, 1}. As from Figure 2 and later from our simulation results in section 5.3, this bound is rather tight. Part (b) of the proposition states the tightness of the bound: it is no more than factor ρ2 of the gap between the trivial bounds σ2 T (0) and σ2 T (1). Part (c) of the proposition says that the bound is least tight for a value of ρ2 greater than 1/2. We provide an intuition on Proposition 5a. Let ¯f1 (resp. ¯f0) be the posterior mean of the single-task GP when ρ = 1 (resp. ρ = 0). Contrasted with the multi-task predictor ¯fT , ¯f1 directly involves the noisy observations for task T at XS, so it has more information on task T. Hence, predicting ¯f1(x∗) gives the trivial lower bound σ2 T (1) on σ2 T (ρ). The tighter bound ¯σ2 T (ρ) is obtained by “throwing away” information and predicting ¯f1(x∗) with probability ρ2 and ¯f0(x∗) with probability (1 −ρ2). Finally, the next corollary is readily obtained from Proposition 5a by integrating wrt p(x∗)dx∗. This is possible because ρ is independent of x∗. Corollary 6. Let ¯ϵT (ρ, σ2 n, XT , XS) def= ρ2ϵT (1, σ2 n, XT , XS) + (1 −ρ2)ϵT (0, σ2 n, XT , XS). Then ¯ϵT (ρ, σ2 n, XT , XS) ⩽ϵT (ρ, σ2 n, XT , XS). 3.3 An upper bound via equivalent isotropic noise at XS The following question motivates our upper bound: if the training locations in XS had been observed for task T rather than for task S, what is the variance ˜σ2 n of the equivalent isotropic noise at XS so 4 that the posterior variance remains the same? To answer this question, we first refine the definition of σ2 T (·) to include a different noise variance parameter s2 for the XS observations: σ2 T (x∗, ρ, σ2 n, s2, XT , XS) def= k∗∗−kT ∗ h K(ρ) +  σ2 nI 0 0 s2I i−1k∗; (8) cf. (3). We may suppress the parameters x∗, XT and XS when writing σ2 T (·). The variance ˜σ2 n of the equivalent isotropic noise is a function of x∗defined by the equation σ2 T (x∗, 1, σ2 n, ˜σ2 n) = σ2 T (x∗ρ, σ2 n, σ2 n). (9) For any x∗there is always a ˜σ2 n that satisfies the equation because the difference ∆(ρ, σ2 n, s2) def= σ2 T (ρ, σ2 n, σ2 n) −σ2 T (1, σ2 n, s2) (10) is a continuous and monotonically decreasing function of s2. To make progress, we seek an upper bound ¯σ2 n for ˜σ2 n that is independent of the choice of x∗: ∆(ρ, σ2 n, ¯σ2 n) ⩽0 for all test locations. Of interest is the tight upper bound ¯¯σ2 n, which is the minimum possible ¯σ2 n, given in the next proposition. Proposition 7. Let ¯λ be the maximum eigenvalue of Kx SS, β def= ρ−2 −1 and ¯¯σ2 n def= β(¯λ+σ2 n)+σ2 n. Then for all x∗, σ2 T (x∗, ρ, σ2 n, σ2 n) ⩽σ2 T (x∗, 1, σ2 n, ¯¯σ2 n). The bound is tight in this sense: for any ¯σ2 n, if ∀x∗σ2 T (x∗, ρ, σ2 n, σ2 n) ⩽σ2 T (x∗, 1, σ2 n, ¯σ2 n), then ∀x∗σ2 T (x∗, ρ, σ2 n, ¯¯σ2 n) ⩽σ2 T (x∗, 1, σ2 n, ¯σ2 n). Proof sketch. Matrix K(ρ) may be factorized as K(ρ) =  I 0 0 ρI   Kx T T Kx T S Kx ST ρ−2Kx SS   I 0 0 ρI  . (11) By using this factorization in the posterior variance (8) and taking out the I 0 0 ρI  factors, we obtain σ2 T (ρ, σ2 n, s2) = k∗∗−(kx ∗)T[Σ(ρ, σ2 n, s2)]−1kx ∗, (12) where (kx ∗)T def= (kx T ∗)T, (kx S∗)T and Σ(ρ, σ2 n, s2) def=  Kx T T Kx T S Kx ST ρ−2Kx SS  +  σ2 nI 0 0 ρ−2s2I  = Σ(1, σ2 n, s2) + β  0 0 0 Kx SS + s2I  . The second expression for Σ makes clear that, in the terms of σ2 T (ρ, σ2 n, σ2 n), having data XS for task S is equivalent to an additional correlated noise at these observations for task T. This expression motivates the question that began this section. Note that ρ−2 ⩾1, and hence β ⩾0. The increase in posterior variance due to having XS at task S with noise variance σ2 n rather than having them at task T with noise variance s2 is given by ∆(ρ, σ2 n, s2), which we may now write as ∆(ρ, σ2 n, s2) = (kx ∗)T  (Σ(1, σ2 n, s2))−1 −(Σ(ρ, σ2 n, σ2 n))−1 kx ∗. (13) Recall that we seek an upper bound ¯σ2 n for ˜σ2 n such that ∆(ρ, σ2 n, ¯σ2 n) ⩽0 for all test locations. In general, this requires ¯¯σ2 n def= β(¯λ + σ2 n) + σ2 n ⩽¯σ2 n; details can be found in supplementary material §S.3. The tightness ¯¯σ2 n is evident from the construction. Intuitively, σ2 T (x∗, 1, σ2 n, ¯¯σ2 n) is the tight upper bound because it inflates the noise (co)variance at XS just sufficiently, from (βKx SS + σ2 nI/ρ2) to ¯¯σ2 nI. Analogously, the tight lower bound on ˜σ2 n is given by =σ2 n def= β(¯λ + σ2 n) + σ2 n. In summary, ρ−2σ2 n ⩽=σ2 n ⩽˜σ2 n ⩽¯¯σ2 n ⩽¯σ2 n, where the first inequality is obtained by substituting in zero for ¯λ in =σ2 n. Hence observing XS at S is at most as “noisy” as an additional β(¯λ + σ2 n) noise variance, and at least as “noisy” as an additional β(¯λ + σ2 n) noise variance. Since β decreases with |ρ|, the additional noise variances are smaller when |ρ| is larger, i.e., when the task S is more correlated with task T. We give a description of how the above bounds scale with nS, using the results stated in section 2.3. For large enough nS, we may write ¯λ ≈nS¯κ and ¯λ ≈nSκnS. Furthermore, for uniformly distributed inputs in the one-dimension unit interval, if the covariance function satisfies Sacks-Ylvisaker conditions of order r, then κnS = Θ (πnS)−2r−2 , so that ¯λ = Θ (πnS)−2r−1 . Since ¯¯σ2 n and =σ2 n are linear in ¯λ and ¯λ, we have ¯¯σ2 n = ρ−2σ2 n + β Θ(nS) and =σ2 n = ρ−2σ2 n + β Θ n−2r−1 S  . For the upper bound ¯¯σ2 n, note that although it scales linearly with nS, the eigenvalues of K(1) scales with n, thus σ2 T (1, σ2 n, ¯¯σ2 n) depends on πS def= nS/n. In contrast the lower bound =σ2 n is dominated by ρ−2σ2 n, so that σ2 T (1, σ2 n, =σ2 n) does not depend on πS even for moderate sizes nS. Therefore, the lower bound is not as useful as the upper bound. Finally, if we refine ϵT as we have done for σ2 T in (8), we obtain the following corollary: Corollary 8. Let ¯ϵT (ρ, σ2 n, σ2 n, XT , XS) def= ϵT (1, σ2 n, ¯¯σ2 n, XT , XS). Then ¯ϵT (ρ, σ2 n, σ2 n, XT , XS) ⩾ϵT (ρ, σ2 n, σ2 n, XT , XS). 5 3.4 Exact computation of generalization error The factorization of σ2 T expressed by (12) allows the generalization error to be computed exactly in certain cases. We replace the quadratic form in (12) by matrix trace and then integrate out x∗to give ϵT (ρ, σ2 n, XT , XS) = ⟨k∗∗⟩−tr Σ−1⟨kx ∗(kx ∗)T⟩  = P∞ i=1 κi −tr Σ−1M  , where Σ denotes Σ(ρ, σ2 n, σ2 n), the expectations are taken over x∗, and M is an n-by-n matrix with Mpq def= R kx(xp, x∗) kx(xq, x∗) p(x∗)dx∗= P∞ i=1 κ2 i φi(xp)φi(xq), where xp, xq ∈X. When the eigenfunctions φi(·)s are not bounded, the infinite-summation expression for Mpq is often difficult to use. Nevertheless, analytical results for Mpq are still possible in some cases using the integral expression. An example is the case of the squared exponential covariance function with normally distributed x, when the integrand is a product of three Gaussians. 4 Optimal error for the degenerate case of no training data for primary task If training examples are provided only for task S, then task T has the following optimal performance. Proposition 9. Under optimal sampling on a 1-d space, if the covariance function satisfies SacksYlvisaker conditions of order r, then ϵopt T (ρ, σ2, 1, n) = Θ(n−(2r+1)/(2r+2) S ) + (1 −ρ2) P∞ i=1 κi. Proof. We obtain ϵopt T (ρ, σ2, 1, n) = ρ2ϵopt T (1, σ2 n, 1, n) + (1 −ρ2) P∞ i=1 κi by minimizing Corollary 4 wrt XS. Under the same conditions as the proposition, the optimal generalization error using the single-task GP decays with training set size n as Θ(n−(2r+1)/(2r+2)) [11, Proposition V.3]. Thus ρ2ϵopt T (1, σ2 n, 1, n) = ρ2Θ(n−(2r+1)/(2r+2) S ) = Θ(n−(2r+1)/(2r+2) S ). A directly corollary of the above result is that one cannot expect to do better than (1 −ρ2) P κi on the average. As this is a lower bound, the same can be said for incorrectly specified GP priors. 5 Theoretical bounds on learning curve Using the results from section 3, lower and upper bounds on the learning curve may be computed by averaging over the choice of X using Monte Carlo approximation.1 For example, using Corollary 2 and integrating wrt p(X)dX gives the following trivial bounds on the learning curve: Corollary 10. ϵavg T (1, σ2 n, πS, n) ⩽ϵavg T (ρ, σ2 n, πS, n) ⩽ϵavg T (0, σ2 n, πS, n). The gap between the trivial bounds can be analyzed as follows. Recall that πSn ∈N0 by definition, so that ϵavg T (1, σ2 n, πS, (1 −πS)n) = ϵavg T (0, σ2 n, πS, n). Therefore ϵavg T (1, σ2 n, πS, n) is equivalent to ϵavg T (0, σ2 n, πS, n) scaled along the n-axis by the factor (1 −πS) ∈[0, 1], and hence the gap between the trivial bounds becomes wider with πS. In the rest of this section, we derive non-trivial theoretical bounds on the learning curve before providing simulation results. Theoretical bounds are particularly attractive for high-dimensional input-spaces, on which Monte Carlo approximation is harder. 5.1 Lower bound For the single-task GP, a lower bound on its learning curve is σ2 n P∞ i=1 κi/(σ2 n + nκi) [15]. We shall call this the single-task OV bound. This lower bound can be combined with Corollary 6. Proposition 11. ϵavg T (ρ, σ2 n, πS, n) ⩾ρ2σ2 n ∞ X i=1 κi σ2n + nκi + (1 −ρ2)σ2 n ∞ X i=1 κi σ2n + (1 −πS)nκi , or equivalently, ϵavg T (ρ, σ2 n, πS, n) ⩾σ2 n ∞ X i=1 b1 i κi σ2n + nκi , with b1 i def= σ2 n + (1 −ρ2πS)nκi σ2n + (1 −πS)nκi , or equivalently, ϵavg T (ρ, σ2 n, πS, n) ⩾σ2 n ∞ X i=1 b0 i κi σ2n + (1 −πS)nκi , with b0 i def= σ2 n + (1 −ρ2πS)nκi σ2n + nκi . 1Approximate lower bounds are also possible, by combining Corollary 6 and approximations in, e.g., [13]. 6 Proof sketch. To obtain the first inequality, we integrate Corollary 6 wrt to p(X)dX, and apply the single-task OV bound twice. For the second inequality, its ith summand is obtained by combining the corresponding pair of ith summands in the first inequality. The third inequality is obtained from the second by swapping the denominator of b1 i with that of κi/(σ2 n + nκi) for every i. For fixed σ2 n, πS and n, denote the above bound by OVρ. Then OV0 and OV1 are both single task bounds. In particular, from Corollary 10, we have that the OV1 is a lower bound on ϵavg T (ρ, σ2 n, πS, n). From the first expression of the above proposition, it is clear from the “mixture” nature of the bound that the two-tasks bound OVρ is always better than OV1. As ρ2 decreases, the two-tasks bound moves towards the OV0; and as πS increases, the gap between OV0 and OV1 increases. In addition, the gap is also larger for rougher processes, which are harder to learn. Therefore, the relative tightness of OVρ over OV1 is more noticeable for lower ρ2, higher πS and rougher processes. The second expression in the Proposition 11 is useful for comparing with the OV1. Each summand for the two-tasks case is a factor b1 i of the corresponding summand for the single-task case. Since b1 i ∈[1, (1 −ρ2πS)/(1 −πS)[ , OVρ is more than OV1 by at most (1 −ρ2)πS/(1 −πS) times. Similarly, the third expression of the proposition is useful for comparing with OV0: each summand for the the two-tasks case is a factor b0 i ∈](1 −ρ2πS), 1] of the corresponding single-task one. Hence, OVρ is less than OV0 by up to ρ2πS times. In terms of the lower bound, this is the limit to which multi-task learning can outperform the single-task learning that ignores the secondary task. 5.2 Upper bound using equivalent noise An upper bound on the learning curve of a single-task GP is given in [16]. We shall refer to this as the single-task FWO bound and combine it with the approach in section 3.3 to obtain an upper on the learning curve of task T. Although the single-task FWO bound was derived for observations with isotropic noise, with some modifications (see supplementary material §S.4), the derivations are still valid for observations with heteroscedastic and correlated noise. Below is a version of the FWO bound that has yet to assume isotropic noise: Theorem 12. ([16], modified second part of Theorem 6) Consider a zero-mean GP with covariance function kx(·, ·), and eigenvalues κi and eigenfunctions φi(·) under the measure p(x)dx; and suppose that the noise (co)variances of the observations are given by γ2(·, ·). For n observations {xi}n i=1, let H and Φ be matrices such that Hij def= kx(xi, xj) + γ2(xi, xj) and Φij def= φj(xi). Then the learning curve at n is upper-bounded by P∞ i=1 κi −n P∞ i=1 κ2 i /ci, where ci def= (ΦTHΦ)ii /n, and the expectation in ci is taken over the set of n input locations drawn independently from p(x). Unlike [16], we do not assume that the noise variance γ2(xi, xj) is of the form σ2 nδij. Instead of proceeding from the upper bound σ2 T (1, σ2 n, ¯¯σ2 n), we proceed directly from the exact posterior variance given by (12). Thus we set the observation noise (co)variance γ2(xi, xj) to δ(xi ∈XT )δ(xj ∈XT ) δijσ2 n + δ(xi ∈XS)δ(xj ∈XS)  βkx(xi, xj) + ρ−2δijσ2 n  , (14) so that, through the definition of ci in Theorem 12, we obtain ci = (1 + βπS) n (1 + βπ2 S)n/(1 + βπS) −1  κi + R kx(x, x) [φi(x)]2 p(x)dx + σ2 n o ; (15) details are in the supplementary material §S.5. This leads to the following proposition: Proposition 13. Let β def= ρ−2 −1. Then, using the cis defined in (15), we have ϵavg T (ρ, σ2 n, πS, n) ⩽P∞ i=1 κi −n P∞ i=1 κ2 i /ci. Denote the above upper bound by FWOρ. When ρ = ±1 or πS = 0, the single-task FWO upper bound is recovered. However, FWOρ with ρ = 0 gives the prior variance P κi instead. A trivial upper bound can be obtained using Corollary 10, by replacing n with (1 −πS)n in the single-task FWO bound. The FWOρ bound is better than this trivial single-task bound for small n and high |ρ|. 5.3 Comparing bounds by simulations of learning curve We compare our bounds with simulated learning curves. We follow the third scenario in [13]: the input space is one dimensional with Gaussian distribution N(0, 1/12), the covariance function is the 7 0 50 100 150 200 250 300 0.2 0.4 0.6 0.8 1 ϵavg T n OVρ / ⟨⟨ϵT (ρ)⟩⟩/ FWOρ ⟨⟨ϵT (1)⟩⟩/ ⟨⟨ϵT (0)⟩⟩ × ⟨⟨¯ϵT (ρ)⟩⟩ △⟨⟨¯ϵT (ρ)⟩⟩ (a) ρ2 = 1/2, πS = 1/2 0 50 100 150 200 250 300 0.2 0.4 0.6 0.8 1 ϵavg T n OVρ / ⟨⟨ϵT (ρ)⟩⟩/ FWOρ ⟨⟨ϵT (1)⟩⟩/ ⟨⟨ϵT (0)⟩⟩ × ⟨⟨¯ϵT (ρ)⟩⟩ △⟨⟨¯ϵT (ρ)⟩⟩ (b) ρ2 = 3/4, πS = 3/4 Figure 3: Comparison of various bounds for two settings of (ρ, πS). Each graph plots ϵavg T against n and consists of the “true” multi-task learning curve (middle ), the theoretical lower/upper bounds of Propositions 11/13 (lower/upper ), the empirical trivial lower/upper bounds using Corollary 10 (lower/upper ), and the empirical lower/upper bounds using Corollaries 6/8 (×/ △). The thickness of the “true” multi-task learning curve reflects 95% confidence interval. unit variance squared exponential kx(x, x′) = exp[−(x −x′)2/(2l2)] with length-scale l = 0.01, the observation noise variance is σ2 n = 0.05, and the learning curves are computed for up to n = 300 training data points. When required, the average over x∗is computed analytically (see section 3.4). The empirical average over X def= XT ∪XS, denoted by ⟨⟨·⟩⟩, is computed over 100 randomly sampled training sets. The process eigenvalues κis needed to compute the theoretical bounds are given in [17]. Supplementary material §S.6 gives further details. Learning curves for pairwise combinations of ρ2 ∈{1/8, 1/4, 1/2, 3/4} and πS ∈{1/4, 1/2, 3/4} are computed. We compare the following: (a) the “true” multi-task learning curve ⟨⟨ϵT (ρ)⟩⟩obtained by averaging σ2 T (ρ) over x∗and X; (b) the theoretical bounds OVρ and FWOρ of Propositions 11 and 13; (c) the trivial upper and lower bounds that are single-task learning curves ⟨⟨ϵT (0)⟩⟩and ⟨⟨ϵT (1)⟩⟩obtained by averaging σ2 T (0) and σ2 T (1); and (d) the empirical lower bound ⟨⟨¯ϵT (ρ)⟩⟩and upper bound ⟨⟨¯ϵT (ρ)⟩⟩using Corollaries 6 and 8. Figure 3 gives some indicative plots of the curves. We summarize with the following observations: (a) The gap between the trivial bounds ⟨⟨ϵT (0)⟩⟩ and ⟨⟨ϵT (1)⟩⟩increases with πS, as described at the start of section 5. (b) We find the lower bound ⟨⟨¯ϵT (ρ)⟩⟩a rather close approximation to the multi-task learning curve ⟨⟨ϵT (ρ)⟩⟩, as evidenced by the much overlap between the × lines and the middle lines in Figure 3. (c) The curve for the empirical upper bound ⟨⟨¯ϵT (ρ)⟩⟩using the equivalent noise method has jumps, e.g., the △lines in Figure 3, because the equivalent noise variance ¯¯σ2 n increases whenever a datum for XS is sampled. (d) For small n, ⟨⟨ϵT (ρ)⟩⟩is closer to FWOρ, but becomes closer to OVρ as n increases, as shown by the unmarked solid lines in Figure 3. This is because the theoretical lower bound OVρ is based on the asymptotically exact single-task OV bound and the ¯ϵT (ρ) bound, which is observed to approximate the multi-task learning curve rather closely (point (b)). Conclusions We have measured the influence of the secondary task on the primary task using the generalization error and the learning curve, parameterizing these with the correlation ρ between the two tasks, and the proportion πS of observations for the secondary task. We have provided bounds on the generalization error and learning curves, and these bounds highlight the effects of ρ and πS. This is a step towards understanding the role of the matrix Kf of inter-task similarities in multi-task GPs with more than two tasks. Analysis on the degenerate case of no training data for the primary task has uncovered an intrinsic limitation of multi-task GP. Our work contributes to an understanding of multi-task learning that is orthogonal to the existing PAC-based results in the literature. Acknowledgments I thank E Bonilla for motivating this problem, CKI Williams for helpful discussions and for proposing the equivalent isotropic noise approach, and DSO National Laboratories, Singapore, for financial support. This work is supported in part by the EU through the PASCAL2 Network of Excellence. 8 References [1] Carl E. Rasmussen and Christopher K. I. Williams. Gaussian Processes for Machine Learning. MIT Press, Cambridge, Massachusetts, 2006. [2] Yee Whye Teh, Matthias Seeger, and Michael I. Jordan. Semiparametric latent factor models. In Robert G. Cowell and Zoubin Ghahramani, editors, Proceedings of the 10th International Workshop on Artificial Intelligence and Statistics, pages 333–340. Society for Artificial Intelligence and Statistics, January 2005. [3] Edwin V. Bonilla, Felix V. Agakov, and Christopher K. I. Williams. Kernel Multi-task Learning using Task-specific Features. In Marina Meila and Xiaotong Shen, editors, Proceedings of the 11th International Conference on Artificial Intelligence and Statistics. Omni Press, March 2007. [4] Kai Yu, Wei Chu, Shipeng Yu, Volker Tresp, and Zhao Xu. Stochastic Relational Models for Discriminative Link Prediction. In B. Sch¨olkopf, J. Platt, and T. Hofmann, editors, Advances in Neural Information Processing Systems 19, Cambridge, MA, 2007. MIT Press. [5] Edwin V. Bonilla, Kian Ming A. Chai, and Christopher K.I. 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. MIT Press, Cambridge, MA, 2008. [6] Jonathan Baxter. A Model of Inductive Bias Learning. Journal of Artificial Intelligence Research, 12:149–198, March 2000. [7] Andreas Maurer. Bounds for linear multi-task learning. Journal of Machine Learning Research, 7:117–139, January 2006. [8] Shai Ben-David and Reba Schuller Borbely. A notion of task relatedness yielding provable multiple-task learning guarantees. Machine Learning, 73(3):273–287, 2008. [9] Christopher K. I. Williams and Francesco Vivarelli. Upper and lower bounds on the learning curve for Gaussian processes. Machine Learning, 40(1):77–102, 2000. [10] Ya Xue, Xuejun Liao, Lawrence Carin, and Balaji Krishnapuram. Multi-task learning for classification with Dirichlet process prior. Journal of Machine Learning Research, 8:35–63, January 2007. [11] Klaus Ritter. Average-Case Analysis of Numerical Problems, volume 1733 of Lecture Notes in Mathematics. Springer, 2000. [12] Christopher T. H. Baker. The Numerical Treatment of Integral Equations. Clarendon Press, 1977. [13] Peter Sollich and Anason Halees. Learning curves for Gaussian process regression: Approximations and bounds. Neural Computation, 14(6):1393–1428, 2002. [14] Noel A. Cressie. Statistics for Spatial Data. Wiley, New York, 1993. [15] Manfred Opper and Francesco Vivarelli. General bounds on Bayes errors for regression with Gaussian processes. In Kearns et al. [18], pages 302–308. [16] Giancarlo Ferrari Trecate, Christopher K. I. Williams, and Manfred Opper. Finite-dimensional approximation of Gaussian processes. In Kearns et al. [18], pages 218–224. [17] Huaiyu Zhu, Christopher K. I. Williams, Richard Rohwer, and Michal Morciniec. Gaussian regression and optimal finite dimensional linear models. In Christopher M. Bishop, editor, Neural Networks and Machine Learning, volume 168 of NATO ASI Series F: Computer and Systems Sciences, pages 167–184. Springer-Verlag, Berlin, 1998. [18] Michael J. Kearns, Sara A. Solla, and David A. Cohn, editors. Advances in Neural Information Processing Systems 11, 1999. The MIT Press. 9
2009
258
3,768
Breaking Boundaries: Active Information Acquisition Across Learning and Diagnosis Ashish Kapoor and Eric Horvitz Microsoft Research 1 Microsoft Way Redmond, WA 98052 Abstract To date, the processes employed for active information acquisition during periods of learning and diagnosis have been considered as separate and have been applied in distinct phases of analysis. While active learning centers on the collection of information about training cases in order to build better predictive models, diagnosis uses fixed predictive models for guiding the collection of observations about a specific test case at hand. We introduce a model and inferential methods that bridge these phases of analysis into a holistic approach to information acquisition that considers simultaneously the extension of the predictive model and the probing of a case at hand. The bridging of active learning and real-time diagnostic feature acquisition leads to a new class of policies for learning and diagnosis. 1 Introduction Consider a real-world problem scenario where the challenge is to diagnose a patient who presents with several salient symptoms by performing inference with a probabilistic diagnostic model. The diagnostic model is trained from a database of patients, where training cases may have missing features. Assume we have at our discretion an evidential budget that enables us to acquire additional information so as to make a good diagnosis. Traditionally, such a budget has been spent solely on performing real-time observations about the case at hand, for example, by carrying out additional tests on a patient presenting to a physician with some previously identified complaints, signs, and symptoms. However, there lies another opportunity to improving diagnostic models—that of allocating some or all of the evidential budget to extending some portion of the training database, and then learning an updated diagnostic model for use in inference about the case at hand. This broader perspective on diagnostic reasoning has real-world implications. For instance, investing efforts to observe features that are currently missing in training cases, such as missing details on presenting symptoms or on outcomes of prior patient cases, might preempt the need for carrying out a painful or risky medical test on the patient at hand. We focus on the promise of developing methods that jointly consider informational value and costs of acquiring information about both the case at hand and about cases in the training library, and weighing the potential contributions of each of these potential sources of information during diagnosis. To date, the process of diagnosis has focused on the use of a fixed predictive model, which in turn is used to generate recommendations for the observations to gather. Similarly, efforts in active learning have focused on gathering information about the training cases in order to build better predictive models. The active collection of the different types of missing information under a budget, spanning methods that have been referred to separately as learning and diagnosis, is graphically depicted in Figure 1. While diagnosis-time information acquisition methods focus on acquiring information about the test case at hand, induction-time methods focus on collecting information about training cases for learning a good predictive model. We shall describe methods that weave together these two perspectives on information acquisition that have been handled separately to date, yielding a holistic approach to evidence collection in the context of the larger learning and prediction system. The 1 Diagnostic Challenge (Possibly Incomplete) Training Cases (Possibly Incomplete) Predictive Model Induction Time Information Acquisition Diagnosis Time Information Acquisition Figure 1: Illustration of induction-time and diagnosis-time active information acquisition. Induction-time active learning focuses on acquiring information for the pool of data used to train a diagnostic model; diagnosis-time information acquisition focuses on the next best observations to acquire from the test case at hand. methodology applies to situations where there is a single diagnostic challenge, as well as broader conceptions of diagnosis over streams of cases over time. We take a decision-theoretic perspective on the joint consideration of observations about the case at hand and about options for extending the training set. We start by directly modeling how the training data might affect the outcome of the predictions about test cases at hand, thus, relaxing the common assumption that a predictive model is fixed during diagnosis. Real-world diagnostic applications have made this assumption to date, often employing an information-theoretic or decision theoreticcriterion, such as value of information (VOI), during diagnosis to collect data about the case at hand. The holistic method can guide the acquisition of data for training cases that are missing arbitrary combinations of features and labels. The methodology extends active learning beyond the situation where training is done from a case library of completely specified instances, where each case contains a complete set of observations. We shall show how the more holistic active-learning approach allows for a fine-grained triaging of information to acquire by deliberating in parallel about the value of acquiring missing information from cases either in the training or the test set. 2 Related Research As we mentioned, efforts to date on the use of active learning for training classification models have largely focused on the task of acquiring labels, and assume that all of the features are observed in advance. Popular heuristics for selecting unlabeled data points include uncertainty in classification [1, 2], reduction in version space for SVMs [13], expected informativeness [9], disagreement among a committee of classifiers [3], and expected reduction in classification [10]. There has been limited work on methods for actively selecting missing features for instantiation. Lizotte et al. [8] tackle the problem of selecting features in a budgeted learning scenario. Specifically, they solve a problem that can be viewed as the inverse of traditional active learning; given class labels, they seek to determine the best features to compute for each instance such that a good predictive model can be trained under a budget. Even rarer are attempts to unify active acquisition of features with the acquisition of missing class labels. Research on this more general active learning includes work with graphical probabilistic models by Tong and Koller [14] and by Saar-Tsechansky et al. [11]. Several methods have been used for guiding data acquisition at diagnosis time. The goal is to identify the best additional observations to acquire for making inferences and for ultimately taking actions given inferences about the class of a test case at hand [4, 5, 6, 7, 12]. The best tests and observations to make are computed with methods that compute or approximate the VOI. VOI for each potential new observation is computed by considering the probability distribution over the class of the case at focus of attention of based on observations made so far, and the uncertainties expected after making each proposed observation. New evidence to collect is triaged by considering the expected utility of the best immediate actions versus the actions taken after the new observations, considering the 2 costs of making each proposed observation. Thus, VOI balances the informational benefits and the observational costs of the new observations under uncertainty. 3 Approach We shall now describe a Bayesian model that smoothly combines induction-time and diagnosis-time information acquisition. The methods move beyond the task of parameter and structure estimation explored in the prior studies of active learning and directly model statistical relationships amongst the data points. Assume that we are given a training corpus with n independent training instances Di = {(xi, ti)}. Here, xi are the d dimensional features and their labels are denoted as ti. The training cases can be incomplete; not all of the labels and features in the training set D are observed. Hence, we represent Di = Do i S Dh i , where Do i and Dh i represent the mutually exclusive subsets of observed and unobserved components respectively in the ith data instance. Let us consider a test data point as x∗where our task is to recover the label t∗for the test case1. Similar to the training cases, we again assume that x∗is not fully observed and that there are unobserved features. Given a budget for acquiring information, our goal is to determine the missing components either from the training set or among the missing features in the test case so that we make the best prediction on t∗. Approaches to active learning leverage the statistical relationships among sets of observations within cases with their class labels. The computation of expected value of information has been carried out with an information-theoretic method such as with procedures that seek to minimize entropy or maximize information gain. We compute such measures by directly modeling the conditional density of the test label t∗, given all that has been observed: p(t∗|xo ∗, Do) = p(t∗|xo ∗, Do 1, .., Do n) (1) Here, xo ∗represents the observed components of the test case and we define the set of all observed variables in the training corpus as Do = {Do 1, .., Do n} (similarly we’ll use Dh = {Dh 1, .., Dh n}). We note that the strategy of directly modeling the statistical dependencies among all of the training data and the test case is a departure from most existing classification methods. Given a training corpus, most methods try to fit a model or learn a classifier that best explains the training data and use this learned model to classify test cases. This two-phase approach introduces a separation in information acquisition for training and testing; consequently, active information acquisition is limited either to real-time diagnosis or to training-time active learning and does not fully allow modeling of the joint statistics for the training and the test data. Directly modeling the dependency of the test label t∗on the training and the test data as described in Equation 1 allows us to reason about next best information to observe by considering how posterior distributions changes with the acquisition of missing information. Assuming that we can compute predictive distributions as given in Equation 1, the next section describes how we can utilize such models to actively seek information. 3.1 Decision-Theoretic Selective Sampling We are interested in selectively sampling unobserved information, either about the training set or the test case, in order to make a better prediction. If available budget allows for multiple observations, our the goal is to determine an optimal set of variables to observe. However, performing such nonmyopic analyses is prohibitively expensive for many active learning heuristics [7]. In practice, the selective sampling task is performed in a greedy manner. That is starting from an empty set, the algorithm selects one element at a time according to the active learning criterion. We note that Krause et al. [6] provides a detailed analysis of myopic and non-myopic strategies, and describes situations where losses in a greedy approach can be bounded. In this work, we adopt a greedy strategy. The decision-theoretic selective sampling criterion we use estimates the values of acquiring information, which in turn can be used as a guiding principle in active learning. We can quantify such 1For simplicity, we limit our discussion to a single test point; the analysis described generalizes directly to considering larger set of test points 3 value in terms of information gain. Intuitively, knowing one more bit of information may tighten a probability distribution over the class of the test case. On the other hand, observations are acquired at a price. By considering this reduction in uncertainty along with the cost of obtaining such information, we can formulate a selective sampling criterion. Let us assume that we have a probabilistic model and appropriate inference procedures that would allow us to compute the conditional distribution of the test label t∗given all the observed entities Do (Equation 1). Then, such computations can be used determining the expected information gain. Expected information gain is formally defined as expected reduction in uncertainty over the t∗as we observe more evidence. In order to balance the benefit of observing a feature/label with the cost of its observation, we use expected return on information (ROI) as a selection criteria that aims to maximize information gain per unit cost: ROI : ˆd = arg max d∈Dh H(t∗|Do) −Ed[H(t∗|d ∪Do)] C(d) (2) Here, H(·) denotes the entropy and Ed[·] is the expectation with respect to the current model. Note, here d can either be a feature value or a label and C(·) denotes the cost associated with observing information d. This strategy differs from the VOI criteria that aims to minimize total operational cost of the system. Unlike VOI, the proposed criteria does not require that the gain from selective sampling and the cost of observing observation have the same currency; consequently, ROI can be used more generally. Note, the proposed framework for active information acquisition easily extends to scenarios where the cost and the benefits of the system can be measure in a single currency and VOI can be applied. Also note that while the ROI formulation we introduces considers a single test, similar computations can be done for a larger set of test points by considering the joint entropy over the test labels. Without the introduction of assumptions of conditional independence that are not overly restrictive (described below) the joint formulation can be computed as the sum of the ROI evaluated for each of the test cases. We now describe how we can model the joint statistics among the training and the test cases simultaneously. 3.2 Modeling Joint Dependencies Let us consider a probabilistic model to describe the joint dependencies among features and the label of an instance. If we denote the parameters of the model with λ, then, given the training data, the classical approach in learning the model would attempt to find a best value ˆλ according to some optimization criterion. However, in our case we are interested in modeling joint dependencies among all of the data (both training or testing). Consequently, in our analysis, we consider the model parameters λ as a random variable over which we marginalize in order to generate a posterior predictive distribution. Formally, we rewrite Equation 1 as: p(t∗|xo ∗, Do) = Z λ p(t∗, λ|xo ∗, Do), (3) where the Bayesian treatment of λ allows us to marginalize over λ and model direct statistical dependencies between the different data points; consequently, we can determine how different features and labels directly affect the test prediction. Note that considering model parameters λ as random variables is consistent with principles of Bayesian modeling and is similar in spirit to prior research, such as [9] and [15]. In order to compute the integral in Equation (3), we need to characterize p(t∗, λ|xo ∗, Do), which in turn defines a joint distribution over all of the data instances and the parameters λ of the model. First, we consider individual data instances and model the joint distribution of features and labels of the instance as a Markov Random Field (MRF)2. Then, assuming conditional independence between data points3 given the model parameters, the joint distribution that includes all the instances and the parameters λ can be written as: p(D, λ) ∝p(λ) n Y i=1 1 Z(λ)exp[λT φ(xi, ti)] 2We limit ourselves to the case where both the labels and the features are binary (0 or 1). 3The conditional independence assumption also allows us to compute ROI for a set of test cases by summing individual ROI values. 4 Here, Z(λ) is the partition function that normalizes the distribution, λ are parameters of the model with a Gaussian prior p(λ) ∼N(0, Λ). Also, φ(x, t) = [t, tx1, .., tx2, φ(x)] is the appended feature set and is in correspondence with the underlying undirected graphical model. In theory, the features can be functions of all the individual features of x. However, we restrict ourselves to a Boltzmann machine that has individual and pairwise features only and corresponds to an undirected graphical model GF = {VF , EF } where each node VF corresponds to an individual feature and the edges in EF between the nodes correspond to the pairwise features. A fully connected GF graph can represent an arbitrary distribution. However, the computational complexity of situations involving large numbers of features may require pruning of the graph to achieve tractability. Using Bayes rule and the conditional independence assumption, Equation 3 reduces to: p(t∗|xo ∗, Do) = Z λ p(t∗|xo ∗, λ) · p(λ|Do) (4) The first term p(t∗|xo ∗, λ) inside the integral can be interpreted as likelihood of t∗given the observed components x∗of the test case and the parameter λ. Similarly p(λ|Do) is the posterior distribution over parameter λ given all the observations in the training corpus. We review details of these computations below. 3.3 Computational Challenges Given the set of all observations Do, we first seek to infer the posterior distribution p(λ|Do) which can be written as: p(λ|Do) ∝p(λ) n Y i=1 Z Dh i p(Do i , Dh i |λ) Computing the posterior is intractable as it is a product of the Gaussian prior with non-Gaussian data likelihood terms. In general, the problem of inferring model parameters in an undirected graphical model is a hard one. Welling and Parise [15] propose Bethe-Laplace approximation to infer model parameters for a Markov Random Field. In a similar spirit, we employ Laplace approximation that uses Bethe or a tree-structured approximation albeit with data that is partially observed. The idea behind Laplace approximation is to fit a Gaussian at the mode ˆλ of the exact posterior distribution p(λ|Do) ≈N(ˆλ, Σ), where: Σ = Eˆλ[φ(x, t)φ(x, t)T ] −Eˆλ[φ(x, t)]Eˆλ[φ(x, t)]T Here, Eˆλ[·] denote expectation with respect to p(x, t|ˆλ). Note, that it is non-trivial to find the mode ˆλ as well as the covariance matrix Σ, as the underlying graphical structure is complex. While the covariance Σ is approximated using the linear response algorithm [15], the mode ˆλ is usually found by running a gradient descent procedure that minimizes the negative log of the posterior (L = −log(p(λ|D)). The gradients of this objective can be succinctly written as: ∇L = Λ−1λ − n X i=1 [Eλ,Do i [φ(x, t)] −Eλ[φ(x, t)]] (5) Here, Eλ,Do i [·] is the expectation with respect to the distribution conditioned on the observed variables: p(x|λ, Do i ). Note, that computing the first expectation term is trivial for the fully observed case. However, partially observed cases requires exact inference. Similarly, the computation of the second expectation term in the gradient requires exact inference. For the fully connected graphs, exact inference is hard and we must rely on approximations. One approach is to approximate GF by a tree, which we denote as GMI that preserves an estimation of mutual information among variables. Specifically GMI is the maximal spanning tree of an undirected graphical model, which has the same structure as the original graph and with edges weighted by empirical mutual information. We have the choice of either running loopy belief propagation (BP) for approximate inference on the full graph GF or doing an exact inference on the tree approximation GMI. As the features φ(x, t) only consist of single and pairwise variables, belief propagation directly provides the required expectations over the features of MRF. In our work, we observed better results when using loopy BP; 5 however, it was much faster to run inference on the tree structured graphs. Consequently, we used loopy BP to compute the posterior p(λ|Do) given the training data. Also note that given the Gaussian approximation to p(λ|Do), the required predictive distribution p(t∗|x∗, Do) can be computed using sampling [15]. Finally, ROI computations require that for each d ∈Dh, we infer p(t∗|d ∪Do) for d = 0 and d = 1 and compute the expected conditional entropy. This repeated inference for all the missing bits in the data can be time consuming; thus, the tree-structured approximation was used to do all ROI computations and to determine the next bit of information to seek. 4 Experiments and Results We shall compare proposed active information acquisition, which does not distinguish between induction-time and diagnosis-time analyses, against other alternatives on a synthetic dataset and two real-world applications. Previewing our results, we find that the proposed scheme outperforms its competitors in terms of accuracy over the test points and provides a significant boost for considerably less incurred cost. The significant gains we obtained over approaches that limit themselves to separately consider induction-time or diagnosis-time information acquisition suggests that the holistic perspective can provide broader and more efficient options to acquire information. 4.1 Experiments with Synthetic Data We first sought to evaluate the basic operation of the proposed framework with a synthetic training set of Boolean data generated by randomly sampling labels with a fair coin toss. The features of the data are 14 dimensional and consist of partially informative and partially random features. Out of the 14 features, seven are randomly generated using a fair coin toss, while the rest of the features are generated by multiplying the label with all of the seven randomly generated features individually. We note that, even with full observations and a perfect data model for 0.78% of the cases, the prediction cannot be better than random. This arises whenever all of the randomly generated bits are 0 which in turn blocks any information about the label being observed. For the rest of the cases, perfect prediction is feasible with only seven features. We considered a dataset with 100 examples for experiments on this synthetic data. Further, we consider a 50-50 train and test split and assume that 25% of the total bits are unobserved and that the target of the selective sampling procedure is to determine the best next observations to make so as to best predict the labels for the test cases. We assume that the cost of observing a label in the training data is directly proportional to the possible number of features that can be computed for every data point (that is, c(d) = Dim). The features, drawn from either the training or testing set, are much cheaper and have a unit cost of observation. We set the costs of observing labels of test cases to infinity; consequently the active learning methods never observe them. We compared the joint selection (Diagnosis+Induction) advocated in this work with 1) diagnosistime active information acquisition (Diagnosis), where information bits are sampled only from the test case at hand and 2) induction-time active acquisition (Induction). In addition, we considered two different flavors of induction-time active inquisition where either only features or only labels were allowed to be sampled. We refer to these two flavors as Induction (features only) and Induction (labels only) respectively. In all of the cases, we used ROI for active learning as described in section 3.1. Finally, we compare these methods with the baseline of random sampling strategy. Figure 2 (left) shows the recognition results with increasing costs during active acquisition of information. We plot the overall classification accuracy over the test set on the y-axis and the cost incurred on the x-axis. Each point on the graph signifies an average recognition on the test set over 10 random training and test splits. From the figure, we see that all sampling strategies show increases in accuracy as the cost increases, but Diagnosis+Induction has advantages over other methods. First, Diagnosis+Induction obtains better recognition results for a fixed incurred cost, outperforming the diagnosis-time sampling strategy as well as all the flavors of induction-time information acquisition. Second, the Diagnosis+Induction sampling strategy levels off to the maximum performance fairly quickly when compared to other methods. Performance of Diagnosis only and Random sampling are noticeably worse than the other alternatives. Also, we note that the induction (features-only) stops abruptly for the synthetic case as most of the features in the learning problem are uninformative; after initial rounds the algorithm stops sampling. In summary, all of the active methods for active 6 0 50 100 150 200 250 0.78 0.8 0.82 0.84 0.86 0.88 0.9 0.92 0.94 0.96 Cost Accuracy on Test Set Boolean Diagnosis+Induction Diagnosis Induction Induction (features only) Induction (labels only) Random 0 50 100 150 200 250 300 350 400 450 500 0.65 0.7 0.75 0.8 0.85 0.9 Cost Accuracy on Test Set Pathfinder Diagnosis+Induction Diagnosis Induction Induction (features only) Induction (labels only) Random 0 50 100 150 200 250 300 350 0.74 0.76 0.78 0.8 0.82 0.84 0.86 0.88 0.9 0.92 Cost Accuracy on Test Set Voting Diagnosis+Induction Diagnosis Induction Induction (features only) Induction (labels only) Random Figure 2: Comparison of various selective selection schemes (best viewed in color). information acquisition do better than random; however, Induction+Diagnosis strategy achieves best combination of recognition performance and cost efficiency. In order to analyze different sampling methods, we look at the sampling behavior of different active learning mechanisms. Figure 3 (left) illustrates the statistics of sampled information at the termination of the active learning procedure. The bars with different shades denote the sampling distribution amongst training labels, training features and the test features, which are generated by averaging over the 10 runs. While the Induction (features only), Induction (labels only) and diagnosis strategy just acquire labels, features for training data and features for the test cases respectively, the Diagnosis+Induction approaches show acquisition of information from different kinds of sources. We note that the random sampling strategy also samples from both labels and features; however, as indicated by Figure 2 (left) this strategy is not optimal as it does not take the cost structure into account. Diagnosis+Induction is the most flexible scheme and it aims to acquire information from all facets of the classification problem by properly considering gains in predictive power and balancing it with the cost of information acquisition. 4.2 Experiment on Pathfinder Data Availability and access of large medical databases enables us to build better predictive models for various diagnostic purposes. While most efforts have focused on active data acquisition for diagnosis only [5], our framework promises a broader set of options to a diagnostician, where he can reason whether to perform additional tests on a patient or seek more information about the training set. We analyze one such scenario where the goal is to build a predictive model that would guide surgical pathologists who study the lymphatic system with the diagnosis of lymph-node diseases. This dataset consists of labels of “benign” or “malignant” to lymph-node follicles from 48 subjects. The features signify sets of histological features viewed at low and high power under the microscope that an expert surgical pathologist believed could be informative to that label. The proposed holistic perspective on active learning supports the scenario where pathologists in pursuit of a diagnosis need to determine the next observations either from the test case at hand or consider querying for historical records in order to successfully label the lymph node (or, more generally, diagnose the disease). For this experiment, we consider random splits 30 training examples and 18 test cases and again assume that 25% of the total bits are unobserved. The experiment protocol is same as the one for synthetic data where we report results averaged over 10 runs and the test set is used to compare the recognition performance. The results on the Pathfinder data are shown in Figure 2 (Middle). As before, x-axis and y-axis denote costs incurred and overall classification accuracy on the test data over 10 random training and test splits. Again we see that the Diagnosis+Induction performs better than the other methods and attains high accuracy at a fairly low cost. However, one difference in this experiment is the fact that Random sampling strategy outperforms active Diagnosis and active Induction (features only). This suggests that the labels in the training cases are highly informative when compared to the features. This in turn is reflected by the similar performance of Diagnosis+Induction with Induction and Induction (only) towards the end of active learning run. Upon further analysis, we found that Diagnosis+Induction, Induction and Induction (labels only) end up selecting similar training labels, consequently reaching similar performance towards the end. This further reinforces the validity of the hypothesis that the training labels are very informative. On analyzing the sampling behavior of different methods (Figure 3 (middle)) we again find that the Diagnosis+Induction approaches show acquisition of information from different kinds of sources. However, we also note that the proportion of sampled training labels is remarkably few and very similar for both Diagnosis+Induction 7 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 Distribution of Sampled Information Boolean Training Labels Training Feature Test Feature 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 Distribution of Sampled Information Pathfinder Training Labels Training Feature Test Feature 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 Distribution of Sampled Information Voting Training Labels Training Feature Test Feature Figure 3: Statistics of different information selected in active learning. and Induction, hinting that there might be particular cases that are highly informative about the prediction task. In summary, Diagnosis+Induction again provides best recognition rates at low costs, demonstrating the effectiveness of the unified perspective on active learning. 4.3 Experiments on Congressional Voting Records Surveys have been popular information gathering tools, however, the cost of acquiring information by surveying can be costly and is often fraught with missing information. Intelligent information acquisition with active learning promises efficient use of limited resources. The holistic perspective on data acquisition can help avoid probing subjects for potentially risky or expensive questions by considering accessible information (for example, information such as demographics, age, etc.) or initially unavailable labels about the past survey takers. We analyze a similar survey task of determining affiliation of subjects based on incomplete historical data. This data set includes votes for each of the U.S. House of Representatives Congressmen on the 16 key votes on United States policies. There are 435 data instances classified as Democrats versus Republican where 16 attributes for each of data represents a Yes or No on a vote. Further, out of 435 × 16 features, there are 392 instances missing. The presence of missing features makes this a challenging active-learning problem. We consider 10 random splits with 100 training instances and 335 test cases and report results averaged over these splits. Experimental results on the voting data are shown in Figure 2 (right). Each point on the graph signifies an average recognition on the test set over 10 random training and test splits. Similar to the earlier experiments, we see improvement in recognition accuracy on the test set for different sampling schemes. Performance of Diagnosis only, Induction (features only), and Random sampling are noticeably worse than the other alternatives. Diagnosis+Induction again shows superior performance attaining a high accuracy at a relatively low cost. Upon analyzing the statistics of sampled information (Figure 3 (right)) at the termination of the active learning procedure, we see that while Diagnosis+Induction approaches show acquisition of information from different kinds of sources, it is significantly different from the Random strategy whose sampling distribution is close to the true distribution of the available information bits. By considering information gain and the cost structure through ROI, Diagnosis+Induction is able to achieve the best combination of recognition performance and cost efficiency. 5 Conclusion We introduced a scheme for active data acquisition that removes the separation between diagnosistime and induction-time active information acquisition. The task of diagnosis changes qualitatively with the use of methods that take a more holistic perspective on active learning, simultaneously considering information acquisition for extending a case library as well as for identifying the next best features to observe about the diagnostic challenge at hand. We ran several experiments that showed the effectiveness of combining diagnosis-time and induction-time active learning. We are pursuing several related challenges and opportunities, including analysis of approximate inference techniques and non-myopic extensions. 8 References [1] N. Cesa-Bianchi, A. Conconi and C. Gentile (2003). Learning probabilistic linear-threshold classifiers via selective sampling. COLT. [2] S. Dasgupta, A. T. Kalai and C. Monteleoni (2005). Analysis of perceptron-based active learning. COLT. [3] Y. Freund, H. S. Seung, E. Shamir and N. Tishby (1997). Selective Sampling Using the Query by Committee Algorithm. Machine Learning Volume 28. [4] R. Greiner, A. Grove and D. Roth (2002). Learning Cost-Sensitive Active Classifiers. Artificial Intelligence Volume 139(2). [5] D. Heckerman, E. Horvitz, and B. N. Nathwani (1992). Toward Normative Expert Systems: Part I The Pathfinder Project. Methods of Information in Medicine 31:90-105. [6] P. Kanani and P. Melville (2008). Prediction-time Active Feature-value Acquisition for Customer Targeting. NIPS Workshop on Cost Sensitive Learning. [7] A. Krause, A. Singh and C. Guestrin (2008). Near-optimal Sensor Placements in Gaussian Processes: Theory, Efficient Algorithms and Empirical Studies. JMLR Volume 9(2). [8] D. Lizotte, O. Madani and R. Greiner (2003). Budgeted Learning of Naive-Bayes Classifiers. UAI. [9] D. MacKay (1992a). Information-Based Objective Functions for Active Data Selection. Neural Computation Volume 4(4). [10] N. Roy and A. McCallum (2001). Toward Optimal Active Learning through Sampling Estimation of Error Reduction. ICML. [11] M. Saar-Tsechansky, P. Melville and F. Provost (2008). Active Feature-value Acquisition. Management Science. [12] V. S. Sheng and C. X. Ling (2006). Feature value acquisition in testing: a sequential batch test algorithm. ICML. [13] S. Tong and D. Koller (2001). Support Vector Machine Active Learning with Applications to Text Classification. JMLR Volume 2. [14] S. Tong and D. Koller (2001). Active learning for parameter estimation in Bayesian networks. NIPS. [15] M. Welling and S. Parise (2006) Bayesian Random Fields: The Bethe-Laplace Approximation. UAI. 9
2009
259
3,769
Zero-Shot Learning with Semantic Output Codes Mark Palatucci Robotics Institute Carnegie Mellon University Pittsburgh, PA 15213 mpalatuc@cs.cmu.edu Dean Pomerleau Intel Labs Pittsburgh, PA 15213 dean.a.pomerleau@intel.com Geoffrey Hinton Computer Science Department University of Toronto Toronto, Ontario M5S 3G4, Canada hinton@cs.toronto.edu Tom M. Mitchell Machine Learning Department Carnegie Mellon University Pittsburgh, PA 15213 tom.mitchell@cs.cmu.edu Abstract We consider the problem of zero-shot learning, where the goal is to learn a classifier f : X →Y that must predict novel values of Y that were omitted from the training set. To achieve this, we define the notion of a semantic output code classifier (SOC) which utilizes a knowledge base of semantic properties of Y to extrapolate to novel classes. We provide a formalism for this type of classifier and study its theoretical properties in a PAC framework, showing conditions under which the classifier can accurately predict novel classes. As a case study, we build a SOC classifier for a neural decoding task and show that it can often predict words that people are thinking about from functional magnetic resonance images (fMRI) of their neural activity, even without training examples for those words. 1 Introduction Machine learning algorithms have been successfully applied to learning classifiers in many domains such as computer vision, fraud detection, and brain image analysis. Typically, classifiers are trained to approximate a target function f : X →Y , given a set of labeled training data that includes all possible values for Y , and sometimes additional unlabeled training data. Little research has been performed on zero-shot learning, where the possible values for the class variable Y include values that have been omitted from the training examples. This is an important problem setting, especially in domains where Y can take on many values, and the cost of obtaining labeled examples for all values is high. One obvious example is computer vision, where there are tens of thousands of objects which we might want a computer to recognize. Another example is in neural activity decoding, where the goal is to determine the word or object a person is thinking about by observing an image of that person’s neural activity. It is intractable to collect neural training images for every possible word in English, so to build a practical neural decoder we must have a way to extrapolate to recognizing words beyond those in the training set. This problem is similar to the challenges of automatic speech recognition, where it is desirable to recognize words without explicitly including them during classifier training. To achieve vocabulary independence, speech recognition systems typically employ a phoneme-based recognition strategy (Waibel, 1989). Phonemes are the component parts which can be combined to construct the words of a language. Speech recognition systems succeed by leveraging a relatively small set of phoneme 1 recognizers in conjunction with a large knowledge base representing words as combinations of phonemes. To apply a similar approach to neural activity decoding, we must discover how to infer the component parts of a word’s meaning from neural activity. While there is no clear consensus as to how the brain encodes semantic information (Plaut, 2002), there are several proposed representations that might serve as a knowledge base of neural activity, thus enabling a neural decoder to recognize a large set of possible words, even when those words are omitted from a training set. The general question this paper asks is: Given a semantic encoding of a large set of concept classes, can we build a classifier to recognize classes that were omitted from the training set? We provide a formal framework for addressing this question and a concrete example for the task of neural activity decoding. We show it is possible to build a classifier that can recognize words a person is thinking about, even without training examples for those particular words. 1.1 Related Work The problem of zero-shot learning has received little attention in the machine learning community. Some work by Larochelle et al. (2008) on zero-data learning has shown the ability to predict novel classes of digits that were omitted from a training set. In computer vision, techniques for sharing features across object classes have been investigated (Torralba & Murphy, 2007; Bart & Ullman, 2005) but relatively little work has focused on recognizing entirely novel classes, with the exception of Lampert et al. (2009) predicting visual properties of new objects and Farhadi et al. (2009) using visual property predictions for object recognition. In the neural imaging community, Kay et al. (2008) has shown the ability to decode (from visual cortex activity) which novel visual scenes a person is viewing from a large set of possible images, but without recognizing the image content per se. The work most similar to our own is Mitchell (2008). They use semantic features derived from corpus statistics to generate a neural activity pattern for any noun in English. In our work, by contrast, we focus on word decoding, where given a novel neural image, we wish to predict the word from a large set of possible words. We also consider semantic features that are derived from human labeling in addition to corpus statistics. Further, we introduce a formalism for a zero-shot learner and provide theoretical guarantees on its ability to recognize novel classes omitted from a training set. 2 Classification with Semantic Knowledge In this section we formalize the notion of a zero-shot learner that uses semantic knowledge to extrapolate to novel classes. While a zero-shot learner could take many forms, we present one such model that utilizes an intermediate set of features derived from a semantic knowledge base. Intuitively, our goal is to treat each class not as simply an atomic label, but instead represent it using a vector of semantic features characterizing a large number of possible classes. Our models will learn the relationship between input data and the semantic features. They will use this learned relationship in a two step prediction procedure to recover the class label for novel input data. Given new input data, the models will predict a set of semantic features corresponding to that input, and then find the class in the knowledge base that best matches that set of predicted features. Significantly, this procedure will even work for input data from a novel class if that class is included in the semantic knowledge base (i.e. even if no input space representation is available for the class, but a feature encoding of it exists in the semantic knowledge base). 2.1 Formalism Definition 1. Semantic Feature Space A semantic feature space of p dimensions is a metric space in which each of the p dimensions encodes the value of a semantic property. These properties may be categorical in nature or may contain real-valued data. 2 As an example, consider a semantic space for describing high-level properties of animals. In this example, we’ll consider a small space with only p = 5 dimensions. Each dimension encodes a binary feature: is it furry? does it have a tail? can it breathe underwater? is it carnivorous? is it slow moving? In this semantic feature space, the prototypical concept of dog might be represented as the point {1, 1, 0, 1, 0}. Definition 2. Semantic Knowledge Base A semantic knowledge base K of M examples is a collection of pairs {f, y}1:M such that f ∈F p is a point in a p dimensional semantic space F p and y ∈Y is a class label from a set Y . We assume a one-to-one encoding between class labels and points in the semantic feature space. A knowledge base of animals would contain the semantic encoding and label for many animals. Definition 3. Semantic Output Code Classifier A semantic output code classifier H : Xd →Y maps points from some d dimensional raw-input space Xd to a label from a set Y such that H is the composition of two other functions, S and L, such that: H = L(S(·)) S : Xd →F p L : F p →Y This model of a zero-shot classifier first maps from a d dimensional raw-input space Xd into a semantic space of p dimensions F p, and then maps this semantic encoding to a class label. For example, we may imagine some raw-input features from a digital image of a dog first mapped into the semantic encoding of a dog described earlier, which is then mapped to the class label dog. As a result, our class labels can be thought of as a semantic output code, similar in spirit to the errorcorrecting output codes of Dietterich and Bakiri (1995). As part of its training input, this classifier is given a set of N examples D that consists of pairs {x, y}1:N such that x ∈Xd and y ∈Y . The classifier is also given a knowledge base K of M examples that is a collection of pairs {f, y}1:M such that f ∈F p and y ∈Y . Typically, M >> N, meaning that data in semantic space is available for many more class labels than in the raw-input space. Thus, A semantic output code classifier can be useful when the knowledge base K covers more of the possible values for Y than are covered by the input data D. To learn the mapping S, the classifier first builds a new set of N examples {x, f}1:N by replacing each y with the respective semantic encoding f according to its knowledge base K. The intuition behind using this two-stage process is that the classifier may be able to learn the relationship between the raw-input space and the individual dimensions of the semantic feature space from a relatively small number of training examples in the input space. When a new example is presented, the classifier will make a prediction about its semantic encoding using the learned S map. Even when a new example belongs to a class that did not appear in the training set D, if the prediction produced by the S map is close to the true encoding of that class, then the L map will have a reasonable chance of recovering the correct label. As a concrete example, if the model can predict the object has fur and a tail, it would have a good chance of recovering the class label dog, even without having seen images of dogs during training. In short: By using a rich semantic encoding of the classes, the classifier may be able to extrapolate and recognize novel classes. 3 Theoretical Analysis In this section we consider theoretical properties of a semantic output code classifier that determine its ability to recognize instances of novel classes. In other words, we will address the question: Under what conditions will the semantic output code classifier recognize examples from classes omitted from its training set? 3 In answering this question, our goal is to obtain a PAC-style bound: we want to know how much error can be tolerated in the prediction of the semantic properties while still recovering the novel class with high probability. We will then use this error bound to obtain a bound on the number of examples necessary to achieve that level of error in the first stage of the classifier. The idea is that if the first stage S(·) of the classifier can predict the semantic properties well, then the second stage L(·) will have a good chance of recovering the correct label for instances from novel classes. As a first step towards a general theory of zero-shot learning, we will consider one instantiation of a semantic output code classifier. We will assume that semantic features are binary labels, the first stage S(·) is a collection of PAC-learnable linear classifiers (one classifier per feature), and the second stage L(·) is a 1-nearest neighbor classifier using the Hamming distance metric. By making these assumptions, we can leverage existing PAC theory for linear classifiers as well as theory for approximate nearest neighbor search. Much of our nearest-neighbor analysis parallels the work of Ciaccia and Patella (2000). We first want to bound the amount of error we can tolerate given a prediction of semantic features. To find this bound, we define F to be the distribution in semantic feature space of points from the knowledge base K. Clearly points (classes) in semantic space may not be equidistant from each other. A point might be far from others, which would allow more room for error in the prediction of semantic features for this point, while maintaining the ability to recover its unique identity (label). Conversely, a point close to others in semantic space will have lower tolerance of error. In short, the tolerance for error is relative to a particular point in relation to other points in semantic space. We next define a prediction q to be the output of the S(·) map applied to some raw-input example x ∈Xd. Let d(q, q′) be the distance between the prediction q and some other point q′ representing a class in the semantic space. We define the relative distribution Rq for a point q as the probability that the distance from q to q′ is less than some distance z: Rq(z) = P (d(q, q′) ≤z) This empirical distribution depends on F and is just the fraction of sampled points from F that are less than some distance z away from q. Using this distribution, we can also define a distribution on the distance to the nearest neighbor of q, defined as ηq: Gq(z) = P (ηq ≤z) which is given in Ciaccia (2000) as: Gq(z) = 1 −(1 −Rq(z))n where n is the number of actual points drawn from the distribution F. Now suppose that we define τq to be the distance a prediction q for raw-input example x is from the true semantic encoding of the class to which x belongs. Intuitively, the class we infer for input x is going to be the point closest to prediction q, so we want a small probability γ that the distance τq to the true class is larger than the distance between q and its nearest neighbor, since that would mean there is a spurious neighbor closer to q in semantic space than the point representing q’s true class: P (τq ≥ηq) ≤γ Rearranging we can put this in terms of the distribution Gq and then can solve for τq: P (ηq ≤τq) ≤ γ Gq(τq) ≤ γ If Gq(·) were invertible, we could immediately recover the value τq for a desired γ. For some distributions, Gq(·) may not be a 1-to-1 function, so there may not be an inverse. But Gq(·) will never decrease since it is a cumulative distribution function. We will therefore define a function G−1 q such that: G−1 q (γ) = argmaxτq h Gq(τq) ≤γ i . So using nearest neighbor for L(·), if τq ≤G−1 q (γ), then we will recover the correct class with at least 1 −γ probability. To ensure that we achieve this error bound, we need to make sure the total error of S(·) is less than G−1 q (γ) which we define as τ max q . We assume in this analysis that we have p binary semantic features and a Hamming distance metric, so τ max q defines the total 4 number of mistakes we can make predicting the binary features. Note with our assumptions, each semantic feature is PAC-learnable using a linear classifier from a d dimensional raw input space. To simplify the analysis, we will treat each of the p semantic features as independently learned. By the PAC assumption, the true error (i.e. probability of the classifier making a mistake) of each of the p learned hypotheses is ϵ, then the expected number of mistakes over the p semantic features will be τ max q if we set ϵ = τ max q /p. Further, the probability of making at most τ max q mistakes is given by the binomial distribution: BinoCDF(τ max q ; p, τ max q /p) We can obtain the desired error rate for each hypothesis by utilizing the standard PAC bound for VC-dimension1 (Mitchell, 1997). To obtain a hypothesis with (1 −δ) probability that has true error at most ϵ = τ max q /p = G−1(γ)/p, then the classifier requires a number of examples Mq,δ: Mq,δ ≥ p τ max q h 4log(2/δ) + 8(d + 1)log(13p/τ max q ) i (1) If each of the p classifiers (feature predictors) is learned with this many examples, then with probability (1 −δ)p, all feature predictors will achieve the desired error rate. But note that this is only the probability of achieving p hypotheses with the desired true error rate. The binomial CDF yields the probability of making at most τ max q mistakes total, and the (1 −γ) term above specifies the probability of recovering the true class if a maximum of this many mistakes were made. Therefore, there are three probabilistic events required for the semantic output code classifier to predict a novel class and the total (joint) probability of these events is: P (there are p feature predictors with true error ≤τ max q /p) · P (at most τ max q mistakes made | there are p feature predictors with true error ≤τ max q /p ) · P (recovering true class | at most τ max q mistakes made) and since τ max q = G−1 q (γ), the total probability is given by: (1 −δ)p · BinoCDF(G−1 q (γ); p, G−1 q (γ)/p) · (1 −γ) (2) In summary, given desired error parameters (1−γ) and (1−δ) for the two classifier stages, Equation 2 provides the total probability of correctly predicting a novel class. Given the value for γ we can compute the ϵ necessary for each feature predictor. We are guaranteed to obtain the total probability if the feature predictors were trained with Mq,δ raw-input examples as specified in Equation 1. To our knowledge, Equations 1 and 2 specify the first formal guarantee that provides conditions under which a classifier can predict novel classes. 4 Case Study: Neural Decoding of Novel Thoughts In this section we empirically evaluate a semantic output code classifier on a neural decoding task. The objective is to decode novel words a person is thinking about from fMRI images of the person’s neural activity, without including example fMRI images of those words during training. 4.1 Datasets We utilized the same fMRI dataset from Mitchell (2008). This dataset contains the neural activity observed from nine human participants while viewing 60 different concrete words (5 examples from 12 different categories). Some examples include animals: bear, dog, cat, cow, horse and vehicles: truck, car, train, airplane, bicycle. Each participant was shown a word and a small line drawing of the concrete object the word represents. The participants were asked to think about the properties of these objects for several seconds while images of their brain activity were recorded. Each image measures the neural activity at roughly 20,000 locations (i.e. voxels) in the brain. Six fMRI scans were taken for each word. We used the same time-averaging described in Mitchell (2008) to create a single average brain activity pattern for each of the 60 words, for each participant. 1The VC dimension of linear classifiers in d dimensions is d + 1 5 In the language of the semantic output code classifier, this dataset represents the collection D of raw-input space examples. We also collected two semantic knowledge bases for these 60 words. In the first semantic knowledge base, corpus5000, each word is represented as a co-occurrence vector with the 5000 most frequent words from the Google Trillion-Word-Corpus2. The second semantic knowledge base, human218, was created using the Mechanical Turk human computation service from Amazon.com. There were 218 semantic features collected for the 60 words, and the questions were selected to reflect psychological conjectures about neural activity encoding. For example, the questions related to size, shape, surface properties, and typical usage. Example questions include is it manmade? and can you hold it?. Users of the Mechanical Turk service answered these questions for each word on a scale of 1 to 5 (definitely not to definitely yes). 4.2 Model In our experiments, we use multiple output linear regression to learn the S(·) map of the semantic output code classifier. Let X ∈ℜN∗d be a training set of fMRI examples where each row is the image for a particular word and d is the number of dimensions of the fMRI image. During training, we use the voxel-stability-criterion that does not use the class labels described in Mitchell (2008) to reduce d from about 20,000 voxels to 500. Let Y ∈ℜN∗p be a matrix of semantic features for those words (obtained from the knowledge base K) where p is the number of semantic features for that word (e.g. 218 for the human218 knowledge base). We learn a matrix of weights bW ∈ℜd∗p. In this model, each output is treated independently, so we can solve all of them quickly in one matrix operation (even with thousands of semantic features): bW = (XT X + λI)−1XT Y (3) where I is the identity matrix and λ is a regularization parameter chosen automatically using the cross-validation scoring function (Hastie et al., 2001)3. Given a novel fMRI image x, we can obtain a prediction bf of the semantic features for this image by multiplying the image by the weights: bf = x · bW For the second stage of the semantic output code classifier, L(·), we simply use a 1-nearest neighbor classifier. In other words, L(bf) will take the prediction of features and return the closest point in a given knowledge base according the Euclidean distance (L2) metric. 4.3 Experiments Using the model and datasets described above, we now pose and answer three important questions. 1. Can we build a classifier to discriminate between two classes, where neither class appeared in the training set? To answer this question, we performed a leave-two-out-cross-validation. Specifically, we trained the model in Equation 3 to learn the mapping between 58 fMRI images and the semantic features for their respective words. For the first held out image, we applied the learned weight matrix to obtain a prediction of the semantic features, and then we used a 1-nearest neighbor classifier to compare the vector of predictions to the true semantic encodings of the two held-out words. The label was chosen by selecting the word with the encoding closest to the prediction for the fMRI image. We then performed the same test using the second held-out image. Thus, for each iteration of the crossvalidation, two separate comparisons were made. This process was repeated for all 60 2  = 1, 770 possible leave-two-out combinations leading to 3,540 total comparisons. Table 1 shows the results for two different semantic feature encodings. We see that the human218 semantic features significantly outperformed the corpus5000 features, with mean accuracies over the nine participants of 80.9% and 69.7% respectively. But for both feature sets, we see that it is possible to discriminate between two novel classes for each of the nine participants. 2Vectors are normalized to unit length and do not include 100 stop words like a, the, is 3We compute the cross-validation score for each task and choose the parameter that minimizes the average loss across all output tasks. 6 Table 1: Percent accuracies for leave-two-out-cross-validation for 9 fMRI participants (labeled P1P9). The values represent classifier percentage accuracy over 3,540 trials when discriminating between two fMRI images, both of which were omitted from the training set. P1 P2 P3 P4 P5 P6 P7 P8 P9 Mean corpus5000 79.6 67.0 69.5 56.2 77.7 65.5 71.2 72.9 67.9 69.7 human218 90.3 82.9 86.6 71.9 89.5 75.3 78.0 77.7 76.2 80.9 Bear & Dog Prediction Match -0.10 -0.08 -0.06 -0.04 -0.02 0.00 0.02 0.04 0.06 0.08 0.10 Is it an animal? Is it manmade? Do you see it daily? Is it helpful? Can you hold it? Would you find it in a house? Do you love it? Does it stand on two legs? Is it wild? Does it provide protection? Answer Bear Predicted Bear Target Dog Target Dog Predicted Figure 1: Ten semantic features from the human218 knowledge base for the words bear and dog. The true encoding is shown along with the predicted encoding when fMRI images for bear and dog were left out of the training set. 2. How is the classifier able to discriminate between closely related novel classes? Figure 1 shows ten semantic questions (features) from the human218 dataset. The graph shows the true values along with the predicted feature values for both bear and dog when trained on the other 58 words. We see the model is able to learn to predict many of the key features that bears and dogs have in common such as is it an animal? as well as those that differentiate between the two, such as do you see it daily? and can you hold it? For both of these novel words, the features predicted from the neural data were closest to the true word. 3. Can we decode the word from a large set of possible words? Given the success of the semantic output code classifier at discriminating between the brain images for two novel words, we now consider the much harder problem of discriminating a novel word from a large set of candidate words. To test this ability, we performed a leave-one-out-cross-validation, where we trained using Equation 3 on images and semantic features for 59 words. We then predicted the features for the held-out image of the 60th word, and then performed a 1-nearest neighbor classification in a large set of candidate words. We tested two different word sets. The first was mri60 which is the collection of all 60 concrete nouns for which we collected fMRI data, including the 59 training words and the single held out word. The second set was noun940, a collection of 940 English nouns with high familiarity, concreteness and imagineability, compiled from Wilson (1988) and Snodgrass (1980). For this set of words, we added the true held-out word to the set of 940 on each cross-validation iteration. We performed this experiment using both the corpus5000 and human218 feature sets. The rank accuracy results (over 60 cross-validation iterations) of the four experiments are shown in Figure 2. The human218 features again significantly outperform corpus5000 on both mean and median rank accuracy measures, and both feature sets perform well above chance. On 12 of 540 total presentations of the mri60 words (60 presentations for each of nine participants), the human218 features predicted the single held-out word above all 59 other words in its training set. While just a bit above chance level (9/540), the fact that the model ever chooses the held-out word over all the training words is noteworthy since the model is undoubtedly biased towards predicting feature values similar to the words on which it was trained. On the noun940 words, the model predicted the correct word from the set of 941 alternatives a total of 26 times for the human218 features and 22 times for the corpus5000 features. For some subjects, the model correctly picked the right 7 Rank Accuracy human218 corpus5000 human218 corpus5000 40% 50% 60% 70% 80% 90% 100% Accuracy Mean Rank Median Rank 50% Chance mri60 Word Set noun940 Word Set Figure 2: The mean and median rank accuracies across nine participants for two different semantic feature sets. Both the original 60 fMRI words and a set of 940 nouns were considered. Table 2: The top five predicted words for a novel fMRI image taken for the word in bold (all fMRI images taken from participant P1). The number in the parentheses contains the rank of the correct word selected from 941 concrete nouns in English. Bear Foot Screwdriver Train Truck Celery House Pants (1) (1) (1) (1) (2) (5) (6) (21) bear foot screwdriver train jeep beet supermarket clothing fox feet pin jet truck artichoke hotel vest wolf ankle nail jail minivan grape theater t-shirt yak knee wrench factory bus cabbage school clothes gorilla face dagger bus sedan celery factory panties word from the set of 941 more than 10% of the time. The chance accuracy of predicting a word correctly is only 0.1%, meaning we would expect less than one correct prediction across all 540 presentations. As Figure 2 shows, the median rank accuracies are often significantly higher than the mean rank accuracies. Using the human218 features on the noun940 words, the median rank accuracy is above 90% for each participant while the mean is typically about 10% lower. This is due to the fact that several words are consistently predicted poorly. The prediction of words in the categories animals, body parts, foods, tools, and vehicles typically perform well, while the words in the categories furniture, man-made items, and insects often perform poorly. Even when the correct word is not the closest match, the words that best match the predicted features are often very similar to the held-out word. Table 2 shows the top five predicted words for eight different held-out fMRI images for participant P1 (i.e. the 5 closest words in the set of 941 to the predicted vector of semantic features). 5 Conclusion We presented a formalism for a zero-shot learning algorithm known as the semantic output code classifier. This classifier can predict novel classes that were omitted from a training set by leveraging a semantic knowledge base that encodes features common to both the novel classes and the training set. We also proved the first formal guarantee that shows conditions under which this classifier will predict novel classes. We demonstrated this semantic output code classifier on the task of neural decoding using semantic knowledge bases derived from both human labeling and corpus statistics. We showed this classifier can predict the word a person is thinking about from a recorded fMRI image of that person’s neural activity with accuracy much higher than chance, even when training examples for that particular word were omitted from the training set and the classifier was forced to pick the word from among nearly 1,000 alternatives. We have shown that training images of brain activity are not required for every word we would like a classifier to recognize. These results significantly advance the state-of-the-art in neural decoding and are a promising step towards a large vocabulary brain-computer interface. 8 References Bart, E., & Ullman, S. (2005). Cross-generalization: learning novel classes from a single example by feature replacement. Computer Vision and Pattern Recognition, 2005. CVPR 2005. IEEE Computer Society Conference on, 1, 672–679 vol. 1. Ciaccia, P., & Patella, M. (2000). PAC nearest neighbor queries: Approximate and controlled search in high-dimensional and metric spaces. Data Engineering, International Conference on, 244. Dietterich, T. G., & Bakiri, G. (1995). Solving multiclass learning problems via error-correcting output codes. Journal of Artificial Intelligence Research. Farhadi, A., Endres, I., Hoiem, D., & Forsyth, D. (2009). Describing objects by their attributes. Proceedings of the IEEE Computer Society Conference on Computer Vision and Pattern Recognition (CVPR). Hastie, T., Tibshirani, R., & Friedman, J. H. (2001). The elements of statistical learning. Springer. Kay, K. N., Naselaris, T., Prenger, R. J., & Gallant, J. L. (2008). Identifying natural images from human brain activity. Nature, 452, 352–355. Lampert, C. H., Nickisch, H., & Harmeling, S. (2009). Learning to detect unseen object classes by between-class attribute transfer. Proceedings of the IEEE Computer Society Conference on Computer Vision and Pattern Recognition (CVPR). Larochelle, H., Erhan, D., & Bengio, Y. (2008). Zero-data learning of new tasks. AAAI Conference on Artificial Intelligence. Mitchell, T., et al. (2008). Predicting human brain activity associated with the meanings of nouns. Science, 320, 1191–1195. Mitchell, T. M. (1997). Machine learning. New York: McGraw-Hill. Mitchell, T. M., Hutchinson, R., Niculescu, R. S., Pereira, F., Wang, X., Just, M., & Newman, S. (2004). Learning to decode cognitive states from brain images. Machine Learning, 57, 145–175. Plaut, D. C. (2002). Graded modality-specific specialization in semantics: A computational account of optic aphasia. Cognitive Neuropsychology, 19, 603–639. Snodgrass, J., & Vanderwart, M. (1980). A standardized set of 260 pictures: Norms for name agreement, image agreement, familiarity and visual complexity. Journal of Experimental Psychology: Human Learning and Memory, 174–215. Torralba, A., & Murphy, K. P. (2007). Sharing visual features for multiclass and multiview object detection. IEEE Trans. Pattern Anal. Mach. Intell., 29, 854–869. van der Maaten, L., & Hinton, G. (2008). Visualizing data using t-SNE. Journal of Machine Learning Research, 9(Nov), 2579–2605. Waibel, A. (1989). Modular construction of time-delay neural networks for speech recognition. Neural Computation, 1, 39–46. Wilson, M. (1988). The MRC psycholinguistic database: Machine readable dictionary, version 2. Behavioral Research Methods, 6–11. 9
2009
26
3,770
An Integer Projected Fixed Point Method for Graph Matching and MAP Inference Marius Leordeanu Robotics Institute Carnegie Mellon University Pittsburgh, PA 15213 leordeanu@gmail.com Martial Hebert Robotics Institute Carnegie Mellon University Pittsburgh, PA 15213 hebert@ri.cmu.edu Rahul Sukthankar Intel Labs Pittsburgh Pittsburgh, PA 15213 rahuls@cs.cmu.edu Abstract Graph matching and MAP inference are essential problems in computer vision and machine learning. We introduce a novel algorithm that can accommodate both problems and solve them efficiently. Recent graph matching algorithms are based on a general quadratic programming formulation, which takes in consideration both unary and second-order terms reflecting the similarities in local appearance as well as in the pairwise geometric relationships between the matched features. This problem is NP-hard, therefore most algorithms find approximate solutions by relaxing the original problem. They find the optimal continuous solution of the modified problem, ignoring during optimization the original discrete constraints. Then the continuous solution is quickly binarized at the end, but very little attention is put into this final discretization step. In this paper we argue that the stage in which a discrete solution is found is crucial for good performance. We propose an efficient algorithm, with climbing and convergence properties, that optimizes in the discrete domain the quadratic score, and it gives excellent results either by itself or by starting from the solution returned by any graph matching algorithm. In practice it outperforms state-or-the art graph matching algorithms and it also significantly improves their performance if used in combination. When applied to MAP inference, the algorithm is a parallel extension of Iterated Conditional Modes (ICM) with climbing and convergence properties that make it a compelling alternative to the sequential ICM. In our experiments on MAP inference our algorithm proved its effectiveness by significantly outperforming [13], ICM and Max-Product Belief Propagation. 1 Introduction Graph matching and MAP inference are essential problems in computer vision and machine learning that are frequently formulated as integer quadratic programs, where obtaining an exact solution is computationally intractable. We present a novel algorithm, Integer Projected Fixed Point (IPFP), that efficiently finds approximate solutions to such problems. In this paper we focus on graph matching, because it is in this area that we have extensively compared our algorithm to state-of-the-art methods. Feature matching using pairwise constraints is gaining a widespread use in computer vision, especially in shape and object matching and recognition. It is a generalization of the classical graph matching problem, formulated as an integer quadratic program [1,3,4,5,7,8,16,17] that takes into consideration both unary and second-order terms reflecting the similarities in local appearance as well as in the pairwise geometric relationships between the matched features. The problem is NP-hard, and a lot of effort has been spent in finding good approximate solutions by relaxing the integer one-to-one constraints, such that the continuous global optimum of the new problem can be found efficiently. In the end, little computational time is spent in order to binarize the solution, based on the assumption that the continuous optimum is close to the discrete global optimum of the original combinatorial problem. In this paper we show experimentally that this is not the case and that, in fact, carefully searching for a discrete solution is essential for maximizing the quadratic score. Therefore we propose an iterative algorithm that takes as input any continuous or discrete solution, possibly given by some other graph matching method, and quickly improves it by aiming to maximize the original problem with its integer constraints. Each iteration consists of two stages, being loosely related to the Frank-Wolfe method (FW) [14, 15], a classical optimization algorithm from operation research. The first stage maximizes in the discrete domain a linear approximation of the quadratic function around the current solution, which gives a direction along which the second stage maximizes the original quadratic score in the continuous domain. Even though this second stage might find a non-discrete solution, the optimization direction given by the first stage is always towards an integer solution, which is often the same one found in the second stage. The algorithm always improves the quadratic score in the continuous domain finally converging to a maximum. If the quadratic function is convex the solution at every iteration is always discrete and the algorithm converges in a finite number of steps. In the case of non-convex quadratic functions, the method tends to pass through/near discrete solutions and the best discrete solution encountered along the path is returned, which, in practice is either identical or very close to the point of convergence. We have performed extensive experiments with our algorithm with excellent results, the most representative of which being shown in this paper. Our method clearly outperforms four state-of-the-art algorithms, and, when used in combination, the final solution is dramatically improved. Some recent MAP inference algorithms [11,12,13] for Markov Random Fields formulate the problem as an integer quadratic program, for which our algorithm is also well suited, as we later explain and demonstrate in more detail. Matching Using Pairwise Constraints The graph matching problem, in its most recent and general form, consists of finding the indicator vector x∗that maximizes a certain quadratic score function: Problem 1: x∗= argmax(xTMx) s. t. Ax = 1, x ∈{0, 1}n (1) given the one-to-one constraints Ax = 1, x ∈{0, 1}n, which require that x is an indicator vector such that xia = 1 if feature i from one image is matched to feature a from the other image and zero otherwise. Usually one-to-one constraints are imposed on x such that one feature from one image can be matched to at most one other feature from the other image. In MAP inference problems, only many-to-one constraints are usually required, which can be accommodated by the same formulation, by appropriately setting the constraints matrix A. In graph matching, M is usually a symmetric matrix with positive elements containing the compatibility score functions, such that Mia;jb measures how similar the pair of features (i, j) from one image is in both local appearance and pair-wise geometry with the pair of their candidate matches (a, b) from the other image. The difficulty of Problem 1 depends on the structure of this matrix M, but in the general case it is NP-hard and no efficient algorithm exists that can guarantee optimality bounds. Previous algorithms modify Problem 1, usually by relaxing the constraints on the solution, in order to be able to find efficiently optimal solutions to the new problem. For example, spectral matching [5] (SM) drops the constraints entirely and assumes that the leading eigenvector of M is close to the optimal discrete solution. It then finds the discrete solution x by maximizing the dot-product with the leading eigenvector of M. The assumption is that M is a slightly perturbed version of an ideal matrix, with rank-1, for which maximizing this dot product gives the global optimum. Later, spectral graph matching with affine constraints was developed [3] (SMAC), which finds the optimal solution of a modified score function, with a tighter relaxation that imposes the affine constraints Ax = 1 during optimization. A different, probabilistic interpretation, not based on the quadratic formulation, is given in [2] (PM), also based on the assumption that M is close to a rank-1 matrix, which is the outer product of the vector of probabilities for each candidate assignment. An important observation is that none of the previous methods are concerned with the original integer constraints during optimization, and the final post processing step, when the continuous solution is binarized, is usually just a very simple procedure. They assume that the continuous solution is close to the discrete one. The algorithm we propose here optimizes the original quadratic score in the continuous domain obtained by only dropping the binary constraints, but it always targets discrete solutions through which it passes most of the time. Note that even in this continuous domain the quadratic optimization problem is NPhard, so we cannot hope to get any global optimality guarantees. But we do not lose much, since guaranteed global optimality for a relaxed problem does not require closeness to the global optimum of the original problem, a fact that is evident in most of our experiments. Our experimental results from Section 4 strongly suggest an important point: algorithms with global optimality properties in a loosely relaxed domain can often give relatively poor results in the original domain, and a welldesigned procedure with local optimality properties in the original domain, such as IPFP, can have a greater impact on the final solution than the global optimality in the relaxed domain. Our algorithm aims to optimize the following continuous problem, in which we only drop the integer constraints from Problem 1: Problem 2: x∗= argmax(xTMx) s. t. Ax = 1, x ≥0 (2) Note that Problem 2 is also NP-hard, and it becomes a concave minimization problem, equivalent to Problem 1, when M is positive definite. 2 Algorithm We introduce our novel algorithm, Integer Projected Fixed Point (IPFP), that takes as input any initial solution, continuous or discrete, and quickly finds a solution obeying the initial discrete constraints of Problem 1 with a better score, most often significantly better than the initial one (Pd from Step 2 is a projection on the discrete domain, discussed shortly afterwards): 1. Initialize x∗= x0, S∗= xT 0 Mx0, k = 0, where xi ≥0 and x ̸= 0 2. Let bk+1 = Pd(Mxk), C = xT k M(bk+1 −xk), D = (bk+1 −xk)TM(bk+1 −xk) 3. If D ≥ 0 set xk+1 = bk+1. Else let r = min {−C/D, 1} and set xk+1 = xk + r(bk+1 −xk) 4. If bT k+1Mbk+1 ≥S∗then set S∗= bT k+1Mbk+1 and x∗= bk+1 5. If xk+1 = xk stop and return the solution x∗ 6. Set k = k + 1 and go back to Step 2. This algorithm is loosely related to the power method for eigenvectors, also used by spectral matching [9]: at Step 2 it replaces the fixed point iteration of the power method vk+1 = P(Mvk), where P is the projection on the unit sphere, with a similar iteration bk+1 = Pd(Mxk), in which Pd is the projection on the one-to-one (for graph matching) or many-to-one (for MAP inference) discrete constraints. Pd boils down to finding the discrete vector bk+1 = argmax bTMxk, which can be easily found in linear time for many-to-one constraints. For one-to-one constraints the efficient Hungarian method can be used. This is true since all binary vectors in the given discrete domain have the same norm. Note that (see Proposition 1), in both cases (one-to-one or many-to-one constraints), the discrete bk+1 is also the one maximizing the dot-product with Mxk in the continuous domain Ab = 1, b > 0. IPFP is also related to Iterative Conditional Modes (ICM) [10] used for inference in graphical models. In the domain of many-to-one constraints IPFP becomes an extension of ICM for which the updates are performed in parallel without losing the climbing property and the convergence to a discrete solution. Note that the fully parallel version of ICM is IPFP without Step 3: xk+1 = Pd(Mxk). The theoretical results that we will present shortly are valid for both one-to-one and many-to-one constraints, with a few differences that we will point out when deemed necessary. The algorithm is a basically a sequence of linear assignment (or independent labeling) problems, in which the next solution is found by using the previous one. In practice the algorithm converges in about 5 −10 steps, which makes it very efficient, with basically the same complexity as the complexity of Step 2. Step 3 insures that the quadratic score increases with each iteration. Step 4 guarantees that the binary solution returned is never worse than the initial solution. In practice, the algorithm significantly improves the initial binary solution, and the final continuous solution is most often discrete, and always close to the best discrete one found. In fact, in the case of MAP inference, it is guaranteed that the point of convergence is discrete, as a fixed point of Pd. Intuition The intuition behind this algorithm is the following: at every iteration the quadratic score xTMx is first approximated by the first order Taylor expansion around the current solution xk: xTMx ≈xT k Mxk+2xT k M(x −xk). This approximation is maximized within the discrete domain of Problem 1, at Step 2, where bk+1 is found. From Proposition 1 (see next) we know that the same discrete bk+1 also maximizes the linear approximation in the continuous domain of Problem 2. The role of bk+1 is to provide a direction of largest possible increase (or ascent) in the first-order approximation, within both the continuous domain and the discrete domain simultaneously. Along this direction the original quadratic score can be further maximized in the continuous domain of Problem 2 (as long as bk+1 ̸= xk). At Step 3 we find the optimal point along this direction, also inside the continuous domain of Problem 2. The hope, also confirmed in practice, is that the algorithm will tend to converge towards discrete solutions that are, or are close to, maxima of Problem 2. 3 Theoretical Analysis Proposition 1: For any vector x ∈Rn there exists a global optimum y∗of xTMy in the domain of Problem 2 that has binary elements (thus it is also in the domain of Problem 1). Proof: Maximizing xTMy with respect to y, subject to Ay = 1 and y > 0 is a linear program for which an integer optimal solution exists because the constraints matrix A is totally unimodular [9]. This is true for both one-to-one and many-to-one constraints. It follows that the maximization from Step 2 bk+1 = argmax bTMxk in the original discrete domain, also maximizes the same dot-product in the continuous domain of Problem 2, of relaxed constraints Ax = 1 and x > 0. This ensures that the algorithm will always move towards some discrete solution that also maximizes the linear approximation of the quadratic function in the domain of Problem 2. Most often in practice, that discrete solution also maximizes the quadratic score, along the same direction and within the continuous domain. Therefore xk is likely to be discrete at every step. Property 1: The quadratic score xT k Mxk increases at every step k and the sequence of xk converges. Proof: For a given step k, if bk+1 = xk we have convergence. If bk+1 ̸= xk, let x be a point on the line between xk and bk+1, x = xk+t(bk+1−xk). For any 0 ≤t ≤1, x is in the feasible domain of Problem 2. Let Sk = xT k Mxk. Let us define the quadratic function f(t) = xTMx = Sk + 2tC + t2D, which is the original function in the domain of Problem 2 on the line between xk and bk+1. Since bk+1 maximizes the dot product with xT k M in the discrete (and the continuous) domain, it follows that C ≥0. We have two cases: D ≥0, when xk+1 = bk+1 (Step 3) and Sk+1 = xT k+1Mxk+1 = fq(1) ≥Sk = xT k Mxk; and D < 0, when the quadratic function fq(t) is convex with the maximum in the domain of Problem 2 attained at point xk+1 = xk + r(bk+1 −xk). Again, it also follows that Sk+1 = xT k+1Mxk+1 = fq(r) ≥Sk = xT k Mxk. Therefore, the algorithm is guaranteed to increase the score at every step. Since the score function is bounded above on the feasible domain, it has to converge, which happens when C = 0. By always improving the quadratic score in the continuous domain, at each step the next solution moves towards discrete solutions that are better suited for solving the original Problem 1. Property 2: The algorithm converges to a maximum of Problem 2. Proof: Let x∗be a point of convergence. At that point the gradient 2Mx∗is non-zero since both M and x∗have positive elements and (x∗)TMx∗> 0, (it is higher than the score at the first iteration, also greater than zero). Since x∗is a point of convergence it follows that C = 0, that is, for any other x in the continuous domain of Problem 2, (x∗)TMx∗≥(x∗)TMx. This implies that for any direction vector v such that x∗+ tv is in the domain of Problem 2 for a small enough t > 0, the dot-product between v and the gradient of the quadratic score is less than or equal to zero (x∗)TMv ≤0, which further implies that x∗is a maximum (local or global) of the quadratic score within the continuous domain of equality constraints Ax∗= 1, x∗> 0. For many-to-one constraints (MAP inference) it basically follows that the algorithm will converge to a discrete solution, since the strict (local and global) maxima of Problem 2 are in the discrete domain [12]. If the maximum is not strict, IPFP still converges to a discrete solution (which is also a local maximum): the one found at Step 2. This is another similarity with ICM, which also converges to a maximum. Therefore, combining ours with ICM cannot improve the performance of ICM, and vice-versa. Property 3: If M is positive semidefinite with positive elements, then the algorithm converges in a finite number of iterations to a discrete solution, which is a maximum of Problem 2. Proof: Since M is positive semidefinite we always have D ≥0, thus xk is always discrete for any k. Since the number of discrete solutions is finite, the algorithm must converge in a finite number of steps to a local (or global) maximum, which must be discrete. This result is obviously true for both one-to-one and many-to-one constraints. When M is positive semidefinite, Problem 2 is a concave minimization problem for which it is well known that the global optimum has integer elements, so it is also a global optimum of the original Problem 1. In this case our algorithm is only guaranteed to find a local optimum in a finite number of iterations. Global optimality of concave minimization problems is a notoriously difficult task since the problem can have an exponential number of local optima. In fact, if a large enough constant is added to the diagonal elements of M, every point in the original domain of possible solutions becomes a local optimum for one-to-one problems. Therefore adding a large constant to make the problem concave is not good idea , even if the global optimum does not change. In practice M is rarely positive semidefinite, but it can be close to being one if the first eigenvalue is much larger than the rest, which is the assumption made by the spectral matching algorithm, for example. Property 4: If M has non-negative elements and is rank-1, then the algorithm will converge and return the global optimum of the original problem after the first iteration. Proof: Let v, λ be the leading eigenpair of M. Then, since M has non-negative elements both v and λ are positive. Since M is also rank one, we have Mx0 = λ(vT x0)v. Since both x0 and v have positive elements it immediately follows that x1 after the first iteration is the indicator solution vector that maximizes the dot-product with the leading eigenvector (vT x0 = 0 is a very unlikely case that never happens in practice). It is clear that this vector is the global optimum, since in the rank-1 case we have: xT Mx = λ1(vT x)2, for any x. The assumption that M is close to being rank-1 is used by two recent algorithms, [2] and [5]. Spectral matching [5] also returns the optimal solution in this case and it assumes that the rank-1 assumption is the ideal matrix to which a small amount of noise is added. Probabilistic graph matching [2] makes the rank-1 approximation by assuming that each second-order element of Mia;jb is the product of the probability of feature i being matched to a and feature j being matched to b, independently. However, instead of maximizing the quadratic score function, they use this probabilistic interpretation of the pair-wise terms and find the solution by looking for the closest rank-1 matrix to M in terms of the KL-divergence. If the assumptions in [2] were perfectly met, then spectral matching, probabilistic graph matching and our algorithm would all return the same solution. For a comparison of all these algorithms on real world experiments please see the experiments section. 4 Experiments We first present some representative experiments on graph matching problems. We tested IPFP by itself, as well as in conjunction with other algorithms as a post-processing step. When used by itself IPFP is always initialized with a flat, uniform continuous solution. We followed the experiments of [6] in the case of outliers: we used the same cars and motorbikes image pairs, extracted from the Pascal 2007 database, the same features (oriented points extracted from contours) and the same second-order potentials Mia;jb = e−wT gia;jb; gia;jb is a five dimensional vector of deformations in pairwise distances and angles when matching features (i, j) from one image to features (a, b) from the other and w is the set of parameters that control the weighting of the elements of gia;jb. We followed the setup from [6] exactly, in order to have a fair comparison of our algorithm against the results they obtained. Due to space limitations, we refer the interested reader to [6] for the details. These experiments are difficult due the large number of outliers (on average 5 times more outliers than inliers), and, in the case of cars and motorbikes, also due to the large intra-category variations Figure 1: Results on motorbikes and cars averaged over 30 experiments: at each iteration the average score xT k Mxk normalized by the ground truth score is displayed. The comparisons are not affected by this normalization, since all scores are normalized by the same value. Notice how quickly IPFP converges (fewer than 10 iterations) Table 1: Average matching rates for the experiments with outliers on cars and motorbikes from Pascal 07. Note that our algorithm by itself outperforms on average all the others by themselves. When the solution of other algorithms is the starting point of IPFP the performance is greatly improved. Dataset IPFP SM SMAC GA PM Cars and Motorbikes: alone 64.4% 58.2% 58.6% 46.7% 36.6% Cars and Motorbikes: + IPFP 64.4% 67.0% 66.2% 66.3% 67.2% Cars and Motorbikes: Improvement NA +8.8% +7.6% +19.6% +30.6% in shape present in the Pascal 2007 database. By outliers we mean the features that have no ground truth correspondences in the other image, and by inliers those that have such correspondences. As in [6] we allow outliers only in one of the images in which they are present in large number, the ratio of outliers to inliers varying from 1.5 to over 10. The ground truth correspondences were manually selected by the authors of [6]. The difficulty of the matching problems is reflected by the relatively low matching scores of all algorithms (Table 1). In order to ensure an optimal performance of all algorithms, we used the supervised version of the graph matching learning method from [6]. Learning w was effective, improving the performance by more than 15% on average, for all algorithms. The algorithms we chose for comparison and also for combining with ours are among the current state-of-the-art in the literature: spectral matching with affine constraints (SMAC) [3], spectral matching (SM) [5], probabilistic graph matching (PM) [2], and graduated assignment (GA) [4]. In Tables 1 and 2 we show that in our experiments IPFP significantly outperforms other state-of-the-art algorithms. In our experiments we focused on two aspects. Firstly, we tested the matching rate of our algorithm against the others, and observed that it consistently outperforms them, both in the matching rate and in the final quadratic score achieved by the resulting discrete solution (see Tables 1, 2). Secondly, we combined our algorithm, as a post-processing step, with the others and obtained a significant improvement over the output matching rate and quadratic score of the other algorithms by themselves (see Figures 1, 2). In Figure 2 we show the quadratic score of our algorithm, per iteration, for several individual experiments, when it takes as initial solution the output of several other algorithms. The score at the first iteration is the score of the final discrete solution returned by those algorithms and the improvement in just a few iterations is substantial, sometimes more than doubling the final quadratic score reached by the other algorithms. In Figure 1 we show the average scores of our algorithm, over 30 different experiments on cars and motorbikes, per iteration, normalized by the score of the solutions given by the human ground truth labeling. We notice that regardless of the starting condition, the final scores are very similar, slightly above the value of 1 (Table 2), which means that the solutions reached are, on average, at least as good, in terms of the matching score function, as the manually picked solutions. None of the algorithms by themselves, except only for IPFP, reach this level of quality. We also notice that a quadratic score of 1 does not correspond to a perfect matching rate, which indicates the fact that besides the ground truth solution there are Table 2: Quadratic scores on the Cars and Motorbikes image sets (the higher, the better). S∗is the score of the manually picked ground truth. Note that the ground truth score S∗does not affect the comparison since it is the same normalization value for all algorithms. The “Convergence to a binary solution” row shows the average rate at which our algorithm converges to a discrete solution. Experiments on Cars and Motorbikes IPFP SM SMAC GA PM Alone, avg Smax/S∗ 1.081 0.781 0.927 0.623 0.4785 + IPFP, avg Smax/S∗ 1.081 1.070 1.082 1.086 1.080 Convergence to a binary solution 86.7% 93.3% 86.7% 93.3% 86.7% other solutions with high score. This is expected, given that the large number of outliers can easily introduce wrong solutions of high score. However, increasing the quadratic score, does increase the matching rate as can be seen by comparing the results between the Tables 2 and 1. Figure 2: Experiments on cars and motorbikes: at each iteration the score xT k Mxk normalized by the ground truth score is displayed for 30 individual matching experiments for our algorithm starting from different solutions (uniform, or given by some other algorithm). Experiments on MAP inference problems We believe that IPFP can have a greater impact in graph matching problems than in MAP inference ones, due to the lack of efficient, high-quality discretization procedures in the graph matching literature. In the domain of MAP inference for MRFs, it is important to note that IPFP is strongly related to the parallel version of Iterated Conditional Modes, but, unlike parallel ICM, it has climbing, strong convergence and local optimality properties. To see the applicability of our method to MAP inference, we tested it against sequential ICM, Max-Product BP with damping oscillations (Table 3), the algorithm L2QP of [12], and the the algorithm of [13], which is based on a convex approximation. In the case of [12] and [13], which give continuous optimal solutions to a relaxed problem, a post-processing step is required for discretization. Note that the authors of [13] use ICM to obtain a binary solution. However, we wanted to emphasize the quality of the methods by themselves, without a powerful discretization step, and used ICM for comparisons separately. Thus, for discretization we used one iteration of ICM for both our L2QP [12] and CQP [13]. Both ICM and IPFP used as initial condition a uniform flat solution as in the case of graph matching. We used the same experimental setup as in [11] and [12], on graphs with different degrees of edge density (by generating random edges with a given probability, varying from 0.1 to 1). The values of the potentials were randomly generated as in [11] and [12], favoring the correct labels vs. the wrong ones. In Figure 3 we show the average scores normalized by the score of IPFP over 30 different experiments, for different probabilities of edge generation pEdge on graphs with 50 nodes and different number of possible labels per node. The most important observation is that both ICM and IPFP outperform L2QP and CQP by a wide margin on all problems without any single exception. In our experiments, on every single problem, IPFP Table 3: Average objective score over 30 different experiments on 4-connected and 8-connected planar graphs with 50 sites and 10 possible labels per site Graph type IPFP ICM BP 4-connected planar 79.5 78.2 54.2 8-connected planar 126.0 123.2 75.4 outperformed ICM, while both IPFP and ICM outperformed both L2QP and CQP by a wide margin, which is reflected in the averages shown in Figure 3. Figure 3: Average quadratic scores normalized by the score of IPFP, over 30 different experiments, for each probability of edge generation pEdge ∈0.1, 0.2, ..., 1 and different number of labels, for graphs with 50 nodes. Note that IPFP consistently ourperforms L2QP [12] and CQP [13] (by a wide margin) and ICM. Note that L2QP and CQP perform similarly for a small number of labels. 5 Conclusion This paper presents a novel and computationally efficient algorithm, Integer Projected Fixed Point (IPFP), that outperforms state-of-the-art methods for solving quadratic assignment problems in graph matching, and well-established methods in MAP inference such as BP and ICM. We analyze the theoretical properties of IPFP and show that it has strong convergence and climbing guarantees. Also, IPFP can be employed in conjunction with existing techniques, such as SMAC or SM for graph matching or BP for inference to achieve solutions that are dramatically better than the ones produced independently by those methods alone. Furthermore, IPFP is very straightforward to implement and converges in only 5–10 iterations in practice. Thus, IPFP is very well suited for addressing a broad range of real-world problems in computer vision and machine learning. 6 Acknowledgments This work was supported in part by NSF Grant IIS0713406 and by the Intel Graduate Fellowship program. References [1] A. Berg, T. Berg and J. Malik. Shape matching and object recognition using low distortion correspondences. Computer Vision and Pattern Recognition, 2005 [2] R. Zass and A. Shashua. Probabilistic Graph and Hypergraph Matching. Computer Vision and Pattern Recognition, 2008 [3] T. Cour, P. Srinivasan and J. Shi. Balanced Graph Matching. Neural Information Processing Systems, 2006 [4] S. Gold, and A. Rangarajan. A graduated assignment algorithm for graph matching. Pattern Analysis and Machine Intelligence, 1996 [5] M. Leordeanu and M. Hebert. A Spectral Technique for Correspondence Problems using Pairwise Constraints. International Conference on Computer Vision, 2005 [6] M. Leordeanu and M. Hebert. Unsupervised Learning for Graph Matching. Computer Vision and Pattern Recognition, 2009 [7] C. Schellewald and C. Schnorr. Probabilistic subgraph matching based on convex relaxation. EMMCVPR, 2005 [8] P.H.S Torr. Solving markov random fields using semi definite programming. Artificial Intelligence and Statistics, 2003 [9] B. Rainer, M. Dell’Amico and S. Martello. Assignment Problems. SIAM Publications, 2009 [10] J. Besag. On the Statistical Analysis of Dirty Pictures. JRSS, 1986 [11] T. Cour and J. Shi. Solving Markov Random Fields with Spectral Relaxation. International Conference on Artificial Intelligence and Statistics, 2007 [12] M. Leordeanu and M. Hebert. Efficient MAP approximation for dense energy functions. International Conference on Machine Learning, 2006 [13] P. Ravikumar and J. Lafferty. Quadratic Programming Relaxations for Metric Labeling and Markov Random Field MAP Estimation, International Conference on Machine Learning, 2006 [14] M. Frank and P. Wolfe. An algorithm for quadratic programming, Naval Research Logistics Quarterly, 1956. [15] N.W. Brixius and K.M. Anstreicher. Solving quadratic assignment problems using convex quadratic programming relaxations, Optimization Methods and Software, 2001 [16] J. Maciel and J.P. Costeira. A global solution to sparse correspondence problems Pattern Analysis and Machine Intelligence, 2003 [17] L. Torresani, V. Kolmogorov and C. Rother. Feature correspondence via graph matching: Models and global optimization. European Conference on Computer Vision, 2008
2009
260
3,771
Efficient Bregman Range Search Lawrence Cayton Max Planck Institute for Biological Cybernetics lcayton@tuebingen.mpg.de Abstract We develop an algorithm for efficient range search when the notion of dissimilarity is given by a Bregman divergence. The range search task is to return all points in a potentially large database that are within some specified distance of a query. It arises in many learning algorithms such as locally-weighted regression, kernel density estimation, neighborhood graph-based algorithms, and in tasks like outlier detection and information retrieval. In metric spaces, efficient range search-like algorithms based on spatial data structures have been deployed on a variety of statistical tasks. Here we describe an algorithm for range search for an arbitrary Bregman divergence. This broad class of dissimilarity measures includes the relative entropy, Mahalanobis distance, Itakura-Saito divergence, and a variety of matrix divergences. Metric methods cannot be directly applied since Bregman divergences do not in general satisfy the triangle inequality. We derive geometric properties of Bregman divergences that yield an efficient algorithm for range search based on a recently proposed space decomposition for Bregman divergences. 1 Introduction Range search is a fundamental proximity task at the core of many learning problems. The task of range search is to return all points in a database within a specified distance of a given query. The problem is to do so efficiently, without examining the entire database. Many machine learning algorithms require range search. Locally weighted regression and kernel density estimation/regression both require retrieving points in a region around a test point. Neighborhood graphs—used in manifold learning, spectral algorithms, semisupervised algorithms, and elsewhere—can be built by connecting each point to all other points within a certain radius; doing so requires range search at each point. Computing point-correlation statistics, distance-based outliers/anomalies, and intrinsic dimensionality estimates also requires range search. A growing body of work uses spatial data structures to accelerate the computation of these and other proximity problems for statistical tasks. This line of techniques, coined “n-body methods” in [11], has showed impressive speedups on a variety of tasks including density estimation [12], gaussian process regression [25], non-parametric classification [17], matrix approximation [14], and kernel summation [15]. These methods achieve speedups by pruning out large portions of the search space with bounds derived from KD or metric trees that are augmented with statistics of the database. Some of these algorithms are direct applications of range search; others rely on very similar pruning techniques. One fairly substantial limitation of these methods is that they all derive bounds from the triangle inequality and thus only work for notions of distance that are metrics. The present work is on performing range search efficiently when the notion of dissimilarity is not a metric, but a Bregman divergence. The family of Bregman divergences includes the standard ℓ2 2 distance, Mahalanobis distance, KL-divergence, Itakura-Saito divergence, and a variety of matrix dissimilarity measures. We are particularly interested in the KL-divergence, as it is not a metric and is used extensively in machine learning. It appears naturally in document analysis, since documents 1 are often modeled using histograms [22, 5]. It also is used in many vision applications [23], such as content-based image retrieval [24]. Because Bregman divergences can be asymmetric and need not satisfy the triangle inequality, the traditional metric methods cannot be applied. In this work we present an algorithm for efficient range search when the notion of dissimilarity is an arbitrary Bregman divergence. These results demonstrate that the basic techniques behind the previously described efficient statistical algorithms can be applied to non-metric dissimilarities including, notably, the KL-divergence. Because of the widespread use of histogram representations, this generalization is important. The task of efficient Bregman range search presents a technical challenge. Our algorithm cannot rely on the triangle inequality, so bounds must be derived from geometric properties of Bregman divergences. The algorithm makes use of a simple space decomposition scheme based on Bregman balls [8], but deploying this decomposition for the range search problem is not straightforward. In particular, one of the bounds required results in a non-convex program to be solved, and the other requires comparing two convex bodies. We derive properties of Bregman divergences that imply efficient algorithms for these problems. 2 Background In this section, we briefly review prior work on Bregman divergences and proximity search. Bregman divergences originate in [7] and have become common in the machine learning literature, e.g. [3, 4]. Definition 1. Let f : RD →R be strictly convex and differentiable. The Bregman divergence based on f is df(x, y) ≡f(x) −f(y) −⟨∇f(y), x −y⟩. As can be seen from the definition, a Bregman divergence measures the distance between a function and its first-order taylor series approximation. Standard examples include f(x) = 1 2∥x∥2 2, yielding the ℓ2 2 distance df(x, y) = 1 2∥x −y∥2 2, and f(x) = P i xi log xi, giving the KL-divergence df(x, y) = P i xi log xi yi The Itakura-Saito divergence and Mahalanobis distance are other examples of Bregman divergences. Strict convexity of f implies that df(x, y) ≥0, with equality if, and only if, x = y. Though Bregman divergences satisfy this non-negativity property, like metrics, the similarities to metrics end there. In particular, a Bregman divergence need not satisfy the triangle inequality or be symmetric. Bregman divergences do possess several geometric properties related to the convexity of the base function. Most notably, df(x, y) is always convex in x (though not necessarily in y), implying that the Bregman ball Bf(µ, R) ≡{x | df(x, µ) ≤R} is a convex body. Recently, work on a variety of geometric tasks with Bregman divergences has appeared. In [19], geometric properties of Bregman voronoi diagrams are derived. [1] studies core-sets under Bregman divergences and gives a provably correct approximation algorithm for k-median clustering. [13] examines sketching Bregman (and Csisz´ar) divergences. [8] describes the Bregman ball tree in the context of nearest neighbor search; we will describe this work further momentarily. As these papers demonstrate, there has been substantial recent interest in developing basic geometric algorithms for Bregman divergences. The present paper contributes an effective algorithm for range search, one of the core problems of computational geometry [2], to this repertoire. The Bregman ball tree (BB-tree) was introduced in the context of nearest neighbor (NN) search [8]. Though NN search has a similar flavor to range search, the bounds that suffice for NN search are not sufficient for range search. Thus the utility of the BB-tree for statistical tasks is at present rather seriously limited. Moreover, though the extension of metric trees to range search (and hence to the previously described statistical tasks) is fairly straightforward because of the triangle inequality, the extension of BB-trees is substantially more complex. 2 Several other papers on Bregman proximity search have appeared very recently. Nielsen et al. study some improvements to the BB-tree [21] and develop a related data structure which can be used with symmetrized divergences [20]. Zhang et al. develop extensions of the VA-file and the R-tree for Bregman divergences [26]. These data structures can be adapted to work for Bregman divergences, as the authors of [26] demonstrate, because bounds on the divergence from a query to a rectangular cell can be computed cheaply; however this idea appears limited to decomposable Bregman divergences—divergences that decompose into a sum over one-dimensional divergences.1 Nevertheless, these data structures seem practical and effective and it would be interesting to apply them to statistical tasks.2 The applicability of rectangular cell bounds was independently demonstrated in [9, Chapter 7], where it is mentioned that KD-trees (and relatives) can be used for decomposable Bregman divergences. That chapter also contains theoretical results on the general Bregman range search problem attained by adapting known data structures via the lifting technique (also used in [26] and previously in [19]). 3 Range search with BB-trees In this section, we review the Bregman ball tree data structure and outline the range search algorithm. The search algorithm relies on geometric properties of Bregman divergences, which we derive in section 4. The BB-tree is a hierarchical space decomposition based on Bregman balls. It is a binary tree defined over the database such that each level provides a partition of the database points. As the tree is descended, the partition becomes finer and finer. Each node i in the tree owns a subset of the points Xi and also defines a Bregman ball Bf(µ, R) such that Xi ⊂Bf(µ, R). If i is an interior node, it has two children j and k that encapsulate database points Xj and Xk. Moreover, each point in Xi is in exactly one of Xj and Xk. Each leaf node contains some small number of points and the root node contains the entire database. Here we use this simple form of BB-tree, though our results apply to any hierarchical space decomposition based on Bregman balls, such as the more complex tree described in [21]. To encourage a rapid rate of radius decrease, an effective build algorithm will split a node into two well-separated and compact children. Thus a reasonable method for building BB-trees is to perform a top-down hierarchical clustering. Since k-means has been generalized to arbitrary Bregman divergences [4], it is a natural choice for a clustering algorithm. 3.1 Search algorithm We now turn to the search algorithm, which uses a branch-and-bound approach. We develop the necessary novel bounding techniques in the next section. Suppose we are interested in returning all points within distance γ of a query q—i.e. we hope to retrieve all database points lying inside of Bq ≡Bf(q, γ). The search algorithm starts at the root node and recursively explores the tree. At a node i, the algorithm compares the node’s Bregman ball Bx to Bq. There are three possible situations. First, if Bx is contained in Bq, then all x ∈Bx are in the range of interest. We can thus stop the recursion and return all the points associated with the node without explicitly computing the divergence to any of them. This type of pruning is called inclusion pruning. Second, if Bx ∩Bq = ∅, the algorithm can prune out Bx and stop the recursion; none of these points are in range. This is exclusion pruning. See figure 1. All performance gains from using the algorithm come from these two types of pruning. The third situation is Bx ∩Bq ̸= ∅and Bx ̸⊂Bq. In this situation, the algorithm cannot perform any pruning, so recurses on the children of node i. If i is a leaf node, then the algorithm computes the divergence to each database point associated with i and returns those elements within range. The two types of pruning—inclusion and exclusion—have been applied to a variety of problems with metric and KD-trees, see e.g. [11, 12, 25] and the papers cited previously. Thus though we 1This assumption is implicit in the proof of [26, Lemma 3.1] and is used in the revised lower bound computation as well. 2[26] had yet not been published at the time of submission of the present work and hence we have not yet done a detailed comparison. 3 Exclusion Inclusion Figure 1: The two pruning scenarios. The dotted, shaded object is the query range and the other is the Bregman ball associated with a node of the BB-tree. focus on range search, these types of prunings are useful in a broad range of statistical problems. A third type of pruning, approximation pruning, is useful in tasks like kernel density estimation [12]. This type of pruning is another form of inclusion pruning and can be accomplished with the same technique. It has been widely observed that the performance of spatial decomposition data structures, degrades with increasing dimensionality. In order to manage high-dimensional datasets, practitioners often use approximate proximity search techniques [8, 10, 17]. In the experiments, we explore one way to use the BB-tree in an approximate fashion. Determining whether two Bregman balls intersect, or whether one Bregman ball contains another, is non-trivial. For the range search algorithm to be effective, it must be able to determine these relationships very quickly. In the case of metric balls, these determinations are trivially accomplished using the triangle inequality. Since we cannot rely on the triangle inequality for an arbitrary Bregman divergence, we must develop novel techniques. 4 Computation of ball intersection In this section we lay out the main technical contribution of the paper. We develop algorithms for determining (1) whether one Bregman ball is contained in another and (2) whether two Bregman balls have non-empty intersection. 4.1 Containment Let Bq  Bf(µ q,Rq) and Bx  Bf(µ x,Rx). We wish to evaluate if Bx  Bq. This problem is equivalent to testing whether df(x,µ q)  Rq for all x  Bx. Simplifying notation, the core problem is determining max x df(x,q) subject to: df(x,µ )  R. (maxP) Unfortunately, this problem is not convex. As is well-known, non-convex problems are in general much more computationally difficult to solve than convex ones. This difficulty is particularly problematic in the case of range search, as the search algorithm will need to solve this problem repeatedly in the course of evaluating a singe range query. Moreover, finding a sub-optimal solution (i.e. a point x  Bf(µ ,R) that is not the max) will render the solution to the range search incorrect. Remarkably, beneath (maxP) lies a geometric structure that allows an efficient solution. We now show the main claim of this section, which implies a simple, efficient algorithm for solving (maxP). We denote the convex conjugate of f by f  (x)  sup y {  x,y⊂ f(y)} and define x   f(x), q   f(q), etc. 4 Claim 1. Suppose that the domain of f is C and that Bf(µ, R) ⊂relint(C). Furthermore, assume that ∥∇2f ∗(x′)∥is lower-bounded for all x′ such that x ∈Bf(µ, R). Let xp be the optimal solution to (maxP). Then x′ p lies in the set {θµ′ + (1 −θ)q′ | θ ≥0}. Proof. Though the program is not concave, the Lagrange dual still provides an upper bound on the optimal solution value (by weak duality). The Lagrangian is ν(x, λ) ≡df(x, q) −λ(df(x, µ) −R), (1) where λ ≥0. Differentiating (1) with respect to x and setting it equal to 0, we get ∇f(xp) −∇f(q) −λ∇f(xp) + λ∇f(µ) = 0, which implies that ∇f(xp) = 1 1 −λ (∇f(q) −λ∇f(µ)) . (2) We need to check what type of extrema ∇f(xp) = 0 is: ∇2 xν(x, λ) = (1 −λ)∇2f(x). Thus for λ > 1, the xp defined implicitly in (2) is a maximum. Setting θ ≡− λ 1−λ gives ∇f(xp) = θµ′ + (1 −θ)q′, where θ ∈(−∞, 0) ∪(1, ∞); we restrict attention to θ ∈(1, ∞) since that is where λ > 1 and hence xp is a maximum. Let x′ θ ≡θµ′ + (1 −θ)q′ and xθ ≡∇f ∗(x′ θ). The Lagrange dual is L(θ) ≡df(xθ, q) + θ 1 −θ(df(xθ, µ) −R). Then for any θ ∈(1, ∞), we have df(xp, q) ≤L(θ) (3) by weak duality. We now show that there is a θ∗> 1 satisfying df(xθ∗, µ) = R. One can check that the derivative of df(xθ, µ) with respect to θ is (θ −1)(µ′ −q′)⊤∇2f ∗(x′ θ)(µ′ −q′). (4) Since ∥∇2f ∗∥> c, for some positive c, (4) is at least (θ −1)∥µ′ −q′∥c. We conclude that df(xθ, µ) is increasing at an increasing rate with θ. Thus there must be some θ∗> 1 such that df(xθ∗, µ) = R. Plugging this θ∗into the dual, we get L(θ∗) = df(xθ∗, q) + θ∗ 1 −θ∗(df(xθ∗, µ) −R) = df(xθ∗, q). Combining with (3), we have df(xp, q) ≤df(xθ∗, µ). Finally, since (maxP) is a maximization problem and since xθ∗is feasible, the previous inequality is actually an equality, giving the theorem. Thus determining if Bx ⊂Bq reduces to searching for θ∗> 1 satisfying df(xθ∗, µx) = Rx and comparing df(xθ∗, µq) to Rq. Note that there is no obvious upper bound on θ∗in general, though one may be able to derive such a bound for a particular Bregman divergence. Without such an upper bound, one needs to use a line search method that does not require one, such as Newton’s method or the secant method. Both of these line search methods will converge quickly (quadratic in the case of Newton’s method, slightly slower in the case of the secant method): since df(xθ, µx) is monotonic in θ, there is a unique root. Interestingly, the convex program evaluated in [8] has a similar solution space, which we will again encounter in the next section. 5 4.2 Non-empty intersection In this section we provide an algorithm for evaluating whether Bq ∩Bx = ∅. We will need to make use of the Pythagorean theorem, a standard property of Bregman divergences. Theorem 1 (Pythagorean). Let C ⊂RD be a convex set and let x ∈C. Then for all z, we have df(x, z) ≥df(x, y) + df(y, z), where y ≡argminy∈Cdf(y, z) is the projection of z onto C. At first glance, the Pythagorean theorem may appear to be a triangle inequality for Bregman divergences. However, the inequality is actually the reverse of the standard triangle inequality and only applies to the very special case when y is the projection of z onto a convex set containing x. We now prove the main claim of this section. Claim 2. Suppose that Bx ∩Bq ̸= ∅. Then there exists a w in {∇f ∗(θµ′ x + (1 −θ)µ′ q) | θ ∈[0, 1]} such that w ∈Bq ∩Bx. Proof. Let z ∈Bx ∩Bq. We will refer to the set {∇f ∗(θµ′ x + (1 −θ)µ′ q) | θ ∈[0, 1]} as the dual curve. Let x be the projection of µq onto Bx and let q be the projection of µx onto Bq. Both x and q are on the dual curve (this fact follows from [8, Claim 2]), so we are done if we can show that at least one of them lies in the intersection of Bx and Bq. Suppose towards contradiction that neither are in the intersection. The projection of x onto Bq lies on the dual curve between x and µy; thus projecting x onto Bq yields q and similarly projecting q onto Bx yields x. By the Pythagorean theorem, df(z, x) ≥df(z, q) + df(q, x), (5) since q is the projection of x onto Bq and since z ∈Bq. Similarly, df(z, q) ≥df(z, x) + df(x, q). (6) Inserting (5) into (6), we get df(z, q) ≥df(z, q) + df(q, x) + df(x, q). Rearranging, we get that df(q, x) + df(x, q) ≤0. Thus both df(q, x) = 0 and df(x, q) = 0, implying that x = q. But since x ∈Bx and q ∈Bq, we have that x = q ∈Bq ∩Bq. This is the desired contradiction. The proceeding claim yields a simple algorithm for determining whether two balls Bx and Bq are disjoint: project µx onto Bq using the line search algorithm discussed previously. The projected point will obviously be in Bq; if it is also in Bx, the two balls intersect.3 Otherwise, they are disjoint and exclusion pruning can be performed. 5 Experiments We compare the performance of the search algorithm to standard brute force search on several datasets. We are particularly interested in text applications as histogram representations are common, datasets are often very large, and efficient search is broadly useful. We experimented with the following datasets, many of which are fairly high-dimensional. • pubmed-D. We used one million documents from the pubmed abstract corpus (available from the UCI collection). We generated a correlated topic model (CTM) [5] with D = 4, 8, . . . , 256 topics. For each D, we built a CTM using a training set and then performed inference on the 1M documents to generate the topic histograms. 3Claim 2 actually only shows that at least one of two projections—µx onto Bq and µq onto Bx—will be in the intersection. However, one can show that both projections will be in the intersection using the monotonicity of df(xθ, ·) in θ. 6 0 0.2 0.4 0.6 0.8 1 1.2 10 0 10 1 10 2 10 3 10 4 corel 0 0.2 0.4 0.6 0.8 1 1.2 10 0 10 1 10 2 10 3 10 4 pmed4 − pmed32 pmed4 pmed8 pmed16 pmed32 0 0.2 0.4 0.6 0.8 1 1.2 10 0 10 1 10 2 10 3 10 4 pmed64 − pmed256 pmed64 pmed128 pmed256 0 0.2 0.4 0.6 0.8 1 1.2 10 0 10 1 10 2 10 3 10 4 rcv8−rcv32 rcv8 rcv16 rcv32 0 0.2 0.4 0.6 0.8 1 1.2 10 0 10 1 10 2 10 3 10 4 rcv64 − rcv256 rcv64 rcv128 rcv256 0 0.2 0.4 0.6 0.8 1 1.2 10 0 10 1 10 2 10 3 10 4 semantic space Figure 2: Approximate search. The y-axis is on a logarithmic scale and is the speedup over brute force search. The x axis is a linear scale and is the average percentage of the points in range returned (i.e. the average recall). • Corel histograms. This data set consists of 60k color histograms of dimensionality 64 generated from the Corel image datasets. • rcv-D. Latent dirichlet allocation was applied to 500K documents from the rcv1 [16] corpus to generate topic histograms for each [6]. D is set to 8, 16, 32, . . . 256. • Semantic space. This dataset is a 371-dimensional representation of 5000 images from the Corel stock photo collection. Each image is represented as a distribution over keywords [24]. All of our experiments are for the KL-divergence. Although the KL-divergence is widely used, little is known about efficient proximity techniques for it. In contrast, the ℓ2 2 and Mahalanobis distances can be handled by metric methods, for which there is a huge literature. Application of the range search algorithm for the KL-divergence raises one technical point: Claim 1 requires that the KLball being investigated lies within the domain of the KL-divergence. It is possible that the ball will cross the domain boundary (xi = 0), though we found that this was not a significant issue. When it did occur (which can be checked by evaluating df(µ, xθ) for large θ), we simply did not perform inclusion pruning for that node. There are two regimes where range search is particularly useful: when the radius γ is very small and when it is large. When γ is small, range search is useful in instance-based learning algorithms like locally weighted regression, which need to retrieve points close to each test point. It is also useful for generating neighborhood graphs. When γ is large enough that Bf(q, γ) will contain most of the database, range search is potentially useful for applications like distance-based outlier detection and anomaly detection. We provide experiments for both of these regimes. Table 1 shows the results for exact range search. For the small radius experiments, γ was chosen so that about 20 points would be inside the query ball (on average). On the pubmed datasets, we are getting one to two orders of magnitude speed-up across all dimensionalities. On the rcv datasets, the BB-tree range search algorithm is an order of magnitude faster than brute search except of the the two datasets of highest dimensionality. The algorithm provides a useful speedup on corel, but no speedup on semantic space. We note that the semantic space dataset is both high-dimensional (371 dimensions) and quite small (5k), which makes it very hard for proximity search. The algorithm reflects the widely observed phenomenon that the performance of spatial decomposition data structures degrades with dimensionality, but still provides a useful speedup on several moderatedimensional datasets. 7 Table 1: Exact range search. speedup dataset dimensionality small radius large radius corel 64 2.53 3.4 pubmed4 4 371.6 5.1 pubmed8 8 102.7 9.7 pubmed16 16 37.3 12.8 pubmed32 32 18.6 47.1 pubmed64 64 13.26 21.6 pubmed128 128 15.0 120.4 pubmed256 256 18.9 39.0 rcv8 8 48.1 8.9 rcv16 16 23.0 21.9 rcv32 32 16.4 16.4 rcv64 64 11.4 9.6 rcv128 128 6.1 3.1 rcv256 256 1.1 1.9 semantic space 371 .7 1.0 For the large radius experiments, γ was chosen so that all but about 100-300 points would be in range. The results here are more varied than for small γ, but we are still getting useful speedups across most of the datasets. Interestingly, the amount of speedup seems less dependent of the dimensionality in comparison to the small γ experiments. Finally, we investigate approximate search, which we consider the most likely use of this algorithm. There are many ways to use the BB-tree in an approximate way. Here, we follow [18] and simply cut-off the search process early. We are thus guaranteed to get only points within the specified range (perfect precision), but we may not get all of them (less than perfect recall). In instance-based learning algorithms, this loss of recall is often tolerable as long as a reasonable number of points are returned. Thus a practical way to deploy the range search algorithm is to run it until enough points are recovered. In this experiment, γ was set so that about 50 points would be returned. Figure 2 shows the results. These are likely the most relevant results to practical applications. They demonstrate that the proposed algorithm provides a speedup of up to four orders of magnitude with a high recall. 6 Conclusion We presented the first algorithm for efficient ball range search when the notion of dissimilarity is an arbitrary Bregman divergence. This is an important step towards generalizing the efficient proximity algorithms from ℓ2 (and metrics) to the family of Bregman divergences, but there is plenty more to do. First, it would be interesting to see if the dual-tree approach promoted in [11, 12] and elsewhere can be used with BB-trees. This generalization appears to require more complex bounding techniques than those discussed here. A different research goal is to develop efficient algorithms for proximity search that have rigorous guarantees on run-time; theoretical questions about proximity search with Bregman divergences remain largely open. Finally, the work in this paper provides a foundation for developing efficient statistical algorithms using Bregman divergences; fleshing out the details for a particular application is an interesting direction for future research. References [1] Marcel Ackermann and Johannes Bl¨omer. Coresets and approximate clustering for bregman divergences. In Proceedings of the Symposium on Discrete Algorithms (SODA), 2009. [2] Pankaj K. Agarwal and Jeff Erickson. Geometric range searching and its relatives. In Advances in Discrete and Computational Geometry, pages 1–56. American Mathematical Society, 1999. [3] Katy Azoury and Manfred Warmuth. Relative loss bounds for on-line density estimation with the exponential family of distributions. Machine Learning, 43(3):211–246, 2001. 8 [4] Arindam Banerjee, Srujana Merugu, Inderjit S. Dhillon, and Joydeep Ghosh. Clustering with bregman divergences. Journal of Machine Learning Research, Oct 2005. [5] David Blei and John Lafferty. A correlated topic model of Science. Annals of Applied Statistics, 1(1):17–35, 2007. [6] David Blei, Andrew Ng, and Michael Jordan. Latent dirichlet allocation. Journal of Machine Learning Research, 2003. [7] L.M. Bregman. The relaxation method of finding the common point of convex sets and its application to the solution of problems in convex programming. USSR Computational Mathematics and Mathematical Physics, 7(3):200–217, 1967. [8] Lawrence Cayton. Fast nearest neighbor retrieval for bregman divergences. In Proceedings of the International Conference on Machine Learning, 2008. [9] Lawrence Cayton. Bregman Proximity Search. PhD thesis, University of California, San Diego, 2009. [10] Mayur Datar, Nicole Immorlica, Piotr Indyk, and Vahab S. Mirrokni. Locality-sensitive hashing scheme based on p-stable distributions. In Symposium on Computational Geometry, 2004. [11] Alexander Gray and Andrew Moore. ‘N-body’ problems in statistical learning. In Advances in Neural Information Processing Systems, 2000. [12] Alexander Gray and Andrew Moore. Nonparametric density estimation: Toward computational tractability. In SIAM International Conference on Data Mining, 2003. [13] Sudipto Guha, Piotr Indyk, and Andrew McGregor. Sketching information divergences. In Conference on Learning Theory, 2007. [14] Michael P. Holmes, Alexander Gray, and Charles Lee Isbell. QUIC-SVD: Fast SVD using cosine trees. In Advances in Neural Information Processing Systems 21, 2008. [15] Dongryeol Lee and Alexander Gray. Fast high-dimensional kernel summations using the monte carlo multipole method. In Advances in Neural Information Processing Systems 21, 2008. [16] D. D. Lewis, Y. Yang, T. Rose, and F. Li. RCV1: A new benchmark collection for text categorization research. Journal of Machine Learning Research, 2004. [17] Ting Liu, Andrew Moore, and Alexander Gray. New algorithms for efficient high-dimensional nonparametric classification. Journal of Machine Learning Research, 2006. [18] Ting Liu, Andrew Moore, Alexander Gray, and Ke Yang. An investigation of practical approximate neighbor algorithms. In Advances in Neural Information Processing Systems, 2004. [19] Frank Nielsen, Jean-Daniel Boissonnat, and Richard Nock. On bregman voronoi diagrams. In Symposium on Discrete Algorithms, pages 746–755, 2007. [20] Frank Nielsen, Paolo Piro, and Michel Barlaud. Bregman vantage point trees for efficient nearest neighbor queries. In IEEE International Conference on Multimedia & Expo, 2009. [21] Frank Nielsen, Paolo Piro, and Michel Barlaud. Tailored bregman ball trees for effective nearest neighbors. In European Workshop on Computational Geometry, 2009. [22] Fernando Pereira, Naftali Tishby, and Lillian Lee. Distributional clustering of English words. In 31st Annual Meeting of the ACL, pages 183–190, 1993. [23] Jan Puzicha, Joachim Buhmann, Yossi Rubner, and Carlo Tomasi. Empirical evaluation of dissimilarity measures for color and texture. In Proceedings of the Internation Conference on Computer Vision (ICCV), 1999. [24] N. Rasiwasia, P. Moreno, and N. Vasconcelos. Bridging the gap: query by semantic example. IEEE Transactions on Multimedia, 2007. [25] Yirong Shen, Andrew Ng, and Matthias Seeger. Fast gaussian process regression using kdtrees. In Advances in Neural Information Processing Systems, 2006. [26] Zhenjie Zhang, Beng Chin Ooi, Srinivasan Parthasarathy, and Anthony Tung. Similarity search on bregman divergence: towards non-metric indexing. In International Conference on Very Large Databases (VLDB), 2009. 9
2009
261
3,772
Complexity of Decentralized Control: Special Cases Martin Allen Department of Computer Science Connecticut College New London, CT 06320 martin.allen@conncoll.edu Shlomo Zilberstein Department of Computer Science University of Massachusetts Amherst, MA 01003 shlomo@cs.umass.edu Abstract The worst-case complexity of general decentralized POMDPs, which are equivalent to partially observable stochastic games (POSGs) is very high, both for the cooperative and competitive cases. Some reductions in complexity have been achieved by exploiting independence relations in some models. We show that these results are somewhat limited: when these independence assumptions are relaxed in very small ways, complexity returns to that of the general case. 1 Introduction Decentralized and partially observable stochastic decision and planning problems are very common, comprising anything from strategic games of chance to robotic space exploration. In such domains, multiple agents act under uncertainty about both their environment and the plans and actions of others. These problems can be represented as decentralized partially observable Markov decision processes (Dec-POMDPs), or the equivalent, partially observable stochastic games (POSGs), allowing for precise formulation of solution concepts and success criteria. Alas, such problems are highly complex. As shown by Bernstein et al. [1, 2], the full, cooperative problem—where all players share the same payoff, and strategies can depend upon entire observed histories—is NEXP-complete. More recently, Goldsmith and Mundhenk [3] showed that the competitive case can be worse: when teamwork is allowed among agents, complexity rises to NEXPNP (problems solvable by a NEXP machine employing an NP set as an oracle). Much attention has thus been paid to restricted cases, particularly those where some parts of the system dynamics behave independently. The complexity of finite-horizon Dec-POMDPs goes down—from NEXP to NP—when agents interact only via a joint reward structure, and are otherwise independent. Unfortunately, our new results show that further reduction, based on other combinations of fully or partially independent system dynamics are unlikely, if not impossible. We show that if the situation were reversed, so that rewards alone are independent, the problem remains NEXP-complete. Further, we consider two other Dec-POMDP sub-classes from the literature: (a) domains where local agent sub-problems are independent except for a (relatively small) number of event-based interactions, and (b) those where agents only interact influencing the set of currently available actions. As it turns out, both types of problem are NEXP-complete as well—facts previously unknown. (In the latter case, this is a substantial increase in the known upper bound.) These results provide further impetus to devise new tools for the analysis and classification of problem difficulty in decentralized problem solving. 2 Basic definitions The cooperative, decentralized partially observable Markov decision process (Dec-POMDP) is a highly general and powerful framework, capable of representing a wide range of real-world problem 1 domains. It extends the basic POMDP to multiple agents, operating in conjunction based on locally observed information about the world, and collecting a single source of reward. Definition 1 (Dec-POMDP). A (Dec-POMDP), D, is specified by a tuple: M = ⟨{αi}, S, {Ai}, P, {Ωi}, O, R, T⟩ (1) with individual components as follows: • Each αi is an agent; S is a finite set of world states with a distinguished initial state s0; Ai is a finite set of actions, ai, available to αi; Ωi is a finite set of observations, oi, for αi; and T is the (finite or infinite) time-horizon of the problem. • P is the Markovian state-action transition function. P(s, a1, . . . , an, s′) is the probability of going from state s to state s′, given joint action ⟨a1, . . . , an⟩. • O is the joint observation function for the set of agents, given each state-action transition. O(a1, . . . , an, s′, o1, . . . , on) is the probability of observing ⟨o1, . . . , on⟩, if joint action ⟨a1, . . . , an⟩causes a transition to global state s′. • R is the global reward function. R(s, a1, . . . , an) is the reward obtained for performing joint action ⟨a1, . . . , an⟩when in global state s. The most important sub-instance of the Dec-POMDP model is the decentralized MDP (Dec-MDP), where the joint observation tells us everything we need to know about the system state. Definition 2 (Dec-MDP). A decentralized Markov decision process (Dec-MDP) is a Dec-POMDP that is jointly fully observable. That is, there exists a functional mapping, J : Ω1 × · · · × Ωn →S, such that O(a1, . . . , an, s′, o1, . . . , on) ̸= 0 if and only if J(o1, . . . , on) = s′. In a Dec-MDP, then, the sum total of the individual agent observations provides a complete picture of the state of the environment. It is important to note, however, that this does not mean that any individual agent actually possesses this information. Dec-MDPs are still fully decentralized in general, and individual agents cannot count on access to the global state when choosing actions. Definition 3 (Policies). A local policy for an agent αi is a mapping from sequences of that agent’s observations, oi = ⟨o1 i , . . . , ok i ⟩, to its actions, πi : Ω⋆ i →Ai. A joint policy for n agents is a collection of local policies, one per agent, π = ⟨π1, . . . , πn⟩. A solution method for a decentralized problem seeks to find some joint policy that maximizes expected value given the starting state (or distribution over states) of the problem. For complexity purposes, the decision version of the Dec-(PO)MDP problem is to determine whether there exists some joint policy with value greater at least k. 3 Bernstein’s proof of NEXP-completeness Before establishing our new claims, we briefly review the NEXP-completeness result for finitehorizon Dec-MDPs, as given by Bernstein et al. [1, 2]. First, we note that the upper bound, namely that finite-horizon Dec-POMDPs are in NEXP, will immediately establish the same upper bound for all the problems that we will consider. (While we do not discuss the proof here, full details can be found in the original, or the supplemental materials to this paper, §1.) Theorem 1 (Upper Bound). The finite-horizon, n-agent decision problem Dec-POMDP ∈NEXP. More challenging (and interesting) is establishing lower bounds on these problems, which is performed via our reduction from the known NEXP-complete TILING problem [4, 5]. A TILING problem instance consists of a board size n, given concisely in log n binary bits, a set of tiletypes L = {t0, . . . , tk}, and a collection of binary and vertical compatibility relations between tiles H, V ⊆L × L. A tiling is a mapping of board locations to tile-types, t : {0, . . . , n −1} × {0, . . . , n −1} →L; such a tiling is consistent just in case (i) the origin location of the board receives tile-type 0 (t(0, 0) = tile0); and (ii) all adjoint tile assignments are compatible: (∀x, y) ⟨t(x, y), t(x + 1, y)⟩∈H & ⟨t(x, y), t(x, y + 1)⟩∈V. The TILING problem is thus to decide, for a given instance, whether such a consistent tiling exists. Figure 1 shows an example instance and consistent solution. 2 n = 5 L = H = V = 0 1 2 0 1 0 2 0 1 1 1 1 2 2 0 0 1 0 2 1 0 1 2 2 0 0 1 0 1 2 0 0 1 0 2 0 1 2 0 2 0 0 2 0 2 1 2 0 1 0 A consistent solution Figure 1: An example of the TILING problem, and a consistent solution. The reduction transforms a given instance of TILING into a 2-agent Dec-MDP, where each agent is queried about some location in the grid, and must answer with a tile to be placed there. By careful design of the query and response mechanism, it is ensured that a policy with non-negative value exists only if the agents already have a consistent tiling, thus showing the Dec-MDP to be as hard as TILING. Together with Theorem 1, and the fact that the finite-horizon, 2-agent Dec-MDP is a special case of the general finite-horizon Dec-POMDP, the reduction establishes Bernstein’s main complexity result (again, details are in the supplemental materials, §1): Theorem 2 (NEXP-Completeness). The finite-horizon Dec-POMDP problem is NEXP-complete. 4 Factored Dec-POMDPs and independence In general, the state transitions, observations, and rewards in a Dec-POMDP can involve probabilistic dependencies between agents. An obvious restricted subcase is thus one in which these factors are somehow independent. Becker et al. [6, 7] have thus studied problems in which the global statespace consists of the product of local states, so that each agent has its own individual state-space. A Dec-POMDP can then be transition independent, observation independent, or reward independent, as each the local effects given by each corresponding function are independent of one another. Definition 4 (Factored Dec-POMDP). A factored, n-agent Dec-POMDP is a Dec-POMDP such that the system state can be factored into n+1 distinct components, so that S = S0 ×S1 ×· · ·×Sn, and no state-variable appears in any Si, Sj, i ̸= j. As with the local (agent-specific) actions, ai, and observations, oi, in the general Dec-POMDP definition, we now refer to the local state, ˆs ∈Si × S0, namely that portion of the overall statespace that is either specific to agent αi (si ∈Si), or shared among all agents (so ∈S0). We use the notation s−i for the sequence of all state-components except that for agent αi: s−i = (s0, s1, . . . , si−1, si+1, . . . , sn) (and similarly for action- or observation-sequences, a−i and o−i). Definition 5 (Transition Independence). A factored, n-agent DEC-POMDP is transition independent iff the state-transition function can be separated into n + 1 distinct transition functions P0, . . . , Pn, where, for any next state s′ i ∈Si, P(s′ i | (s0, . . . , sn), (a1, . . . , an), s−i) = P0(s′ 0 | s0) if i = 0; Pi(s′ i | ˆsi, ai, s′ 0) else. In other words, the next local state of each agent is independent of the local states of all others, given its previous local state and local action, and the external system features (S0). Definition 6 (Observation Independence). A factored, n-agent Dec-POMDP is observation independent iff the joint observation function can be separated into n separate probability functions O1, . . . , On, where, for any local observation oi ∈Ωi, O(oi | (a1, . . . , an), (s′ 0, . . . , s′ n), o−i) = Oi(oi | ai, ˆs′ i) In such cases, the probability of an agent’s individual observations is a function of their own local states and actions alone, independent of the states of others, and of what those others do or observe. 3 Definition 7 (Reward Independence). A factored, n-agent Dec-POMDP is reward independent iff the joint reward function can be represented by local reward functions R1, . . . , Rn, such that: R((s0, . . . sn), (a0, . . . , an)) = f(R1(ˆs1, a1), . . . , Rn(ˆsn, an)) and Ri(ˆsi, ai) ≥Ri(ˆsi, a′ i) ⇔f(R1, . . . ,Ri(ˆsi, ai), . . . , Rn) ≥f(R1, . . . , Ri(ˆsi, a′ i), . . . , Rn) That is, joint reward is a function of local reward, constrained so that we maximize global reward if and only if we maximize local rewards. A typical example is the additive sum: R((s0, . . . sn), (a0, . . . , an)) = R1(ˆs1, a1) + · · · + Rn(ˆsn, an). It is important to note that each definition applies equally to Dec-MDPs; in such cases, joint full observability of the overall state is often accompanied by full observability at the local level. Definition 8 (Local Full Observability). A factored, n-agent Dec-MDP is locally fully observable iff an agent’s local observation uniquely determines its local state: ∀oi ∈Ωi, ∃ˆsi : P(ˆsi | oi) = 1. Local full observability is not equivalent to independence of observations. In particular, a problem may be locally fully observable without being observation independent (since agents may simply observe outcomes of non-independent joint actions). On the other hand, it is easy to show that an observation-independent Dec-MDP must be locally fully observable (supplementary, §2). 4.1 Shared rewards alone lead to reduced complexity It is easy to see that if a Dec-MDP (or Dec-POMDP) has all three forms of independence given by Definitions 5–7, it can be decomposed into n separate problems, where each agent αi works solely within the local sub-environment Si × S0. Such single-agent problems are known to be Pcomplete, and can generally be solved efficiently to high degrees of optimality. More interesting results follow when only some forms of independence hold. In particular, it has been shown that Dec-MDPs with both transition- and observation-independence, but not reward-independence, are NP-complete [8, 7]. (This result is discussed in detail in our supplementary material, §3.) Theorem 3. A transition- and observation-independent Dec-MDP with joint reward is NP-complete. 5 Other subclasses of interactions As our new results will now show, there is a limit to this sort of complexity reduction: other relatively obvious combinations of independence relationships do not bear the same fruit. That is, we show the NP-completeness result to be specific to fully transition- and observation-independent problems. When these properties are not fully present, worst-case complexity is once again NEXP. 5.1 Reward-independent-only models are NEXP-complete We begin with a result that is rather simple, but has not, to the best of our knowledge, been established before. We consider the inverse of the NP-complete problem of Theorem 3: a Dec-MDP with reward-independence (Df. 7), but without transition- or observation-independence (Dfs. 5, 6). Theorem 4. Factored, reward-independent Dec-MDPs with n agents are NEXP-complete. Proof Sketch. For the upper bound, we simply cite Theorem 1, immediately establishing that such problems are in NEXP. For the lower bound, we simply modify the TILING Dec-MDP from Bernstein’s reduction proof so as to ensure that the reward-function factors appropriately into strictly local rewards. (Full details are found in [9], and the supplementary materials, §4.1.) Thus we see that in some respects, transition and observation independence are fundamental to the reduction of worst-case complexity from NEXP to NP. When only the rewards depend upon the actions of both agents, the problems become easier; however, when the situation is reversed, 4 the general problem remains NEXP-hard. This is not entirely surprising: much of the complexity of planning in decentralized domains stems from the necessity to take account of how one’s actionoutcomes are affected by the actions of others, and from the complications that ensue when observed information about the system is tied to those actions as well. The structure of rewards, while obviously key to the nature of the optimal (or otherwise) solution, is not as vital—even if agents can separate their individual reward-functions, making them entirely independent, other dependencies can still make the problem extremely complex. We therefore turn to two other interesting special-case Dec-MDP frameworks, in which independent reward functions are accompanied by restricted degrees of transition- and observation-based interaction. While some empirical evidence has suggested that these problems may be easier on average to solve, nothing has previously been shown about their worst-case complexity. We fill in these gaps, showing that even under such restricted dynamics, the problems remain NEXP-hard. 5.2 Event-driven-interaction models are NEXP-complete The first model we consider is one of Becker et al. [10], which generalizes the notion of a fully transition-independent Dec-MDP. In this model, a set of primitive events, consisting of state-action transitions, is defined for each agent. Such events can be thought of as occasions upon which that agent takes the given action to generate the associated state transition. Dependencies are then introduced in the form of relationships between one agent’s possible actions in given states and another agent’s primitive events. While no precise worst-case complexity results have been previously proven, the authors do point out that the class of problems has an upper-bound deterministic complexity that is exponential in the size of the state space, |S|, and doubly exponential in the number of defined interactions. This potentially bad news is mitigated by noting that if the number of interactions is small, then reasonably-sized problems can still be solved. Here, we examine this issue in detail, showing that, in fact these problems are NEXP-hard (indeed, NEXP-complete); however, when the number of dependencies is a log-factor of the size of the problem state-space, worst-case NP-hardness is achieved. We begin with the formal framework of the model. Again, we give all definitions in terms of DecPOMDPs; they apply immediately to Dec-MDPs in particular. Definition 9 (History). A history for an agent αi in a factored, n-agent Dec-POMDP D is a sequence of possible local states and actions, beginning in the agent’s initial state: Φi = [ˆs0 i , a0 i , ˆs1 i , a1 i , . . .]. When a problem has a finite time-horizon T, all possible complete histories will be of the form ΦT i = [ˆs0 i , a0 i , ˆs1 i , a1 i , . . . , ˆsT −1 i , aT i , ˆsT i ]. Definition 10 (Events in a History). A primitive event e = (ˆsi, ai, ˆs′ i) for an agent αi is a triple representing a transition between two local states, given some action ai ∈Ai. An event E = {e1, e2, . . . , eh} is a set of primitive events. A primitive event e occurs in the history Φi, written Φi ⊨e, if and only if the triple e is a sub-sequence of the sequence Φi. An event E occurs in the history Φi, written Φi ⊨E, if and only if some component occurs in that history: ∃e ∈E : Φi ⊨e. Events can therefore be thought of disjunctively. That is, they specify a set of possible state-action transitions from a Dec-POMDP, local to one of its agents. If the historical sequence of state-action transitions that the agent encounters contains any one of those particular transitions, then the history satisfies the overall event. Events can thus be used, for example, to represent such things as taking a particular action in any one of a number of states over time, or taking one of several actions at some particular state. For technical reasons, namely the use of a specialized solution algorithm, these events are usually restricted in structure, as follows. Definition 11 (Proper Events). A primitive event e is proper if it occurs at most once in any given history. That is, for any history Φi if Φi = Φ1 i e Φ2 i then neither sub-history contains e: ¬(Φ1 i ⊨ e) ∧¬(Φ2 i ⊨e). An event E is proper if it consists of proper primitive events that are mutually exclusive, in that no two of them both occur in any history: ∀Φi ¬∃x, y : (x ̸= y) ∧(ex ∈E) ∧(ey ∈E) ∧(Φi ⊨ex) ∧(Φi ⊨ey). Proper primitive events can be used, for instance, to represent actions that take place at particular times (building the time into the local state ˆsi ∈e). Since any given point in time can only occur once in any history, the events involving such time-steps will be proper by default. A proper event 5 E can then be formed by collecting all the primitive events involving some single time-step, or by taking all possible primitive events involving an unrepeatable action. Our new model is then a Dec-MDP with: 1. Two (2) agents.1 2. A factored state-space: S = S0 × S1 × Sn. 3. Local full observability: each agent αi can determine its own portion of the state-space, ˆsi ∈S0 × Si, exactly. 4. Independent (additive) rewards: R(⟨s0, s1, s2⟩, a1, a2) = R1(ˆs1, a1) + R2(ˆs2, a2). Interactions between agents are given in terms of a set of dependencies between certain state-action transitions for one agent, and events featuring transitions involving the other agent. Thus, if a history contains one of the primitive events from the latter set, this can have some direct effect upon the transition-model for the first agent, introducing probabilistic transition-dependencies. Definition 12 (Dependency). A dependency is a pair dk ij = ⟨Ek i , Dk j ⟩, where Ek i is a proper event defined over primitive events for agent αi, and Dk j is a set of state-action pairs ⟨ˆsj, aj⟩for agent αj, such that each pair occurs in at most one dependency: ¬(∃k, k′, sj, aj) (k ̸= k′) & ⟨sj, aj⟩∈Dk j ∈dk ij & ⟨sj, aj⟩∈Dk′ j ∈dk′ ij. Such a dependency is thus a collection of possible actions that agent αj can take in one of its local state, each of which depends upon whether the other agent αi has made one of the state-transitions in its own set of primitive events. Such structures can be used to model, for instance, cases where one agent cannot successfully complete some task until the other agent has completed an enabling sub-task, or where the precise outcome depends upon the groundwork laid by the other agent. Definition 13 (Satisfying Dependencies). A dependency dk ij = ⟨Ek i , Dk j ⟩is satisfied when the current history for enabling agent αi contains the relevant event: Φi ⊨Ek i . For any state-action pair ⟨ˆsj, aj⟩, we define a Boolean indicator variable bˆsjaj, which is true if and only if some dependency that contains the pair is satisfied: bˆsjaj = 1 if (∃dk ij = ⟨Ek i , Dk j ⟩) ⟨ˆsj, aj⟩∈Dk j & Φi ⊨Ek i , 0 otherwise. The existence of dependencies allows us to factor the overall state-transition function into two parts, each of which depends only on an agent’s local state, action, and relevant indicator variable. Definition 14 (Local Transition Function). The transition function for our Dec-MDP is factored into two functions, P1 and P2, each defining the distribution over next possible local states: Pi(ˆs′ i | ˆsi, ai, bˆsiai). We can thus write Pi(ˆsi, ai, bˆsiai, ˆs′ i) for this transition probability. When agents take some action in a state for which dependencies exist, they observe whether or not the related events have occurred; that is, after taking any action aj in state sj, they can observe the state of indicator variable bˆsjaj. With these definitions in place, we can now show that the worst-case complexity of the event-based problems is the same as the general Dec-POMDP class. Theorem 5. Factored, finite-horizon, n-agent Dec-MDPs with local full observability, independent rewards, and event-driven interactions are NEXP-complete. Proof Sketch. Again, the upper bound is immediate from Theorem 1, since the event-based structure is just a specific case of general reward-dependence, and such models can always be converted into Dec-MDPs without any events. For the lower bound, we again provide a reduction from TILING, constrained to our special case. Local reward independence, which was not present in the original problem, is ensured by using event dependencies to affect future rewards of the other agent. Thus, local immediate rewards remain dependent only upon the actions of the individual agent, but the state in which that agent finds itself (and so the options available to its reward function) can depend upon events involving the other agent. (See [9] and supplemental materials, §4.2.) 1The model can be extended to n agents with little real difficulty. Since we will show that the 2-agent case is NEXP-hard, however, this will suffice for the general claim. 6 5.2.1 A special, NP-hard case The prior result requires allowing the number of dependencies in the problem to grow as a factor of log n, for a TILING grid of size (n×n). Since the size of the state-space S in the reduced Dec-MDP is also O(log n), the number of dependencies is O(|S|). Thus, the NEXP-completeness result holds for any event-based Dec-MDP where the number of dependencies is linear in the state-space. When we are able to restrict the number of dependencies further, however, we can do better. Theorem 6. A factored, finite-horizon, n-agent Dec-MDP with local full observability, independent rewards, and event-driven interactions are solvable in nondeterministic polynomial time (NP) if the number of dependencies is O(log |S|), where S is the state-set of the problem. Proof Sketch. As shown by Becker [10], we can use the Coverage Set algorithm to generate an optimal policy for a problem of this type, in time that is exponential in the number of dependencies. Clearly, if this number is logarithmic in the size of the state-set, then solution time is polynomial in the problem size. (See [9] and supplemental materials, §4.2.1.) 5.2.2 Discussion of the results These results are interesting for two reasons. First, NEXP-completeness of the event-based case, even with independent rewards and local full observability (Theorem 5), means that many interesting problems are potentially intractable. Becker et al. [10] show how to use event-dependencies to represent common structures in the TAEMS task modeling language, used in many real-world domains [11, 12, 13]; our complexity analysis thus extends to such practical problems. Second, isolating where complexity is lower can help determine what task structures and agent interrelationships lead to intractability. In domains where the dependency structure can be kept relatively simple, it may be possible to derive optimal solutions feasibly. Both subjects are worth further study. 5.3 State-dependent-action models are NEXP-complete Guo and Lesser [14, 15, 16] consider another specialized Dec-MDP subclass, with apparently even more restricted types of interaction. Agent state-spaces are again separate, and all action-transitions and rewards are independent. Such problems are not wholly decoupled, however, as the actions available to each agent at any point depend upon the global system state. Thus, agents interact by making choices that restrict or broaden the range of actions available to others. Definition 15 (Dec-MDP with State-Dependent Actions). An n-agent Dec-MDP with statedependent actions is a tuple D = ⟨S0, {Si}, {Ai}, {Bi}, {Pi}, {Ri}, T⟩, where: • S0 is a set of shared states, and Si is the state-space of agent si, with global state space S = S0 × S1 × · · · × Sn, and initial state s0 ∈S; each Ai is the action-set for αi; T ∈N is the finite time-horizon of the problem. • Each Bi : S →2Ai is a mapping from global states of the system to some set of available actions for each agent αi. For all s ∈S, Bi(s) ̸= ∅. • Pi : (S0 × Si) × Ai(S0 × Si) is the state-transition function over local states for αi. The global transition function is simply the product of individual Pi. • Ri : (S0 × Si) →ℜis a local reward function for agent αi. We let the global reward function be the sum of local rewards. Note that there need be no observations in such a problem; given local full observability, each agent observes only its local states. Furthermore, it is presumed that each agent can observe its own available actions in any state; a local policy is thus a mapping from local states to available actions. For such cases, Guo presents a planning algorithm based on heuristic action-set pruning, along with a learning algorithm. While empirical results show that these methods are capable of solving potentially large instances, we again know very little about the analytical worst-case difficulty of problems with state-dependent actions. An NP-hardness lower bound is given [14] for the overall class, by reducing a normal-form game to the state-dependent model, but this is potentially quite weak, since no upper bound has been established, and even the operative algorithmic complexity of the given solution method is not well understood. We address this situation, showing that the problem is also just as hard as the general case. 7 Theorem 7. Factored, finite-horizon, n-agent Dec-MDPs with local full observability, independent rewards, and state-dependent action-sets are NEXP-complete. Proof Sketch. Once more, we rely upon the general upper bound on the complexity of Dec-POMDPs (Theorem 1). The lower bound is by another TILING reduction. Again, we “record” actions of each agent in the state-space of the other, ensuring purely local rewards and local full observability. This time, however, we use the fact that action-sets depend upon the global state (rather than events) to enforce the desired dynamics. That is, we add special state-dependent actions that, based on their availability (or lack thereof), affect each agent’s local reward. (See [9], and supplemental §4.3.) 5.3.1 Discussion of the result Guo and Lesser [16, 14] were able to show that deciding whether a decentralized problem with state-based actions had an equilibrium solution with value greater than k was NP-hard. It was not ascertained whether or not this lower bound was tight, however; this remained a significant open question. Our results show that this bound was indeed too low. Since an optimal joint policy will be an equilibrium for the special case of additive rewards, the general problem can be no easier. This is interesting, for reasons beyond the formal. Such decentralized problems indeed appear to be quite simple in structure, requiring wholly independent rewards and action-transitions, so that agents can only interact with one another via choices that affect which actions are available. (A typical example involves two persons acting completely regardless of one another, except for the existence of a single rowboat, used for crossing a stream; if either agent uses the rowboat to get to the other side, then that action is no longer available to the other.) Such problems are intuitive, and common, and not all of them are hard to solve, obviously. At the same time, however, our results show that the same structures can be intractable in the worst case, establishing that even seemingly simple interactions between agents can lead to prohibitively high complexity in decentralized problems. 6 Conclusions This work addresses a number of existing models for decentralized problem-solving. In each case, the models restrict agent interaction in some way, in order to produce a special sub-case of the general Dec-POMDP problem. It has been known for some time that systems where agents act entirely independently, but share rewards, have reduced worst-case complexity. We have shown that this does not apply to other variants, where we relax the independence requirements even only a little. In all of the cases addressed, the new problem variants are as hard as the general case. This fact, combined with results showing many other decentralized problem models to be equivalent to the general Dec-POMDP model, or strictly harder [17], reveals the essential difficulty of optimal planning in decentralized settings. Together, these results begin to suggest that optimal solutions to many common multiagent problems must remain out of reach; in turn, this indicates that we must look to approximate or heuristic methods, since such problems are so prevalent in practice. At the same time, it must be stressed that the NEXP-complexity demonstrated here is a worst-case measure. Not all decentralized domains are going to be intractable, and indeed the event-based and action-set models have been shown to yield to specialized solution methods in many cases, enabling us to solve interesting instances in reasonable amounts of time. When the number of actiondependencies is small, or there are few ways that agents can affect available action-sets, it may well be possible to provide optimal solutions effectively. That is, the high worst-case complexity is no guarantee that average-case difficulty is likewise high. This remains a vital open problem in the field. While establishing the average case is often difficult, if not impossible—given that the notion of an “average” planning or decision problem is often ill-defined—it is still worth serious consideration. Acknowledgments This material is based upon work supported by the the Air Force Office of Scientific Research under Award No. FA9550-05-1-0254. Any opinions, findings, and conclusions or recommendations expressed in this publication are those of the authors and do not necessarily reflect the views of AFOSR. The first author also acknowledges the support of the Andrew W. Mellon Foundation CTW Computer Science Consortium Fellowship. 8 References [1] Daniel S. Bernstein, Shlomo Zilberstein, and Neil Immerman. The complexity of decentralized control of Markov decision processes. In Proceedings of the Sixteenth Conference on Uncertainty in Artificial Intelligence, pages 32–37, Stanford, California, 2000. [2] Daniel S. Bernstein, Robert Givan, Neil Immerman, and Shlomo Zilberstein. The complexity of decentralized control of Markov decision processes. Mathematics of Operations Research, 27(4):819–840, 2002. [3] Judy Goldsmith and Martin Mundhenk. Competition adds complexity. In J.C. Platt, D. Koller, Y. Singer, and S. Roweis, editors, Advances in Neural Information Processing Systems 20, pages 561–568. MIT Press, Cambridge, MA, 2008. [4] Harry R. Lewis. Complexity of solvable cases of the decision problem for predicate calculus. In Proceedings of the Nineteenth Symposium on the Foundations of Computer Science, pages 35–47, Ann Arbor, Michigan, 1978. [5] Christos H. Papadimitriou. Computational Complexity. Addison-Wesley, Reading, Massachusetts, 1994. [6] Raphen Becker, Shlomo Zilberstein, Victor Lesser, and Claudia V. Goldman. Transitionindependent decentralized Markov decision processes. In Proceedings of the Second International Joint Conference on Autonomous Agents and Multi-Agent Systems, pages 41–48, Melbourne, Australia, 2003. [7] Raphen Becker, Shlomo Zilberstein, Victor Lesser, and Claudia V. Goldman. Solving transition independent decentralized MDPs. Journal of Artificial Intelligence Research, 22:423–455, November 2004. [8] Claudia V. Goldman and Shlomo Zilberstein. Decentralized control of cooperative systems: Categorization and complexity analysis. Journal of Artificial Intelligence Research, 22:143– 174, 2004. [9] Martin Allen. Agent Interactions in Decentralized Environments. PhD thesis, University of Massachusetts, Amherst, Massachusetts, 2009. Available at http://scholarworks. umass.edu/open_access_dissertations/1/. [10] Raphen Becker, Victor Lesser, and Shlomo Zilberstein. Decentralized Markov decision processes with event-driven interactions. In Proceedings of the Third International Joint Conference on Autonomous Agents and Multi-Agent Systems, pages 302–309, New York, New York, 2004. [11] Keith S. Decker and Victor R. Lesser. Quantitative modeling of complex environments. International Journal of Intelligent Systems in Accounting, Finance and Management, 2:215–234, 1993. [12] V. Lesser, K. Decker, T.Wagner, N. Carver, A. Garvey, B. Horling, D. Neiman, R. Podorozhny, M. Nagendra Prasad, A. Raja, R. Vincent, P. Xuan, and X.Q Zhang. Evolution of the GPGP/TAEMS domain-independent coordination framework. Autonomous Agents and MultiAgent Systems, 9(1):87–143, 2004. [13] Tom Wagner, Valerie Guralnik, and John Phelps. TAEMS agents: Enabling dynamic distributed supply chain management. Journal of Electronic Commerce Research and Applications, 2:114–132, 2003. [14] AnYuan Guo. Planning and Learning for Weakly-Coupled Distributed Agents. PhD thesis, University of Massachusetts, Amherst, 2006. [15] AnYuan Guo and Victor Lesser. Planning for weakly-coupled partially observable stochastic games. In Proceedings of the 19th International Joint Conference on Artificial Intelligence, pages 1715–1716, Edinburgh, Scotland, 2005. [16] AnYuan Guo and Lesser Victor. Stochastic planning for weakly-coupled distributed agents. In Proceedings of the Fifth Joint Conference on Autonomous Agents and Multiagent Systems, pages 326–328, Hakodate, Japan, 2006. [17] Sven Seuken and Shlomo Zilberstein. Formal models and algorithms for decentralized decision making under uncertainty. Autonomous Agents and Multi-Agent Systems, 17(2):190–250, 2008. 9
2009
262
3,773
Learning Label Embeddings for Nearest-Neighbor Multi-class Classification with an Application to Speech Recognition Natasha Singh-Miller Massachusetts Institute of Technology Cambridge, MA natashas@mit.edu Michael Collins Massachusetts Institute of Technology Cambridge, MA mcollins@csail.mit.edu Abstract We consider the problem of using nearest neighbor methods to provide a conditional probability estimate, P(y|a), when the number of labels y is large and the labels share some underlying structure. We propose a method for learning label embeddings (similar to error-correcting output codes (ECOCs)) to model the similarity between labels within a nearest neighbor framework. The learned ECOCs and nearest neighbor information are used to provide conditional probability estimates. We apply these estimates to the problem of acoustic modeling for speech recognition. We demonstrate significant improvements in terms of word error rate (WER) on a lecture recognition task over a state-of-the-art baseline GMM model. 1 Introduction Recent work has focused on the learning of similarity metrics within the context of nearest-neighbor (NN) classification [7, 8, 12, 15]. These approaches learn an embedding (for example a linear projection) of input points, and give significant improvements in the performance of NN classifiers. In this paper we focus on the application of NN methods to multi-class problems, where the number of possible labels is large, and where there is significant structure within the space of possible labels. We describe an approach that induces prototype vectors My ∈ℜL (similar to error-correcting output codes (ECOCs)) for each label y, from a set of training examples {(ai, yi)} for i = 1 . . . N. The prototype vectors are embedded within a NN model that estimates P(y|a); the vectors are learned using a leave-one-out estimate of conditional log-likelihood (CLL) derived from the training examples. The end result is a method that embeds labels y into ℜL in a way that significantly improves conditional log-likelihood estimates for multi-class problems under a NN classifier. The application we focus on is acoustic modeling for speech recognition, where each input a ∈ℜD is a vector of measured acoustic features, and each label y ∈Y is an acoustic-phonetic label. As is common in speech recognition applications, the size of the label space Y is large (in our experiments we have 1871 possible labels), and there is significant structure within the labels: many acoustic-phonetic labels are highly correlated or confusable, and many share underlying phonological features. We describe experiments measuring both conditional log-likelihood of test data, and word error rates when the method is incorporated within a full speech recogniser. In both settings the experiments show significant improvements for the ECOC method over both baseline NN methods (e.g., the method of [8]), as well as Gaussian mixture models (GMMs), as conventionally used in speech recognition systems. While our experiments are on speech recognition, the method should be relevant to other domains which involve large multi-class problems with structured labels—for example problems in natural language processing, or in computer vision (e.g., see [14] for a recent use of neighborhood com1 ponents analysis (NCA) [8] within an object-recognition task with a very large number of object labels). We note also that the approach is relatively efficient: our model is trained on around 11 million training examples. 2 Related Work Several pieces of recent work have considered the learning of feature space embeddings with the goal of optimizing the performance of nearest-neighbor classifiers [7, 8, 12, 15]. We make use of the formalism of [8] as the starting point in our work. The central contrast between our work and this previous work is that we learn an embedding of the labels in a multi-class problem; as we will see, this gives significant improvements in performance when nearest-neighbor methods are applied to multi-class problems arising in the context of speech recognition. Our work is related to previous work on error-correcting output codes for multi-class problems. [1, 2, 4, 9] describe error-correcting output codes; more recently [2, 3, 11] have described algorithms for learning ECOCs. Our work differs from previous work in that ECOC codes are learned within a nearest-neighbor framework. Also, we learn the ECOC codes in order to model the underlying structure of the label space and not specifically to combine the results of multiple classifiers. 3 Background The goal of our work is to derive a model that estimates P(y|a) where a ∈ℜD is a feature vector representing some input, and y is a label drawn from a set of possible labels Y. The parameters of our model are estimated using training examples {(a1, y1), ..., (aN, yN)}. In general the training criterion will be closely related to the conditional log-likelihood of the training points: N X i=1 log P(yi|ai) We choose to optimize the log-likelihood rather than simple classification error, because these estimates will be applied within a larger system, in our case a speech recognizer, where the probabilities will be propagated throughout the recognition model; hence it is important for the model to provide well-calibrated probability estimates. For the speech recognition application considered in this paper, Y consists of 1871 acoustic-phonetic classes that may be highly correlated with one another. Leveraging structure in the label space will be crucial to providing good estimates of P(y|a); we would like to learn the inherent structure of the label space automatically. Note in addition that efficiency is important within the speech recognition application: in our experiments we make use of around 11 million training samples, while the dimensionality of the data is D = 50. In particular, we will develop nearest-neighbor methods that give an efficient estimate of P(y|a). As a first baseline approach—and as a starting point for the methods we develop—consider the neighbor components analysis (NCA) method introduced by [8]. In NCA, for any test point a, a distribution α(j|a) over the training examples is defined as follows where α(j|a) decreases rapidly as the distance between a and aj increases. α(j|a) = e−||a−aj||2 PN m=1 e−||a−am||2 (1) The estimate of P(y|a) is then defined as follows: Pnca(y|a) = N X i=1,yi=y α(i|a) (2) 2 In NCA the original training data consists of points (xi, yi) for i = 1 . . . N, where xi ∈ℜD′, with D′ typically larger than D. The method learns a projection matrix A that defines the modified representation ai = Axi (the same transformation is applied to test points). The matrix A is learned from training examples, to optimize log-likelihood under the model in Eq. 2. In our experiments we assume that a = Ax for some underlying representation x and a projection matrix A that has been learned using NCA to optimize the log-likelihood of the training set. As a result the matrix A, and consequently the representation a, are well-calibrated in terms of using nearest neighbors to estimate P(y|a) through Eq. 2. A first baseline method for our problem is therefore to directly use the estimates defined by Eq. 2. We will, however, see that this baseline method performs poorly at providing estimates of P(y|a) within the speech recognition application. Importantly, the model fails to exploit the underlying structure or correlations within the label space. For example, consider a test point that has many neighbors with the phonemic label /s/. This should be evidence that closely related phonemes, /sh/ for instance, should also get a relatively high probability under the model, but the model is unable to capture this effect. As a second baseline, an alternative method for estimating P(y|a) using nearest neighbor information is the following: Pk(y|a) = # of k-nearest neighbors of a in training set with label y k Here the choice of k is crucial. A small k will be very sensitive to noise and necessarily lead to many classes receiving a probability of zero, which is undesirable for our application. On the other hand, if k is too large, samples from far outside the neighborhood of a will influence Pk(y|a). We will describe a baseline method that interpolates estimates from several different values of k. This baseline will be useful with our approach, but again suffers from the fact that it does not model the underlying structure of the label space. 4 Error-Correcting Output Codes for Nearest-Neighbor Classifiers We now describe a model that uses error correcting output codes to explicitly represent and learn the underlying structure of the label space Y. For each label y, we define My ∈ℜL to be a prototype vector. We assume that the inner product ⟨My, Mz⟩will in some sense represent the similarity between labels y and z. The vectors My will be learned automatically, effectively representing an embedding of the labels in ℜL. In this section we first describe the structure of the model, and then describe a method for training the parameters of the model (i.e., learning the prototype vectors My). 4.1 ECOC Model The ECOC model is defined as follows. When considering a test sample a, we first assign weights α(j|a) to points aj from the training set through the NCA definition in Eq. 1. Let M be a matrix that contains all the prototype vectors My as its rows. We can then construct a vector H(a; M) that uses the weights α(j|a) and the true labels of the training samples to calculate the expected value of the output code representing a. H(a; M) = N X j=1 α(j|a)Myj Given this definition of H(a; M), our estimate under the ECOC model is defined as follows: Pecoc(y|a; M) = e⟨My,H(a;M)⟩ P y′∈Y e⟨My′,H(a;M)⟩ 3 L average CLL 2 -4.388 10 -2.748 20 -2.580 30 -2.454 40 -2.432 50 -2.470 60 -2.481 Table 1: Average CLL achieved by Pecoc over DevSet1 for different values of L This distribution assigns most of the probability for a sample vector a to classes whose prototype vectors have a large inner product with H(a; M). All labels receive a non-zero weight under Pecoc(y|a; M). 4.2 Training the ECOC Model We now describe a method for estimating the ECOC vectors My in the model. As in [8] the method uses a leave-one-out optimization criterion, which is particularly convenient within nearest-neighbor approaches. The optimization problem will be to maximize the conditional log-likelihood function F(M) = N X i=1 log P (loo) ecoc (yi|ai; M) where P (loo) ecoc (yi|ai; M) is a leave-one-out estimate of the probability of label yi given the input ai, assuming an ECOC matrix M. This criterion is related to the classification performance of the training data and also discourages the assignment of very low probability to the correct class. The estimate P (loo) ecoc (yi|ai; M) is given through the following definitions: α(loo)(j|i) = e−||ai−aj||2 PN m=1,m̸=i e−||ai−am||2 if i ̸= j and 0 otherwise H(loo)(ai; M) = N X j=1 α(loo)(j|i)Myj P (loo) ecoc (y|ai; M) = e⟨My,H(loo)(a;M)⟩ P y′∈Y e⟨My′,H(loo)(a;M)⟩ The criterion F(M) can be optimized using gradient-ascent methods, where the gradient is as follows: ∂F(M) ∂Mz = ∇(z) −∇′(z) ∇(z) = N X i=1 N X j=1 [α(loo)(j|i)(δz,yiMyj + δyj,zMyi)] ∇′(z) = N X i=1 X y′∈Y P (loo) ecoc (y′|ai; M)   N X j=1 [α(loo)(j|i)(δz,y′Myj + δyj,zMy′)]   4 Model Average CLL on DevSet 1 Perplexity Pnca -2.657 14.25 Pnn -2.535 12.61 Pecoc -2.432 11.38 Pfull -2.337 10.35 Pgmm -2.299 9.96 Pmix -2.165 8.71 Table 2: Average conditional log-likelihood (CLL) of Pnca, Pnn, Pecoc, Pnn′, Pgmm and Pmix on DevSet1. The corresponding perplexity values are indicated as well where the perplexity is defined as e−x given that x is the average CLL. Here δa,b = 1 if a = b and δa,b = 0 if a ̸= b. Since α(loo)(j|i) will be very small if ||ai −aj||2 is large, the gradient calculation can be truncated for such pairs of points which significantly improves the efficiency of the method (a similar observation is used in [8]). This optimization is non-convex and it is possible to converge to a local optimum. In our experiments we learn the matrix M using conjugate gradient ascent, though alternatives such as stochastic gradient can also be used. A random initialization of M is used for each experiment. We select L = 40 as the length of the prototype vectors My. We experimented with different values of L. The average conditional log-likelihood achieved on a development set of approximately 115,000 samples (DevSet1) is listed in Table 1. The performance of the method improves initially as the size of L increases, but the objective levels off around L = 40. 5 Experiments on Log-Likelihood We test our approach on a large-vocabulary lecture recognition task [6]. This is a challenging task that consists of recognizing college lectures given by multiple speakers. We use the SUMMIT recognizer [5] that makes use of 1871 distinct class labels. The acoustic vectors we use are 112 dimensional vectors consisting of eight concatenated 14 dimensional vectors of MFCC measurements. These vectors are projected down to 50 dimensions using NCA as described in [13]. This section describes experiments comparing the ECOC model to several baseline models in terms of their performance on the conditional log-likelihood of sample acoustic vectors. The baseline model, Pnn, makes use of estimates Pk(y|a) as defined in section 3. The set K is a set of integers representing different values for k, the number of nearest neighbors used to evaluate Pk. Additionally, we assume d functions over the the labels, P1(y), ..., Pd(y). (More information on the functions Pj(y) that we use in our experiments can be found in the appendix. We have found these functions over the labels are useful within our speech recognition application.) The model is then defined as Pnn(y|a; ¯λ) = X k∈K λkPk(y|a) + d X j=1 λ0 jPj(y) where λk ≥0, ∀k ∈K, λ0 j ≥0 for j = 1, ..., d, and P k∈K λk + Pd j=1 λ0 j = 1. The ¯λ values were estimated using the EM algorithm on a validation set of examples (DevSet2). In our experiments, we select K = {5, 10, 20, 30, 50, 100, 250, 500, 1000}. Table 2 contains the average conditional loglikelihood achieved on a development set (DevSet1) by Pnca, Pnn and Pecoc. These results show that Pecoc clearly outperforms these two baseline models. In a second experiment we combined Pecoc with Pnn to create a third model Pfull(y|a). This model includes information from the nearest neighbors, the output codes, as well as the distributions over the label space. The model takes the following form: Pfull(y|a; ¯λ) = X k∈K λkPk(y|a) + d X j=1 λ0 jPj(y) + λecocPecoc(y|a; M) 5 Acoustic Model WER (DevSet3) WER (Test Set) Baseline Model 36.3 35.4 Augmented Model 35.2 34.5 Table 3: WER of recognizer for different acoustic models on the development and test set. The values of ¯λ here have similar constraints as before and are again optimized using the EM algorithm. Results in Table 2 show that this model gives a further clear improvement over Pecoc. We also compare ECOC to a GMM model, as conventionally used in speech recognition systems. The GMM we use is trained using state-of-the-art algorithms with the SUMMIT system [5]. The GMM defines a generative model Pgmm(a|y); we derive a conditional model as follows: Pgmm(y|a) = Pgmm(a|y)αP(y) P y′∈Y Pgmm(a|y′)αP(y′) The parameter α is selected experimentally to achieve maximum CLL on DevSet2 and P(y) refers to the prior over the labels calculated directly from their relative proportions in the training set. Table 2 shows that Pfull and Pgmm are close in performance, with Pgmm giving slightly improved results. A final interpolated model with similar constraints on the values of ¯λ trained using the EM algorithm is as follows: Pmix(y|a; ¯λ) = X k∈K λkPk(y|a) + d X j=1 λ0 jPj(y) + λecocPecoc(y|a; M) + λgmmPgmm(y|a) Results for Pmix are shown in the final row in the table. This interpolated model gives a clear improvement over both the GMM and ECOC models alone. Thus the ECOC model, combined with additional nearest-neighbor information, can give a clear improvement over state-of-the-art GMMs on this task. 6 Recognition Experiments In this section we describe experiments that integrate the ECOC model within a full speech recognition system. We learn parameters ¯λ using both DevSet1 and DevSet2 for Pfull(y|a). However, we need to derive an estimate for P(a|y) for use by the recognizer. We can do so by using an estimate for P(a|y) proportional to P (y|a) P (y) [16]. The estimates for P(y) are derived directly from the proportions of occurrences of each acoustic-phonetic class in the training set. In our experiments we consider the following two methods for calculating the acoustic model. • Baseline Model: β1 log Pgmm(a|y) • Augmented Model: β2 log  γPgmm(y|a)+(1−γ)Pfull(y|a) P (y)  The baseline method is just a GMM model with the commonly used scaling parameter β1. The augmented model combines Pgmm linearly with Pfull using parameter γ and the log of the combination is scaled by parameter β2. The parameters β1, β2, γ are selected using the downhill simplex algorithm by optimizing WER over a development set [10]. Our development set (DevSet3) consists of eight hours of data including six speakers and our test set consists of eight hours of data including five speakers. Results for both methods on the development set and test set are presented in Table 3. The augmented model outperforms the baseline GMM model. This indicates that the nearest neighbor information along with the ECOC embedding, can significantly improve the acoustic model. Overall, an absolute reduction of 1.1% in WER on the development set and 0.9% on the test set are achieved using the augmented acoustic model. These results are significant with p < 0.001 using the sign test calculated at the utterance level. 6 4.0 4.0 aa ae ah ahfp ao aw aw axr ay b bcl ch d dcl dh dx eh el em en epi er ey f g gcl hh ih iy jh k kcl l m n ng ow oy p pcl r s sh t tcl th uh uw v w y z zh Figure 1: Plot of 2-dimensional output codes corresponding to 73 acoustic phonetic classes. The red circles indicate noise and silence classes. The phonemic classes are divided as follows: vowels, semivowels, nasals, stops and stop closures, fricatives, affricates, and the aspirant /hh/. 7 Discussion 7.1 Plot of a low-dimensional embedding In order to get a sense of what is learned by the output codes of Pecoc we can plot the output codes directly. Figure 1 shows a plot of the output codes learned when L = 2. The output codes are learned for 1871 classes, but only 73 internal acoustic-phonetic classes are shown in the plot for clarity. In the plot, classes of similar acoustic-phonetic category are shown in the same color and shape. We can see that items of similar acoustic categories are grouped closely together. For example, the vowels are close to each other in the bottom left quadrant, while the stop-closures are grouped together in the top right, the affricates in the top left, and the nasals in the bottom right. The fricatives are a little more spread out but usually grouped close to another fricative that shares some underlying phonological feature such as /sh/ and /zh/ which are both palatal and /f/ and /th/ which are both unvoiced. We can also see specific acoustic properties emerging. For example the voiced stops /b/, /d/, /g/ are placed close to other voiced items of different acoustic categories. 7 7.2 Extensions The ECOC embedding of the label space could also be co-learned with an embedding of the input acoustic vector space by extending the approach of NCA [8]. It would simply require the reintroduction of the projection matrix A in the weights α. α(j|x) = e−||Ax−Axj||2 PN m=1 e−||Ax−Axm||2 H(x; M) and Pecoc would still be defined as in section 4.1. The optimization criterion would now depend on both A and M. To optimize A, we could again use gradient methods. Co-learning the two embeddings M and A could potentially lead to further improvements. 8 Conclusion We have shown that nearest neighbor methods can be used to improve the performance of a GMMbased acoustic model and reduce the WER on a challenging speech recognition task. We have also developed a model for using error-correcting output codes to represent an embedding of the acoustic-phonetic label space that helps us capture cross-class information. Future work on this task could include co-learning an embedding of the input acoustic vector space with the ECOC matrix to attempt to achieve further gains. Appendix We define three distributions based on the prior probabilities, P(y), of the acoustic phonetic classes. The SUMMIT recognizer makes use of 1871 distinct acoustic phonetic labels [5]. We divide the set of labels, Y, into three disjoint categories. • Y(1) includes labels involving internal phonemic events (e.g. /ay/) • Y(2) includes labels involving the transition from one acoustic-phonetic event to another (e.g. /ow/->/ch/) • Y(3) includes labels involving only non-phonetic events like noise and silence We define a distribution P (1)(y) as follows. Distributions P (2)(y) and P (3)(y) are defined similarly. P (1)(y) =  P(y), if y ∈Y(1) 0, otherwise P y′∈Y(1) P(y′) References [1] E. L. Allwein, R. E. Schapire, and Y. Singer. Reducing multiclass to binary: a unifying approach for margin classifiers. Journal of Machine Learning Research, 1:113–141, 2000. [2] K. Crammer and Y. Singer. Improved output coding for classification using continuous relaxation. In Advances in Neural Information Processing Systems. MIT Press, 2000. [3] K. Crammer and Y. Singer. On the learnability and design of output codes for multiclass problems. Machine Learning, 47(2-3):201–233, 2002. [4] T. G. Dietterich and G. Bakiri. Solving multiclass learning problems via error-correcting output codes. Journal of Artificial Intelligence Research, 2:263–286, 1995. [5] J. Glass. A probabilistic framework for segment-based speech recognition. Computer, Speech, and Language, 17(2-3):137–152, 2003. 8 [6] J. Glass, T. J. Hazen, L. Hetherington, and C. Wang. Analysis and processing of lecture audio data: Preliminary investigations. In HLT-NAACL 2004 Workshop on Interdisciplinary Approaches to Speech Indexing and Retrieval, pages 9–12, 2004. [7] A. Globerson and S. Roweis. Metric learning by collapsing classes. In Y. Weiss, B. Scholkopf, and J. Platt, editors, Advances in Neural Information Processing Systems 18, pages 513–520. MIT Press, 2006. [8] J. Goldberger, S. Roweis, G. Hinton, and R. Salakhutdinov. Neighbourhood components analysis. In L. K. Saul, Y. Weiss, and L. Bottou, editors, Advances in Neural Information Processing Systems 17, pages 513–520. MIT Press, 2005. [9] A. Klautau, N. Jevtic, and A. Orlitsky. On nearest-neighbor error-correcting output codes with aplication to all-pairs multiclass support vector machines. Journal of Machine Learning Research, 4:1–15, 2003. [10] W. H. Press, S. A. Teukolsky, W. T. Vetterline, and B. P. Flannery. Numerical recipes: the art of scientific computing. Cambridge University Press, 3 edition, 2007. [11] O. Pujol, P. Radeva, and J. Vitria. Discriminant ecoc: a heuristic method for application dependent design of error correcting output codes. IEEE Transactions of Pattern Analysis and Machine Intelligence, 28(6), 2006. [12] R. Salakhutdinov and G. Hinton. Learning a nonlinear embedding by preserving class neighbourhood structure. AI and Statistics, 2007. [13] N. Singh-Miller, M. Collins, and T. J. Hazen. Dimensionality reduction for speech recognition using neighborhood components analysis. In Interspeech, 2007. [14] A. Torralba, R. Fergus, and Y. Weiss. Small codes and large image databases for recognition. IEEE Computer Vision and Pattern Recognition, June 2008. [15] K. Q. Weinberger, J. Blitzer, and L. K. Saul. Distance metric learning for large margin nearest neighbor classification. In Advances in Neural Information Processing Systems. MIT Press, 2006. [16] G. Zavaliagkos, Y. Zhao, R. Schwartz, and J. Makhoul. A hybrid segmental neural net/hidden markov model system for continuous speech recognition. IEEE Transactions on Speech and Audio Processing, 2(1):151–160, 1994. 9
2009
27
3,774
Semi-supervised Learning in Gigantic Image Collections Rob Fergus Courant Institute, NYU, 715 Broadway, New York, NY 10003 fergus@cs.nyu.edu Yair Weiss School of Computer Science, Hebrew University, 91904, Jerusalem, Israel yweiss@huji.ac.il Antonio Torralba CSAIL, EECS, MIT, 32 Vassar St., Cambridge, MA 02139 torralba@csail.mit.edu Abstract With the advent of the Internet it is now possible to collect hundreds of millions of images. These images come with varying degrees of label information. “Clean labels” can be manually obtained on a small fraction, “noisy labels” may be extracted automatically from surrounding text, while for most images there are no labels at all. Semi-supervised learning is a principled framework for combining these different label sources. However, it scales polynomially with the number of images, making it impractical for use on gigantic collections with hundreds of millions of images and thousands of classes. In this paper we show how to utilize recent results in machine learning to obtain highly efficient approximations for semi-supervised learning that are linear in the number of images. Specifically, we use the convergence of the eigenvectors of the normalized graph Laplacian to eigenfunctions of weighted Laplace-Beltrami operators. Our algorithm enables us to apply semi-supervised learning to a database of 80 million images gathered from the Internet. 1 Introduction Gigantic quantities of visual imagery are present on the web and in off-line databases. Effective techniques for searching and labeling this ocean of images and video must address two conflicting problems: (i) the techniques to understand the visual content of an image and (ii) the ability to scale to millions of billions of images or video frames. Both aspects have received significant attention from researchers, the former being addressed by recent work on object and scene recognition, while the latter is the focus of the content-based image retrieval community (CBIR) [7]. A key issue pertaining to both aspects of the problem is the diversity of label information accompanying real world image data. A variety of collaborative and online annotation efforts have attempted to build large collections of human labeled images, ranging from simple image classifications, to boundingboxes and precise pixel-level segmentation [16, 21, 24]. While impressive, these manual efforts have no hope of scaling to the many billions of images on the Internet. However, even though most images on the web lack human annotation, they often have some kind of noisy label gleaned from nearby text or from the image filename and often this gives a strong cue about the content of the image. Finally, there are images where we have no information beyond the pixels themselves. Semi-supervised learning (SSL) methods are designed to handle this spectrum of label information [26, 28]. They rely on the density structure of the data itself to propagate known labels to areas lacking annotations, and provide a natural way to incorporate labeling uncertainty. However, to model the density of the data, each point must measure its proximity to every other. This requires polynomial time – prohibitive for large-scale problems. In this paper, we introduce a semi-supervised learning scheme that is linear in the number of images, enabling us to tackle very large scale problems. Building on recent results in spectral graph theory, we efficiently construct accurate numerical approximations to the eigenvectors of the normalized graph Laplacian. Using these approximations, we can easily propagate labels through huge collections of images. 1 1.1 Related Work Cleaning up Internet image data has been explored by several authors: Berg et al. [4], Fergus et al. [8], Li et al. [13], Vijayanarasimhan et al. [22], amongst others. Unlike our approach, these methods operate independently on each class and would be problematic to scale to millions or billions of images. A related group of techniques use active labeling, e.g. [10]. Semi-supervised learning is a rapidly growing sub-field of machine learning, dealing with datasets that have a large number of unlabeled points and a much smaller number of labeled points (see [5] for a recent overview). The most popular approaches are based on the graph Laplacian (e.g. [26, 28] and there has been much theoretical work devoted to the asymptotics of these Laplacians [3, 6, 14]. However, these methods require the explicit manipulation of an n × n Laplacian matrix (n being the number of data points), for example [2] notes: “our algorithms compute the inverse of a dense Gram matrix which leads to O(n3) complexity. This may be impractical for large datasets.” The large computational complexity of standard graph Laplacian methods has lead to a number of recent papers on efficient semi-supervised learning (see [27] for an overview). Many of these methods (e.g. [18, 12, 29, 25] are based on calculating the Laplacian only for a smaller, backbone, graph which reduces complexity to be cubic in the size of the small graph. In most cases [18, 12] the smaller graph is built simply by randomly subsampling a subset of the points, while in [29] a mixture model is learned on the original dataset and each mixture component defines a node in the backbone graph. In [25] the backbone graph is found using non-negative matrix factorization. In [9] the backbone graph is a uniform grid over the high dimensional space (so the number of nodes grows exponentially with dimension). In [20] the number of datapoints is not reduced but rather the number of edges. This allows the use of sparse numerical algebra techniques. The problem with approaches based on backbone graphs is that the spectrum of the graph Laplacian can change dramatically with different backbone construction methods [12]. This can also be seen visually (see Fig. 3) by examining the clusterings suggested by the full data and a small subsample. Even in cases where the “correct” clustering is obvious when the full data is considered, the smaller subset may suggest erroneous clusterings (e.g. Fig. 3(left)). In our approach, we take an alternative route. Rather than trying to reduce the number of points, we take the limit as the number of points goes to infinity. 2 Semi-supervised Learning We start by introducing semi-supervised learning in a graph setting and then describe an approximation that reduces the learning time from polynomial to linear in the number of images. Fig. 1 illustrates the semi supervised learning problem. Following the notations of Zhu et al. [28], we are given a labeled dataset of input-output pairs (Xl, Yl) = {(x1, y1), ..., (xl, yl)} and an unlabeled dataset Xu = {xl+1, ..., xn}. Thus in Fig. 1(a) we are given two labeled points and 500 unlabeled points. Fig. 1(b) shows the output of a nearest neighbor classifier on the unlabeled points. The purely supervised solution ignores the apparent clustering suggested by the data. In order to use the unlabeled data, we form a graph G = (V, E) where the vertices V are the datapoints x1, ..., xn, and the edges E are represented by an n × n matrix W. Entry Wij is the edge weight between nodes i, j and a common practice is to set Wij = exp(−∥xi −xj∥2/2ǫ2). Let D be a diagonal matrix whose diagonal elements are given by Dii = P j Wij, the combinatorial graph Laplacian is defined as L = D −W, which is also called the unnormalized Laplacian. In graph-based semi-supervised learning, the graph Laplacian L is used to define a smoothness operator that takes into account the unlabeled data. The main idea is to find functions f which agree with the labeled data but are also smooth with respect to the graph. The smoothness is measured by the graph Laplacian: f T Lf = 1 2 X i,j Wij (f(i) −f(j))2 Of course simply minimizing smoothness can be achieved by the trivial solution f = 1, but in semi-supervised learning, we minimize a combination of the smoothness and the training loss. For squared error training loss, this is simply: J(f) = f T Lf + l X i=1 λ(f(i) −yi)2 = f T Lf + (f −y)T Λ(f −y) 2 (a) (b) (c) Data Supervised Semi-Supervised (c) Figure 1: Comparison of supervised and semi-supervised learning on toy data. Semi-supervised learning seeks functions that are smooth with respect to the input density. φ1, σ1 = 0 φ3, σ3 = 0.038 φ2, σ2 = 0.0002 Φ1, σ1 = 0 Φ2, σ2 = 0.0002 Φ3, σ3 = 0.035 Density Data Figure 2: Left: The three generalized eigenvectors of the graph Laplacian, for the toy data. Note that the semi-supervised solution can be written as a linear combination of these eigenvectors (in this case, the second eigenvector is enough). Using generalized eigenvectors (or equivalently normalized Laplacians) increases robustness of the first eigenvectors, compared to using the un-normalized eigenvectors. Right: The 2D density of the toy data, and the associated smoothness eigenfunctions defined by that density. The plots use the Matlab jet colormap. where Λ is a diagonal matrix whose diagonal elements are Λii = λ if i is a labeled point and Λii = 0 for unlabeled points. The minimizer is of course a solution to (L + Λ)f = Λy. Fig. 1(c) shows the semi-supervised solution. Although the solution can be given in closed form for the squared error loss, note that it requires solving an n×n system of linear equations. For large n this poses serious problems with computation time and robustness. But as suggested in [5, 17, 28], the dimension of the problem can be reduced dramatically by only working with a small number of eigenvectors of the Laplacian. Let Φi, σi be the generalized eigenvectors and eigenvalues of the graph Laplacian L (solutions to Lφi = σiDφi). Note that the smoothness of an eigenvector Φi is simply ΦT i LΦi = σi so that eigenvectors with smaller eigenvalues are smoother. Since any vector in Rn can be written f = P i αiΦi, the smoothness of a vector is simply P i α2 i σi so that smooth vectors will be linear combinations of the eigenvectors with small eigenvalues1. Fig. 2(left) shows the three generalized eigenvectors of the Laplacian for the toy data shown in Fig. 1(a). Note that the semi-supervised solution (Fig. 1(c)) is a linear combination of these three eigenvectors (in fact just one eigenvector is enough). In general, we can significantly reduce the dimension of f by requiring it to be of the form f = Uα where U is a n × k matrix whose columns are the k eigenvectors with smallest eigenvalue. We now have: J(α) = αT Σα + (Uα −y)T Λ(Uα −y) The minimizing α is now a solution to the k × k system of equations: (Σ + U T ΛU)α = U T Λy (1) 2.1 From Eigenvectors to Eigenfunctions Given the eigenvectors of the graph Laplacian, we can now solve the semi-supervised problem in a reduced dimensional space. But to find the eigenvectors in the first place, we need to diagonalize a n × n matrix. How can we efficiently calculate the eigenvectors as the number of unlabeled points increases? We follow [23, 14] in assuming the data xi ∈Rd are samples from a distribution p(x) and analyzing the eigenfunctions of the smoothness operator defined by p(x). Fig. 2(right) shows the density in two 1This discussion holds for both ordinary and generalized eigenvectors, but the latter are much more stable and we use them. 3 dimensions for the toy data. This density defines a weighted smoothness operator on any function F(x) defined on Rd which we will denote by Lp(F): Lp(F) = 1 2 Z (F(x1) −F(x2))2W(x1, x2)p(x1)p(x2)dx1x2 with W(x1, x2) = exp(−∥x1 −x2∥2/2ǫ2). Just as the graph Laplacian defined eigenvectors of increasing smoothness, the smoothness operator will define eigenfunctions of increasing smoothness. We define the first eigenfunction of LP (f) by a minimization problem: Φ1 = arg min F :R F 2(x)p(x)D(x)dx=1 Lp(F) where D(x) = R x2 W(x, x2)p(x2)dx2. Note that the first eigenfunction will always be the trivial function Φ(x) = 1 since it has maximal smoothness LP (1) = 0. The second eigenfunction of Lp(f) minimizes the same problem, with the additional constraint that it be orthogonal to the first eigenfunction R F(x)Φ1(x)D(x)p(x)dx = 0. More generally, the kth eigenfunction minimizes Lp(f) under additional constraints that R F(x)Φl(x)p(x)D(x)dx = 0 for all l < k. The eigenvalue of an eigenfunction Φk is simply its smoothness σk = Lp(Φk). Fig. 2(right) shows the first three eigenfunctions corresponding to the density of the toy data. Similar to the eigenvectors of the graph Laplacian, the second eigenfunction reveals the natural clustering of the data. Note that the eigenvalue of the eigenfunctions is similar to the eigenvalue of the discrete generalized eigenvector. How are these eigenfunctions related to the generalized eigenvectors of the Laplacian? It is easy to see that as n →∞, 1 n2 f T Lf = 1 2n2 P i,j Wij (f(i) −f(j))2 will approach Lp(F), and 1 n P i f 2(i)D(i, i) will approach R F 2(x)D(x)p(x)dx so that the minimization problems that define the eigenvectors approach the problems that define the eigenfunctions as n →∞. Thus under suitable convergence conditions, the eigenfunctions can be seen as the limit of the eigenvectors as the number of points goes to infinity [1, 3, 6, 14]. For certain parametric probability functions (e.g. uniform, Gaussian) the eigenfunctions can be calculated analytically [14, 23]. Thus for these cases, there is a tremendous advantage in estimating p(x) and calculating the eigenfunctions from p(x) rather than attempting to estimate the eigenvectors directly. For example, consider a problem with 80 million datapoints sampled from a 32 dimensional Gaussian. Instead of diagonalizing an 80 million by 80 million matrix, we can simply estimate a 32 × 32 covariance matrix and get analytical eigenfunctions. In low dimensions, we can calculate the eigenfunction numerically by discretizing the density. Let g be the eigenfunction values at a set of discrete points, then g satisfies: ( ˜D −P ˜WP)g = σP ˆDg (2) where ˜W is the affinity between the discrete points, P is a diagonal matrix whose diagonal elements give the density at the discrete points, and ˜D is a diagonal matrix whose diagonal elements are the sum of the columns of P ˜WP, and ˆD is a diagonal matrix whose diagonal elements are the sum of the columns of P ˜W. This method was used to calculate the eigenfunctions in Fig. 2(right). Instead of assuming that p(x) has a simple, parametric form, we will use a more modest assumption, that p(x) has a product form. Specifically, we assume that if we rotate the data s = Rx then p(s) = p(s1)p(s2) · · · p(sd). This assumption allows us to calculate the eigenfunctions of Lp using only the marginal distributions p(si). Observation: Assume p(s) = p(s1)p(s2) · · · p(sd). Let pk be the marginal distribution of a single coordinate in s. Let Φi(sk) be an eigenfunction of Lpk with eigenvalue σi, then Φi(s) = Φi(sk) is also an eigenfunction of Lp with the same eigenvalue σi. Proof: This follows from the observation in [14, 23] that for separable distributions, the eigenfunctions are also separable. This observation motivates the following algorithm: • Find a rotation of the data R, so that s = Rx are as independent as possible. • For each “independent” component sk, use a histogram to approximate the density p(sk). In order to regularize the solution (see below), we add a small constant to the value of the histogram at each bin. 4 • Given the approximated density p(sk), solve numerically for eigenfunctions and eigenvalues of Lpk using Eqn. 2. As discussed above, this can be done by solving a generalized eigenvalue problem for a B × B matrix, where B is the number of bins in the histogram. • Order the eigenfunctions from all components by increasing eigenvalue. The need to add a small constant to the histogram comes from the fact that the smoothness operator Lp(F) ignores the value of F wherever the density vanishes, p(x) = 0. Thus the eigenfunctions can oscillate wildly in regions with zero density. By adding a small constant to the density we enforce an additional smoothness regularizer, even in regions of zero density. Similar regularizers are used in [2, 9]. This algorithm will recover eigenfunctions of Lp, which depend only on a single coordinate. As discussed in [23], products of these eigenfunctions for different coordinates are also eigenfunctions, but we will assume the semi-supervised solution is a linear combination of only the single-coordinate eigenfunctions. By choosing the k eigenfunctions with smallest eigenvalue we now have k functions Φk(x) whose value is given at a set of discrete points for each coordinate. We then use linear interpolation in 1D to interpolate Φ(x) at each of the labeled points xl. This allows us to solve Eqn. 1 in time that is independent of the number of unlabeled points. Although this algorithm has a number of approximate steps, it should be noted that if the “independent” components are indeed independent, and if the semi-supervised solution is only a linear combination of the single-coordinate eigenfunctions, then this algorithm will exactly recover the semi-supervised solution as n →∞. Consider again a dataset of 80 million points in 32 dimensions and assume 100 bins per dimension. If the independent components s = Rx are indeed independent, then this algorithm will exactly recover the semi-supervised solution by solving 32 100 × 100 generalized eigenvector problems and a single k × k least squares problem. In contrast, directly estimating the eigenvectors of the graph Laplacian will require diagonalizing an 80 million by 80 million matrix. 3 Experiments In this section we describe experiments to illustrate the performance and scalability of our approach. The results will be reported on the Tiny Images database [19], in combination with the CIFAR-10 label set [11]. This data is diverse and highly variable, having been collected directly from Internet search engines. The set of labels allows us to accurately measure the performance of our algorithm, while using data typical of the large-scale Internet settings for which our algorithm is designed. We start with a toy example that illustrates our eigenfunction approach, compared to the Nystrom method of Talwalker et al. [18], another approximate semi-supervised learning scheme that can scale to large datasets. In Fig. 3 we show two different 2D datasets, designed to reveal the failure modes of the two methods. 3.1 Features For the experiments in this paper we use global image descriptors to represent the entire image (there is no attempt to localize the objects within the images). Each image is thus represented by a single Gist descriptor [15], which we then project down to 64 dimensions using PCA. As Data Nystrom Eigenfunction Data Nystrom Eigenfunction Figure 3: A comparison of the separable eigenfunction approach and the Nystrom method. Both methods have comparable computational cost. The Nystrom method is based on computing the graph Laplacian on a set of sparse landmark points and fails in cases where the landmarks do not adequately summarize the density (left). The separable eigenfunction approach fails when the density is far from a product form (right). 5 illustrated in Fig. 3, the eigenfunction approach assumes that the input distribution is separable over dimension. In Fig. 4 we show that while the raw gist descriptors exhibit strong dependencies between dimensions, this is no longer the case after the PCA projection. Note that PCA is one of the few types of projection permitted: since distances between points must be preserved only rotations of the data are allowed. Dim. 2 vs 3, MI: 0.555 Dim. 2 vs 16, MI: 0.159 Dim. 3 vs 4, MI: 0.484 Dim. 2 vs 3, MI: 0.017 Dim. 2 vs 16, MI: 0.007 Dim. 3 vs 4, MI: 0.009 Log histogram of Gist descriptors Log histogram of PCA’d Gist descriptors Figure 4: 2D log histograms formed from 1 million Gist descriptors. Red and blue correspond to high and low densities respectively. Left: three pairs of dimensions in the raw Gist descriptor, along with their mutual information score (MI), showing strong dependencies between dimensions. Right: the dimensions in the Gist descriptors after a PCA projection, as used in our experiments. The dependencies between dimensions are now much weaker, as the MI scores show. Hence the separability assumption made by our approach is not an unreasonable one for this type of data. 3.2 Experiments with CIFAR label set The CIFAR dataset [11] was constructed by asking human subjects to label a subset of classes of the Tiny Images dataset. For a given keyword and image, the subjects determined whether the given image was indeed an image of that keyword. The resulting labels span 386 distinct keywords in the Tiny Images dataset. Our experiments use the sub-set of 126 classes which had at least 200 positive labels and 300 negative labels, giving a total of 63,000 images. Our experimental protocol is as follows: we take a random subset of C classes from the set of 126. For each class c, we randomly choose a fixed test-set of 100 positive and 200 negative examples, reflecting the typical signal-to-noise ratio found in images from Internet search engines. The training examples consist of t positive/negative pairs drawn from the remaining pool of 100 positive/negative images for each keyword. For each class in turn, we use our scheme to propagate labels from the training examples to the test examples. By assigning higher probability (values in f) to the genuine positive images of each class, we are able to re-rank the images. We also make use of the the training examples from keywords other than c by treating them as additional negative examples. For example, if we have C = 16 keywords and t = 5 training pairs per keyword, then we have 5 positive training examples and (5+(16-1)*10)=155 negative training examples for each class. We use these to re-rank the 300 test images of that particular class. Note that the propagation from labeled images to test images may go through the unlabeled images that are not even in the same class. Our use of examples from other classes as negative examples is motivated by real problems, where training labels are spread over many keywords but relatively few labels are available per class. In experiments using our eigenfunction approach, we compute a fixed set of k=256 eigenfunctions on the entire 63,000 datapoints in the 64D space with ǫ = 0.2 and used these for all runs. For approaches that require explicit formation of the affinity matrix, we calculate the distance between the 64D image descriptors using ǫ = 0.125. All approaches use λ = 50. To evaluate performance, we choose to measure the precision at a low recall rate of 15%, this being a sensible operating point as it corresponds to the first webpage or so in an Internet retrieval setting. Given the split of +ve/-ve examples in the test data, chance level performance corresponds to a precision of 33%. All results were generated by averaging over 10 different runs, each with different random train/test draws, and with different subsets of classes. In our first set of experiments, shown in Fig. 5(left), we compare our eigenfunction approach to a variety of alternative learning schemes. We use C = 16 different classes drawn randomly from the 126, and vary the number of training pairs t from 0 up to 100 (thus the total number of labeled points, positive and negative, varied from 0 to 3200). Our eigenfunction approach outperforms other methods, particularly where relatively few training examples are available. We use two baseline classifiers: (i) Nearest-Neighbor and (ii) RBF kernel SVM, with kernel width ǫ. The SVM approach 6 badly over-fits the data for small numbers of training examples, but catches up with the eigenfunction approach once 64+ve/1984-ve labeled examples are used. We also test a range of SSL approaches. The exact least-squares approach (f = (L + Λ)−1ΛY ) achieves comparable results to the eigenfunction method, although it is far more expensive. The eigenvector approach (Eqn. 1) performs less well, being limited by the k = 256 eigenvectors used (as k is increased, the performance converges to the exact least-squares solution). Neither of these methods scale to large image collections as the affinity matrix W becomes too big and cannot be inverted or have its eigenvectors computed. Fig. 5(left) also shows the efficient Nystrom method [18], using 1000 landmark points, which has a somewhat disappointing performance. Evidently, as in Fig. 3, the landmark points do not adequately summarize the density. As the number of landmarks is increased, the performance approaches that of the least squares solution. −Inf 0 1 2 3 4 5 6 7 0.25 0.3 0.35 0.4 0.45 0.5 0.55 0.6 0.65 0.7 Log2 number of +ve training examples/class Mean precision at 15% recall averaged over 16 classes Eigenfunction Eigenfunction w/noisy labels Nystrom Least−squares Eigenvector SVM NN Chance Log2 # classes 0 1 2 3 4 5 0 1 2 3 5 8 10 15 20 40 60 100 Log2 # classes # +ve training examples/class 0 1 2 3 4 5 # Eigenfunctions 16 32 64 128 256 512 (a) Without noisy labels (b) With noisy labels 0.3 0.4 0.5 0.6 0.7 (c) Without noisy labels Figure 5: Left: Performance (precision at 15% recall) on the Tiny Image CIFAR label set for different learning schemes as the number of training pairs is increased, averaged over 16 different classes. -Inf corresponds to the unsupervised case (0 examples). Our eigenfunction scheme (solid red) outperforms standard supervised methods (nearest-neighbors (green) and a Gaussian SVM (blue)) for small numbers of training pairs. Compared to other semi-supervised schemes, ours matches the exact least squares solution (which is too expensive to run on a large number of images), while outperforming approximate schemes, such as Nystrom [18]. By using noisy labels in addition to the training pairs, the performance is boosted when few training examples are available (dashed red). Right: (a): The performance of our eigenfunction approach as the number of training pairs per class and number of classes is varied. Increasing the number of classes also aids performance since labeled examples from other classes can be used as negative examples. (b): As for (a) but now using noisy label information (Section 3.3). Note the improvement in performance when few training pairs are available. (c): The performance of our approach (using no noisy labels) as the number of eigenfunctions is varied. In Fig. 5(right)(a) we explore how our eigenfunction approach performs as the number of classes C is varied, for different numbers of training pairs t per class. For a fixed t, as C increases, the number of negative examples available increases thus aiding performance. Fig. 5(right)(c) shows the effect of varying the number of eigenfunctions k for C = 16 classes. The performance is fairly stable above k = 128 eigenfunctions (i.e. on average 2 per dimension), although some mild over-fitting seems to occur for small numbers of training examples when a very large number is used. 3.3 Leveraging noisy labels In the experiments above, only two types of data are used: labeled training examples and unlabeled test examples. However, an additional source is the noisy labels from the Tiny Image dataset (the keyword used to query the image search engine). These labels can easily be utilized by our framework: all 300 test examples for a class c are given a positive label with a small weight (λ/10), while the 300(C −1) test examples from other classes are given negative label with the same small weight. Note that these labels do not reveal any information about which of the 300 test images are true positives. These noisy labels can provide a significant performance gain when few training (clean) labels are available, as shown in Fig. 5(left) (c.f. solid and dashed red lines). Indeed, when no training labels are available, just the noisy labels, our eigenfunction scheme still performs very well. The performance gain is explored in more detail in Fig. 5(right)(b). In summary, using 7 the eigenfunction approach with noisy labels, the performance obtained with a total of 32 labeled examples is comparable to the SVM trained with 64*16=512 labeled examples. 3.4 Experiments on Tiny Images dataset Our final experiment applies the eigenfunction approach to the whole of the Tiny Images dataset (79,302,017 images). We map the gist descriptor for each image down to a 32D space using PCA and precompute k = 64 eigenfunctions over the entire dataset. The 445,954 CIFAR labels (64,185 of which are +ve) cover 386 keywords, any of which can be re-ranked by solving Eqn. 1, which takes around 1ms on a fast PC. In Fig. 6 we show our scheme on four different keywords, each using 3 labeled training pairs, resulting in a significant improvement in quality over the original ordering. A nearest-neighbor classifier which is not regularized by the data density performs worse than our approach. Ranking from search engine Nearest Neighbor re-ranking Eigenfunction re-ranking Figure 6: Re-ranking images from 4 keywords in an 80 million image dataset, using 3 labeled pairs for each keyword. Rows from top: “Japanese spaniel”, “airbus”, “ostrich”, “auto”. From L to R, the columns show the original image order, results of nearest-neighbors and the results of our eigenfunction approach. By regularizing the solution using eigenfunctions computed from all 80 million images, our semi-supervised scheme outperforms the purely supervised method. 4 Discussion We have proposed a novel semi-supervised learning scheme that is linear in the number of images, and then demonstrated it on challenging datasets, including one of 80 million images. The approach can easily be parallelized making it practical for Internet-scale image collections. It can also incorporate a variety of label types, including noisy labels, in one consistent framework. Acknowledgments The authors would like to thank H´ector Bernal and the anonymous reviewers and area chairs for their constructive comments. We also thank Alex Krizhevsky and Geoff Hinton for providing the CIFAR label set. Funding support came from: NSF Career award (ISI 0747120), ISF and a Microsoft Research gift. 8 References [1] M. Belkin and P. Niyogi. Towards a theoretical foundation for laplacian based manifold methods. Journal of Computer and System Sciences, 2007. [2] M. Belkin, P. Niyogi, and V. Sindhwani. Manifold regularization: A geometric framework for learning from labeled and unlabeled examples. JMLR, 7:2399–2434, 2006. [3] Y. Bengio, O. Delalleau, N. L. Roux, J.-F. Paiement, P. Vincent, and M. Ouimet. Learning eigenfunctions links spectral embedding and kernel PCA. In NIPS, pages 2197–2219, 2004. [4] T. Berg and D. Forsyth. Animals on the web. In CVPR, pages 1463–1470, 2006. [5] O. Chapelle, B. Sch¨olkopf, and A. Zien. Semi-Supervised Learning. MIT Press, 2006. [6] R. R. Coifman, S. Lafon, A. Lee, M. Maggioni, B. Nadler, F. Warner, and S. Zucker. Geometric diffusion as a tool for harmonic analysis and structure definition of data, part i: Diffusion maps. PNAS, 21(102):7426–7431, 2005. [7] R. Datta, D. Joshi, J. Li, and J. Z. Wang. Image retrieval: Ideas, influences, and trends of the new age. ACM Computing Surveys, 2008. [8] R. Fergus, L. Fei-Fei, P. Perona, and A. Zisserman. Learning object categories from google’s image search. In ICCV, volume 2, pages 1816–1823, Oct. 2005. [9] J. Garcke and M. Griebel. Semi-supervised learning with sparse grids. In ICML workshop on learning with partially classified training data, 2005. [10] A. Kapoor, K. Grauman, R. Urtasun, and T. Darrell. Active learning with gaussian processes for object categorization. In CVPR, 2007. [11] A. Krizhevsky and G. E. Hinton. Learning multiple layers of features from tiny images. Technical report, Computer Science Department, University of Toronto, 2009. [12] S. Kumar, M. Mohri, and A. Talwalkar. Sampling techniques for the Nystrom method. In AISTATS, 2009. [13] L. J. Li, G. Wang, and L. Fei-Fei. Optimol: automatic object picture collection via incremental model learning. In CVPR, 2007. [14] B. Nadler, S. Lafon, R. R. Coifman, and I. G. Kevrekidis. Diffusion maps, spectral clustering and reaction coordinates of dynamical systems. Applied and Computational Harmonic Analysis, 21:113–127, 2006. [15] A. Oliva and A. Torralba. Modeling the shape of the scene: a holistic representation of the spatial envelope. IJCV, 42:145–175, 2001. [16] B. C. Russell, A. Torralba, K. P. Murphy, and W. T. Freeman. Labelme: a database and webbased tool for image annotation. IJCV, 77(1):157–173, 2008. [17] B. Schoelkopf and A. Smola. Learning with Kernels Support Vector Machines, Regularization, Optimization, and Beyond. MIT Press,, 2002. [18] A. Talwalkar, S. Kumar, and H. Rowley. Large-scale manifold learning. In CVPR, 2008. [19] A. Torralba, R. Fergus, and W. T. Freeman. 80 million tiny images: a large database for nonparametric object and scene recognition. IEEE PAMI, 30(11):1958–1970, November 2008. [20] I. Tsang and J. Kwok. Large-scale sparsified manifold regularization. In NIPS, 2006. [21] L. van Ahn. The ESP game, 2006. [22] S. Vijayanarasimhan and K. Grauman. Keywords to visual categories: Multiple-instance learning for weakly supervised object categorization. In CVPR, 2008. [23] Y. Weiss, A. Torralba, and R. Fergus. Spectral hashing. In NIPS, 2008. [24] B. Yao, X. Yang, and S. C. Zhu. Introduction to a large scale general purpose ground truth dataset: methodology, annotation tool, and benchmarks. In EMMCVPR, 2007. [25] K. Yu, S. Yu, and V. Tresp. Blockwise supervised inference on large graphs. In ICML workshop on learning with partially classified training data, 2005. [26] D. Zhou, O. Bousquet, T. N. Lal, J. Weston, and B. Sch¨olkopf. Learning with local and global consistency. In NIPS, 2004. [27] X. Zhu. Semi-supervised learning literature survey. Technical Report 1530, University of Wisconsin Madison, 2008. [28] X. Zhu, Z. Ghahramani, and J. Lafferty. Semi-supervised learning using gaussian fields and harmonic functions. In In ICML, pages 912–919, 2003. [29] X. Zhu and J. Lafferty. Harmonic mixtures: combining mixture models and graph-based methods for inductive and scalable semi-supervised learning. In ICML, 2005. 9
2009
28
3,775
Sensitivity analysis in HMMs with application to likelihood maximization Pierre-Arnaud Coquelin, Vekia, Lille, France pacoquelin@vekia.fr Romain Deguest∗ Columbia University, New York City, NY 10027 rd2304@columbia.edu Rémi Munos INRIA Lille - Nord Europe, Sequel Project, France remi.munos@inria.fr Abstract This paper considers a sensitivity analysis in Hidden Markov Models with continuous state and observation spaces. We propose an Infinitesimal Perturbation Analysis (IPA) on the filtering distribution with respect to some parameters of the model. We describe a methodology for using any algorithm that estimates the filtering density, such as Sequential Monte Carlo methods, to design an algorithm that estimates its gradient. The resulting IPA estimator is proven to be asymptotically unbiased, consistent and has computational complexity linear in the number of particles. We consider an application of this analysis to the problem of identifying unknown parameters of the model given a sequence of observations. We derive an IPA estimator for the gradient of the log-likelihood, which may be used in a gradient method for the purpose of likelihood maximization. We illustrate the method with several numerical experiments. 1 Introduction We consider a parameterized hidden Markov model (HMM) defined on continuous state and observation spaces. The HMM is defined by a state process (Xt)t≥0 ∈X and an observation process (Yt)t≥1 ∈Y that are parameterized by a continuous parameter θ = (θ1, . . . , θd) ∈Θ, where Θ is a compact subset of Rd. The state process is a Markov chain taking its values in a (measurable) state space X, with initial probability measure µ ∈M(X) (i.e. X0 ∼µ) and Markov transition kernel K(θ, xt, dxt+1). We assume that we can sample this Markov chain using a transition function F and independent random numbers, i.e. for all t ≥0, Xt+1 = F(θ, Xt, Ut), with Ut i.i.d. ∼ν, (1) where F : Θ × X × U →X and (U, σ(U), ν) is a probability space. In many practical situations U = [0, 1]p, ν is uniform, thus Ut is a p-uple of uniform random numbers. For simplicity, we adopt the notations F(θ, x−1, u) ≜Fµ(θ, u), where Fµ is the first transition function (i.e. X0 = Fµ(θ, U−1) with U−1 ∼ν). The observation process (Yt)t≥1 lies in a (measurable) space Y and is linked with the state process by the conditional probability measure P(Yt ∈dyt|Xt = xt) = g(θ, xt, yt) dyt, where g : Θ × ∗also affiliated with CMAP, Ecole Polytechnique, France 1 X × Y →[0, 1] is the marginal density function of Yt given Xt. We assume that observations are conditionally independent given the state. Since the transition and observation processes are parameterized by the parameter θ, the state Xt and the observation Yt processes depend explicitly on θ. For notation simplicity we will omit to write the dependence of θ (in K, F, g, Xt, Yt, ...) when there is no possible ambiguity. One of the main interest in HMMs is to recover the state at time n given a sequence of past observations (y1, . . . , yn) (written y1:n). The filtering distribution (or belief state) πn(dxn) ≜P(Xn ∈dxn|Y1:n = y1:n) is the distribution of Xn conditioned on the information y1:n. We define analogously the predictive distribution πn+1|n(dxn+1) ≜P(Xn+1 ∈dxn+1|Y1:n = y1:n). Our contribution is an Infinitesimal Perturbation Analysis (IPA) that estimates the gradient ∇πn (where ∇refers to the derivative with respect to the parameter θ) of the filtering distribution πn. More precisely, we estimate ∇πn(f) (where π(f) ≜ ∫ X f(x)π(dx)) for any integrable function f under the filtering distribution πn. We also consider as application, the problem of parameter identification in HMMs which consists in estimating the (unknown) parameter θ∗of the model that has served to generate the sequence of observations. In a Maximum Likelihood (ML) approach, one searches for the parameter θ that maximizes the likelihood (or its logarithm) given the sequence of observations. The log-likelihood of parameter θ is defined by ln(θ) ≜log pθ(y1:n) where pθ(y1:n) dy1:n ≜P(Y1:n(θ) ∈dy1:n). The Maximum Likelihood (ML) estimator ˆθn ≜arg maxθ∈Θ ln(θ) is asymptotically consistent (in the sense that ˆθn converges almost surely to the true parameter θ∗when n →∞under some identifiably conditions and mild assumptions on the model, see Theorem 2 of [DM01]). Thus, using the ML approach, the parameter identification problem reduces to an optimization problem. Our second contribution is a sensitivity analysis of the predictive distribution ∇πt+1|t, for t < n, which enables to estimate the gradient ∇ln(θ) of the log-likelihood function, which may be used in a (stochastic) gradient method for the purpose of optimizing the likelihood. The approach is numerically illustrated on two parameter identification problems (autoregressive model and a stochastic volatility model) and compared to other approaches (EM algorithm, the Kalman filter, and the Likelihood ratio approach) when these latter apply. 2 Links with other works First, let us mention that we are interested in the continuous state case since numerous applications in signal processing, finance, robotics, or telecommunications naturally fit in this framework. In the general setting there exists no closed-form expression of the filtering distribution (unlike in finite spaces where the Viterbi algorithm may apply or in linear-Gaussian models where the Kalman filter can be used). Thus, in this paper, we will make use of the so-called Sequential Monte Carlo methods (SMC) (also known as Particle Filters) which are numerical tools that can be applied to a large class of models, see e.g. [DFG01]. For illustration, a challenging example in finance is the problem of parameter estimation in the stochastic volatility model, which is a non-linear nonGaussian continuous space HMM parameterized by three continuous parameters (see e.g. [ME07]) which will be described in the experimental section. A usual approach for parameter estimation consists in performing a maximum likelihood estimation (MLE), i.e. search for the most likely value of the parameter, given the observed data. For finite state space problems, the Expectation Maximization (EM) algorithm is a popular method for solving the MLE problem. However, in continuous space problems, see [CM05], the EM algorithm is difficult to use mainly because the Expectation part relies on the estimation of the posterior path measure which is intractable in many situations. The Maximization part may also be very complicated and timeconsuming when the model does not belong to a linear or exponential family. An alternative method consists in using brute force optimization methods based on the evaluation of the likelihood such as grid-based or simulated annealing methods. These approaches, which can be seen as black-box optimization are not very efficient in high dimensional parameter spaces. 2 Another approach is to treat the parameter as part of the state variable and then compute the optimal filter (see [DFG01] and [Sto02]). In this case, the Bayesian posterior distribution of the parameter is a marginal of the optimal filter. It is well known that those methods are stable only under certain conditions, see [Pap07], and do not perform well in practice for a large number of time steps. A last solution consists in using an optimization procedure based on the evaluation of the gradient of the log-likelihood function with respect to the parameter. These approaches have been studied in the field of continuous space HMMs e.g. in [DT03, FLM03, PDS05, Poy06]. The idea was to use a likelihood ratio approach (also called score method) to evaluate the gradient of the likelihood. This approach suffers from high variance of the estimator, in particular for problems with small noise in the dynamic. To tackle this issue, [PDS05] proposed to use a marginal particle filter instead of a simple path-based particle filter as Monte Carlo approximation method. This approach is efficient in terms of variance reduction but its computational complexity becomes quadratic in the number of particles instead of being linear, like in path-based particle methods. The IPA approach proposed in this paper is an alternative gradient-based maximum likelihood approach. Compared with works on gradient approaches previously cited, the IPA provides usually a lower variance estimators than the likelihood ratio methods, and its numerical complexity is linear in the number of particles. Other works related to ours are the so-called tangent filter approach described in [CGN01] for dynamics coming from a discretization of a diffusion process, and the Finite-Difference (FD) approach described in a different setting (i.e. policy gradient in Partially Observable Markov Decision Processes) in [CDM08]. A similar FD estimator could be designed in our setting too but the resulting FD estimator would be biased (like usual FD schemes) whereas the IPA estimator is not. 3 Sequential Monte Carlo methods (SMC) Given a measurable test function f : X →R, we have: πn(f) ≜E[f(Xn)|Y1:n = y1:n] = ∫ f(xn) ∏n t=0 K(xt−1, dxt)Gt(xt) ∫∏n t=0 K(xt−1, dxt)Gt(xt) = E[f(Xn) ∏n t=0 Gt(Xt)] E[∏n t=0 Gt(Xt)] . (2) where we used the simplified notation: Gt(xt) ≜g(xt, yt) and G0(x0) ≜1. In general, it is impossible to write πn(f) analytically except for specific cases (such as linear/Gaussian with Kalman filtering). In this paper, we consider a numerical approximation of πn(f) based on a SMC method. But it should be mentioned that other methods (such as Extended Kalman filter, quantization methods, Markov Chain Monte Carlo methods) may be used as well to build the IPA estimator that we propose in the next section. The basic SMC method, called Bootstrap Filter, see [DFG01] for details, approximates πn(f) by an empirical distribution πN n (f) ≜1 N ∑N i=1 f(xi n) made of N particles x1:N n . Algorithm 1 Generic Sequential Monte Carlo for t = 1 to n do Sampling: Sample ui t−1 iid ∼ν and set exi t = F(xi t−1, ui t−1), ∀i ∈{1, . . . , N}. Then define the importance sampling weights wi t = Gt(exi t) PN j=1 Gt(exj t), Resampling: Set xi t = exki t , ∀i ∈{1, . . . , N}, where k1:N are indices selected from the weights w1:N t . end for RETURN: πN n (f) = 1 N ∑N i=1 f(xi n) The sampling (or transition) step generates a successor particle population ex1:N t according to the state dynamics from the previous population x1:N t−1. The importance sampling weights w1:N t are evaluated, and the resampling (or selection) step resamples (with replacement) N particles x1:N t from the set ex1:N t according to the weights w1:N t . Resampling is used to avoid the problem of degeneracy of the algorithm, i.e. that most of the weights decreases to zero. It consists in selecting new parti3 cle positions such as to preserve a consistency property (i.e. ∑N i=1 wi tφ(exi t) = E[ 1 N ∑N i=1 φ(xi t)]). The simplest version introduced in [GSS93] chooses the selection indices k1:N t by an independent sampling from the set {1, . . . , N} according to a multinomial distribution with parameters w1:N t , i.e. P(ki t = j) = wj t, for all 1 ≤i ≤N. The idea is to replicate the particles in proportion to their weights. Many variants have been proposed in the literature, among which the stratified resampling method [Kit96] which is optimal in terms of variance minimization. Convergence issues of πN n (f) to πn(f) (e.g. Law of Large Numbers or Central Limit Theorems) are discussed in [Del04] or [DM08]. For our purpose we note that under mild conditions on f, πN n (f) is an asymptotically unbiased (see [DMDP07] for the asymptotic expression of the bias) and consistent estimator of πn(f). 4 Infinitesimal Perturbation Analysis in HMMs 4.1 Sensitivity analysis of the filtering distribution The following decomposition of the gradient of the filtering distribution πn applied to a function f: ∇[πn(f)] = ∇ [E[f(Xn) ∏n t=0 Gt(Xt)] E[∏n t=0 Gt(Xt)] ] = ∇E[f(Xn) ∏n t=0 Gt(Xt)] E[∏n t=0 Gt(Xt)] −πn(f)∇E[∏n t=0 Gt(Xt)] E[∏n t=0 Gt(Xt)] (3) shows that the problem of finding an estimator of ∇πn(f) is reduced to the problem of finding an estimator of ∇E[f(Xn) ∏n t=0 Gt(Xt)]. There are two dominant infinitesimal methods for estimating the gradient of an expectation in a Markov chain: the Infinitesimal Perturbation Analysis (IPA) method and the Score Function (SF) method (also called likelihood ratio method), see for instance [Gla91] and [Pfl96] for a detailed presentation of both methods. SF has been used in [DT03, FLM03] to estimate ∇πn. Although IPA is known for having a lower variance than SF in general, as far as we know, it has never been used in this context. This is therefore the object of this Section. Under appropriate smoothness assumptions (see Proposition 1 below), the gradient of an expectation over a random variable X is equal to an expectation involving the pair of random variables (X, ∇X) ∇E[f(X)] = E[∇[f(X)]] = E[f ′(X)∇X], (where ′ refers to the derivative with respect to the state variable). Applying this property to estimate ∇E [f(Xn) ∏n t=0 Gt(Xt)], we deduce ∇E [ f(Xn) n ∏ t=0 Gt(Xt) ] = E [ ∇ [ f(Xn) n ∏ t=0 Gt(Xt) ]] = E [( ∇[f(Xn)] + f(Xn) n ∑ t=0 ∇[Gt(Xt)] Gt(Xt) ) n ∏ t=0 Gt(Xt) ] = E [( f ′(Xn)∇Xn + f(Xn) n ∑ t=0 G′ t(Xt)∇Xt + ∇Gt(Xt) Gt(Xt) ) n ∏ t=0 Gt(Xt) ] . (4) Now we define an augmented Markov chain (Xt, Zt, Rt)t≥0 by the following recursive relations (where Zt ≜∇Xt) { X0 = Fµ(U−1), U−1 ∼ν Z0 = ∇Fµ(U−1), R0 = 0, ∀t ≥0,    Xt+1 = F(Xt, Ut), where Ut ∼ν Zt+1 = ∇F(Xt, Ut) + F ′(Xt, Ut)Zt, Rt+1 = Rt + G′ t+1(Xt+1)Zt+1+∇Gt+1(Xt+1) Gt+1(Xt+1) , By introducing this augmented Markov Chain in Equation (4) and using Equation (3) we can rewrite ∇πn(f) as: ∇πn(f) = E[(f ′(Xn)Zn + f(Xn)Rn) ∏n t=0 Gt(Xt)] E[∏n t=0 Gt(Xt)] −πn(f)E[Rn ∏n t=0 Gt(Xt)] E[∏n t=0 Gt(Xt)] = E[(f ′(Xn)Zn + Rn(f(Xn) −πn(f))) ∏n t=0 Gt(Xt)] E[∏n t=0 Gt(Xt)] . (5) We now state some sufficient conditions under which the previous derivations are sound. 4 Proposition 1. Equation (5) is valid on Θ whenever the following conditions are satisfied: • for all θ ∈Θ, the path θ 7→(X0, X1, · · · , Xn)(θ) is almost surely (a.s.) differentiable, • for all θ ∈Θ, f is a.s. continuously differentiable at Xn(θ), and for all 1 ≤t ≤n, Gt is a.s. continuously differentiable at (θ, Xt(θ)), • θ 7→f(Xn(θ)) and for all 1 ≤t ≤n, θ 7→Gt(θ, Xt(θ)) are a.s. continuous and piecewise differentiable throughout Θ, • Let D be the random subset of Θ at which f(Xn(θ)) or one Gt(θ, Xt(θ)) fails to be differentiable. We require that E[sup θ /∈D |f ′(Xn) Zn + Rn (f(Xn) −πn(f))| ∏n t=0 Gt(Xt)] < ∞, The proof of this Proposition is a direct application of Theorem 1.2 from [Gla91]. We notice that requiring the a.s. differentiability of the path θ 7→(X0, X1, · · · , Xn)(θ) is equivalent to requiring that for all θ ∈Θ, the transition function F is a.s. continuously differentiable with respect to θ. From Equation (5), we can derive the IPA estimator of ∇πn(f) by using a SMC algorithm: IN n ≜1 N N ∑ i=1 [ f ′(xi n)zi n + f(xi n) ( ri n −1 N N ∑ j=1 rj n )] , (6) where (xi n, zi n, ri n) are particles derived by using a SMC algorithm on the augmented Markov chain (Xt, Zt, Rt) described in Algorithm 2. Algorithm 2 IPA estimation of ∇πn for t = 1 to n do For all i ∈{1, . . . , N} do Sample ui t−1 iid ∼ν and set ˜xi t = F(xi t−1, ui t−1), Set ˜zi t = ∇F(xi t−1, ui t−1) + F ′(xi t−1, ui t−1)zi t−1, Set ˜ri t = ri t−1 + G′ t(˜xi t)˜zi t+∇Gt(˜xi t) Gt(˜xi t) , and compute the weights wi,t = Gt(˜xi t) P j Gt(˜xj t) Set (xi t, zi t, ri t) = (˜xki t , ˜zki t , ˜rki t ), where k1:N are the indices selected from w1:N t , end for RETURN: IN n = 1 N ∑N i=1 [ f ′(xi n)zi n + f(xi n) ( ri n −1 N ∑N j=1 rj n )] Proposition 2. Under the assumptions of Proposition 1, the estimator IN n defined by (6) has a bias O(N −1) and is consistent with ∇πn(f), i.e. E[IN n ] = ∇πn(f) + O(N −1), and limN→∞IN n = ∇πn(f) almost surely. In addition, its (asymptotic) variance is O(N −1). Proof. We use the general SMC convergence properties for Feynman-Kac (FK) models (see [Del04] or [DM08]) which, applied to a FK flow with Markov chain X0:n, (random) potential functions G(X0:n), and test function H(X0:n), states that the SMC estimate: 1 N ∑N i=1 H(xi 0:n) is consistent with E[H(X0:n) Qn t=0 G(Xt)] E[Qn t=0 G(Xt)] . Moreover, an asymptotic expression of the bias, given in [DMDP07], shows that it is of order O(N −1). Applying those results to the test function H ≜f ′(Xn)Zn +Rn(f(Xn)−πn(f)), using the representation (5) of the gradient, we deduce that the SMC estimator (6) is asymptotically unbiased and consistent with ∇πn(f). Now the asymptotic variance is O(N −1) since the Central Limit Theorem (see e.g. [Del04, DM08]) applies to the IPA estimator (6) of (5). Remark 1. Notice that the computation of the gradient estimator requires O(nNmd) (where m is the dimension of X) elementary operations, which is linear in the number of particles N and linear in the number of parameters d, and has memory requirement O(Nmd). 5 4.2 Gradient of the log-likelihood In the Maximum Likelihood approach for the problem of parameter identification, one may follow a stochastic gradient method for maximizing the log-likelihood ln(θ) where the gradient ∇ln(θ) = n−1 ∑ t=0 ∇πt+1|t(Gt+1) πt+1|t(Gt+1) is obtained by estimating each term ∇πt+1|t(Gt+1) of the sum using a similar decomposition as in (5) and (4) for the predictive distribution applied to Gt+1: ∇πt+1|t(Gt+1) = ∇ [ E[Gt+1(Xt+1) ∏t k=0 Gk(Xk)] E[∏t k=0 Gk(Xk)] ] = ∇E[Gt+1(Xt+1) ∏t k=0 Gk(Xk)] E[∏t k=0 Gk(Xk)] −πt+1|t(Gt+1)∇E[∏t k=0 Gk(Xk)] E[∏t k=0 Gk(Xk)] with ∇E[Gt+1(Xt+1) t∏ k=0 Gk(Xk)] = E [( ∇Gt+1(Xt+1) + G′ t+1(Xt+1)∇Xt+1 +Gt+1(Xt+1) t ∑ k=0 G′ k(Xk)∇Xk + ∇Gk(Xk) Gk(Xk) ) t∏ k=0 Gk(Xk) ] . We deduce the IPA estimator of ∇ln(θ) JN n ≜ n ∑ t=1 ∑N i=1 ( ∇Gt(˜xi t) + G′ t(˜xi t)˜zi t + Gt(˜xi t)(ri t−1 −1 N ∑ j rj t−1) ) ∑N i=1 Gt(˜xi t) , where (xi n, zi n, ri n) (and (˜xi n, ˜zi n, ˜ri n)) are particles derived by using a SMC algorithm on the augmented Markov chain (Xt, Zt, Rt) described in the previous subsection. Using similar arguments as those detailed in proofs of Propositions 1 and 2, we have that this estimator is asymptotically unbiased and consistent with ∇ln(θ). The resulting gradient algorithm is described in Algorithm 3. The steps γk are chosen appropriately so that local convergence occurs (e.g. such that ∑ k≥1 γk = ∞and ∑ k≥1 γ2 k < ∞), see e.g. [KY97] for a detailed analysis of Stochastic Approximation algorithms. Algorithm 3 Likelihood Maximization by gradient ascent using the IPA estimator of ∇ln(θ) for k = 1, 2, . . . , Number of gradient steps do Initialize JN 0 = 0 for t = 1 to n do For all i ∈{1, . . . , N} do Sample ui t−1 iid ∼ν and set ˜xi t = F(xi t−1, ui t−1), Set ˜zi t = ∇F(xi t−1, ui t−1) + F ′(xi t−1, ui t−1)zi t−1, Set JN t = JN t−1 + PN i=1(∇Gt(˜xi t)+G′ t(˜xi t)˜zi t+Gt(˜xi t)(ri t−1−1 N P j rj t−1)) PN i=1 Gt(˜xi t) , Set ˜ri t = ri t−1 + G′ t(˜xi t)˜zi t+∇Gt(˜xi t) Gt(˜xi t) and compute the weights wi t = Gt(˜xi t) P j Gt(˜xj t) Set (xi t, zi t, ri t) = (˜xki t , ˜zki t , ˜rki t ), where k1:N are indices selected from w1:N t . end for Perform a gradient ascent step: θk = θk−1 + γk JN n (θk−1) end for 6 1 2 3 0.81 0.82 0.83 0.84 0.85 0.86 0.87 0.88 0.89 φ Method 1 2 3 0.75 0.8 0.85 0.9 0.95 1 σ Method 1 2 3 1.06 1.08 1.1 1.12 1.14 1.16 1.18 1.2 1.22 1.24 β Method Figure 1: Box-and-whiskers plots of the three parameters (φ, σ, β) estimates for the AR1 model with θ⋆= (0.8, 1.0, 1.0). We compare three methods: (1) Kalman, (2) EM and (3) IPA. Here we used n = 500 observations and N = 102 particles. 5 Numerical experiments We consider two typical problems and report our results focussing on the variance of the estimator: Autoregressive model AR1 is a simple linear-Gaussian HMMs thus may be solved by other methods (such as Kalman filtering and EM algorithms) which enables to compare the performances of several algorithms for parameter identification. The dynamics are X0 ∼N(0, σ2), and for t ≥1, Xt = φXt−1 + σUt, Yt = Xt + βVt, (7) where Ut i.i.d. ∼ N(0, 1) and Vt i.i.d. ∼ N(0, 1) are independent sequences of random variables, and θ = (φ, σ, β) is a three-dimensional parameter in (R+)3. Stochastic volatility model is very popular in the field of quantitative finance [ME07] to evaluate derivative securities, such as options. This is a non-linear non-Gaussian model, so the Kalman method cannot be used anymore. The dynamics are X0 ∼N(0, σ2), and for t ≥1, Xt = φXt−1 + σUt, Yt = β exp (Xt/2) Vt, (8) where again Ut i.i.d. ∼N(0, 1) and Vt i.i.d. ∼N(0, 1) and the parameter θ = (φ, σ, β) ∈(R+)3. 5.1 Parameter identification Figure 1 shows the results of our IPA gradient estimator for the AR1 parameter identification problem and compares those with two other methods: Kalman filter (K) and EM (which apply since the model is linear-Gaussian). The unknown parameter used is θ∗= (0.8, 1.0, 1.0). Notice the apparent bias of the three methods in the estimation of θ∗(even for Kalman which provides here the exact filtering distribution) since the number of observations n = 500 is finite. For IPA, we used N = 102 particles and 150 gradient iterations. Algorithm 3 was run 50 times with random starting points uniformly drawn between [θ, ¯θ], where θ = (0.5, 0.5, 0.5) and ¯θ = (1.0, 1.5, 1.5) in order to illustrate that the method is not sensitive to the starting point. We observe that in terms of estimation accuracy, IPA is very competitive to the other methods, Kalman and EM, which are designed for specific models (here linear-Gaussian). The IPA method applies to general models, for example, to the stochastic volatility model. Figure 2 shows the sets of estimates of θ⋆= (0.8, 1.0, 1.0) using IPA with n = 103 observations and N = 102 particles (no comparison is made here since Kalman does not apply and EM becomes more complicated). 5.2 Variance study for Score and IPA algorithms IPA and Score methods provide gradient estimators for general models. We compare the variance of the corresponding estimators of the gradient ∇ln for the AR1 since for this model we know its exact value (using Kalman). 7 1 2 3 0.8 0.85 0.9 0.95 1 1.05 1.1 1.15 1.2 1.25 Values Parameter number Figure 2: Box-and-whiskers plots of the three parameters (φ, σ, β) estimates for the IPA method applied to the stochastic volatility model with θ⋆= (0.8, 1.0, 1.0). We used n = 103 observations and N = 102 particles. Figure 3 shows the variance of the IPA and Score estimators of the partial derivative ∂σln (we focused our study on σ since the problem of volatility estimation is challenging, and also because the value of σ influences the respective performances of the two algorithms, which is not the case for the other parameters φ, β). We used n = N = 103. The IPA estimator performs better than the Score estimator for small values of σ. On the other hand, in case of huge variance in the state model, it is better to use the Score estimator. 0.2 0.4 0.6 0.8 1 1.2 1.4 10 20 30 40 50 60 70 80 90 100 110 σ vn N Score method IPA method Figure 3: Variance of the log-likelihood derivative ∂σln computed with both the IPA and Score methods. The true parameter is θ∗= (φ⋆, σ⋆, β⋆) = (0.8, 1.0, 1.0) and the estimations are computed at θ = (0.7, σ, 0.9). Let us mention that the variance of the IPA (as well as Score) estimator increases when the number of observations n increases. However, under weak conditions on the HMM [LM00], the filtering distribution and its gradient forget exponentially fast the initial distribution. This property has already been used for EM estimators in [CM05] to show that fixed-lag smoothing drastically reduces the variance without significantly raising the bias. Similar smoothing (either fixed-lag or discounted) would provide efficient variance reduction techniques for the IPA estimator as well. 6 Conclusions We proposed a sensitivity analysis in HMMs based on an Infinitesimal Perturbation Analysis and provided a computationally efficient gradient estimator that provides an interesting alternative to the usual Score method. We showed how this analysis may be used for estimating the gradient of the log-likelihood in a gradient-based likelihood maximization approach for the purpose of parameter identification. Finally let us mention that estimators of higher-order derivatives (e.g. Hessian) could be derived as well along this IPA approach, which would enable to use more sophisticated optimization techniques (e.g. Newton method). 8 References [CDM08] P.A. Coquelin, R. Deguest, and R. Munos. Particle filter-based policy gradient in POMDPs. In Neural Information Processing Systems, 2008. [CGN01] F. Cérou, F. Le Gland, and N. J. Newton. Stochastic particle methods for linear tangent filtering equations. In J.-L. Menaldi, E. Rofman, and A. Sulem, editors, Optimal Control and PDE’s - Innovations and Applications, in honor of Alain Bensoussan’s 60th anniversary, pages 231–240. IOS Press, 2001. [CM05] O. Cappé and E. Moulines. On the use of particle filtering for maximum likelihood parameter estimation. European Signal Processing Conference, 2005. [Del04] P. Del Moral. Feynman-Kac Formulae, Genealogical and Interacting Particle Systems with Applications. Springer, 2004. [DFG01] A. Doucet, N. De Freitas, and N. Gordon. Sequential Monte Carlo Methods in Practice. Springer, 2001. [DM01] R. Douc and C. Matias. Asymptotics of the maximum likelihood estimator for general hidden markov models. Bernouilli, 7:381–420, 2001. [DM08] R. Douc and E. Moulines. Limit theorems for weighted samples with applications to sequential monte carlo methods. Annals of Statistics, 36:5:2344–2376, 2008. [DMDP07] P. Del Moral, A. Doucet, and GW Peters. Sharp Propagation of Chaos Estimates for Feynman–Kac Particle Models. SIAM Theory of Probability and its Applications, 51 (3):459–485, 2007. [DT03] A. Doucet and V.B. Tadic. Parameter estimation in general state-space models using particle methods. Ann. Inst. Stat. Math, 2003. [FLM03] J. Fichoud, F. LeGland, and L. Mevel. Particle-based methods for parameter estimation and tracking : numerical experiments. Technical Report 1604, IRISA, 2003. [Gla91] P. Glasserman. Gradient estimation via perturbation analysis. Kluwer, 1991. [GSS93] N. Gordon, D. Salmond, and A. F. M. Smith. Novel approach to nonlinear and nongaussian bayesian state estimation. In Proceedings IEE-F, volume 140, pages 107–113, 1993. [Kit96] G. Kitagawa. Monte-Carlo filter and smoother for non-Gaussian nonlinear state space models. J. Comput. Graph. Stat., 5:1–25, 1996. [KY97] H. J. Kushner and G. Yin. Stochastic Approximation Algorithms and Applications. Springer-Verlag, Berlin and New York, 1997. [LM00] F. LeGland and L. Mevel. Exponential forgetting and geometric ergodicity in hidden markov models. mathematic and control sugnal and systems, 13:63–93, 2000. [ME07] R. Mamon and R.J. Elliott. Hidden markov models in finance. International Series in Operations Research and Management Science, 104, 2007. [Pap07] A. Papavasiliou. A uniformly convergent adaptive particle filter. Journal of Applied Probability, 42 (4):1053–1068, 2007. [PDS05] G. Poyadjis, A. Doucet, and S.S. Singh. Particle methods for optimal filter derivative: Application to parameter estimation. In IEEE ICASSP, 2005. [Pfl96] G. Pflug. Optimization of Stochastic Models: The Interface Between Simulation and Optimization. Kluwer Academic Publishers, 1996. [Poy06] G. Poyiadjis. Particle Method for Parameter Estimation in General State Space Models. PhD thesis, University of Cambridge, 2006. [Sto02] G. Storvik. Particle filters for state-space models with the presence of unknown static parameters. IEEE Transactions on Signal Processing, 50:281–289, 2002. 9
2009
29
3,776
Compressed Least-Squares Regression Odalric-Ambrym Maillard and R´emi Munos SequeL Project, INRIA Lille - Nord Europe, France {odalric.maillard, remi.munos}@inria.fr Abstract We consider the problem of learning, from K data, a regression function in a linear space of high dimension N using projections onto a random subspace of lower dimension M. From any algorithm minimizing the (possibly penalized) empirical risk, we provide bounds on the excess risk of the estimate computed in the projected subspace (compressed domain) in terms of the excess risk of the estimate built in the high-dimensional space (initial domain). We show that solving the problem in the compressed domain instead of the initial domain reduces the estimation error at the price of an increased (but controlled) approximation error. We apply the analysis to Least-Squares (LS) regression and discuss the excess risk and numerical complexity of the resulting “Compressed Least Squares Regression” (CLSR) in terms of N, K, and M. When we choose M = O( √ K), we show that CLSR has an estimation error of order O(log K/ √ K). 1 Problem setting We consider a regression problem where we observe data DK = ({xk, yk}k≤K) (where xk ∈X and yk ∈R) are assumed to be independently and identically distributed (i.i.d.) from some distribution P, where xk ∼PX and yk = f ∗(xk) + ηk(xk), where f ∗is the (unknown) target function, and ηk a centered independent noise of variance σ2(xk). For a given class of functions F, and f ∈F, we define the empirical (quadratic) error LK(f) def = 1 K K X k=1 [yk −f(xk)]2, and the generalization (quadratic) error L(f) def = E(X,Y )∼P [(Y −f(X))2]. Our goal is to return a regression function bf ∈F with lowest possible generalization error L( bf). Notations: In the sequel we will make use of the following notations about norms: for h : X 7→R, we write ||h||P for the L2 norm of h with respect to (w.r.t.) the measure P, ||h||PK for the L2 norm of h w.r.t. the empirical measure PK, and for u ∈Rn, ||u|| denotes by default Pn i=1 u2 i 1/2. The measurable function minimizing the generalization error is f ∗, but it may be the case that f ∗/∈F. For any regression function bf, we define the excess risk L( bf) −L(f ∗) = || bf −f ∗||2 P , which decomposes as the sum of the estimation error L( bf)−inff∈F L(f) and the approximation error inff∈F L(f) −L(f ∗) = inff∈F ||f −f ∗||2 P which measures the distance between f ∗and the function space F. 1 In this paper we consider a class of linear functions FN defined as the span of a set of N functions {ϕn}1≤n≤N called features. Thus: FN def = {fα def = PN n=1 αnϕn, α ∈RN}. When the number of data K is larger than the number of features N, the ordinary Least-Squares Regression (LSR) provides the LS solution fbα which is the minimizer of the empirical risk LK(f) in FN. Note that here LK(fα) rewrites 1 K ||Φα −Y ||K where Φ is the K × N matrix with elements (ϕn(xk))1≤n≤N,1≤k≤K and Y the K-vector with components (yk)1≤k≤K. Usual results provide bound on the estimation error as a function of the capacity of the function space and the number of data. In the case of linear approximation, the capacity measures (such as covering numbers [23] or the pseudo-dimension [16]) depend on the number of features (for example the pseudo-dimension is at most N + 1). For example, let fbα be a LS estimate (minimizer of LK in FN), then (a more precise statement will be stated later in Subsection 3) the expected estimation error is bounded as: E  L(fbα) −inf f∈FN L(f)  ≤cσ2 N log K K , (1) where c is a universal constant, σ def = supx∈X σ(x), and the expectation is taken with respect to P. Now, the excess risk is the sum of this estimation error and the approximation error inff∈FN ||f − f ∗||P of the class FN. Since the later usually decreases when the number of features N increases [13] (e.g. when S N FN is dense in L2(P)), we see the usual tradeoff between small estimation error (low N) and small approximation error (large N). In this paper we are interested in the setting when N is large so that the approximation error is small. Whenever N is larger than K we face the overfitting problem since there are more parameters than actual data (more variables than constraints), which is illustrated in the bound (1) which provides no information about the generalization ability of any LS estimate. In addition, there are many minimizers (in fact a vector space of same dimension as the null space of ΦT Φ) of the empirical risk. To overcome the problem, several approaches have been proposed in the literature: • LS solution with minimal norm: The solution is the minimizer of the empirical error with minimal (l1 or l2)-norm: bα = arg minΦα=Y ||α||1 or 2, (or a robust solution arg min||Φα−Y ||2≤ε ||α||1). The choice of ℓ2-norm yields the ordinary LS solution. The choice of ℓ1-norm has been used for generating sparse solutions (e.g. the Basis Pursuit [10]), and assuming that the target function admits a sparse decomposition, the field of Compressed Sensing [9, 21] provides sufficient conditions for recovering the exact solution. However, such conditions (e.g. that Φ possesses a Restricted Isometric Property (RIP)) does not hold in general in this regression setting. On another aspect, solving these problems (both for l1 or l2-norm) when N is large is numerically expensive. • Regularization. The solution is the minimizer of the empirical error plus a penalty term, for example bf = arg min f∈FN LK(f) + λ||f||p p, for p = 1 or 2. where λ is a parameter and usual choices for the norm are ℓ2 (ridge-regression [20]) and ℓ1 (LASSO [19]). A close alternative is the Dantzig selector [8, 5] which solves: bα = arg min||α||1≤λ ||ΦT (Y −Φα)||∞. The numerical complexity and generalization bounds of those methods depend on the sparsity of the target function decomposition in FN. Now if we possess a sequence of function classes (FN)N≥1 with increasing capacity, we may perform structural risk minimization [22] by solving in each model the empirical risk penalized by a term that depends on the size of the model: bfN = arg minf∈FN,N≥1 LK(f) + pen(N, K), where the penalty term measures the capacity of the function space. In this paper we follow another approach where instead of searching in the large space FN (where N > K) for a solution that minimizes the empirical error plus a penalty term, we simply search for the empirical error minimizer in a (randomly generated) lower dimensional subspace GM ⊂FN (where M < K). Our contribution: We consider a set of M random linear combinations of the initial N features and perform our favorite LS regression algorithm (possibly regularized) using those “compressed 2 features”. This is equivalent to projecting the K points {ϕ(xk) ∈RN, k = 1..K} from the initial domain (of size N) onto a random subspace of dimension M, and then performing the regression in the “compressed domain” (i.e. span of the compressed features). This is made possible because random projections approximately preserve inner products between vectors (by a variant of the Johnson-Lindenstrauss Lemma stated in Proposition 1. Our main result is a bound on the excess risk of a linear estimator built in the compressed domain in terms of the excess risk of the linear estimator built in the initial domain (Section 2). We further detail the case of ordinary Least-Squares Regression (Section 3) and discuss, in terms of M, N, K, the different tradeoffs concerning the excess risk (reduced estimation error in the compressed domain versus increased approximation error introduced by the random projection) and the numerical complexity (reduced complexity of solving the LSR in the compressed domain versus the additional load of performing the projection). As a consequence, we show that by choosing M = O( √ K) projections we define a Compressed Least-Squares Regression which uses O(NK3/2) elementary operations to compute a regression function with estimation error (relatively to the initial function space FN) of order log K/ √ K up to a multiplicative factor which depends on the best approximation of f ∗in FN. This is competitive with the best methods, up to our knowledge. Related works: Using dimension reduction and random projections in various learning areas has received considerable interest over the past few years. In [7], the authors use a SVM algorithm in a compressed space for the purpose of classification and show that their resulting algorithm has good generalization properties. In [25], the authors consider a notion of compressed linear regression. For data Y = Xβ + ε, where β is the target and ε a standard noise, they use compression of the set of data, thus considering AY = AXβ + Aε, where A has a Restricted Isometric Property. They provide an analysis of the LASSO estimator built from these compressed data, and discuss a property called sparsistency, i.e. the number of random projections needed to recover β (with high probability) when it is sparse. These works differ from our approach in the fact that we do not consider a compressed (input and/or output) data space but a compressed feature space instead. In [11], the authors discuss how compressed measurements may be useful to solve many detection, classification and estimation problems without having to reconstruct the signal ever. Interestingly, they make no assumption about the signal being sparse, like in our work. In [6, 17], the authors show how to map a kernel k(x, y) = ϕ(x) · ϕ(y) into a low-dimensional space, while still approximately preserving the inner products. Thus they build a low-dimensional feature space specific for (translation invariant) kernels. 2 Linear regression in the compressed domain We remind that the initial set of features is {ϕn : X 7→R, 1 ≤n ≤N} and the initial domain FN def = {fα = PN n=1 αnϕn, α ∈RN} is the span of those features. We write ϕ(x) the N-vector of components (ϕn(x))n≤N. Let us now define the random projection. Let A be a M × N matrix of i.i.d. elements drawn for some distribution ρ. Examples of distributions are: • Gaussian random variables N(0, 1/M), • ± Bernoulli distributions, i.e. which takes values ±1/ √ M with equal probability 1/2, • Distribution taking values ± p 3/M with probability 1/6 and 0 with probability 2/3. The following result (proof in the supplementary material) states the property that inner-product are approximately preserved through random projections (this is a simple consequence of the JohnsonLindenstrauss Lemma): Proposition 1 Let (uk)1≤k≤K and v be vectors of RN. Let A be a M × N matrix of i.i.d. elements drawn from one of the previously defined distributions. For any ε > 0, δ > 0, for M ≥ 1 ε2 4 −ε3 6 log 4K δ , we have, with probability at least 1 −δ, for all k ≤K, |Auk · Av −uk · v| ≤ε||uk|| ||v||. 3 We now introduce the set of M compressed features (ψm)1≤m≤M such that ψm(x) def = PN n=1 Am,nϕn(x). We also write ψ(x) the M-vector of components (ψm(x))m≤M. Thus ψ(x) = Aϕ(x). We define the compressed domain GM def = {gβ = PM m=1 βmψm, β ∈RM} the span of the compressed features (vector space of dimension at most M). Note that each ψm ∈FN, thus GM is a subspace of FN. 2.1 Approximation error We now compare the approximation error assessed in the compressed domain GM versus in the initial space FN. This applies to the linear algorithms mentioned in the introduction such as ordinary LS regression (analyzed in details in Section 3), but also its penalized versions, e.g. LASSO and ridge regression. Define α+ = arg minα∈RN L(fα) −L(f ∗) the parameter of the best regression function in FN. Theorem 1 For any δ > 0, any M ≥15 log(8K/δ), let A be a random M × N matrix defined like in Proposition 1, and GM be the compressed domain resulting from this choice of A. Then with probability at least 1 −δ, inf g∈GM ||g−f ∗||2 P ≤8 log(8K/δ) M ||α+||2 E  ||ϕ(X)||2 +2 sup x∈X ||ϕ(x)||2 r log 4/δ 2K  + inf f∈FN ||f−f ∗||2 P . (2) This theorem shows the tradeoff in terms of estimation and approximation errors for an estimator bg obtained in the compressed domain compared to an estimator bf obtained in the initial domain: • Bounds on the estimation error of bg in GM are usually smaller than that of bf in FN when M < N (since the capacity of FN is larger than that of GM). • Theorem 1 says that the approximation error assessed in GM increases by at most O( log(K/δ) M )||α+||2E||ϕ(X)||2 compared to that in FN. Proof: Let us write f + def = fα+ = arg minf∈FN ||f −f ∗||P and g+ def = gAα+. The approximation error assessed in the compressed domain GM is bounded as inf g∈GM ||g −f ∗||2 P ≤ ||g+ −f ∗||2 P = ||g+ −f +||2 P + ||f + −f ∗||2 P , (3) since f + is the orthogonal projection of f ∗on FN and g+ belongs to FN. We now bound ||g+ − f +||2 P using concentration inequalities. Define Z(x) def = Aα+ · Aϕ(x) −α+ · ϕ(x). Define ε2 def = 8 M log(8K/δ). For M ≥15 log(8K/δ) we have ε < 3/4 thus M ≥ log(8K/δ) ε2/4−ε3/6. Proposition 1 applies and says that on an event E of probability at least 1 −δ/2, we have for all k ≤K, |Z(xk)| ≤ε||α+|| ||ϕ(xk)|| ≤ε||α+|| sup x∈X ||ϕ(x)|| def = C (4) On the event E, we have with probability at least 1 −δ′, ||g+ −f +||2 P = EX∼PX |Z(X)|2 ≤1 K K X k=1 |Z(xk)|2 + C2 r log(2/δ′) 2K ≤ ε2||α+||2 1 K K X k=1 ||ϕ(xk)||2 + sup x∈X ||ϕ(x)||2 r log(2/δ′) 2K  ≤ ε2||α+||2 E  ||ϕ(X)||2 + 2 sup x∈X ||ϕ(x)||2 r log(2/δ′) 2K  . where we applied two times Chernoff-Hoeffding’s inequality. Combining with (3), unconditioning, and setting δ′ = δ/2 then with probability at least (1 −δ/2)(1 −δ′) ≥1 −δ we have (2). □ 4 2.2 Computational issues We now discuss the relative computational costs of a given algorithm applied either in the initial or in the compressed domain. Let us write Cx(DK, FN, P) the complexity (e.g. number of elementary operations) of an algorithm A to compute the regression function bf when provided with the data DK and function space FN. We plot in the table below, both for the initial and the compressed versions of the algorithm A, the order of complexity for (i) the cost for building the feature matrix, (ii) the cost for computing the estimator, (iii) the cost for making one prediction (i.e. computing bf(x) for any x): Initial domain Compressed domain Construction of the feature matrix NK NKM Computing the regression function Cx(DK, FN, P) Cx(DK, GM, P) Making one prediction N NM Note that the values mentioned for the compressed domain are upper-bounds on the real complexity and do not take into account the possible sparsity of the projection matrix A (which would speed up matrix computations, see e.g. [2, 1]). 3 Compressed Least-Squares Regression We now analyze the specific case of Least-Squares Regression. 3.1 Excess risk of ordinary Least Squares regression In order to bound the estimation error, we follow the approach of [13] which truncates (up to the level ±L where L is a bound, assumed to be known, on ||f ∗||∞) the prediction of the LS regression function. The ordinary LS regression provides the regression function fbα where bα = argmin α∈argminα′∈RN ||Y −Φα′|| ||α||. Note that ΦΦT bα = ΦT Y , hence bα = Φ†Y ∈RN where Φ† is the Penrose pseudo-inverse of Φ1. Then the truncated predictor is: bfL(x) def = TL[fbα(x)], where TL(u) def =  u if |u| ≤L, L sign(u) otherwise. Truncation after the computation of the parameter bα ∈RN, which is the solution of an unconstrained optimization problem, is easier than solving an optimization problem under the constraint that ||α|| is small (which is the approach followed in [23]) and allows for consistency results and prediction bounds. Indeed, the excess risk of bfL is bounded as E(|| bf −f ∗||2 P ) ≤c′ max{σ2, L2}1 + log K K N + 8 inf f∈FN ||f −f ∗||2 P (5) where a bound on c′ is 9216 (see [13]). We have a simpler bound when we consider the expectation EY conditionally on the input data: EY (|| bf −f ∗||2 PK) ≤σ2 N K + inf f∈F ||f −f ∗||2 PK (6) Remark: Note that because we use the quadratic loss function, by following the analysis in [3], or by deriving tight bounds on the Rademacher complexity [14] and following Theorem 5.2 of Koltchinskii’s Saint Flour course, it is actually possible to state assumptions under which we can remove the log K term in (5). We will not further detail such bounds since our motivation here is not to provide the tightest possible bounds, but rather to show how the excess risk bound for LS regression in the initial domain extends to the compressed domain. 1In the full rank case, Φ† = (ΦT Φ)−1ΦT when K ≥N and Φ† = ΦT (ΦΦT )−1 when K ≤N 5 3.2 Compressed Least-Squares Regression (CLSR) CLSR is defined as the ordinary LSR in the compressed domain. Let bβ = Ψ†Y ∈RM, where Ψ is the K × M matrix with elements (ψm(xk))1≤m≤M,1≤k≤K. The CLSR estimate is defined as bgL(x) def = TL[gbβ(x)]. From Theorem 1, (5) and (6), we deduce the following excess risk bounds for the CLSR estimate: Corollary 1 For any δ > 0, set M = 8 ||α+||√ E||ϕ(X)||2 max(σ,L) q K log(8K/δ) c′(1+log K) . Then whenever M ≥ 15 log(8K/δ), with probability at least 1 −δ, the expected excess risk of the CLSR estimate is bounded as E(||bgL −f ∗||2 P ) ≤ 16 √ c′ max{σ, L}||α+|| p E||ϕ(X)||2 r (1 + log K) log(8K/δ) K ×  1 + supx ||ϕ(x)||2 E||ϕ(X)||2 r log 4/δ 2K  + 8 inf f∈FN ||f −f ∗||2 P . (7) Now set M = ||α+||√ E||ϕ(X)||2 σ p 8K log(8K/δ). Assume N > K and that the features (ϕk)1≤k≤K are linearly independent. Then whenever M ≥15 log(8K/δ), with probability at least 1 −δ, the expected excess risk of the CLSR estimate conditionally on the input samples is upper bounded as EY (||bgL −f ∗||2 PK) ≤4σ||α+|| p E||ϕ(X)||2 r 2 log(8K/δ) K  1 + supx ||ϕ(x)||2 E||ϕ(X)||2 r log 4/δ 2K  . Proof: Whenever M ≥15 log(8K/δ) we deduce from Theorem 1 and (5) that the excess risk of bgL is bounded as E(||bgL −f ∗||2 P ) ≤c′ max{σ2, L2}1 + log K K M +8 h8 log(8K/δ) M ||α+||2 E||ϕ(X)||2 + 2 sup x ||ϕ(x)||2 r log 4/δ 2K  + inf f∈FN ||f −f ∗||2 P i . By optimizing on M, we deduce (7). Similarly, using (6) we deduce the following bound on EY (||bgL −f ∗||2 PK): σ2 M K + 8 M log(8K/δ)||α+||2 E||ϕ(X)||2 + 2 sup x ||ϕ(x)||2 r log 4/δ 2K  + inf f∈FN ||f −f ∗||2 PK. By optimizing on M and noticing that inff∈FN ||f −f ∗||2 PK = 0 whenever N > K and the features (ϕk)1≤k≤K are linearly independent, we deduce the second result. □ Remark 1 Note that the second term in the parenthesis of (7) is negligible whenever K ≫log 1/δ. Thus we have the expected excess risk E(||bgL −f ∗||2 P ) = O  ||α+|| p E||ϕ(X)||2 log K/δ √ K + inf f∈FN ||f −f ∗||2 P  . (8) The choice of M in the previous corollary depends on ||α+|| and E||ϕ(X)|| which are a priori unknown (since f ∗and PX are unknown). If we set M independently of ||α+||, then an additional multiplicative factor of ||α+|| appears in the bound, and if we replace E||ϕ(X)|| by its bound supx ||ϕ(x)|| (which is known) then this latter factor will appear instead of the former in the bound. Complexity of CLSR: The complexity of LSR for computing the regression function in the compressed domain only depends on M and K, and is (see e.g. [4]) Cx(DK, GM, P) = O(MK2) which is of order O(K5/2) when we choose the optimized number of projections M = O( √ K). However the leading term when using CLSR is the cost for building the Ψ matrix: O(NK3/2). 6 4 Discussion 4.1 The factor ||α+|| p E||ϕ(X)||2 In light of Corollary 1, the important factor which will determine whether the CLSR provides low generalization error or not is ||α+|| p E||ϕ(X)||2. This factor indicates that a good set of features (for CLSR) should be such that the norm of those features as well as the norm of the parameter α+ of the projection of f ∗onto the span of those features should be small. A natural question is whether this product can be made small for appropriate choices of features. We now provide two specific cases for which this is actually the case: (1) when the features are rescaled orthonormal basis functions, and (2) when the features are specific wavelet functions. In both cases, we relate the bound to an assumption of regularity on the function f ∗, and show that the dependency w.r.t. N decreases when the regularity increases, and may even vanish. Rescaled Orthonormal Features: Consider a set of orthonormal functions (ηi)i≥1 w.r.t a measure µ, i.e. ⟨ηi, ηj⟩µ = δi,j. In addition we assume that the law of the input data is dominated by µ, i.e. PX ≤Cµ where C is a constant. For instance, this is the case when the set X is compact, µ is the uniform measure and PX has bounded density. We define the set of N features as: ϕi def = ciηi, where ci > 0, for i ∈{1, . . . , N}. Then any f ∈FN decomposes as f = PN i=1 ⟨f, ηi⟩ηi = PN i=1 bi ci ϕi, where bi def = ⟨f, ηi⟩. Thus we have: ||α||2 = PN i=1( bi ci )2 and E||ϕ||2 = PN i=1 c2 i R X η2 i (x)dPX (x) ≤C PN i=1 c2 i . Thus ||α+||2E||ϕ||2 ≤C PN i=1( bi ci )2 PN i=1 c2 i . Now, linear approximation theory (Jackson-type theorems) tells us that assuming a function f ∗∈ L2(µ) is smooth, it may be decomposed onto the span of the N first (ηi)i∈{1,...,N} functions with decreasing coefficients |bi| ≤i−λ for some λ ≥0 that depends on the smoothness of f ∗. For example the class of functions with bounded total variation may be decomposed with Fourier basis (in dimension 1) with coefficients |bi| ≤||f||V /(2πi). Thus here λ = 1. Other classes (such as Sobolev spaces) lead to larger values of λ related to the order of differentiability. By choosing ci = i−λ/2, we have ||α+|| p E||ϕ||2 ≤ √ C PN i=1 i−λ. Thus if λ > 1, then this term is bounded by a constant that does not depend on N. If λ = 1 then it is bounded by O(log N), and if 0 < λ < 1, then it is bounded by O(N 1−λ). However any orthonormal basis, even rescaled, would not necessarily yield a small ||α+|| p E||ϕ||2 term (this is all the more true when the dimension of X is large). The desired property that the coefficients (α+)i of the decomposition of f ∗rapidly decrease to 0 indicates that hierarchical bases, such as wavelets, that would decompose the function at different scales, may be interesting. Wavelets: Consider an infinite family of wavelets in [0, 1]: (ϕ0 n) = (ϕ0 h,l) (indexed by n ≥1 or equivalently by the scale h ≥0 and translation 0 ≤l ≤2h −1) where ϕ0 h,l(x) = 2h/2ϕ0(2hx −l) and ϕ0 is the mother wavelet. Then consider N = 2H features (ϕh,l)1≤h≤H defined as the rescaled wavelets ϕh,l def = ch2−h/2ϕ0 h,l, where ch > 0 are some coefficients. Assume the mother wavelet is Cp (for p ≥1), has at least p vanishing moments, and that for all h ≥0, supx P l ϕ0(2hx − l)2 ≤1. Then the following result (proof in the supplementary material) provides a bound on supx∈X ||ϕ(x)||2 (thus on p E||ϕ(X)||2) by a constant independent of N: Proposition 2 Assume that f ∗is (L, γ)-Lipschitz (i.e. for all v ∈X there exists a polynomial pv of degree ⌊γ⌋such that for all u ∈X, |f(u) −pv(u)| ≤L|u −v|γ) with 1/2 < γ ≤p. Then setting ch = 2h(1−2γ)/4, we have ||α+|| supx ||ϕ(x)|| ≤L 2γ 1−21/2−γ R 1 0 |ϕ0|, which is independent of N. Notice that the Haar walevets has p = 1 vanishing moment but is not C1, thus the Proposition does not apply directly. However direct computations show that if f ∗is L-Lipschitz (i.e. γ = 1) then α0 h,l ≤L2−3h/2−2, and thus ||α+|| supx ||ϕ(x)|| ≤ L 4(1−2−1/2) with ch = 2−h/4. 7 4.2 Comparison with other methods In the case when the factor ||α+|| p E||ϕ(X)||2 does not depend on N (such as in the previous example), the bound (8) on the excess risk of CLSR states that the estimation error (assessed in terms of FN) of CLSR is O(log K/ √ K). It is clear that whenever N > √ K (which is the case of interest here), this is better than the ordinary LSR in the initial domain, whose estimation error is O(N log K/K). It is difficult to compare this result with LASSO (or the Dantzig selector that has similar properties [5]) for which an important aspect is to design sparse regression functions or to recover a solution assumed to be sparse. From [12, 15, 24] one deduces that under some assumptions, the estimation error of LASSO is of order S log N K where S is the sparsity (number of non-zero coefficients) of the best regressor f + in FN. If S < √ K then LASSO is more interesting than CLSR in terms of excess risk. Otherwise CLSR may be an interesting alternative although this method does not make any assumption about the sparsity of f + and its goal is not to recover a possible sparse f + but only to make good predictions. However, in some sense our method finds a sparse solution in the fact that the regression function bgL lies in a space GM of small dimension M ≪N and can thus be expressed using only M coefficients. Now in terms of numerical complexity, CLSR requires O(NK3/2) operations to build the matrix and compute the regression function, whereas according to [18], the (heuristical) complexity of the LASSO algorithm is O(NK2) in the best cases (assuming that the number of steps required for convergence is O(K), which is not proved theoretically). Thus CLSR seems to be a good and simple competitor to LASSO. 5 Conclusion We considered the case when the number of features N is larger than the number of data K. The result stated in Theorem 1 enables to analyze the excess risk of any linear regression algorithm (LS or its penalized versions) performed in the compressed domain GM versus in the initial space FN. In the compressed domain the estimation error is reduced but an additional (controlled) approximation error (when compared to the best regressor in FN) comes into the picture. In the case of LS regression, when the term ||α+|| p E||ϕ(X)||2 has a mild dependency on N, then by choosing a random subspace of dimension M = O( √ K), CLSR has an estimation error (assessed in terms of FN) bounded by O(log K/ √ K) and has numerical complexity O(NK3/2). In short, CLSR provides an alternative to usual penalization techniques where one first selects a random subspace of lower dimension and then performs an empirical risk minimizer in this subspace. Further work needs to be done to provide additional settings (when the space X is of dimension > 1) for which the term ||α+|| p E||ϕ(X)||2 is small. Acknowledgements: The authors wish to thank Laurent Jacques for numerous comments and Alessandro Lazaric and Mohammad Ghavamzadeh for exciting discussions. This work has been supported by French National Research Agency (ANR) through COSINUS program (project EXPLO-RA, ANR-08-COSI-004). References [1] Dimitris Achlioptas. Database-friendly random projections: Johnson-Lindenstrauss with binary coins. Journal of Computer and System Sciences, 66(4):671–687, June 2003. [2] Nir Ailon and Bernard Chazelle. Approximate nearest neighbors and the fast JohnsonLindenstrauss transform. In STOC ’06: Proceedings of the thirty-eighth annual ACM symposium on Theory of computing, pages 557–563, New York, NY, USA, 2006. ACM. [3] Jean-Yves Audibert and Olivier Catoni. Risk bounds in linear regression through pac-bayesian truncation. Technical Report HAL : hal-00360268, 2009. [4] David Bau III and Lloyd N. Trefethen. Numerical linear algebra. Philadelphia: Society for Industrial and Applied Mathematics, 1997. 8 [5] Peter J. Bickel, Ya’acov Ritov, and Alexandre B. Tsybakov. Simultaneous analysis of Lasso and Dantzig selector. To appear in Annals of Statistics, 2008. [6] Avrim Blum. Random projection, margins, kernels, and feature-selection. Subspace, Latent Structure and Feature Selection, pages 52–68, 2006. [7] Robert Calderbank, Sina Jafarpour, and Robert Schapire. Compressed learning: Universal sparse dimensionality reduction and learning in the measurement domain. Technical Report, 2009. [8] Emmanuel Candes and Terence Tao. The Dantzig selector: Statistical estimation when p is much larger than n. Annals of Statistics, 35:2313, 2007. [9] Emmanuel J. Candes and Justin K. Romberg. Signal recovery from random projections. volume 5674, pages 76–86. SPIE, 2005. [10] S. S. Chen, D. L. Donoho, and M. A. Saunders. Atomic decomposition by basis pursuit. SIAM Journal on Scientific Computing, 20:33–61, 1998. [11] Mark A. Davenport, Michael B. Wakin, and Richard G. Baraniuk. Detection and estimation with compressive measurements. Technical Report TREE 0610, Department of Electrical and Computer Engineering, Rice University, 2006. [12] E. Greenshtein and Y. Ritov. Persistency in high dimensional linear predictor-selection and the virtue of over-parametrization. Bernoulli, 10:971–988, 2004. [13] L. Gy¨orfi, M. Kohler, A. Krzy˙zak, and H. Walk. A distribution-free theory of nonparametric regression. Springer-Verlag, 2002. [14] Sham M. Kakade, Karthik Sridharan, and Ambuj Tewari. On the complexity of linear prediction: Risk bounds, margin bounds, and regularization. In Daphne Koller, Dale Schuurmans, Yoshua Bengio, and Leon Bottou, editors, Neural Information Processing Systems, pages 793– 800. MIT Press, 2008. [15] Yuval Nardi and Alessandro Rinaldo. On the asymptotic properties of the group Lasso estimator for linear models. Electron. J. Statist., 2:605–633, 2008. [16] D. Pollard. Convergence of Stochastic Processes. Springer Verlag, New York, 1984. [17] Ali Rahimi and Benjamin Recht. Random features for large-scale kernel machines. Neural Information Processing Systems, 2007. [18] Saharon Rosset and Ji Zhu. Piecewise linear regularized solution paths. Annals of Statistics, 35:1012, 2007. [19] Robert Tibshirani. Regression shrinkage and selection via the Lasso. Journal of the Royal Statistical Society, Series B, 58:267–288, 1994. [20] A. N. Tikhonov. Solution of incorrectly formulated problems and the regularization method. Soviet Math Dokl 4, pages 1035–1038, 1963. [21] Yaakov Tsaig and David L. Donoho. Compressed sensing. IEEE Trans. Inform. Theory, 52:1289–1306, 2006. [22] Vladimir N. Vapnik. The nature of statistical learning theory. Springer-Verlag New York, Inc., New York, NY, USA, 1995. [23] Tong Zhang. Covering number bounds of certain regularized linear function classes. Journal of Machine Learning Research, 2:527–550, 2002. [24] Tong Zhang. Some sharp performance bounds for least squares regression with L1 regularization. To appear in Annals of Statistics, 2009. [25] Shuheng Zhou, John D. Lafferty, and Larry A. Wasserman. Compressed regression. In John C. Platt, Daphne Koller, Yoram Singer, and Sam T. Roweis, editors, Neural Information Processing Systems. MIT Press, 2007. 9
2009
3
3,777
Who’s Doing What: Joint Modeling of Names and Verbs for Simultaneous Face and Pose Annotation Luo Jie Idiap and EPF Lausanne jluo@idiap.ch Barbara Caputo Idiap Research Institute bcaputo@idiap.ch Vittorio Ferrari ETH Zurich ferrari@vision.ee.ethz.ch Abstract Given a corpus of news items consisting of images accompanied by text captions, we want to find out “who’s doing what”, i.e. associate names and action verbs in the captions to the face and body pose of the persons in the images. We present a joint model for simultaneously solving the image-caption correspondences and learning visual appearance models for the face and pose classes occurring in the corpus. These models can then be used to recognize people and actions in novel images without captions. We demonstrate experimentally that our joint ‘face and pose’ model solves the correspondence problem better than earlier models covering only the face, and that it can perform recognition of new uncaptioned images. 1 Introduction A huge amount of images with accompanying text captions are available on the Internet. Websites selling various items such as houses and clothing provide photographs of their products along with concise descriptions. Online newspapers 1 have pictures illustrating events and comment them in the caption. These news websites are very popular because people are interested in other people, especially if they are famous (figure 1). Exploiting the associations between images and text hidden in this wealth of data can lead to a virtually infinite source of annotations from which to learn visual models without explicit manual intervention. The learned models could then be used in a variety of Computer Vision applications, including face recognition, image search engines, and to annotate new images for which no caption is available. Moreover, recovering image-text associations is useful for auto-annotating a closed corpus of data, e.g. for users of news website to see “who’s in the picture” [6], or to search for images where a certain person does a certain thing. Previous works on news items has focused on associating names in the captions to faces in the images [5, 6, 16, 21]. This is difficult due to the correspondence ambiguity problem: multiple persons appear in the image and the caption. Moreover, persons in the image are not always mentioned in the caption, and not all names in the caption appear in the image. The techniques tackle the correspondence problem by exploiting the fact that different images show different combinations of persons. As a result, these methods work well for frequently occurring persons (typical for famous people) appearing in dataset with thousands of news items. In this paper we propose to go beyond the above works, by modeling both names and action verbs jointly. These correspond to faces and body poses in the images (figure 3). The connections between the subject (name) and verb in a caption can be found by well established language analysis techniques [1, 8]. Essentially, by considering the subject-verb language construct, we generalize the “who’s in the picture” line of works to “who’s doing what”. We present a new generative model where the observed variables are names and verbs in the caption as well as detected persons in the image. The image-caption correspondences are carried by latent variables, while the visual appearance of face and pose classes corresponding to different names and verbs are model parameters. During learning, we simultaneously solve for the correspondence and learn the appearance models. 1www.daylife.com, news.yahoo.com, news.google.com 1 (a) Four sets ... Roger Federer prepares to hit a backhand in a quarter-final match with Andy Roddick at the US Open. (b) US Democratic presidential candidate Senator Barack Obama waves to supporters together with his wife Michelle Obama standing beside him at his North Carolina and Indiana primary election night rally in Raleigh. Figure 1: Examples of image-caption pairs in our dataset. The face and upper body of the persons in the image are marked by bounding-boxes. We stress a caption might contain names and/or verbs not visible in the image, and vice versa. In our joint model, the correspondence ambiguity is reduced because the face and pose information help each other. For example, in figure 1b, knowing what ‘waves’ means would reveal who of the two imaged persons is Obama. The other way around, knowing who is Obama would deliver a visual example for the ‘waving’ pose. We show experimentally that (i) our joint ‘face and pose’ model solves the correspondence problem better than simpler models covering either face or pose alone; (ii) the learned model can be used to effectively annotate new images with or without captions; (iii) our model with face alone performs better than the existing face-only methods based on Gaussian mixture appearance models. Related works. This paper is most closely related to works on associating names and faces, which we discussed above. There exist also works on associating nouns to image regions [2, 3, 10], starting from images annotated with a list of nouns indicating the objects it contains (typical datasets contain natural scenes and objects such as ‘water’ and ‘tiger’). A recent work in this line is that of Gupta and Davis [17], who model prepositions in addition to nouns (e.g. ‘bear in water’, ‘car on street’). To the best of our knowledge, ours is the first work on jointly modeling names and verbs. 2 Generative model for faces and body poses The news item corpus used to train our face and pose model consists of still images of person(s) performing some action(s). Each image is annotated with a caption describing “who’s doing what” in the image (figure 1). Some names from the caption might not appear in the image, and viceversa some imaged persons might not be mentioned in the caption. The basic units in our model are persons in the image, consisting of their face and upper body. Our system automatically detects them by bounding-boxes in the image using a face detector [23] and an upper body detector [14]. In the rest of the paper, we say “person” to indicate a detected face and the upper body associated with it (including false positive detections). A face and an upper-body are considered to belong to the same person if the face lies near the center of the upper body bounding-box. For each person, we obtain a pose estimate using [11] (figure 3(right)). In addition to these image features, we use a language parser [1, 8] to extract a set of name-verb pairs from each caption. Our goals are to: (i) associate the persons in the images to the name-verb pairs in the captions, and (ii) learn visual appearance models corresponding to names and verbs. These can then be used for recognition on new images with or without caption. Learning in our model can be seen as a constrained clustering problem [4, 24, 25]. 2.1 Generative model We start by describing how our generative model explains the image-caption data (figure 2). The notation is summarized in Table I. Suppose we have a collection of documents D = {D1, . . . , DM} with each document Di consisting of an image Ii and its caption Ci. These captions implicitly provide the labels of the person(s)’ name(s) and pose(s) in the corresponding images. For each caption Ci, we consider only the name-verb pairs ni returned by a language parser [1, 8] and ignore other words. We make the same assumptions as for the name-face problem [5, 6, 16, 21] that the labels can only come from the name-verb pairs in the captions or null (for persons not mentioned in the caption). Based on this, we generate the set of all possible assignments Ai from the ni in 2 M: Number of documents in D (image-caption pairs) D = {Di}i=M i=1 = {Ii, Ci}i=M i=1 P i: Number of detected persons in image Ii Ii,p: pth person in image Ii W i: Number of name-verb pairs in caption Ci Ii,p = (Ii,p face , Ii,p pose) Y : Latent variables encoding the true assignments Y i: Y i = (yi,1, . . . , yi,P i), yi,p is the assignment of the pth person in ith image Ai: Set of possible assignments for document i Ai = {ai 1, . . . , ai Li} Li: Number of possible assignments for document Di ai l: lth assignment ai l = {ai,1 l , . . . , ai,P i l }, where ai,p l is the label for the pth person Θ: Appearance models for face and pose classes Θ = (θname, θverb) V : Number of different verbs θverb = (θ1 verb, . . . , θV verb, βverb) U: Number of different names θname = (θ1 name, . . . , θU name, βname) θk: Sets of class representative vectors for class k µk r: a representative vector for class k θv verb = {µv,1 pose, . . . , µv,Rv pose } θu name = {µu,1 face , . . . , µu,Ru face } Table I: The mathematical notation used in the paper W I A Y C M P V θVerb θname U L Figure 2: Graphical plate representation of the generative model. Ci (see section 2.4 for details). Hence, we replace the captions by the sets of possible assignments A = {A1, . . . , AM}. Let Y = {Y 1, . . . , Y M} be latent variables encoding the true assignments (i.e. name/verb labels for the faces/poses), and Y i = (yi,1, . . . , yi,P i) be the assignment for the P i persons in the ith image. Each yi,p = (yi,p face, yi,p pose) is a pair of indices defining the assignment of a person’s face to a name and pose to a verb. These take on values from the set of name indices {1, . . . , U, null}, and verb indices {1, . . . , V, null}. N/V is the number of different names/verbs over all the captions and null represents unknown names/verbs and false positive person detections. Document collection likelihood. Assuming independence between documents, the likelihood of the whole document collection is P(I, Y , A|Θ) = M Y i=1 P(Ii, Y i, Ai|Θ) = M Y i=1 P(Ii|Y i, Ai, Θ)P(Y i|Ai, Θ)P(Ai|Θ) (1) where Θ are the model parameters explaining the visual appearance of the persons’ faces and poses in the images. Therefore, equation (1) can be written as Q P(Ii|Y i, Θ)P(Y i|Ai)P(Ai). The goal of learning is to find the parameters Θ and the labels Y that maximize the likelihood. Below we focus on P(Ii|Y i, Θ), and then define P(Y i|Ai) and P(Ai) in section 2.4. Image likelihood. The basic image units in our model are persons. Assuming independence between multiple persons in an image, the likelihood of an image can be expressed as the product over the likelihood of each person: P(Ii|Y i, Θ) = Y Ii,p∈Ii P(Ii,p|yi,p, Θ) (2) where yi,p define the name-verb indices of the pth person in the image. A person Ii,p = (Ii,p face, Ii,p pose) is represented by the appearance of her face Ii,p face and pose Ii,p pose. Assuming independence between the face and pose appearance of a person, the conditional probability for the appearance of the pth person in image Ii given the latent variable yi,p is: P(Ii,p|yi,p, Θ) = P(Ii,p face|yi,p face, θname)P(Ii,p pose|yi,p pose, θverb) (3) where Θ = (θname, θverb) are the appearance models associated with the various names and verbs. Each θv verb in θverb = (θ1 verb, . . . , θV verb, βverb) is a set of representative vectors modeling the variability within the pose class corresponding to a verb v. For example, the verb “serve” in tennis could correspond to different poses such as holding the ball on the racket, tossing the ball and hitting it. Analogously, θu name models the variability within the face class corresponding to a name u. 2.2 Face and pose descriptors and similarity measures After detecting faces from the images with the multi-view algorithm [23], we use [12] to detect nine distinctive feature points within the face bounding box (figure 3(left)). Each feature is represented by SIFT descriptors [18], and their concatenation gives the overall descriptor vector for the face. We use the cosine as a naturally normalized similarity measure between two face descriptors: simface(a, b) = aT b ∥a∥∥b∥. The distance between two faces is distface(a, b) = 1 −simcos(a, b). We use [14] to detect upper-bodies and [11] to estimate their pose. A pose E consists of a distribution over the position (x, y and orientation) for each of 6 body parts (head, torso, upper/lower 3 Figure 3: Example images with facial features and pose estimates superimposed. Left Facial features (left and right corners of each eye, two nostrils, tip of the nose, and the left and right corners of the mouth) located using [12] in the detected face bounding-box. Right Example estimated poses corresponding to verbs: “hit backhand”, “shake hands” and “hold”. Red indicates torso, blue upper arms, green lower arms and head. Brighter pixels are more likely to belong to a part. Color planes are added up, so that yellow indicates overlap between lower-arm and torso, purple between upper-arm and torso, and so on (best viewed in color). left/right arms). The pose estimator factors out variations due to clothing and background, so E conveys purely spatial arrangements of body parts. We derive three relatively low-dimensional pose descriptors from E, as proposed in [13]. These descriptors represent pose in different ways, such as the relative position between pairs of body parts, and part-specific soft-segmentations of the image (i.e. the probability of pixels as belonging to a part). We refer to [13, 11] for more details and the similarity measure associated with each descriptor. We normalize the range of each similarity to [0, 1], and denote their average as simpose(a, b). The final distance between two poses a, b used in the rest of this paper is distpose(a, b) = 1 −simpose(a, b). 2.3 Appearance model The appearance model for a pose class (corresponding to a verb) is defined as: P(Ii,p pose|yi,p pose, θverb) = X k∈{1,...,V,null} δ(yi,p pose, k) · P(Ii,p pose|θk verb) (4) where θk verb are the parameters of the kth pose class (or βverb if k = null). The indicator function δ(yi,p pose, k) = 1 if yi,p pose = k and δ(yi,p pose, k) = 0 otherwise. We only explain here the model for a pose class, as the face model is derived analogously. How to model the conditional probability P(Ii,p pose|θk verb) is a key ingredient for the success of our approach. Some previous works on names-faces used a Gaussian mixture model [6, 21]: each name is associated with a Gaussian density, plus an additional Gaussian to model the null class. Using functions of the exponential family like a Gaussian simplifies computations. However, a Gaussian may restrict the representative power of the appearance model. Problems such as face and pose recognition are particularly challenging because they involve complex non-Gaussian multimodal distributions. Figure 3(right) shows a few examples of the variance within the pose class for a verb. Moreover, we cannot easily employ existing pose similarity measures [13]. Therefore, we represent the conditional probability using a exemplar-based likelihood function: P(Ii,p pose|θk verb) = ( 1 Zθverb e−dpose(Ii,p pose,θk verb) if k ∈{known verbs} 1 Zθverb e−βverb if k = null (5) where Zθverb is the normalizer and dpose is the distance between the pose descriptor Ii,p pose and its closest class representative vector µk r ∈θk verb = {µk,1 pose, . . . , µk,Rk pose }, where Rk is the number of representative poses for verb k. The likelihood depends on the model parameters θk verb, and the distance function dpose. The scalar βverb represents the null model, thus poses assigned to null have likelihood 1 Zθverb e−βverb. It is important to have this null model, as some detected persons might not correspond to any verb in the caption or they might be false detections. By generalizing the similarity measure simpose(a, b) as a kernel product K(a, b) = φ(a) · φ(b), the distance from a vector a to the sample center vector µk r can be written similarly as in the weighted kernel k-means method [9]: φ(a) −Σb∈πk r w(b)φ(b) Σb∈πk r w(b) 2 = K(a, a) −2Σb∈πk r w(b)k(a, b) Σb∈πk r w(b) + Σb,d∈πk r w(b)w(d)k(b, d) (Σb∈πk r w(b))2 (6) 4 The center vector µk r is defined as Σb∈πk r w(b)φ(b)  / Σb∈πk r w(b)  , where πk r is the cluster of vectors assigned to µk r, and w(b) is the weight for each point b, representing the likelihood that b belongs to the class of µk r (as in equation (11)). This formulation can be considered as a modified version of the k-means [19] clustering algorithm. The number of centers Rk can vary for different verbs, depending on the distribution of the data and the number of samples. As we are interested only in computing the distance between µk r and each data point, and not in the explicit value of µk r, the only term that needs to be computed in equation (6) is the second (the third term is constant for each assigned µk r). 2.4 Name-verb assignments The name-verb pairs ni for a document are observed in its caption Ci. We derive from them the set of all possible assignments Ai = {ai 1, . . . , ai Li} of name-verb pairs to persons in the image. The number of possible assignments Li depends both on the number of persons and of name-verb pairs. As opposed to the standard matching problem, here the assignments have to take into account null. Moreover, we have the same constraints as in the name-face problem [6]: a person can be assigned to at most one name-verb pair, and vice-versa. Therefore, given a document with P i persons and W i name-verb pairs, the number of possible assignments is Li = Pmin(P i,W i) j=0 P i j  · W i j  , where j is the number of persons assigned to a name-verb pair instead of null. Even by imposing the above constraints, this number grows rapidly with P i and W i. However, since different assignments share many common sub-assignments, the number of unique likelihood computations is much lower, namely P i · (W i + 1). Thus, we can evaluate all possible assignments for an image efficiently. Although certain assignments are unlikely to happen (e.g. all persons are assigned to null), here we use an uniform prior over all assignments, i.e. P(ai l) = 1/Li. Since the true assignment Y i can only come from Ai, we define the conditional probability over the latent variables Y i as: P(Y i|Ai) = 1/Li if Y i ∈Ai 0 otherwise (7) The latent assignment Y i play the role of the annotations necessary for learning appearance models. 3 Learning the model The task of learning is to find the model parameters Θ and the assignments Y which maximize the likelihood of the complete dataset {I, Y , A}. The joint probability of {I, Y , A} given Θ from equation (1) can be written as P(I, Y , A|Θ) = M Y i=1  P(Y i|Ai)P(Ai) P i Y p=1 P(Ii,p face|yi,p face, θname)P(Ii,p pose|yi,p pose, θverb)   (8) Maximizing the log of this joint likelihood is equivalent to minimizing the following clustering objective function over the latent variables Y and parameters Θ: J = X i,p,yi,p face ̸=null dface(Ii,p face, θ yi,p face name) + X i,p,yi,p face =null βname + X i,p,yi,p pose̸=null dpose(Ii,p pose, θ yi,p pose verb ) + X i,p,yi,p pose=null βverb − X i (logP(Y i|Ai) + logP(Ai)) + X i,p (logZθname + logZθverb) (9) Thus, to minimize J , each latent variable Y i must belong to the set of possible assignments Ai. If Y would be known, the cluster centers µ ∈θname, µ ∈θverb which minimize J could be determined uniquely (given also the number of class centers R). However, it is difficult to set R before seeing the data. In our implementation, we determine the centers approximately using the data points and their K nearest neighbors. Since estimating the normalization constants Zθname and Zθverb is computationally expensive, we make an approximation by considering them as constant in the clustering process (i.e. drop their terms from J ). In our experiments, this did not significantly affect the results, as also noted in several other works (e.g. [4]). Since the assignments Y are unknown, we use a generalized EM procedure [7, 22] for simultaneously learning the parameters Θ and solving the correspondence problem (i.e. find Y ): 5 a. ground−truth b. automated c. multiple 40 45 50 55 60 65 70 75 80 85 90 Accuracy [%] Name Verb Ass. Ass. Name Verb Ass. Ass. Name Verb Ass. Ass. GMM Face Model Face Model Face+Pose Model Pose 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 0.65 0.7 0.75 0.8 0.85 0.9 0.95 1 Recall Precision K. Garnett K. Garnett B. Clinton B. Clinton J. Jankovic J. Jankovic A. Merkel A. Merkel N. Sarkozy N. Sarkozy S. Williams S. Williams A. Agassi A. Agassi G. Bush G. Bush R. Federer R. Federer T. Woods T. Woods Model Face Model Face+Pose Figure 4: Left. Comparison of different models under different setups: using the manually annotated nameverb pairs (ground-truth); using the Named Entity detector and language parser (automated); and using the more difficult subset (multiple). The accuracy for name (Name Ass.) and verb (Verb Ass.) assignments are reported separately. GMM Face refers to the face-only model using GMM appearance models, as in [6]. Right. Comparison of precision and recall for 10 individuals using the stripped-down face only model, and our face+pose model. The reported results are based on automatically parsed captions for learning. Input. Data D; hyper-parameters βname, βverb, K 1. Initialization. We start by computing the distance matrix between faces/poses from images sharing some name/verb in the caption. Next we initialize Θ using all documents in D. For each different name/verb, we select all captions containing only this name/verb. If the corresponding images contain only one person, their faces/poses are used to initialize the center vectors θk name/θk verb. The center vectors are found approximately using each data point and their K nearest neighbors of the same name/verb class. If a name/verb only appears in captions with multiple names/verbs or if the corresponding images always contain multiple persons (e.g. verbs like “shake hand”), we randomly assign the name/verb to any face/pose in each image. The center vectors are then initialized using these data points. The initial weights w for all data points are set to one (equation 6). This step yields an initial estimate of the model parameters Θ. We refine the parameters and assignments by repeating the following EM-steps until convergence. 2. E-step. Compute the labels Y using the parameters Θold from the previous iteration arg max Y P(Y |I, A, Θold) ∝arg max Y P(I|Y , Θold)P(Y |A) (10) 3. M-step. Given the labels Y , update Θ so as to minimize J (i.e. update the cluster centers µ). Our algorithm assigns each point to exactly one cluster. Each point Ii,p in a cluster is given a weight wi,p Y i = P(Y i|Ii,p, Ai, Θ) P Y j∈Ai P(Y j|Ii,p, Ai, Θ) (11) which represents the likelihood that Ii,p face and Ii,p pose belong to the name and verb defined by Y i. Therefore, faces and poses from images with many detections have a lower weights and contribute less to the cluster centers, reflecting the larger uncertainty in their assignments. 4 Experiments and conclusions Datasets There are datasets of news image-caption pairs such as those in [6, 16]. Unfortunately, these datasets are not suitable in our scenario for two reasons. Faces often occupy most of the image so the body pose is not visible. Second, the captions frequently describe the event at an abstract level, rather than using a verb to describe the actions of the persons in the image (compare figure 1 to the figures in [6, 16]). Therefore, we collected a new dataset 2 by querying Google-images using a combination of names and verbs (from sports and social interactions), corresponding to distinct upper body poses. An example query is “Barack Obama” + “shake hands”. Our dataset contains 1610 images, each with at least one person whose face occupies less than 5% of the image, and with the accompanying snippet of text returned by Google-images. External annotators were asked to 2We released this dataset online at http://www.vision.ee.ethz.ch/∼ferrari 6 C: R. Nadal - clench fist K. Garnett - hold J. Jankovic - serve J. Jankovic - hold R. Nadal - null E. Gulbis - null Celtics - null M. Bartoli - null D. Safina - null R. Federer - hit forehand F:: E. Gulbis Celtics null D. Safina R. Nadal; null FP: R. Nadal K. Garnett J. Jankovic J. Jankovic R. Federer; null C: V. Williams - hit backhand R. Nadal - hit forehand C. Clinton - clap N. Sarkozy - embrace Hu Jintao - Wave S. Williams - hold B. Clinton - kiss Brian Cowen - null R. Venables - wave H. Clinton - kiss F:: V. Williams null C. Clinton Brian Cowen null FP: S. Williams R. Nadal null N. Sarkozy Hu Jintao C: Hu Jintao - shake hands Hu Jintao - shake hands A. Garcia - toast A. Merkel - gesture Hu Jintao - shake hands J. Chirac - shake hands N. Sarkozy - shake hands A. Merkel - drink K. Bakjyev - shake hands Kyrgyzstan - null F:: null;null;null null;Hu Jintao A. Merkel null;null;A. Merkel Hu Jintao;null FP: null;null;Hu Jintao N. Sarkozy; Hu Jintao A. Garcia A. Merkel;null;null; Hu Jintao;K. Bakjyev Figure 5: Examples of when modeling pose improves the results at learning time. Below the images we report the name-verb pairs (C) from the caption as returned by the automatic parser and compare the association recovered by a model using only faces (F) and using both faces and poses (FP). The assigned names (left to right) correspond to the detected face bounding-boxes (left to right). 0 1 2 3 4 5 6 10 20 30 40 50 60 70 80 90 100 110 Accuracy [%] Image Query Keywords Federer Backhand Sharapova Hold trophy Nadal Forehand Obama Wave Hu Jintao Shakehands Baseline on Face Annoation (with caption) Face Model on Face Annoation (with caption) Face + Pose Model on Face Annotation (with caption) Face + Pose Model on Face Annotation (without caption) Face + Pose Model on Pose Annotation (without caption) B. Obama B. Obama Wave Shake Hand Hu Jintao Shake Hands NULL Shake Hands Hu Jintao Shake Hands NULL Shake Hands Wave J. Jankoviv Hold B. Obama R. Federer Hit Backhand Hold M.Sharapova NULL Figure 6: Recognition results on images without text captions (using models learned from automatically parsed captions). Left compares face annotation using different models and scenarios (see main text); Right shows a few examples of the labels predicted by the joint face and pose model (without using captions). extend these snippets into realistic captions when necessary, with varied long sentences, mentioning the action of the persons in the image as well as names/verbs not appearing in the image (as ‘noise’, figure 1). Moreover, they also annotated the ground-truth name-verb pairs mentioned in the captions as well as the location of the target persons in the images, enabling to evaluate results quantitatively. In total the ground-truth consists of 2627 name-verb pairs. In our experiments we only consider 7 names and verbs occurring in at least 3 captions for a name, and 20 captions for a verb. This leaves 69 names corresponding to 69 face classes and 20 verbs corresponding to 20 pose classes. We used an open source Named Entity recognizer [1] to detect names in the captions and a language parser [8] to find name-verbs pairs (or name-null if the language parser could not find a verb associated with a name). By using simple stemming rules, the same verb under different tenses and possessive adjectives was merged together. For instance “shake their hands”, “is shaking hands” and “shakes hands” all correspond to the action verb “shake hands”. In total, the algorithms achieves precision 85.5% and recall 68.8% on our dataset over the ground-truth name-verb pair. By discarding infrequent names and verbs as explained above, we retain 85 names and 20 verbs to be learned by our model (recall that some of these are false positives rather than actual person names and verbs). Results for learning The learning algorithm takes about five iterations to converge. We compare experimentally our face and pose model to stripped-down versions using only face or pose information. For comparison, we also implement the constrained mixture model [6] described in section 2.3. Although [6] also originally incorporates also a language model of the caption, we discard it here so that both methods use the same amount of information. We run the experiments in three setups: (a) using the ground-truth name-verb annotations from the captions; (b) using the name-verb pairs automatically extracted by the language parser; (c) similar as (b) but only on documents with multiple persons in the image or multiple name-verb pairs in the caption. These setups are progressively more difficult, as (b) has more noisy name-verb pairs, and (c) has no documents with a single name and person, where our initialization is very reliable. Figure 4(left) compares the accuracy achieved by different models on these setups. The accuracy is defined as the percentage of correct assignments over all detected persons, including assignments to null, as in [5, 16]. As the figure shows, our joint ‘face and pose’ model outperforms both models using face or pose alone in all setups. Both the annotation of faces and poses improve, demonstrating they help each other when successfully integrated by our model. This is the main point of the paper. Figure 4(right) shows improvements on precision and recall over models using faces or poses alone. As a second point, our model with face alone also outperforms the baseline approach using Gaussian mixture appearance models (e.g. used in [6]). Figure 5 shows a few examples of how including pose improves the learning results and solve some of the correspondence ambiguities. Improvements happen mainly in three situations: (a) when there are multiple names in a caption, as not all names in the captions are associated to action verbs (figure 1(a) and figure 5(top)); (b) when there are multiple persons in an image, because the pose disambiguates the assignment (figure 1(b) and figure 5(bottom)) and (c) when there are false detections, rare faces or faces at viewpoints different than frontal (i.e. where face recognition works less well, e.g. figure 5(middle)). Results for recognition Once the model is learned, we can use it to recognize “who’s doing what” in novel images with or without captions. We collected a new set of 100 images and captions from Google-images using five keywords based on names and verbs from the training dataset. We evaluate the learned model in two scenarios: (a) the test data consists of images and captions. Here we run inference on the model, recovering the best assignment Y from the set of possible assignments generated from the captions; (b) the same test images are used but the captions are not given, so the problem degenerates to a standard face and pose recognition task. Figure 6(left) reports face annotation accuracy for three methods using captions (scenario (a)): (⋄) a baseline which randomly assigns a name (or null) from the caption to each face in the image; (x) our face and pose model; (□) our model using only faces. The figure also shows results for scenario (b), where our full model tries to recognize faces (+) and poses (△) in the test images without captions. On scenario (a) all models outperform the baseline, and our joint face and pose model improves significantly on the face-only model for all keywords, especially when there are multiple persons in the image. Conclusions. We present an approach for the joint modeling of faces and poses in images and their association to names and action verbs in accompanying text captions. Experimental results show that our joint model performs better than face-only models both in solving the image-caption correspondence problem on the training data, and in annotating new images. Future work aims at incorporating an effective web crawler and html/language parsing tools to harvest image-caption pairs from the internet fully automatically. Other techniques such as learning distance functions [4, 15, 20] may also be incorporated during learning to improve recognition results. Acknowledgments We thank K. Deschacht and M.F. Moens for providing the language parser. L. J. and B. Caputo were supported by EU project DIRAC IST-027787 and V. Ferrari by the Swiss National Science Found. 8 References [1] http://opennlp.sourceforge.net/. [2] K. Barnard, P. Duygulu, D. Forsyth, N. de Freitas, D. Blei, and M. Jordan. Matching words and pictures. JMLR, 3:1107–1135, 2003. [3] K. Barnard and Q. Fan. Reducing correspondence ambiguity in loosely labeled training data. In Proc. CVPR’07. [4] S. Basu, M. Bilenko, A. Banerjee, and R. J. Mooney. Probabilistic semi-supervised clustering with constraints. In O. Chapelle, B. Sch¨olkopf, and A. Zien, editors, Semi-Supervised Learning, pages 71–98. MIT Press, 2006. [5] T. Berg, A. Berg, J. Edwards, and D. Forsyth. Names and faces in the news. In Proc. CVPR’04. [6] T. Berg, A. Berg, J. Edwards, and D. Forsyth. Who’s in the picture? In Proc. NIPS’04. [7] A. P. Dempster, N. Laird, and D. Rubin. Maximum likelihood from incomplete data via the em algorithm. Journal Royal Statistical Society, 39:1–38, 1977. [8] K. Deschacht and M.-F. Moens. Semi-supervised semantic role labeling using the latent words language model. In Proc. EMNLP’09. [9] I. Dhillon, Y. Guan, and B. Kulis. Kernel k-means: spectral clustering and normalized cuts. In Proc. KDD’04. [10] P. Duygulu, K. Barnard, N. de Freitas, and D. Forsyth. Object recognition as machine translation: Learning a lexicon for a fixed image vocabulary. In Proc. ECCV’02. [11] M. Eichner and V. Ferrari. Better appearance models for pictorial structures. In Proc. BMVC’09. [12] M. Everingham, J. Sivic, and A. Zisserman. Hello! my name is... buffy - automatic naming of characters in tv video. In Proc. BMVC’06. [13] V. Ferrari, M. Marin, and A. Zisserman. Pose search: retrieving people using their pose. In Proc. CVPR’09. [14] V. Ferrari, M. Marin, and A. Zisserman. Progressive search space reduction for human pose estimation. In Proc. CVPR’08. [15] A. Frome, Y. Singer, and J. Malik. Image retrieval and classification using local distance functions. In Proc. NIPS’06. [16] M. Guillaumin, T. Mensink, J. Verbeek, and C. Schmid. Automatic face naming with captionbased supervision. In Proc. CVPR’08. [17] A. Gupta and L. Davis. Beyond nouns: Exploiting prepositions and comparative adjectives for learning visual classifiers. In Proc. ECCV’08. [18] D. Lowe. Distinctive image features from scale-invariant keypoints. IJCV, 60(2):91–110, 2004. [19] J. B. MacQueen. Some methods for classification and analysis of multivariate observations. In Proc. of 5th Berkeley Symposium on Mathematical Statistics and Probability, 1967. [20] T. Malisiewicz and A. Efros. Recognition by association via learning per-exemplar distances. In Proc. CVPR’08. [21] T. Mensink and J. Verbeek. Improving people search using query expansions: How friends help to find people. In Proc. ECCV’08. [22] R. Neal and G. E. Hinton. A view of the em algorithm that justifies incremental, sparse, and other variants. In M. I. Jordan, editor, Learning in Graphical Models, pages 355–368. Kluwer Academic Publishers, 1998. [23] Y. Rodriguez. Face Detection and Verification using Local Binary Patterns. PhD thesis, ´Ecole Polytechnique F´ed´erale de Lausanne, 2006. [24] N. Shental, A. Bar-Hillel, T. Hertz, and D. Weinshall. Computing gaussian mixture models with em using equivalence constraints. In Proc. NIPS’03. [25] K. Wagstaff, C. Cardie, S. Rogers, and S. Schroedl. Constrained k-means clustering with background knowledge. In Proc. ICML’01. 9
2009
30
3,778
Streaming Pointwise Mutual Information Benjamin Van Durme University of Rochester Rochester, NY 14627, USA Ashwin Lall Georgia Institute of Technology Atlanta, GA 30332, USA Abstract Recent work has led to the ability to perform space efficient, approximate counting over large vocabularies in a streaming context. Motivated by the existence of data structures of this type, we explore the computation of associativity scores, otherwise known as pointwise mutual information (PMI), in a streaming context. We give theoretical bounds showing the impracticality of perfect online PMI computation, and detail an algorithm with high expected accuracy. Experiments on news articles show our approach gives high accuracy on real world data. 1 Introduction Recent work has led to the ability to perform space efficient counting over large vocabularies [Talbot, 2009; Van Durme and Lall, 2009]. As online extensions to previous work in randomized storage [Talbot and Osborne, 2007], significant space savings are enabled if your application can tolerate a small chance of false positive in lookup, and you do not require the ability to enumerate the contents of your collection.1 Recent interest in this area is motivated by the scale of available data outpacing the computational resources typically at hand. We explore what a data structure of this type means for the computation of associativity scores, or pointwise mutual information, in a streaming context. We show that approximate k-best PMI rank lists may be maintained online, with high accuracy, both in theory and in practice. This result is useful both when storage constraints prohibit explicitly storing all observed co-occurrences in a stream, as well as in cases where accessing such PMI values would be useful online. 2 Problem Definition and Notation Throughout this paper we will assume our data is in the form of pairs ⟨x, y⟩, where x ∈X and y ∈Y . Further, we assume that the sets X and Y are so large that it is infeasible to explicitly maintain precise counts for every such pair on a single machine (e.g., X and Y are all the words in the English language). We define the pointwise mutual information (PMI) of a pair x and y to be PMI(x, y) ≡lg P(x, y) P(x)P(y) where these (empirical) probabilities are computed over a particular data set of interest.2 Now, it is often the case that we are not interested in all such pairs, but instead are satisfied with estimating the subset of Y with the k largest PMIs with each x ∈X. We denote this set by PMIk(x). Our goal in this paper is to estimate these top-k sets in a streaming fashion, i.e., where there is only a single pass allowed over the data and it is infeasible to store all the data for random access. This 1This situation holds in language modeling, such as in the context of machine translation. 2As is standard, lg refers to log2. 1 model is natural for a variety of reasons, e.g., the data is being accessed by crawling the web and it is infeasible to buffer all the crawled results. As mentioned earlier, there has been considerable work in keeping track of the counts of a large number of items succinctly. We explore the possibility of using these succinct data structures to solve this problem. Suppose there is a multi-set M = {m1, m2, m3, . . .} of word pairs from X ×Y . Using an approximate counter data structure, it is possible to maintain in an online fashion the counts c(x, y) = |{i | mi = ⟨x, y⟩}|, c(x) = |{i | mi = ⟨x, y′⟩, for some y′ ∈Y }|, and c(y) = |{i | mi = ⟨x′, y⟩, for some x′ ∈X}|, which allows us to estimate PMI(x, y) as lg P (x,y) P (x)P (y) = lg c(x,y)/n (c(x)/n)(c(y)/n) = lg nc(x,y) c(x)c(y), where n is the length of the stream. The challenge for this problem is determining how to keep track of the set PMIk(x) for all x ∈X in an online fashion. 3 Motivation Pointwise mutual information underlies many experiments in computational (psycho-)linguistics, going back at least to Church and Hanks [1990], who at the time referred to PMI as a mathematical formalization of the psycholinguistic association score. We do not attempt to summarize this work in its entirety, but give representative highlights below. Trigger Models Rosenfeld [1994] was interested in collecting trigger pairs, ⟨A, B⟩, such that the presence of A in a document is likely to “trigger” an occurrence of B. There the concern was in finding the most useful triggers overall, and thus pairs were favored based on high average mutual information; I(A, B) = P(AB) lg P (AB) P (A)P (B) + P(A ¯B) lg P (A ¯ B) P (A)P ( ¯ B) + P( ¯A ¯B) lg P ( ¯ A ¯ B) P ( ¯ A)P ( ¯ B) + P( ¯AB) lg P ( ¯ AB) P ( ¯ A)P (B). As commented by Rosenfeld, the first term of his equation relates to the PMI formula given by Church and Hanks [1990]. We might describe our work here as collecting terms y, triggered by each x, once we know x to be present. As the number of possible terms is large,3 we limit ourselves to the top-k items. Associated Verbs Chambers and Jurafsky [2008], following work such as Lin [1998] and Chklovski and Pantel [2004], introduced a probabilistic model for learning Shankian script-like structures which they termed narrative event chains; for example, if in a given document someone pleaded, admits and was convicted, then it is likely they were also sentenced, or paroled, or fired. Prior to enforcing a temporal ordering (which does not concern us here), Chambers and Jurafsky acquired clusters of related verb-argument pairs by finding those that shared high PMI. Associativity in Human Memory Central to their rational analysis of human memory, Schooler and Anderson [1997] approximated the needs odds, n, of a memory structure S as the product of recency and context factors, where the context factor is the product of associative ratios between S and local cues; n ∼= P (S|HS) P ( ¯S|HS) Q q∈QS P (Sq) P (S)P (q). If we take x to range over cues, and y to be a memory structure, then in our work here we are storing the identities of the top-k memory structures for a given cue x, as according to strength of associativity.4 4 Lower Bound We first discuss the difficulty in solving the online PMI problem exactly. An obvious first attempt at an algorithm for this problem is to use approximate counters to estimate the PMI for each pair in 3Rosenfeld: ... unlike in a bigram model, where the number of different consecutive word pairs is much less than [the vocabulary] V 2, the number of word pairs where both words occurred in the same document is a significant fraction of V 2. 4Note that Frank et al. [2007] gave evidence suggesting PMI may be suboptimal for cue modeling, but to our understanding this result is limited to the case of novel language acquisition. 2 the stream and maintain the top-k for each x using a priority queue. This method does not work, as illustrated by the examples below. Example 1 (probability of y changes): Consider the stream xy xy xy xz wz | wy wy wy wy wy which we have divided in half. After the first half, y is best for x since PMI(x, y) = lg 3/5 (4/5)(3/5) = lg (5/4) and PMI(x, z) = lg 1/5 (4/5)(2/5) = lg (5/8). At the end of the second half of the stream, z is best for x since PMI(x, y) = lg 3/10 (4/10)(8/10) ≈lg (0.94) and PMI(x, z) = lg 1/10 (4/10)(2/10) = lg (1.25). However, during the second half of the stream we never encounter x and hence never update its value. So, the naive algorithm behaves erroneously. What this example shows is that not only does the naive algorithm fail, but also that the top-k PMI of some x may change (because of the change in probability of y) without any opportunity to update PMIk(x). Next, we show another example which illustrates the failure of the naive algorithm due to the fact that it does not re-compute every PMI each time. Example 2 (probability of x changes): Consider the stream pd py py xy xd in which we are interested in only the top PMI tuples for x. When we see xy in the stream, PMI(x, y) = lg 1/4 (1/4)(3/4) ≈lg (1.33), and when we see xd in the stream, PMI(x, d) = lg 1/5 (2/5)(2/5) = lg (1.25). As a result, we retain xy but not xd. However, xy’s PMI is now PMI(x, y) = lg 1/5 (2/5)(3/5) = lg (0.833) which means that we should replace xy with xd. However, since we didn’t re-compute PMI(x, y), we erroneously output xy. We next formalize these intuitions into a lower bound showing why it might be hard to compute every PMIk(x) precisely. For this lower bound, we make the simplifying assumption that the size of the set X is much smaller than N (i.e., |X| ∈o(N)), which is the usual case in practice. Theorem 1: Any algorithm that explicitly maintains the top-k PMIs for all x ∈X in a stream of length at most n (where |X| ∈o(n)) in a single pass requires Ω(n|X|) time. We will prove this theorem using the following lemma: Lemma 1: Any algorithm that explicitly maintains the top-k PMIs of |X| = p + 1 items over a stream of length at most n = 2r + 2p + 1 in a single pass requires Ω(pr) time. Proof of Lemma 1: Let us take the length of the stream to be n, where we assume without loss of generality that n is odd. Let X = {x1, . . . , xp+1}, Y = {y1, y2} and let us consider the following stream: x1y1, x2y1, x3y1, . . . , xpy1, x1y2, x2y2, x3y2, . . . , xpy2, xp+1y1 xp+1y2, xp+1y2, xp+1y1, xp+1y1, xp+1y2, xp+1y2, . . . xp+1y1+r(mod)2, xp+1y1+r(mod)2.          r times Suppose that we are interested in maintaining only the top-PMI item for each xi ∈X (the proof easily generalizes to larger k). Let us consider the update cost for only the set Xp = {x1, . . . , xp} ⊆ X. After xp+1y1 appears in the stream for the first time, it should be evident that all the elements of Xp have a higher PMI with y2 than y1. However, after we see two copies of xp+1y2, the PMI of y1 is higher than that of y2 for each x ∈Xp. Similarly, the top-PMI of each element of Xp alternates between y1 and y2 for the remainder of the stream. Now, the current PMI for each element of Xp must be correct at any point in the stream since the stream may terminate at any time. Hence, by construction, the top PMI of x1, . . . , xp will change at least r times in the course of this stream, for 3 a total of at least pr operations. The length of the stream is n = 2p + 2r + 1. This completes the proof of Lemma 1. □ Proof of Theorem 1: Taking |X| = p + 1, we have in the construction of Lemma 1 that r = (n −2p −1)/2 = (n −2|X| + 1)/2. Hence, there are at least pr = (|X| −1)(n −2|X| + 1)/2 = Ω(n|X| −|X|2) update operations required. Since we assumed that |X| ∈o(n), this is Ω(n|X|) operations. □ Hence, there must be a high update cost for any such algorithm. That is, on average, any algorithm must perform Ω(|X|) operations per item in the stream. 5 Algorithm The lower bound from the previous section shows that, when solving the PMI problem, the best one can do is effectively cross-check the PMI for every possible x ∈X for each item in the stream. In practice, this is far too expensive and will lead to online algorithms that cannot keep up with the rate at which the input data is produced. To solve this problem, we propose a heuristic algorithm that sacrifices some accuracy for speed in computation. Besides keeping processing times in check, we have to be careful about the memory requirements of any proposed algorithm. Recall that we are interested in retaining information for all pairs of x and y, where each is drawn from a set of cardinality in the millions. Our algorithm uses approximate counting to retain the counts of all pairs of items ⟨x, y⟩in a data structure Cxy. We keep exact counts of all x and y since this takes considerably less space. Given these values, we can (approximately) estimate PMI(x, y) for any ⟨x, y⟩in the stream. We assume Cxy to be based on recent work in space efficient counting methods for streamed text data [Talbot, 2009; Van Durme and Lall, 2009]. For our implementation we used TOMB counters [Van Durme and Lall, 2009] which approximate counts by storing values in log-scale. These log-scale counts are maintained in unary within layers of Bloom filters [Bloom, 1970] (Figure 1) that can be probabilistically updated using a small base (Figure 2); each occurrence of an item in the stream prompts a probabilistic update to its value, dependent on the base. By tuning this base, one can trade off between the accuracy of the counts and the space savings of approximate counting. Figure 1: Unary counting with Bloom filters. . . . 1 b b2 1 −b−1 1 −b−2 1 −b−3 b−3 b−2 b−1 Figure 2: Transition by base b. Now, to get around the problem of having stale PMI values because the count of x changing (i.e., the issue in Example 2 in the previous section), we divide the stream up into fixed-size buffers B and re-compute the PMIs for all pairs seen within each buffer (see Algorithm 1). Updating counts for x, y and ⟨x, y⟩is constant time per element in the stream. Insertion into a k-best priority queue requires O(lg k) operations. Per interval, we perform in the worst case one insertion per new element observed, along with one insertion for each element stored in the previous rank lists. As long as |B| ≥|X|k, updating rank lists costs O(|B|lg k) per interval.5 The algorithm therefore requires O(n + n lg k) = O(n lg k) time, where n is the length of the stream. Note that when |B| = n we have the standard offline method for computing PMI across X and Y (not withstanding approximate counters). When |B| < |X|k, we run afoul of the lower bound given by Theorem 2. Regarding space, |I| ≤|B|. A benefit of our algorithm is that this can be kept significantly smaller than |X| × |Y |,6 since in practice, |Y | ≫lg k. 5I.e., the extra cost for reinserting elements from the previous rank lists is amortized over the buffer length. 6E.g., the V 2 of Rosenfeld. 4 Algorithm 1 FIND-ONLINE-PMI 1: initialize hashtable counters Hx and Hy for exact counts 2: initialize an approximate counter Cxy 3: initialize rank lists, L, mapping x to k-best priority queue storing ⟨y, PMI(x, y)⟩ 4: for each buffer B in the stream do 5: initialize I, mapping ⟨x, y⟩to {0, 1}, denoting whether ⟨x, y⟩was observed in B 6: for ⟨x, y⟩in B do 7: set I(⟨x, y⟩) = 1 8: increment Hx(x)  initial value of 0 9: increment Hy(y)  initial value of 0 10: insert ⟨x, y⟩into Cxy 11: end for 12: for each x ∈X do 13: re-compute L(x) using current y ∈L(x) and {y|I(⟨x, y⟩) = 1} 14: end for 15: end for 5.1 Misclassification Probability Bound Our algorithm removes problems due to the count of x changing, but does not solve the problem that the probability of y changes (i.e., the issue in Example 1 in the previous section). The PMI of a pair ⟨x, y⟩may decrease considerably if there are many occurrences of y (and relatively few occurrences of ⟨x, y⟩) in the stream, leading to the removal of y from the true top-k list for x. We show in the following that this is not likely to happen very often for the text data that our algorithm is designed to work on. In giving a bound on this error, we will make two assumptions: (i) the PMI for a given x follows a Zipfian distribution (something that we observed in our data), and (ii) the items in the stream are drawn independently from some underlying distribution (i.e., they are i.i.d.). Both these assumptions together help us to sidestep the lower bound proved earlier and demonstrate that our single-pass algorithm will perform well on real language data sets. We first make the observation that, for any y in the set of top-k PMIs for x, if ⟨x, y⟩appears in the final buffer then we are guaranteed that y is correctly placed in the top-k at the end. This is because we recompute PMIs for all the pairs in the last buffer at the end of the algorithm (line 13 of Algorithm 1). The probability that ⟨x, y⟩does not appear in the last buffer can be bounded using the i.i.d. assumption to be at most  1 −c(x, y) n |B| ≈ e−|B|c(x,y) n ≤ e−k|X|c(x,y)/n, where for the last inequality we use the bound |B| ≥|X|k that we assumed in the previous section. Hence, in those cases that c(x, y) = Ω(n/(|X|k)), our algorithm correctly identifies y as being in the top-k PMI for x with high probability. The proof for general c(x, y) is given next. We study the probability with which some y′ which is not in the top-k PMI for a fixed x can displace some y in the top-k PMI for x. We do so by studying the last buffer in which ⟨x, y⟩appears. The only way that y′ can displace y in the top-k for x in our algorithm is if at the end of this buffer the following holds true: ct(x, y′) ct(y′) > ct(x, y) ct(y) , where the t subscripts denotes the respective counts at the end of the buffer. We will show that this event occurs with very small probability. We do so by bounding the probability of the following three unlikely events. If we assume all c(x, y) are above some threshold m, then with only small probability (i.e., 1/2m) will the last buffer containing ⟨x, y⟩appear before the midpoint of the stream. So, let us assume that the buffer appears after the midpoint of the stream. Then, the probability that ⟨x, y′⟩appears more than (1 + δ)c(x, y′)/2 times by this point can be bounded by the Chernoff bound to be at most 5 exp(−c(x, y′)δ2/8). Similarly, the probability that y′ appears less than (1 −δ)c(y′)/2 times by this point can be bounded by exp(−c(y′)δ2/4). Putting all these together, we get that Pr ct(x, y′) ct(y′) > (1 + δ)c(x, y′) (1 −δ)c(y′)  < 1/2m + exp(−c(x, y′)δ2/8) + exp(−c(y′)δ2/4). We now make use of the assumption that the PMIs are distributed in a Zipfian manner. Let us take the rank of the PMI of y′ to be i (and recall that the rank of the PMI of y is at most k). Then, by the Zipfian assumption, we have that PMI(x, y) ≥(i/k)sPMI(x, y′), where s is the Zipfian parameter. This can be re-written as c(x,y) c(y) ≥ c(x,y′) c(y′) 2((i/k)s−1)PMI(x,y′). We can now put all these results together to bound the probability of the event Pr ct(x, y′) ct(y′) > ct(x, y) ct(y)  ≤1/2m + exp(−c(x, y′)δ2/8) + exp(−c(y′)δ2/4), where we take δ = (((i/k)s −1)2PMI(x,y′) −1)/(((i/k)s −1)2PMI(x,y′) + 1). Hence, the probability that some low-ranked y′ will displace a y in the top-k PMI of x is low. Taking a union bound across all possible y′ ∈Y gives a bound of 1/2m + |Y |(exp(−c(x, y′)δ2/8) + exp(−c(y′)δ2/4)).7 6 Experiments We evaluated our algorithm for online, k-best PMI with a set of experiments on collecting verbal triggers in a document collection. For each document, we considered all verb::verb pairs, nonstemmed; e.g., wrote::ruled, fighting::endure, argued::bore. For each unique verb x observed in the stream, our goal was to recover the top-k verbs y with the highest PMI given x.8 Readers may peek ahead to Table 2 for example results. Experiments were based on 100,000 NYTimes articles taken from the Gigaword Corpus [Graff, 2003]. Tokens were tagged for part of speech (POS) using SVMTool [Gim´enez and M`arquez, 2004], a POS tagger based on SVMlight [Joachims, 1999]. Our stream was constructed by considering all pairwise combinations of the roughly 82 (on average) verb tokens occurring in each document. Where D ∈D is a document in the collection, let Dv refer to the list of verbal tokens, not necessarily unique. The length of our stream, n, is therefore: P D ∈D |Dv| 2  .9 While research into methods for space efficient, approximate counting has been motivated by a desire to handle exceptionally large datasets (using limited resources), we restricted ourselves here to a dataset that would allow for comparison to explicit, non-approximate counting (implemented through use of standard hashtables).10 We will refer to such non-approximate counting as perfect counting. Finally, to guard against spurious results arising from rare terms, we employed the same c(xy) > 5 threshold as used by Church and Hanks [1990]. We did not heavily tune our counting mechanism to this task, other than to experiment with a few different bases (settling on a base of 1.25). As such, empirical results for approximate counting 7For streams composed such as described in our experiments, this bound becomes powerful as m approaches 100 or beyond (recalling that both c(x, y′), c(y′) > m). Experimentally we observed this to be conservative in that such errors appear unlikely even when using a smaller threshold (e.g., m = 5). 8Unlike in the case of Rosenfeld [1994], we allowed for triggers to occur anywhere in a document, rather than exclusively in the preceding context. This can be viewed as a restricted version of the experiments of Chambers and Jurafsky [2008], where we consider all verb pairs, regardless of whether they are assumed to possess a co-referent argument. 9For the experiments here, n = 869, 641, 588, or roughly 900 million, ⟨x, y⟩pairs. If fully enumerated as text, this stream would have required 12GB of uncompressed storage. Vocabulary size, |X| = |Y |, was roughly 30 thousand (28,972) unique tokens. 10That is, since our algorithm is susceptible to adversarial manipulation of the stream, it is important to establish the experimental upper bound that is possible assuming zero error due to the use of probabilistic counts. 6 G G G GGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG 0 10 20 30 40 50 0.05 0.15 (a) 10 20 30 40 50 0.6 0.8 1.0 standard instrumented (b) Figure 3: 3(a) : Normalized, mean PMI for top-50 y for each x. 3(b) : Accuracy of top-5 ranklist using the standard measurement, and when using an instrumented counter that had oracle access to which ⟨x, y⟩were above threshold. Table 1: When using a perfect counter and a buffer of 50, 500 and 5,000 documents, for k = 1, 5, 10: the accuracy of the resultant k-best lists when compared to the first k, k + 1 and k + 2 true values. Buffer 1 2 3 5 6 7 10 11 12 50 94.10 98.75 99.45 97.25 99.13 99.60 98.05 99.26 99.63 500 94.14 98.81 99.53 97.31 99.16 99.62 98.12 99.29 99.65 5000 94.69 98.93 99.60 97.76 99.30 99.71 98.55 99.46 99.74 k = 1 k = 5 k = 10 should be taken as a lower bound, while the perfect counting results are the upper bound on what an approximate counter might achieve. We measured the accuracy of resultant k-best lists by first collecting the true top-50 elements for each x, offline, to be used as a key. Then, for a proposed k-best list, accuracy was calculated at different ranks of the gold standard. For example, the elements of a proposed 10-best list will optimally fully intersect with the first 10 elements of the gold standard. In the case the list is not perfect, we would hope that an element incorrectly positioned at, e.g., rank 9, should really be of rank 12, rather than rank 50. Using this gold standard, Figure 3(a) shows the normalized, mean PMI scores as according to rank. This curve supports our earlier theoretical assumption that PMI over Y is a Zipfian distribution for a given x. 6.1 Results In Table 1 we see that when using a perfect counter, our algorithm succeeds in recovering almost all top-k elements. For example, when k = 5, reading 500 documents at a time, our rank lists are 97.31% accurate. Further, of those collected triggers that are not truly in the top-5, most were either in the top 6 or 7. As there appears to be minimal impact based on buffer size, we fixed |B| = 500 documents for the remainder of our experiments.11 This result supports the intuition behind our misclassification probability bound: while it is possible for an adversary to construct a stream that would mislead our online algorithm, this seems to rarely occur in practice. Shown in Figure 3(b) are the accuracy results when using an approximate counter and a buffer size of 500 documents, to collect top-5 rank lists. Two results are presented. The standard result is based on comparing the rank lists to the key just as with the results when using a perfect counter. A problem with this evaluation is that the hard threshold used for both generating the key, and the results for perfect counting, cannot be guaranteed to hold when using approximate counts. It is possible that 11Strictly speaking, |B| is no larger than the maximum length interval in the stream resulting from enumerating the contents of, e.g., 500 consecutive documents. 7 Table 2: Top 5 verbs, y, for x = bomb, laughed and vetoed. Left columns are based on using a perfect counter, while right columns are based on an approximate counter. Numeral prefixes denote rank of element in true top-k lists. All results are with respect to a buffer of 500 documents. x = bomb x = laughed x = vetoed 1:detonate 1:detonate 1:tickle -:panang 1:vetoing 1:vetoing 2:assassinate 7:bombed 2:tickling 1:tickle 2:overridden 2:overridden 3:bomb 2:assassinate 3:tickled 3:tickled 3:overrode 4:override 4:plotting 4:plotting 4:snickered 2:tickling 4:override 5:latches 5:plotted 8:expel 5:captivating 4:snickered 5:latches 7:vetoed some ⟨x, y⟩pair that occurs perhaps 4 or 5 times may be misreported as occurring 6 times or more. In this case, the ⟨x, y⟩pair will not appear in the key in any position, thus creating an artificial upper bound on the possible accuracy as according to this metric. For purposes of comparison, we instrumented the approximate solution to use a perfect counter in parallel. All PMI values were computed as before, using approximate counts, but the perfect counter was used just in verifying whether a given pair exceeded the threshold. In this way the approximate counting solution saw just those elements of the stream as observed in the perfect counting case, allowing us to evaluate the ranking error introduced by the counter, irrespective of issues in “dipping below” the threshold. As seen in the instrumented curve, top-5 rank lists generated when using the approximate counter are composed primarily of elements truly ranked 10 or below. 6.2 Examples Figure 2 contains the top-5 most associated verbs as according to our algorithm, both when using a perfect and an approximate counter. As can be seen for the perfect counter, and as suggested by Table 1, in practice it is possible to track PMI scores over buffered intervals with a very high degree of accuracy. For the examples shown (and more generally throughout the results), the resultant k-best lists are near perfect matches to those computed offline. When using an approximate counter we continue to see reasonable results, with some error introduced due to the use of probabilistic counting. The rank 1 entry reported for x = laughed exemplifies the earlier referenced issue of the approximate counter being able to incorrectly dip below the threshold for terms that the gold standard would never see.12 7 Conclusions In this paper we provided the first study of estimating top-k PMI online. We showed that while a precise solution comes at a high cost in the streaming model, there exists a simple algorithm that performs well on real data. An avenue of future work is to drop the assumption that each of the top-k PMI values is maintained explicitly and see whether there is an algorithm that is feasible for the streaming version of the problem or if a similar lower bound still applies. Another promising approach would be to apply the tools of two-way associations to this problem [Li and Church, 2007]. An experiment of Schooler and Anderson [1997] assumed words in NYTimes headlines operated as cues for the retrieval of memory structures associated with co-occurring terms. Missing from that report was how such cues might be accumulated over time. The work presented here can be taken as a step towards modeling resource constrained, online cue learning, where an appealing description of our model involves agents tracking co-occurring events over a local temporal window (such as a day), and regularly consolidating this information into long term memory (when they “sleep”). Future work may continue this direction by considering data from human trials. Acknowledgements Special thanks to Dan Gildea, as well as Rochester HLP/Jaeger-lab members for ideas and feedback. The first author was funded by a 2008 Provost’s Multidisciplinary Award from the University of Rochester, and NSF grant IIS-0328849. The second author was supported in part by the NSF grants CNS-0905169 and CNS-0910592, funded under the American Recovery and Reinvestment Act of 2009 (Public Law 111-5), and by NSF grant CNS-0716423. 12I.e., the token panang, incorrectly tagged as a verb, is sparsely occurring. 8 References [Bloom, 1970] Burton H. Bloom. Space/time trade-offs in hash coding with allowable errors. Communications of the ACM, 13:422–426, 1970. [Chambers and Jurafsky, 2008] Nathanael Chambers and Dan Jurafsky. Unsupervised Learning of Narrative Event Chains. In Proceedings of ACL, 2008. [Chklovski and Pantel, 2004] Timothy Chklovski and Patrick Pantel. VerbOcean: Mining the Web for FineGrained Semantic Verb Relations. In Proceedings of Conference on Empirical Methods in Natural Language Processing (EMNLP-04), pages 33–40, Barcelona, Spain, 2004. [Church and Hanks, 1990] Kenneth Church and Patrick Hanks. Word Association Norms, Mutual Information and Lexicography. Computational Linguistics, 16(1):22–29, March 1990. [Frank et al., 2007] Michael C. Frank, Noah D. Goodman, and Joshua B. Tenenbaum. A Bayesian framework for cross-situational word learning. In Advances in Neural Information Processing Systems, 20, 2007. [Gim´enez and M`arquez, 2004] Jes´us Gim´enez and Llu´ıs M`arquez. SVMTool: A general POS tagger generator based on Support Vector Machines. In Proceedings of LREC, 2004. [Graff, 2003] David Graff. English Gigaword. Linguistic Data Consortium, Philadelphia, 2003. [Joachims, 1999] Thorsten Joachims. Making large-scale SVM learning practical. In B. Sch¨olkopf, C. Burges, and A. Smola, editors, Advances in Kernel Methods - Support Vector Learning, chapter 11, pages 169–184. MIT Press, Cambridge, MA, 1999. [Li and Church, 2007] Ping Li and Kenneth W. Church. A sketch algorithm for estimating two-way and multiway associations. Computational Linguistics, 33(3):305–354, 2007. [Lin, 1998] Dekang Lin. Automatic Retrieval and Clustering of Similar Words. In Proceedings of COLINGACL, 1998. [Rosenfeld, 1994] Ronald Rosenfeld. Adaptive Statistical Language Modeling: A Maximum Entropy Approach. PhD thesis, Computer Science Department, Carnegie Mellon University, April 1994. [Schooler and Anderson, 1997] Lael J. Schooler and John R. Anderson. The role of process in the rational analysis of memory. Cognitive Psychology, 32(3):219–250, 1997. [Talbot and Osborne, 2007] David Talbot and Miles Osborne. Randomised Language Modelling for Statistical Machine Translation. In Proceedings of ACL, 2007. [Talbot, 2009] David Talbot. Succinct approximate counting of skewed data. In Proceedings of IJCAI, 2009. [Van Durme and Lall, 2009] Benjamin Van Durme and Ashwin Lall. Probabilistic Counting with Randomized Storage. In Proceedings of IJCAI, 2009. 9
2009
31
3,779
Nonparametric Bayesian Models for Unsupervised Event Coreference Resolution Cosmin Adrian Bejan1, Matthew Titsworth2, Andrew Hickl2, & Sanda Harabagiu1 1 Human Language Technology Research Institute, University of Texas at Dallas 2 Language Computer Corporation, Richardson, Texas ady@hlt.utdallas.edu Abstract We present a sequence of unsupervised, nonparametric Bayesian models for clustering complex linguistic objects. In this approach, we consider a potentially infinite number of features and categorical outcomes. We evaluated these models for the task of within- and cross-document event coreference on two corpora. All the models we investigated show significant improvements when compared against an existing baseline for this task. 1 Introduction In Natural Language Processing (NLP), the task of event coreference has numerous applications, including question answering, multi-document summarization, and information extraction. Two event mentions are coreferential if they share the same participants and spatio-temporal groundings. Moreover, two event mentions are identical if they have the same causes and effects. For example, the three documents listed in Table 1 contains four mentions of identical events but only the arrested, apprehended, and arrest mentions from the documents 1 and 2 are coreferential. These definitions were used in the tasks of Topic Detection and Tracking (TDT), as reported in [24]. Previous approaches to event coreference resolution [3] used the same lexeme or synonymy of the verb describing the event to decide coreference. Event coreference was also tried by using the semantic types of an ontology [17]. However, the features used by these approaches are hard to select and require the design of domain specific constraints. To address this problems, we have explored a sequence of unsupervised, nonparametric Bayesian models that are used to probabilistically infer coreference clusters of event mentions from a collection of unlabeled documents. Our approach is motivated by the recent success of unsupervised approaches for entity coreference resolution [16, 22, 25] and by the advantages of using a large amount of data at no cost. One model was inspired by the fully generative Bayesian model proposed by Haghighi and Klein [16] (henceforth, H&K). However, to employ the H&K’s model for tasks that require clustering objects with rich linguistic features (such as event coreference resolution), or to extend this model in order to enclose additional observable properties is a challenging task [22, 25]. In order to counter this limitation, we make a conditional independence assumption between the observable features and propose a generalized framework (Section 3) that is able to easily incorporate new features. During the process of learning the model described in Section 3, it was observed that a large amount of time was required to incorporate and tune new features. This lead us to the challenge of creating a framework which considers an unbounded number of features where the most relevant are selected automatically. To accomplish this new goal, we propose two novel approaches (Section 4). The first incorporates a Markov Indian Buffet Process (mIBP) [30] into a Hierarchical Dirichlet Process (HDP) [28]. The second uses an Infinite Hidden Markov Model (iHMM) [5] coupled to an Infinite Factorial Hidden Markov Model (iFHMM) [30]. In this paper, we focus on event coreference resolution, though adaptations for event identity resolution can be easily made. We evaluated the models on the ACE 2005 event corpus [18] and on a new annotated corpus encoding within- and cross-document event coreference information (Section 5). 1 Document 1: San Diego Chargers receiver Vincent Jackson was arrested on suspicion of drunk driving on Tuesday morning, five days before a key NFL playoff game. . . . Police apprehended Jackson in San Diego at 2:30 a.m. and booked him for the misdemeanour before his release. Document 2: Despite his arrest on suspicion of driving under the influence yesterday, Chargers receiver Vincent Jackson will play in Sunday’s AFC divisional playoff game at Pittsburgh. Document 3: In another anti-piracy operation, Navy warship on Saturday repulsed an attack on a merchant vessel in the Gulf of Aden and nabbed 23 Somali and Yemeni sea brigands. Table 1: Examples of coreferential and identical events. 2 Event Coreference Resolution Models for solving event coreference and event identity can lead to the generation of ad-hoc event hierarchies from text. A sample of a hierarchy capturing corefering and identical events, including those from the example presented in Section 1, is illustrated in Figure 1. arrest arrest Event properties: Suspect: Authorities: Time: Location: sea brigands Navy warship Saturday Gulf of Aden ... nabbed ... Document 3 ... arrested ... apprehended ... arrest ... Document 2 mentions event generic events arrest Document 1 Suspect: Authorities: Time: Location: Vincent Jackson police Tuesday San Diego Event properties: events Figure 1: A portion of the event hierarchy. First, we introduce some basic notation.1 Next, to cluster the mentions that share common event properties (as shown in Figure 1), we briefly describe the linguistic features of event mentions. 2.1 Notation As input for our models, we consider a collection of I documents, each document i having Ji event mentions. Each event mention is characterized by L feature types, FT, and each feature type is represented by a finite number of feature values, fv. Therefore, we can represent the observable properties of an event mention, em, as a vector of pairs ⟨(FT1 : fv1i), . . . , (FTL : fvLi)⟩, where each feature value index i ranges in the feature value space associated with a feature type. 2.2 Linguistic Features We consider the following set of features associated to an event mention:2 Lexical Features (LF) To capture the lexical context of an event mention, we extract the following features: the head word of the mention (HW), the lemma of the HW (HL), lemmas of left and right words of the mention (LHL,RHL), and lemmas of left and right mentions (LHE,RHE). Class Features (CF) These features aim to classify mentions into several types of classes: the mention HW’s part-of-speech (POS), the word class of the HW (HWC), which can take one of the following values ⟨verb, noun, adjective, other⟩, and the event class of the mention (EC). To extract the event class associated to every event mention, we employed the event identifier described in [6]. WordNet Features (WF) We build three types of clusters over all the words from WordNet [9] and use them as features for the mention HW. First cluster type associates an unique id to each (word:HWC) pair (WNW). The second cluster type uses the transitive closure of the synonymous relations to group words from WordNet (WNS). Finally, the third cluster type considers as grouping criteria the category from WordNet lexicographer’s files that is associated to each word (WNL). For cases when a new word does not belong to any of these WordNet clusters, we create a new cluster with a new id for each of the three cluster types. Semantic Features (SF) To extract features that characterize participants and properties of event mentions, we use s semantic parser [8] trained on PropBank(PB) [23] and FrameNet(FN) [4] corpora. (For instance, for the apprehended mention from our example, Jackson is the feature value 1For consistency, we try to preserve the notation of the original models. 2In this subsection and the following section, the feature term is used in context of a feature type. 2 for A0 PB argument3 and the SUSPECT frame element (FEA0) of the ARREST frame.) Another semantic feature is the semantic frame (FR) that is evoked by an event mention. (For instance, all the emphasized mentions from our example evoke the ARREST frame from FN.) Feature Combinations (FC) We also explore various combinations of features presented above. Examples include HW+POS, HL+FR, FE+A1, etc. 3 Finite Feature Models In this section, we present a sequence of HDP mixture models for solving event coreference. For this type of approach, a Dirichlet Process (DP) [10] is associated with each document, and each mixture component, which in our case corresponds to an event, is shared across documents. To describe these models, we consider Z the set of indicator random variables for indices of events, φz the set of parameters associated to an event z, φ a notation for all model parameters, and X a notation for all random variables that represent observable features. Given a document collection annotated with event mentions, the goal is to find the best assignment of event indices, Z∗, which maximize the posterior probability P(Z | X). In a Bayesian approach, this probability is computed by integrating out all model parameters: P(Z|X) = Z P(Z, φ|X)dφ = Z P(Z|X, φ)P(φ|X)dφ In order to describe our modifications, we first revisit a basic model from the set of models described in H&K’s paper. 3.1 The One Feature Model The one feature model, HDP1f, constitutes the simplest representation of an HDP model. In this model, which is depicted graphically in Figure 2(a), the observable components are characterized by only one feature. The distribution over events associated to each document β is generated by a Dirichlet process with a concentration parameter α > 0. Since this setting enables a clustering of event mentions at the document level, it is desirable that events are shared across documents and the number of events K is inferred from data. To ensure this flexibility, a global nonparametric DP prior with a hyperparameter γ and a global base measure H can be considered for β [28]. The global distribution drawn from this DP prior, denoted as β0 in Figure 2(a), encodes the event mixing weights. Thus, same global events are used for each document, but each event has a document specific distribution βi that is drawn from a DP prior centered on β0. To infer the true posterior probability of P(Z|X), we follow [28] in using a Gibbs sampling algorithm [12] based on the direct assignment sampling scheme. In this sampling scheme, the β and φ parameters are integrated out analytically. The formula for sampling an event index for mention j from document i, Zi,j, is given by:4 P(Zi,j | Z−i,j, HL) ∝P(Zi,j | Z−i,j)P(HLi,j | Z, HL−i,j) where HLi,j is the head lemma of the event mention j from the document i. First, in the generative process of an event mention, an event index z is sampled by using a mechanism that facilitates sampling from a prior for infinite mixture models called the Chinese Restaurant Franchise (CRF) representation [28]: P(Zi,j = z | Z−i,j, β0) ∝  αβu 0 , if z = znew nz + αβz 0, otherwise Here, nz is the number of event mentions with the event index z, znew is a new event index not used already in Z−i,j, βz 0 are the global mixing proportions associated to the K events, and βu 0 is the weight for the unknown mixture component. Then, to generate the mention head lemma (in this model, X = ⟨HL⟩), the event z is associated with a multinomial emission distribution over the HL feature values having the parameters φ = ⟨φhl Z ⟩. We assume that this emission distribution is drawn from a symmetric Dirichlet distribution with concentration λHL: 3A0 annotates in PB a specific type of semantic role which represents the AGENT, the DOER, or the ACTOR of a specific event. Another PB argument is A1, which plays the role of the PATIENT, the THEME, or the EXPERIENCER of an event. 4Z−i,j represents a notation for Z −{Zi,j}. 3 H Zi ∞ β α γ φ ∞ Xi β0 ∞ Ji I L H φ ∞ HLi FRi POSi α γ ∞ β β0 ∞ I θ Ji Zi H Zi HLi FRi φ ∞ γ α ∞ β β0 ∞ I Ji H Zi HLi φ ∞ α γ ∞ β Ji β0 ∞ I (b) (c) (d) (a) Figure 2: Graphical representation of four HDP models. Each node corresponds to a random variable. In particular, shaded nodes denotes observable variables. Each rectangle captures the replication of the structure it contains. The number of replications is indicated in the bottom-right corner of the rectangle. The model depicted in (a) is an HDP model using one feature; the model in (b) employs HL and FR features; (c) illustrates a flat representation of a limited number of features in a generalized framework (henceforth, HDPflat); and (d) captures a simple example of structured network topology of three feature variables (henceforth, HDPstruct). The dependencies involving parameters φ and θ in models (b), (c), and (d) are omitted for clarity. P(HLi,j = hl | Z, HL−i,j) ∝nhl,z + λHL where HLi,j is the head lemma of mention j from document i, and nhl,z is the number of times the feature value hl has been associated with the event index z in (Z, HL−i,j). We also apply the Lidstone’s smoothing method to this distribution. 3.2 Adding More Features A model in which observable components are represented only by one feature has the tendency to cluster these components based on their feature value. To address this limitation, H&K proposed a more complex model that is strictly customized for entity coreference resolution. On the other hand, event coreference involves clustering complex objects characterized by richer features than entity coreference (or topic detection), and therefore it is desirable to extend the HDP1f model with a generalized model where additional features can be easily incorporated. To facilitate this extension, we assume that feature variables are conditionally independent given Z. This assumption considerably reduces the complexity of computing P(Z | X). For example, if we want to incorporate another feature (e.g., FR) in the previous model, the formula becomes: P(Zi,j |HL, FR) ∝P(Zi,j)P(HLi,j, FRi,j |Z) = P(Zi,j)P(HLi,j |Z)P(FRi,j |Z) In this formula, we omit the conditioning components of Z, HL, and FR for clarity. The graphical representation corresponding to this model is illustrated in Figure 2(b). In general, if X consists of L feature variables, the inference formula for the Gibbs sampler is defined as: P(Zi,j |X) ∝P(Zi,j) Y F T ∈X P(FTi,j |Z) The graphical model for this general setting is depicted in Figure 2(c). Drawing an analogy, the graphical representation involving feature variables and Z variables resembles the graphical representation of a Naive Bayes classifier. When dependencies between feature variables exist (e.g., in our case, frame elements are dependent of the semantic frames that define them, and frames are dependent of the words that evoke them), various global distributions are involved for computing P(Z | X). For instance, for the model depicted in Figure 2(d) the posterior probability is given by: P(Zi,j)P(FRi,j |HLi,j, θ) Y F T ∈X P(FTi,j |Z) In this model, P(FRi,j | HLi,j, θ) is a global distribution parameterized by θ, and the feature variables considered are X=⟨HL, POS, FR⟩. 4 For all these extended models, we compute the prior and likelihood factors as described in the one feature model. Also, following H&K, in the inference mechanism we assign soft counts for missing features (e.g., unspecified PB argument). 4 Unbounded Feature Models First, we present a generative model called the Markov Indian Buffet Process (mIBP) that provides a mechanism in which each object can be represented by a sparse subset of a potentially unbounded set of latent features [15, 14, 30].5 Then, to overcome the limitations regarding the number of mixture components and the number of features associated with objects, we combine this mechanism with an HDP model to form an mIBP-HDP hybrid. Finally, to account for temporal dependencies, we employ an mIBP extension, called the Infinite Factorial Hidden Markov Model (iFHMM) [30], in combination with an Infinite Hidden Markov Model (iHMM) to form the iFHMM-iHMM model. 4.1 The Markov Indian Buffet Process As described in [30], the mIBP defines a distribution over an unbounded set of binary Markov chains, where each chain can be associated to a binary latent feature that evolves over time according to Markov dynamics. Specifically, if we denote by M the total number of feature chains and by T the number of observable components (event mentions), the mIBP defines a probability distribution over a binary matrix F with T rows, which correspond to observations, and an unbounded number of columns (M →∞), which correspond to features. An observation yt contains a subset from the unbounded set of features {f 1, f 2, . . . , f M} that is represented in the matrix by a binary vector Ft =⟨F 1 t , F 2 t , . . . , F M t ⟩, where F i t =1 indicates that f i is associated to yt. Therefore, F decomposes the observations and represents them as feature factors, which can then be associated to hidden variables in an iFHMM as depicted in Figure 3(a). The transition matrix of a binary Markov chain associated to a feature f m is defined as W(m) =  1 −am am 1 −bm bm  where W(m) ij = P(F m t+1 = j | F m t = i), the parameters am ∼Beta(α′/M, 1) and bm ∼Beta(γ′, δ′), and the initial state F m 0 = 0. In the generative process, the hidden variable of feature f m for an object yt, F m t ∼Bernoulli(a 1−F m t−1 m b F m t−1 m ). To compute the probability of the feature matrix F6, in which the parameters a and b are integrated out analytically, we use the counting variables c00 m, c01 m, c10 m, and c11 m to record the 0 →0, 0 →1, 1→0, and 1→1 transitions f m has made in the binary chain m. The stochastic process that derives the probability distribution in terms of these variables is defined as follows. The first component samples a number of Poisson(α′) features. In general, depending on the value that was sampled in the previous step (t −1), a feature f m is sampled for the tth component according to the following probabilities: P(F m t = 1|F m t−1 =1) = c11 m + δ′ γ′ + δ′ + c10 m + c11 m P(F m t = 1|F m t−1 =0) = c00 m c00 m + c01 m The tth component then repeats the same mechanism for sampling the next features until it finishes the current number of sampled features M. After all features are sampled for the tth component, a number of Poisson(α′/t) new features are assigned for this component and M gets incremented accordingly. 4.2 The mIBP-HDP Model One direct application of the mIBP is to integrate it into the HDP models proposed in Section 3. In this way, the new nonparametric extension will have the benefits of capturing uncertainty regarding the number of mixture components that are characterized by a potentially infinite number of features. Since one observable component is associated with an unbounded countable set of features, we have to provide a mechanism in which only a finite set of features will represent the component in the HDP inference process. 5In this section, a feature is represented by a (feature type:feature value) pair. 6Technical details for computing this probability are described in [30]. 5 Y1 F2 1 F1 1 FM 1 FM 2 Y2 F2 2 F1 2 FM T YT F2 T F1 T (a) F2 0 F1 0 FM 0 (b) F2 0 F2 1 F2 2 F2 T F1 0 Y1 F1 1 Y2 F1 2 YT F1 T S0 FM 0 FM 1 FM 2 FM T S1 S2 ST Figure 3: (a) The Infinite Factorial Hidden Markov Model. (b) The iFHMM-iHMM model. (M→∞) The idea behind this mechanism is to use slice sampling7 [21] in order to derive a finite set of features for yt. Letting qm be the number of times feature f m was sampled in the mIBP, and vt an auxiliary variable for yt such that vt ∼Uniform(1, max{qm | F m t =1}), we define the finite feature set Bt for the observation yt as: Bt = {f m | F m t = 1 ∧qm ≥vt} The finiteness of this feature set is based on the observation that, in the generative process of the mIBP, only a finite set of features are sampled for a component. Another observation worth mentioning regarding the way this set is constructed is that only the most representative features of yt get selected in Bt. 4.3 The iFHMM-iHMM Model The iFHMM is a nonparametric Bayesian factor model that extends the Factorial Hidden Markov Model (FHMM) [13] by letting the number of parallel Markov chains M be learned from data. Although the iFHMM allows a more flexible representation of the latent structure, it can not be used as a framework where the number of clustering components K is infinite. On the other hand, the iHMM represents a nonparametric extension of the Hidden Markov Model (HMM) [27] that allows performing inference on an infinite number of states K. In order to further increase the representational power for modeling discrete time series data, we propose a nonparametric extension that combines the best of the two models, and lets the parameters M and K be learned from data. Each step in the new generative process, whose graphical representation is depicted in Figure 3(b), is performed in two phases: (i) the latent feature variables from the iFHMM framework are sampled using the mIBP mechanism; and (ii) the features sampled so far, which become observable during this second phase, are used in an adapted beam sampling algorithm [29] to infer the clustering components (or, in our case, latent events). To describe the beam sampler for event coreference resolution, we introduce additional notation. We denote by (s1, . . . , sT ) the sequence of hidden states corresponding to the sequence of event mentions (y1, . . . , yT ), where each state st belong to one of the K events, st ∈{1, . . . , K}, and each mention yt is represented by a sequence of latent features ⟨F 1 t , F 2 t , . . . , F M t ⟩. One element of the transition probability π is defined as πij = P(st = j | st−1 = i) and a mention yt is generated according to a likelihood model F that is parameterized by a state-dependent parameter φst (yt | st ∼F(φst)). The observation parameters φ are iid drawn from a prior base distribution H. The beam sampling algorithm combines the ideas of slice sampling and dynamic programming for an efficient sampling of state trajectories. Since in time series models the transition probabilities have independent priors [5], Van Gael and colleagues [29] also used the HDP mechanism to allow couplings across transitions. For sampling the whole hidden state trajectory s, this algorithm employs a forward filtering-backward sampling technique. In the forward step of our implementation, we sample the feature variables using the mIBP as described in Section 4.1, and the auxiliary variable ut ∼Uniform(0, πst−1st) for each mention yt. As explained in [29], the auxiliary variables u are used to filter only those trajectories s for which 7The idea of using this procedure is inspired from [29] where a slice variable was used to sample a finite number of state trajectories in the iHMM. 6 πst−1st ≥ut for all t. Also, in this step, we compute the probabilities P(st | y1:t, u1:t) for all t as described in [29]: P(st | y1:t, u1:t) ∝P(yt | st) X st−1:ut<πst−1st P(st−1 | y1:t−1, u1:t−1) Here, the dependencies involving parameters π and φ are omitted for clarity. In the backward step, we first sample the event for the last state sT directly from P(sT |y1:T, u1:T ) and then, for all t : T −1, 1, we sample each state st given st+1 by using the formula P(st | st+1, y1:T , u1:T)∝P(st|y1:t, u1:t)P(st+1|st, ut+1). To sample the emission distribution φ efficiently, and to ensure that each mention is characterized by a finite set of representative features, we set the base distribution H to be conjugate with the data distribution F in a Dirichlet-multinomial model with the sufficient statistics of the multinomial distribution (o1, . . . , oK) defined as: ok = T X t=1 X f m∈Bt nmk where nmk counts how many times feature f m was sampled for event k, and Bt stores a finite set of features for yt as it is defined in Section 4.2. 5 Evaluation Event Coreference Data One corpus used for evaluation is ACE 2005 [18]. This corpus annotates within-document coreference information of specific types of events (such as Conflict, Justice, and Life). After an initial processing phase, we extracted from ACE 6553 event mentions and 4946 events. To increase the diversity of events and to evaluate the models for both within- and crossdocument event coreference, we created the EventCorefBank corpus (ECB).8 This new corpus contains 43 topics, 1744 event mentions, 1302 within-document events, and 339 cross-document events. For a more realistic approach, we trained the models on all the event mentions from the two corpora and not only on the mentions manually annotated for event coreference (the true event mentions). In this regard, we ran the event identifier described in [6] on the ACE and ECB corpora, and extracted 45289 and 21175 system mentions respectively. The Experimental Setup Table 2 lists the recall (R), precision (P), and F-score (F) of our experiments averaged over 5 runs of the generative models. Since there is no agreement on the best coreference resolution metric, we employed four metrics for our evaluation: the link-based MUC metric [31], the mention-based B3 metric [2], the entity-based CEAF metric [19], and the pairwise F1 (PW) metric. In the evaluation process, we considered only the true mentions of the ACE test dataset and of the test sets of a 5-fold cross validation scheme on the ECB dataset. For evaluating the cross-document coreference annotations, we adopted the same approach as described in [3] by merging all the documents from the same topic into a meta-document and then scoring this document as performed for within-document evaluation. Also, for both corpora, we considered a set of 132 feature types, where each feature type consists on average of 3900 distinct feature values. The Baseline A simple baseline for event coreference consists in grouping events by their event classes [1]. To extract event classes, we employed the event identifier described in [6]. Therefore, this baseline will categorize events into a small number of clusters, since the event identifier is trained to predict the five event classes annotated in TimeBank [26]. As it was already observed [20, 11], considering very few categories for coreference resolution tasks will result in overestimates of the MUC scorer. For instance, a baseline that groups all entity mentions into the same entity achieves the highest MUC score than any published system for the task of entity coreference. Similar behaviour of the MUC metric is observed for event coreference resolution. For example, for crossdocument evaluation on ECB, a baseline that clusters all mentions into one event achieves 73.2% MUC F-score, while the baseline listed in Table 2 achieves 72.9% MUC F-score. HDP Extensions Due to memory limitations, we evaluated the HDPflat and HDPstruct models only on a restricted subset of manually selected feature types. In general, as shown in Table 2, the HDPflat model achieved the best performance results on the ACE test dataset, whereas the 8This resource is available at http://www.hlt.utdallas.edu/∼ady. The annotation process is described in [7]. 7 Model MUC B3 CEAF PW R P F R P F R P F R P F ACE (within-document event coreference) Baseline 94.3 33.1 49.0 97.9 25.0 39.9 14.7 64.4 24.0 93.5 8.2 15.2 HDP1f (HL) 62.2 43.1 50.9 86.0 70.6 77.5 62.3 76.4 68.6 50.5 27.7 35.8 HDPflat 53.5 54.2 53.9 83.4 84.2 83.8 76.9 76.5 76.7 43.3 47.1 45.1 HDPstruct 61.9 49.0 54.7 86.2 76.9 81.3 69.0 77.5 73.0 53.2 38.1 44.4 mIBP-HDP 48.7 41.9 45.1 81.7 76.4 79.0 68.8 73.8 71.2 37.4 28.9 32.6 iFHMM-iHMM 48.7 48.8 48.7 81.9 82.2 82.1 74.6 74.5 74.5 37.2 39.0 38.1 ECB (within-document event coreference) Baseline 92.2 39.8 55.6 97.7 55.8 71.0 44.5 80.1 57.2 93.7 25.4 39.8 HDP1f (HL) 46.9 54.8 50.4 84.3 89.0 86.5 83.4 79.6 81.4 36.6 53.4 42.6 HDPflat 37.8 92.9 53.4 82.1 99.2 89.8 93.9 78.2 85.3 27.0 92.4 41.3 HDPstruct 47.4 82.7 60.1 84.3 97.1 90.2 92.7 81.1 86.5 34.4 83.0 48.6 mIBP-HDP 38.2 68.8 48.9 82.1 95.3 88.2 90.3 78.5 84.0 26.5 67.9 37.7 iFHMM-iHMM 39.5 85.2 53.9 82.5 98.1 89.6 93.1 78.8 85.3 29.4 86.6 43.7 ECB (cross-document event coreference) Baseline 90.5 61.1 72.9 93.8 49.6 64.9 36.6 72.7 48.7 90.7 28.6 43.3 HDP1f (HL) 47.7 70.5 56.8 67.0 86.2 75.3 76.2 57.1 65.2 34.9 58.9 43.5 HDPflat 44.4 95.3 60.5 65.0 98.7 78.3 86.9 56.0 68.0 29.2 95.1 44.4 HDPstruct 51.9 89.5 65.7 69.3 95.8 80.4 86.2 60.1 70.8 37.5 85.6 52.1 mIBP-HDP 40.0 79.8 53.2 63.1 94.1 75.5 82.7 54.6 65.7 26.1 77.0 38.9 iFHMM-iHMM 48.4 89.0 62.7 67.0 96.4 79.0 85.5 58.0 69.1 33.3 88.3 48.2 Table 2: Evaluation results for within- and cross-document event coreference resolution. HDPstruct model, which also considers dependencies between feature types, proved to be more effective on the ECB dataset for both within- and cross-document event coreference evaluation. The set of feature types used to achieve these results consists of combinations of types from all feature categories described in Section 2.2. For the results of the HDPstruct model listed in Table 2, we also explored the conditional dependencies between the HL, FR, and FEA types. As can be observed from Table 2, the results of the HDPflat and HDPstruct models show an F-score increase by 4-10% over the HDP1f model, and therefore prove that the HDP extensions provide a more flexible representation for clustering objects characterized by rich properties. mIBP-HDP In spite of its advantage of working with a potentially infinite number of features in an HDP framework, the mIBP-HDP model did not achieve a satisfactory performance in comparison with the other proposed models. However, the results were obtained by automatically selecting only 2% of distinct feature values from the entire set of values extracted from both corpora. When compared with the restricted set of features considered by the HDPflat and HDPstruct models, the percentage of values selected by mIBP-HDP is only 6%. A future research area for improving this model is to consider other distributions for automatic selection of salient feature values. iFHMM-iHMM In spite of the automatic feature selection employed for the iFHMM-iHMM model, its results remain competitive against the results of the HDP extensions (where the feature types were hand tuned). As shown in Table 2, most of the iFHMM-iHMM results fall in between the HDPflat and HDPstruct models. Also, these results indicate that the iFHMM-iHMM model is a better framework than HDP in capturing the event mention dependencies simulated by the mIBP feature sampling scheme. Similar to the mIBP-HDP model, to achieve these results, the iFHMMiHMM model uses only 2% values from the entire set of distinct feature values. For the experiments of the iFHMM-iHMM results reported in Table 2, we set α′=50, γ′=0.5, and δ′=0.5. 6 Conclusion In this paper, we have described how a sequence of unsupervised, nonparametric Bayesian models can be employed to cluster complex linguistic objects that are characterized by a rich set of features. The experimental results proved that these models are able to solve real data applications in which the feature and cluster numbers are treated as free parameters, and the selection of features is performed automatically. While the results of event coreference resolution are promising, we believe that the classes of models proposed in this paper have a real utility for a wide range of applications. 8 References [1] David Ahn. 2006. The stages of event extraction. In Proceedings of the Workshop on Annotating and Reasoning about Time and Events, pages 1–8. [2] Amit Bagga and Breck Baldwin. 1998. Algorithms for Scoring Coreference Chains. In Proc. of LREC. [3] Amit Bagga and Breck Baldwin. 1999. Cross-Document Event Coreference: Annotations, Experiments, and Observations. In Proceedings of the ACL-99 Workshop on Coreference and its Applications. [4] Collin F. Baker, Charles J. Fillmore, and John B. Lowe. 1998. The Berkeley FrameNet project. In Proceedings of COLING-ACL. [5] Matthew J. Beal, Zoubin Ghahramani, and Carl Edward Rasmussen. 2002. The Infinite Hidden Markov Model. In Proceedings of NIPS. [6] Cosmin Adrian Bejan. 2007. Deriving Chronological Information from Texts through a Graph-based Algorithm. In Proceedings of FLAIRS-2007. [7] Cosmin Adrian Bejan and Sanda Harabagiu. 2008. A Linguistic Resource for Discovering Event Structures and Resolving Event Coreference. In Proceedings of LREC-2008. [8] Cosmin Adrian Bejan and Chris Hathaway. 2007. UTD-SRL: A Pipeline Architecture for Extracting Frame Semantic Structures. In Proceedings of SemEval-2007. [9] Christiane Fellbaum. 1998. WordNet: An Electronic Lexical Database. MIT Press. [10] Thomas S. Ferguson. 1973. A Bayesian Analysis of Some Nonparametric Problems. The Annals of Statistics, 1(2):209–230. [11] Jenny Rose Finkel and Christopher D. Manning. 2008. Enforcing Transitivity in Coreference Resolution. In Proceedings of ACL/HLT-2008, pages 45–48. [12] Stuart Geman and Donald Geman. 1984. Stochastic relaxation, Gibbs distributions and the Bayesian restoration of images. . IEEE Transactions on Pattern Analysis and Machine Intelligence, 6:721–741. [13] Z. Ghahramani and M. Jordan. 1997. Factorial Hidden Markov Models. Machine Learning, 29:245–273. [14] Zoubin Ghahramani, T. L. Griffiths, and Peter Sollich, 2007. Bayesian Statistics 8, chapter Bayesian nonparametric latent feature models, pages 201–225. Oxford University Press. [15] Tom Griffiths and Zoubin Ghahramani. 2006. Infinite Latent Feature Models and the Indian Buffet Process. In Proceedings of NIPS, pages 475–482. [16] Aria Haghighi and Dan Klein. 2007. Unsupervised Coreference Resolution in a Nonparametric Bayesian Model. In Proceedings of the ACL. [17] Kevin Humphreys, Robert Gaizauskas, Saliha Azzam. 1997. Event Coreference for Information Extraction. In Proceedings of the Workshop on Operational Factors in Practical, Robust Anaphora Resolution for Unrestricted Texts, 35th Meeting of ACL, pages 75–81. [18] LDC-ACE05. 2005. ACE (Automatic Content Extraction) English Annotation Guidelines for Events. [19] X. Luo. 2005. On Coreference Resolution Performance Metrics. In Proceedings of EMNLP. [20] X. Luo, A. Ittycheriah, H. Jing, N. Kambhatla, and S. Roukos 2004. A Mention-Synchronous Coreference Resolution Algorithm Based On the Bell Tree. In Proceedings of ACL-2004. [21] Radford M. Neal. 2003. Slice Sampling. The Annals of Statistics, 31:705–741. [22] Vincent Ng. 2008. Unsupervised Models for Coreference Resolution. In Proceedings of EMNLP. [23] Martha Palmer, Daniel Gildea, and Paul Kingsbury. 2005. The Proposition Bank: An Annotated Corpus of Semantic Roles. Computational Linguistics, 31(1):71–105. [24] Ron Papka. 1999. On-line New Event Detection, Clustering and Tracking. Ph.D. thesis, Department of Computer Science, University of Massachusetts. [25] Hoifung Poon and Pedro Domingos. 2008. Joint Unsupervised Coreference Resolution with Markov Logic. In Proceedings of EMNLP. [26] J. Pustejovsky, P. Hanks, R. Sauri, A. See, R. Gaizauskas, A. Setzer, D. Radev, B. Sundheim, D. Day, L. Ferro, and M. Lazo. 2003. The TimeBank Corpus. In Corpus Linguistics, pages 647–656. [27] Lawrence R. Rabiner. 1989. A Tutorial on Hidden Markov Models and Selected Applications in Speech Recognition. In Proceedings of the IEEE, pages 257–286. [28] Yee Whye Teh, Michael Jordan, Matthew Beal, and David Blei. 2006. Hierarchical Dirichlet Processes. Journal of the American Statistical Association, 101(476):1566–1581. [29] Jurgen Van Gael, Yunus Saatci, Yee Whye Teh, and Zoubin Ghahramani. 2008. Beam Sampling for the Infinite Hidden Markov Model. In Proceedings of ICML, pages 1088–1095. [30] Jurgen Van Gael, Yee Whye Teh, and Zoubin Ghahramani. 2008. The Infinite Factorial Hidden Markov Model. In Proceedings of NIPS. [31] Marc Vilain, John Burger, John Aberdeen, Dennis Connolly, and Lynette Hirschman. 1995. A ModelTheoretic Coreference Scoring Scheme. In Proceedings of MUC-6, pages 45–52. 9
2009
32
3,780
A Stochastic approximation method for inference in probabilistic graphical models Peter Carbonetto Dept. of Human Genetics University of Chicago Chicago, IL, U.S.A. pcarbone@bsd.uchicago.edu Matthew King Dept. of Botany University of British Columbia Vancouver, B.C., Canada kingdom@interchange.ubc.ca Firas Hamze D-Wave Systems Burnaby, B.C., Canada fhamze@dwavesys.com Abstract We describe a new algorithmic framework for inference in probabilistic models, and apply it to inference for latent Dirichlet allocation (LDA). Our framework adopts the methodology of variational inference, but unlike existing variational methods such as mean field and expectation propagation it is not restricted to tractable classes of approximating distributions. Our approach can also be viewed as a “population-based” sequential Monte Carlo (SMC) method, but unlike existing SMC methods there is no need to design the artificial sequence of distributions. Significantly, our framework offers a principled means to exchange the variance of an importance sampling estimate for the bias incurred through variational approximation. We conduct experiments on a difficult inference problem in population genetics, a problem that is related to inference for LDA. The results of these experiments suggest that our method can offer improvements in stability and accuracy over existing methods, and at a comparable cost. 1 Introduction Over the past several decades, researchers in many different fields—statistics, economics, physics, genetics and machine learning—have focused on coming up with more accurate and more efficient approximate solutions to intractable probabilistic inference problems. To date, there are three widely-explored approaches to approximate inference in probabilistic models: obtaining a Monte Carlo estimate by simulating a Markov chain (MCMC); obtaining a Monte Carlo estimate by drawing samples from a distribution other than the target then reweighting the samples to account for any discrepancies (importance sampling); and variational inference, in which the original integration problem is transformed into an optimization problem. The variational approach in particular has attracted wide interest in the machine learning community, and this interest has lead to a number of important innovations in approximate inference— some of these more recent developments are described in the dissertations of Beal [3], Minka [22], Ravikumar [27] and Wainwright [31]. The key idea behind variational inference is to come up with a family of approximating distributions ˆp(x; θ) that have “nice” analytic properties, then to optimize some criterion in order to find the distribution parameterized by θ that most closely matches the target posterior p(x). All variational inference algorithms, including belief propagation and its generalizations [32], expectation propagation [22] and mean field [19], can be derived from a common objective, the Kullback-Leibler (K-L) divergence [9]. The major drawback of variational methods is that the best approximating distribution may still impose an unrealistic or questionable factorization, leading to excessively biased estimates (see Fig. 1, left-hand side). In this paper, we describe a new variational method that does not have this limitation: it adopts the methodology of variational inference without being restricted to tractable classes of approximate 1 distributions (see Fig. 1, right-hand side). The catch is that the variational objective (the K-L divergence) is difficult to optimize because its gradient cannot be computed exactly. So to descend along the surface of the variational objective, we propose to employ stochastic approximation [28] with Monte Carlo estimates of the gradient, and update these estimates over time with sequential Monte Carlo (SMC) [12]—hence, a stochastic approximation method for probabilistic inference. Large gradient descent steps may quickly lead to a degenerate sample, so we introduce a mechanism that safeguards the variance of the Monte Carlo estimate at each iteration (Sec. 3.5). This variance safeguard mechanism does not make the standard effective sample size (ESS) approximation [14], hence it is likely to more accurately monitor the variance of the sample. Figure 1: The guiding principle behind standard variational methods (top) is to find the approximating density ˆp(x; θ) that is closest to the distribution of interest p(x), yet remains within the defined set of tractable probability distributions. In our approach (bottom), the class of approximating densities always coincides with the target p(x). Indirectly, the variance safeguard provides a way to obtain an estimator that has low variance in exchange for (hopefully small) bias. To our knowledge, our algorithm is the first general means of achieving such a trade-offand, in so doing, it draws meaningful connections between Monte Carlo and variational methods. The advantage of our stochastic approximation method with respect to other variational methods is rather straightforward: it does not restrict the class of variational densities by making assumptions about their structure. However, whe advantage of our approach compared to Monte Carlo methods such as annealed importance sampling (AIS) [24] is less obvious. One key advantage is that there is no need to design the sequence of SMC distributions as it is a direct product of the algorithm’s derivation (Sec. 3). It is our conjecture that this automatic selection, when combined with the variance safeguard, is more efficient than setting the sequence by hand, say, via tempered transitions [12, 18, 24]. The population genetics experiments we conduct in Sec. 4 provide some support for this claim. We illustrate our approach on the problem of inferring population structure from a cohort of genotyped sequences using the mixture model of Pritchard et al. [26]. We show in Sec. 4 that Markov chain Monte Carlo (MCMC) is prone to producing very different answers in independent simulations, and that it fails to adequately capture the uncertainty in its solutions. For many population genetics applications, such as wildlife conservation [8], it is crucial to accurately characterize the confidence in a solution. Since variational methods employing mean field approximations [4, 30] tend to be overconfident, they are poorly suited for this problem. (This has generally not been an issue for semantic text analysis [4, 15].) As we show, SMC with a uniform sequence of tempered distributions fares little better than MCMC. The implementation of our approach on the population structure model demonstrates improvements in both accuracy and reliability over MCMC and SMC alternatives, and at a comparable computational cost. The latent Dirichlet allocation (LDA) model [4] is very similar to the population structure model of [26], under the assumption of fixed Dirichlet priors. Since LDA is already familiar to the machine learning audience, it serves as a running example throughout our presentation. 1.1 Related work The interface of optimization and simulation strategies for inference has been explored in a number of papers, but none of the existing literature resembles the approach proposed in this paper. De Freitas et al. [11] use a variational approximation to formulate a Metropolis-Hastings proposal. Recent work on adaptive MCMC [1] combines ideas from both stochastic approximation and MCMC to automatically learn better proposal distributions. Our work is also unrelated to the paper [20] with a similar title, where stochastic approximation is applied to improving the Wang-Landau algorithm. Younes [33] employs stochastic approximation to compute the maximum likelihood estimate of an undirected graphical model. Also, the cross-entropy method [10] uses importance sampling and optimization for inference, but exhibits no similarity to our work beyond that. 2 2 Latent Dirichlet allocation Latent Dirichlet allocation (LDA) is a generative model of a collection of text documents, or corpus. Its two key features are: the order of the words is unimportant, and each document is drawn from a mixture of topics. Each document d = 1, . . . , D is expressed as a “bag” of words, and each word wdi = j refers to a vocabulary item j ∈{1, . . . , W}. (Here we assume each document has the same length N.) Also, each word has a latent topic indicator zdi ∈{1, . . . , K}. Observing the jth vocabulary item in the kth topic occurs with probability βkj. The word proportions for each topic are generated according to a Dirichlet distribution with fixed prior η. The latent topic indicators are generated independently according to p(zdi =k | τd) ≡τdk, and τd in turn follows a Dirichlet with prior ν. The generative process we just described defines a joint distribution over the observed data w and unknowns x = {β, τ, z} given the hyperparameters {η, ν}: p(w, x | η, ν) = K Y k=1 p(βk | η) × D Y d=1 p(τd | ν) × D Y d=1 N Y i=1 p(wdi | zdi, β) p(zdi | τd), (1) The directed graphical model is given in Fig. 2. Figure 2: Directed graphical model for LDA. Shaded nodes represent observations or fixed quantities. Implementations of approximate inference in LDA include MCMC [15, 26] and variational inference with a mean field approximation [4, 30]. The advantages of our inference approach become clear when it is measured up against the variational mean field algorithm of [4]: first, we make no additional assumptions regarding the model’s factorization; second, the number of variational parameters is independent of the size of the corpus, so there is no need to resort to coordinate-wise updates that are typically slow to converge. 3 Description of algorithm The goal is to calculate the expectation of function ϕ(x) with respect to target distribution p(x): Ep( · )[ϕ(X)] = R ϕ(x) p(x) dx. (2) In LDA, the target density p(x) is the posterior of x = {β, τ, z} given w derived via Bayes’ rule. From the importance sampling identity [2], we can obtain an unbiased estimate of (2) by drawing n samples from a proposal q(x) and evaluating importance weights w(x) = p(x)/q(x). (Usually p(x) can only be evaluated up to a normalizing constant, in which case the asymptotically unbiased normalized importance sampling estimator [2] is used instead.) The Monte Carlo estimator is Ep( · )[ϕ(X)] ≈1 n Pn s=1w(x(s)) ϕ(x(s)). (3) Unless great care is taken is in designing the proposal q(x), the Monte Carlo estimator will exhibit astronomically high variance for all but the smallest problems. • Draw samples from initial density ˆp(x; θ1). • for k = 2, 3, 4, . . . - Stochastic approximation step: take gradient descent step θk = θk−1−αkgk, where gk is a Monte Carlo estimate of the gradient of the K-L divergence, and αk is the variancesafeguarded step size. - SMC step: update samples and importance weights to reflect new density ˆp(x; θk). Figure 3: Algorithm sketch. Instead, we construct a Monte Carlo estimate (3) by replacing p(x) with an alternate target ˆp(x; θ) that resembles it, so that all importance weights are evaluated with respect to this alternate target. (We elaborate on the exact form of ˆp(x; θ) in Sec. 3.1.) This new estimator is biased, but we minimize the bias by solving a variational optimization problem. Our algorithm has a dual interpretation: it can be interpreted as a stochastic approximation algorithm for solving a variational optimization problem, in which the iterates are the parameter vectors θk, and it can be equally viewed as a sequential Monte Carlo (SMC) method [12], in which each distribution ˆp(x; θk) in the 3 sequence is chosen dynamically based on samples from the previous iteration. The basic idea is spelled out in Fig. 3. At each iteration, the algorithm selects a new target ˆp(x; θk) by optimizing the variational objective. Next, the samples are revised in order to compute the stochastic gradient gk+1 at the next iteration. Since SMC is effectively a framework for conducting importance sampling over a sequence of distributions, we describe a “variance safeguard” mechanism (Sec. 3.5) that directly regulates increases in variance at each step by preventing the iterates θk from moving too quickly. It is in this manner that we achieve a trade-offbetween bias and variance. Since this is a stochastic approximation method, asymptotic convergence of θk to a minimizer of the objective is guaranteed under basic theory of stochastic approximation [29]. As we elaborate below, this implies that ˆp(x; θk) will converge almost surely to the target distribution p(x) as k approaches infinity. And asymptotic variance results from the SMC literature [12] tell us that the Monte Carlo estimates will converge almost surely to the target expectation (2) so long as ˆp(x; θk) approaches p(x). A crucial condition is that the stochastic estimates of the gradient be unbiased. There is no way to guarantee unbiased estimates under a finite number of samples, so convergence holds only as the number of iterations and number of samples both approach infinity. To recap, the probabilistic inference recipe we propose has five main ingredients: one, a family of approximating distributions that admits the target (Sec. 3.1); two, a variational optimization problem framed using the K-L divergence measure (Sec. 3.2); three, a stochastic approximation method for finding a solution to the variational optimization problem (Sec. 3.3); four, the implementation of a sequential Monte Carlo method for constructing stochastic estimates of the gradient of the variational objective (Sec 3.4); and five, a way to safeguard the variance of the importance weights at each iteration of the stochastic approximation algorithm (Sec. 3.5). 3.1 The family of approximating distributions The first implementation step is the design of a family of approximating distributions ˆp(x; θ) parameterized by vector θ. In order to devise a useful variational inference procedure, the usual strategy is to restrict the class of approximating distributions to those that factorize in an analytically convenient fashion [4, 19] or, in the dual formulation, to introduce an approximate (but tractable) decomposition of the entropy [32]. Here, we impose no such restrictions on tractability; refer to Fig. 1. We allow any family of approximating distributions so long as it satisfies these three conditions: 1.) there is at least one θ = θ1 such that samples can be drawn from ˆp(x; θ1); 2.) there is a θ = θ⋆that recovers the target ˆp(x; θ⋆) = p(x), hence an unbiased estimate of (2); and 3.) the densities are members of the exponential family [13] expressed in standard form ˆp(x; θ) = exp{⟨a(x), θ⟩−c(θ)}, (4) in which ⟨·, ·⟩is an inner product, the vector-valued function a(x) is the statistic of x, and θ is the natural or canonical parameterization. The log-normalization factor c(θ) ≡log R exp⟨a(x), θ⟩dx ensures that ˆp(x; θ) represents a proper probability. We further assume that the random vector x can be partitioned into two sets A and B such that it is always possible to draw samples from the conditionals ˆp(xA | xB; θ) and ˆp(xB | xA; θ). Hidden Markov models, mixture models, continuous-time Markov processes, and some Markov random fields are all models that satisfy this condition. This extra condition could be removed without great difficulty, but doing so would add several complications to the description of the algorithm. The restriction to the exponential family is not a strong one as most conventionally-studied densities can be written in the form (4). For LDA, we chose a family of approximating densities of the form ˆp(x; θ) = exp PD d=1 PK k=1(νk + ndk −1) log τdk + PK k=1 PW j=1(ˆηkj −1) log βkj + φPK k=1 PW j=1mkj log βkj + γPK k=1 PW j=1(cj −mkj) log βkj −c(θ) , (5) where mkj ≡P d P i δk(zdi) δj(wdi) counts the number of times the jth word is assigned to the kth topic, ndk ≡P i δk(zdi) counts the number of words assigned to the kth topic in the dth document, and cj ≡P d P i δj(wdi) is is the number of times jth vocabulary item is observed. The natural parameters are θ = {ˆη, φ, γ}, with θ ≥0. The target posterior ˆp(x; θ⋆) ∝p(w, x | η, ν) is recovered by setting φ = 1, γ = 0 and ˆη = η. A sampling density with a tractable expression for c(θ) is recovered whenever we set φ equal to γ. The graphical structure of LDA (Fig. 2) allows us to draw samples from the conditionals ˆp(β, τ | z; θ) and ˆp(z | β, τ; θ). Loosely speaking, this choice is meant to strike a balance between the mean field approximation [4] (with parameters ˆηkj) and the tempered distribution (with “local” temperature parameters φ and γ). 4 3.2 The variational objective The Kullback Leibler (K-L) divergence [9] asymmetrically measures the distance between the target distribution p(x) = ˆp(x; θ⋆) and approximating distribution ˆp(x; θ), F(θ) = ⟨Eˆp( · ; θ)[a(X)], θ −θ⋆⟩+ c(θ⋆) −c(θ), (6) the optimal choice being θ = θ⋆. This is our variational objective. The fact that we cannot compute c(θ) poses no obstacle to optimizing the objective (6); through application of basic properties of the exponential family, the gradient vector works out to be the matrix-vector product ∇F(θ) = Varˆp( · ; θ)[a(X)](θ −θ⋆), (7) where Var[a(X)] is the covariance matrix of the statistic a(x). The real obstacle is the presence of an integral in (7) that is most likely intractable. With a collection of samples x(s) with importance weights w(s), for s = 1, . . . , n, that approximate ˆp(x; θ), we have the Monte Carlo estimate ∇F(θ) ≈Pn s=1 w(s)(a(x(s)) −¯a)(a(x(s)) −¯a)T (θ −θ⋆), (8) where ¯a ≡P s w(s)a(x(s)) denotes the Monte Carlo estimate of the mean statistic. Note that these samples {x(s), w(s)} serve to estimate both the expectation (2) and the gradient (7). The algorithm’s performance hinges on a good search direction, so it is worth our while to reduce the variance of the gradient measurements when possible via Rao-Blackwellization [6]. Since we no longer have an exact value for the gradient, we appeal to the theory of stochastic approximation. 3.3 Stochastic approximation Instead of insisting on making progress toward a minimizer of f(θ) at every iteration, as in gradient descent, stochastic approximation only requires that progress be achieved on average. The Robbins-Monro algorithm [28] iteratively adjusts the control variable θ according to θk+1 = θk −αkgk, (9) where gk is a noisy observation of f(θk), and {αk} is a sequence of step sizes. Provided the sequence of step sizes satisfies certain conditions, this algorithm is guaranteed to converge to the solution f(θ⋆) = 0; see [29]. In our case, f(θ) = ∇F(θ) = 0 is the first-order condition for an unconstrained minimum. Due to poor conditioning, we advocate replacing the gradient descent search direction ∆θk = −gk in (9) by the quasi-Newton search direction ∆θk = −B−1 k gk, where Bk is a damped quasi-Newton (BFGS) approximation of the Hessian [25]. To handle constraints θ ≥0 introduced in Sec. 3.1, we use the stochastic interior-point method of [5]. After having taken a step along ∆θk, the samples must be updated to reflect the new distribution ˆp(x; θk+1). To accomplish this feat, we use SMC [12] to sample from a sequence of distributions. 3.4 Sequential Monte Carlo In the first step of SMC, samples x1(s) are drawn from a proposal density q1(x) = ˆp(x; θ1) so that the initial importance weights are uniform. After k steps the proposal density is ˜qk(x1:k) = Kk(xk | xk−1) · · · K2(x2 | x1) ˆp(x1; θ1), (10) where Kk(x′ | x) is the Markov kernel that extends the path at every iteration. The insight of [12] is that if we choose the densities ˜pk(x1:k) wisely, we can update the importance weights ˜wk(x1:k) = ˜pk(x1:k)/˜qk(x1:k) without having to look at the entire history. This special construction is ˜pk(x1:k) = L1(x1 | x2) · · · Lk−1(xk−1 | xk) ˆp(xk; θk), (11) where we’ve introduced a series of artificial “backward” kernels Lk(x | x′). In this paper, the sequence of distributions is determined by the iterates θk, so there remain two degrees of freedom: the choice of forward kernel Kk(x′ | x), and the backward kernel Lk(x | x′). From the assumptions made in Sec. 3.1, a natural choice for the forward transition kernel is the two-stage Gibbs sampler, Kk(x′ | x) = ˆp(x′ A | x′ B; θk) ˆp(x′ B | xA; θk), (12) in which we first draw a sample of xB (in LDA, the variables τ and β) given xA (the discrete variables z), then update xA conditioned on xB. A Rao-Blackwellized version of the sub-optimal backward kernel [12] then leads to the following expression for updating the importance weights: ˜wk(x1:k) = ˜p(xA; θk)/˜p(xA; θk−1) × ˜wk−1(x1:k−1), (13) where xA is the component from time step k −1 restricted to the set A, and ˜p(xA; θk) is the unnormalized version of the marginal ˆp(xA; θk). It also follows from earlier assumptions (Sec 3.1) that it is always possible to compute ˜p(xA; θ). Refer to [15] for the marginal of z for LDA. 5 3.5 Safeguarding the variance • Let n, θ1, θ⋆, A, B, {αk} be given. • Draw x(s) ∼ˆp(x; θ1), set w(s) = 1/n. • Set inverse Hessian H to the identity. • for k = 2, 3, 4, . . . 1. Compute gk ≈∇F(θk−1); see (8). 2. if k > 2, then modify H following damped quasi-Newton update. 3. Compute variance-safeguarded step size αk ≤ˆαk given ∆θk = −Hgk. 4. Set θk = θk−1 + αk∆θk. 5. Update w(s) following (13). 6. Run the two-stage Gibbs sampler: - Draw x(s) B ∼ˆp( · | x(s) A ; θk). - Draw x(s) A ∼ˆp( · | x(s) B ; θk). 7. Resample particles, if necessary. Figure 4: The proposed algorithm. A key component of the algorithm is a mechanism that enables the practitioner to regulate the variance of the importance weights and, by extension, the variance of the Monte Carlo estimate of E[ϕ(X)]. The trouble with taking a full step (9) is that the Gibbs kernel (12) may be unable to effectively migrate the particles toward the new target, in which case the the importance weights will overcompensate for this failure, quickly leading to a degenerate population. The remedy we propose is to find a step size αk that satisfies βSk(θk) ≤Sk−1(θk−1), (14) for β ∈[0, 1], whereby a β near 1 leads to a stringent safeguard, and we’ve defined Sk(θk) ≡Pn s=1( ˜wk(x(s) 1:k) −1 n)2 (15) to be the sample variance (× n) for our choice of L(x | x′). Note that since our variance safeguard scheme is myopic, the behaviour of the algorithm can be sensitive to the number of iterations. The safeguarded step size is derived as follows. The goal is to find the largest step size αk satisfying (14). Forming a Taylor-series expansion with second-order terms about the point αk = 0, the safeguarded step size is the solution to 1 2∆θT k ∇2Sk(θk−1)∆θkα2 k + ∆θT k ∇Sk(θk−1) αk = 1−β β Sk−1(θk−1), (16) where ∆θk is the search direction at iteration k. In our experience, the quadratic approximation to the importance weights (13) was unstable as it occasionally recommended strange step sizes, but a naive importance weight update without Rao-Blackwellization yielded a reliable bound on (14). The derivatives of Sk(θk) work out to sample estimates of second and third moments that can be computed in O(n) time. Since the importance weights initially have zero variance, no positive step size will satisfy (14). We propose to also permit step sizes that do not drive the ESS below a factor ξ ∈(0, 1) from the optimal sample. Resampling will still be necessary over long sequences to prevent the population from degenerating. The basic algorithm is summarized in Fig. 4. 4 Application to population genetics text corpus documents topics languages vocabulary ⇔ population structure individuals demes loci alleles Figure 5: Correspondence between LDA [4] and the population structure [26] models. Microsatellite genetic markers have been used to determine the genealogy of human populations, and to assess individuals’ ancestry in inferring disease risks [16]. The problem is that all these tasks require defining a priori population structure. The Bayesian model of Pritchard et al. [26] offers a solution to this conundrum by simultaneously identifying both patterns of population subdivision and the ancestry of individuals from highly variable genetic markers. This model is the same as LDA assuming fixed Dirichlet priors and a single genetic marker; see Fig. 5 for the connection between the two domains. This model, however, can be frustrating to work with because independent MCMC simulations can produce remarkably different answers for the same data, even simulations millions of samples long. Such inference challenges have been observed in other mixture models [7]; MCMC can do a poor job exploring the hypothesis space when there are several divergent hypotheses that explain the data. Method. We used the software CoaSim [21] to simulate the evolution of genetic markers following a coalescent process. The coalescent is a lineage of alleles in a sample traced backward in time to their common ancestor allele, and the coalescent process is the stochastic process that generates the genealogy [17]. We introduced divergence events at various coalescent times (see Fig. 6) so that we ended up with 4 isolated populations. We simulated 10 microsatellite markers each with a maximum of 30 alleles. We simulated the markers twice with scaled mutation rates of 2 and 1 2, and for each rate we simulated 60 samples from the coalescent process (15 diploid individuals from each of the 4 populations). These samples are the words w in LDA. This may not seem like a large data set, but it will be large enough to impose major challenges to approximate inference. 6 Figure 7: Variance in estimates of the admixture distance and admixture level taken over 20 trials. Figure 6: The structured coalescent process with divergence events at coalescent times T = 0, 1 2, 1, 2. The width of the branches represents effective population size, and the arrow points backward in time. The present isolated populations are labeled left-to-right 1 through 4. The goal is to obtain posterior estimates that recover the correct population structure (Fig. 6) and exhibit high agreement in independent simulations. Specifically, the goal is to recover the moments of two statistics: the admixture distance, a measure of two individuals’ dissimilarity in their ancestry, and the admixture level where 0 means an individual’s alleles all come from a single population, and 1 means its ancestry is shared equally among the K populations. The admixture distance between individuals d and d′ is ϕ(τd, τd′) ≡1 2 PK k=1|τdk −τd′k|, (17) and the admixture level of the dth individual is ψ(τd) ≡1 − K 2(K−1) PK k=1 τdk −1 K . (18) We compared our algorithm to MCMC as implemented in the software Structure [26], and to another SMC algorithm, annealed importance sampling (AIS) [24], with a uniform tempering schedule. One possible limitation of our study is that the choice of temperature scehdule can be critical to the success of AIS, and we did not thoroughly investigate alternative schedules. Also, note that our intent was not to present an exhaustive comparison of Monte Carlo methods, so we did not compare to population MCMC [18], for example, which has advantages similar to AIS. For the two data sets, and for each K from 2 to 6 (the most appropriate setting being K = 4), we carried out 20 independent trials of the three methods. For fair comparison, we ran the methods with the same number of sampling events: for MCMC, a Markov chain of length 50,000 and burn-in of 10,000; for both SMC methods, 100 particles and 500 iterations. Additional settings included an ESS threshold of 50, maximum step sizes αk = 1/(1 + k)0.6, centering parameters σk = 1/k0.9 for the stochastic interior-point method, safeguards β = 0.95 and ξ = 0.9, and a quasi-Newton damping factor of 0.75. We set the initial iterate of stochastic approximation to φ = γ = ˆηkj = η⋆ j . We used uniform Dirichlet priors η⋆ j = νk = 0.1 throughout. Results. First let’s examine the variance in the answers. Fig. 7 shows the variance in the estimates of the admixture level and admixture distance over the independent trials. To produce these plots, at every K we took the individual d or pair (d, d′) that exhibited the most variance in the estimate of E[ϕ(τd, τd′)] and E[ψ(τd)]. What we observe is that the stochastic approximation method produced significantly more consistent estimates in almost all cases, whereas AIS offered little or no improvement over MCMC. The next step is to examine the accuracy of these answers. Fig. 8 shows estimates from MCMC and stochastic approximation selected trials under a mutation rate of 1 2 and K = 4 (left-hand side), and under a mutation rate of 2 and K = 3 (right-hand side). The trials were chosen to reflect the extent of variation in the answers. The mean and standard deviation of the admixture distance statistic are drawn as matrices. The 60 rows and 60 columns in each matrix correspond to individuals sorted by their true population label; the rows and columns are ordered so that they correspond to the populations 1 through 4 in Fig. 6. In each “mean” matrix, a light square means that two individuals share little ancestry in common, and a dark square means that two individuals have similar ancestry. In each “std. dev.” matrix, the darker the square, the higher the variance. In the first trial (top-left), the MCMC algorithm mostly recovered the correct 7 Figure 8: Estimated mean and standard deviation (“std. dev.”) of the admixture distance statistic for two independent trials and at two different simulation settings. See the text for a full explanation. population structure; i.e. it successfully assigned individuals to their coalescent populations based on the sampled alleles w. As expected, the individuals from populations 3 and 4 were hardest to distinguish, hence the high standard deviation in the bottom-right entries of the matrix. The results of the second trial are less satisfying: MCMC failed to distinguish between individuals from populations 3 and 4, and it decided rather arbitrarily to partition the samples originating from population 2. In all these experiments, AIS exhibited behaviour that was very similar to MCMC. Under the same conditions, our algorithm (bottom-left) failed to distinguish between the third and fourth populations. The trials, however, are more consistent and do not mislead by placing high confidence in these answers; observe the large number of dark squares in the bottom-right portion of the “std. dev.” matrix. This evidence suggests that these trials are more representative of the true posterior because the MCMC trials are inconsistent and occasionally spurious (trial #2). This trend is repeated in the more challenging inference scenario with K = 3 and a mutation rate of 2 (right-hand side). MCMC, as before, exhibited a great deal of variance in its estimates of the admixture distance: the estimates from the first trial are very accurate, but the second trial strangely failed to distinguish between populations 1 and 2, and did not correctly assign the individuals in populations 3 and 4. What’s worse, MCMC placed disproportionate confidence in these estimates. The stochastic approximation method also exhibited some variance under these conditions, but importantly it did not place nearly so much confidence in its solutions; observe the high standard deviation in the matrix entries corresponding to the individuals from population 3. 5 Conclusions and discussion In this paper, we proposed a new approach to probabilistic inference grounded on variational, Monte Carlo and stochastic approximation methodology. We demonstrated that our sophisticated method pays offin terms of producing more consistent, reliable estimates for a real and challenging inference problem in population genetics. Some of the components such as the variance safeguard have not been independently validated, so we cannot fully attest to how critical they are, at least beyond the motivation we already gave. More standard tricks, such as Rao-Blackwellization, were explicitly included to demonstrate that well-known techniques from the Monte Carlo literature apply without modification to our algorithm. We have argued for the generality of our inference approach, but ultimately the success of our scheme hinges on a good choice of the variational approximation. Thus, it remains to be seen how well our results extend to probabilistic graphical models beyond LDA, and how much ingenuity will be required to achieve favourable outcomes. Another critical issue, as we mentioned in Sec. 3.5, is the sensitivity of our method to the number of iterations. This issue is related to the bias-variance trade-off, and in the future we would like to explore more principled ways to formulate this trade-off, in the process reducing this sensitivity. Acknowledgments We would like to thank Matthew Hoffman, Nolan Kane, Emtiyaz Khan, Hendrik Kück and Pooja Viswanathan for their input, and the reviewers for exceptionally detailed and thoughtful comments. 8 References [1] C. Andrieu and E. Moulines. On the ergodicity properties of some adaptive MCMC algorithms. Annals of Applied Probability, 16:1462–1505, 2006. [2] C. Andrieu, N. de Freitas, A. Doucet, and M. I. Jordan. An introduction to MCMC for machine learning. Machine Learning, 50:5–43, 2003. [3] M. J. Beal. Variational Algorithms for Approximate Bayesian Inference. PhD thesis, University College London, 2003. [4] D. Blei, A. Y. Ng, and M. I. Jordan. Latent Dirichlet allocation. Journal of Machine Learning Research, 3:993–1022, 2003. [5] P. Carbonetto, M. Schmidt, and N. de Freitas. An interior-point stochastic approximation method and an L1-regularized delta rule. In Advances in Neural Information Processing Systems, volume 21. 2009. [6] G. Casella and C. P. Robert. Rao-Blackwellisation of sampling schemes. Biometrika, 83:81–94, 1996. [7] G. Celeux, M. Hurn, and C. P. Robert. Computational and inferential difficulties with mixture posterior distributions. Journal of the American Statistical Association, 95:957–970, 2000. [8] D. W. Coltman. Molecular ecological approaches to studying the evolutionary impact of selective harvesting in wildlife. Molecular Ecology, 17:221–235, 2007. [9] T. M. Cover and J. A. Thomas. Elements of Information Theory. Wiley, 1991. [10] P.-T. de Boer, D. P. Kroese, S. Mannor, and R. Y. Rubinstein. A tutorial on the cross-entropy method. Annals of Operations Research, 134:19–67, 2005. [11] N. de Freitas, P. Højen-Sørensen, M. I. Jordan, and S. Russell. Variational MCMC. In Proceedings of the 17th Conference on Uncertainty in Artificial Intelligence, pages 120–127, 2001. [12] P. Del Moral, A. Doucet, and A. Jasra. Sequential Monte Carlo samplers. Journal of the Royal Statistical Society, 68:411–436, 2006. [13] A. J. Dobson. An Introduction to Generalized Linear Models. Chapman & Hall/CRC Press, 2002. [14] A. Doucet, S. Godsill, and C. Andrieu. On sequential Monte Carlo sampling methods for Bayesian filtering. Statistics and Computing, 10:197–208, 2000. [15] T. L. Griffiths and M. Steyvers. Finding scientific topics. Proceedings of the National Academy of Sciences, 101:5228–5235, 2004. [16] D. L. Hartl and A. G. Clark. Principles of population genetics. Sinauer Associates, 2007. [17] J. Hein, M. H. Schierup, and C. Wiuf. Gene genealogies, variation and evolution: a primer in coalescent theory. Oxford University Press, 2005. [18] A. Jasra, D. Stephens, and C. Holmes. On population-based simulation for static inference. Statistics and Computing, 17:263–279, 2007. [19] M. Jordan, Z. Ghahramani, T. Jaakkola, and L. Saul. An introduction to variational methods for graphical models. In M. Jordan, editor, Learning in Graphical Models, pages 105–161. MIT Press, 1998. [20] F. Liang, C. Liu, and R. J. Carroll. Stochastic approximation in Monte Carlo computation. Journal of the American Statistical Association, 102:305–320, 2007. [21] T. Mailund, M. Schierup, C. Pedersen, P. Mechlenborg, J. Madsen, and L. Schauser. CoaSim: a flexible environment for simulating genetic data under coalescent models. BMC Bioinformatics, 6, 2005. [22] T. Minka. A family of algorithms for approximate Bayesian inference. PhD thesis, MIT, 2001. [23] R. Neal and G. Hinton. A view of the EM algorithm that that justififies incremental, sparse, and other variants. In M. Jordan, editor, Learning in graphical models, pages 355–368. Kluwer Academic, 1998. [24] R. M. Neal. Annealed importance sampling. Statistics and Computing, 11:125–139, 2001. [25] M. J. D. Powell. Algorithms for nonlinear constraints that use Lagrangian functions. Mathematical Programming, 14:224–248, 1978. [26] J. K. Pritchard, M. Stephens, and P. Donnelly. Inference of population structure using multilocus genotype data. Genetics, 155:945–959, 2000. [27] P. Ravikumar. Approximate Inference, Structure Learning and Feature Estimation in Markov Random Fields. PhD thesis, Carnegie Mellon University, 2007. [28] H. Robbins and S. Monro. A stochastic approximation method. Annals of Math. Statistics, 22, 1951. [29] J. C. Spall. Introduction to stochastic search and optimization. Wiley-Interscience, 2003. [30] Y. W. Teh, D. Newman, and M. Welling. A collapsed variational Bayesian inference algorithm for latent Dirichlet allocation. In Advances in Neural Information Processing Systems, volume 19, 2007. [31] M. J. Wainwright. Stochastic processes on graphs with cycles: geometric and variational approaches. PhD thesis, Massachusetts Institute of Technology, 2002. [32] J. S. Yedidia, W. T. Freeman, and Y. Weiss. Constructing free-energy approximations and generalized belief propagation algorithms. IEEE Transactions on Information Theory, 51:2282–2312, 2005. [33] L. Younes. Stochastic gradient estimation strategies for Markov random fields. In Proceedings of the Spatial Statistics and Imaging Conference, 1991. 9
2009
33
3,781
Factor Modeling for Advertisement Targeting Ye Chen∗ eBay Inc. yechen1@ebay.com Michael Kapralov Stanford University kapralov@stanford.edu Dmitry Pavlov† Yandex Labs dmitry-pavlov@yandex-team.ru John F. Canny University of California, Berkeley jfc@cs.berkeley.edu Abstract We adapt a probabilistic latent variable model, namely GaP (Gamma-Poisson) [6], to ad targeting in the contexts of sponsored search (SS) and behaviorally targeted (BT) display advertising. We also approach the important problem of ad positional bias by formulating a one-latent-dimension GaP factorization. Learning from click-through data is intrinsically large scale, even more so for ads. We scale up the algorithm to terabytes of real-world SS and BT data that contains hundreds of millions of users and hundreds of thousands of features, by leveraging the scalability characteristics of the algorithm and the inherent structure of the problem including data sparsity and locality. Specifically, we demonstrate two somewhat orthogonal philosophies of scaling algorithms to large-scale problems, through the SS and BT implementations, respectively. Finally, we report the experimental results using Yahoo’s vast datasets, and show that our approach substantially outperform the state-of-the-art methods in prediction accuracy. For BT in particular, the ROC area achieved by GaP is exceeding 0.95, while one prior approach using Poisson regression [11] yielded 0.83. For computational performance, we compare a single-node sparse implementation with a parallel implementation using Hadoop MapReduce, the results are counterintuitive yet quite interesting. We therefore provide insights into the underlying principles of large-scale learning. 1 Introduction Online advertising has become the cornerstone of many sustainable business models in today’s Internet, including search engines (e.g., Google), content providers (e.g., Yahoo!), and social networks (e.g., Facebook). One essential competitive advantage, over traditional channels, of online advertising is that it allows for targeting. The objective of ad targeting is to select most relevant ads to present to a user based on contextual and prior knowledge about this user. The relevance measure or response variable is typically click-through rate (CTR), while explanatory variables vary in different application domains. For instance, sponsored search (SS) [17] uses query, content match [5] relies on page content, and behavioral targeting (BT) [11] leverages historical user behavior. Nevertheless, the training data can be generally formed as a user-feature matrix of event counts, where the feature dimension contains various events such as queries, ad clicks and views. This characterization of data naturally leads to our adoption of the family of latent variable models [20, 19, 16, 18, 4, 6], which have been quite successfully applied to text and image corpora. In general, the goal of latent variable models is to discover statistical structures (factors) latent in the data, often with dimensionality reduction, and thus to generalize well to unseen examples. In particular, our choice of Gamma-Poisson (GaP) is theoretically as well as empirically motivated, as we elaborate in Section 2.2. ∗†This work was conducted when the authors were at Yahoo! Labs, 701 First Ave, Sunnyvale, CA 94089. 1 Sponsored search involves placing textual ads related to the user query alongside the algorithmic search results. To estimate ad relevance, previous approaches include similarity search [5], logistic regression [25, 8], classification and online learning with perceptron [13], while primarily in the original term space. We consider the problem of estimating CTR of the form p(click|ad, user, query), through a factorization of the user-feature matrix into a latent factor space, as derived in Section 2.1. SS adopts the keyword-based pay-per-click (PPC) advertising model [23]; hence the accuracy of CTR prediction is essential in determining the ad’s ranking, placement, pricing, and filtering [21]. Behavioral targeting leverages historical user behavior to select relevant ads to display. Since BT does not primarily rely on contextual information such as query and page content; it makes an enabling technology for display (banner) advertising where such contextual data is typically unavailable, such as reading an email, watching a movie, instant messaging, and at least from the ad’s side. We consider the problem of predicting CTR of the form p(click|ad, user). The question addressed by the state-of-the-art BT is instead that of predicting the CTR of an ad in a given category (e.g., Finance and Technology) or p(click|ad-category, user), by fitting a sign-constrained linear regression with categorized features [12] or a non-negative Poisson regression with granular features [11,10,7]. Ad categorization is done by human labeling and thus expensive and error-prone. One of the major advantages of GaP is the ability to perform granular or per-ad prediction, which is infeasible by the previous BT technologies due to scalability issues (e.g., a regression model for each category). 2 GaP model GaP is a generative probabilistic model, as graphically represented in Figure 1. Let F be an n × m data matrix whose element fij is the observed count of event (or feature) i by user j. Y is a matrix of expected counts with the same dimensions as F. F, element-wise, is naturally assumed to follow Poisson distributions with mean parameters in Y respectively, i.e., F ∼Poisson(Y ). Let X be a d × m matrix where the column vector xj is a low-dimensional representation of user j in a latent space of “topics”. The element xkj encodes the “affinity” of user j to topic k as the total number of occurrences of all events contributing to topic k. Λ is an n×d matrix where the column Λk represents the kth topic as a vector of event probabilities p(i|k), that is, a multinomial distribution of event counts conditioned on topic k. Therefore, the Poisson mean matrix Y has a linear parameterization with Λ and X, i.e., Y = ΛX. GaP essentially yields an approximate factorization of the data matrix into two matrices with a low inner dimension F ≈ΛX. The approximation has an appealing interpretation column-wise f ≈Λx, that is, each user vector f in event space is approximated by a linear combination of the column vectors of Λ, weighted by the topical mixture x for that user. Since by design d ≪n, m, the model matrix Λ shall capture significant statistical (topical) structure hidden in the data. Finally, xkj is given a gamma distribution as an empirical prior. The generative process of an observed event-user count fij follows: 1. Generate xkj ∼Gamma(αk, βk), ∀k. 2. Generate yij occurrences of event i from a mixture of k Multinomial(p(i|k)) with outcome i, i.e., yij = Λixj where Λi is the ith row vector of Λ. 3. Generate fij ∼Poisson(yij). The starting point of the generative process is a gamma distribution of x, with pdf p(x) = xα−1 exp(−x/β) βαΓ(α) for x > 0 and α, β > 0. (1) It has a shape parameter α and a scale parameter β. Next, from the latent random vector characterizing a user x, we derive the expected count vector y for the user as follows: y = Λx. (2) The last stochastic process is a Poisson distribution of the observed count f with the mean value y, p(f) = yf exp(−y) f! for f ≥0. (3) The data likelihood for a user generated as described above is n Y i=1 yfi i exp(−yi) fi! d Y k=1 (xk/βk)αk−1 exp(−xk/βk) βkΓ(αk) , (4) 2 × Fn×m Yn×m Xd×m Λn×d F Y × Λ X • fij • yij Λk Λi xj ≈ = fij ~ Poisson(yij) ← yij ~ mixture of Multinomial(p(i|k)) ← xkj ~ Gamma(αk,βk) topics users features Figure 1: GaP graphical model query-ad hashmap (inverted index) cookie: ‘4qb2cg939usaj’ × X xj (9869th column) <9869, 878623> <‘machine+learning+8532948011’, 42497> Λi (42497th row) query-ad: ‘machine+learning+8532948011’ ‘machine+learning+8532948011’, 42497> Λ = zij cookie hashmap (inverted index) xj-cookie lookup <‘4qb2cg939usaj’, 878623> Figure 2: GaP online prediction where yi =  ix. And the log likelihood reads  =  i (fi log yi  yi  log fi!)+  k [( k  1) log xk  xk/  k   k log( k)  log  ( k)]. (5) Given a corpus of user data F = (f1,...,fj,...,fm), we wish to find the maximum likelihood estimates (MLE) of the model parameters ( ,X). Based on an elegant multiplicative recurrence developed by Lee and Seung [22] for NMF, the following EM algorithm was derived in [6]: E-step: x kj  xkj  i (fij ik/ yij) + ( k  1)/ xkj  i  ik + 1/  k . (6) M-step:   ik   ik  j  fijxkj/ yij   j xkj . (7) 2.1 Two variants for CTR prediction The standard GaP model fits discrete count data. We now describe two variant derivations for predicting CTR. The first approach is to predict clicks and views independently, and then to construct the unbiased estimator of CTR, typically with Laplacian smoothing: CTRad(i)j =   click(i)xj +   /   view(i)xj +   , (8) where click(i) and view(i) are the indices corresponding to the click/view pair of ad feature i, respectively, by user j;  and  are smoothing constants. The second idea is to consider the relative frequency of counts, particularly the number of clicks relative to the number of views for the events of interest. Formally, let F be a matrix of observed click counts and Y be a matrix of the corresponding expected click counts. We further introduce a matrix of observed views V and a matrix of click probabilities Z, and define the link function: F ≫Y = V.Z = V.( X), (9) where ‘.’ denotes element-wise matrix multiplication. The linear predictor Z =  X now estimates CTR directly, and is scaled by the observed view counts V to obtain the expected number of clicks Y . The Poisson assumption is only given to the click events F with the mean parameters Y . Given a number of views v and the probability of click for a single view or CTR, a more natural stochastic model for click counts is Binomial(v,CTR). But since in ad’s data the number of views is sufficiently large and CTR is typically very small, the binomial converges to Poisson(v · CTR). Given the same form of log likelihood in Eq. (5) but with the extended link function in Eq. (9), we derive the following EM recurrence: E-step: x kj  xkj  i (fij ik/ zij) + ( k  1)/ xkj  i (vij ik) + 1/  k . (10) M-step:   ik   ik  j (fijxkj/ zij)  j (vijxkj) . (11) 3 2.2 Rationale for GaP model GaP is a generative probabilistic model for discrete data (such as texts). Similar to LDA (latent Dirichlet allocation) [4], GaP represents each sample (document or in this case a user) as a mixture of topics or interests. The latent factors in these models are non-negative, which has proved to have several practical advantages. First of all, texts arguably do comprise passages of prose on specific topics, whereas negative factors have no clear interpretation. Similarly, users have occasional interests in particular products or groups of products and their click-through propensity will dramatically increase for those products. On the other hand “temporary avoidance” of a product line is less plausible, and one clearly cannot have negative click-through counts which would be a consequence of allowing negative factors. A more practical aspect of non-negative factor models is that weak factor coefficients are driven to zero, especially when the input data is itself sparse; and hence the non-zeros will be much more stable, and cross-validation error much lower. This helps to avoid overfitting, and a typical LDA or GaP model can be run with high latent dimensions without overfitting, e.g., with 100 data measurements per user; one factor of a 100-dimensional PCA model will essentially be a (reversible) linear transformation of the input data. On the choice of GaP vs. LDA, the models are very similar, however there is a key difference. In LDA, the choice of latent factor is made independently word-by-word, or in the BT case, ad view by ad view. In GaP however, it is assumed that several items are chosen from each latent factor, i.e., that interests are locally related. Hence GaP uses gamma priors which include both shape and scale factors. The scale factors provide an estimated count of the number of items drawn from each latent factor. Another reason for our preference for GaP in this application is its simplicity. While LDA requires application of transcendental functions across the models with each iteration (e.g., Ψ function in Equation (8) of [4]), GaP requires only basic arithmetic. Apart from transcendentals, the numbers of arithmetic operations of the two methods on same-sized data are identical. While we did not have the resources to implement LDA at this scale in addition to GaP, small-scale experiments showed identical accuracy. So we chose GaP for its speed and simplicity. 3 Sponsored search We apply the second variant of GaP or the CTR-based formulation to SS CTR prediction, where the factorization will directly yield a linear predictor of CTR or p(click|ad, user, query), as in Eq. (9). Based on the structure of the SS click-through data, specifically the dimensionality and the user data locality, the deployment of GaP for SS involves three processes: (1) offline training, (2) offline user profile updating, and (3) online CTR prediction, as elaborated below. 3.1 The GaP deployment for SS Offline training. First, given the observed click counts F and view counts V obtained from a corpus of historical user data, we derive Λ and X using the CTR-based GaP algorithm in Eqs. (10) and (11). Counts are aggregated over a certain period of time (e.g., one month) and for a feature space to be considered in the model. In SS, the primary feature type is the query-ad pair (noted as QL for query-linead, where linead refers to a textual ad) since it is the response variable of which the CTR is predicted. Other features can also be added based on their predicting capabilities, such as query term, linead term, ad group, and match type. This will effectively change the per-topic feature mixture in Λ and possibly the per-user topic mixture in X, with the objective of improving CTR prediction by adding more contextual information. In prediction though, one only focuses on the blocks of QL features in Λ and Z. In order for the model matrix Λ to capture the corpus-wide topical structure, the entire user corpus should be used as training set. Offline user profile updateing. Second, given the derived model matrix Λ, we update the user profiles X in a distributed and data-local fashion. This updating step is necessary for two reasons. (1) User space is more volatile relative to feature space, due to cookie churn (fast turnover) and user’s interests change over time. To ensure the model to capture the latest user behavioral pattern and to have high coverage of users, one needs to refresh the model often, e.g., on a daily basis. (2) Retraining the model from scratch is relatively expensive, and thus impractical for frequent model refresh. However, partial model refresh, i.e., updating X, has a very efficient and scalable solution which works as follows. Once a model is trained on a full corpus of user data, it suffices to keep only Λ, the model matrix so named. Λ contains the global information of latent topics in the form 4 of feature mixtures. We then distribute Λ across servers with each randomly bucketized for a subset of users. Note that this bucketization is exactly how production ad serving works. With the global Λ and the user-local data F and V , X can be computed using E-step recurrence only. According to Eq. (10), the update rule for a given user xj only involves the data for that user and the global Λ. Moreover, since Λ and a local X usually fit in memory, we can perform successive E-steps to converge X within an order of magnitude less amount of time comparing with a global E-step. Notice that the multiplicative factor in E-step depends on xkj, the parameter being updated, thus consecutive E-steps will indeed advance convergence. Online CTR prediction. Finally, given the global Λ and a local X learned and stored in each server, the expected CTR for a user given a QL pair or p(click|QL, user) is computed online as follows. Suppose a user issues a query, a candidate set of lineads is retrieved by applying various matching algorithms. Taking the product of these lineads with the query gives a set of QLs to be scored. One then extracts the row vectors from Λ corresponding to the candidate QL set to form a smaller block Λmat, and looks up the column vector xj for that user from X. The predicted CTRs are obtained by a matrix-vector multiplication zmat j = Λmatxj. The online prediction deployment is schematically shown in Figure 2. 3.2 Positional normalization Our analysis so far has been abstracted from another essential factor, that is, the position of an ad impression on a search result page. It is known intuitively and empirically that ad position has a significant effect on CTR [24, 14]. In this section we treat the positional effect in a statistically sound manner. The observed CTR actually represents a conditional probability p(click|position). We wish to learn a CTR normalized by position, i.e., “scaled” to a same presentation position, in order to capture the probability of click regardless of where the impression is shown. To achieve positional normalization, we assume the following Markov chain: (1) viewing an ad given its position, and then (2) clicking the ad given a user actually views the ad; thus p(click|position) = p(click|view)p(view|position), (12) where “view” is the event of a user voluntarily examining an ad, instead of an ad impression itself. Eq. (12) suggests a factorization of a matrix of observed CTRs into two vectors. As it turns out, to estimate the positional prior p(view|position) we can apply a special GaP factorization with one inner dimension. The data matrices F and V are now feature-by-position matrices, and the inner dimension can be interpreted as the topic of physically viewing. In both training and evaluation, one shall use the position-normalized CTR, i.e., p(click|view). First, the GaP algorithm for estimating positional priors is run on the observed click and view counts of (feature, position) pairs. This yields a row vector of positional priors xpos. In model training, each ad view occurrence is then normalized (multiplied) by the prior p(view|position) for the position where the ad is presented. For example, the a priori CTR of a noticeable position (e.g., ov-top+1 in Yahoo’s terminology meaning the North 1 position in sponsored results) is typically higher than that of an obscure position (e.g., ov-bottom+2) by a factor of up to 10. An observed count of views placed in ov-top+1 thus has a greater normalized count than that in ov-bottom+2. This normalization effectively asserts that, given a same observed (unnormalized) CTR, an ad shown in an inferior position has a higher click probability per se than the one placed in a more obvious position. The same view count normalization should also be applied during offline evaluation. In online prediction, however, we need CTR estimates unbiased by positional effect in order for the matching ads to be ranked based on their qualities (clickabilities). The linear predictor Z = ΛX learned from a position-normalized training dataset gives exactly the position-unbiased CTR estimation. In other words, we are hypothesizing that all candidate ads are to be presented in a same imaginary position. For an intuitive interpretation, if we scale positional priors so that the top position has a prior of 1, i.e., xpos ov-top+1 = 1, all ads are normalized to that top position. Another view of the positional prior model we use is an examination model [25], that is, the probability of clicking on an ad is the product of a positional probability and a relevance-based probability which is independent of position. This model is simple and easy to solve for using maximum likelihood as explained above. This model is not dependent on the content of ads higher up on the search page, as for example the cascade [14] or DBN models [9]. These models are appropriate 5 for search results where users have a high probability of clicking on one of the links. However, for ads, the probability of clicking on ad links is extremely low, usually a fraction of a percent. Thus the effects of higher ads is a product of factors which are extremely close to one. In this case, the DBN positional prior reduces to a negative exponential function which is a good fit to the empirical distribution found from the examination model. 3.3 Large-scale implementation Data locality. Recall that updating X after a global training is distributed and only involves E-steps using user-local data. In fact, this data locality can also be leveraged in training. More precisely, Eq. (10) suggests that updating a user profile vector xj via E-step only requires that user’s data fj and vj as well as the model matrix Λ. This computation has a very small memory footprint and typically fits in L1 cache. On the other hand, updating each single value in Λ as in Eq. (11) for M-step requires a full pass over the corpus (all users’ data) and hence more expensive. To better exploit the data locality present in E-step, we alternate 3 to 10 successive E-steps with one M-step. We also observe that M-step involves summations over j ≤m users, for both the numerator and the denominator in Eq. (11). Both summing terms (fijxkj/zij and vijxkj) only requires data that is available locally (in memory) right after the E-step for user j. Thus the summations for M-step can be computed incrementally along with the E-step recurrence for each user. As thus arranged, an iteration of 3-10 E-steps combined with one M-step only requires a single pass over the user corpus. Data sparsity. The multiplicative recurrence exploits data sparsity very well. Note that the inner loops of both E-step and M-step involve calculating the ratio fij/zij. Since f is a count of very rare click events, one only needs to compute z when the corresponding f is non-zero. Let Nc be the total number of non-zero f terms or distinct click events over all users. For each non-zero fij, computing zij = Λixj dot-product takes d multiplications. Thus the numerators of both E-step and M-step have a complexity of O(Ncd). Both denominators have a complexity of O(Nv), where Nv is the total number of non-zero v terms. The final divisions to compute the multiplicative factors in one outer loop over topics take O(d) time (the other outer loop over m or n has already been accounted for by both Nc and Nv). Typically, we have Nv ≫Nc ≫m > n ≫d. Thus the smoothed complexity [26] of offline training is O(Nvdr), where r is the number of EM iterations and r = 20 suffices for convergence. Scalability. Now that we have reached an algorithm of linear complexity O(Nvdr) with various implementation tricks as just described. We now illustrate the scalability of our algorithm by the following run-time analysis. The constant factor of the complexity is 4, the number of division terms in the recurrence formulae. Suppose the entire Yahoo’s user base of SS contains about 200 million users. A 1/16 sample (32 out of 512 buckets) gives around 10 million user. Further assume 100 distinct ad views on average per user and an inner dimension of 10, thus the total number of operations is 4 × 1010 for one iteration. The model converges after 15-20 iterations. Our singlemachine implementation with sparse matrix operations (which are readily available in MATLAB [2] and LAPACK [3]) gives above 100 Mflops, hence it takes 1.6-2.2 hours to train a model. So far, we have demonstrated one paradigm of scaling up, which focuses on optimizing arithmetic operations, such as using sparse matrix multiplication in the innermost loop. Another paradigm is through large-scale parallelization, such as using a Hadoop [1] cluster, as we illustrate in the BT implementation in Section 4.1. 3.4 Experiments We have experimented with different feature types, and found empirically the best combination is query-linead (QL), query term (QT), and linead term (LT). A QL feature is a product of query and linead. For QTs, queries are tokenized with stemming and stopwords removed. For LTs, we first concatenate the title, short description, and description of a linead text, and then extract up to 8 foremost terms. The dataset was obtained from 32 buckets of users and covering a one-month period, where the first three weeks forms the training set and the last week was held out for testing. For feature selection, we set the minimum frequency to 30 to be included for all three feature types, which yielded slightly above 1M features comprised of 700K QLs, 175K QTs, and 135K LTs. We also filtered out users with a total event count below 10, which gave 1.6M users. We used a latent 6 dimension of 10, which was empirically among the best while computationally favorable. For the gamma prior on X, we fixed the shape parameter α to 1.45 and the scale parameter β to 0.2 across all latent topics for model training; and used a near-zero prior for positional prior estimation. We benchmarked our GaP model with two simple baseline predictors: (1) Panama score (historical COEC defined as the ratio of the observed clicks to the expected clicks [9]), and (2) historical QL CTR normalized by position. The experimental results are plotted in Figure 3, and numerically summarized in Tables 1 and 2. A click-view ROC curve plots the click recall vs. the view recall, from the testing examples ranked in descending order of predicted CTR. A CTR lift curve plots the relative CTR lift vs. the view recall. As the results show, historical QL CTR is a fair predictor relative to Panama score. The GaP model yielded a ROC area of 0.82 or 2% improvement over historical QL CTR, and a 68% average CTR lift over Panama score at the 5-20% view recall range. 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 GAP Panama QLctr View recall Click recall (a) ROC plots                             View recall CTR lift (b) Pairwise CTR lift Figure 3: Model performance comparison among (1) GaP using QL-QT-LT, (2) Panama score predictor, and (3) historical QL-CTR predictor. Table 1: Areas under ROC curves GaP Panama QL-CTR 0.82 0.72 0.80 Table 2: CTR lift of GaP over Panama View recall 1% 1-5% avg. 5% 5-20% avg. CTR lift 0.96 0.86 0.93 0.68 4 Behavioral targeting For the BT application, we adopt the first approach to CTR prediction as described in Section 2.1. The number of clicks and views for a given ad are predicted separately and a CTR estimator is constructed as in Eq. (8). Moreover, the granular nature of GaP allows for significant flexibility in the way prediction can be done, as we describe next. 4.1 Prediction with different granularity We form the data matrix F from historical user behavioral data at the granular level, including click and view counts for individual ads, as well as other explanatory variable features such as page views. This setup allows for per-ad CTR prediction, i.e., p(click|ad, user), given by Eq. (8). Percategory CTR prediction as does in previous BT systems, i.e., p(click|ad-category, user), can also be performed in this setup by marginalizing Λ over categories: d CTRcj =  X i∈c Λclick(i)  xj + δ ! /  X i∈c Λview(i)  xj + η ! , (13) where c denotes a category and i ∈c is defined by ad categorization. 7 The modeling was implemented in a distributed fashion using Hadoop. As discussed in Section 3.3, the EM algorithm can be parallelized efficiently by exploiting user data locality, particularly in the MapReduce [15] framework. However, compared with the scaling approach adopted by the SS implementation, the large-scale parallelization paradigm typically cannot support complex operations as efficient, such as performing sparse matrix multiplication by three-level nested loops in Java. 4.2 Experiments The data matrix F was formed to contain rows for all ad clicks and views, as well as page views with frequency above a threshold of 100. The counts were aggregated over a two-week period of time and from 32 buckets of users. This setup resulted in 170K features comprised of 120K ad clicks or views, and 50K page views, which allows the model matrix Λ to fit well in memory. The number of users was about 40M. We set the latent inner dimension d = 20. We ran 13 EM iterations where each iteration alternated 3 E-steps with one M-step. Prediction accuracy was evaluated using data from the next day following the training period, and measured by the area under the ROC curve. We first compared per-ad prediction (Eq. (8)) with per-category prediction (Eq. (13)), and obtained the ROC areas of 95% and 70%, respectively. One latest technology used Poisson regression for per-category modeling and yielded an average ROC area of 83% [11]. This shows that capturing intra-category structure by factor modeling can result in substantial improvement over the state-ofthe-art of BT. We also measured the effect of the latent dimension on the model performance by varying d = 10 to 100, and observed that per-ad prediction is insensitive to the latent dimension with all ROC areas in the range of [95%, 96%], whereas per-category prediction benefits from larger inner dimensions. Finally, to verify the scalability of our parallel implementation, we increased the size of training data from 32 to 512 user buckets. The experiments were run on a 250-node Hadoop cluster. As shown in Table 3, the running time scales sub-linearly with the number of users. Table 3: Run-time vs. number of user buckets Number of buckets 32 64 128 512 Run-time (hours) 11.2 18.6 31.7 79.8 Surprisingly though, the running time for 32 buckets with a 250-node cluster is no less than a singlenode yet highly efficient implementation as analyzed in Section 3.3 (after accounting for the different factors of users 4×, latent dimension 2×, and EM iterations 13/15), with a similar 100 Mflops. Actually, the same pattern has been found in one previous large-scale learning task [11]. We argue that large-scale parallelization is not necessarily the best way, nor the only way, to deal with scaling; but in fact implementation issues (such as cache efficiency, number of references, data encapsulation) still cause orders-of-magnitude differences in performance and can more than overwhelm the additional nodes. The right principle of scaling up should start with single node and achieve above 100 Mflops with sparse arithmetic operations. 5 Discussion GaP is a dimensionality reduction algorithm. The low-dimensional latent space allows scalable and efficient learning and prediction, and hence making the algorithm practically appealing for web-scale data like in SS and BT. GaP is also a smoothing algorithm, which yields smoothed click prediction. This addresses the data sparseness issue that is typically present in click-through data. Moreover, GaP builds personalization into ad targeting, by profiling a user as a vector of latent variables. The latent dimensions are inferred purely from data, with the objective to maximize the data likelihood or the capability to predict target events. Furthermore, position of ad impression has a significant impact on CTR. GaP factorization with one inner dimension gives a statistically sound approach to estimating the positional prior. Finally, the GaP-derived latent low-dimensional representation of user can be used as a valuable input to other applications and products, such as user clustering, collaborative filtering, content match, and algorithmic search. 8 References [1] http://hadoop.apache.org/. [2] http://www.mathworks.com/products/matlab/. [3] http://www.netlib.org/lapack/. [4] D. M. Blei, A. Y. Ng, and M. I. Jordan. Latent Dirichlet allocation. The Journal of Machine Learning Research, 3:993–1022, 2003. [5] A. Broder, M. Fontoura, V. Josifovski, and L. Riedel. A semantic approach to contextual advertising. ACM Conference on Information Retrieval (SIGIR 2007), pages 559–566, 2007. [6] J. F. Canny. GaP: a factor model for discrete data. ACM Conference on Information Retrieval (SIGIR 2004), pages 122–129, 2004. [7] J. F. Canny, S. Zhong, S. Gaffney, C. Brower, P. Berkhin, and G. H. John. Granular data for behavioral targeting. U.S. Patent Application 20090006363. [8] D. Chakrabarti, D. Agarwal, and V. Josifovski. Contextual advertising by combining relevance with click feedback. International World Wide Web Conference (WWW 2008), pages 417–426, 2008. [9] O. Chapelle and Y. Zhang. A dynamic Bayesian network click model for web search ranking. International World Wide Web Conference (WWW 2009), pages 1–10, 2009. [10] Y. Chen, D. Pavlov, P. Berkhin, and J. F. Canny. Large-scale behavioral targeting for advertising over a network. U.S. Patent Application 12/351,749, filed: Jan 09, 2009. [11] Y. Chen, D. Pavlov, and J. F. Canny. Large-scale behavioral targeting. ACM Conference on Knowledge Discovery and Data Mining (KDD 2009), 2009. [12] C. Y. Chung, J. M. Koran, L.-J. Lin, and H. Yin. Model for generating user profiles in a behavioral targeting system. U.S. Patent 11/394,374, filed: Mar 29, 2006. [13] M. Ciaramita, V. Murdock, and V. Plachouras. Online learning from click data for sponsored search. International World Wide Web Conference (WWW 2008), pages 227–236, 2008. [14] N. Craswell, O. Zoeter, M. Taylor, and B. Ramsey. An experimental comparison of click position-bias models. Web Search and Web Data Mining (WSDM 2008), pages 87–94, 2008. [15] J. Dean and S. Ghemawat. Mapreduce: Simplified data processing on large clusters. Communications of the ACM, 51(1):107–113, 2008. [16] S. Deerwester, S. T. Dumais, G. W. Furnas, T. K. Landauer, and R. Harshman. Indexing by latent semantic analysis. Journal of the American Society for Information Science, 41(6):391–407, 1990. [17] D. C. Fain and J. O. Pedersen. Sponsored search: a brief history. Bulletin of the American Society for Information Science and Technology, 32(2):12–13, 2006. [18] T. Hofmann. Unsupervised learning by probabilistic latent semantic analysis. Machine Learning, 42(12):177–196, 2001. [19] A. Hyv¨arinen. Fast and robust fixed-point algorithms for independent component analysis. IEEE Transactions on Neural Networks, 10(3):626–634, 1999. [20] I. T. Jolliffe. Principal Component Analysis. Springer, 2002. [21] A. Lacerda, M. Cristo, M. A. Gonc¸alves, W. Fan, N. Ziviani, and B. Ribeiro-Neto. Learning to advertise. ACM Conference on Information Retrieval (SIGIR 2006), pages 549–556, 2006. [22] D. D. Lee and H. S. Seung. Algorithms for non-negative matrix factorization. Advances in Neural Information Processing Systems (NIPS 2000), 13:556–562, 2000. [23] S. Pandey and C. Olston. Handling advertisements of unknown quality in search advertising. Advances in Neural Information Processing Systems (NIPS 2006), 19:1065–1072, 2006. [24] F. Radlinski and T. Joachims. Minimally invasive randomization for collecting unbiased preferences from clickthrough logs. National Conference on Artificial Intelligence (AAAI 2006), pages 1406–1412, 2006. [25] M. Richardson, E. Dominowska, and R. Ragno. Predicting clicks: estimating the click-through rate for new ads. International World Wide Web Conference (WWW 2007), pages 521–530, 2007. [26] D. A. Spielman and S.-H. Teng. Smoothed analysis of algorithms: Why the simplex algorithm usually takes polynomial time. Journal of the ACM, 51(3):385–463, 2004. 9
2009
34
3,782
Sparse Estimation Using General Likelihoods and Non-Factorial Priors David Wipf and Srikantan Nagarajan, ∗ Biomagnetic Imaging Lab, UC San Francisco {david.wipf, sri}@mrsc.ucsf.edu Abstract Finding maximally sparse representations from overcomplete feature dictionaries frequently involves minimizing a cost function composed of a likelihood (or data fit) term and a prior (or penalty function) that favors sparsity. While typically the prior is factorial, here we examine non-factorial alternatives that have a number of desirable properties relevant to sparse estimation and are easily implemented using an efficient and globally-convergent, reweighted ℓ1-norm minimization procedure. The first method under consideration arises from the sparse Bayesian learning (SBL) framework. Although based on a highly non-convex underlying cost function, in the context of canonical sparse estimation problems, we prove uniform superiority of this method over the Lasso in that, (i) it can never do worse, and (ii) for any dictionary and sparsity profile, there will always exist cases where it does better. These results challenge the prevailing reliance on strictly convex penalty functions for finding sparse solutions. We then derive a new non-factorial variant with similar properties that exhibits further performance improvements in some empirical tests. For both of these methods, as well as traditional factorial analogs, we demonstrate the effectiveness of reweighted ℓ1-norm algorithms in handling more general sparse estimation problems involving classification, group feature selection, and non-negativity constraints. As a byproduct of this development, a rigorous reformulation of sparse Bayesian classification (e.g., the relevance vector machine) is derived that, unlike the original, involves no approximation steps and descends a well-defined objective function. 1 Introduction With the advent of compressive sensing and other related applications, there has been growing interest in finding sparse signal representations from redundant dictionaries [3, 5]. The canonical form of this problem is given by, min x ∥x∥0, s.t. y = Φx, (1) where Φ ∈Rn×m is a matrix whose columns φi represent an overcomplete or redundant basis (i.e., rank(Φ) = n and m > n), x ∈Rm is a vector of unknown coefficients to be learned, and y is the signal vector. The cost function being minimized represents the ℓ0 norm of x (i.e., a count of the number of nonzero elements in x). If measurement noise or modeling errors are present, we instead solve the alternative problem min x ∥y −Φx∥2 2 + λ∥x∥0, λ > 0, (2) noting that in the limit as λ →0, the two problems are equivalent (the limit must be taken outside of the minimization). From a Bayesian perspective, optimization of either problem can be viewed, after a exp[−(·)] transformation, as a challenging MAP estimation task with a quadratic likelihood function and a prior that is both improper and discontinuous. Unfortunately, an exhaustive search for the optimal representation requires the solution of up to m n  linear systems of size n × n, a ∗This research was supported by NIH grants R01DC04855 and R01DC006435. prohibitively expensive procedure for even modest values of m and n. Consequently, in practical situations there is a need for approximate methods that efficiently solve (1) or (2) with high probability. Moreover, we would ideally like these methods to generalize to other likelihood functions and priors for applications such as non-negative sparse coding, classification, and group variable selection. One common strategy is to replace ∥x∥0 with a more manageable penalty function g(x) (or prior) that still favors sparsity. Typically this replacement is a concave, non-decreasing function of |x| ≜[|x1|, . . . , |xm|]T . It is also generally assumed to be factorial, meaning g(x) = P i g(xi). Given this selection, a recent, very successful optimization technique involves iterative reweighted ℓ1 minimization, a process that produces more focal estimates with each passing iteration [3, 19]. To implement this procedure, at the (k + 1)-th iteration we compute x(k+1) →arg min x ∥y −Φx∥2 2 + λ X i w(k) i |xi|, (3) where w(k) i ≜∂g(x(k) i )/∂|x(k) i |. As discussed in [6], these updates are guaranteed to converge to a local minimum of the underlying cost function by satisfying the conditions of the Global Convergence Theorem (see for example [24]). Moreover, empirical evidence from [3] suggests that generally only a few iterations, which can be readily computed using standard convex programming packages, are required. Note that a single iteration with unit weights is equivalent to the traditional Lasso estimator [14]. However, given an appropriate selection for g(·), e.g., g(xi) = log(|xi| + α) with α > 0, subsequent iterations have been shown to exhibit substantial improvements over the Lasso in approximating the solution of (1) or (2) [3]. While certainly successful in practice, there remain fundamental limitations as to what can be achieved using factorial penalties to approximate ∥x∥0. Perhaps counterintuitively, it has been shown in [19] that by considering the wider class of non-factorial penalties, more effective surrogates for ∥x∥0 can be obtained, potentially leading to better approximate solutions of either (1) or (2). In this paper we consider two non-factorial methods that rely on the same basic iterative reweighted ℓ1 minimization procedure outlined above. In Section 2, we briefly introduce the non-factorial penalty function first proposed in [19] (based on a dual-form interpretation of sparse Bayesian learning) and then derive a new iterative reweighted ℓ1 implementation that builds upon these ideas. We then demonstrate that this algorithm satisfies two desirable properties pertaining to problem (1): (i) each iteration can only improve the sparsity and, (ii) for any Φ and sparsity profile, there will always exist cases where performance improves over standard ℓ1 minimization, which represents the best convex approximation to (1). Together, these results imply that this reweighting scheme can never do worse than Lasso (assuming w(0) i = 1, ∀i), and that there will always be cases where improvement over Lasso is achieved. To a large extent, this removes much of the stigma commonly associated with using non-convex sparsity penalties. Later in Section 3, we derive a second promising non-factorial variant by starting with a plausible ℓ1 reweighting scheme and then working backwards to determine the form and properties of the underlying penalty function. In general, iterative reweighted ℓ1 procedures of any kind are attractive for our purposes because they can easily be augmented to handle other likelihoods and priors, provided convexity of the update (3) is preserved (of course the overall cost function being minimized will be non-convex). For example, to address the extensions mentioned above, in Section 4 we explore adding constraints such as xi ≥0, replacing |xi| with a norm on groups of variables, and using a logistic instead of quadratic likelihood term for classification. The latter extension leads to a rigorous reformulation of sparse Bayesian classification (e.g., the relevance vector machine [15]) that, unlike the original, involves no approximation steps and descends a well-defined objective function. Finally, Section 5 contains empirical comparisons while Section 6 provides brief concluding remarks. 2 Non-Factorial Methods Based on Sparse Bayesian Learning A particularly useful non-factorial penalty emerges from a dual-space view [19] of sparse Bayesian learning (SBL) [15], which is based on the notion of automatic relevance determination (ARD) [10]. SBL assumes a Gaussian likelihood function p(y|x) = N(y; Φx, λI), consistent with the data fit term from (2). The basic ARD prior incorporated by SBL is p(x; γ) = N(x; 0, diag[γ]), where γ ∈Rm + is a vector of m non-negative hyperparameters governing the prior variance of each unknown coefficient. These hyperparameters are estimated from the data by first marginalizing over the coefficients x and then performing what is commonly referred to as evidence maximization or type-II maximum likelihood [10, 15]. Mathematically, this is equivalent to minimizing L(γ) ≜ −log Z p(y|x)p(x; γ)dx = −log p(y; γ) ≡ log |Σy| + yT Σ−1 y y, (4) where Σy ≜λI + ΦΓΦT and Γ ≜diag[γ]. Once some γ∗= arg minγ L(γ) is computed, an estimate of the unknown coefficients can be obtained by setting xSBL to the posterior mean computed using γ∗: xSBL = E[x|y; γ∗] = Γ∗ΦT Σ−1 y∗y. (5) Note that if any γ∗,i = 0, as often occurs during the learning process, then xSBL,i = 0 and the corresponding feature is effectively pruned from the model. The resulting coefficient vector xSBL is therefore sparse, with nonzero elements corresponding with the ‘relevant’ features. It is not immediately apparent how the SBL procedure, which requires optimizing a cost function in γ-space and is based on a factorial prior p(x; γ), relates to solving/approximating (1) and/or (2) via a non-factorial penalty in x-space. However, it has been shown in [19] that xSBL satisfies xSBL = arg min x ∥y −Φx∥2 2 + λgSBL(x), (6) where gSBL(x) ≜min γ≥0 xT Γ−1x + log |αI + ΦΓΦT |, (7) assuming α = λ and |x| ≜[|x1|, . . . , |xm|]T . While not discussed in [19], gSBL(x) is a general penalty function that only need have α = λ to obtain equivalence with SBL; other selections may lead to better performance (more on this in Section 4 below). The analysis in [19] reveals that replacing ∥x∥0 with gSBL(x) and α →0 leaves the globally minimizing solution to (1) unchanged but drastically reduces the number of local minima (more so than any possible factorial penalty function). While space precludes the details here, these ideas can be extended significantly to form conditions, which again are only satisfiable by a non-factorial penalty, whereby all local minima are smoothed away [21]. Note that while basic ℓ1-norm minimization also has no local minima, the global minimum need not always correspond with the global solution to (1), unlike when using gSBL(x). It can also be shown that gSBL(x) is a non-decreasing, concave function of |x| (see Appendix), a desirable property of sparsity-promoting penalties. Importantly, as a direct consequence of this concavity, (6) can be optimized using a reweighted ℓ1 algorithm (in an analogous fashion to the factorial case) using w(k+1) i = ∂gSBL(x) ∂|xi| x=x(k+1) . (8) Although this quantity is not available in closed form (except for the special case where α →0), it can be estimated by executing: Step I - Initialize by setting w(k+1) →w(k), the k-th vector of weights, Step II - Repeat until convergence w(k+1) i →  φT i  αI + Φf W (k+1) e X(k+1)ΦT −1 φi  1 2 , (9) where f W (k+1) ≜diag[w(k+1)]−1 and e X(k+1) ≜diag[|x(k+1)|]. The derivation is shown in the Appendix, while further details and analyses are deferred to [20]. Note that cost function descent is guaranteed with only a single iteration, so we need not execute (9) until convergence. In fact, it can be shown that a more rudimentary form of reweighted ℓ1 applied to this model in [19] amounts to performing exactly one such iteration. However, repeated execution of (9) is cheap computationally since it scales as O nm∥x(k+1)∥0  , where typically ∥x(k+1)∥0 ≤n, and is substantially less intensive than the subsequent ℓ1 step given by (3). From a theoretical standpoint, ℓ1 reweighting applied to gSBL(x) is guaranteed to aid performance in the sense described by the following two results, which apply in the case where λ →0, α →0. Before proceeding, we define spark(Φ) as the smallest number of linearly dependent columns in Φ [5]. It follows then that 2 ≤spark(Φ) ≤n + 1. Theorem 1. When applying iterative reweighted ℓ1 using (9) and w(1) i ̸= 0, ∀i, the solution sparsity satisfies ∥x(k+1)∥0 ≤∥x(k)∥0 (i.e., continued iteration can never do worse). Theorem 2. Assume that spark(Φ) = n+1 and consider any instance where standard ℓ1 minimization fails to find some x∗drawn from support set S with cardinality |S| < (n+1) 2 . Then there exists a set of signals y (with non-zero measure) generated from S such that non-factorial reweighted ℓ1, with f W (k+1) updated using (9), always succeeds but standard ℓ1 always fails. Note that Theorem 2 does not in any way indicate what is the best non-factorial reweighting scheme in practice (for example, in our limited experience with empirical simulations, the selection α →0 is not necessarily always optimal). However, it does suggest that reweighting with non-convex, nonfactorial penalties is potentially very effective, motivating other selections as discussed next. Taken together, Theorems 1 and 2 challenge the prevailing reliance on strictly convex cost functions, since they ensure that we can never do worse than the Lasso (which uses the tightest convex approximation to the ℓ0 norm), and that there will always be cases where improvement over the Lasso is obtained. 3 Bottom-Up Construction of Non-Factorial Penalty In the previous section, we described what amounts to a top-down formulation of a non-factorial penalty function that emerges from a particular hierarchical Bayesian model. Based on the insights gleaned from this procedure (and its distinction from factorial penalties), it is possible to stipulate alternative penalty functions from the bottom up by creating plausible, non-factorial reweighting schemes. The following is one such possibility. Assume for simplicity that λ →0. The Achilles heel of standard, factorial penalties is that if we want to retain a global minimum similar to that of (1), we require a highly concave penalty on each xi [21]. However, this implies that almost all basic feasible solutions (BFS) to y = Φx, defined as a solution with ∥x∥0 ≤n, will form local minima of the penalty function constrained to the feasible region. This is a very undesirable property since there are on the order of m n  BFS with ∥x∥0 = n, which is equal to the signal dimension and not very sparse. We would really like to find degenerate BFS, where ∥x∥0 is strictly less than n. Such solutions are exceedingly rare and difficult to find. Consequently we would like to utilize a non-factorial, yet highly concave penalty that explicitly favors degenerate BFS. We can accomplish this by constructing a reweighting scheme designed to avoid non-degenerate BFS whenever possible. Now consider the covariance-like quantity αI + Φ( e X(k+1))2ΦT , where α may be small, and then construct weights using the projection of each basis vector φi as defined via w(k+1) i →φT i  αI + Φ( e X(k+1))2ΦT −1 φi. (10) Ideally, if at iteration k + 1 we are at a bad or non-degenerate BFS, we do not want the newly computed w(k+1) i to favor the present position at the next iteration of (3) by assigning overly large weights to the zero-valued xi. In such a situation, the factor Φ( e X(k+1))2ΦT in (10) will be full rank and so all weights will be relatively modest sized. In contrast, if a rare, degenerate BFS is found, then Φ( e X(k+1))2ΦT will no longer be full rank, and the weights associated with zero-valued coefficients will be set to large values, meaning this solution will be favored in the next iteration. In some sense, the distinction between (10) and its factorial counterparts, such as the method of Cand`es et al. [3] which uses w(k+1) i →1/(|x(k+1) i |+α), can be summarized as follows: the factorial methods assign the largest weight whenever the associated coefficient goes to zero; with (10) the largest weight is only assigned when the associated coefficient goes to zero and ∥x(k+1)∥0 < n. The reweighting option (10), which bears some resemblance to (9), also has some very desirable properties beyond the intuitive justification given above. First, since we are utilizing (10) in the context of reweighted ℓ1 minimization, it would productive to know what cost function, if any, we are minimizing when we compute each iteration. Using the fundamental theorem of calculus for line integrals (or the gradient theorem), it follows that the bottom-up (BU) penalty function associated with (10) is gBU(x) ≜ Z 1 0 trace  e XΦT  αI + Φ(ν e X)2ΦT −1 Φ  dν. (11) Moreover, because each weight wi is a non-increasing function of each xj, ∀j, from Kachurovskii’s theorem [12] it directly follows that (11) is concave and non-decreasing in |x|, and thus naturally promotes sparsity. Additionally, for α sufficiently small, it can be shown that the global minimum of (11) on the constraint y = Φx must occur at a degenerate BFS (Theorem 1 from above also holds when using (10); Theorem 2 may as well, although we have not formally shown this). And finally, regarding implementational issues and interpretability, (10) avoids any recursive weight assignments or inner-loop optimization as when using (9). 4 Extensions One of the motivating factors for using iterative reweighted ℓ1 optimization is that it is very easy to incorporate alternative likelihoods and priors. This section addresses three such examples. Non-Negative Sparse Coding: Numerous applications require sparse solutions where all coefficients xi are constrained to be non-negative [2]. By adding the contraint x ≥0 to (3) at each iteration, we can easily compute such solutions using gSBL(x), gBU(x), or any other appropriate penalty function. Note that in the original SBL formulation, this is not a possibility since the integrals required to compute the associated cost function or update rules no longer have closed-form expressions. Group Feature Selection: Another common generalization is to seek sparsity at the level of groups of features, e.g., the group Lasso [23]. The simultaneous sparse approximation problem [17] is a particularly useful adaptation of this idea relevant to compressive sensing [18], manifold learning [13], and neuroimaging [22]. In this situation, we are presented with r signals Y ≜[y·1, y·2, . . . , y·r] that were produced by coefficient vectors X ≜[x·1, x·2, . . . , x·r] characterized by the same sparsity profile or support, meaning that the coefficient matrix X is row sparse. Here we adopt the notation that x·j represents the j-th column of X while xi· represents the i-th row of X. The sparse recovery problems (1) and (2) then become min X d(X), s.t. Y = ΦX, and min X ∥Y −ΦX∥2 F + λd(X), λ > 0, (12) where d(X) ≜Pm i=1 I [∥xi·∥> 0] and I[·] is an indicator function. d(X) favors row sparsity and is a natural extension of the ℓ0 norm to the simultaneous approximation problem. As before, the combinatorial nature of each optimization problem renders them intractable and so approximate procedures are required. All of the algorithms discussed herein can naturally be expanded to this domain essentially by substituting the scalar coefficient magnitudes from a given iteration |x(k) i | with some row-vector penalty, such as a norm. If we utilize ∥xi·∥2, then the coefficient matrix update analogous to (3) requires the solution of the more complicated weighted second-order cone (SOC) program X(k+1) →arg min X ∥Y −ΦX∥2 F + λ X i w(k) i ∥xi·∥2. (13) Other selections such as the ℓ∞norm are possible as well, providing added generality. Sparse Classifier Design: At a high level, sparse classifiers can be trained by simply substituting a (preferrably) convex likelihood function for the quadratic term in (2). For example, to perform sparse logistic regression we would solve min x X j  yj log(φT j·x) + (1 −yj) log(1 −φT j·x)  + λg(x), (14) where now yj ∈{0, 1} and g(x) is an arbitrary, concave-in-|x| penalty. This can be implemented by iteratively solving an ℓ1-norm penalized logistic regression problem, which can be efficiently accomplished using a simple majorization-maximization approach [7]. Note that cost function descent does not require that we compute the full reweighted ℓ1 solution; the iterations from [7] naturally lend themselves to an efficient partial (or greedy) update before recomputing the weights. It is very insightful to compare this methodology with the original SBL (or relevance vector machine) classifier derived in [15]. When the Gaussian likelihood p(y|x) is replaced with a Bernoulli distribution (which leads to the logistic data fit term above), it is no longer possible to compute the marginalization (4) or the posterior distribution p(x|y; γ), which is used both for optimization purposes and to make predictive statements about test data. Consequently, a heuristic Laplace approximation is adopted, which requires a second-order Newton inner-loop to fit a Gaussian about the mode of p(x|y; γ). This Gaussian is then used to transform the classification problem into a standard regression one with data-dependent (herteroscedastic) noise, and then whatever approach is used to minimize (4), either the MacKay update rules [15] or a greedy constructive method [16], can be used in the outer-loop. When (if) a fixed point γ∗is reached, the corresponding classifier coefficients are chosen as the mode of p(x|y; γ∗). While demonstrably effective in a wide variety of empirical classification tests, the problem with this formulation of SBL is threefold. First, there are no convergence guarantees of any kind, regardless of which method is used for the outer-loop. Secondly, it is completely unclear what, if any, cost function is being descended (even approximately) to obtain the classifier coefficients, making it difficult to explore the model for enhancements or analytical purposes. Thirdly, in certain applications it has been observed that SBL achieves extreme sparsity at the expense of classification accuracy [4, 11]. There is currently no flexibility in the model to remedy this problem. These issues are directly addressed by dispensing with the Bayesian hierarchical derivation of SBL altogether and considering classification in light of (14). Both the MacKay and greedy SBL updates are equivalent to minimizing (14) with g(x) = gSBL(x), and assuming α = λ = 1, using coordinate descent over a set of auxiliary functions (details provided in a forthcoming paper). Unfortunately however, because these auxiliary functions are based in part on a second-order Laplace approximation, they do not form a strict upper bound and so provable convergence (or even descent) is not possible. Of course we can always substitute the reweighted ℓ1 scheme discussed above to avoid this issue, since the underlying cost function in x-space is the same. Perhaps more importantly, to properly regulate sparsity, when we deviate from the original Bayesian inspiration for this model, we are free to adjust α and/or λ. For example, with α small, the penalty gSBL(x) is more highly concave favoring sparsity, while in the limit at α becomes large, it acts like a standard ℓ1 norm, still favoring sparsity but not exceedingly so (the same phenomena occurs when using the penalty (11)). Likewise, λ is as a natural trade-off parameter balancing the contribution from the two terms in (6) or (14). Both α and λ can be tuned via cross-validation if desired. There is one additional concern regarding SBL that involves marginal likelihood (sometimes called evidence) calculations. In the standard regression case where marginalization was possible, the optimized quantity −log p(y; γ) represents an approximation to −log p(y) that can be used, among other things, for model comparison. This notion is completely lost when we move to the classification case under consideration. While space precludes the details, if we are willing to substitute a probit likelihood function for the logistic, it is possible to revert (14) back to the original hierarchical, γ-dependent Bayesian model and obtain a rigorous upper bound on −log p(y; γ). Finally, detailed empirical simulations with both logistic- and probit-based classifiers is an area of future research; preliminary results are promising. 5 Empirical Comparisons To further examine the algorithms discussed herein, we performed simulations similar to those in [3]. In the first experiment, each trial consisted of generating a 100×256 dictionary Φ with iid Gaussian entries and a sparse vector x∗with 60 nonzero, non-negative (truncated Gaussian) coefficients. A signal is then computed using y = Φx∗. We then attempted to recover x∗by applying nonnegative ℓ1 reweighting strategies with four different penalty functions: (i) gSBL(x) implemented using a single iteration of (9), referred to as SBL-I (equivalent to the method from [19]); (ii) gSBL(x) implemented using multiple iterations of (9) as discussed in Section 2, referred to as SBL-II; (iii) gBU(x); and finally (iv) g(x) = P i log(|xi| + α), the factorial method of Cand`es et al., which represents the current state-of-the-art in reweighted ℓ1 algorithms. In all cases α was chosen via coarse cross-validation. Additionally, since we are working with a noise-free signal, we assume λ →0 and so the requisite coefficient update (3) with xi ≥0 reduces to a standard linear program. Given w(0) i = 1, ∀i for each algorithm, the first iteration amounts to the non-negative minimum ℓ1-norm solution (i.e., the Lasso). Average results from 1000 random trials are displayed in Figure 1 (left), which plots the empirical probability of success in recovering x∗versus the iteration number. We observe that standard non-negative ℓ1 never succeeds (see first iteration results); however, with only a few reweighted iterations drastic improvement is possible, especially for the bottom-up approach. By 10 iterations, the non-factorial variants have all exceeded the method of Cand`es et al. (There was no appreciable improvement by any method after 10 iterations.) This shows both the efficacy of non-factorial reweighting and the ability to handle constraints on x. For the second experiment, we used a randomly generated 50 × 100 dictionary for each trial with iid Gaussian entries as above, and created 5 coefficient vectors X∗= [x∗ ·1, ..., x∗ ·5] with matching sparsity profile and iid Gaussian nonzero coefficients. We then generate the signal matrix Y = ΦX ∗ and attempt to learn X∗using various group-level reweighting schemes. In this experiment we varied the row sparsity of X∗from d(X∗) = 30 to d(X∗) = 40; in general, the more nonzero rows, the harder the recovery problem becomes. A total of five algorithms modified to the simultaneous sparse approximation problem were tested using an ℓ2-norm penalty on each coefficient row: the four methods from above (executed for 5 iterations each) plus the standard group Lasso (equivalent to a single iteration of any of the other algorithms). Results are presented in Figure 1 (right), where the performance gap between the factorial and non-factorial approaches is very significant. Additionally, we have successfully applied this methodology to large neuroimaging data sets [22], obtaining significant improvements over existing convex approaches such as the group Lasso, consistent with the results in Figure 1. Other related simulation results are contained in [20]. 1 2 3 4 5 6 7 8 9 10 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 SBL−I SBL−II Bottom−Up Candes et al. PSfrag replacements ℓ1 iteration number row sparsity, d(X∗) p(success) 30 32 34 36 38 40 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 SBL−I SBL−II Bottom−Up Candes et al. Group Lasso PSfrag replacements ℓ1 iteration number row sparsity, d(X∗) p(success) Figure 1: Left: Probability of success recovering sparse non-negative coefficients as a function of reweighted ℓ1 iterations. Right: Iterative reweighted results using 5 simultaneous signal vectors. Probability of success recovering sparse coefficients for different row sparsity values, i.e., d(X ∗). 6 Conclusion In this paper we have examined concave, non-factorial priors (which previously have received little attention) for the purpose of estimating sparse coefficients. When coupled with general likelihood models and minimized using efficient iterative reweighted ℓ1 methods, these priors offer a powerful alternative to existing state-of-the-art sparse estimation techniques. We have also shown (for the first time) exactly what the underlying cost function associated with the SBL classifier is and provided a more principled algorithm for minimizing it. Appendix Concavity of gSBL(x) and derivation of weight updates (9): Because log |αI + ΦΓΦT | is concave and non-decreasing with respect to γ ≥0, we can express it as log |αI + ΦΓΦT | = min z≥0 zT γ −h∗(z), (15) where h∗(z) is defined as the concave conjugate of h(γ) ≜log |αI + ΦΓΦT | [1]. We can then express gSBL(x) via gSBL(x) = min γ≥0 xT Γ−1x + log |αI + ΦΓΦT | = min γ,z≥0 X i x2 i γi + ziγi  −h∗(z). (16) Minimizing over γ for fixed x and z, we get γi = z−1/2 i |xi|, ∀i. (17) Substituting this expression into (16) gives the representation gSBL(x) = min z≥0 X i x2 i z−1/2 i |xi| + ziz−1/2 i |xi| ! −h∗(z) = min z≥0 X i 2z1/2 i |xi| −h∗(z), (18) which implies that gSBL(x) can be represented as a minimum of upper-bounding hyperplanes with respect to |x|, and thus must be concave and non-decreasing since z ≥0 [1]. We also observe that for fixed z, solving (6) is a weighted ℓ1 minimization problem. To derive the weight update (9), we only need the optimal value of each zi, which from basic convex analysis will satisfy z1/2 i = ∂gSBL(x) 2∂|xi| . (19) Since this quantity is not available in closed form, we can instead iteratively minimize (16) over γ and z. We start by initializing z1/2 i →w(k) i , ∀i and then minimize over γ using (17). We then compute the optimal z for fixed γ, which can be done analytically using z = ▽γ log αI + ΦΓΦT = diag h ΦT αI + ΦΓΦT −1 Φ i . (20) By substituting (17) into (20) and defining w(k+1) i ≜z1/2 i , we obtain the weight update (9). This procedure is guaranteed to converge to a solution satisfying (19) [20] although, as mentioned previously, only one iteration is actually required for the overall algorithm. ■ Proof of Theorem 1: Before we begin, we should point out that for α →0, the weight update (9) is still well-specified regardless of the value of the diagonal matrix f W (k+1) e X(k+1). If φi is not in the span of Φf W (k+1) e X(k+1)ΦT , then w(k+1) i →∞and the corresponding coefficient xi can be set to zero for all future iterations. Otherwise w(k+1) i can be computed efficiently using the Moore-Penrose pseudoinverse and will be strictly nonzero. For simplicity we will now assume that spark(Φ) = n + 1, which is equivalent to requiring that each subset of n columns of Φ forms a basis in Rn. The extension to the more general case is discussed in [20]. From basic linear programming [8], at any iteration the coefficients will satisfy ∥x(k)∥0 ≤n for arbitrary weights f W (k−1). Given our simplifying assumptions, there exists only two possibilities. If ∥x(k)∥0 = n, then we will automatically satisfy ∥x(k+1)∥0 ≤∥x(k)∥0 at the next iteration regardless of f W (k). In contrast, if ∥x(k)∥0 < n, then rank h f W (k)i ≤∥x(k)∥0 for all evaluations of (9) with α →0, enforcing ∥x(k+1)∥0 ≤∥x(k)∥0. ■ Proof of Theorem 2: For a fixed dictionary Φ and coefficient vector x∗, we are assuming that ∥x∗∥0 < (n+1) 2 . Now consider a second coefficient vector x′ with support and sign pattern equal to x∗and define x′ (i) as the i-th largest coefficient magnitude of x′. Then there exists a set of ∥x∗∥0−1 scaling constants νi ∈(0, 1] (i.e., strictly greater than zero) such that, for any signal y generated via y = Φx′ and x′ (i+1) ≤νix′ (i), i = 1, . . . , ∥x∗∥0 −1, the minimization problem ˆx ≜arg min x gSBL(x), s.t. Φx′ = Φx, α →0, (21) is unimodal and has a unique minimizing stationary point which satisfies ˆx = x′. This result follows from [21] and the dual-space characterization of the penalty gSBL(x) from [19]. Note that (21) is equivalent to (6) with λ →0, so the reweighted non-factorial update (9) can be applied. Furthermore, based on the global convergence of these updates discussed above, the sequence of estimates are guaranteed to satisfy x(k) →ˆx = x′. So we will necessarily learn the generative x′. Let xℓ1 ≜arg minx ∥x∥1, subject to Φx∗= Φx. By assumption we know that xℓ1 ̸= x∗. Moreover, we can conclude using [9, Theorem 6] that if xℓ1 fails for some x∗, it will fail for any other x with matching support and sign pattern; it will therefore fail for any x′ as defined above. Finally, by construction, the set of feasible x′ will have nonzero measure over the support S since each νi is strictly nonzero. Note also that this result can likely be extended to the case where spark(Φ) < n + 1 and to any x∗that satisfies ∥x∗∥0 < spark(Φ) −1. The more specific case addressed above was only assumed to allow direct application of [9, Theorem 6]. ■ References [1] S. Boyd and L. Vandenberghe, Convex Optimization, Cambridge University Press, 2004. [2] A. Bruckstein, M. Elad, and M. Zibulevsky, “A non-negative and sparse enough solution of an underdetermined linear system of equations is unique,” IEEE Trans. Information Theory, vol. 54, no. 11, pp. 4813–4820, Nov. 2008. [3] E. Cand`es, M. Wakin, and S. Boyd, “Enhancing sparsity by reweighted ℓ1 minimization,” J. Fourier Anal. Appl., vol. 14, no. 5, pp. 877–905, 2008. [4] G. Cawley and N. Talbot, “Gene selection in cancer classification using sparse logistic regression with Bayesian regularization,” Bioinformatics, vol. 22, no. 19, pp. 2348–2355, 2006. [5] D. Donoho and M. Elad, “Optimally sparse representation in general (nonorthogonal) dictionaries via ℓ1 minimization,” Proc. Nat. Acad. Sci., vol. 100, no. 5, pp. 2197–2202, 2003. [6] M. Fazel, H. Hindi, and S. Boyd, “Log-Det heuristic for matrix rank minimization with applications to hankel and Euclidean distance matrices,” Proc. American Control Conf., vol. 3, pp. 2156–2162, June 2003. [7] B. Krishnapuram, L. Carin, M. Figueiredo, and A. Hartemink, “Sparse multinomial logistic regression: Fast algorithms and generalization bounds,” IEEE Trans. Pattn Anal. Mach. Intell., vol. 27, pp. 957–968, 2005. [8] D. Luenberger, Linear and Nonlinear Programming, Addison–Wesley, Reading, Massachusetts, second edition, 1984. [9] D. Malioutov, M. C¸ etin, and A.S. Willsky, “Optimal sparse representations in general overcomplete bases,” IEEE Int. Conf. Acoust., Speech, and Sig. Proc., vol. 2, pp. II–793–796, 2004. [10] R. Neal, Bayesian Learning for Neural Networks, Springer-Verlag, New York, 1996. [11] Y. Qi, T. Minka, R. Picard, and Z. Ghahramani, “Predictive automatic relevance determination by expectation propagation,” Int. Conf. Machine Learning (ICML), pp. 85–92, 2004. [12] R. Showalter, “Monotone operators in Banach space and nonlinear partial differential equations,” Mathematical Surveys and Monographs 49. AMS, Providence, RI, 1997. [13] J. Silva, J. Marques, and J. Lemos, “Selecting landmark points for sparse manifold learning,” Advances in Neural Information Processing Systems 18, pp. 1241–1248, 2006. [14] R. Tibshirani, “Regression shrinkage and selection via the Lasso,” Journal of the Royal Statistical Society, vol. 58, no. 1, pp. 267–288, 1996. [15] M. Tipping, “Sparse bayesian learning and the relevance vector machine,” J. Machine Learning Research, vol. 1, pp. 211–244, 2001. [16] M. Tipping and A. Faul, “Fast marginal likelihood maximisation for sparse Bayesian models,” Ninth Int. Workshop. Artificial Intelligence and Statistics, Jan. 2003. [17] J. Tropp, “Algorithms for simultaneous sparse approximation. Part II: Convex relaxation,” Signal Processing, vol. 86, pp. 589–602, April 2006. [18] M. Wakin, M. Duarte, S. Sarvotham, D. Baron, and R. Baraniuk, “Recovery of jointly sparse signals from a few random projections,” Advances in Neural Information Processing Systems 18, pp. 1433–1440, 2006. [19] D. Wipf and S. Nagarajan, “A new view of automatic relevance determination,” Advances in Neural Information Processing Systems 20, pp. 1625–1632, 2008. [20] D. Wipf and S. Nagarajan, “Iterative reweighted ℓ1 and ℓ2 methods for finding sparse solutions,” Submitted, 2009. [21] D. Wipf and S. Nagarajan, “Latent variable Bayesian models for promoting sparsity,” Submitted, 2009. [22] D. Wipf, J. Owen, H. Attias, K. Sekihara, and S. Nagarajan, “Robust Bayesian Estimation of the Location, Orientation, and Time Course of Multiple Correlated Neural Sources using MEG,” NeuroImage, vol. 49, no. 1, pp. 641–655, Jan. 2010. [23] M. Yuan and Y. Lin, “Model selection and estimation in regression with grouped variables,” J. R. Statist. Soc. B, vol. 68, pp. 49–67, 2006. [24] W. Zangwill, Nonlinear Programming: A Unified Approach, Prentice Hall, New Jersey, 1969.
2009
35
3,783
Modeling the spacing effect in sequential category learning Hongjing Lu Department of Psychology & Statistics Hongjing@ucla.edu Matthew Weiden Department of Psychology mweiden@ucla.edu Alan Yuille Department of Statistics, Computer Science & Psychology University of California, Los Angeles Los Angeles, CA 90095 yuille@stat.ucla.edu Abstract We develop a Bayesian sequential model for category learning. The sequential model updates two category parameters, the mean and the variance, over time. We define conjugate temporal priors to enable closed form solutions to be obtained. This model can be easily extended to supervised and unsupervised learning involving multiple categories. To model the spacing effect, we introduce a generic prior in the temporal updating stage to capture a learning preference, namely, less change for repetition and more change for variation. Finally, we show how this approach can be generalized to efficiently perform model selection to decide whether observations are from one or multiple categories. 1 Introduction Inductive learning the process by which a new concept or category is acquired through observation of exemplars - poses a fundamental theoretical problem for cognitive science. When exemplars are encountered sequentially, as is typical in everyday learning, then learning is influenced in systematic ways by presentation order. One pervasive phenomenon is the spacing effect, manifested in the finding that given a fixed amount of total study time with a given item, learning is facilitated when presentations of the item are spread across a longer time interval rather than massed into a continuous study period. In category learning, for example, exemplars of two categories can be spaced by presenting them in an interleaved manner (e.g., A1B1A2B2A3B3), or massed by presenting them in consecutive blocks (e.g., A1A2A3B1B2B3). Kornell & Bjork [1] show that when tested later on classification of novel category members, spaced presentation yields superior performance relative to massed presentation. Similar spacing effects have been obtained in studies of item learning [2] and motor learning [3]. Moreover, spacing effects are found not only in human learning, but also in various types of learning in other species, including rats and Aplysia [4][5]. In the present paper we will focus on spacing effects in the context of sequential category learning. Standard statistical methods based on summary information are unable to deal with order effects, including the performance difference between spaced and massed conditions. From a computational perspective, a sequential learning model is needed to construct category representations from training examples and dynamically update parameters of these representations from trial to trial. Bayesian sequential models have been successfully applied to model causal learning and animal conditioning [6] [7]. In the context of category learning, if we assume that the representation for each category can be specified by a Gaussian distribution where the mean µ and the variance σ2 are both random variables [8], then the learning model must aim to compute the posterior distribution of the parameters for each category given all the observations xt from trial 1 to trial t, P(µ, σ2|xt). 1 However, given that both the mean and the variance of a category are random variables, standard Kalman filtering [9] is not directly applicable in this case since it assumes a known variance, which is not warranted in the current application. In this paper, we extend traditional Kalman filtering in order to update two category parameters, the mean and the variance, over time in the context of category learning. We define conjugate temporal priors to enable closed form solutions to be obtained in this learning model with two unknown parameters. We will illustrate how the learning model can be easily extended to learning situations involving multiple categories either with supervision (i.e., learners are informed of category membership for each training observation) or without supervision (i.e., category membership of each training observation is not provided to learners). Surprisingly, we can also derive closed form solutions in the latter case. This reduces the need for employing particle filters as an approximation to exact inference, commonly used in the case of unsupervised learning [10]. To model the spacing effect, we introduce a generic prior in the temporal updating stage. Finally, we will show how this approach can be generalized to efficiently perform model selection. The organization of the present paper is as follows. In Section 2 we introduce the Bayesian sequential learning framework in the context of category learning, and discuss the conjugacy property of the model. Section 3 and 4 demonstrate how to develop supervised and unsupervised learning models, which can be compared with human performance. We draw general conclusions in section 5. 2 Bayesian sequential model We adopt the framework of Bayesian sequential learning [11], termed Bayes-Kalman, a probabilistic model in which learning is assumed to be a Markov process with unobserved states. The exemplars in training are directly observable, but the representations of categories are hidden and unobservable. In this paper, we assume that categories can be represented as Gaussian distributions with two unknown parameters, means and variances. These two unknown parameters need to be learned from a limited number of exemplars (e.g., less than ten exemplars). We now state the general framework and give the update rule for the simplest situation where the training data is generated by a single category specified by a mean m and precision r – the precision is the inverse of the variance and is used to simplify the algebra. Our model assumes that the mean can change over time and is denoted by mt, where t is the time step. The model is specified by the prior distribution P(m0, r), the likelihood function P(x|mt, r) for generating the observations, and the temporal prior P(mt+1|mt) specifying how mt can vary over time. Note that the precision r is estimated over time, which differs from standard Kalman filtering where it is assumed to be known. Bayes-Kalman [11] gives iterative equations to determine the posterior P(mt, r|Xt) after a sequence of observations XT = {x1, ..., xt}. The update equations are divided into two stages, prediction and correction: P(mt+1, r|Xt) = Z ∞ −∞ dmtP(mt+1|mt)P(mt, r|Xt), (1) P(mt+1, r|Xt+1) = P(mt+1, r|xt+1, Xt) = P(xt+1|mt+1, r)P(mt+1, r|Xt) P(xt+1|Xt) . (2) Intuitively, the Bayes-Kalman first predicts the distribution P(mt+1, r|Xt) and then uses this as a prior to correct for the new observation xt+1 and determine the new posterior P(mt+1, r|Xt+1). Note that the temporal prior P(mt+1|mt) implies that the model automatically pays most attention to recent data and does not memorize the data, thus exhibiting sensitivity to the data ordering. 2.1 Conjugate priors The distributions P(m0, r), P(x|mt, r), P(mt+1|mt) are chosen to be conjugate, so that the distribution P(mt, r|Xt) takes the same functional form as P(m0, r). As shown in the following section, this reduces the Bayes-Kalman equations to closed form update rules for the parameters of the dis2 tributions. The distributions are specified in terms of Gamma and Gaussian distributions: g(r : α, β) = βα Γ(α)rα−1 exp{−βr}, r ≥0. Gamma. (3) G(x : µ, ρ) = { ρ 2π} exp{−ρ/2(x −µ)2}. Gaussian. (4) We specify the prior P(m0, r) as the product of a Gaussian P(m0|r) and a Gamma P(r): P(m0|r) = G(m0 : µ, τr), P(r) = g(r : α, β), (5) where µ, τ, α, β are the parameters of the distribution. For simplicity, we call this a GammaGaussian distribution with parameters µ, τ, α, β. The likelihood function and temporal prior are both Gaussians: P(xt|mt, r) = G(xt : mt, ζr), P(mt+1|mt) = G(mt+1 : mt, γr), (6) where ζ, γ are constants. The conjugacy of the distributions ensures that the posterior distribution P(mt, r|Xt) will also be a Gamma-Gaussian distribution with parameters µt, τt, αt, βt, where the update rules for these parameters are specified in the next section. 2.2 Update rules for the model parameters The update rules for the model parameters follow from substituting the distributions into the BayesKalman equations 1, 2. We sketch how these update rules are obtained assuming that P(mt, r|Xt) is a Gamma-Gaussian with parameters µt, τt, αt, βt, which is true for t = 0 using equations (5,6). The form of the prediction equation and the temporal prior, see equations (1,6), ensures that P(mt+1, r|Xt) is also a Gamma-Gaussian distribution with parameters µt, τp t , αt, βt, where τ p t = τtγ τt + γ . (7) The correction equation and the likelihood function, see equations (2,6), ensure that P(mt+1, r|Xt+1) is also Gamma-Gaussian with parameters µt+1, τt+1, αt+1, βt+1 given by: αt+1 = αt + 1/2, βt+1 = βt + ζτp t (xt+1 −µt)2 2(ζ + τp t ) , µt+1 = ζxt+1 + τ p t µt ζ + τ p t , τt+1 = ζ + τ p t . (8) Intuitively, the prediction only reduces the precision of m but makes no change to its mean or to the distribution over r. By contrast, the new observation alters the mean of m (moving it closer to the new observation xt+1), and also increases its precision, which sharpens the distribution on r. 2.3 Model evidence We also need to compute the probability of the observation sequence Xt from the model (which will be used later for model selection). This can be expressed recursively as: p(Xt) = p(xt|Xt−1)p(xt−1|Xt−2)...p(x1). (9) This computation is also simplified because we use conjugate distributions. The terms in equation (9) can be expressed as P(xt+1|Xt) = R dmt+1drP(xt+1|mt+1, r)P(mt+1, r|Xt) and these integrals can be calculated analytically yielding: P(xt+1|Xt) =  βt + ζτt 2(ζ + τt)(x −µt)2 −(αt+1/2){ 1 2π ζτt ζ + τt }1/2 βαt t Γ(αt + 1/2) Γ(αt) . (10) 3 3 Supervised category learning Although the learning model is presented for one category, it can easily be extended to learning multiple categories with known category membership for training data (i.e., under supervision). In this section, we will first describe an experiment with two categories to show how the category representations change over time; then we will simulate learning with six categories and compare predictions with human data in psychological experiments. 3.1 Two-category learning with supervision We first conduct a synthetic experiment with two categories under supervision. We generate six training observations from one of two one-dimensional Gaussian distributions (representing categories A and B, respectively) with means [−0.4, 0.4] and standard deviation of 0.4. Two training conditions are included, a massed condition with the data presentation order of AAABBB and a spaced condition with the order of ABABAB. To model the acquisition of category representations during training, we employ the Bayesian learning model as described in the previous section. In the correction stage of each trial, the model updates the parameters corresponding to the category that produced the observation based on the supervision (i.e., known category membership), following equation (8). In the prediction stage, however, different values of a fixed model parameter γ are introduced to incorporate a generic prior that controls how much the learner is willing to update category representations from one trial to the next. The basic hypothesis is that learners will have greater confidence in knowledge of a category presented on trial t than of a category absent on trial t. As a consequence, the learner will be willing to accept more change in a category representation if the observation on the previous trial was drawn from a different category. This generic prior does share some conceptual similarity with a model developed by Kording et. al,[?], which assumes that the moment-moment variance of the states is higher for faster timescales (p. 779). More specifically, if the observation on trial t is from the first category, in the prediction phase we will update the τt parameters for the two categories, τt1, τt2, as: τt1 7→ τt1γs τt1 + γs , τt2 7→ τt2γd τt2 + γd , (11) in which γs > γd. In the simulation, we used γs = 50 and γd = .5 −2 0 2 m P(m) Massed @ t = 2 −2 0 2 m P(m) t = 4 −2 0 2 m P(m) t = 6 −2 0 2 m P(m) Spaced @ t = 2 −2 0 2 m P(m) t = 4 −2 0 2 m P(m) t = 6 Category 1 Category 2 0 20 40 r P(r) t = 6 0 20 40 r P(r) t = 4 0 20 40 r P(r) Massed @ t = 2 0 20 40 r P(r) Spaced @ t = 2 0 20 40 r P(r) t = 4 0 20 40 r P(r) t = 6 Figure 1: Posterior distributions of means P(mt|Xt) and precisions P(rt|Xt) updated on training trials in two-category supervised learning. Blue lines indicate category parameters in the first category; and red lines indicate parameters in the second category. The top panel shows the results for the massed condition (i.e., AAABBB), and the bottom panel shows the results for the spaced condition (i.e., ABABAB). Please see in colour. We show the distributions only on even trials to save space. See section 3.1. Figure (1) shows the change of posterior distributions of the two unknown category parameters, means P(mt|Xt) and precisions P(rt|Xt), over training trials. Figure (2) shows the category representation in the form of the posterior distribution of P(xt|Xt). In the massed condition (i.e., 4 AAABBB), the variance of the first category decreases over the first three trials, and then increases over the second three trials because the observations are from the second category. The increase of category variance reflects the forgetting that occurs if no new observations are provided for a particular category after a long interval. This type of forgetting does not occur in the spaced condition, as the interleaved presentation order ABABAB ensured that each category recurs after a short interval. Based upon the learned category representations, we can compute accuracy (the ability to discriminate between the two learnt distributions) using the posterior distributions of the two categories. After 100 simulations, the average accuracy in the massed condition is 0.78, which is lower than the 0.84 accuracy in the spaced condition. Thus our model is able to predict the spacing effect found in two-category supervised learning. −2 0 2 x P(x) Massed @ t = 1 −2 0 2 x P(x) t = 2 −2 0 2 x P(x) t = 3 −2 0 2 x P(x) t = 4 −2 0 2 x P(x) t = 5 −2 0 2 x P(x) t = 6 −2 0 2 x P(x) Spaced @ t = 1 −2 0 2 x P(x) t = 2 −2 0 2 x P(x) t = 3 −2 0 2 x P(x) t = 4 −2 0 2 x P(x) t = 5 −2 0 2 x P(x) t = 6 Category 1 Category 2 Figure 2: Posterior distribution of each category, P(xt|Xt), updated on training trials in the twocategory supervised learning. Same conventions as in figure (1). See section 3.1. 3.2 Modeling the spacing effect in six-category learning Kornell and Bjork [1] asked human subjects to study six paintings by six different artists, with a given artists paintings presented consecutively (massed) or interleaved with other artists paintings (spaced). In the training phase, subjects were informed which artist created each training painting. The same 36 paintings were studied in the training phase, but with different presentation orders in the massed and spaced conditions. In the subsequent test phase, six new paintings (one from each artist) were presented and subjects had to identify which artist painted each of a series of new paintings. Four test blocks were tested with random display order for artists. In each test block, participants were given feedback after making an identification response. Paintings presented in one test block thus served as training examples for the subsequent test block. Human results are shown in figure (4). Human subjects showed significantly better test performance after spaced than massed training. Given that feedback was provided and one painting from each artist appeared in one test block, it is not surprising that test performance increased across test blocks and the spacing effect decreased with more test blocks. To simulate the data, we generated training and test data from six one-dimensional Gaussian distributions with means [−2, −1.2, −0.4, 0.4, 1.2, 2] and standard deviation of 0.4. Figure (3) shows the learned category representations in terms of posterior distributions. Depending on the presentation order of training data (massed or spaced), the learned distributions differ in terms of means and variances for each category. To compare with human performance reported by Kornell and Bjork, the model estimates accuracy in terms of discrimination between the two categories based upon learned distributions. Figure (4) shows average accuracy from 1000 simulations. The result plot illustrates that the model predictions match human performance well. 4 Unsupervised category learning Both humans and animals can learn without supervision. For example, in the animal conditioning literature, various studies have shown that exposing two stimuli in blocks (equivalent to a massed condition) is less effective in producing generalization [12]. Balleine et. al. [4] found that with rats, preexposure to two stimuli A and B (massed or spaced) determines the degree to which backward blocking is subsequently obtained – backward blocking occurs if the preexposure is spaced but not 5 −10 0 10 0 0.5 1 X P(X) Massed @ t = 6 X P(X) t = 12 X P(X) t = 18 X P(X) t = 24 X P(X) t = 30 X P(X) t = 36 −10 0 10 0 0.5 1 X P(X) Spaced @ t = 6 X P(X) t = 12 X P(X) t = 18 X P(X) t = 24 X P(X) t = 30 X P(X) t = 36 Category 1 Category 2 Category 3 Category 4 Category 5 Category 6 Figure 3: Posterior distribution of each category, P(xt|Xt), updated on training trials in the sixcategory supervised learning. Same conventions as in figure (1). See section 3.2. 1 2 3 4 0.2 0.3 0.4 0.5 0.6 0.7 0.8 Test Block Proportion Correct Massed Spaced Figure 4: Human performance (left) and model prediction (right). Proportion correct as a function of presentation training conditions (massed and spaced) and test block. See section 3.2. if it is massed. They conclude that in the massed preexposure the rats are unable to distinguish two separate categories for A and B, and therefore treat them as members of a single category. By contrast, they conclude that rats can distinguish the categories A and B in the spaced preexposure. In this section, we generalize the sequential category model to unsupervised learning, when the category membership of each training example is not provided to observers. We first derive the extension of the sequential model to this case (surprisingly, showing we can obtain all results in closed form). Then we determine whether massed and spaced stimuli (as in Balleine et. al.’s experiment [4]) are most likely to have been generated by a single category or by two categories. We also assess the importance of supervision in training by comparing performance after unsupervised learning with that after supervised learning. We consider a model with two hidden categories. Each category can be represented as a Gaussian distribution with a mean and precision m1, r1 and m2, r2. The likelihood function assumes that the data is generated by either category with equal probability, since the category membership is not provided, P(x|m1, r1, m2, r2) = 1 2P(x|m1, r1) + 1 2P(x|m2, r2), (12) with P(x|m1, r1) = G(x : m1, ζr1), P(x|m2, r2) = G(x : m2, ζr2). (13) We specify prior distributions and temporal priors as before: P(m1 0, r1) = G(m1 0 : µ1, τr1), P(m2 0, r2) = G(m2 0 : µ2, τr2) (14) P(m1 t+1|m1 t) = G(m1 t+1 : m1 t, γr1), P(m2 t+1|m2 t ) = G(m2 t+1 : m2 t, γr2). (15) The joint posterior distribution P(m1 t, r1, m2 t, r2|Xt) after observations Xt can be formally obtained by applying the Bayes-Kalman update rules to the joint distribution – i.e., replace (mt, r) by (m1 t, r1, m2 t, r2) in equations (1,2)). But this update is more complicated because we do not know whether the new observation xt should be assigned to category 1 or category 2. Instead we have to sum over all the possible assignments of the observations to the categories which gives 2t possible assignments at time t. This can be performed efficiently in a recursive manner. Let At denote the set of possible assignments at time t where each assignment is a string (a1, ..., at) of binary variables 6 of length t, where (1, ..., 1) is the assignment where all the observations are assigned to category 1, (2, 1, ..., 1) assigns the first observation to category 2 and the remainder to category 1, and so on. By substituting equations (12,14,15) into Bayes-Kalman we can obtain an iterative update equation for P(m1 t, r1, m2 t, r2|Xt). At time t we represent: P(m1 t , r1, m2 t, r2|Xt) = X (a1,...,at)∈At P(m1, r|⃗α1 a1,...,at)P(m2, r|⃗α2 (a1,...,at))P(a1, ..., at|Xt), (16) where αi (a1,...,at) denotes the values of the parameters ⃗α = (α, β, µ, τ) for category i (i ∈{1, 2}) for observation sequence (a1, ..., at) and P(a1, ..., at) is the probability of assignment (a1, ..., at). At t = 0 there is no observation sequence and P(m1 0, r1, m2 0, r2|Xt) = P(m1, r|⃗α1)P(m2, r|⃗α2) which corresponds to A0 containing a single element which has probability one. The prediction stage updates the τ component of ⃗αi(a1, ..., at) by: τ i(a1, ..., at) 7→ γi(at)τ i(a1, ..., at) γi(at) + τ i(a1, ..., at). (17) We define γi(at) as larger if i = at and smaller if i ̸= at, as specified in equation (11) to incorporate the generic prior described in section 3.1. The correction stage at time t + 1 introduces another observation, which must be assigned to the two categories. This gives a new set At+1 of 2t+1 assignments of form (a1, ..., at+1) and a new posterior: P(m1 t+1, r1, m2 t+1, r2|Xt+1) = X (a1,...,at+1)∈At+1 P(m1, r|⃗α1 a1,...,at+1)P(m2, r|⃗α2 (a1,...,at+1))P(a1, ..., at+1|Xt+1), (18) where we compute ⃗αi (a1,...,at+1) for i ∈{1, 2} by: αi (a1,...,at+1) = αi (a1,...,at) + 1/2, β1 (a1,...,at+1) = β1 (a1,...,at) + ζτi (a1,...,at)(xt+1 −µ1 (a1,...,at))2 2(ζ + τi (a1,...,at)) , µi (a1,...,at+1) = ζxt+1 + τi (a1,...,at)µi (a1,...,at) ζ + τ 1 (a1,...,at) , τi (a1,...,at+1 = ζ + τ i (a1,....,at), (19) and we compute P(a1, ..., at+1) by: P(a1, ..., at+1|Xt+1) = P(xt+1|⃗αat+1 (a1,...,at))P(a1, ..., at) P (a1,...,at) P(xt+1|⃗αat+1 (a1,...,at))P(a1, ..., at), (20) where P(xt+1|⃗αat+1 (a1,...,at)) = Z dmat+1drat+1P(xt+a|m(at+1), rat+1)P(m(at+1), rat+1|⃗α(a1,...,at)) (21) The model selection can, as before, be expressed as P(xt|Xt−1)P(xt−1|Xt)....P(x1), where P(xt+1|Xt) = X (a1,...,at)∈At P(xt+1|⃗αat+1 (a1,...,at))P(a1, ..., at). (22) We can now address the problem posed by Balleine et. al.’s preexposure experiments [4] – why do rats identify a single category for the massed stimuli but two categories for the spaced stimuli? 7 We treat this as a model selection problem. We compare the evidence for the sequential model with one category, see equations (9,10), versus the evidence for the model with two categories, see equations (9,22), for the two cases AAABBB (massed) and ABABAB (spaced). We use the same data as described in section (3.1) but without providing category membership for any of the training data. The left plot in figure (5) shows the result obtained by comparing model evidence for the one-category model with model evidence for the two-category model. A greater ratio value indicates greater support for the one-category account. As shown in figure (5), the model decides that all training observations are from one category in the massed condition, but from two different categories in the spaced condition (using zero as the decision threshold). These predictions agree with with Balleine et. al.’s findings. Massed Spaced −2 −1.5 −1 −0.5 0 Conditions Model evidence ratio Supervised Unsupervised 0.5 0.6 0.7 0.8 0.9 1 Learning conditions Proportion Correct Massed Spaced Figure 5: Model selection and accuracy results. Left, model selection results as a function of presentation training conditions (massed and spaced). A greater ratio indicates more support for the one-category account. Error bars indicate the standard error from 100 simulations. See section 4.2. Right, comparison of supervised and unsupervised learning in terms of accuracy. See section 4.3. To assess the influence of supervision on learning, we compare performance between supervised learning (described in section (3.1)) with unsupervised learning (described in this section). To make the comparison, we assume that learners are provided with the same training data and are informed that the data are from two different categories, either with known category membership (supervised) or unknown category membership (unsupervised) for each training observation. Accuracy measured by discrimination between the two categories is compared in the right plot of figure (5). The model predicts higher accuracy given supervised than unsupervised learning. Furthermore, the model predicts a spacing effect for both types of learning, although the effect is reduced with unsupervised learning. 5 Conclusions In this paper, we develop a Bayesian sequential model for category learning by updating category representations over time based on two category parameters, the mean and the variance. Analytic updating rules are obtained by defining conjugate temporal priors to enable closed form solutions. A generic prior in the temporal updating stage is introduced to model the spacing effect. Parameter estimation and model selection can be performed on the basis of updating rules. The current work extends standard Kalman filtering, and is able to predict learning phenomena that have been observed for humans and other animals. In addition to explaining the spacing effect, our model predicts that subjects will become less certain about their knowledge of learned categories as time passes, see the increase in category variance in Figure 2. But our model is not standard Kalman filter (since the measurement variance is unknown), so we do not predict exponential decay. Instead, as shown in Equation 10, our model predicts the pattern of power-law forgetting that is fairly universal in human memory [14] For small number of observations, our model is extremely efficient because we can derive analytic solutions. For example, the analytic solutions for unsupervised learning requires only 0.2 seconds for six observations while numerical integration takes 18 minutes. However, our model will scale exponentially with the number of observations in unsupervised learning. Future work is to include a pruning strategy to keep the complexity practical. Acknowledgement This research was supported a grant from Air Force FA 9550-08-1-0489. 8 References [1] Kornell, N., & Bjork, R. A. (2008a). Learning concepts and categories: Is spacing the ”enemy of induction”? Psychological Science, 19, 585-592. [2] Bahrick, H.P., Bahrick, L.E., Bahrick, A.S., & Bahrick, P.E. (1993). Maintenance of foreign language vocabulary and the spacing effect. Psychological Science, 4, 316321. [3] Shea, J.B., & Morgan, R.L. (1979). Contextual interference effects on the acquisition, retention, and transfer of a motor skill. Journal of Experimental Psychology: Human Learning and Memory, 5, 179187. [4] Balleine, B. W. Espinet, A. & Gonzalez, F. (2005).Perceptual learning enhances retrospective revaluation of conditioned flavor preferences in rats. Journal of Experimental Psychology: Animal Behavior Processes, 31(3): 341-50. [5] Carew, T.J., Pinsker, H.M., & Kandel, E.R. (1972). Long-term habituation of a defensive withdrawal reflex in Aplysia. Science, 175, 451454. [6] Daw, N., Courville, A. C, & Dayan, P. (2007). Semi-rational Models of Conditioning: The Case of Trial Order. In M. Oaksford and N. Chater (Eds.). The probabilistic mind: Prospects for rational models of cognition. Oxford: Oxford University Press. [7] Dayan, P. & Kakade, S. (2000). Explaining away in weight space. In T. K. Leen et al., (Eds.), Advances in neural information processing systems (Vol. 13, pp. 451-457). Cambridge, MA: MIT Press. [8] Fried, L. S., & Holyoak, K. J. (1984). Induction of category distributions: A framework for classification learning. Journal of Experimental Psychology: Learning, Memory and Cognition, 10, 234-257. [9] Kalman, R. E. (1960). A new approach to linear filtering and prediction problems. Transactions of the ASME-Journal of Basic Engineering, 82:35-45. [10] Schubert, J., & Sidenbladh, H. (2005). Sequential clustering with particle filters: Extimating the number of clusters from data. 7th International Conference on Information Fusion (FUSION). [11] Ho, Y-C & Lee, R.C.K. (1964). A Bayesian appraoch to problems in stochastic estimation and control. IEEE Transactions on Automatic Control, 9, 333-339. [12] Honey, R. C., Bateson, P., & Horn, G. (1994). The role of stimulus comparison in perceptual learning: An investigation with the domestic chick. Quarterly Journal of Experimental Psychology: Comparative and Physiological Psychology, 47(B), 83103. [13] Kording, K. P., Tenenbaum, J. B., and Shadmehr, R. (2007). The dynamics of memory as a consequence of optimal adaptation to a changing body. Nature Neuroscience, 10:779-786. [14] Anderson, J. R. And Schooler, L. J. (1991). Reflections of the environment in memory. Psychological Science, 2, 395-408. 9
2009
36
3,784
An Infinite Factor Model Hierarchy Via a Noisy-Or Mechanism Aaron C. Courville, Douglas Eck and Yoshua Bengio Department of Computer Science and Operations Research University of Montr´eal Montr´eal, Qu´ebec, Canada {courvila,eckdoug,bengioy}@iro.umontreal.ca Abstract The Indian Buffet Process is a Bayesian nonparametric approach that models objects as arising from an infinite number of latent factors. Here we extend the latent factor model framework to two or more unbounded layers of latent factors. From a generative perspective, each layer defines a conditional factorial prior distribution over the binary latent variables of the layer below via a noisy-or mechanism. We explore the properties of the model with two empirical studies, one digit recognition task and one music tag data experiment. 1 Introduction The Indian Buffet Process (IBP) [5] is a Bayesian nonparametric approach that models objects as arising from an unbounded number of latent features. One of the main motivations for the IBP is the desire for a factorial representation of data, with each element of the data vector modelled independently, i.e. as a collection of factors rather than as monolithic wholes as assumed by other modeling paradigms such as mixture models. Consider music tag data collected through the internet service provider Last.fm. Users of the service label songs and artists with descriptive tags that collectively form a representation of an artist or song. These tags can then be used to organize playlists around certain themes, such as music from the 80’s. The top 8 tags for the popular band RADIOHEAD are: alternative, rock, alternative rock, indie, electronic, britpop, british, and indie rock. The tags point to various facets of the band, for example that they are based in Britain, that they make use of electronic music and that their style of music is alternative and/or rock. These facets or features are not mutually exclusive properties but represent some set of distinct aspects of the band. Modeling such data with an IBP allows us to capture the latent factors that give rise to the tags, including inferring the number of factors characterizing the data. However the IBP assumes these latent features are independent across object instances. Yet in many situations, a more compact and/or accurate description of the data could be obtained if we were prepared to consider dependencies between latent factors. Despite there being a wealth of distinct factors that collectively describe an artist, it is clear that the co-occurrence of some features is more likely than others. For example, factors associated with the tag alternative are more likely to co-occur with those associated with the tag indie than those associated with tag classical. The main contribution of this work is to present a method for extending infinite latent factor models to two or more unbounded layers of factors, with upper-layer factors defining a factorial prior distribution over the binary factors of the layer below. In this framework, the upper-layer factors express correlations between lower-layer factors via a noisy-or mechanism. Thus our model may be interpreted as a Bayesian nonparametric version of the noisy-or network [6, 8]. In specifying the model and inference scheme, we make use of the recent stick-breaking construction of the IBP [10]. 1 For simplicity of presentation, we focus on a two-layer hierarchy, though the method extends readily to higher-order cases. We show how the complete model is amenable to efficient inference via a Gibbs sampling procedure and compare performance of our hierarchical method with the standard IBP construction on both a digit modeling task, and a music genre-tagging task. 2 Latent Factor Modeling Consider a set of N objects or exemplars: x1:N = [x1, x2, . . . , xN]. We model the nth object with the distribution xn | zn,1:K, θ ∼F(zn,1:K, θ1:K), with model parameters θ1:K = [θk]K k=1 (where θk ∼H indep. ∀k) and feature variables zn,1:K = [znk]K k=1 which we take to be binary: znk ∈{0, 1}. We denote the presence of feature k in example n as znk = 1 and its absence as znk = 0. Features present in an object are said to be active while absent features are inactive. Collectively, the features form a typically sparse binary N × K feature matrix, which we denote as z1:N,1:K, or simply Z. For each feature k let µk be the prior probability that the feature is active. The collection of K probabilities: µ1:K, are assumed to be mutually independent, and distributed according to a Beta(α/K, 1) prior. Summarizing the full model, we have (indep.∀n, k): xn | zn,1:K, θ ∼F(zn,1:K, θ) znk | µk ∼Bernoulli(µk) µk | α ∼Beta ! α K , 1 " According to the standard development of the IBP, we can marginalize over variables µ1:K and take the limit K →∞to recover a distribution over an unbounded binary feature matrix Z. In the development of the inference scheme for our hierarchical model, we make use of an alternative characterization of the IBP: the IBP stick-breaking construction [10]. As with the stick-breaking construction of the Dirichlet process (DP), the IBP stick-breaking construction provides a direct characterization of the random latent feature probabilities via an unbounded sequence. Consider once again the finite latent factor model described above. Letting K →∞, Z now possesses an unbounded number of columns with a corresponding unbounded set of random probabilities [µ1, µ2, . . . ]. Re-arranged in decreasing order: µ(1) > µ(2) > . . . , these factor probabilities can be expressed recursively as: µ(k) = U(k)µ(k−1) = # (l) U(l), where U(k) i.i.d ∼Beta(α, 1). 3 A Hierarchy of Latent Features Via a Noisy-OR Mechanism In this section we extend the infinite latent features framework to incorporate interactions between multiple layers of unbounded features. We begin by defining a finite version of the model before considering the limiting process. We consider here the simplest hierarchical latent factor model consisting of two layers of binary latent features: an upper-layer binary latent feature matrix Y with elements ynj, and a lower-layer binary latent feature matrix Z with elements znk. The probability distribution over the elements ynj is defined as previously in the limit construction of the IBP: ynj | µj ∼Bernoulli(µj), with µj | αµ ∼Beta(αµ/J, 1). The lower binary variables znk are also defined as Bernoulli distributed random quantities: znk | yn,:, V:,k ∼Bernoulli(1 − $ j (1 −ynjVjk)) indep.∀n, k. (1) However, here the probability that znk = 1 is a function of the upper binary variables yn,: and the kth column of the weight matrix V , with probabilities Vjk ∈[0, 1] connecting ynj to znk. The crux of the model is how ynj interacts with znk via a noisy-or mechanism defined in Eq. (1). The binary ynj modulates the involvement of the Vjk terms in the product, which in turn modulates P(znk = 1 | yn,:, V:,k). The noisy-or mechanism interacts positively in the sense that changing an element ynj from inactive to active can only increase P(znk = 1 | yn:, V:k), or leave it unchanged in the case where Vjk = 0. We interpret the active yn,: to be possible causes of the activation of the individual znk, ∀k. Through the weight matrix V , every element of Yn,1:J is connected to every element of Zn,1:K, thus V is a random matrix of size J × K. In the case of finite J and K, an obvious choice of prior for V is: Vjk i.i.d ∼Beta(a, b), ∀j, k. However, looking ahead to the case where J →∞and K →∞, the prior over V will require some additional structure. Recently, [11] introduced the Hierarchical Beta Process (HBP) and elucidated the relationship between this and the Indian Buffet Process. We use a variant of the HBP to define a prior over V : νk ∼Beta(αν/K, 1) Vjk | νk ∼Beta(cνk, c(1 −νk) + 1) indep.∀k, j, (2) 2 xn znk ynj Vjk !k Nk Mj Kmd Jmd N AM AN H Ql i.i.d ∼ Beta(αµ, 1), µj = j$ l Ql Rl i.i.d ∼ Beta(αν, 1), νk = k $ l Rl Vjk ∼ Beta(cνk, c(1 −νk) + 1) ynj ∼ Bern(µj) znk ∼ Bern(1 − $ j (1 −ynjVjk)). Figure 1: Left: A graphical representation of the 2-layer hierarchy of infinite binary factor models. Right: Summary of the hierarchical infinite noisy-or factor model in the stick-breaking parametrization. where each column of V (indexed by k) is constrained to share a common prior. Structuring the prior this way allows us to maintain a well behaved prior over the Z matrix as we let K →∞, grouping the values of Vjk across j while E[νk] →0. However beyond the region of very small νk (0 < νk << 1), we would like the weights Vjk to vary more independently. Thus we modify the model of [11] to include the +1 term to the prior over Vjk (in Eq. (2)) and we limit c ≤1. Fig. 1 shows a graphical representation of the complete 2-layer hierarchical noisy-or factor model, as J →∞and K →∞. Finally, we augment the model with an additional random matrix A with multinomial elements Ank, assigning each instance of znk = 1 to an index j corresponding to the active upper-layer unit ynj responsible for causing the event. The probability that Ank = j is defined via a familiar stick-breaking scheme. By enforcing an (arbitrary) ordering over the indices j = [1, J], we can view the noisy-or mechanism defined in Eq. (1) as specifying, for each znk, an ordered series of binary trials (i.e. coin flips). For each znk, we proceed through the ordered set of elements, {Vjk, ynj}j=1,2,..., performing random trials. With probability yn,j∗Vj∗,k, trial j∗is deemed a “success” and we set znk = 1, Ank = j∗, and no further trials are conducted for {n, k, j > j∗}. Conversely, with probability (1 −ynj∗Vj∗k) the trial is deemed a “failure” and we move on to trial j∗+ 1. Since all trials j associated with inactive upper-layer features are failures with probability one (because ynj = 0), we need only consider the trials for which ynj = 1. If, for a given znk, all trials j for which ynj = 1 (active) are failures, then we set znk = 0 with probability one. The probability associated with the event znk = 0 is therefore given by the product of the failure probabilities for each of the J trials: P(znk = 0 | yn,:, V:,k) = #J j=1(1 −ynjVjk), and with P(znk = 1 | yn,:, V:,k) = 1 −P(znk = 0 | yn,:, V:,k), we arrive at the noisy-or mechanism given in Eq. (1). This process is similar to the sampling process associated with the Dirichlet process stick-breaking construction [7]. Indeed, the process described above specifies a stick-breaking construction of a generalized Dirichlet distribution [1] over the multinomial probabilities corresponding to the Ank. The generalized Dirichlet distribution defined in this way has the important property that it is conjugate to multinomial sampling. With the generative process specified as above, we can define the posterior distribution over the weights V given the assignment matrix A and the latent feature matrix Y . Let Mjk = %N n=1 I(Ank = j) be the number of times that the jth trial was a success for z:,k (i.e. the number of times ynj caused the activation of znk) and let Njk = %N n=1 ynjI(Ank > j), that is the number of times that the j-th trial was a failure for znk despite ynj being active. Finally, let us also denote the number of times y:,j is active: Nj = %N n=1 ynj. Given these quantities, the posterior distributions for the model parameters µj and Vjk are given by: µj | Y ∼ Beta(αµ/J + Nj, 1 + N −Nj) (3) Vjk | Y, A ∼ Beta(cνk + Mjk, c(1 −νk) + Njk + 1) (4) These conjugate relationships are exploited in the Gibbs sampling procedure described in Sect. 4. By integrating out Vjk, we can recover (up to a constant) the posterior distribution over νk: 3 p(νk | A:,k) ∝ναν/K−1 k J $ j=1 Γ(cνk + Mjk) Γ(cνk) Γ(c(1 −νk) + Njk + 1) Γ(c(1 −νk) + 1) (5) One property of the marginal likelihood is that wholly inactive elements of Y , which we denote as y:,j′ = 0, do not impact the likelihood as Nj′,k = 0, Mj′,k = 0. This becomes particularly important as we let J →∞. Having defined the finite model, it remains to take the limit as both K →∞and J →∞. Taking the limit of J →∞is relatively straightforward as the upper-layer factor model naturally tends to an IBP: Y ∼IBP, and its involvement in the remainder of the model is limited to the set of active elements of Y , which remains finite for finite datasets. In taking K →∞, the distribution over the unbounded νk converges to that of the IBP, while the conditional distribution over the noisy-or weights Vjk remain simple beta distributions given the corresponding νk (as in Eq. (4)). 4 Inference In this section, we describe an inference strategy to draw samples from the model posterior. The algorithm is based jointly on the blocked Gibbs sampling strategy for truncated Dirichlet distributions [7] and on the IBP semi-ordered slice sampler [10], which we employ at each layer of the hierarchy. Because both algorithms are based on the strategy of directly sampling an instantiation of the model parameters, their use together permits us to define an efficient extended blocked Gibbs sampler over the entire model without approximation. To facilitate our description of the semi-ordered slice sampler, we separate µ1:∞into two subsets: µ+ 1:J+ and µo 1:∞, where µ+ 1:J+ are the probabilities associated with the set of J+ active upper-layer factors Y + (those that appear at least once in the dataset, i.e. ∃i : y+ ij′ = 1, 1 ≤j′ ≤J+) and µo 1:∞ are associated with the unbounded set of inactive features Y o (those not appearing in the dataset). Similarly, we separate ν1:∞into ν+ 1:K+ and νo 1:∞, and Z into corresponding active Z+ and inactive Zo where K+ is the number of active lower-layer factors. 4.1 Semi-ordered slice sampling of the upper-layer IBP The IBP semi-ordered slice sampler maintains an unordered set of active y+ 1:N,1:J+ with corresponding µ+ 1:J+ and V1:J+,1:K, while exploiting the IBP stick-breaking construction to sample from the distribution of ordered inactive features, up to an adaptively chosen truncation level controlled by an auxiliary slice variable sy. Sample sy. The uniformly distributed auxiliary slice variables, sy controls the truncation level of the upper-layer IBP, where µ∗is defined as the smallest probability µ corresponding to an active feature: sy | Y, µ1:∞∼Uniform(0, µ∗), µ∗= min & 1, min 1≤j′≤J+ µ+ j′ ' . (6) As discussed in [10], the joint distribution is given by p(sy, µ1:∞, Y ) = p(Y, µ1:∞) × p(sy | Y, µ1:∞), where marginalizing over sy preserves the original distribution over Y and µ1:∞. However, given sy, the conditional distribution p(ynj′ = 1 | Z, sy, µ1:∞) = 0 for all n, j′ such that µj′ < sy. This is the crux of the slice sampling approach: Each sample sy adaptively truncates the model, with µ1:J > sy. Yet by marginalizing over sy, we can recover samples from the original non-truncated distribution p(Y, µ1:∞) without approximation. Sample µo 1:Jo. For the inactive features, we use adaptive rejection sampling (ARS) [4] to sequentially draw an ordered set of Jo posterior feature probabilities from the distribution: p(µo j | µo j−1, yo :,≥j = 0) ∝exp ( αµ N ) n=1 1 n(1 −µo j)n * · (µo j)αµ−1(1 −µo j)NI(0 ≤µo j ≤µo j−1), until µo Jo+1 < sy. The above expression arises from using the IBP stick-breaking construction to marginalize over the inactive elements of µ: [10]. For each of the Jo inactive features drawn, the 4 corresponding features yo 1:N,1:Jo are initialized to zero and the corresponding weight V o 1:Jo,1:K are sampled from their prior in Eq. (2). With the probabilities for both the active and a truncated set of inactive features sampled, the set of features are re-integrated into a set of J = J+ + Jo features Y = [y+ 1:N,1:J+, yo 1:N,1:Jo] with probabilities µ1:J = [µ+ 1:J+, µo 1:Jo], and corresponding weights V T = [(V + 1:J+,1:K)T , (V o 1:Jo,1:K)T ]. Sample Y . Given the upper-layer feature probabilities µ1:J, weight matrix V , and the lower-layer binary feature values znk, we update each ynj as follows: p(ynj = 1 | µj, zn,:, µ∗) ∝µj µ∗ K $ k=1 p(znk | ynj = 1, yn,¬j, V:,k) (7) The denominator µ∗is subject to change if changing ynj induces a change in µ∗(as defined in Eq. (6)); yn,¬j represents all elements yn,1:J except ynj The conditional probability of the lower-layer binary variables is given by: p(znk | yn,:, V:,k) = (1 −# j(1 −ynjVjk)). Sample µ+ 1:J+. Once again we separate Y and µ1:∞into a set of active features: Y + with probabilities µ+ 1:J+; and a set of inactive features Y o with µo 1:∞. The inactive set is discarded while the active set of µ+ 1:J+ are resampled from the posterior distribution: µ+ j | y+ :,j ∼Beta(Nj, 1+N −Nj). At this point we also separate the lower-layer factors into an active set of K+ factors Z+ with corresponding ν+ 1:K+, V + 1:J+,1:K+ and data likelihood parameters θ+; and a discarded inactive set. 4.2 Semi-ordered slice sampling of the lower-layer factor model Sampling the variables of the lower-layer IFM model proceeds analogously to the upper-layer IBP. However the presence of the hierarchical relationship between the νk and the V:,k (as defined in Eqs. (3) and (4)) does require some additional attention. We proceed by making use of the marginal distribution over the assignment probabilities to define a second auxiliary slice variable, sz. Sample sz. The auxiliary slice variable is sampled according to the following, where ν∗is defined as the smallest probability corresponding to an active feature: sz | Z, ν1:∞∼Uniform(0, ν∗), ν∗= min & 1, min 1≤k′≤K+ ν+ k′ ' . Sample νo 1:Ko. Given sz and Y , the random probabilities over the inactive lower-layer binary features, νo 1:∞, are sampled sequentially to draw a set of Ko feature probabilities, until νKo+1 < sz. The samples are drawn according to the distribution: p(νo k | νo k−1, Y +, zo :,≥k = 0) ∝ I (0 ≤νo k ≤νo k−1) (νo k)αν−1 J Y j=1 Γ(c(1 −νo k) + Nj) Γ(c(1 −νo k)) ! × exp αν J Y j=1 Γ(c) Γ(c + Nj) N1+···+NJ X i=0 wici i X l=1 1 l (1 −νo k)l ! · (8) Eq. (8) arises from the stick-breaking construction of the IBP and from the expression for P(zo :,>k = 0 | νo k, Y +) derived in the supplementary material [2]. Here we simply note that the wi are weights derived from the expansion of a product of terms involving unsigned Stirling numbers of the first kind. The distribution over the ordered inactive features is log-concave in log νk, and is therefore amenable to efficient sample via adaptive rejection sampling (as was done in sampling µo 1:Jo). Each of the Ko inactive features are initialized to zero for every data object, Zo = 0, while the corresponding V o and likelihood parameters θo are drawn from their priors. Once the ν1:Ko are drawn, both the active and inactive features of the lower-layer are re-integrated into the set of K = K+ + Ko features Z = [Z+, Zo] with probabilities ν1:K = [ν+ 1:K+, νo 1:Ko] and corresponding weight matrix V = [V + 1:J+,1:K+, V o 1:J+,1:Ko] and parameters θ = [θ+, θo]. 5 Sample Z. Given Y + and V we use Eq. (1) to specify the prior over z1:N,1:K∗. Then, conditional on this prior, the data X and parameters θ, we sample sequentially for each znk: p(znk | y+ n,:, V:,k, zn,¬k, θ, ν∗) = 1 ν∗ 0 @1 − J+ Y j=1 (1 −y+ njVjk) 1 A f(xn | zn,:, θ), where f(xn | zn,:, θ) is the likelihood function for the nth data object. Sample A. Given znk, y+ n,: and V:,k, we draw the multinomial variable Ank to assign responsibility, in the event zik = 1, to one of the upper-layer features y+ nj, p(Ank = j | znk = 1, y+ n,:, V:,k) = Vjk "j−1 Y i=1 (1 −y+ niVik) # , (9) and if y+ n,j′ = 0, ∀j′ > j†, then p(Ank = j† | znk = 1, y+ n,:, V:,k) = #j†−1 i=1 (1 −y+ niVik) to ensure normalization of the distribution. If znk = 0, then P(Ank = ∞) = 1. Sample V and ν+ 1:K+. Conditional on Y +, Z and A, the weights V are resampled from Eq. (4), following the blocked Gibbs sampling procedure of [7]. Given the assignments A, the posterior of ν+ k is given (up to a constant) by Eq. (5). This distribution is log concave in ν+ k , therefore we can once again use ARS to draw samples of the posterior of ν+ k , 1 ≤k ≤K+. 5 Experiments In this section, we present two experiments to highlight the properties and capabilities of our hierarchical infinite factor model. Our goal is to assess, in these two cases, the impact of including an additional modeling layer. To this end, and in each experiment, we compare our hierarchical model to the equivalent IBP model. In each case, hyperparameters are specified with respect to the IBP (using cross-validation by evaluating the likelihood of a holdout set) and held fixed for the hierarchical factor model. Finally all hyperparameters of the hierarchical model that were not marginalized out were held constant over all experiments, in particular c = 1 and αν = 1. 5.1 Experiment I: Digits In this experiment we took examples of images of hand-written digits from the MNIST dataset. Following [10], the dataset consisted of 1000 examples of images of the digit 3 where the handwritten digit images are first preprocessed by projecting onto the first 64 PCA components. To model MNIST digits, we augment both the IBP and the hierarchical model with a matrix G of the same size as Z and with i.i.d. zero mean and unit variance elements. Each data object, xn is modeled as: xn | Z, G, θ, σ2 x ∼N((zn,: ⊙gn,:)θ, σ2 XI) where ⊙is the Hadamard (element-wise) product. The inclusion of G introduces an additional step to our Gibbs sampling procedure, however the rest of the hierarchical infinity factor model is as described in Sect. 3. In order to assess the success of our hierarchical IFM in capturing higher-order factors present in the MNIST data, we consider a de-noising task. Random noise (std=0.5) was added to a post-processed test set and the models were evaluated in its ability to recover the noise-free version of a set of 500 examples not used in training. Fig. 2 (a) presents a comparison of the log likelihood of the (noise-free) test-set for both the hierarchical model and the IBP model. The figure shows that the 2-layer noisy-or model gives significantly more likelihood to the pre-corrupted data than the IBP, indicating that the noisy-or model was able to learn useful higher-order structure from MNIST data. One of the potential benefits of the style of model we propose here is that there is the opportunity for latent factors at one layer to share features at a lower layer. Fig. 2 illustrates the conditional mode of the random weight matrix V (conditional on a sample of the other variables) and shows that there is significant sharing of lowlevel features by the higher-layer factors. Fig. 2 (d)-(e) compare the features (sampled rows of the θ matrix) learned by both the IBP and by the hierarchical noisy-or factor model. Interestingly, the sampled features learned in the hierarchical model appear to be slightly more spatially localized and sparse. Fig. 2 (f)-(i) illustrates some of the marginals that arise from the Gibbs sampling inference process. Interestingly, the IBP model infers a greater number of latent factors that did the 2-layer 6 0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 x 104 −4.5 −4 −3.5 −3 −2.5 −2 −1.5 x 104 log likelihood MCMC iterations IBP 2−layer Noisy−Or model 10 20 30 40 50 60 70 80 90 100 5 10 15 20 25 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 120 140 160 180 200 0 1000 2000 3000 4000 5000 num. active features num. MCMC iterations 0 10 20 30 40 0 50 100 150 200 250 300 num. of objects num. active features 1 2 3 4 5 0 100 200 300 400 500 600 num. active features num. of objects 20 25 30 35 40 0 2000 4000 6000 8000 num. MCMC iterations num. active features IBP Hierarchical IBP Hierarchical F G H I A B C D E Figure 2: (a) The log likelihood of a de-noised testset. Corrupted (with 0.5-std Gaussian noise) versions of test examples were provided to the factor models and the likelihood of the noise-free testset was evaluated for both an IBP-based model as well as for the 2-layer noisy-or model. The two layer model shown substantial improvement in log likelihood. (b) Reconstruction of noisy examples. The top row shows the original values for a collection of digits. The second row shows their corrupted versions; while the third and fourth row show the reconstructions for the IBP-based model and the 2 layer noisy-or respectively. (c) A subset of the V matrix. The rows of V are indexed by j while the columns of V are indexed by k. The vertical striping pattern is evidence of significant sharing of lower-layer features among the upper-layer factors. (d)-(e) The most frequent 64 features (rows of the θ matrix) for (d) the IBP and for (e) the 2-layer infinite noisy-or factor model. (f) A comparison of the distributions of the number of active elements between the IBP and the noisy-or model. (g) A comparison of the number of active (lower-layer) factors possessed by an object between the IBP and the hierarchical model. (h) the distribution of upper-layer active factors and (i) the number of active factors found in an object. noisy-or model (at the first layer). However, the distribution over factors active for each data object is nearly identical. This suggests the possibility that the IBP is maintaining specialized factors that possibly represent a superposition of frequently co-occurring factors that the noisy-or model has captured more compactly. 5.2 Experiment II: Music Tags Returning to our motivating example from the introduction, we extracted tags and tag frequencies from the social music website Last.fm using the Audioscrobbler web service. The data is in the form of counts1 of tag assignment for each artist. Our goal in modeling this data is to reduce this often noisy collection of tags to a sparse representation for each artist. We will adopt a different approach to the standard Latent Dirichlet Allocation (LDA) document processing strategy of modeling the document – or in this case tag collection – as having been generated from a mixture of tag multinomials. We wish to distinguish between an artist that everyone agrees is both country and rock versus an artist that people are divided whether they are rock or country. To this end, we can again make use of the conjugate noisy-or model to model the count data in the form of binomial probabilities, i.e. to the model defined in Sect. 3, we add the random weights Wkt i.i.d ∼Beta(a, b), ∀k.t connecting Z to the data X via the distribution: Xnt ∼Binomial(1 − # k(1 −znkW), C) where C is the limit on the number of possible counts achievable. This would correspond to the number of people who ever contributed a tag to that artist. In the case of the Last.fm data C = 100. Maintaining conjugacy over W will require us to add an assignment parameter 1The publicly available data is normalized to maximum value 100. 7 80 100 120 140 160 0 200 400 600 800 num. active features MCMC iterations 0 2 4 6 8 0 50 100 150 200 250 300 num. active features num. objects 0 1 2 3 4 0 100 200 300 400 500 600 num. active features num. objects 20 30 40 50 60 70 0 500 1000 1500 2000 num. active features MCMC iterations A B C D Figure 3: The distribution of active features for the noisy-or model at the (a) lower-layer and (c) the upperlayer. The distribution over active features per data object for the (b) upper-layer and (d) lower-layer. Bnt whose role is analogous to Ank. With the model thus specified, we present a dataset of 1000 artists with a vocabulary size of 100 tags representing a total of 312134 counts. Fig. 3 shows the result running the Gibbs sampler for 10000 iterations. As the figure shows, both layers are quite sparse. Generally, most of the features learned in the first layer are dominated by one to three tags. Most features at the second layer cover a broader range of tags. The two most probable factors to emerge at the upper layer are associated with the tags (in order of probability): 1. electronic, electronica, chillout, ambient, experimental 2. pop, rock, 80s, dance, 90s The ability of the 2-layer noisy-or model to capture higher-order structure in the tag data was again assessed though a comparison to the standard IBP using the noisy-or observation model above. The model was also compared against a more standard latent factor model with the latent representation ηnk modeling the data through a generalized linear model: Xnt ∼Binomial(Logistic(ηn,:O:,t), C), where the function Logistic(.) is the logistic sigmoid link function and the latent representation ηnk ∼N(0, Ση) are normally distributed. In this case, inference is performed via a MetropolisHastings MCMC method that mixes readily. The test data was missing 90% of the tags and the models were evaluated by their success in imputing the missing data from the 10% that remained. Here again, the 2-Layer Noisy-Or model achieved superior performance, as measured by the marginal log likelihood on a hold out set of 600 artist-tag collections. Interestingly both sparse models – the IBP and the noisy-or model – dramatically out performed the generalized latent linear model. Method NLL Gen. latent linear model (Best Dim = 30) 8.7781e05 ± 0.02e05 IBP 5.638e05 ± 0.001e05 2-Layer Noisy-Or IFM 5.542e05 ± 0.001e05 6 Discussion We have defined a noisy-or mechanism that allows one infinite factor model to act as a prior for another infinite factor model. The model permits high-order structure to be captured in a factor model framework while maintaining an efficient sampling algorithm. The model presented here is similar in spirit to the hierarchical Beta process, [11] in the sense that both models define a hierarchy of unbounded latent factor models. However, while the hierarchical Beta process can be seen as a way to group objects in the data-set with similar features, our model provides a way to group features that frequently co-occur in the data-set. It is perhaps more similar in spirit to the work of [9] who also sought a means of associating latent factors in an IBP, however their work does not act directly on the unbounded binary factors as ours does. Recently the question of how to define a hierarchical factor model to induce correlations between lower-layer factors was addressed by [3] with their IBPIBP model. However, unlike our model, where the dependencies induced by the upper-layer factors via an noisy-or mechanism, the IBP-IBP model models correlations via an AND construct through the interaction of binary factors. Acknowledgments The authors acknowledge the support of NSERC and the Canada Research Chairs program. We also thank Last.fm for making the tag data publicly available and Paul Lamere for his help in processing the tag data. 8 References [1] Robert J. Connor and James E. Mosimann. Concepts of independence for proportions with a generalization of the Dirichlet distribution. Journal of the American Statistical Association, 64(325):194–206, 1969. [2] Aaron C. Courvile, Douglas Eck, and Yoshua Bengio. An infinite factor model hierarchy via a noisy-or mechanism: Supplemental material. Supplement to the NIPS paper. [3] Finale Doshi-Velez and Zoubin Ghahramni. Correlated nonparametric latent feature models. In Proceedings of the 25 th Conference on Uncertainty in Artificial Intelligence, 2009. [4] W. R. Gilks and P. Wild. Adaptive rejection sampling for Gibbs sampling. Applied Statistics, 41(2):337–348, 1992. [5] Tom Griffiths and Zoubin Ghahramani. Infinite latent feature models and the indian buffet process. In Advances in Neural Information Processing Systems 18, Cambridge, MA, 2006. MIT Press. [6] Max Henrion. Practical issues in constructing a bayes’ belief network. In Proceedings of the Proceedings of the Third Conference Annual Conference on Uncertainty in Artificial Intelligence (UAI-87), page 132?139, New York, NY, 1987. Elsevier Science. [7] Hemant Ishwaran and Lancelot F. James. Gibbs sampling methods for stick-breaking priors. American Statistical Association, 96(453):161–173, 2001. [8] Michael Kearns and Yishay Mansour. Exact inference of hidden structure from sample data in noisy-or networks. In Proceedings of the 14 th Conference on Uncertainty in Artificial Intelligence, pages 304–310, 1998. [9] Piyush Rai and Hal Daum´e III. The infinite hierarchical factor regression model. In Daphne Koller, Dale Schuurmans, Yoshua Bengio, and L´eon Bottou, editors, Advances in Neural Information Processing Systems 21, 2009. [10] Yee Whye Teh, Dilan G¨or¨ur, and Zoubin Ghahramani. Stick-breaking construction for the indian buffet process. In Proceedings of the Eleventh International Conference on Artifical Intelligence and Statistics (AISTAT 2007)., 2007. [11] Romain Thibaux and Michael I. Jordan. Hierarchical beta process and the indian buffet process. In Proceedings of the Eleventh International Conference on Artifical Intelligence and Statistics (AISTAT 2007)., 2007. 9
2009
37
3,785
Large Scale Nonparametric Bayesian Inference: Data Parallelisation in the Indian Buffet Process Finale Doshi-Velez∗ University of Cambridge Cambridge, CB21PZ, UK finale@alum.mit.edu David Knowles∗ University of Cambridge Cambridge, CB21PZ, UK dak33@cam.ac.uk Shakir Mohamed∗ University of Cambridge Cambridge, CB21PZ, UK sm694@cam.ac.uk Zoubin Ghahramani University of Cambridge Cambridge, CB21PZ, UK zoubin@eng.cam.ac.uk Abstract Nonparametric Bayesian models provide a framework for flexible probabilistic modelling of complex datasets. Unfortunately, the high-dimensional averages required for Bayesian methods can be slow, especially with the unbounded representations used by nonparametric models. We address the challenge of scaling Bayesian inference to the increasingly large datasets found in real-world applications. We focus on parallelisation of inference in the Indian Buffet Process (IBP), which allows data points to have an unbounded number of sparse latent features. Our novel MCMC sampler divides a large data set between multiple processors and uses message passing to compute the global likelihoods and posteriors. This algorithm, the first parallel inference scheme for IBP-based models, scales to datasets orders of magnitude larger than have previously been possible. 1 Introduction From information retrieval to recommender systems, from bioinformatics to financial market analysis, the amount of data available to researchers has exploded in recent years. While large, these datasets are often still sparse: For example, a biologist may have expression levels from thousands of genes from only a few people. A ratings database may contain millions of users and thousands of movies, but each user may have only rated a few movies. In such settings, Bayesian methods provide a robust approach to drawing inferences and making predictions from sparse information. At the heart of Bayesian methods is the idea that all unknown quantities should be averaged over when making predictions. Computing these high-dimensional average is thus a key challenge in scaling Bayesian inference to large datasets, especially for nonparametric models. Advances in multicore and distributed computing provide one answer to this challenge: if each processor can consider only a small part of the data, then inference in these large datasets might become more tractable. However, such data parallelisation of inference is nontrivial—while simple models might only require pooling a small number of sufficient statistics [1], inference in more complex models might require the frequent communication of complex, high-dimensional probability distributions between processors. Building on work on approximate asynchronous multicore inference for topic models [2], we develop a message passing framework for data-parallel Bayesian inference applicable to a variety of models, including matrix factorization and the Indian Buffet Process (IBP). ∗Authors contributed equally. 1 Nonparametric models are attractive for large datasets because they automatically adapt to the complexity of the data, relieving the researcher from the need to specify aspects of the model such as the number of latent factors. Much recent work in nonparametric Bayesian modelling has focused on the Chinese restaurant process (CRP), which is a discrete distribution that can be used to assign data points to an unbounded number of clusters. However, many real-world datasets have observations that may belong to multiple clusters—for example, a gene may have multiple functions; an image may contain multiple objects. The IBP [3] is a distribution over infinite sparse binary matrices that allows data points to be represented by an unbounded number of sparse latent features or factors. While the parallelisation method we present in this paper is applicable to a broad set of models, we focus on inference for the IBP because of its unique challenges and potential. Many serial procedures have been developed for inference in the IBP, including variants of Gibbs sampling [3, 4], which may be augmented with Metropolis split-merge proposals [5], slice sampling [6], particle filtering [7], and variational inference [8]. With the exception of the accelerated Gibbs sampler of [4], these methods have been applied to datasets with less than 1,000 observations. To achieve efficient paralellisation, we exploit an idea recently introduced in [4], which maintains a distribution over parameters while sampling. Coupled with a message passing scheme over processors, this idea enables computations for inference to be distributed over many processors with few losses in accuracy. We demonstrate our approach on a problem with 100,000 observations. The largest application of IBP inference to date, our work opens the use of the IBP and similar models to a variety of data-intensive applications. 2 Latent Feature Model The IBP can be used to define models in which each observation is associated with a set of latent factors or features. A binary feature-assignment matrix Z represents which observations possess which hidden features, where Znk = 1 if observation n has feature k and Znk = 0 otherwise. For example, the observations might be images and the hidden features could be possible objects in those images. Importantly, the IBP allows the set of such possible hidden features to be unbounded. To generate a sample from the IBP, we first imagine that the rows of Z (the observations) are customers and the columns of Z (the features) are dishes in an infinite buffet. The first customer takes the first Poisson(α) dishes. The following customers try previously sampled dishes with probability mk/n, where mk is the number of people who tried dish k before customer n. Each customer also takes Poisson(α/n) new dishes. The value Znk records if customer n tried dish k. This generative process allows an unbounded set of features but guarantees that a finite dataset will contain a finite number of features with probability one. The process is also exchangeable in that the order in which customers visit the buffet has no impact on the distribution of Z. Finally, if the effect of possessing a feature is independent of the feature index, the model is also exchangeable in the columns of Z. We associate with the feature assignment matrix Z, a feature matrix A with rows that parameterise the effect that possessing each feature has on the data. Given these matrices, we write the probability of the data as P(X|Z, A). Our work requires that P(A|X, Z) can be computed or approximated efficiently by an exponential family distribution. Specifically, we apply our techniques to both a fully-conjugate linear-Gaussian model and non-conjugate Bernoulli model. Linear Gaussian Model. We model an N ×D real-valued data matrix X as a product: X = ZA + ǫ, (1) where Z is the binary feature-assignment matrix and A is a K by D real-valued matrix with an independent Gaussian prior N(0, σ2 a) on each element (see cartoon in Figure 1(a)). Each element of the N by D noise matrix ǫ is independent with a N(0, σ2 n) distribution. Given Z and X, the posterior on the features A is Gaussian, given by mean and covariance µA =  ZT Z + σ2 x σ2a I −1 ZT X ΣA = σ2 x  ZT Z + σ2 x σ2a I −1 (2) Bernoulli Model. We use a leaky, noisy-or likelihood for each element of an N ×D matrix X: P(Xnd = 1|Z, A) = 1 −ǫ λ P k ZnkAkd. (3) 2 X Z A ... * D D ~ N N ... + ε K K (a) Representation of the linear-Gaussian model. The data X is generated from the product of the feature assignment matrix Z and feature matrix A. In the Bernoulli model, the product ZA adjusts the probability of X = 1 prior posterior statistics statistics posterior posterior statistics posterior statistics P3 P4 P2 P1 Root (b) Message passing process. Processors send sufficient statistics of the likelihood up to the root, which calculates and sends the (exact) posterior back to the processors. Figure 1: Diagrammatic representation of the model structure and the message passing process. Each element of the A matrix is binary with independent Bernoulli(pA) priors. The parameters ǫ and λ determine how “leaky” and how “noisy” the or-function is, respectively. Typical hyperparameter values are ǫ = 0.95 and λ = 0.2. The posterior P(A|X, Z) cannot be computed in closed form; however, a mean-field variational posterior in which we approximate P(A|X, Z) as product of independent Bernoulli variables QK,D k,d qkd(akd) can be readily derived. 3 Parallel Inference We describe both synchronous and asynchronous procedures for approximate, parallel inference in the IBP that combines MCMC with message passing. We first partition the data among the processors, using Xp to denote the subset of observations X assigned to processor p. We use Zp to denote the latent features associated with the data on processor p. In [4], the distribution P(A|X−n, Z−n) was used to derive an accelerated sampler for sampling Zn, where n indexes the nth observation and −n is the set of all observations except n. In our parallel inference approach, each processor p maintains a distribution P p(A|X−n, Z−n), a local approximation to P(A|X−n, Z−n). The distributions P p are updated via message passing between the processors. The inference alternates between three steps: • Message passing: processors communicate to compute the exact P(A|X, Z). • Gibbs sampling: processors sample a new set of Zp’s in parallel. • Hyperparameter sampling: a root processor resamples global hyperparameters The sampler is approximate because during Gibbs sampling, all processors resample elements of Z at the same time; their posteriors P p(A|X, Z) are no longer the true P(A|X, Z). Message Passing We use Bayes rule to factorise the posterior over features P(A|Z, X): P(A|Z, X) ∝P(A) Y p P(Xp|Zp, A) (4) If the prior P(A) and the likelihoods P(Xp|Zp, A) are conjugate exponential family models, then the sufficient statistics of P(A|Z, X) are the sum of the sufficient statistics of each term on the right side of equation (4). For example, the sufficient statistics in the linear-Gaussian model are means and covariances; in the Bernoulli model, they are counts of how often each element Akd equals one. The linear-Gaussian messages have size O(K2 +KD), and the Bernoulli messages O(KD), where K is the number of features. For nonparametric models such as the IBP, the number of features K grows as O(log N). This slow growth means that messages remain small, even for large datasets. The most straightforward way to compute the full posterior is to arrange processors in a tree architecture, as belief propagation is then exact. The message s from processor p to processor q is: sp→q = lp + X r∈N(p)\q sr→p 3 where N(p)\q are the processors attached to p besides q and lp are the sufficient statistics from processor p. A dummy neighbour containing the statistics of the prior is connected to (an arbitrarily designated) root processor. Also passed are the feature counts mp k = P n∈Xp Zp nk, the popularity of feature k within processor p. (See figure 1(b) for a cartoon.) Gibbs Sampling In general, Znk can be Gibbs-sampled using Bayes rule P(Znk|Z−nk, X) ∝P(Znk|Z−nk)P(X|Z). The probability P(Znk|Z−nk) depends on the size of the dataset N and the number of observations mk using feature k. At the beginning of the Gibbs sampling stage, each processor has the correct values of mk. We compute m−p k = mk −mp k, and, as the processor’s internal feature counts mp k are updated, approximate mk ≈m−p k + mp k. This approximation assumes m−p k stays fixed during the current stage (good for popular features). The collapsed likelihood P(X|Z) integrating out the feature values A is given by: P(X|Z) ∝ Z A P(Xn|Zn, A)P(A|Z−n, X−n)dA, where the partial posterior P(A|Z−n, X−n) ∝ P (A|Z,X) P (Xn|Zn,A). In conjugate models, P(A|Z−n, X−n) can be efficiently computed by subtracting observation n’s contribution to the sufficient statistics.1 For non-conjugate models, we can use an exponential family distribution Q(A) to approximate P(A|X, Z) during message passing. A draw A ∼Q−p(A) is then used to initialise an uncollapsed Gibbs sampler. The outputted samples of A are used to compute sufficient statistics for the likelihood P(X|Z). In both cases, new features are added as described in [3]. Hyperparameter Resampling The IBP concentration parameter α and hyperparameters of the likelihood can also be sampled during inference. Resampling α depends only on the total number of active features; thus it can easily be resampled at the root and propagated to the other processors. In the linear-Gaussian model, the posteriors on the noise and feature variances (starting from gamma priors) depend on various squared-errors, which can also be computed in a distributed fashion. For more general, non-conjugate models, resampling the hyperparameters requires two steps. In the first step, a hyperparameter value is proposed by the root and propagated to the processors. The processors each compute the likelihood of the current and proposed hyperparameter values and propagate this value back to root. The root evaluates a Metropolis step for the hyperparameters and propagates the decision back to the leaves. The two-step approach introduces a latency in the resampling but does not require any additional message passing rounds. Asynchronous Operation So far we have discussed message passing, Gibbs sampling, and hyperparameter resampling as if they occur in separate phases. In practice, these phases may occur asynchronously: between its Gibbs sweeps, each processor updates its feature posterior based on the most current messages it has received and sends likelihood messages to its parent. Likewise, the root continuously resamples hyperparameters and propagates the values down through the tree. While another layer of approximation, this asynchronous form of message passing allows faster processors to share information and perform more inference on their data instead of waiting for slower processors. Implementation Note When performing parallel inference in the IBP, a few factors need to be considered with care. Other parallel inference for nonparametric models, such as the HDP [2], simply matched features by their index, that is, assumed that the ith feature on processor p was also the ith feature on processor q. In the IBP, we find that this indiscriminate feature merging is often disastrous when adding or deleting features: if none of the observations in a particular processor are using a feature, we cannot simply delete that column of Z and shift the other features over—doing so destroys the alignment of features across processors. 1In the IBP, only the linear-Gaussian model exhibits this conjugate structure. However, many other matrix factorization models (such as PCA) often have this conjugate form. 4 4 Comparison to Exact Metropolis Because all Zp’s are sampled at once, the posteriors P p(A|X, Z) used by each processor in section 3 are no longer exact. Below we show how Metropolis–Hastings (MH) steps can make the parallel sampler exact, but introduce significant computational overheads both in computing the transition probabilities and in the message passing. We argue that trying to do exact inference is a poor use of computational resources (especially as any finite chain will not be exact); empirically, the approximate sampler behaves similarly to the MH sampler while finding higher likelihood regions in the data. Exact Parallel Metropolis Sampler. Ideally, we would simply add an MH accept/reject step after each stage of the approximate inference to make the sampler exact. Unfortunately, the approximate sampler makes several non-independent random choices in each stage of the inference, making the reverse proposal inconvenient to compute. We circumvent this issue by fixing the random seed, making the initial stage of the approximate sampler a deterministic function, and then add independent random noise to create a proposal distribution. This approach makes both the forward and reverse transition probabilities simple to compute. Formally, let ˆ Zp be the matrix output after a set of Gibbs sweeps on Zp. We use all the ˆ Zp’s to propose a new Z′ matrix. The acceptance probability of the proposal is min(1, P(X|Z′)P(Z′)Q(Z′ →Z) P(X|Z)P(Z)Q(Z →Z′) ), (5) where the likelihood terms P(X|Z) and P(Z) are readily computed in a distributed fashion. For the transition distribution Q, we note that if we set the random seed r, then the matrix ˆ Zp from the Gibbs sweeps in the processor is some deterministic function of the input matrix Zp. The proposal Zp′ is a (stochastic) noisy representation of ˆ Zp in which for example P(Zp′ nk = 1) = .99 if ˆZp nk = 1, P(Zp′ nk = 1) = .01 if ˆZp nk = 0 (6) where K should be at least the number of features in ˆ Zp. We set Zp′ nk = 0 for k > K. (See cartoon in figure 2.) To compute the backward probability, we take Zp′ and apply the same number of Gibbs sampling sweeps with the same random seed r. The resulting ˆZp′ is a deterministic function of Zp′. The backward probability Q(Zp′ →Zp) which is the probability of going from Zp′ to Zp using 6. While the transition probabilities can be computed in a distributed, asynchronous fashion, all of the processors must synchronise when deciding whether to accept the proposal. Experimental Comparison To compare the exact Metropolis and approximate inference techniques, we ran each inference type on 1000 block images of [3] on 5 simulated processors. Each test was repeated 25 times. For each of the 25 tests, we create a held out dataset by setting elements of the last 100 images as missing values. For the first 50 test images, we set all even numbered dimensions as the missing elements, and every odd numbered dimension as the missing values for the last 50 images. Each sampler was run for 10,000 iterations with 5 Gibbs sweeps per iteration; statistics were collected from the second half of the chain. To keep the probability of an acceptance reasonable, we allowed each processor to change only small parts of its Zp: the feature assignments Zn for 1, 5, or 10 data points each during each sweep. In table 1, we see that the approximate sampler runs about five times faster than the exact samplers while achieving comparable (or better) predictive likelihoods and reconstruction errors on heldout data. Both the acceptance rates and the predictive likelihoods fall as the exact sampler tries to take larger steps, suggesting that the difference between the approximate and exact sampler’s performance on predictive likelihood is due to poor mixing by the exact sampler. Figure 4 shows empirical CDFs for the number of features k , IBP concentration parameter α, the noise variance σ2 n, and the feature variance σ2 a. The approximate sampler (black) produces similar CDFs to the various exact Metropolis samplers (gray) for the variances; the concentration parameter is smaller, but the feature counts are similar to the single-processor case. 5 Zp Zp Zp’ Gibbs with fixed seed Random noise Figure 2: Cartoon of MH proposal Method Time (s) Test L2 Error Test Log Likelihood MH Accept Proportion MH, n = 1 717 0.0468 0.1098 0.1106 MH, n = 5 1075 0.0488 0.0893 0.0121 MH, n = 10 1486 0.0555 0.0196 0.0062 Approximate 179 0.0487 0.1292 Table 1: Evaluation of exact and approximate methods. 5 6 7 8 9 10 11 12 13 14 15 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 Empirical CDF for IBP Concentration Feature Count Cumilative Probability Single Processor Approximate Sampling Exact Sampling, various windows (a) Active feature count k 0.5 1 1.5 2 2.5 3 3.5 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 Empirical CDF for IBP Concentration IBP Concentration Parameter Cumilative Probability Single Processor Approximate Sampling Exact Sampling, various windows (b) IBP Concentration α 0.1 0.15 0.2 0.25 0.3 0.35 0.4 0.45 0.5 0.55 0.6 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 Empirical CDF for Noise Variance Noise Variance Cumilative Probability Single Processor Approximate Sampling Exact Sampling, various windows (c) Noise variance σ2 x 0.2 0.25 0.3 0.35 0.4 0.45 0.5 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 Empirical CDF for Feature Variance Feature Variance Cumilative Probability Single Processor Approximate Sampling Exact Sampling, various windows (d) Feature variance σ2 a Figure 3: Empirical CDFs: The solid black line is the approximate sampler; the three solid gray lines are the MH samplers with n equal to 1, 5, and 10 (lighter shades indicate larger n. The approximate sampler and the MH samplers for smaller n have similar CDFs; the n = 10 MH sampler’s differing CDF indicates it did not mix in 7500 iterations (reasonable since its acceptance rate was 0.0062). 5 Analysis of Mixing Properties We ran a series of experiments on 10,000 36-dimensional block images of [3] to study the effects of various sampler configurations on running time, performance, and mixing time properties of the sampler. 5000 elements of the data matrix were held-out as test data. Figure 4 shows test log-likelihoods using 1, 7, 31 and 127 parallel processors simulated in software, using 1000 outer iterations with 5 Gibbs inner iterations each. The parallel samplers have similar test likelihoods as the serial algorithm with significant savings in running time. The characteristic shape of the test likelihood, similar across all testing regimes, indicates how the features are learned. Initially, a large number of features are added, which provides improvements in the test likelihood. A refinement phase, in which excess features are pruned, provides further improvements. Figure 4 shows hairiness-index plots for each of the test cases after thinning and burn-in. The hairiness index, based on the method of CUSUM for monitoring MCMC convergence [9, 10], monitors how often the derivatives of sampler statistics—in our case, the number of features, the test likelihood, and α—change in sign; infrequent changes in sign indicate that the sampler may not be mixed. The outer bounds on the plots are the 95% confidence bounds. The index stays within the bounds suggesting that the chains are mixing. Finally, we considered the trade-off between mixing and running time as the number of outer iterations and inner Gibbs iterations are varied. Each combination of inner and outer iterations was set so that the total number of Gibbs sweeps through the data was 5000. Mixing efficiency was −1 0 1 2 3 4 5 −2 −1.5 −1 −0.5 0 0.5 Test loglikelihood Time (s) Test Loglikelihood for inner = 5 and outer = 1000 iterations 20 40 60 80100 0 0.5 1 Processors = 1 Hairiness Index 20 40 60 80 100 0 0.5 1 Processors = 7 Hairiness Index 20 40 60 80100 0 0.5 1 Processors = 31 Hairiness Index 20 40 60 80100 0 0.5 1 Processors = 127 Hairiness Index Proc = 1 Proc = 7 Proc = 31 Proc = 127 Figure 4: Change in likelihood for various numbers of processors over the simulation time. The corresponding hairiness index plots are shown on the left. 6 0 10 20 30 40 50 0.4 0.5 0.6 0.7 0.8 0.9 1 # Effective Samples per Outer Iter. #Inner Iterations Proc = 1 Proc = 7 Proc = 31 Proc = 127 1 7 31 127 10 1 10 2 10 3 10 4 10 5 # Processors Total Time (s) i = 50, o = 100 i = 20, o = 250 i = 10, o = 500 i = 5, o = 1000 i = 1, o = 5000 Figure 5: Effects of changing the number of inner iterations on: (a) The effective sample size (b) Total running time (Gibbs and Message passing). Table 2: Test log-likelihoods on real-world datasets for the serial, synchronous and asynchronous inference types. Dataset N D Description Serial p = 1 Synch p = 16 Async p = 16 AR Faces [11] 2600 1598 faces with lighting, accessories (real-valued) -4.74 -4.77 -4.84 Piano [12] 57931 161 STDFT of a piano recording (real-valued) -1.435 -1.182 -1.228 Flickr [13] 100000 1000 indicators of image tags (binary-valued) — -0.0584 measured via the effective number of samples per sample [10], which evaluates what fraction of the samples are independent (ideally, we would want all samples to be independent, but MCMC produces dependent chains). Running time for Gibbs sampling was taken to be the time required by the slowest processor (since all processors must synchronize before message passing); the total time reflected the Gibbs time and the message-passing time. As seen in figure 5, completing fewer inner Gibbs iterations per outer iteration results in faster mixing, which is sensible as the processors are communicating about their data more often. However, having fewer inner iterations requires more frequent message passing; as the number of processors becomes large, the cost of message passing becomes a limiting factor.2 6 Real-world Experiments We tested our parallel scheme on three real world datasets on a 16 node cluster using the Matlab Distributed Computing Engine, using 3 inner Gibbs iterations per outer iteration. The first dataset was a set of 2,600 frontal face images with 1,598 dimensions [11]. While not extremely large, the high-dimensionality of the dataset makes it challenging for other inference approaches. The piano dataset [12] consisted of 57,931 samples from a 161-dimensional short-time discrete Fourier transform of a piano piece. Finally, the binary-valued Flickr dataset [13] indicated whether each of 1000 popular keywords occurred in the tags of 100,000 images from Flickr. Performance was measured using test likelihoods and running time. Test likelihoods look only at held-out data and thus they allow us to ‘honestly’ evaluate the model’s fit. Table 2 summarises the data and shows that all approaches had similar test-likelihood performance. In the faces and music datasets, the Gibbs time per iteration improved almost linearly as the number of processors increased (figure 6). For example, we observed a 14x-speedup for p = 16 in the music dataset. Meanwhile, the message passing time remained small even with 16 processors—7% of the Gibbs time for the faces data and 0.1% of the Gibbs time for the music data. However, waiting for synchronisation became a significant factor in the synchronous sampler. Figure 6(c) compares the times for running inference serially, synchronously and asynchronously with 16 processors. The 2We believe part of the timing results may be an artifact, as the simulation overestimates the message passing time. In the actual parallel system (section 6), the cost of message passing was negligible. 7 1 2 4 8 16 0 20 40 60 80 100 120 number of processors mean time per outer iteration/s sampling waiting (a) Timing analysis for faces dataset 1 2 4 8 16 0 200 400 600 800 1000 1200 number of processors mean time per iteration/s sampling waiting (b) Timing analysis for music dataset 10 −2 10 0 10 2 10 4 −2.8 −2.6 −2.4 −2.2 −2 −1.8 x 10 7 time/s log joint serial P=1 synchronous P=16 asynchronous P=16 (c) Timing comparison for different approaches Figure 6: Bar charts comparing sampling time and waiting times for synchronous parallel inference. asynchronous inference is 1.64 times faster than the synchronous case, reducing the computational time from 11.8s per iteration to 7.2s. 7 Discussion and Conclusion As datasets grow, parallelisation is an increasingly attractive and important feature for doing inference. Not only does it allow multiple processors/multicore technologies to be leveraged for largescale analyses, but it also reduces the amount of data and associated structures that each processor needs to keep in memory. Existing work has focused both on general techniques to efficiently split variables across processors in undirected graphical models [14] and factor graphs [15] and specific models such as LDA [16, 17]. Our work falls in between: we leverage properties of a specific kind of parallelisation—data parallelisation—for a fairly broad class of models. Specifically, we describe a parallel inference procedure that allows nonparametric Bayesian models based on the Indian Buffet Process to be applied to large datasets. The IBP poses specific challenges to data parallelisation in that the dimensionality of the representation changes during inference and may be unbounded. Our contribution is an algorithm for data-parallelisation that leverages a compact representation of the feature posterior that approximately decorrelates the data stored on each processor, thus limiting the communication bandwidth between processors. While we focused on the IBP, the ideas presented here are applicable to a more general problems in unsupervised learning including bilinear models such as PCA, NMF, and ICA. Our sampler is approximate, and we show that in conjugate models, it behaves similarly to an exact sampler—but with much less computational overhead. However, as seen in the Bernoulli case, variational message passing for non-conjugate data doesn’t always produce good results if the approximating distribution is a poor match for the true feature posterior. Determining when variational message passing is successful is an interesting question for future work. Other interesting directions include approaches for dynamically optimising the network topology (for example, slower processors could be moved lower in the tree). Finally, we note that a middle ground between synchronous and asynchronous operations as we presented them might be a system that gives each processor a certain amount of time, instead of a certain number of iterations, to do Gibbs sweeps. Further study along these avenues should lead to even more efficient data-parallel Bayesian inference techniques. 8 References [1] C. Chu, S. Kim, Y. Lin, Y. Yu, G. Bradski, A. Ng, and K. Olukotun, “Map-reduce for machine learning on multicore,” in Advances in Neural Information Processing Systems, p. 281, MIT Press, 2007. [2] A. Asuncion, P. Smyth, and M. Welling, “Asynchronous distributed learning of topic models,” in Advances in Neural Information Processing Systems 21, 2008. [3] T. Griffiths and Z. Ghahramani, “Infinite latent feature models and the Indian buffet process,” in Advances in Neural Information Processing Systems, vol. 16, NIPS, 2006. [4] F. Doshi-Velez and Z. Ghahramani, “Accelerated inference for the Indian buffet process,” in International Conference on Machine Learning, 2009. [5] E. Meeds, Z. Ghahramani, R. Neal, and S. Roweis, “Modeling dyadic data with binary latent factors,” in Advances in Neural Information Processing Systems, vol. 19, pp. 977–984, 2007. [6] Y. W. Teh, D. G¨or¨ur, and Z. Ghahramani, “Stick-breaking construction for the Indian buffet process,” in Proceedings of the Intl. Conf. on Artificial Intelligence and Statistics, vol. 11, pp. 556–563, 2007. [7] F. Wood and T. L. Griffiths, “Particle filtering for nonparametric Bayesian matrix factorization,” in Advances in Neural Information Processing Systems, vol. 19, pp. 1513–1520, 2007. [8] F. Doshi-Velez, K. T. Miller, J. Van Gael, and Y. W. Teh, “Variational inference for the Indian buffet process,” in Proceedings of the Intl. Conf. on Artificial Intelligence and Statistics, vol. 12, pp. 137–144, 2009. [9] S. P. Brooks and G. O. Roberts, “Convergence assessment techniques for Markov Chain Monte Carlo,” Statistics and Computing, vol. 8, pp. 319–335, 1998. [10] C. R. Robert and G. Casella, Monte Carlo Statistical Methods. Springer, second ed., 2004. [11] A. M. Mart’inez and A. C. Kak, “PCA versus LDA,” IEEE Trans. Pattern Anal. Mach. Intelligence, vol. 23, pp. 228–233, 2001. [12] G. E. Poliner and D. P. W. Ellis, “A discriminative model for polyphonic piano transcription,” EURASIP J. Appl. Signal Process., vol. 2007, no. 1, pp. 154–154, 2007. [13] T. Kollar and N. Roy, “Utilizing object-object and object-scene context when planning to find things.,” in International Conference on Robotics and Automation, 2009. [14] C. G. Joseph Gonzalez, Yucheng Low, “Residual splash for optimally parallelizing belief propagation,” in Proceedings of the Twelfth International Conference on Artificial Intelligence and Statistics (D. van Dyk and M. Welling, eds.), vol. 5, pp. 177–184, JMLR, 2009. [15] D. Stern, R. Herbrich, and T. Graepel, “Matchbox: Large scale online Bayesian recommendations,” in 18th International World Wide Web Conference (WWW2009), April 2009. [16] R. Nallapati, W. Cohen, and J. Lafferty, “Parallelized variational EM for Latent Dirichlet Allocation: An experimental evaluation of speed and scalability,” in ICDMW ’07: Proceedings of the Seventh IEEE International Conference on Data Mining Workshops, (Washington, DC, USA), pp. 349–354, IEEE Computer Society, 2007. [17] D. Newman, A. Asuncion, P. Smyth, and M. Welling, “Distributed inference for Latent Dirichlet Allocation,” in Advances in Neural Information Processing Systems 20 (J. Platt, D. Koller, Y. Singer, and S. Roweis, eds.), pp. 1081–1088, Cambridge, MA: MIT Press, 2008. 9
2009
38
3,786
Matrix Completion from Power-Law Distributed Samples Raghu Meka, Prateek Jain, and Inderjit S. Dhillon Department of Computer Sciences University of Texas at Austin Austin, TX 78712 {raghu,pjain,inderjit}@cs.utexas.edu Abstract The low-rank matrix completion problem is a fundamental problem with many important applications. Recently, [4],[13] and [5] obtained the first non-trivial theoretical results for the problem assuming that the observed entries are sampled uniformly at random. Unfortunately, most real-world datasets do not satisfy this assumption, but instead exhibit power-law distributed samples. In this paper, we propose a graph theoretic approach to matrix completion that solves the problem for more realistic sampling models. Our method is simpler to analyze than previous methods with the analysis reducing to computing the threshold for complete cascades in random graphs, a problem of independent interest. By analyzing the graph theoretic problem, we show that our method achieves exact recovery when the observed entries are sampled from the Chung-Lu-Vu model, which can generate power-law distributed graphs. We also hypothesize that our algorithm solves the matrix completion problem from an optimal number of entries for the popular preferential attachment model and provide strong empirical evidence for the claim. Furthermore, our method is easy to implement and is substantially faster than existing methods. We demonstrate the effectiveness of our method on random instances where the low-rank matrix is sampled according to the prevalent random graph models for complex networks and present promising preliminary results on the Netflix challenge dataset. 1 Introduction Completing a matrix from a few given entries is a fundamental problem with many applications in machine learning, statistics, and compressed sensing. Since completion of arbitrary matrices is not a well-posed problem, it is often assumed that the underlying matrix comes from a restricted class. Here we address the matrix completion problem under the natural assumption that the underlying matrix is low-rank. Formally, for an unknown matrix M ∈Rm×n of rank at most k, given Ω⊆[m] × [n], PΩ(M)1 and k, the low-rank matrix completion problem is to find a matrix X ∈Rm×n such that rank(X) ≤k and PΩ(X) = PΩ(M). (1.1) Recently Candes and Recht [4], Keshavan et.al [13], Candes and Tao [5] obtained the first non-trivial guarantees for the above problem under a few additional assumptions on the matrix M and the set of known entries Ω. At a high level, the assumptions made in the above papers can be stated as follows. A1 M is incoherent, in the sense that the singular vectors of M are not correlated with the standard basis vectors. 1Throughout this paper PΩ: Rm×n →Rm×n will denote the projection of a matrix onto the pairs of indices in Ω: (PΩ(X))ij = Xij for (i, j) ∈Ωand (PΩ(X))ij = 0 otherwise. 1 A2 The observed entries are sampled uniformly at random. In this work we address some of the issues with assumption [A2]. For Ω⊆[m]×[n], let the sampling graph GΩ= (U, V, Ω) be the bipartite graph with vertices U = {u1, . . . , um}, V = {v1, . . . , vn} and edges given by the ordered pairs in Ω2. Then, assumption [A2] can be reformulated as follows: A3 The sampling graph GΩis an Erd˝os-R´enyi random graph3. A prominent feature of Erd˝os-R´enyi graphs is that the degrees of vertices are Poisson distributed and are sharply concentrated about their mean. The techniques of [4, 5], [13], as will be explained later, crucially rely on these properties of Erd˝os-R´enyi graphs. However, for most large real-world graphs such as the World Wide Web ([1]), the degree distribution deviates significantly from the Poisson distribution and has high variance. In particular, most large matrix-completion datasets such as the much publicized Netflix prize dataset and the Yahoo Music dataset exhibit power-law distributed degrees, i.e., the number of vertices of degree d is proportional to d−β for a constant β (Figure 1). In this paper, we overcome some of the shortcomings of assumption [A3] above by considering more realistic random graph models for the sampling graph GΩ. We propose a natural graph theoretic approach for matrix completion (referred to as ICMC for information cascading matrix completion) that we prove can handle sampling graphs with power-law distributed degrees. Our approach is motivated by the models for information cascading in social networks proposed by Kempe et al. [11, 12]. Moreover, the analysis of ICMC reduces to the problem of finding density thresholds for complete cascades in random graphs - a problem of independent interest. By analyzing the threshold for complete cascades in the random graph model of Chung, Lu & Vu [6] (CLV model), we show that ICMC solves the matrix completion problem for sampling graphs drawn from the CLV model. The bounds we obtain for matrix-completion on the CLV model are incomparable to the main results of [4, 5, 13]. The methods of the latter papers do not apply to models such as the CLV model that generate graphs with skewed degrees. On the other hand, for Erdos-Renyi graphs the density requirements for ICMC are stronger than those of the above papers. We also empirically investigate the threshold for complete cascading in other popular random graph models such as the preferential attachment model [1], the forest-fire model [17] and the affiliation networks model [16]. The empirical estimates we obtain for the threshold for complete cascading in the preferential attachment model strongly suggest that ICMC solves the exact matrix-completion problem from an optimal number of entries for sampling procedures with preferential attachment. Our experiments demonstrate that for sampling graphs drawn from more realistic models such as the preferential attachment, forest-fire and affiliation network models, ICMC outperforms - both in accuracy and time - the methods of [4, 5, 3, 13] by an order of magnitude. In summary, our main contributions are: • We formulate the sampling process in matrix completion as generating random graphs (GΩ) and demonstrate that the sampling assumption [A3] does not hold for real-world datasets. • We propose a novel graph theoretic approach to matrix completion (ICMC) that extensively uses the link structure of the sampling graph. We emphasize that previously none of the methods exploited the structure of the sampling graph. • We prove that our method solves the matrix completion problem exactly for sampling graphs generated from the CLV model which can generate power-law distributed graphs. • We empirically evaluate our method on more complex random graph models and on the Netflix Challenge dataset demonstrating the effectiveness of our method over those of [4, 5, 3, 13]. 2 Previous Work and Preliminaries The Netflix challenge has recently drawn much attention to the low-rank matrix completion problem. Most methods for matrix completion and the more general rank minimization problem with affine constraints are based on either relaxing the non-convex rank function to a convex function or assuming a factorization of the matrix and optimizing the resulting non-convex problem using alternating minimization and its variants [2, 15, 18]. 2We will often abuse notation and identify edges (ui, vj) with ordered pairs (i, j). 3We consider the Erd˝os-R´enyi model, where edges (ui, vj) ∈E independently with probability for p for (i, j) ∈[m] × [n] and p is the density parameter. 2 Until recently, most methods for rank minimization subject to affine constraints were heuristic in nature with few known rigorous guarantees. In a recent breakthrough, Recht et.al [20] extend the techniques of compressed sensing to rank minimization with affine constraints. However, the results of Recht et.al do not apply to the case of matrix completion as the constraints in matrix completion do not satisfy the restricted isoperimetry property they assume. Building on the work of Recht et al. [20], Candes and Recht [4] and Candes and Tao [5] showed that minimizing the trace-norm recovers the unknown low-rank matrix exactly under certain conditions. However, these approaches require the observed entries to be sampled uniformly at random and as suggested by our experiments, do not work well when the observed entries are not drawn uniformly. Independent of [4, 5], Keshavan et al. [13] also obtained similar results for matrix completion using different techniques that generalize the works of Friedman et al. [9], Feige and Ofek [8] on the spectrum of random graphs. However, the results of [13], crucially rely on the regularity of Erd˝osR´enyi graphs and do not extend to sampling graphs with skewed degree distributions even for rank one matrices. This is mainly because the results of Friedman et al. and Feige and Ofek on the spectral gap of Erd˝os-R´enyi graphs do not hold for graph models with skewed expected degrees (see [6, 19]). We also remark that several natural variants of the trimming phase of [8] and [13] did not improve the performance in our experiments. A similar observation was made in [19], [10] who address the problem of re-weighting the edges of graphs with skewed degrees in the context of LSA. 2.1 Random Graph Models We focus on four popular models of random graphs all of which can generate graphs with power-law distributed degrees. In contrast to the common descriptions of the models, we need to work with bipartite graphs; however, the models we consider generalize naturally to bipartite graphs. Due to space limitations we only give a (brief) description of the Chung et.al [6], and refer to the original papers for the preferential attachment [1], forest-fire [17] and affiliation networks [16] models. The CLV model [6] generates graphs with arbitrary expected degree sequences, p1, . . . , pm, q1, . . . , qn with p1 + . . . + pm = q1 + . . . + qn = w. In the model, a bipartite graph G = (U, V, E) with U = {u1, . . . , um}, V = {v1, . . . , vn} is generated by independently placing an edge between vertices ui, vj with probability piqj/w for all i ∈[m], j ∈[n]. We define the density of an instance of CLV model to be the expected average degree (p1 + . . . + pm)/(mn) = w/mn. The CLV model is more general than the standard Erd˝os-R´enyi model with the case pi = np, qi = mp corresponding to the standard Erd˝os-R´enyi model with density p for bipartite random graphs. Further, by choosing weights that are power-law distributed, the CLV model can generate graphs with power-law distributed degrees, a prominent feature of real-world graphs. 3 Matrix Completion from Information Cascading We now present our algorithm ICMC. Consider the following standard formulation of the low-rank matrix completion problem: Given k, Ω, PΩ(M) for a rank k matrix M, find X, Y such that PΩ(XY T ) = PΩ(M), X ∈Rm×k, Y ∈Rn×k. (3.1) Note that given X we can find Y and vice versa by solving a linear least squares regression problem. This observation is the basis for the popular alternate minimization heuristic and its variants which outperform most methods in practice. However, analyzing the performance of alternate minimization is a notoriously hard problem. Our algorithm can be seen as a more refined version of the alternate minimization heuristic that is more amenable to analysis. We assume that the target matrix M is non-degenerate in the following sense. Definition 3.1 A rank k matrix Z is non-degenerate if there exist X ∈Rm×k, Y ∈Rn×k, Z = XY T such that any k rows of X are linearly independent and any k rows of Y are linearly independent. Though reminiscent of the incoherence property used by Candes and Recht, Keshavan et al., nondegeneracy appears to be incomparable to the incoherence property used in the above works. Observe that a random low-rank matrix is almost surely non-degenerate. Our method progressively computes rows of X and Y so that Equation (3.1) is satisfied. Call a vertex ui ∈U as infected if the i’th row of X has been computed (the term infected is used to reflect 3 that infection spreads by contact as in an epidemic). Similarly, call a vertex vj ∈V as infected if the j’th row of Y has been computed. Suppose that at an intermediate iteration, vertices L ⊆U and R ⊆V are marked as infected. That is, the rows of X with indices in L and rows of Y with indices in R have been computed exactly. Now, for an uninfected j ∈[n], to compute the corresponding row of Y , yT j ∈Rk, we only need k independent linear equations. Thus, if M is non-degenerate, to compute yT j we only need k entries of the j’th column of M with row indices in L. Casting the condition in terms of the sampling graph GΩ, yT j can be computed and vertex vj ∈V be marked as infected if there are at least k edges from vj to infected vertices in L. Analogously, xT i can be computed and the vertex ui ∈U be marked as infected if there are at least k edges from ui to previously infected vertices R. Observe that M = XY T = XWW −1Y T , for any invertible matrix W ∈Rk×k. Thus for nondegenerate M, without loss of generality, a set of k rows of X can be fixed to be the k × k identity matrix Ik. This suggests the following cascading procedure for infecting vertices in GΩand progressively computing the rows of X, Y . Here L0 ⊆U with |L0| = k. ICMC(GΩ, PΩ(M), L0): 1 Start with initially infected sets L = L0 ⊆U, R = ∅. Set the k × k sub-matrix of X with rows in L0 to be Ik. 2 Repeat until convergence: (a) Mark as infected all uninfected vertices in V that have at least k edges to previously infected vertices L and add the newly infected vertices to R. (b) For each newly infected vertex vj ∈R, compute the j’th row of Y using the observed entries of M corresponding to edges from vj to L. (c) Mark as infected all uninfected vertices in U that have at least k edges to previously infected vertices R and add the newly infected vertices to L. (d) For each newly infected vertex ui ∈L, compute the i’th row of X using the observed entries of M corresponding to edges from ui to R 3 Output M ′ = XY T . We abstract the cascading procedure from above using the framework of Kempe et al. [11] for information cascades in social networks. Let G = (W, E) be an undirected graph and fix A ⊆W, k > 0. Define σG,k(A, 0) = A and for t > 0 define σG,k(A, t + 1) inductively by σG,k(A, t + 1) = σG,k(A, t) ∪{u ∈W : u has at least k edges to σG,k(A, t) }. Definition 3.2 The influence of a set A ⊆W, σG,k(A), is the number of vertices infected by the cascading process upon termination when starting at A. That is, σG,k(A) = | ∪t σG,k(A, t)|. We say A is completely cascading of order k if σG,k(A) = |W|. We remark that using a variant of the standard depth-first search algorithm, the cascading process above can be computed in linear time for any set A. From the discussion preceding ICMC it follows that ICMC recovers M exactly if the cascading process starting at L0 infects all vertices of GΩand we get the following theorem. Theorem 3.1 Let M be a non-degenerate matrix of rank k. Then, given GΩ= (U, V, Ω), PΩ(M) and L0 ⊆U with |L0| = k, ICMC(GΩ, PΩ(M), L0) recovers the matrix M exactly if L0 is a completely cascading set of order k in GΩ. Thus, we have reduced the matrix-completion problem to the graph-theoretic problem of finding a completely cascading set (if it exists) in a graph. A more general case of the problem – finding a set of vertices that maximize influence, was studied by Kempe et al. [11] for more general cascading processes. They show the general problem of maximizing influence to be NP-hard and give approximation algorithms for several classes of instances. However, it appears that for most reasonable random graph models, the highest degree vertices have large influence with high probability. In the following we investigate completely cascading sets in random graphs and show that for CLV graphs, the k highest degree vertices form a completely cascading set with high probability. 4 4 Information Cascading in Random Graphs We now show that for sufficiently dense CLV graphs and fixed k, the k highest degree vertices form a completely cascading set with high probability. Theorem 4.1 For every γ > 0, there exists a constant c(γ) such that the following holds. Consider an instance of the CLV model given by weights p1, . . . , pm, q1, . . . , qn with density p and min(pi, qj) ≥c(γ)k log n/pk. Then, for G = (U, V, E) generated from the model, the k highest degree vertices of U form a completely cascading set of order k with probability at least 1 −n−γ. Proof sketch We will show that the highest weight vertices L0 = {u1, . . . , uk} form a completely cascading set with high probability; the theorem follows from the above statement and the observation that the highest degree vertices of G will almost surely correspond to vertices with large weights in the model; we omit these details for lack of space. Let w = P i pi = P j qj = mnp and m ≤n. Fix a vertex ui /∈L0 and consider an arbitrary vertex vj ∈V . Let P i j be the indicator variable that is 1 if (ui, vj) ∈E and vj is connected to all vertices of L0. Note that vertex ui will be infected after two rounds by the cascading process starting at L0 if P j P i j ≥k. Now, Pr[P i j = 1] = (piqj/w) Q 1≤l≤k(plqj/w) and E[P i 1 + . . . + P i n] = n X j=1 piqj w Y l≤k plqj w = pi wk+1 · ( Y 1≤l≤k pl) · n X j=1 qk+1 j . (4.1) Observe that P i pi = w ≤nk + pk(m −k). Thus, pk ≥(w −nk)/(m −k). Now, using the power-mean inequality we get, qk+1 1 + qk+1 2 + . . . + qk+1 n ≥n µq1 + . . . + qn n ¶k+1 = n · ³w n ´k+1 , (4.2) with equality occurring only if qj = w/n for all j. From Equations (4.1), (4.2) we have E[P i 1 + . . . + P i n] ≥pi · µw −nk m −k ¶k · 1 nk = pi · µ 1 −nk w ¶k · µ 1 −k m ¶−k · ³ w mn ´k . (4.3) It is easy to check that under our assumptions, w ≥nk2 and m ≥k2. Thus, (1 −nk/w)k ≥1/e and (1 −k/m)−k ≥1/2e. From Equation (4.3) and our assumption pi ≥c(γ)k log n/pk, we get E[P i 1 + . . . + P i n] ≥c(γ)k log n/4e2. Now, since the indicator variables P i 1, . . . , P i n are independent of each other, using the above lower bound for the expectation of their sum and Chernoff bounds we get Pr[P i 1 + . . . + P i n ≤k] ≤ exp(−Ω(c(γ) log n)). Thus, for a sufficiently large constant c(γ), the probability that the vertex ui is uninfected after two rounds Pr[P1 + . . . + Pn ≤k] ≤1/2mγ+1. By taking a union bound over all vertices uk+1, . . . , um, the probability that there is an uninfected vertex in the left partition after two steps of cascading starting from L0 is at most 1/2mγ. The theorem now follows by observing that if the left partition is completely infected, for a suitably large constant c(γ), all vertices in the right will be infected with probability at least 1 −1/2mγ as qj ≥c(γ)k log n.□ Combining the above with Theorem 3.1 we obtain exact matrix-completion for sampling graphs drawn from the CLV model. Theorem 4.2 Let M be a non-degenerate matrix of rank k. Then, for sampling graphs GΩgenerated from a CLV model satisfying the conditions of Theorem 4.1, ICMC recovers the matrix M exactly with high probability. Remark: The above results show exact-recovery for CLV graphs with densities up to n−1/k = o(1). As mentioned in the introduction, the above result is incomparable to the main results of [4, 5], [13]. The main bottleneck for the density requirements in the proof of Theorem 4.1 is Equation (4.2) relating P j qk+1 j to (P j qj)k+1, where we used the power-mean inequality. However, when the 5 expected degrees qj are skewed, say with a power-law distribution, it should be possible to obtain much better bounds than those of Equation (4.2), hence also improving the density requirements. Thus, in a sense the Erd˝os-R´enyi graphs are the worst-case examples for our analysis. Our empirical simulations also suggest that completely cascading sets are more likely to exist in random graph models with power-law distributed expected degrees as compared to Erd˝os-R´enyi graphs. Intuitively, this is because of the following reasons. • In graphs with power-law distributed degrees, the high degree vertices have much higher degrees than the average degree of the graph. So, infecting the highest degree vertices is more likely to infect more vertices in the first step. • More importantly, as observed in the seminal work of Kleinberg [14] in most real-world graphs there are a small number of vertices (hubs) that have much higher connectivity than most vertices. Thus, infecting the hubs is likely to infect a large fraction of vertices. Thus, we expect ICMC to perform better on models that are closer to real-world graphs and have power-law distributed degrees. In particular, as strongly supported by experiments (see Figure 3), we hypothesize that ICMC solves exact matrix completion from an almost optimal number of entries for sampling graphs drawn from the preferential attachment model. Conjecture 4.3 There exists a universal constant C such that for all k ≥1, k1, k2 ≥Ck the following holds. For G = (U, V, E) generated from the preferential attachment model with parameters m, n, k1, k2, the k highest degree vertices of U form a completely cascading set of order k with high probability. If true, the above combined with Theorem 3.1 would imply the following. Conjecture 4.4 Let M be a non-degenerate matrix of rank k. Then, for sampling graphs GΩgenerated from a PA model with parameters k1, k2 ≥Ck, ICMC recovers the matrix M exactly with high probability. Remark: To solve the matrix completion problem we need to sample at least (m + n)k entries. Thus, the bounds above are optimal up to a constant factor. Moreover, the bounds above are stronger than those obtainable - even information theoretically - for Erd˝os-R´enyi graphs, as for Erd˝os-R´enyi graphs we need to sample Ω(n log n) entries even for k = 1. 5 Experimental Results We first demonstrate that for many real-world matrix completion datasets, the observed entries are far from being sampled uniformly with the sampling graph having power-law distributed degrees. We then use various random graph models to compare our method against the trace-norm based singular value thresholding algorithm of [3], the spectral matrix completion algorithm (SMC) of [13] and the regularized alternating least squares minimization (ALS) heuristic. Finally, we present empirical results on the Netflix challenge dataset. For comparing with SVT and SMC, we use the code provided by the respective authors; while we use our own implementation for ALS. Below we provide a few implementation details for our algorithm ICMC. Implementation Details Consider step 2(b) of our algorithm ICMC. Let Lj be the set of vertices in L that have an edge to vj, Lk j be any size k subset of Lj, and let X(Lk j , :) be the sub-matrix of X containing rows corresponding to vertices in Lk j . If the underlying matrix is indeed low-rank and there is no noise in the observed entries, then for a newly infected vertex vj, the corresponding row of Y , yT j , can be computed by solving the following linear system of equations: M(Lk j , j) = X(Lk j , :)yj. To account for noise in measurements, we compute yj by solving the following regularized least squares problem: yj = argminy ∥M(Lj, j)−X(Lj, :)y∥2 2+λ∥y∥2 2, where λ is a regularization parameter. Similarly, we compute xT i by solving: xi = argminx ∥M(i, Ri)T −Y (Ri, :)x∥2 2 + λ∥x∥2 2. Note that if ICMC fails to infect all the vertices, i.e. L ⊊U or R ⊊V , then rows of X and Y will not be computed for vertices in U\L and V \R. Let X = [XL, X˜L], where XL is the set of computed rows of X (for vertices in L) and X˜L denotes the remaining rows of X. Similarly, let Y = [YR, Y ˜ R]. We estimate X˜L and Y ˜ R using an alternating least squares based heuristic that solves the following: min X ˜ L,Y ˜ R ¯¯¯¯ ¯¯¯¯PΩ µ M − · XL X˜L ¸ [Y T R Y T ˜ R ] ¶¯¯¯¯ ¯¯¯¯ 2 F + µ∥X˜L∥2 F + µ∥Y ˜ R∥2 F , 6 10 4 10 5 10 −15 10 −10 10 −5 x (Number of Users) Pr(X≥ x) Netflix Dataset (Movies) Empirical Distribution Poisson Distribution Power−law Distribution 10 3 10 4 10 −10 10 0 x (Number of movies) Pr(X≥ x) Netflix Dataset (Users) Empirical distribution Poisson distribution Power−law distribution 10 4 10 5 10 −10 x (Number of users) Pr(X≥ x) Yahoo Music Dataset (Artists) Empirical Distribution Poisson Distribution Power−law Distribution 10 3 10 4 10 −15 10 −10 10 −5 x (Number of artists) Pr(X≥ x) Yahoo Music Dataset (Users) Empirical Distribution Poisson Distribution Power−law Distribution (a) (b) (c) (d) Figure 1: Cumulative degree distribution of (a) movies, (b) users (Netflix dataset) and (c) artists, (d) users (Yahoo Music dataset). Note that degree distributions in all the four cases closely follow power-law distribution and deviate heavily from Poisson-distribution, which is assumed by SVT [3] and SMC [13]. 500 1000 1500 2000 0 0.5 1 1.5 n (Size of Matrix) RMSE Erdos−Renyi Model ICMC ALS SVT SMC 0 500 1000 1500 2000 0 0.5 1 1.5 2 2.5 n (Size of Matrix) RMSE Chung−Lu−Vu Model ICMC ALS SVT SMC 500 1000 1500 2000 0 2 4 6 n (Size of Matrix) RMSE PA Model ICMC ALS SVT SMC 500 1000 1500 2000 0 1 2 3 n (Size of Matrix) RMSE Forest−Fire Model ICMC ALS SVT SMC Figure 2: Results on synthetic datasets for fixed sampling density with sampling graph coming from different Graph Models: (a) Erd˝os-R´enyi model, (b) Chung-Lu-Vu model, (c) Preferential attachment model, and (d) Forest-fire model. Note that for the three power-law distribution generating models our method (ICMC) achieves considerably lower RMSE than the existing method. (a) Erd˝os-R´enyi Graphs (b) Chung-Lu-Vu Graphs n/Method SMC SVT ALS ICMC 500 45.51 8.88 1.09 1.28 1000 93.85 17.07 2.39 3.30 1500 214.65 38.81 4.85 6.28 2000 343.76 59.88 7.20 9.89 n/Method SMC SVT ALS ICMC 500 35.32 14.69 1.24 0.49 1000 144.19 17.55 2.24 2.02 1500 443.48 30.99 3.89 3.91 2000 836.99 46.69 5.67 5.50 (c) Preferential Attachment Graphs (d)Forest-fire Graphs n/Method SMC SVT ALS ICMC 500 15.05 14.40 3.97 1.94 1000 67.96 16.49 5.06 2.01 1500 178.35 24.48 9.83 3.65 2000 417.54 32.06 15.07 7.46 n/Method SMC SVT ALS ICMC 500 22.63 5.53 0.57 0.39 1000 85.26 11.32 1.75 1.23 1500 186.81 21.39 3.30 2.99 2000 350.98 27.37 4.84 5.06 Table 1: Time required (in seconds) by various methods on synthetic datasets for fixed sampling density with sampling graph coming from different Graph Models: (a) Erd˝os-R´enyi model, (b) Chung-Lu-Vu model, (c) Preferential attachment model, and (d) Forest-fire model. Note that our method (ICMC) is significantly faster than SVT and SMC, and has similar run-time to that of ALS. where µ ≥0 is the regularization parameter. Sampling distribution in Netflix and Yahoo Music Datasets The Netflix challenge dataset contains the incomplete user-movie ratings matrix while the Yahoo Music dataset contains the incomplete user-artist ratings matrix. For both datasets we form the corresponding bipartite sampling graphs and plot the left (users) and right (movies/artists) cumulative degree distributions of the bipartite sampling graphs. Figure 1 shows the cumulative degree distributions of the bipartite sampling graphs, the best powerlaw fit computed using the code provided by Clauset et.al [7] and the best Poisson distribution fit. The figure clearly shows that the sampling graphs for the Netflix and Yahoo Music datasets are far from regular as assumed in [4],[5],[13] and have power-law distributed degrees. Experiments using Random Graph Models To compare various methods, we first generate random low-rank matrices X ∈Rn×n for varying n, and sample from the generated matrices using Erd˝os-R´enyi, CLV, PA and forest-fire random graph models. We omit the results for the affiliation networks model from this paper due to lack of space; we observed similar trends on the affiliation networks model. 7 10 −2 10 −1 10 0 10 −2 10 0 p (Sampling Density) Infected Rows/Columns Sampling Density Threshold Erdos−Renyi Chung−Lu Pref. Attachment 10 20 30 40 50 0 100 200 300 k (Rank of the Matrix) m (Number of edges) Preferential Attachment Model (m vs k) COMBMC m=Ck+C0 k Fraction of infected RMSE rows & columns 5 0.98 0.9603 10 0.95 0.9544 20 0.87 0.9437 25 .84 0.9416 30 0.46 × 10−5 0.9602 Figure 3: Left: Fraction of infected nodes as edge density increases. Note the existence of a clear threshold. The threshold is quite small for CLV and PA suggesting good performance of ICMC for these models. Middle: Threshold for parameters k1, k2 (the number of edges per node) in PA as k increases. The threshold varies linearly with k supporting Conjecture 4.3. Right: Fraction of infected rows and columns using ICMC for the Netflix challenge dataset. For each random graph model we compare the relative mean square error (RMSE) on the unknown entries achieved by our method ICMC against several existing methods. We also compare the total time taken by each of the methods. All results represent the average over 20 runs. Figure 2 compares the RMSE achieved by ICMC to that of SVT, SMC and ALS when rank k is fixed to be 10, sampling density p = 0.1, and the sampling graphs are generated from the four random graph models. Note that for the more-realistic CLV, PA, forest-fire three models ICMC outperforms both SVT and SMC significantly and performs noticeably better than ALS. Table 1 compares the computational time taken by each of the methods. The table shows that for all three models, ICMC is faster than SVT and SMC by an order of magnitude and is also competitive to ALS. Note that the performance of our method for Erdos-Renyi graphs (Figure 2 (a)) is poor, with other methods achieving low RMSE. This is expected as the Erdos-Renyi graphs are in a sense the worst-case examples for ICMC as explained in Section 4. Threshold for Complete Cascading Here we investigate the threshold for complete cascading in the random graph models. Besides being interesting on its own, the existence of completely cascading sets is closely tied to the success of ICMC by Theorem 3.1. Figure 3 shows the fraction of vertices infected by the cascading process starting from the k highest degree vertices for graphs generated from the random graph models as the edge density increases. The left plot of Figure 3 shows the existence of a clear threshold for the density p, beyond which the fraction of infected vertices is almost surely one. Note that the threshold is quite small for the CLV, PA and forest-fire models, suggesting good performance of ICMC on these models. As was explained in Section 4, the threshold is bigger for the Erd˝os-R´enyi graph model. The right plot of Figure 3 shows the threshold value (the minimum value above which the infected fraction is almost surely one) for k1, k2 as a function of k in the PA model. The plot shows that the threshold is of the form Ck for a universal constant C, strongly supporting Conjectures 4.3, 4.4. Netflix Challenge Dataset Finally, we evaluate our method on the Netflix Challenge dataset which contains an incomplete matrix with about 100 million ratings given by 480,189 users for 17,770 movies. The rightmost table in Figure 3 shows the fraction of rows and columns infected by ICMC on the dataset for several values of the rank parameter k. Note that even for a reasonably high rank of 25, ICMC infects a high percentage (84%) of rows and columns. Also, for rank 30 the fraction of infected rows and columns drops to almost zero, suggesting that the sampling density of the matrix is below the sampling threshold for rank 30. For rank k = 20, the RMSE incurred over the probe set (provided by Netflix) is 0.9437 which is comparable to the RMSE=0.9404 achieved by the regularized Alternating Least Squares method. More importantly, the time required by our method is 1.59 × 103 seconds compared to 6.15 × 104 seconds required by ALS. We remark that noise (or higher rank of the underlying matrix) can offset our method leading to somewhat inferior results. In such a case, our method can be used for a good initialization of the ALS method and other state-of-the-art collaborative filtering methods to achieve better RMSE. 8 References [1] Albert-Laszlo Barabasi and Reka Albert. Emergence of scaling in random networks. Science, 286:509, 1999. [2] Matthew Brand. Fast online svd revisions for lightweight recommender systems. In SDM, 2003. [3] Jian-Feng Cai, Emmanuel J. Candes, and Zuowei Shen. A singular value thresholding algorithm for matrix completion, 2008. [4] Emmanuel J. Cand`es and Benjamin Recht. Exact matrix completion via convex optimization. CoRR, abs/0805.4471, 2008. [5] Emmanuel J. Cand`es and Terence Tao. The power of convex relaxation: Near-optimal matrix completion. CoRR, abs/0903.1476, 2009. [6] Fan R. K. Chung, Linyuan Lu, and Van H. Vu. The spectra of random graphs with given expected degrees. Internet Mathematics, 1(3), 2003. [7] A. Clauset, C.R. Shalizi, and M.E.J. Newman. Power-law distributions in empirical data. SIAM Review, page to appear, 2009. [8] Uriel Feige and Eran Ofek. Spectral techniques applied to sparse random graphs. Random Struct. Algorithms, 27(2):251–275, 2005. [9] Joel Friedman, Jeff Kahn, and Endre Szemer´edi. On the second eigenvalue in random regular graphs. In STOC, pages 587–598, 1989. [10] Christos Gkantsidis, Milena Mihail, and Ellen W. Zegura. Spectral analysis of internet topologies. In INFOCOM, 2003. [11] David Kempe, Jon M. Kleinberg, and ´Eva Tardos. Maximizing the spread of influence through a social network. In KDD, pages 137–146, 2003. [12] David Kempe, Jon M. Kleinberg, and ´Eva Tardos. Influential nodes in a diffusion model for social networks. In ICALP, pages 1127–1138, 2005. [13] Raghunandan H. Keshavan, Sewoong Oh, and Andrea Montanari. Matrix completion from a few entries. CoRR, abs/0901.3150, 2009. [14] Jon M. Kleinberg. Hubs, authorities, and communities. ACM Comput. Surv., 31(4es):5, 1999. [15] Yehuda Koren. Factorization meets the neighborhood: a multifaceted collaborative filtering model. In KDD, pages 426–434, 2008. [16] Silvio Lattanazi and D. Sivakumar. Affiliation networks. In STOC, 2009. [17] Jure Leskovec, Jon M. Kleinberg, and Christos Faloutsos. Graph evolution: Densification and shrinking diameters. TKDD, 1(1), 2007. [18] Yehuda Koren M. Bell. Scalable collaborative filtering with jointly derived neighborhood interpolation weights. In ICDM, pages 43–52, 2007. [19] Milena Mihail and Christos H. Papadimitriou. On the eigenvalue power law. In RANDOM, pages 254– 262, 2002. [20] Benjamin Recht, Maryam Fazel, and Pablo A. Parrilo. Guaranteed minimum-rank solutions of linear matrix equations via nuclear norm minimization, 2007. 9
2009
39
3,787
White Functionals for Anomaly Detection in Dynamical Systems Marco Cuturi ORFE - Princeton University mcuturi@princeton.edu Jean-Philippe Vert Mines ParisTech, Institut Curie, INSERM U900 Jean-Philippe.Vert@mines.org Alexandre d’Aspremont ORFE - Princeton University aspremon@princeton.edu Abstract We propose new methodologies to detect anomalies in discrete-time processes taking values in a probability space. These methods are based on the inference of functionals whose evaluations on successive states visited by the process are stationary and have low autocorrelations. Deviations from this behavior are used to flag anomalies. The candidate functionals are estimated in a subspace of a reproducing kernel Hilbert space associated with the original probability space considered. We provide experimental results on simulated datasets which show that these techniques compare favorably with other algorithms. 1 Introduction Detecting abnormal points in small and simple datasets can often be performed by visual inspection, using notably dimensionality reduction techniques. However, non-parametric techniques are often the only credible alternative to address these problems on the many high-dimensional, richly structured data sets available today. When carried out on independent and identically distributed (i.i.d) observations, anomaly detection is usually referred to as outlier detection and is in many ways equivalent to density estimation. Several density estimators have been used in this context and we refer the reader to the exhaustive review in [1]. Among such techniques, methods which estimate non-parametric alarm functions in reproducing kernel Hilbert spaces (rkHs) are particularly relevant to our work. They form alarm functions of the type f( · ) = P i∈I cik(xi, · ), where k is a positive definite kernel and (ci)i∈I is a family of coefficients paired with a family (xi)i∈I of previously observed data points. A new observation x is flagged as anomalous whenever f(x) goes outside predetermined boundaries which are also provided by the algorithm. Two well known kernel methods have been used so far for this purpose, namely kernel principal component analysis (kPCA) [2] and one-class support vector machines (ocSVM) [3]. The ocSVM is a popular density estimation tool and it is thus not surprising that it has already found successful applications to detect anomalies in i.i.d data [4]. kPCA can also be used to detect outliers as described in [5], where an outlier is defined as any point far enough from the boundaries of an ellipsoid in the rkHs containing most of the observed points. These outlier detection methods can also be applied to dynamical systems. We now monitor discrete time stochastic processes Z = (Zt)t∈N taking values in a space Z and, based on previous observations zt−1, · · · , z0, we seek to detect whether a new observation zt abnormally deviates from the usual dynamics of the system. As explained in [1], this problem can be reduced to density estimation when either Zt or a suitable representation of Zt that includes a finite number of lags is Markovian, i.e. when the conditional probability of Zt given its past depends only on the values taken by Zt−1. 1 In practice, anomaly detection then involves a two step procedure. It first produces an estimator ˆZt of the conditional expectation of Zt given Zt−1 to extract an empirical estimator for the residues ˆεt = Zt−ˆZt. Under an i.i.d assumption, abnormal residues can then be used to flag anomalies. This approach and advanced extensions can be used both for multivariate data [6, 7] and linear processes in functional spaces [8] using spaces of H¨olderian functions. The main contribution of our paper is to propose an estimation approach of alarm functionals that can be used on arbitrary Hilbert spaces and which bypasses the estimation of residues ˆεt ∈Z by focusing directly on suitable properties for alarm functionals. Our approach is based on the following intuition. Detecting anomalies in a sequence generated by white noise is a task which is arguably easier than detecting anomalies in arbitrary time-series. In this sense, we look for functionals α such that α(Zt) exhibits a stationary behavior with low autocorrelations, ideally white noise, which can be used in turn to flag an anomaly whenever α(Zt) departs from normality. We call functionals α that strike a good balance between exhibiting a low autocovariance of order 1 and a high variance on successive values Zt a white functional of the process Z. Our definition can be naturally generalized to higher autocovariance orders as the reader will naturally see in the remaining of the paper. Our perspective is directly related to the concept of cointegration (see [9] for a comprehensive review) for multivariate time series, extensively used by econometricians to study equilibria between various economic and financial indicators. For a multivariate stochastic process X = (Xt)t∈Z taking values in Rd, X is said to be cointegrated if there exists a vector a of Rd such that (aT Xt)t∈Z is stationary. Economists typically interpret the weights of a as describing a stable linear relationship between various (non-stationary) macroeconomic or financial indicators. In this work we discard the immediate interpretability of the weights associated with linear functionals aT Xt to focus instead on functionals α in a rkHs H such that α(Zt) is stationary, and use this property to detect anomalies. The rest of this paper is organized as follows. In Section 2, we study different criterions to measure the autocorrelation of a process, directly inspired by min/max autocorrelation factors [10] and the seminal work of Box-Tiao [11] on cointegration. We study the asymptotic properties of finite sample estimators of these criterions in Section 3 and discuss the practical estimation of white functionals in Section 4. We discuss relationships with existing methods in Section 5 and provide experimental results to illustrate the effectiveness of these approaches in Section 6. 2 Criterions to define white functionals Consider a process Z = (Zt)t∈Z taking values in a probability space Z. Z will be mainly considered in this work under the light of its mapping onto a rkHs H associated with a bounded and continuous kernel k on Z × Z. Z is assumed to be second-order stationary, that is the densities p(Zt = z) and joint densities p(Zt = z, Zt+k = z′ ) for k ∈N are independent of t. Following [12, 13] we write φt = ϕ(Zt) −Ep[ϕ(Zt)], for the centered projection of Z in H, where ϕ : z ∈Z →k(z, ·) ∈H is the feature map associated with k. For two elements α and β of H we write α ⊗β for their tensor product, namely the linear map of H onto itself such that α ⊗β : x →⟨α, x⟩H β. Using the notations of [14] we write C = Ep[φt ⊗φt], D = Ep[φt ⊗φt+1], respectively for the covariance and autocovariance of order 1 of φt. Both C and D are linear operators of H by weak stationarity [14, Definition 2.4] of (φt)t∈Z, which can be deduced from the second-order stationarity of Z. The following definitions introduce two criterions which quantify how related two successive evaluations of α(Zt) are. Definition 1 (Autocorrelation Factor [10]). Given an element α of H such that ⟨α, Cα⟩H > 0, γ(α) is the absolute autocorrelation of α(Z) of order 1, γ(α) = | corr(α(Zt), α(Zt+1)| = |⟨α, Dα⟩H| ⟨α, Cα⟩H . (1) The condition ⟨α, Cα⟩H > 0 requires that var α(φt) is not zero, which excludes constant or vanishing functions on the support of the density of φt. Note also that defining γ requires no other assumption than second-order stationarity of Z. 2 If we assume further that φ is an autoregressive Hilbertian process of order 1 [14], ARH(1) for short, there exists a compact operator ρ : H →H and a H strong white noise1 (εt)t∈Z such that φt+1 = ρ φt + εt. In their seminal work, Box and Tiao [11] quantify the predictability of the linear functionals of a vector autoregressive process in terms of variance ratios. The following definition is a direct adaptation of that principle to autoregressive processes in Hilbert spaces. From [14, Theorem 3.2] we have that C = ρ Cρ∗+ Cε where for any linear operator A of H, A∗is its adjoint. Definition 2 (Predictability in the Box-Tiao sense [11]). Given an element α of H such that ⟨α, Cα⟩H > 0, the predictability λ(α) is the quotient λ(α) = var⟨α, ρ φt⟩H var⟨α, φt⟩H = ⟨α, ρ C ρ∗α⟩H ⟨α, Cα⟩H = ⟨α, DC−1D∗α⟩H ⟨α, Cα⟩H . (2) The right hand-side of Equation (2) follows from the fact that ρ C = D and ρ∗= C−1D∗[14], the latter equality being always valid irrelevant of the existence of C−1 on the whole of H as noted in [15]. Combining these two equalities gives ρ Cρ∗= DC−1D∗. Both γ and λ are convenient ways to quantify for a given function f of H the independence of f(Zt) with its immediate past. We provide in this paragraph a common representation for λ and γ. For any linear operator A of H and any non-zero element x of H write R(A, x) for the Rayleigh quotient R(A, x) = ⟨x, Ax⟩H ⟨x, x⟩H . We use the notations in [12] and introduce the normalized cross-covariance (or rather autocovariance in the context of this paper) operator V = C−1 2 DC−1 2 . Note that for any skewsymmetric operator A, that is A = −A∗, we have that ⟨x, Ax⟩H = ⟨A∗x, x⟩H = −⟨Ax, x⟩H = 0 and thus R(A, x) = R( A+A∗ 2 , x). Both λ and γ applied on a function α ∈H can thus be written as γ(α) = R V + V ∗ 2 , C 1 2 α  , λ(α) = R(V V ∗, C 1 2 α). As detailed in Section 4, our goal is to estimate functions in H from data such that they have either low γ or λ values. Minimizing λ is equivalent to solving a generalized eigenvalue problem through the Courant-Fisher-Weyl theorem. Minimizing γ is a more challenging problem since the operator V + V ∗is not necessarily positive definite. The S-lemma from control theory [16, Appendix B.2] can be used to cast the problem of estimating functions with low γ as a semi-definite program. In practice the eigen-decomposition of V + V ∗provides good approximate answers. The formulation of γ and λ as Rayleigh quotients is also useful to obtain the asymptotic convergence of their empirical counterparts (Section 3) and to draw comparisons with kernel-CCA (Section 5). 3 Asymptotics and matrix expressions for empirical estimators of γ and λ 3.1 Asymptotic convergence of the normalized cross-covariance operator V The covariance operator C and cross-covariance operator D can be estimated through a finite sample of points z0, · · · , zn translated into a sample of centered points φ1, · · · , φn in H, where φi = ϕ(zi) − 1 n+1 Pn j=0 ϕ(zj). We write Cn = 1 n −1 n X i=1 φi ⊗φi, Dn = 1 n −1 n−1 X i=1 φi ⊗φi+1, for the estimates of C and D respectively which converge in Hilbert-Schmidt norm [14]. Estimators for γ or λ require approximating C−1 2 , which is a typical challenge encountered when studying 1namely a sequence (εt)t∈Z of H random variables such that (i) 0 < E ∥εt∥2 = σ2, E εt = 0 and the covariance Cεt is constant, equal to Cε; (ii) (εt) is a sequence of i.i.d H-random variables 3 ARH(1) processes and more generally stationary linear processes in Hilbert spaces [14, Section 8]. This issue is addressed in this section through a Tikhonov-regularization, that is considering a sequence of positive numbers ǫn we write Vn = (Cn + ǫnI)−1 2 Dn(Cn + ǫnI)−1 2 , for the empirical estimate of V regularized by ǫn. We have already assumed that k is bounded and continuous. The convergence of Vn to V in norm is ensured under the additional conditions below Theorem 3. Assume that V is a compact operator, lim n→∞ǫn = 0 and lim n→∞ (log n/n) 1 3 ǫn = 0. Then writing ∥· ∥S for the Hilbert-Schmidt operator norm, lim n→∞∥Vn −V ∥S = 0. Proof. The structure of the proof is identical to that of of [12, Theorem 1] except that the i.i.d assumption does not hold here. In [12], the norm ∥Vn −V ∥S is upper-bounded by the two terms ∥Vn −(C + ǫnI)−1 2 D(C + ǫnI)−1 2 ∥S + ∥(C + ǫnI)−1 2 D(C + ǫnI)−1 2 −V ∥S. The second term converges under the assumption that ǫn →0 [12, Lemma 7] while the first term decreases at a rate that is proportional to the rates of ∥Cn −C∥S and ∥Dn −D∥S. With the assumptions above [14, Corollary4.1,Theorem4.8] gives us that ∥Cn−C∥S = O(( log n n ) 1 2 ) and ∥Dn−D∥S = O(( log n n ) 1 2 ). We use this result to substitute the latter rate to the faster rate obtained for i.i.d observations in [12, Lemma 5] and conclude the proof. 3.2 Empirical estimators and matrix expressions Given α ∈H, consider the following estimators of γ(α) and λ(α) defined in Equations (1) and (2), γn(α) = R Vn + V ∗ n 2 , (Cn + ǫnI) 1 2 α  = ⟨α, 1 2(Dn + D∗ n)α⟩H ⟨α, (Cn + ǫnI)α⟩H , λn(α) = R(VnV ∗ n , (Cn + ǫnI) 1 2 α) = ⟨α, Dn(Cn + ǫnI)−1D∗ nα⟩H ⟨α, (Cn + ǫnI)α⟩H , which converge to the adequate values through the convergence of (Cn + ǫnI) 1 2 , Vn + V ∗ n and VnV ∗ n . The n observations φ1, . . . , φn which define the empirical estimators above also span a subspace Hn in H which can be used to estimate white functionals. Given α ∈Hn we use any arbitrary decomposition α = Pn i=1 aiφi. We write K for the original n + 1 × n + 1 Gram matrix [k(zi, zj)]i,j and ¯K for its centered counterpart ¯K = (In −1 n1n,n)K(In −1 n1n,n) = [⟨φi, φj⟩H]i,j. Because of the centering span{φ0, . . . , φn} is actually equal to span{φ1, . . . , φn} and we will only use the n × n matrix K obtained by removing the first row and column of ¯K. For a n × n matrix M, we write M−i for the n × n −1 matrix obtained by removing the ith column of M. With these notations, λn and γn take the following form when evaluated on α ∈Hn, γn(α) = γn n X i=1 aiφi ! = 1 2 |aT (K−1KT −n + K−1KT −n)a| aT (K2 + nǫnK)a , λn(α) = λn n X i=1 aiφi ! = aT K−1KT −n(K2 + nǫnK)−1K−nKT −1a aT (K2 + nǫnK)a . If ǫn follows the assumptions of Theorem 3, both γn and λn converge to γ and λ pointwise in Hn. 4 Selecting white functionals in practice Both γ(α) and λ(α) are proxies to quantify the independence of successive observations α(Zt). Namely, functions with low γ and λ are likely to have low autocorrelations and be stationary when evaluated on the process Z, and the same can be said of functions with low γn and λn asymptotically. However, when H is of high or infinite dimension, the direct minimization of γn and λn is likely to result in degenerate functions2 which may have extremely low autocovariance on Z but very low variance as well. We select white functionals having this trade off in mind, such that both ⟨α, C, α⟩H is not negligible and γ or λ are low at the same time. 2Since the rank of operator Vn is actually n −1, we are even guaranteed to find in Hn a minimizer for γn and another for λn with respectively zero predictability and zero absolute autocorrelation. 4 4.1 Enforcing a lower bound on ⟨α, Cα⟩H We consider the following strategy: following the approach outlined in [14, Section 8] to estimate autocorrelation operators, and more generally in [17] in the context of kernel methods, we restrict Hn to the directions spanned by the p first eigenfunctions of the operator Cn. Namely, suppose Cn can be decomposed as Cn = Pn i=1 giei ⊗ei where ei is an orthonormal basis of eigenvectors with eigenvalues in decreasing order g1 ≥g2 ≥· · · ≥gn ≥0. For 1 ≤p ≤n We write Hp for the span{e1, . . . , ep} of the p first eigenfunctions. Any function α in Hp is such that ⟨α, Cnα⟩H ≥gp and thus allows us to keep the empirical variance of α(Zt) above a certain threshold. Let Ep be the n × p coordinate matrix of eigenvectors3 e1, . . . , ep expressed in the family of n vectors φ1, . . . , φn and G the p × p diagonal matrix of terms (g1, . . . , gp). We consider now a function β = Pp i biei in Hp, and note that γn(β) = 1 2 |bT ET p (K−1KT −n + K−1KT −n)Epb| bT (G + nǫnI)b , (3) λn(β) = bT ET p K−1KT −n(K2 + nǫnK)−1K−nKT −1Epb bT (G + nǫnI)b . (4) We define two different functions of Hp, βmac and βBT, as the the functionals in Hp whose coefficients correspond to the eigenvector with minimal (absolute) eigenvalue of the two Rayleigh quotients of Equations (3) and (4) respectively. We call these functionals the minimum autocorrelation (MAC) and Box-Tiao (BT) functionals of Z. Below is a short recapitulation of all the computational steps we have described so far. • Input: n + 1 observations z0, · · · , zn ∈Z of a time-series Z, a p.d. kernel k on Z × Z and a parameter p (we propose an experimental methodology to set p in Section 6.3) • Output: a real-valued function f(·) = Pn i=0 cik(zi, ·) that is a white functional of Z. • Algorithm: – Compute the (n + 1) × (n + 1) kernel matrix K, center it and drop the first row and column to obtain K. – Store K’s p first eigenvectors and eigenvalues in matrices U and diag(v1, · · · , vp). – Compute Ep = U diag(v1, · · · , vp)−1/2 and G = 1 n diag(v1, · · · , vp). – Compute the matrix numerator N and denominator D of either Equation (3) or Equation (4) and recover the eigenvector b with minimal absolute eigenvalue of the generalized eigenvalue problem (N, D) – Set a = Epb ∈Rn. Set c0 = −1 n Pn 1 aj and ci = ai −1 n Pn 1 aj 5 Relation to other methods and discussion The methods presented in this work offer numerous parallels with other kernel methods such as kernel-PCA or kernel-CCA which, similarly to the BT and MAC functionals, provide a canonical decomposition of Hn into n ranked eigenfunctions. When Z is finite dimensional, the authors of [18] perform PCA on a time-series sample z0, . . . , zn and consider its eigenvector with smallest eigenvalue to detect cointegrated relationships in the process Zt. Their assumption is that a linear mapping αT Zt that has small variance on the whole sample can be interpreted as an integrated relationship. Although the criterion considered by PCA, namely variance, disregards the temporal structure of the observations and only focuses on the values spanned by the process, this technique is useful to get rid of all non-stationary components of Zt. On the other hand, kernel-PCA [2], a non-parametric extension of PCA, can be naturally applied for anomaly detection in an i.i.d. setting [5]. It is thus natural to use kernel-PCA, namely an eigenfunction with low variance, and hope that it will have low autocorrelation to define white functionals of a process. Our experiments show that this is indeed the case and in agreement with [5] seem to 3Recall that if (ui, vi) are eigenvalue and eigenvector pairs of K, the matrix E of coordinates of eigenfunctions ei expressed in the n points φ1, . . . , φn can be written as U diag(v−1/2 i ) and the eigenvalues gi are equal to vi n if taken in the same order[2]. 5 indicate that the eigenfunctions which lie at the very low end of the spectrum, usually discarded as noise and less studied in the literature, can prove useful for anomaly detection tasks. kernel-CCA and variations such as NOCCO [12] are also directly related to the BT functional. Indeed, the operator V V ∗used in this work to define λ is used in the context of kernel-CCA to extract one of the two functions which maximally correlate two samples, the other function being obtained from V ∗V . Notable differences between our approach and kernel-CCA are: 1. in the context of this paper, V is an autocorrelation operator while the authors of [12] consider normalized covariances between two different samples; 2. kernel-CCA assumes that samples are independently and identically drawn, which is definitely not the case for the BT functional; 3. while kernel-CCA maximizes the Rayleigh quotient of V V ∗, we look for eigenfunctions which lie at the lower end of the spectrum of the same operator. A possible extension of our work is to look for two functionals f and g which, rather than maximize the correlation of two distinct samples as is the case in CCA, are estimated to minimize the correlation between g(zt) and f(zt+1). This direction has been explored in [19] to shed a new light on the Box-Tiao approach in the finite dimensional case. 6 Experimental results using a population dynamics model 6.1 Generating sample paths polluted by anomalies We consider in this experimental section a simulated dynamical system perturbed by arbitrary anomalies. To this effect, we use the Lotka-Volterra equations to generate time-series quantifying the populations of different species competing for common resources. For S species, the model tracks the population level Xt,i at time t of each species i, which is a number bounded between 0 and 1. Values of 0 and 1 account respectively for the extinction and the saturation levels of each species. Writing ◦for the coordinate-wise kronecker product of vectors and matrices and h > 0 for a discretization step, the population vector Xt ∈[0, 1]S follows the discrete-time dynamic equation Xt+1 = Xt + 1 hr ◦Xt ◦(1S −AXt) . We consider the following coefficients introduced in [20] which are known to yield chaotic behavior, S = 4, r =    1 0.72 1.53 1.27   , A =    1 1.09 1.52 0 0 1 .44 1.36 2.33 0 1 .47 1.21 .51 .35 1   , which can be turned into a stochastic system by adding an i.i.d. standard Gaussian noise εt, Zt+1 = Zt + 1 hr ◦Zt ◦(14 −AZt) + σεεt. (5) Whenever the equations generate coordinates below 0 or above 1, the violating coordinates are set to 0 + u or 1 −u respectively, where u is uniform over [0, 0.01]. We consider trajectories of length 800 of the Lotka-Volterra system described in Equation (5). For each experiment we draw a starting point Z0 randomly with uniform distribution on [0, 1]4, discard the 10 first iterations and generate 400 iterations following Equation (5). Following this we select randomly (uniformly over the remaining 400 steps) 40 time stamps t1, · · · , t40 where we introduce a random perturbation at tk such that Ztk, rather than following the dynamic of Equation (5) is randomly perturbed by a noise δt chosen uniformly over {−1, 1}4 with a magnitude σδ, that is Ztk = Ztk−1 + σδδtk−1. For all other timestamps tk < t < tk+1, the system follows the usual dynamic of Equation (5). Anomalies violate the usual dynamics in two different ways: first, they ignore the usual dynamical equations and the current location of the process to create instead purely random increments; second, depending on the magnitude of σδ relative to σǫ, such anomalies may induce unusual jumps. 6.2 Estimation of white functionals and other alarm functions We compare in this experiment five techniques to detect the anomalies described above: the BoxTiao functional and a variant described in the paragraph below, the minimal autocorrelation functional, a one-class SVM and the low-variance functional defined by the (p + 1)th eigenfunction of 6 20 40 60 80 100 120 140 160 180 200 0 0.5 1 Lotka Volterra System 50 100 150 200 −2 0 2 4 Box−Tiao − AUC: 0.828 −0.4 −0.2 0 0.2 weights 50 100 150 200 −0.2 −0.1 0 ocSVM − AUC: 0.444 0 0.05 0.1 weights 50 100 150 200 −2 0 2 4 6 kPCA − AUC: 0.628 −0.2 0 0.2 0.4 weights 50 100 150 200 −2 0 2 4 kMAC − AUC: 0.797 −0.4 −0.2 0 0.2 0.4 weights Figure 1: The figure on the top plots a sample path of length 200 of a 4-dimensional Lotka-Volterra dynamic system with perturbations drawn with σε = .01 and σδ = 0.02. The data is split between 80 regular observations and 120 observations polluted by 10 anomalies. All four functionals have been estimated using ρ = 1, and we highlight by a red dot the values they take when an anomaly is actually observed. The respective weights associated to each of the 80 training observations are displayed on the right of each methodology. the empirical covariance Cn, given by kernel-PCA. All techniques are parameterized by a kernel k. Writing ∆zi = zi −zi−1, we use the following mixture of kernels k : k(zi, zj) = ρ e−100∥∆zi−∆zj∥2 + (1 −ρ)e−10∥zi−zj∥2, (6) with ρ ∈[0, 1]. The first term in k discriminates observations according to their location in [0, 1]4. When ρ = 0.5, k accounts for both the state of the system and its most recent increments, while only increments are considered for ρ = 1. Anomalies can be detected with both criterions, since they can be tracked down when the process visits unusual regions or undergoes brusque and atypical changes. The kernel widths have been set arbitrarily. We discuss in this paragraph a variant of the BT functional. While the MAC functional is defined and estimated in order to behave as closely as possible to random i.i.d noise, the BT functional βBT is tuned to be stationary as discussed in [11]. In order to obtain a white functional from βBT it is possible to model the time series βBT(zt) as an unidimensional autoregressive model, that is estimate (on the training sample again) coefficients r1, r2, . . . , rq such that βBT(zt) = q X i=1 riβBT(zt−i) + ˆεBT t . Both the order q and the autoregressive coefficients can be estimated on the training sample with standard AR packages, using for instance Schwartz’s criterion to select q. Note that although φ(Zt) is assumed to be ARH(1), this does not necessarily translate into the fact that the real-valued process βBT(Zt) = ⟨βBT, φt⟩H is AR(1) as pointed out in [14, Theorem 3.4]. In practice however we use the residuals ˆεBT t = βBT(zt) −Pp i=1 riβBT(zt−i) to define the Box-Tiao residuals functional which we write ˜βBT. 7 0.01 0.02 0.03 0.04 0.05 0.5 0.6 0.7 0.8 0.9 1 ρ = 0 AUC 0.01 0.02 0.03 0.04 0.05 0.5 0.6 0.7 0.8 0.9 1 Noise Amplitude σδ ρ = 0.5 BT Res BT MAC ocSVM kpca 0.01 0.02 0.03 0.04 0.05 0.5 0.6 0.7 0.8 0.9 1 ρ = 1 Figure 2: The three successive plot stand for three different values of ρ = 0, 0.5, 1. The detection rate naturally increases with the size of the anomaly, to the extent that the task becomes only a gap detection problem when σδ becomes closer to 0.05. Functionals βBT, ˜βBT and βmac have a similar performance and outperform other techniques when the task is most difficult and σδ is small. 6.3 Parameter selection methodology and numerical results The BT functional βBT and its residuals ˜βBT, the MAC function βmac, the one-class SVM ˆfocSVM and the p + 1th eigenfunction ep+1 are estimated on a set of 400 observations. We set p through the rule that the p first directions must carry at least 98% of the total variance of Cn, that is p is the first integer such that Pp i=1 gi > 0.98·Pn i=1 gi. We fix the ν paramater of the ocSVM to 0.1. The BT and MAC functionals additionally require the use of a regularization term ǫn which we select by finding the best ridge regressor of φt+1 given φt through a 4-fold cross validation procedure on the training set. For βBT, ˜βBT, βmac and the kPCA functional ep+1 we use their respective empirical mean µ and variance σ on the training set to rescale and whiten their output on the test set, namely consider values (f(z) −µ)/σ. Although more elaborate anomaly detection schemes on such unidimensional time-series might be considered, for the sake of simplicity we treat directly these raw outputs as alarm scores. Having on the one hand the correct labels for anomalies and the scores for all detectors, we vary the threshold at which an alarm is raised to produce ROC curves. We use the area under the curve of each method on each sample path as a performance measure for that path. Figure 1 provides a summary of the performance of each method on a unique sample path of 200 observations and 10 anomalies. Perturbation parameters are set such that σε = 0.01 and σδ varies between 0.005 and 0.055. For each couple (σε, σδ) we generate 500 draws and compute the mean AUC of each technique on such draws. We report in Figure 2 these averaged performances for three different choices of the kernel, namely three different values for ρ as defined in Equation (6). 6.4 Discussion In the experimental setting, anomalies can be characterized as unusual increments between two successive states of an otherwise smooth dynamical system. Anomalies are unusual due to their size, controlled by σδ, and their directions, sampled in {−1, 1}4. When the step σδ is relatively small, it is difficult to flag correctly an anomaly without taking into account the system’s dynamic as illustrated by the relatively poor performance of the ocSVM and the kPCA compared to the BT, BTres and MAC functions. On the contrary, when σδ is big, anomalies can be more simply discriminated as big gaps. The methods we propose do not perform as well as the ocSVM in such a setting. We can hypothesize two reasons for this: first, white functionals may be less useful in such a regime that puts little emphasis on dynamics than a simple ocSVM with adequate kernel. Second, in this study the BT and MAC functions flag anomalies whenever an evaluation goes outside of a certain bounding tube. More advanced detectors of a deviation or change from normality, such as CUSUM [21], might be studied in future work. 8 References [1] V. Chandola, A. Banerjee, and V. Kumar. Anomaly detection: A survey. ACM Computing Surveys, 2009. [2] B. Sch¨olkopf, A. Smola, and K. M¨uller. Nonlinear component analysis as a kernel eigenvalue problem. Neural Comput., 10(5):1299–1319, 1998. [3] B. Sch¨olkopf, J. C. Platt, J. Shawe-Taylor, A. J. Smola, and R. C. Williamson. Estimating the support of a high-dimensional distribution. Neural Comput., 13:2001, 1999. [4] A.B. Gardner, A.M. Krieger, G. Vachtsevanos, and B. Litt. One-class novelty detection for seizure analysis from intracranial EEG. J. Mach. Learn. Res., 7:1025–1044, 2006. [5] H. Hoffmann. Kernel PCA for novelty detection. Pattern Recognit., 40(3):863–874, 2007. [6] A. J. Fox. Outliers in time series. J. R. Stat. Soc. Ser. B, 34(3):350–363, 1972. [7] R.S. Tsay, D. Pena, and A.E. Pankratz. Outliers in multivariate time series. Biometrika, 87(4):789–804, 2000. [8] A. Laukaitis and A. Raˇckauskas. Testing changes in Hilbert space autoregressive models. Lithuanian Mathematical Journal, 42(4):343–354, 2002. [9] G. S. Maddala and I. M. Kim. Unit roots, cointegration, and structural change. Cambridge Univ. Pr., 1998. [10] P. Switzer and A.A. Green. Min/max autocorrelation factors for multivariate spatial imagery. Computer science and statistics, 16:13–16, 1985. [11] G. Box and G. C. Tiao. A canonical analysis of multiple time series. Biometrika, 64(2):355–365, 1977. [12] K. Fukumizu, F. R. Bach, and A. Gretton. Statistical consistency of kernel canonical correlation analysis. J. Mach. Learn. Res., 8:361–383, 2007. [13] A. Berlinet and C. Thomas-Agnan. Reproducing Kernel Hilbert Spaces in Probability and Statistics. Kluwer Academic Publishers, 2003. [14] D. Bosq. Linear Processes in Function Spaces: Theory and Applications. Springer, 2000. [15] A. Mas. Asymptotic normality for the empirical estimator of the autocorrelation operator of an ARH (1) process. Compt. Rendus Acad. Sci. Math., 329(10):899–902, 1999. [16] S. Boyd and L. Vandenberghe. Convex Optimization. Cambridge University Press, 2004. [17] L. Zwald and G. Blanchard. Finite dimensional projection for classification and statistical learning. IEEE Trans. Inform. Theory, 54:4169, 2008. [18] J. H. Stock and M. W. Watson. Testing for common trends. J. Am. Stat. Assoc., pages 1097–1107, 1988. [19] P. Bossaerts. Common nonstationary components of asset prices. J. Econ. Dynam. Contr., 12(2-3):347– 364, 1988. [20] J. A. Vano, J. C. Wildenberg, M. B. Anderson, J. K. Noel, and J. C. Sprott. Chaos in low-dimensional lotka-volterra models of competition. Nonlinearity, 19(10):2391–2404, 2006. [21] M. Basseville and I.V Nikiforov. Detection of abrupt changes: theory and applications. Prentice-Hall, 1993. 9
2009
4
3,788
Filtering Abstract Senses From Image Search Results Kate Saenko1,2 and Trevor Darrell2 1 MIT CSAIL, Cambridge, MA 2 UC Berkeley EECS and ICSI, Berkeley, CA saenko@csail.mit.edu, trevor@eecs.berkeley.edu Abstract We propose an unsupervised method that, given a word, automatically selects non-abstract senses of that word from an online ontology and generates images depicting the corresponding entities. When faced with the task of learning a visual model based only on the name of an object, a common approach is to find images on the web that are associated with the object name and train a visual classifier from the search result. As words are generally polysemous, this approach can lead to relatively noisy models if many examples due to outlier senses are added to the model. We argue that images associated with an abstract word sense should be excluded when training a visual classifier to learn a model of a physical object. While image clustering can group together visually coherent sets of returned images, it can be difficult to distinguish whether an image cluster relates to a desired object or to an abstract sense of the word. We propose a method that uses both image features and the text associated with the images to relate latent topics to particular senses. Our model does not require any human supervision, and takes as input only the name of an object category. We show results of retrieving concrete-sense images in two available multimodal, multi-sense databases, as well as experiment with object classifiers trained on concrete-sense images returned by our method for a set of ten common office objects. 1 Introduction Many practical scenarios call for robots or agents which can learn a visual model on the fly given only a spoken or textual definition of an object category. A prominent example is the Semantic Robot Vision Challenge (SRVC)1 , which provides robot entrants with a text-file list of categories to be detected shortly before the competition begins. More generally, we would like a robot or agent to be able to engage in situated dialog with a human user and to understand what objects the user is refering to. It is generally unreasonable to expect users to refer only to objects covered by static, manually annotated image databases. We therefore need a way to find images for an arbitrary object in an unsupervised manner. A common approach to learning a visual model based solely on the name of an object is to find images on the web that co-occur with the object name by using popular web search services, and train a visual classifier from the search results. As words are generally polysemous (e.g. mouse) and are often used in different contexts (e.g. mouse pad), this approach can lead to relatively noisy models. Early methods used manual intervention to identify clusters corresponding to the desired sense [2], or grouped together visually coherent sets of images using automatic image clustering (e.g. [9]). However, image clusters rarely exactly align with object senses because of the large variation in appearance within most categories. Also, clutter from abstract senses of the word that 1http://www.semantic-robot-vision-challenge.org 1 Object Sense: drink container Input Word: cup Online Dictionary cup WISDOM • cup (a contest in which a cup is awarded) “the World Cup is the  world's most widely watched sporting event.” • cup (a small open container usually used for drinking; usually has a handle) "he  put the cup back in the saucer"; "the handle of the cup was missing" Object Sense: trophy Abstract Sense: sporting event … search • cup, loving cup (a large metal vessel with two handles that is awarded as a trophy to the winner of a competition) "the school kept the cups is a special glass case” … cup Figure 1: WISDOM separates the concrete (physical) senses from the abstract ones. are not associated with a physical object can further complicate matters (e.g. mouse as in “a timid person”.) 2 To address these issues, we propose an unsupervised Web Image Sense DisambiguatiOn Model (WISDOM), illustrated in Figure 1. Given a word, WISDOM automatically selects concrete senses of that word from a semantic dictionary and generates images depicting the corresponding entities, first finding coherent topics in both text and image domains, and then grounding the learned topics using the selected word senses. Images corresponding to different visual manifestations of a single physical sense are linked together based on the likelihood of their image content and surrounding text (words in close proximity to the image link) being associated with the given sense. We make use of a well-known semantic dictionary (WordNet [8]), which has been previously used together with a text-only latent topic model to construct a probabilistic model of individual word senses for use with online images [17]. We build on this work by incorporating a visual term, and by using the Wordnet semantic hierarchy to automatically infer whether a particular sense describes a physical entity or a non-physical concept. We show results of detecting such concrete senses in two available multimodal (text and image), multi-sense databases: the MIT-ISD dataset [17], and the UIUC-ISD dataset [14]. We also experiment with object classification in novel images, using classifiers trained on the images collected via our method for a set of ten common objects. 2 Related Work Several approaches to building object models from image search results have been proposed. Some have relied on visual similarity, either selecting a single inlier image cluster based on a small validation set [9], or bootstrapping object classifiers from existing labeled images [13]. In [18] a classifier based on text features (such as whether the keyword appears in the URL) was used re-rank the images before bootstrapping the image model. However, the text ranker was category-independent and thus unable to learn words predictive of a specific word sense. An approach most similar to ours [2] discovered topics in the textual context of images using Latent Dirichlet Allocation (LDA), however, manual intervention by the user was required to sort the topics into positive and negative for each category. Also, the combination of image and text features is used in some web retrieval methods (e.g. [7]), however, our work is focused not on instance-based image retrieval, but on category-level modeling. Two recent papers have specifically addressed polysemous words. In Saenko and Darrell [17], the use of dictionary definitions to train an unsupervised visual sense model was proposed. However, the user was required to manually select the definition for which to build the model. Furthermore, the 2While the first few pages of image search results returned by modern search engines generally have very few abstract examples, possibly due to the sucess of reranking based on previous user’s click-through history, results from farther down the list are much less uniform, as our experimental results show. 2 sense model did not incorporate visual features, but rather used the text contexts to re-rank images, after which an image classifier was built on the top-ranked results. Loeff et al. [14] performed spectral clustering in both the text and image domain and evaluated how well the clusters matched different senses. However, as a pure clustering approach, this method cannot assign sense labels. In the text domain, Yarowsky [20] proposed an unsupervised method for traditional word sense disambiguation (WSD), and suggested the use of dictionary definitions as an initial seed. Also, Boiy et al. [4] determined which words are related to a visual domain using hypothesis testing on a target (visual) corpus, compared to a general (non-visual) corpus. A related problem is modeling word senses in images manually annotated with words, such as the caption “sky, airplane” [1]. Models of annotated images assume that there is a correspondence between each image region and a word in the caption (e.g. Corr-LDA, [5]). Such models predict words, which serve as category labels, based on image content. In contrast, our model predicts a category label based on all of the words in the web image’s text context, where a particular word does not necessarily have a corresponding image region, and vice versa. In work closely related to Corr-LDA, a People-LDA [11] model is used to guide topic formation in news photos and captions, using a specialized face recognizer. The caption data is less constrained than annotations, including non-category words, but still far more constrained than generic webpage text. 3 Sense-Grounding with a Dictionary Model We wish to estimate the probability that an image search result embedded in a web page is one of a concrete or abstract concept. First, we determine whether the web image is related to a particular word sense, as defined by a dictionary. The dictionary model presented in [17] provides an estimate of word sense based on the text associated with the web image. We will first describe this model, and then extend it to include both an image component and an adaptation step to better reflect word senses present in images. The dictionary model [17] uses LDA on a large collection of text related to the query word to learn latent senses/uses of the word. LDA [6] discovers hidden topics, i.e. distributions over discrete observations (such as words), in the data. Each document is modeled as a mixture of topics z ∈ {1, ..., K}. A given collection of M documents, each containing a bag of Nd words, is assumed to be generated by the following process: First, we sample the parameters φj of a multinomial distribution over words from a Dirichlet prior with parameter β for each topic j = 1, ..., K. For each document d, we sample the parameters θd of a multinomial distribution over topics from a Dirichlet prior with parameter α. Finally, for each word token i, we choose a topic zi from the multinomial θd, and then choose a word wi from the multinomial φzi. Since learning LDA topics directly from the images’ text contexts can lead to poor results due to the low quantity and irregular quality of such data, an additional dataset of text-only web pages is created for learning, using regular web search. The dictionary model then uses the limited text available in the WordNet entries to relate dictionary sense to latent text topics. For example, sense 1 of “bass” contains the definition “the lowest part of the musical range,” as well as the hypernym (“pitch”) and other semantic relations. The bag-of-words extracted from such a semantic entry for sense s ∈{1, 2, ..., S} is denoted by the variable es = (e1, e2, ..., eEs), where Es is the total number of words. The dictionary model assumes that the sense is independent of the words conditioned on the distribution of topics in the document. For a web image with an associated text document dt, the conditional probability of sense is given by P(s|dt) = K X j=1 P(s|z = j)P(z = j|dt), (1) where the distribution of latent topics in the text context, P(z|dt) is given by the θdt variable, computed by generalizing the learned LDA model to the (unseen) text contexts. The likelihood of a sense given latent topic z = j is defined as the normalized average likelihood of words in the 3 dictionary entry es, 3 P(s|z) ∝1 Es Es X i=1 P(ei|z), (2) Incorporating Image Features. The dictionary model (1) does not take into account the image part of the image/text pair. Here, we extend it to include an image term, which can potentially provide complementary information. First, we estimate P(s|di), or the probability of a sense given an image di. Similar to the text-only case, we learn an LDA model consisting of latent topics v ∈{1, ..., L}, using the visual bag-of-words extracted from the unlabeled images. The estimated θ variables give P(v|di). To compute the conditional probability of a sense given a visual topic, we marginalize the joint P(s, v) across all image and associated text documents {di, dt} in the collection P(s|v) ∝ M X k=1 P(s|dt = k)P(v|di = k) (3) Note that the above assumes conditional independence of the sense and the visual topic given the observations. Intuitively, this provides us with an estimate of the collocation of senses with visual topic. We can now compute the probability of dictionary sense for a novel image di ∗as: P(s|di ∗) = L X j=1 P(s|v = j)P(v = j|di ∗) (4) Finally, the joint text and image model is defined as the combination of the text-space and imagespace models via the sum rule, P(s|di, dt) = λP(s|di) + (1 −λ)P(s|dt) (5) Our assumption in using the sum rule is that the combination can be modelled as a mixture of experts, where the features of one modality are independent of sense given the other modality [3]. Adaptation. Recall that we can estimate θdt for the unseen web image contexts by generalizing the web-text LDA model using Gibbs sampling. However, web topics can be a poor match to image search data (e.g. the “genome research” topic of mouse.) Our solution is to adapt the web topics to the image search data. We do this by fixing the z assignments of the web documents and sampling the z’s of the image contexts for a few iterations. This procedure updates the topics to better reflect the latent dimensions present in the image search data, without the overfitting effect mentioned earlier. 4 Filtering out Abstract Senses To our knowledge, no previous work has considered the task of detecting concrete vs. abstract senses in general web images. We can do so by virtue of the multimodal sense grounding method presented in the previous section. Given a set of senses for a paricular word, our task is to classify each sense as being abstract or concrete. Fortunately, WordNet contains relatively direct metadata related to the physicality of a word sense. In particular, one of the main functions of WordNet is to put words in semantic relation to each other using the concepts of hyponym and hypernym. For example, “scarlet” and “crimson” are hyponyms of “red”, while “color” is a hypernym of “red”. One can follow the chain of direct hypernyms all the way to the top of the tree, “entity”. Thus, we can detect a concrete sense by examining its hypernym tree to see if it contains one of the following nodes: ’article’, ’instrumentality’,’article of clothing’, ’animal’, or ’body part’. What’s more, we can thus restrict the model to specific types of physical entities: living things, artifacts, clothing, etc. In addition, WordNet contains lexical file information for each sense, marking it as a state, or an animal, etc. For example, the sense “mouse, computer mouse” is marked <artifact>. In this paper, we classify a WordNet sense as being due to a concrete object when the lexical tag is one of <animal>, <artifact>, <body>, <plant> and <act>. We exclude people and proper nouns in the experiments in this paper, as well as prune away infrequent senses. 3The average word likelihood was found to be a good indicator of how relevant a topic is to a sense. The total word likelihood could be used, but it would allow senses with longer entries to dominate. 4 5 Data We evaluated the outlined algorithms on three datasets: the five-word MIT-ISD dataset [17], the three-word UIUC-ISD dataset [14], and OFFICE dataset of ten common office objects that we collected for the classification experiment. 4 All datasets had been collected automatically by issuing queries to the Yahoo Image SearchTM engine and downloading the returned images and corresponding HTML web pages. For the MIT-ISD dataset, the query terms used were: BASS, FACE, MOUSE, SPEAKER and WATCH. For the UIUC-ISD dataset, three basic query terms were used: BASS, CRANE and SQUASH. To increase corpus size, the authors also used supplemental query terms for each word. The search terms selected were those related to the concrete senses (e.g. “construction cranes”, “whooping crane”, etc.) Since these human-selected search terms require human input, while our method only requires a list of words, we exclude them from our experiments. The OFFICE dataset queries were: CELLPHONE, FORK, HAMMER, KEYBOARD, MUG, PLIERS, SCISSORS, STAPLER, TELEPHONE, WATCH. The images were labeled by a human annotator with all concrete senses for each word. The annotator saw only the images, and not the surrounding text or any dictionary definitions. For the MIT-ISD dataset, each concrete sense was labeled as core, related, and unrelated. Images where the object was too small or too occluded were labeled as related. For the UIUC-ISD dataset, the labels for each concrete sense were similarly core, related and unrelated. In addition, a people label was used for unrelated images depicting faces or a crowd. 5 The OFFICE dataset was only labeled with core and unrelated labels. We evaluated our models on two retrieval tasks: retrieval of only core images of each sense, and retrieval of both core and related images. In the former case, core labels were used as positive labels for each sense, with related, unrelated and people images labeled as negative. In the latter case, core and related images were labeled as positive, and unrelated and people as negative. Note that the labels were only used in testing, and not in training. To provide training data for the web text topic model, we also collected an unlabeled corpus of textonly webpages for each word. These additional webpages were collected via regular web search for the single-word search term (e.g. CRANE), and were not labeled. 6 Features When extracting words from web pages, all HTML tags are removed, and the remaining text is tokenized. A standard stop-word list of common English words, plus a few domain-specific words like “jpg”, is applied, followed by a Porter stemmer [16]. Words that appear only once and the actual word used as the query are pruned. To extract text context words for an image, the image link is located automatically in the corresponding HTML page. All word tokens in a 100-token window surrounding the location of the image link are extracted. The text vocabulary size used for the dictionary model ranges between 12K-20K words for the different search words. To extract image features, all images are resized to 300 pixels in width and converted to grayscale. Two types of local feature points are detected in the image: edge features [9] and scale-invariant salient points. To detect edge points, we first perform Canny edge detection, and then sample a fixed number of points along the edges from a distribution proportional to edge strength. The scales of the local regions around points are sampled uniformly from the range of 10-50 pixels. To detect scaleinvariant salient points, we use the Harris-Laplace [15] detector with the lowest strength threshold set to 10. Altogether, 400 edge points and approximately the same number of Harris-Laplace points are detected per image. A 128-dimensional SIFT descriptor is used to describe the patch surrounding each interest point. After extracting a bag of interest point descriptors for each image, vector quantization is performed. A codebook of size 800 is constructed by k-means clustering a randomly chosen subset of the database (300 images per keyword), and all images are converted to bags of the resulting visual words (cluster centers of the codebook.) No spatial information is included in the image representation, rather it is treated as a bag-of-words. 4The MIT-ISD and OFFICE datasets are available at http://people.csail.mit.edu/saenko 5The UIUC-ISD dataset and its complete description can be obtained at http://visionpc.cs.uiuc.edu/isd/index.html 5 (a) Text Model (b) Image Model Figure 2: The top 25 images returned by the text and the image models for mouse-4 (device). 7 Retrieval Experiments In this section, we evaluate WISDOM on the task of retrieving concrete sense images from search results. Below are the actual concrete senses that were automatically selected from WordNet by our model for each word in the datasets: MIT-ISD: bass-7 (instrument), bass-8 (fish), face-1 (human face), face-13 (surface), mouse-1 (rodent), mouse-4 (device), speaker-2 (loudspeaker), watch-1 (timepiece) UIUC-ISD: bass-7 (instrument), bass-8 (fish), crane-4 (machine), crane-5 (bird), squash-1 (plant), squash-3 (game) OFFICE: cellphone-1 (mobile phone), fork-1 (utensil), hammer-2 (hand tool), keyboard-1 (any keyboard), mug-1 (drinking vessel), mug-1 (drinking vessel), pliers-1 (tool), scissors-1 (cutting tool), stapler-1 (stapling device), telephone-1 (landline phone), watch-1 (timepiece) We train a separate web text LDA model and a separate image LDA model for each word in the dataset. The number of topics K is a parameter to the model that represents the dimensionality of the latent space used by the model. We set K = 8 for all LDA models in the following experiments. This was done so that the number of latent text topics is roughly equal to the number of senses. In the image domain, it is less clear what the number of topics should be. Ideally, each topic would coincide with a visually coherent class of images all belonging to the same sense. In practice, because images of an object class on the web are extremely varied, multiple visual clusters are needed to encompass a single visual category. Our experiments have shown that the model is relatively insensitive to values of this parameter in the range of 8-32. To perform inference in LDA, we used the Gibbs sampling approach of [10], implemented in the Matlab Topic Modeling Toolbox [19]. We used symmetric Dirichlet priors with scalar hyperparameters α = 50/K and β = 0.01, which have the effect of smoothing the empirical topic distribution, and 1000 iterations of Gibbs sampling. Figure 2 shows the images that were assigned the highest probability for mouse-4 (computer device) sense by the text-only model P(s|dt) (Figure 2(a)), and by the image-only model P(s|di) (Figure 2(b)). Both models return high-precision results, but somewhat different and complementary images. As we expected, the image model’s results are more visually coherent, while the text model’s results are more visually varied. Next, we evaluate retrieval of individual senses using the multimodal model (Eq. 5, with λ = 0.5) and compare it to the Yahoo search engine baseline. This is somewhat unfair to the baseline, as here we assume that our model knows which sense to retrieve (we will remove this assumption later.) The recall-precision curves (RPCs) are shown in Figure 3. The figure shows the RPCs for each word in the MIT-ISD (top row) and UIUC-ISD (bottom row) datasets, computed by thresholding P(s|di, dt). WISDOM’s RPCs are shown as the green curves. The blue curves are the RPCs obtained by the original Yahoo image search retrieval order. For example, the top leftmost plot shows retrieval of bass-7 (musical instrument). These results demonstrate that we are able to greatly improve the retrieval of each concrete sense compared to the search engine. 6 (a) MIT-ISD data (b) UIUC-ISD data Figure 3: Recall-precision of each concrete sense (core labels) using the multimodal dictionary model (green) and the search engine (blue), evaluated on two datasets. (a) Core Senses, MIT-ISD (b) Core Senses, UIUC-ISD (c) Core+Related Senses, MIT-ISD (d) Core+Related Senses, UIUC-ISD Figure 4: Recall-precision of all concrete senses using WISDOM (green) and the search engine (blue). WISDOM does fail to retrieve one sense – face-13, defined as “a vertical surface”. This is a highly ambiguous sense visually, although it has an <artifact> lexical tag. One possibility for the future is to exclude senses that are descendents of “surface” as being too ambiguous. Also, preliminary investigation indicates that weighting the text and image components of the model differently can result in improved results; model weighting is therefore an important topic for future work. Next, we evaluate the ability of WISDOM to filter out abstract senses. Here we no longer assume that the correct senses are known. Figure 4 shows the result of filtering out the abstract senses, which is done by evaluating the probability of any of the concrete senses in a given search result. The ground truth labels used to compute these RPCs are positive if an image was labeled either with any core sense (Fig.4 (a,b)), or with any core or related sense (Fig.4 (c,d)), and negative otherwise. These results demonstrate that our model improves the retrieval of images of concrete (i.e. physical) senses of words, without any user input except for the word itself. Figure 5 shows how the model filters out certain images, including illustrations by an artist named Crane, from search results for CRANE. 8 Classification Experiments We have shown that our method can improve retrieval of concrete senses, therefore providing higherprecision image training data for object recognition algorithms. We have conjectured that this leads to better classification results; in this section, we provide some initial experiments to support this claim. We collected a dataset of ten office objects, and trained ten-way SVM classifiers using the vocabulary-guided pyramid match kernel over bags of local SIFT features implemented in the LIBPMK library [12]. The training data for the SVM was either the first 100 images returned from the search engine, or the top 100 images ranked by our model. Since we’re interested in objects, we keep only the <artifact> senses that descend from “instrumentality” or “article”. Figure 6 shows classification results on held-out test data, averaged over 10 runs on random 80% subsets of the 7 (a) Yahoo Image Search (b) WISDOM Figure 5: The top images returned by the search engine for CRANE, compared to our model. Figure 6: Classification accuracy of ten objects in the OFFICE dataset. data. Our method improves accuracy for most of the objects; in particular, classification of “mug” improves greatly due to the non-object senses being filtered out. This is a very difficult task, as evidenced by the baseline performance; the average baseline accuracy is 27%. Training with our method achieves 35% accuracy, a 25% relative improvement. We believe that this relative improvement is due to the higher precision of the training images and will persist even if the overall accuracy were improved due to a better classifier. 9 Conclusion We presented WISDOM, an architecture for clustering image search results for polysemous words based on image and text co-occurrences and grounding latent topics according to dictionary word senses. Our method distinguishes which senses are abstract from those that are concrete, allowing it to filter out the abstract senses when constructing a classifier for a particular object of interest to a situated agent. This can be of particular utility to a mobile robot faced with the task of learning a visual model based only on the name of an object provided on a target list or spoken by a human user. Our method uses both image features and the text associated with the images to relate estimated latent topics to particular senses in a semantic database. WISDOM does not require any human supervision, and takes as input only an English noun. It estimates the probability that a search result is associated with an abstract word sense, rather than a sense that is tied to a physical object. We have carried out experiments with image and text-based models to form estimates of abstract vs. concrete senses, and have shown results detecting concrete-sense images in two multimodal, multisense databases. We also demonstrated a 25% relative improvement in accuracy when classifiers are trained with our method as opposed to the raw search results. Acknowledgments This work was supported in part by DARPA, Google, and NSF grants IIS-0905647 and IIS-0819984. 8 References [1] K. Barnard, K. Yanai, M. Johnson, and P. Gabbur. Cross modal disambiguation. In Toward Category-Level Object Recognition, J. Ponce, M. Hebert, C. Schmidt, eds., Springer-Verlag LNCS Vol. 4170, 2006. [2] T. Berg and D. Forsyth. Animals on the web. In Proc. CVPR, 2006. [3] J. Bilmes and K. Kirchhoff. Directed graphical models of classifier combination: application to phone recognition. In Proc. ICSLP, 2000. [4] E. Boiy, K. Deschacht, and M.-F. Moens. Learning Visual Entities and Their Visual Attributes from Text Corpora. In Proc. DEXA, 2008. [5] D. Blei and M. Jordan. Modeling annotated data. In Proc. International ACM SIGIR Conference on Research and Development in Information Retrieval, pages 127-134. ACM Press, 2003. [6] D. Blei, A. Ng, and M. Jordan. Latent Dirichlet allocation. J. Machine Learning Research, 3:993-1022, 2003. [7] Z. Chen, L. Wenyin, F. Zhang and M. Li. Web mining for web image retrieval. J. of the American Society for Information Science and Technology, 51:10, pages 831-839, 2001. [8] C. Fellbaum. Wordnet: An Electronic Lexical Database. Bradford Books, 1998. [9] R. Fergus, L. Fei-Fei, P. Perona, and A. Zisserman. Learning Object Categories from Google’s Image Search. In Proc. ICCV 2005. [10] T. Griffiths and M. Steyvers. Finding Scientific Topics. In Proc. of the National Academy of Sciences, 101 (suppl. 1), pages 5228-5235, 2004. [11] V. Jain, E. Learned-Miller, A. McCallum. People-LDA: Anchoring Topics to People using Face Recognition. In Proc. ICCV, 2007. [12] J. Lee. LIBPMK: A Pyramid Match Toolkit. MIT Tech Report MIT-CSAIL-TR-2008-17, available online at http://hdl.handle.net/1721.1/41070. 2008 [13] J. Li, G. Wang, and L. Fei-Fei. OPTIMOL: automatic Object Picture collecTion via Incremental MOdel Learning. In Proc. CVPR, 2007. [14] N. Loeff, C. Ovesdotter Alm, D. Forsyth. Discriminating Image Senses by Clustering with Multimodal Features. In Proc. ACL 2006. [15] K. Mikolajczyk and C. Schmid. Scale and affine invariant interest point detectors. In Proc. IJCV, 2004. [16] M. Porter, An algorithm for suffix stripping, Program, 14(3) pp 130-137, 1980. [17] K, Saenko and T. Darrell. Unsupervised Learning of Visual Sense Models for Polysemous Words. In Proc. NIPS, 2008. [18] F. Schroff, A. Criminisi and A. Zisserman. Harvesting image databases from the web. In Proc. ICCV, 2007. [19] M. Steyvers and T. Griffiths. Matlab Topic Modeling Toolbox. http://psiexp.ss.uci.edu/research/software.htm [20] D. Yarowsky. Unsupervised word sense disambiguation rivaling supervised methods. ACL, 1995. 9
2009
40
3,789
Heavy-Tailed Symmetric Stochastic Neighbor Embedding Zhirong Yang The Chinese University of Hong Kong Helsinki University of Technology zhirong.yang@tkk.fi Irwin King The Chinese University of Hong Kong king@cse.cuhk.edu.hk Zenglin Xu The Chinese University of Hong Kong Saarland University & MPI for Informatics zlxu@cse.cuhk.edu.hk Erkki Oja Helsinki University of Technology erkki.oja@tkk.fi Abstract Stochastic Neighbor Embedding (SNE) has shown to be quite promising for data visualization. Currently, the most popular implementation, t-SNE, is restricted to a particular Student t-distribution as its embedding distribution. Moreover, it uses a gradient descent algorithm that may require users to tune parameters such as the learning step size, momentum, etc., in finding its optimum. In this paper, we propose the Heavy-tailed Symmetric Stochastic Neighbor Embedding (HSSNE) method, which is a generalization of the t-SNE to accommodate various heavytailed embedding similarity functions. With this generalization, we are presented with two difficulties. The first is how to select the best embedding similarity among all heavy-tailed functions and the second is how to optimize the objective function once the heavy-tailed function has been selected. Our contributions then are: (1) we point out that various heavy-tailed embedding similarities can be characterized by their negative score functions. Based on this finding, we present a parameterized subset of similarity functions for choosing the best tail-heaviness for HSSNE; (2) we present a fixed-point optimization algorithm that can be applied to all heavy-tailed functions and does not require the user to set any parameters; and (3) we present two empirical studies, one for unsupervised visualization showing that our optimization algorithm runs as fast and as good as the best known t-SNE implementation and the other for semi-supervised visualization showing quantitative superiority using the homogeneity measure as well as qualitative advantage in cluster separation over t-SNE. 1 Introduction Visualization as an important tool for exploratory data analysis has attracted much research effort in recent years. A multitude of visualization approaches, especially the nonlinear dimensionality reduction techniques such as Isomap [9], Laplacian Eigenmaps [1], Stochastic Neighbor Embedding (SNE) [6], manifold sculpting [5], and kernel maps with a reference point [8], have been proposed. Although they are reported with good performance on tasks such as unfolding an artificial manifold, they are often not successful at visualizing real-world data with high dimensionalities. A common problem of the above methods is that most mapped data points are crowded together in the center without distinguished gaps that isolate data clusters. It was recently pointed out by van der Maaten and Hinton [10] that the “crowding problem” can be alleviated by using a heavy-tailed distribution in the low-dimensional space. Their method, called t-Distributed Stochastic Neighbor Embedding (t-SNE), is adapted from SNE with two major changes: (1) it uses a symmetrized cost function; and (2) it employs a Student t-distribution with a single degree of freedom (T1). In this way, t-SNE can achieve remarkable superiority in the discovery of clustering structure in highdimensional data. The t-SNE development procedure in [10] is restricted to the T1 distribution as its embedding similarity. However, different data sets or other purposes of dimensionality reduction may require generalizing t-SNE to other heavy-tailed functions. The original t-SNE derivation provides little information for users on how to select the best embedding similarity among all heavy-tailed functions. Furthermore, the original t-SNE optimization algorithm is not convenient when the symmetric SNE is generalized to use various heavy-tailed embedding similarity functions since it builds on the gradient descent approach with momenta. As a result, several optimization parameters need to be manually specified. The performance of the t-SNE algorithm depends on laborious selection of the optimization parameters. For instance, a large learning step size might cause the algorithm to diverge, while a conservative one might lead to slow convergence or poor annealed results. Although comprehensive strategies have been used to improve the optimization performance, they might be still problematic when extended to other applications or embedding similarity functions. In this paper we generalize t-SNE to accommodate various heavy-tailed functions with two major contributions: (1) we propose to characterize heavy-tailed embedding similarities in symmetric SNE by their negative score functions. This further leads to a parameterized subset facilitating the choice of the best tail-heaviness; and (2) we present a general algorithm for optimizing the symmetric SNE objective with any heavy-tailed embedding similarities. The paper is organized as follows. First we briefly review the related work of SSNE and t-SNE in Section 2. In Section 3, we present the generalization of t-SNE to our Heavy-tailed Symmetric SNE (HSSNE) method. Next, a fixed-point optimization algorithm for HSSNE is provided and its convergence is discussed in Section 4. In Section 5, we relate the EM-like behavior of the fixed-point algorithm to a pairwise local mixture model for an in-depth analysis of HSSNE. Section 6 presents two sets of experiments, one for unsupervised and the other for semi-supervised visualization. Finally, conclusions are drawn in Section 7. 2 Symmetric Stochastic Neighbor Embedding Suppose the pairwise similarities of a set of m-dimensional data points X = {xi}n i=1 are encoded in a symmetric matrix P ∈Rn×n + , where Pii = 0 and P ij Pij = 1. Symmetric Stochastic Neighbor Embedding (SSNE) [4, 10] seeks r-dimensional (r ≪m) representations of X, denoted by Y = {yi}n i=1, such that J (Y ) = DKL(P||Q) = X i̸=j Pij log Pij Qij (1) is minimized, where Qij = qij/ P a̸=b qab are the normalized similarities in low-dimensional embedding and qij = exp ¡ −∥yi −yj∥2¢ , qii = 0. (2) The optimization of SSNE uses the gradient descent method with ∂J ∂yi = 4 X j (Pij −Qij)(yi −yj). (3) A momentum term is added to the gradient in order to speed up the optimization: Y (t+1) = Y (t) + η ∂J ∂Y ¯¯¯ Y =Y (t) + β(t) ³ Y (t) −Y (t−1)´ , (4) where Y (t) = [y(t) 1 . . . y(t) n ] ∈Rr×n is the solution in matrix form at iteration t; η is the learning rate; and β(t) is the momentum amount at iteration t. Compared with an earlier method Stochastic Neighbor Embedding (SNE) [6], SSNE uses a symmetrized cost function with simpler gradients. Most mapped points in the SSNE visualizations are often compressed near the center of the visualizing map without clear gaps that separate clusters of the data. The t-Distributed Stochastic Neighbor Embedding (t-SNE) [10] addresses this crowding problem by using the Student t-distribution with a single degree of freedom qij = (1 + ∥yi −yj∥2)−1, qii = 0, (5) as the embedding similarity distribution, which has a heavier tail than the Gaussian used in SNE and SSNE. For brevity we denote such distribution by T1. Using this distribution yields the gradient of t-SNE: ∂J ∂yi = 4 X j (Pij −Qij)(yi −yj)(1 + ∥yi −yj∥2)−1. (6) In addition, t-SNE employs a number of strategies to overcome the difficulties in the optimization based on gradient descent. 3 Heavy-tailed SNE characterized by negative score functions As the gradient derivation in [10] is restricted to the T1 distribution, we derive the gradient with a general function that converts squared distances to similarities, with T1 as a special case. In addition, the direct chain rule used in [10] may cause notational clutter and conceal the working components in the gradients. We instead employ the Lagrangian technique to simplify the derivation. Our approach can provide more insights of the working factor brought by the heavy-tailed functions. Minimizing J (Y ) in Equation (1) with respect to Y is equivalent to the optimization problem: maximize q,Y L(q, Y ) = X ij Pij log qij P a̸=b qab (7) subject to qij = H(∥yi −yj∥2), (8) where the embedding similarity function H(τ) ≥0 can be any function that is monotonically decreasing with respect to τ for τ > 0. Note that H is not required to be defined as a probability function because the symmetric SNE objective already involves normalization over all data pairs. The extended objective using the Lagrangian technique is given by ˜L(q, Y ) = X ij Pij log qij P a̸=b qab + X ij λij £ qij −H(∥yi −yj∥2) ¤ . (9) Setting ∂˜L(q, Y )/∂qij = 0 yields λij = 1/ P a̸=b qab −Pij/qij. Inserting these Lagrangian multipliers to the gradient with respect to yi, we have ∂J (Y ) ∂yi = −∂˜L(q, Y ) ∂yi = 4 X j à 1 P a̸=b qab −Pij qij ! · qij · µ −h(∥yi −yj∥2) qij ¶ (yi −yj) (10) = 4 X j (Pij −Qij)S(∥yi −yj∥2)(yi −yj), (11) where h(τ) = dH(τ)/dτ and S(τ) = −d log H(τ) dτ (12) is the negative score function of H. For notational simplicity, we also write Sij = S(∥yi −yj∥2). We propose to characterize the tail heaviness of the similarity function H, relative to the one that leads to the Gaussian, by its negative score function S, also called tail-heaviness function in this paper. In this characterization, there is a functional operator S that maps every similarity function to a tail-heaviness function. For the baseline Gaussian similarity, H(τ) = exp(−τ), we have S(H) = 1, i.e. S(H)(τ) = 1 for all τ. As for the Student t-distribution of a single degree of freedom, H(τ) = (1 + τ)−1 and thus S(H) = H. The above observation inspires us to further parameterize a family of tail-heaviness functions by the power of H: S(H, α) = Hα for α ≥0, where a larger α value corresponds to a heavier-tailed embedding similarity function. Such a function H can be determined by solving the first-order differential equation −d log H(τ)/dτ = [H(τ)]α, which gives H(τ) = (ατ + c)−1/α (13) 0 1 2 3 4 5 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 τ H(τ)=(1+ατ)−1/α α→ 0 (Gaussian) α=0.5 α=1 (T1) α=1.5 α=2 Figure 1: Several functions in the power family. with c a constant. Here we set c = 1 for a consistent generalization of SNE and t-SNE. Thus the Gaussian embedding similarity function, i.e. H(τ) = exp(−τ), is achieved when α →0. Figure 1 shows a number of functions in the power family. 4 A fixed-Point optimization algorithm Unlike many other dimensionality reduction approaches that can be solved by eigendecomposition in a single step, SNE and its variants require iterative optimization methods. Substantial efforts have been devoted to improve the efficiency and robustness of t-SNE optimization. However it remains unknown whether such a comprehensive implementation also works for other types of embedding similarity functions. Manually adjusting the involved parameters such as the learning rate and the momentum for every function is rather time-consuming and infeasible in practice. Here we propose to optimize symmetric SNE by a fixed-point algorithm. After rearranging the terms in ∂J /∂yi = 0 (see Equation (11)), we obtain the following update rule: Y (t+1) ki = Y (t) ki P j Bij + P j (Aij −Bij) Y (t) kj P j Aij , (14) where Aij = PijS(∥y(t) i −y(t) j ∥2) and Bij = QijS(∥y(t) i −y(t) j ∥2). Our optimization algorithm for HSSNE simply involves the iterative application of Equation (14). Compared with the original t-SNE optimization algorithm, our method requires no user-provided parameters such as the learning step size and momentum, which is more convenient for applications. The fixed-point algorithm usually converges, with the result satisfying the stationary condition ∂J /∂Y = 0. However, it is known that the update rule (14) can diverge in some cases, for example, when Yki are large. Therefore, a proof without extra conditions cannot be constructed. Here we provide two approximative theoretical justifications for the algorithm. Denote ∆= Y −Y (t) and ∇the gradient of J with respect to Y . Let us first approximate the HSSNE objective by the first-order Taylor expansion at the current estimate Y (t): J (Y ) ≈Jlin(Y ) = J (Y (t)) + X ki ∆ki∇(t) ki . (15) Then we can construct an upper bound of Jlin(Y ): G(Y, Y (t)) = Jlin(Y ) + 1 2 X ki ∆2 ki X a Aia (16) as Pia and Sia are all nonnegative. The bound is tight at Y = Y (t), i.e. G(Y (t), Y (t)) = Jlin(Y (t)). Equating ∂G(Y, Y (t))/∂Y = 0 implements minimization of G(Y, Y (t)) and yields the update rule (14). Iteratively applying the update rule (14) thus results in a monotonically decreasing sequence of the linear approximation of HSSNE objective: Jlin(Y (t)) ≥G(Y (t+1), Y (t)) ≥Jlin(Y (t+1)). Even if the second-order terms in the Taylor expansion of J (Y ) are also considered, the update rule (14) is still justified if Yki or Y (t+1) ki −Y (t) ki are small. Let DA and DB be diagonal matrices with DA ii = P j Aij and DB ii = P j Bij. We can write J (Y ) = Jquad(Y ) + O(∆3), where Jquad(Y ) = Jlin(Y ) + 1 2 X ijkl ∆ki∆ljHijkl. (17) With the approximated Hessian Hijkl = δkl £ (DA −A) −(DB −B) ¤ ij, the updating term Uki in Newton’s method Y (t) ki = Y (t−1) ki −Uki can be determined by P ki HijklUki = ∇(t) lj . Solving this equation by directly inverting the huge tensor H is however infeasible in practice and thus usually implemented by iterative methods such as U (v+1) ki = ¡ (A + DB −B)U (v) + ∇(t)¢ ki DA ii . (18) Such iterations albeit still form a costly inner loop over v. To overcome this, we initialize U (0) = 0 and only employ the first iteration of each inner loop. Then one can find that such an approximated Newton’s update rule Y (t+1) ki = Y (t) ki −∇(t) ki DA ii is identical to Equation (14). Such a first-step approximation technique has also been used in the Mean Shift algorithm as a generalized ExpectationMaximization solution [2]. 5 A local mixture interpretation Further rearranging the update rule can give us more insights of the properties of SSNE solutions: Y (t+1) ki = P j Aij h Y (t) kj + Qij Pij (Y (t) ki −Y (t) kj ) i P j Aij . (19) One can see that the above update rule mimics the maximization step in the EM-algorithm for classical Gaussian mixture model (e.g. [7]), or more particularly, the Mean Shift method [3, 2]. This resemblance inspires us to find an alternative interpretation of the SNE behavior in terms of a particular mixture model. Given the current estimate Y (t), the fixed-point update rule actually performs minimization of X ij PijSij∥yi −µ(t) ij ∥2, (20) where µ(t) ij = y(t) j + Qij Pij ³ y(t) i −y(t) j ´ . This problem is equivalent to maximizing the Jensen lower bound of log X ij PijSij exp ³ −∥yi −µ(t) ij ∥2´ . (21) In this form, µ(t) ij can be regarded as the mean of the j-th mixture component for the i-th embedded data point, while the product PijSij can be thought as the mixing coefficients1. Note that each data sample has its own mixing coefficients because of locality sensitivity. For the converged estimate, i.e., Y (t+1) = Y (t) = Y ∗, we can rewrite the mixture without the logarithm as X ij PijSij exp ( − µ 1 −Qij Pij ¶2 ∥y∗ i −y∗ j ∥2 ) . (22) Maximizing this quantity clearly explains the ingredients of symmetric SNE: (1) Pij reflects that symmetric SNE favors close pairs in the input space, which is also adopted by most other locality 1The data samples in such a symmetric mixture model do not follow the independent and identically distributed (i.i.d.) assumption because the mixing coefficient rows are not summed to the same number. Nevertheless, this does not affect our subsequent pairwise analysis. preserving methods. (2) As discussed in Section 3, Sij characterizes the tail heaviness of the embedding similarity function. For the baseline Gaussian similarity, this reduces to one and thus has no effect. For heavy-tailed similarities, Sij can compensate for mismatched dimensionalities between the input space and its embedding. (3) The first factor in the exponential emphasizes the distance graph matching, which underlies the success of SNE and its variants for capturing the global data structure compared with many other approaches that rely on only variance constraints [10]. A pair of Qij that approximates Pij well can increase the exponential, while a pair with a poor mismatch yields little contribution to the mixture. (4) Finally, as credited in many other continuity preserving methods, the second factor in the exponential forces that close pairs in the input space are also situated nearby in the embedding space. 6 Experiments 6.1 t-SNE for unsupervised visualization In this section we present experiments of unsupervised visualization with T1 distribution, where our Fixed-Point t-SNE is compared with the original Gradient t-SNE optimization method as well as another dimensionality reduction approach, Laplacian Eigenmap [1]. Due to space limitation, we only focus on three data sets, iris, wine, and segmentation (training subset) from the UCI repository2. We followed the instructions in [10] for calculating Pij and choosing the learning rate η and momentum amount β(t) for Gradient t-SNE. Alternatively, we excluded two tricks, “early compression” and “early exaggeration”, that are described in [10] from the comparison of long-run optimization because they apparently belong to the initialization stage. Here both Fixed-Point and Gradient tSNEs execute with the same initialization which uses the “early compression” trick and pre-runs the Gradient t-SNE for 50 iterations as suggested in [10]. The visualization quality can be quantified using the ground truth class information. We adopt the measurement of the homogeneity of nearest neighbors: homogeneity = γ/n, (23) where γ is the number of mapped points belonging to the same class with their nearest neighbor and n again is the total number of points. A larger homogeneity generally indicates better separability of the classes. The experimental results are shown in Figure 2. Even though having a globally optimal solution, the Laplacian Eigenmap yields poor visualizations, since none of the classes can be isolated. By contrast, both t-SNE methods achieve much higher homogeneities and most clusters are well separated in the visualization plots. Comparing the two t-SNE implementations, one can see that our simple fixed-point algorithm converges even slightly faster than the comprehensive and carefully tuned Gradient t-SNE. Besides efficiency, our approach performs as good as Gradient t-SNE in terms of both t-SNE objectives and homogeneities of nearest neighbors for these data sets. 6.2 Semi-supervised visualization Unsupervised symmetric SNE or t-SNE may perform poorly for some data sets in terms of identifying classes. In such cases it is better to include some supervised information and apply semisupervised learning to enhance the visualization. Let us consider another data set vehicle from the LIBSVM repository3. The top-left plot in Figure 3 demonstrates a poor visualization using unsupervised Gradient t-SNE. Next, suppose 10% of the intra-class relationships are known. We can construct a supervised matrix u where uij = 1 if xi and xj are known to belong to the same class and 0 otherwise. After normalizing Uij = uij/ P a̸=b uab, we calculate the semi-supervised similarity matrix ˜P = (1−ρ)P+ρU, where the trade-off parameter ρ is set to 0.5 in our experiments. All SNE learning algorithms remain unchanged except that P is replaced with ˜P. 2http://archive.ics.uci.edu/ml/ 3http://www.csie.ntu.edu.tw/∼cjlin/libsvmtools/datasets/ 0 0.2 0.4 0.6 0.8 1 1.2 0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 learning time (seconds) t−SNE cost iris Gradient t−SNE Fixed−Point t−SNE 0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2 learning time (seconds) t−SNE cost wine Gradient t−SNE Fixed−Point t−SNE 0 0.5 1 1.5 2 2.5 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 learning time (seconds) t−SNE cost segmentation Gradient t−SNE Fixed−Point t−SNE −0.05 −0.04 −0.03 −0.02 −0.01 0 0.01 0.02 0.03 0.04 0.05 −0.05 −0.04 −0.03 −0.02 −0.01 0 0.01 0.02 0.03 0.04 0.05 Laplacian Eigenmap, homogeneity=0.47, DKL=1.52 1 2 3 −0.04 −0.03 −0.02 −0.01 0 0.01 0.02 0.03 −0.03 −0.02 −0.01 0 0.01 0.02 0.03 Laplacian Eigenmap, homogeneity=0.38, DKL=1.67 1 2 3 −0.03 −0.02 −0.01 0 0.01 0.02 0.03 0.04 −0.03 −0.02 −0.01 0 0.01 0.02 0.03 Laplacian Eigenmap, homogeneity=0.42, DKL=1.86 1 2 3 4 5 6 7 −20 −15 −10 −5 0 5 10 15 −20 −15 −10 −5 0 5 10 15 Gradient t−SNE, homogeneity=0.96, DKL=0.15 1 2 3 −10 −5 0 5 10 −15 −10 −5 0 5 10 Gradient t−SNE, homogeneity=0.96, DKL=0.36 1 2 3 −20 −15 −10 −5 0 5 10 15 20 25 −20 −15 −10 −5 0 5 10 15 20 Gradient t−SNE, homogeneity=0.86, DKL=0.24 1 2 3 4 5 6 7 −10 −8 −6 −4 −2 0 2 4 6 8 10 −12 −10 −8 −6 −4 −2 0 2 4 6 8 Fixed−Point t−SNE, homogeneity=0.95, DKL=0.16 1 2 3 −10 −5 0 5 10 −10 −5 0 5 10 Fixed−Point t−SNE, homogeneity=0.97, DKL=0.37 1 2 3 −15 −10 −5 0 5 10 15 −10 −5 0 5 10 15 Fixed−Point t−SNE, homogeneity=0.83, DKL=0.24 1 2 3 4 5 6 7 Figure 2: Unsupervised visualization on three data sets. Column 1 to 3 are results of iris, wine and segmentation, respectively. The first row comprises the learning times of Gradient and Fixed-Point t-SNEs. The second to fourth rows are visualizations using Laplacian Eigenmap, Gradient t-SNE, and Fixed-Point t-SNE, respectively. −40 −20 0 20 40 −50 −40 −30 −20 −10 0 10 20 30 40 50 unsupervised Gradient t−SNE, homogeneity=0.69, DKL=3.24 1 2 3 4 −30 −20 −10 0 10 20 30 40 −40 −30 −20 −10 0 10 20 30 40 semi−supervised Gradient t−SNE, homogeneity=0.92, DKL=2.58 1 2 3 4 −3 −2 −1 0 1 2 −3 −2 −1 0 1 2 3 α=0, homogeneity=0.79, DKL=2.78 1 2 3 4 −6 −4 −2 0 2 4 6 −6 −4 −2 0 2 4 6 α=0.5, homogeneity=0.87, DKL=2.71 1 2 3 4 −20 −15 −10 −5 0 5 10 15 −20 −15 −10 −5 0 5 10 15 α=1, homogeneity=0.94, DKL=2.60 1 2 3 4 −30 −20 −10 0 10 20 30 −25 −20 −15 −10 −5 0 5 10 15 20 25 α=1.5, homogeneity=0.96, DKL=2.61 1 2 3 4 Figure 3: Semi-supervised visualization for the vehicle data set. The plots titled with α values are produced using the fixed-point algorithm of the power family of HSSNE. The top-middle plot in Figure 3 shows that inclusion of some supervised information improves the homogeneity (0.92) and visualization, where Class 3 and 4 are identifiable, but the classes are still very close to each other, especially Class 1 and 2 heavily mixed. We then tried the power family of HSSNE with α ranging from 0 to 1.5, using our fixed-point algorithm. It can be seen that with α increased, the cyan and magenta clusters become more separate and Class 1 and 2 can also be identified. With α = 1 and α = 2, the HSSNEs implemented by our fixed-point algorithm achieve even higher homogeneities (0.94 and 0.96, respectively) than the Gradient t-SNE. On the other hand, too large α may increase the number of outliers and the Kullback-Leibler divergence. 7 Conclusions The working mechanism of Heavy-tailed Symmetric Stochastic Neighbor Embedding (HSSNE) has been investigated rigorously. The several findings are: (1) we propose to use a negative score function to characterize and parameterize the heavy-tailed embedding similarity functions; (2) this finding has provided us with a power family of functions that convert distances to embedding similarities; and (3) we have developed a fixed-point algorithm for optimizing SSNE, which greatly saves the effort in tuning program parameters and facilitates the extensions and applications of heavy-tailed SSNE. We have compared HSSNE against t-SNE and Laplacian Eigenmap using UCI and LIBSVM repositories. Two sets of experimental results from unsupervised and semi-supervised visualization indicate that our method is efficient, accurate, and versatile over the other two approaches. Our future work might include further empirical studies on the learning speed and robustness of HSSNE by using more extensive, especially large-scale, experiments. It also remains important to investigate acceleration techniques in both initialization and long-run stages of the learning. 8 Acknowledgement The authors appreciate the reviewers for their extensive and informative comments for the improvement of this paper. This work is supported by a grant from the Research Grants Council of the Hong Kong Special Administrative Region, China (Project No. CUHK 4128/08E). References [1] M. Belkin and P. Niyogi. Laplacian eigenmaps and spectral techniques for embedding and clustering. Advances in neural information processing systems, 14:585–591, 2002. [2] M. A. Carreira-Perpi˜n´an. Gaussian mean-shift is an em algorithm. IEEE Transactions On Pattern Analysis And Machine Intelligence, 29(5):767–776, 2007. [3] D. Comaniciu and M. Peter. Mean Shift: A robust approach toward feature space analysis. IEEE Transactions on Pattern Analysis and Machine Intelligence, 24(5):603–619, 2002. [4] J. A. Cook, I. Sutskever, A. Mnih, and G. E. Hinton. Visualizing similarity data with a mixture of maps. In Proceedings of the 11th International Conference on Artificial Intelligence and Statistics, volume 2, pages 67–74, 2007. [5] M. Gashler, D. Ventura, and T. Martinez. Iterative non-linear dimensionality reduction with manifold sculpting. In J.C. Platt, D. Koller, Y. Singer, and S. Roweis, editors, Advances in Neural Information Processing Systems 20, pages 513–520. MIT Press, Cambridge, MA, 2008. [6] G. Hinton and S. Roweis. Stochastic neighbor embedding. Advances in Neural Information Processing Systems, 15:833–840, 2003. [7] G. J. McLachlan and D. Peel. Finite Mixture Models. Wiley, 2000. [8] J. A. K. Suykens. Data visualization and dimensionality reduction using kernel maps with a reference point. IEEE Transactions on Neural Networks, 19(9):1501–1517, 2008. [9] J. B. Tenenbaum, V. Silva, and J. C. Langford. A global geometric framework for nonlinear dimensionality reduction. Science, 290(5500):2319–2323, Dec. 2000. [10] L. van der Maaten and G. Hinton. Visualizing data using t-SNE. Journal of Machine Learning Research, 9:2579–2605, 2008.
2009
41
3,790
Which graphical models are difficult to learn? Jos´e Bento Department of Electrical Engineering Stanford University jbento@stanford.edu Andrea Montanari Department of Electrical Engineering and Department of Statistics Stanford University montanari@stanford.edu Abstract We consider the problem of learning the structure of Ising models (pairwise binary Markov random fields) from i.i.d. samples. While several methods have been proposed to accomplish this task, their relative merits and limitations remain somewhat obscure. By analyzing a number of concrete examples, we show that low-complexity algorithms systematically fail when the Markov random field develops long-range correlations. More precisely, this phenomenon appears to be related to the Ising model phase transition (although it does not coincide with it). 1 Introduction and main results Given a graph G = (V = [p], E), and a positive parameter θ > 0 the ferromagnetic Ising model on G is the pairwise Markov random field µG,θ(x) = 1 ZG,θ Y (i,j)∈E eθxixj (1) over binary variables x = (x1, x2, . . . , xp). Apart from being one of the most studied models in statistical mechanics, the Ising model is a prototypical undirected graphical model, with applications in computer vision, clustering and spatial statistics. Its obvious generalization to edge-dependent parameters θij, (i, j) ∈E is of interest as well, and will be introduced in Section 1.2.2. (Let us stress that we follow the statistical mechanics convention of calling (1) an Ising model for any graph G.) In this paper we study the following structural learning problem: Given n i.i.d. samples x(1), x(2),. . . , x(n) with distribution µG,θ( · ), reconstruct the graph G. For the sake of simplicity, we assume that the parameter θ is known, and that G has no double edges (it is a ‘simple’ graph). The graph learning problem is solvable with unbounded sample complexity, and computational resources [1]. The question we address is: for which classes of graphs and values of the parameter θ is the problem solvable under appropriate complexity constraints? More precisely, given an algorithm Alg, a graph G, a value θ of the model parameter, and a small δ > 0, the sample complexity is defined as nAlg(G, θ) ≡inf n n ∈N : Pn,G,θ{Alg(x(1), . . . , x(n)) = G} ≥1 −δ o , (2) where Pn,G,θ denotes probability with respect to n i.i.d. samples with distribution µG,θ. Further, we let χAlg(G, θ) denote the number of operations of the algorithm Alg, when run on nAlg(G, θ) samples.1 1For the algorithms analyzed in this paper, the behavior of nAlg and χAlg does not change significantly if we require only ‘approximate’ reconstruction (e.g. in graph distance). 1 The general problem is therefore to characterize the functions nAlg(G, θ) and χAlg(G, θ), in particular for an optimal choice of the algorithm. General bounds on nAlg(G, θ) have been given in [2, 3], under the assumption of unbounded computational resources. A general charactrization of how well low complexity algorithms can perform is therefore lacking. Although we cannot prove such a general characterization, in this paper we estimate nAlg and χAlg for a number of graph models, as a function of θ, and unveil a fascinating universal pattern: when the model (1) develops long range correlations, low-complexity algorithms fail. Under the Ising model, the variables {xi}i∈V become strongly correlated for θ large. For a large class of graphs with degree bounded by ∆, this phenomenon corresponds to a phase transition beyond some critical value of θ uniformly bounded in p, with typically θcrit ≤const./∆. In the examples discussed below, the failure of low-complexity algorithms appears to be related to this phase transition (although it does not coincide with it). 1.1 A toy example: the thresholding algorithm In order to illustrate the interplay between graph structure, sample complexity and interaction strength θ, it is instructive to consider a warmup example. The thresholding algorithm reconstructs G by thresholding the empirical correlations bCij ≡1 n n X ℓ=1 x(ℓ) i x(ℓ) j for i, j ∈V . (3) THRESHOLDING( samples {x(ℓ)}, threshold τ ) 1: Compute the empirical correlations { bCij}(i,j)∈V ×V ; 2: For each (i, j) ∈V × V 3: If bCij ≥τ, set (i, j) ∈E; We will denote this algorithm by Thr(τ). Notice that its complexity is dominated by the computation of the empirical correlations, i.e. χThr(τ) = O(p2n). The sample complexity nThr(τ) can be bounded for specific classes of graphs as follows (the proofs are straightforward and omitted from this paper). Theorem 1.1. If G has maximum degree ∆> 1 and if θ < atanh(1/(2∆)) then there exists τ = τ(θ) such that nThr(τ)(G, θ) ≤ 8 (tanh θ − 1 2∆)2 log 2p δ . (4) Further, the choice τ(θ) = (tanh θ + (1/2∆))/2 achieves this bound. Theorem 1.2. There exists a numerical constant K such that the following is true. If ∆> 3 and θ > K/∆, there are graphs of bounded degree ∆such that for any τ, nThr(τ) = ∞, i.e. the thresholding algorithm always fails with high probability. These results confirm the idea that the failure of low-complexity algorithms is related to long-range correlations in the underlying graphical model. If the graph G is a tree, then correlations between far apart variables xi, xj decay exponentially with the distance between vertices i, j. The same happens on bounded-degree graphs if θ ≤const./∆. However, for θ > const./∆, there exists families of bounded degree graphs with long-range correlations. 1.2 More sophisticated algorithms In this section we characterize χAlg(G, θ) and nAlg(G, θ) for more advanced algorithms. We again obtain very distinct behaviors of these algorithms depending on long range correlations. Due to space limitations, we focus on two type of algorithms and only outline the proof of our most challenging result, namely Theorem 1.6. In the following we denote by ∂i the neighborhood of a node i ∈G (i /∈∂i), and assume the degree to be bounded: |∂i| ≤∆. 1.2.1 Local Independence Test A recurring approach to structural learning consists in exploiting the conditional independence structure encoded by the graph [1, 4, 5, 6]. 2 Let us consider, to be definite, the approach of [4], specializing it to the model (1). Fix a vertex r, whose neighborhood we want to reconstruct, and consider the conditional distribution of xr given its neighbors2: µG,θ(xr|x∂r). Any change of xi, i ∈∂r, produces a change in this distribution which is bounded away from 0. Let U be a candidate neighborhood, and assume U ⊆∂r. Then changing the value of xj, j ∈U will produce a noticeable change in the marginal of Xr, even if we condition on the remaining values in U and in any W, |W| ≤∆. On the other hand, if U ⊈∂r, then it is possible to find W (with |W| ≤∆) and a node i ∈U such that, changing its value after fixing all other values in U ∪W will produce no noticeable change in the conditional marginal. (Just choose i ∈U\∂r and W = ∂r\U). This procedure allows us to distinguish subsets of ∂r from other sets of vertices, thus motivating the following algorithm. LOCAL INDEPENDENCE TEST( samples {x(ℓ)}, thresholds (ǫ, γ) ) 1: Select a node r ∈V ; 2: Set as its neighborhood the largest candidate neighbor U of size at most ∆for which the score function SCORE(U) > ǫ/2; 3: Repeat for all nodes r ∈V ; The score function SCORE( · ) depends on ({x(ℓ)}, ∆, γ) and is defined as follows, min W,j max xi,xW ,xU,xj|bPn,G,θ{Xi = xi|XW = xW , XU = xU}− bPn,G,θ{Xi = xi|XW = xW , XU\j = xU\j, Xj = xj}| . (5) In the minimum, |W| ≤∆and j ∈U. In the maximum, the values must be such that bPn,G,θ{XW = xW , XU = xU} > γ/2, bPn,G,θ{XW = xW , XU\j = xU\j, Xj = xj} > γ/2 bPn,G,θ is the empirical distribution calculated from the samples {x(ℓ)}. We denote this algorithm by Ind(ǫ, γ). The search over candidate neighbors U, the search for minima and maxima in the computation of the SCORE(U) and the computation of bPn,G,θ all contribute for χInd(G, θ). Both theorems that follow are consequences of the analysis of [4]. Theorem 1.3. Let G be a graph of bounded degree ∆≥1. For every θ there exists (ǫ, γ), and a numerical constant K, such that nInd(ǫ,γ)(G, θ) ≤100∆ ǫ2γ4 log 2p δ , χInd(ǫ,γ)(G, θ) ≤K (2p)2∆+1 log p . More specifically, one can take ǫ = 1 4 sinh(2θ), γ = e−4∆θ 2−2∆. This first result implies in particular that G can be reconstructed with polynomial complexity for any bounded ∆. However, the degree of such polynomial is pretty high and non-uniform in ∆. This makes the above approach impractical. A way out was proposed in [4]. The idea is to identify a set of ‘potential neighbors’ of vertex r via thresholding: B(r) = {i ∈V : bCri > κ/2} , (6) For each node r ∈V , we evaluate SCORE(U) by restricting the minimum in Eq. (5) over W ⊆B(r), and search only over U ⊆B(r). We call this algorithm IndD(ǫ, γ, κ). The basic intuition here is that Cri decreases rapidly with the graph distance between vertices r and i. As mentioned above, this is true at small θ. Theorem 1.4. Let G be a graph of bounded degree ∆≥1. Assume that θ < K/∆for some small enough constant K. Then there exists ǫ, γ, κ such that nIndD(ǫ,γ,κ)(G, θ) ≤8(κ2 + 8∆) log 4p δ , χIndD(ǫ,γ,κ)(G, θ) ≤K′p∆∆log(4/κ) α + K′∆p2 log p . More specifically, we can take κ = tanh θ, ǫ = 1 4 sinh(2θ) and γ = e−4∆θ 2−2∆. 2If a is a vector and R is a set of indices then we denote by aR the vector formed by the components of a with index in R. 3 1.2.2 Regularized Pseudo-Likelihoods A different approach to the learning problem consists in maximizing an appropriate empirical likelihood function [7, 8, 9, 10, 13]. To control the fluctuations caused by the limited number of samples, and select sparse graphs a regularization term is often added [7, 8, 9, 10, 11, 12, 13]. As a specific low complexity implementation of this idea, we consider the ℓ1-regularized pseudolikelihood method of [7]. For each node r, the following likelihood function is considered L(θ; {x(ℓ)}) = −1 n n X ℓ=1 log Pn,G,θ(x(ℓ) r |x(ℓ) \r ) (7) where x\r = xV \r = {xi : i ∈V \ r} is the vector of all variables except xr and Pn,G,θ is defined from the following extension of (1), µG,θ(x) = 1 ZG,θ Y i,j∈V eθijxixj (8) where θ = {θij}i,j∈V is a vector of real parameters. Model (1) corresponds to θij = 0, ∀(i, j) /∈E and θij = θ, ∀(i, j) ∈E. The function L(θ; {x(ℓ)}) depends only on θr,· = {θrj, j ∈∂r} and is used to estimate the neighborhood of each node by the following algorithm, Rlr(λ), REGULARIZED LOGISTIC REGRESSION( samples {x(ℓ)}, regularization (λ)) 1: Select a node r ∈V ; 2: Calculate ˆθr,· = arg min θr,·∈Rp−1{L(θr,·; {x(ℓ)}) + λ||θr,·||1}; 3: If ˆθrj > 0, set (r, j) ∈E; Our first result shows that Rlr(λ) indeed reconstructs G if θ is sufficiently small. Theorem 1.5. There exists numerical constants K1, K2, K3, such that the following is true. Let G be a graph with degree bounded by ∆≥3. If θ ≤K1/∆, then there exist λ such that nRlr(λ)(G, θ) ≤K2 θ−2 ∆log 8p2 δ . (9) Further, the above holds with λ = K3 θ ∆−1/2. This theorem is proved by noting that for θ ≤K1/∆correlations decay exponentially, which makes all conditions in Theorem 1 of [7] (denoted there by A1 and A2) hold, and then computing the probability of success as a function of n, while strenghtening the error bounds of [7]. In order to prove a converse to the above result, we need to make some assumptions on λ. Given θ > 0, we say that λ is ‘reasonable for that value of θ if the following conditions old: (i) Rlr(λ) is successful with probability larger than 1/2 on any star graph (a graph composed by a vertex r connected to ∆neighbors, plus isolated vertices); (ii) λ ≤δ(n) for some sequence δ(n) ↓0. Theorem 1.6. There exists a numerical constant K such that the following happens. If ∆> 3, θ > K/∆, then there exists graphs G of degree bounded by ∆such that for all reasonable λ, nRlr(λ)(G) = ∞, i.e. regularized logistic regression fails with high probability. The graphs for which regularized logistic regression fails are not contrived examples. Indeed we will prove that the claim in the last theorem holds with high probability when G is a uniformly random graph of regular degree ∆. The proof Theorem 1.6 is based on showing that an appropriate incoherence condition is necessary for Rlr to successfully reconstruct G. The analogous result was proven in [14] for model selection using the Lasso. In this paper we show that such a condition is also necessary when the underlying model is an Ising model. Notice that, given the graph G, checking the incoherence condition is NP-hard for general (non-ferromagnetic) Ising model, and requires significant computational effort 4 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 5 10 15 20 0 0.2 0.4 0.6 0.8 1 1.2 0 0.2 0.4 0.6 0.8 1 λ0 θ θcrit θ Psucc Figure 1: Learning random subgraphs of a 7 × 7 (p = 49) two-dimensional grid from n = 4500 Ising models samples, using regularized logistic regression. Left: success probability as a function of the model parameter θ and of the regularization parameter λ0 (darker corresponds to highest probability). Right: the same data plotted for several choices of λ versus θ. The vertical line corresponds to the model critical temperature. The thick line is an envelope of the curves obtained for different λ, and should correspond to optimal regularization. even in the ferromagnetic case. Hence the incoherence condition does not provide, by itself, a clear picture of which graph structure are difficult to learn. We will instead show how to evaluate it on specific graph families. Under the restriction λ →0 the solutions given by Rlr converge to θ∗with n [7]. Thus, for large n we can expand L around θ∗to second order in (θ −θ∗). When we add the regularization term to L we obtain a quadratic model analogous the Lasso plus the error term due to the quadratic approximation. It is thus not surprising that, when λ →0 the incoherence condition introduced for the Lasso in [14] is also relevant for the Ising model. 2 Numerical experiments In order to explore the practical relevance of the above results, we carried out extensive numerical simulations using the regularized logistic regression algorithm Rlr(λ). Among other learning algorithms, Rlr(λ) strikes a good balance of complexity and performance. Samples from the Ising model (1) where generated using Gibbs sampling (a.k.a. Glauber dynamics). Mixing time can be very large for θ ≥θcrit, and was estimated using the time required for the overall bias to change sign (this is a quite conservative estimate at low temperature). Generating the samples {x(ℓ)} was indeed the bulk of our computational effort and took about 50 days CPU time on Pentium Dual Core processors (we show here only part of these data). Notice that Rlr(λ) had been tested in [7] only on tree graphs G, or in the weakly coupled regime θ < θcrit. In these cases sampling from the Ising model is easy, but structural learning is also intrinsically easier. Figure reports the success probability of Rlr(λ) when applied to random subgraphs of a 7 × 7 two-dimensional grid. Each such graphs was obtained by removing each edge independently with probability ρ = 0.3. Success probability was estimated by applying Rlr(λ) to each vertex of 8 graphs (thus averaging over 392 runs of Rlr(λ)), using n = 4500 samples. We scaled the regularization parameter as λ = 2λ0θ(log p/n)1/2 (this choice is motivated by the algorithm analysis and is empirically the most satisfactory), and searched over λ0. The data clearly illustrate the phenomenon discussed. Despite the large number of samples n ≫log p, when θ crosses a threshold, the algorithm starts performing poorly irrespective of λ. Intriguingly, this threshold is not far from the critical point of the Ising model on a randomly diluted grid θcrit(ρ = 0.3) ≈0.7 [15, 16]. 5 0 0.2 0.4 0.6 0.8 1 1.2 0 2000 4000 6000 8000 10000 0 0.2 0.4 0.6 0.8 1 1.2 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 Psucc θ = 0.35, 0.40 θ = 0.25 θ = 0.20 θ = 0.10 θ = 0.45 θ = 0.50 θ = 0.65, 0.60, 0.55 n θ θthr Psucc Figure 2: Learning uniformly random graphs of degree 4 from Ising models samples, using Rlr. Left: success probability as a function of the number of samples n for several values of θ. Right: the same data plotted for several choices of λ versus θ as in Fig. 1, right panel. Figure 2 presents similar data when G is a uniformly random graph of degree ∆= 4, over p = 50 vertices. The evolution of the success probability with n clearly shows a dichotomy. When θ is below a threshold, a small number of samples is sufficient to reconstruct G with high probability. Above the threshold even n = 104 samples are to few. In this case we can predict the threshold analytically, cf. Lemma 3.3 below, and get θthr(∆= 4) ≈0.4203, which compares favorably with the data. 3 Proofs In order to prove Theorem 1.6, we need a few auxiliary results. It is convenient to introduce some notations. If M is a matrix and R, P are index sets then MR P denotes the submatrix with row indices in R and column indices in P. As above, we let r be the vertex whose neighborhood we are trying to reconstruct and define S = ∂r, Sc = V \ ∂r ∪r. Since the cost function L(θ; {x(ℓ)}) + λ||θ||1 only depend on θ through its components θr,· = {θrj}, we will hereafter neglect all the other parameters and write θ as a shorthand of θr,·. Let ˆz∗be a subgradient of ||θ||1 evaluated at the true parameters values, θ∗= {θrj : θij = 0, ∀j /∈ ∂r, θrj = θ, ∀j ∈∂r}. Let ˆθ n be the parameter estimate returned by Rlr(λ) when the number of samples is n. Note that, since we assumed θ∗≥0, ˆz∗ S = 1. Define Qn(θ, ; {x(ℓ)}) to be the Hessian of L(θ; {x(ℓ)}) and Q(θ) = limn→∞Qn(θ, ; {x(ℓ)}). By the law of large numbers Q(θ) is the Hessian of EG,θ log PG,θ(Xr|X\r) where EG,θ is the expectation with respect to (8) and X is a random variable distributed according to (8). We will denote the maximum and minimum eigenvalue of a symmetric matrix M by σmax(M) and σmin(M) respectively. We will omit arguments whenever clear from the context. Any quantity evaluated at the true parameter values will be represented with a ∗, e.g. Q∗= Q(θ∗). Quantities under a ∧depend on n. Throughout this section G is a graph of maximum degree ∆. 3.1 Proof of Theorem 1.6 Our first auxiliary results establishes that, if λ is small, then ||Q∗ ScSQ∗ SS −1ˆz∗ S||∞> 1 is a sufficient condition for the failure of Rlr(λ). Lemma 3.1. Assume [Q∗ ScSQ∗ SS −1ˆz∗ S]i ≥1+ǫ for some ǫ > 0 and some row i ∈V , σmin(Q∗ SS) ≥ Cmin > 0, and λ < p C3 minǫ/29∆4. Then the success probability of Rlr(λ) is upper bounded as Psucc ≤4∆2e−nδ2 A + 2∆e−nλ2δ2 B (10) where δA = (C2 min/100∆2)ǫ and δB = (Cmin/8∆)ǫ. 6 The next Lemma implies that, for λ to be ‘reasonable’ (in the sense introduced in Section 1.2.2), nλ2 must be unbounded. Lemma 3.2. There exist M = M(K, θ) > 0 for θ > 0 such that the following is true: If G is the graph with only one edge between nodes r and i and nλ2 ≤K, then Psucc ≤e−M(K,θ)p + e−n(1−tanh θ)2/32 . (11) Finally, our key result shows that the condition ||Q∗ ScSQ∗ SS −1ˆz∗ S||∞≤1 is violated with high probability for large random graphs. The proof of this result relies on a local weak convergence result for ferromagnetic Ising models on random graphs proved in [17]. Lemma 3.3. Let G be a uniformly random regular graph of degree ∆> 3, and ǫ > 0 be sufficiently small. Then, there exists θthr(∆, ǫ) such that, for θ > θthr(∆, ǫ), ||Q∗ ScSQ∗ SS −1ˆz∗ S||∞≥1 + ǫ with probability converging to 1 as p →∞. Furthermore, for large ∆, θthr(∆, 0+) = ˜θ ∆−1(1 + o(1)). The constant ˜θ is given by ˜θ = tanh ¯h)/¯h and ¯h is the unique positive solution of ¯h tanh ¯h = (1 −tanh2 ¯h)2. Finally, there exist Cmin > 0 dependent only on ∆and θ such that σmin(Q∗ SS) ≥Cmin with probability converging to 1 as p →∞. The proofs of Lemmas 3.1 and 3.3 are sketched in the next subsection. Lemma 3.2 is more straightforward and we omit its proof for space reasons. Proof. (Theorem 1.6) Fix ∆> 3, θ > K/∆(where K is a large enough constant independent of ∆), and ǫ, Cmin > 0 and both small enough. By Lemma 3.3, for any p large enough we can choose a ∆-regular graph Gp = (V = [p], Ep) and a vertex r ∈V such that |Q∗ ScSQ∗ SS −1 1S|i > 1 + ǫ for some i ∈V \ r. By Theorem 1 in [4] we can assume, without loss of generality n > K′∆log p for some small constant K′. Further by Lemma 3.2, nλ2 ≥F(p) for some F(p) ↑∞as p →∞and the condition of Lemma 3.1 on λ is satisfied since by the ”reasonable” assumption λ →0 with n. Using these results in Eq. (10) of Lemma 3.1 we get the following upper bound on the success probability Psucc(Gp) ≤4∆2p−δ2 AK′∆+ 2∆e−nF (p)δ2 B . (12) In particular Psucc(Gp) →0 as p →∞. 3.2 Proofs of auxiliary lemmas Proof. (Lemma 3.1) We will show that under the assumptions of the lemma and if ˆθ = (ˆθS, ˆθSC) = (ˆθS, 0) then the probability that the i component of any subgradient of L(θ; {x(ℓ)})+λ||θ||1 vanishes for any ˆθS > 0 (component wise) is upper bounded as in Eq. (10). To simplify notation we will omit {x(ℓ)} in all the expression derived from L. Let ˆz be a subgradient of ||θ|| at ˆθ and assume ∇L(ˆθ) + λˆz = 0. An application of the mean value theorem yields ∇2L(θ∗)[ˆθ −θ∗] = W n −λˆz + Rn , (13) where W n = −∇L(θ∗) and [Rn]j = [∇2L(¯θ (j)) −∇2L(θ∗)]T j (ˆθ −θ∗) with ¯θ (j) a point in the line from ˆθ to θ∗. Notice that by definition ∇2L(θ∗) = Qn∗= Qn(θ∗). To simplify notation we will omit the ∗in all Qn∗. All Qn in this proof are thus evaluated at θ∗. Breaking this expression into its S and Sc components and since ˆθSC = θ∗ SC = 0 we can eliminate ˆθS −θ∗ S from the two expressions obtained and write [W n SC −Rn SC] −Qn SCS(Qn SS)−1[W n S −Rn S] + λQn SCS(Qn SS)−1ˆzS = λˆzSC . (14) Now notice that Qn SCS(Qn SS)−1 = T1 + T2 + T3 + T4 where T1 = Q∗ SCS[(Qn SS)−1 −(Q∗ SS)−1] , T2 = [Qn SCS −Q∗ SCS]Q∗ SS −1 , T3 = [Qn SCS −Q∗ SCS][(Qn SS)−1 −(Q∗ SS)−1] , T4 = Q∗ SCSQ∗ SS −1 . 7 We will assume that the samples {x(ℓ)} are such that the following event holds E ≡{||Qn SS −Q∗ SS||∞< ξA, ||Qn SCS −Q∗ SCS||∞< ξB, ||W n S /λ||∞< ξC} , (15) where ξA ≡C2 minǫ/(16∆), ξB ≡Cminǫ/(8 √ ∆) and ξC ≡Cminǫ/(8∆). Since EG,θ(Qn) = Q∗ and EG,θ(W n) = 0 and noticing that both Qn and W n are sums of bounded i.i.d. random variables, a simple application of Azuma-Hoeffding inequality upper bounds the probability of E as in (10). From E it follows that σmin(Qn SS) > σmin(Q∗ SS) −Cmin/2 > Cmin/2. We can therefore lower bound the absolute value of the ith component of ˆzSC by |[Q∗ SCSQ∗ SS −1 1S]i|−||T1,i||∞−||T2,i||∞−||T3,i||∞− W n i λ − Rn i λ −∆ Cmin  W n S λ ∞+ Rn S λ ∞  , where the subscript i denotes the i-th row of a matrix. The proof is completed by showing that the event E and the assumptions of the theorem imply that each of last 7 terms in this expression is smaller than ǫ/8. Since |[Q∗ SCSQ∗ SS −1]T i ˆzn S| ≥1 + ǫ by assumption, this implies |ˆzi| ≥1 + ǫ/8 > 1 which cannot be since any subgradient of the 1-norm has components of magnitude at most 1. The last condition on E immediately bounds all terms involving W by ǫ/8. Some straightforward manipulations imply (See Lemma 7 from [7]) ||T1,i||∞≤ ∆ C2 min ||Qn SS −Q∗ SS||∞, ||T2,i||∞≤ √ ∆ Cmin ||[Qn SCS −Q∗ SCS]i||∞, ||T3,i||∞≤2∆ C2 min ||Qn SS −Q∗ SS||∞||[Qn SCS −Q∗ SCS]i||∞, and thus all will be bounded by ǫ/8 when E holds. The upper bound of Rn follows along similar lines via an mean value theorem, and is deferred to a longer version of this paper. Proof. (Lemma 3.3.) Let us state explicitly the local weak convergence result mentioned in Sec. 3.1. For t ∈N, let T(t) = (VT, ET) be the regular rooted tree of t generations and define the associated Ising measure as µ+ T,θ(x) = 1 ZT,θ Y (i,j)∈ET eθxixj Y i∈∂T(t) eh∗xi . (16) Here ∂T(t) is the set of leaves of T(t) and h∗is the unique positive solution of h = (∆− 1) atanh {tanh θ tanh h}. It can be proved using [17] and uniform continuity with respect to the ‘external field’ that non-trivial local expectations with respect to µG,θ(x) converge to local expectations with respect to µ+ T,θ(x), as p →∞. More precisely, let Br(t) denote a ball of radius t around node r ∈G (the node whose neighborhood we are trying to reconstruct). For any fixed t, the probability that Br(t) is not isomorphic to T(t) goes to 0 as p →∞. Let g(xBr(t)) be any function of the variables in Br(t) such that g(xBr(t)) = g(−xBr(t)). Then almost surely over graph sequences Gp of uniformly random regular graphs with p nodes (expectations here are taken with respect to the measures (1) and (16)) lim p→∞EG,θ{g(XBr(t))} = ET(t),θ,+{g(XT(t))} . (17) The proof consists in considering [Q∗ ScSQ∗ SS −1ˆz∗ S]i for t = dist(r, i) finite. We then write (Q∗ SS)lk = E{gl,k(X Br(t))} and (Q∗ ScS)il = E{gi,l(X Br(t))} for some functions g·,·(X Br(t)) and apply the weak convergence result (17) to these expectations. We thus reduced the calculation of [Q∗ ScSQ∗ SS −1ˆz∗ S]i to the calculation of expectations with respect to the tree measure (16). The latter can be implemented explicitly through a recursive procedure, with simplifications arising thanks to the tree symmetry and by taking t ≫1. The actual calculations consist in a (very) long exercise in calculus and we omit them from this outline. The lower bound on σmin(Q∗ SS) is proved by a similar calculation. Acknowledgments This work was partially supported by a Terman fellowship, the NSF CAREER award CCF-0743978 and the NSF grant DMS-0806211 and by a Portuguese Doctoral FCT fellowship. 8 References [1] P. Abbeel, D. Koller and A. Ng, “Learning factor graphs in polynomial time and sample complexity”. Journal of Machine Learning Research., 2006, Vol. 7, 1743–1788. [2] M. Wainwright, “Information-theoretic limits on sparsity recovery in the high-dimensional and noisy setting”, arXiv:math/0702301v2 [math.ST], 2007. [3] N. Santhanam, M. Wainwright, “Information-theoretic limits of selecting binary graphical models in high dimensions”, arXiv:0905.2639v1 [cs.IT], 2009. [4] G. Bresler, E. Mossel and A. Sly, “Reconstruction of Markov Random Fields from Samples: Some Observations and Algorithms”,Proceedings of the 11th international workshop, APPROX 2008, and 12th international workshop RANDOM 2008, 2008 ,343–356. [5] Csiszar and Z. Talata, “Consistent estimation of the basic neighborhood structure of Markov random fields”, The Annals of Statistics, 2006, 34, Vol. 1, 123-145. [6] N. Friedman, I. Nachman, and D. Peer, “Learning Bayesian network structure from massive datasets: The sparse candidate algorithm”. In UAI, 1999. [7] P. Ravikumar, M. Wainwright and J. Lafferty, “High-Dimensional Ising Model Selection Using l1-Regularized Logistic Regression”, arXiv:0804.4202v1 [math.ST], 2008. [8] M.Wainwright, P. Ravikumar, and J. Lafferty, “Inferring graphical model structure using l1regularized pseudolikelihood“, In NIPS, 2006. [9] H. H¨ofling and R. Tibshirani, “Estimation of Sparse Binary Pairwise Markov Networks using Pseudo-likelihoods” , Journal of Machine Learning Research, 2009, Vol. 10, 883–906. [10] O.Banerjee, L. El Ghaoui and A. d’Aspremont, “Model Selection Through Sparse Maximum Likelihood Estimation for Multivariate Gaussian or Binary Data”, Journal of Machine Learning Research, March 2008, Vol. 9, 485–516. [11] M. Yuan and Y. Lin, “Model Selection and Estimation in Regression with Grouped Variables”, J. Royal. Statist. Soc B, 2006, 68, Vol. 19,49–67. [12] N. Meinshausen and P. B¨uuhlmann, “High dimensional graphs and variable selection with the lasso”, Annals of Statistics, 2006, 34, Vol. 3. [13] R. Tibshirani, “Regression shrinkage and selection via the lasso”, Journal of the Royal Statistical Society, Series B, 1994, Vol. 58, 267–288. [14] P. Zhao, B. Yu, “On model selection consistency of Lasso”, Journal of Machine. Learning Research 7, 25412563, 2006. [15] D. Zobin, ”Critical behavior of the bond-dilute two-dimensional Ising model“, Phys. Rev., 1978 ,5, Vol. 18, 2387 – 2390. [16] M. Fisher, ”Critical Temperatures of Anisotropic Ising Lattices. II. General Upper Bounds”, Phys. Rev. 162 ,Oct. 1967, Vol. 2, 480–485. [17] A. Dembo and A. Montanari, “Ising Models on Locally Tree Like Graphs”, Ann. Appl. Prob. (2008), to appear, arXiv:0804.4726v2 [math.PR] 9
2009
42
3,791
Information-theoretic lower bounds on the oracle complexity of convex optimization Alekh Agarwal Computer Science Division UC Berkeley alekh@cs.berkeley.edu Peter Bartlett Computer Science Division Department of Statistics UC Berkeley bartlett@cs.berkeley.edu Pradeep Ravikumar Department of Computer Sciences UT Austin pradeepr@cs.utexas.edu Martin J. Wainwright Department of EECS, and Department of Statistics UC Berkeley wainwrig@eecs.berkeley.edu Abstract Despite a large literature on upper bounds on complexity of convex optimization, relatively less attention has been paid to the fundamental hardness of these problems. Given the extensive use of convex optimization in machine learning and statistics, gaining a understanding of these complexity-theoretic issues is important. In this paper, we study the complexity of stochastic convex optimization in an oracle model of computation. We improve upon known results and obtain tight minimax complexity estimates for various function classes. We also discuss implications of these results for the understanding the inherent complexity of large-scale learning and estimation problems. 1 Introduction Convex optimization forms the backbone of many algorithms for statistical learning and estimation. In large-scale learning problems, in which the problem dimension and/or data are large, it is essential to exploit bounded computational resources in a (near)-optimal manner. For such problems, understanding the computational complexity of convex optimization is a key issue. A large body of literature is devoted to obtaining rates of convergence of specific procedures for various classes of convex optimization problems. A typical outcome of such analysis is an upper bound on the error—for instance, gap to the optimal cost— as a function of the number of iterations. Such analyses have been performed for many standard optimization alogrithms, among them gradient descent, mirror descent, interior point programming, and stochastic gradient descent, to name a few. We refer the reader to standard texts on optimization (e.g., [4, 1, 10]) for further details on such results. On the other hand, there has been relatively little study of the inherent complexity of convex optimization problems. To the best of our knowledge, the first formal study in this area was undertaken in the seminal work of Nemirovski and Yudin [8] (hereafter referred to as NY). One obstacle to a classical complexity-theoretic analysis, as the authors observed, was that of casting convex optimization problems in a Turing Machine model. They avoided this problem by instead considering a natural oracle model of complexity in which at every round, the optimization procedure queries an oracle for certain information on the function being optimized. Working within this framework, the authors obtained a series of lower bounds on the computational complexity of convex optimization 1 problems. In addition to the original text NY [8], we refer the reader to Nesterov [10] or the lecture notes by Nemirovski [7]. In this paper, we consider the computational complexity of stochastic convex optimization in the oracle model. Our results lead to a characterization of the inherent difficulty of learning and estimation problems when computational resources are constrained. In particular, we improve upon the work of NY [8] in two ways. First, our lower bounds have an improved dependence on the dimension of the space. In the context of statistical estimation, these bounds show how the difficulty of the estimation problem increases with the number of parameters. Second, our techniques naturally extend to give sharper results for optimization over simpler function classes. For instance, they show that the optimal oracle complexity of statistical estimation with quadratic loss is significantly smaller than the corresponding complexity with absolute loss. Our proofs exploit a new notion of the discrepancy between two functions that appears to be natural for optimization problems. They are based on a reduction from a statistical parameter estimation problem to the stochastic optimization problem, and an application of information-theoretic lower bounds for the estimation problem. 2 Background and problem formulation In this section, we introduce background on the oracle model of complexity for convex optimization, and then define the oracles considered in this paper. 2.1 Convex optimization in the oracle model Convex optimization is the task of minimizing a convex function f over a convex set S ⊆Rd. Assuming that the minimum is achieved, it corresponds to computing an element x∗ f that achieves the minimum—that is, x∗ f ∈arg minx∈S f(x). An optimization method is any procedure that solves this task, typically by repeatedly selecting values from S. Our primary focus in this paper is the following question: given any class of convex functions F, what is the minimum computational labor any such optimization method would expend for any function in F? In order to address this question, we follow the approach of Nemirovski and Yudin [8], based on the oracle model of optimization. More precisely, an oracle is a (possibly random) function φ : S 7→I that answers any query x ∈S by returning an element φ(x) in an information set I. The information set varies depending on the oracle; for instance, for an exact oracle of kth order, the answer to a query xt consists of f(xt) and the first k derivatives of f at xt. For the case of stochastic oracles studied in this paper, these values are corrupted with zero-mean noise with bounded variance. Given some number of rounds T, an optimization method M designed to approximately minimize the convex function f over the convex set S proceeds as follows: at any given round t = 1, T, the method M queries at xt ∈S, and the oracle reveals the information φ(xt, f). The method then uses this information to decide at which point xt+1 the next query should be made. For a given oracle function φ, let MT denote the class of all optimization methods M that make T queries according to the procedure outlined above. For any method M ∈MT , we define its error on function f after T steps as ϵ(M, f, S, φ) := f(xT ) −inf x∈S f(x) = f(xT ) −f(x∗ f), (1) where xT is the method’s query at time T. Note that by definition of x∗ f, this error is a non-negative quantity. 2.2 Minimax error When the oracle is stochastic, the method’s query xT at time T is itself random, since it depends on the random answers provided by the oracle. In this case, the optimization error ϵ(M, f, S, φ) is also a random variable. Accordingly, for the case of stochastic oracles, we measure the accuracy in terms of the expected value Eφ[ϵ(M, f, S, φ)], where the expectation is taken over the oracle randomness. Given a class of functions F, and the class MT of optimization methods making T oracle queries, we can define the minimax error ϵ∗(F, S, φ) := inf MT ∈MT sup f∈F Eφ[ϵ(MT , f, S, φ)]. (2) 2 Note that this definition depends on the optimization set S. In order to obtain uniform bounds, we define S := {S ⊆Rd : S convex, ∥x−y∥∞≤1 for x, y ∈S}, and consider the worst-case average error over all S ∈S , given by ϵ∗(F, φ) := sup S∈S ϵ∗(F, S, φ). (3) In the sequel, we provide results for particular classes of oracles. So as to ease the notation, when the function φ is clear from the context, we simply write ϵ∗(F). It is worth noting that oracle complexity measures only the number of queries to the oracle—for instance, the number of (approximate) function or gradient evaluations. However, it does not track computational cost within each component of the oracle query (e.g., the actual flop count associated with evaluating the gradient). 2.3 Types of Oracle In this paper we study the class of stochastic first order oracles, which we will denote simply by O. For this class of oracles, the information set I consists of pairs of noisy function and gradient evaluations; consequently, any oracle φ in this class can be written as φ(x, f) = ( bf(x), bg(x)), (4) where bf(x) and bg(x) are random variables that are unbiased as estimators of the function and gradient values respectively (i.e., E bf(x) = f(x) and Ebg(x) = ∇f(x)). Moreover, we assume that both bf(x) and bg(x) have variances bounded by one. When the gradient is not defined at x, the notation ∇f(x) should be understood to mean any arbitrary subgradient at x. Recall that a subgradient of a convex function f is any vector v ∈Rd such that f(y) ≥f(x) + v⊤(y −x). Stochastic gradient methods are popular examples of algorithms for such oracles. Notation: For the convenience of the reader, we collect here some notation used throughout the paper. We use xt 1 to refer to the sequence (x1, . . . , xt). We refer to the i-th coordinate of any vector x ∈Rd as x(i). For a convex set S, the radius of the largest inscribed ℓ∞ball is denoted as r∞. For a convex function f, its minimizer over a set S will be denoted as x∗ f when S is obvious from context. We will often use the notation x∗ α to denote the minimizer of fα if α is an index variable over a class. For two distributions p and q, KL(p||q) refers to the Kullback Leibler divergence between the distributions. The notation I(A) is the 0-1 valued indicator random variable of the set (equivalently event) A. For two vectors α, β ∈{−1, +1}d, we define the Hamming distance ∆H(α, β) := Pd i=1 I[αi ̸= βi]. 3 Main results and their consequences With the setup of stochastic convex optimization in place, we are now in a position to state the main results of this paper. In particular, we provide some tight lower bounds on the complexity of stochastic oracle optimization. We begin by analyzing the minimax oracle complexity of optimization for the class of convex Lipschitz functions. Recall that a function f : Rd →R is convex if for all x, y ∈Rd and λ ∈(0, 1), we have the inequality f(λx + (1 −λ)y) ≤λf(x) + (1 −λ)f(y). For some constant L > 0, we say that the function f is L-Lipschitz on S if |f(x)−f(y)| ≤L∥x−y∥∞ for all x, y ∈S. Before stating the results, we note that scaling the Lipschitz constant scales minimax optimization error linearly. Hence, to keep our results scale-free, we consider 1-Lipschitz functions only. As the diameter of S is also bounded by 1, this automatically enforces that |f(x)| ≤1, ∀x ∈S. Theorem 1. Let FC be the class of all bounded convex 1-Lipschitz functions on Rd. Then there is a constant c (independent of d) such that sup φ∈O ϵ∗(FC, φ) ≥c r d T . (5) 3 Remarks: This lower bound is tight in the minimax sense, since the method of stochastic gradient descent attains a matching upper bound for all stochastic first order oracles for any convex set S (see Chapter 5 of NY [8]). Also, even though this lower bound requires the oracle to have only bounded variance, we will use an oracle based on Bernoulli random variables, which has all moments bounded. As a result there is no hope to get faster rates in a simple way by assuming bounds on higher moments for the oracle. This is in interesting contrast to the case of having less than 2 bounded moments where we get slower rates (again, see Chapter 5 of NY [8]). The above lower bound is obtained by considering the worst case over all convex sets. However, we expect optimization over a smaller convex set to be easier than over a large set. Indeed, we can easily obtain a corollary of Theorem 1 that quantifies this intuition. Corollary 1. Let FC be the class of all bounded convex 1-Lipschitz functions on Rd. Let S be a convex set such that it contains an ℓ∞ball of radius r∞and is contained in an ℓ∞ball of radius R∞. Then there is a universal constant c such that, sup φ∈O ϵ∗(FC, S, φ) ≥c r∞ R∞ r d T . (6) Remark: The ratio r∞ R∞is also common in results of [8], and is called the asphericity of S. As a particular application of above corollary, consider S to be the unit ℓ2 ball. Then r∞= 1 √ d, and R∞= 1. which gives a dimension independent lower bound. This lower bound for the case of the ℓ2 ball is indeed tight, and is recovered by the stochastic gradient descent algorithm [8]. Just as optimization over simpler sets gets easier, optimization over simple function classes should be easier too. A natural function class that has been studied extensively in the context of better upper bounds is that of strongly convex functions. For any given norm ∥· ∥on S, a function f is strongly convex with coefficient κ means that f(x) ≥f(y) + ∇f(y)T (x −y) + κ 2 ∥x −y∥2 for all x, y ∈S. For this class of functions, we obtain a smaller lower bound on the minimax oracle complexity of optimization. Theorem 2. Let FS be the class of all bounded strongly convex and 1-Lipschitz functions on Rd. Then there is a universal constant c such that, sup φ∈O ϵ∗(FS, φ) ≥c d T . (7) Once again there is a matching upper bound using stochastic gradient descent for example, when the strong convexity is with respect to the ℓ2 norm. The corollary depending on the geometry of S follows again. Corollary 2. Let FS be the class of all bounded convex 1-Lipschitz functions on Rd. Let S be a convex set such that it contains an ℓ∞ball of radius r∞. Then there is a universal constant c such that supφ∈O ϵ∗(FS, S, φ) ≥c r∞ R∞ 2 d T . In comparison, Nemirovski and Yudin [8] obtained a lower bound scaling as Ω 1 √ T  for the class FC. Their bound applies only to the class FC, and does not provide any dimension dependence, as opposed to the bounds provided here. Obtaining the correct dependence yields tight minimax results, and allows us to highlight the dependence of bounds on the geometry of the set S. Our proofs are information-theoretic in nature. We characterize the hardness of optimization in terms of a relatively easy to compute complexity measure. As a result, our technique provides tight lower bounds for smaller function classes like strongly convex functions rather easily. Indeed, we will also state a result for general function classes. 3.1 An application to statistical estimation We now describe a simple application of the results developed above to obtain results on the oracle complexity of statistical estimation, where the typical setup is the following: given a convex loss function ℓ, a class of functions F indexed by a d-dimensional parameter θ so that F = {fθ : θ ∈ 4 Rd}, find a function f ∈F such that Eℓ(f) −inff∈F Eℓ(f) ≤ϵ. If the distribution were known, this is exactly the problem of computing the ϵ-accurate optimizer of a convex function, assuming the function class F is convex. Even though we do not have the distribution in practice, we typically are provided with i.i.d. samples from it, which can be used to obtain unbiased estimates of the value and gradients of the risk functional Eℓ(f) for any given f. If indeed the computational model of the estimator were restricted to querying these values and gradients, then the lower bounds in the previous sections would apply. Our bounds, then allow us to deduce the oracle complexity of statistical estimation problems in this realistic model. In particular, a case of interest is when we fix a convex loss function ℓand consider the worst oracle complexity over all possible distributions under which expectation is taken. From our bounds, it is straightforward to deduce: • For the absolute loss ℓ(f(x), y) = |f(x) −y|, the oracle complexity of ϵ-accurate estimation over all possible distributions is Ω d/ϵ2 . • For the quadratic loss ℓ(f(x), y) = (f(x) −y)2, the oracle complexity of ϵ-accurate estimation over all possible distributions is Ω(d/ϵ). We can use such an analysis to determine the limits of statistical estimation under computational constraints. Several authors have recently considered this problem [3, 9], and provided upper bounds for particular algorithms. In contrast, our results provide algorithm-independent lower bounds on the complexity of statistical estimation within the oracle model. An interesting direction for future work is to broader the oracle model so as to more accurately reflect the computational trade-offs in learning and estimation problems, for instance by allowing a method to pay a higher price to query an oracle with lower variance. 4 Proofs of results We now turn to the proofs of our main results, beginning with a high-level outline of the main ideas common to our proofs. 4.1 High-level outline Our main idea is to embed the problem of estimating the parameter of a Bernoulli vector (alternatively, the biases of d coins) into a convex optimization problem. We start with an appropriately chosen subset of the vertices of a d-dimensional hypercube each of which corresponds to some value of the Bernoulli vector. For any given function class, we then construct a “difficult” subclass of functions parameterized by these hypercube vertices. We then show that being able to optimize any function in this subclass requires estimating its hypercube vertex, that is, the corresponding biases of the d coins. But the only information for this estimation would be from the coin toss outcomes revealed by the oracle in T queries. With this set-up, we are able to apply the Fano lower bound for statistical estimation, as has been done in past work on nonparametric estimation (e.g., [5, 2, 11]). In more detail, the proofs of Theorems 1 and 2 are both based on a common set of steps, which we describe here. Step I: Constructing a difficult subclass of functions. Our first step is to construct a subclass of functions G ⊆F that we use to derive lower bounds. Any such subclass is parameterized by a subset V ⊆{−1, +1}d of the hypercube, chosen as follows. Recalling that ∆H denotes the Hamming metric on the space {−1, +1}d, we choose V to be a d/4-packing of this hypercube. That is, V is a subset of the hypercube such that for all α, β ∈V, the Hamming distance satisfies ∆H(α, β) ≥d/4. By standard arguments [6], we can construct such a packing set V with cardinality |V| ≥(2/√e)d/2. We then let Gbase = {f + i , f − i , i = 1, . . . , d} denote some base set of 2d functions (to be chosen depending on the problem at hand). Given the packing set V and some parameter δ ∈[0, 1/4], we define a larger class (with a total of |V| functions) via G(δ) := {gα, α ∈V}, where each function gα ∈G(δ) has the form gα(x) = 1 d d X i=1  (1/2 + αiδ)f + i (x) + (1/2 −αiδ) f − i (x) . (8) 5 In our proofs, the subclasses Gbase and G(δ) are chosen such that G(δ) ⊆F, the functions f + i , f − i are bounded over the convex set S with a Lipschitz constant independent of dimension d, and the minimizers xβ of gβ over Rd are contained in S for all β ∈V. We demonstrate specific choices in the proofs of Theorems 1 and 2. Step II: Optimizing well is equivalent to function identification. In this step, we show that if a method can optimize over the subclass G(δ) up to a certain tolerance ψ(G(δ)), then it must be capable of identifying which function gα ∈G(δ) was chosen. We first require a measure for the closeness of functions in terms of their behavior near each others’ minima. Recall that we use x∗ f ∈Rd to denote a minimizing point of the function f. Given a convex set S ⊆Rd and two functions f, g, we define ρ(f, g) = inf x∈S  f(x) + g(x) −f(x∗ f) −g(x∗ g)  . (9) The discrepancy measure is non-negative, symmetric in its arguments,1 and satisfies ρ(f, g) = 0 if and only if x∗ f = x∗ g, so that we may refer to it as a semimetric. Given the subclass G(δ), we quantify how densely it is packed with respect to the semimetric ρ using the quantity ψ(G(δ)) = min α̸=β∈V ρ(gα, gβ), (10) which we also denote by ψ(δ) when the class G is clear from the context. We now state a simple result that demonstrates the utility of maintaining a separation under ρ among functions in G(δ). Note that x∗ α denotes a minimizing argument of the function gα. Lemma 1. For any ex ∈ S, there can be at most one function gα ∈ G(δ) for which gα(ex) −gα(x∗ α) ≤ψ(δ) 3 . Thus, if we have an element ex that approximately minimizes (meaning up to tolerance ψ(δ)) one function in the set G(δ), then it cannot approximately minimize any other function in the set. Proof. For a given ex ∈S, suppose that there exists an α ∈V such that gα(ex) −gα(x∗ α) ≤ψ(δ) 3 . From the definition of ψ(δ) in (10), for any β ∈V, β ̸= α, we have ψ(δ) ≤ gα(ex) −gα(x∗ α) + gβ(ex) −gβ(x∗ β) ≤ψ(δ)/3 + gβ(ex) −gβ(x∗ β), which implies that gβ(ex) −gβ(x∗ β) ≥2ψ(δ)/3, from which the claim follows. Suppose that we choose some function gα∗∈G(δ), and some method MT is allowed to make T queries to an oracle with information function φ(·, gα∗). Our next lemma shows that in this set-up, if the method MT can optimize well over the class G(δ), then it must be capable of determining the true function gα∗. Recall the definition (2) of the minimax error in optimization: Lemma 2. Suppose that some method MT has minimax optimization error upper bounded as E  ϵ∗(MT , G(δ), S, φ)  ≤ψ(δ) 9 . (11) Then the method MT can construct an estimator bα(MT ) such that max α∗∈V Pφ[bα(MT ) ̸= α∗] ≤1 3. Proof. Given a method MT that satisfies the bound (11), we construct an estimator bα(MT ) of the true vertex α∗as follows. If there exists some α ∈V such that gα(xT ) −gα(xα) ≤ψ(δ) 3 then we set bα(MT ) equal to α. If no such α exists, then we choose bα(MT ) uniformly at random from V. From Lemma 1, there can exist only one such α ∈V that satisfies this inequality. Consequently, using Markov’s inequality, we have Pφ[bα(MT ) ̸= α∗] ≤Pφ  ϵ∗(MT , gα∗, S, φ) ≥ψ(δ)/3  ≤ 1 3. Maximizing over α∗completes the proof. We have thus shown that having a low minimax optimization error over G(δ) implies that the vertex α ∈V can be identified. 1However, it fails to satisfy the triangle inequality and so is not a metric. 6 Step III: Oracle answers and coin tosses. We now demonstrate a stochastic first order oracle φ for which the samples {φ(x1, gα), . . . , φ(xT , gα)} can be related to coin tosses. In particular, we associate a coin with each dimension i ∈{1, 2, . . . , d}, and consider the set of coin bias vectors lying in the set Θ(δ) =  (1/2 + α1δ, . . . , 1/2 + αdδ) | α ∈V , (12) Given a particular function gα ∈G(δ) (or equivalently, vertex α ∈V), we consider the oracle φ that presents noisy value and gradient samples from gα according to the following prescription: • Pick an index it ∈{1, . . . , d} uniformly at random. • Draw bit ∈{0, 1} according to a Bernoulli distribution with parameter 1/2 + αitδ. • Return the value and sub-gradient of the function bgα(x) = bitf + it (x) + (1 −bit)f − it (x). By construction, the function value and gradient samples are unbiased estimates of those of gα; moreover, the variance of the effective “noise” is bounded independently of d as long as the Lipschitz constant is independent of d since the function values and gradients are bounded on S. Step IV: Lower bounds on coin-tossing Finally, we use information-theoretic methods to lower bound the probability of correctly estimating the true vertex α∗∈V in our model. Lemma 3. Given an arbitrary vertex α∗∈V, suppose that we toss a set of d coins with bias θ∗= ( 1 2 + α∗ 1δ, . . . , 1 2 + α∗ 2δ) a total of T times, but that the outcome of only one coin chosen uniformly at random is revealed at every round. Then for all δ ≤1/4, any estimator bα satisfies inf bα max α∗∈V P[bα ̸= α∗] ≥  1 −16Tδ2 + log 2 d 2 log(2/√e)  . Proof. Denote the Bernoulli distribution for the i-th coin by Pθi. Let Yt ∈{1, . . . , d} be the variable indicating the coin revealed at time T, and let Xt ∈{0, 1} denote its outcome. With some abuse of notation, we also denote the distribution of (Xt, Yt) by Pθ, and that of the entire data {(Xt, Yt)}T t=1 by P T θ . Note that Pθ(i, b) = 1 dPθi(b). We now apply a version of Fano’s lemma [11] to the set of distributions P T θ for θ ∈Θ(δ). In particular, using the proof of Lemma 3 in [11] we get: KL(P T θ ||P T θ′) ≤b, ∀θ, θ′ ∈Θ(δ) ⇒inf bθ max θ∈Θ(δ) Pθ[bθ ̸= θ] ≥  1 −b + log 2 log |Θ|  . (13) In our case, we upper bound b as follows: b = KL(P T θ ||P T θ′) = T X t=1 KL(Pθ(Xt, Yt)||Pθ′(Xt, Yt)) = 1 d T X t=1 d X i=1 KL(Pθi(Xt)||Pθ′ i(Xt)). Each term KL(Pθi(Xt)||Pθ′ i(Xt)) is at most the KL divergence g(δ) between Bernoulli variates with parameters 1/2 + δ and 1/2 −δ. A little calculation shows that g(δ) = 2δ log  1 + 4δ 1 −2δ  ≤ 8δ2 1 −2δ , which is less than 16δ2 as long as δ ≤1/4. Consequently, we conclude that b ≤16Tδ2. Also, we note that P[bα ̸= α∗] = Pθ[bθ ̸= θ∗]. Substituting these values and the size of V into (13) yields the claim. 4.2 Proofs of main results We are now in a position to prove our main theorems. 7 Proof of Theorem 1: By the construction of our oracle, it is clear that, at each round, only one coin is revealed to the method MT . Thus Lemma 3 applies to the estimator bα(MT ): P[bα(MT ) ̸= α] ≥  1 −216Tδ2 + log 2 d log(2/√e)  . (14) In order to obtain an upper bound on P[bα(MT ) ̸= α] using Lemma 2, we need to identify the subclass Gbase of FC. For i = 1, . . . , d, define: f + i (x) := x(i) + 1/2 , and f − i (x) := x(i) −1/2 . We take S to be the ℓ∞ball of radius 1/2. It is clear then that the minimizers of gα are contained in S. Also, the functions f + i , f − i are bounded in [0, 1] and 1-Lipschitz in the ∞-norm, giving the same properties for each function gα. Finally, we note that ρ(gα, gβ) = 2δ d ∆H(α, β) ≥δ 2 for α ̸= β ∈V. Setting ϵ = δ/18 < 1/2, we obtain ϵ∗(FC, φ) ≤ϵ = δ 18 = ψ(δ) 9 . Then by Lemma 2, we have Pφ[bα(MT ) ̸= α] ≤1 3 which, when combined with equation (14), yields 1 3 ≥ 1 −2 16T δ2+log 2 d log(2/√e)  . Substituting δ = 18ϵ yields T = Ω d ϵ2  for all d ≥11. Combining this with Theorem 5.3.1 of NY [8] gives T = Ω d ϵ2  for all d. To prove Corollary 1, we note that the proof of Theorem 1 required r∞≥1 2. If not, it is easy to see that the computation of ρ on G(δ) scales by r∞. Further, if the set is contained in a ball of radius R∞, then we need to scale the function with 1 R∞to keep the function values bounded. Taking both these dependences into account gives the desired result. Proof of Theorem 2: In this case, we define the base class f + i (x) = x(i) + 1/2 2, and f − i (x) = x(i) −1/2 2, for i = 1, . . . , d. Then the functions gα are strongly convex w.r.t. the Euclidean norm with coefficient κ = 1/d. Some calculation shows that ρ(gα, gβ) = 2δ2 d ∆H(α, β) for all α ̸= β. The remainder of the proof is identical to Theorem 1. The reader might suspect that the dimension dependence in our lower bound for strongly convex functions is not tight, due to the dependence of κ on the dimension d. However, this is the largest possible value of κ under the assumptions of the theorem. 4.3 A general result Armed with the greater understanding from these proofs, we can now state a general result for any function class F. The proof is similar to that of earlier results. Theorem 3. For any function class F ⊆FC, suppose a given base set of functions Gbase yields the measure ψ as defined in (10). Then there exists a universal constant c such that supφ∈O ϵ∗(FS, φ) ≥ c ψ q d T  . Acknowledgements We gratefully acknowledge the support of the NSF under award DMS-0830410 and of DARPA under award HR0011-08-2-0002. Alekh is supported in part by MSR PhD Fellowship. References [1] D.P. Bertsekas. Nonlinear programming. Athena Scientific, Belmont, MA, 1995. [2] L. Birg´e. Approximation dans les espaces metriques et theorie de l’estimation. Z. Wahrsch. verw. Gebiete, 65:181–327, 1983. [3] L. Bottou and O. Bousquet. The tradeoffs of large scale learning. In NIPS. 2008. [4] S. Boyd and L. Vandenberghe. Convex optimization. Cambridge University Press, Cambridge, UK, 2004. 8 [5] R. Z. Has’minskii. A lower bound on the risks of nonparametric estimates of densities in the uniform metric. Theory Prob. Appl., 23:794–798, 1978. [6] J. Matousek. Lectures on discrete geometry. Springer-Verlag, New York, 2002. [7] A. S. Nemirovski. Efficient methods in convex programming. Lecture notes. [8] A. S. Nemirovski and D. B. Yudin. Problem Complexity and Method Efficiency in Optimization. John Wiley UK/USA, 1983. [9] S. Shalev-Shwartz and N. Srebro. SVM optimization: inverse dependence on training set size. In ICML, 2008. [10] Nesterov Y. Introductory lectures on convex optimization: Basic course. Kluwer Academic Publishers, 2004. [11] B. Yu. Assouad, Fano and Le Cam. In Festschrift in Honor of L. Le Cam on his 70th Birthday. Springer-Verlag, 1993. 9
2009
43
3,792
Linear-time Algorithms for Pairwise Statistical Problems Parikshit Ram, Dongryeol Lee, William B. March and Alexander G. Gray Computational Science and Engineering, Georgia Institute of Technology Atlanta, GA 30332 {p.ram@,dongryel@cc.,march@,agray@cc.}gatech.edu Abstract Several key computational bottlenecks in machine learning involve pairwise distance computations, including all-nearest-neighbors (finding the nearest neighbor(s) for each point, e.g. in manifold learning) and kernel summations (e.g. in kernel density estimation or kernel machines). We consider the general, bichromatic case for these problems, in addition to the scientific problem of N-body simulation. In this paper we show for the first time O(푁) worst case runtimes for practical algorithms for these problems based on the cover tree data structure [1]. 1 Introduction Pairwise distance computations are fundamental to many important computations in machine learning and are some of the most expensive for large datasets. In particular, we consider the class of all-query problems, in which the combined interactions of a reference set ℛof 푁points in ℝ퐷is computed for each point 푞in a query set 풬of size O(푁). This class of problems includes the pairwise kernel summation used in kernel density estimation and kernel machines and the all-nearest neighbors computation for classification and manifold learning. All-query problems can be solved directly by scanning over the 푁reference points for each of the O(푁) queries, for a total running time of O(푁2). Since quadratic running times are too slow for even modestly-sized problems, previous work has sought to reduce the number of distance computations needed. We consider algorithms that employ space-partitioning trees to improve the running time. In all the problems considered here, the magnitude of the effect of any reference 푟on a query 푞is inversely proportional to the distance metric 푑(푞, 푟). Therefore, the net effect on the query is dominated by references that are “close by”. A space-partitioning tree divides the space containing the point set in a hierarchical fashion, allowing for variable resolution to identify major contributing points efficiently. Single-Tree Algorithms. One approach for employing space-partitioning trees is to consider each query point separately – i.e. to consider the all-query problem as many single-query problems. This approach lends itself to single-tree algorithms, in which the references are stored in a tree, and the tree is traversed once for each query. By considering the distance between the query and a collection of references stored in a tree node, the effect of the references can be approximated or ignored if the distances involved are large enough, with appropriate accuracy guarantees for some methods. The 푘푑-tree structure [2] was developed to obtain the nearest-neighbors of a given query in expected logarithmic time and has also been used for efficient kernel summations [3, 4]. However, these methods lack any guarantees on worst-case running time. A hierarchical data structure was also developed for efficient combined potential calculation in computational physics in Barnes & Hut, 1986 [5]. This data structure provides an O(log 푁) bound on the potential computation for a single query, but has no error guarantees. Under their definition of intrinsic dimension, Karger & Ruhl [6] describe a randomized algorithm with O(log 푁) time per query for nearest neighbor search for lowintrinsic-dimensional data. Krauthgamer & Lee proved their navigating nets algorithm can compute 1 a single-query nearest-neighbor in O(log 푁) time under a more robust notion of low intrinsic dimensionality. The cover tree data structure [1] improves over these two results by both guaranteeing a worst-case runtime for nearest-neighbor and providing efficient computation in practice relative to 푘푑-trees. All of these data structures rely on the triangle inequality of the metric space containing ℛin order to prune references that have little effect on the query. Dual-Tree Algorithms. The approach described above can be applied to every single query to improve the O(푁2) running time of all-query problems to O(푁log 푁). A faster approach to all-query problems uses an algorithmic framework inspired by efficient particle simulation [7] and generalized to statistical machine learning [8] which takes advantage of spatial proximity in both 풬and ℛby constructing a space-partitioning tree on each set. Both trees are descended, allowing the contribution from a distant reference node to be pruned for an entire node of query points. These dual-tree algorithms have been shown to be significantly more efficient in practice than the corresponding single-tree algorithms for nearest neighbor search and kernel summations [9, 10, 11]. Though conjectured to have O(푁) growth, they lack rigorous, general runtime bounds. All-query problems fall into two categories: monochromatic, where 풬= ℛand bichromatic, where 풬is distinct from ℛ. Most of the existing work has only addressed the monochromatic case. The fast multipole method (FMM)[7] for particle simulations, considered one of the breakthrough algorithms of the 20th century, has a non-rigorous runtime analysis based on the uniform distribution. An improvement to the FMM for the 푁-body problem was suggested by Aluru,et.al. [12], but was regarding the construction time of the tree and not the querying time. Methods based on the wellseparated pair decomposition (WSPD) [13] have been proposed for the all nearest neighbors problem and particle simulations [14], but are inefficient in practice. These methods have O(푁) runtime bounds for the monochromatic case, but it is not clear how to extend the analysis to a bichromatic problem. In addition to this difficulty, the WSPD-based particle simulation method is restricted to the (1/푟)-kernel. In Beygelzimer et.al., 2006 [1], the authors conjecture, but do not prove, that the cover tree data structure using a dual-tree algorithm can compute the monochromatic all-nearestneighbors problem in O(푁). Our Contribution. In this paper, we prove O(푁) runtime bounds for several important instances of the dual-tree algorithms for the first time using the cover tree data structure [1]. We prove the first worst-case bounds for any practical kernel summation algorithms. We also provide the first general runtime proofs for dual-tree algorithms on bichromatic problems. In particular, we give the first proofs of worst-case O(푁) runtimes for the following all-query problems: ∙All Nearest-neighbors: For all queries 푞∈풬, find 푟∗(푞) ∈ℛsuch that 푟∗(푞) = arg min푟∈ℛ푑(푞, 푟). ∙Kernel summations: For a given kernel function 퐾(⋅), compute the kernel summation 푓(푞) = ∑ 푟∈ℛ퐾(푑(푞, 푟)) for all 푞∈풬. ∙N-body potential calculation: Compute the net electrostatic or gravitational potential 푓(푞) = ∑ 푟∈ℛ,푟∕=푞푑(푞, 푟)−1 at each 푞∈풬. Outline. In the remainder of this paper, we give our linear running time proofs for dual-tree algorithms. In Section 2, we review the cover tree data structure and state the lemmas necessary for the remainder of the paper. In Section 3, we state the dual-tree all-nearest-neighbors algorithm and prove that it requires O(푁) time. In Section 4, we state the absolute and relative error guarantees for kernel summations and again prove the linear running time of the proposed algorithms. In the same section, we apply the kernel summation result to the 푁-body simulation problem from computational physics, and we draw some conclusions in Section 5. 2 Cover Trees A cover tree [1] 푇stores a data set ℛof size 푁in the form of a levelled tree. The structure has an O(푁) space requirement and O(푁log 푁) construction time. Each level is a “cover” for the level beneath it and is indexed by an integer scale 푖which decreases as the tree is descended. Let 퐶푖 denote the set of nodes at scale 푖. For all scales 푖, the following invariants hold: ∙(nesting invariant) 퐶푖⊂퐶푖−1 ∙(covering tree invariant) For every 푝∈퐶푖−1, there exists a 푞∈퐶푖satisfying 푑(푝, 푞) ≤2푖, and exactly one such 푞is a parent of 푝. ∙(separation invariant) For all 푝, 푞∈퐶푖, 푑(푝, 푞) > 2푖. 2 Representations. The cover tree has two different representations: The implicit representation consists of infinitely many levels 퐶푖with the level 퐶∞containing a single node which is the root and the level 퐶−∞containing every point in the dataset as a node. The explicit representation is required to store the tree in O(푁) space. It coalesces all nodes in the tree for which the only child is the self-child. This implies that every explicit node either has a parent other than the self-parent or has a child other than a self-child. Structural properties. The intrinsic dimensionality measure considered here is the expansion dimension from Karger & Ruhl, 2002 [6] defined as follows: Definition 2.1. Let 퐵ℛ(푝, 휌) = {푟∈ℛ⊂푋: 푑(푝, 푟) ≤휌} denote a closed ball of radius 휌around a 푝∈ℛ. Then, the expansion constant of ℛis defined as the smallest 푐≥2 such ∣퐵ℛ(푝, 2휌)∣≤푐∣퐵ℛ(푝, 휌)∣∀푝∈ℛand ∀휌> 0. The intrinsic dimensionality (or expansion dimension) of ℛis given by 푑퐾푅(ℛ) = log 푐. We make use of the following lemmas from Beygelzimer et.al., 2006 [1] in our runtime proofs. Lemma 2.1. (Width bound) The number of children of any node 푝is bounded by 푐4. Lemma 2.2. (Growth bound) For all 푝∈ℛand 휌> 0, if there exists a point 푟∈ℛsuch that 2휌< 푑(푝, 푟) ≤3휌, then ∣퐵(푝, 4휌)∣≥ ( 1 + 1 푐2 ) ∣퐵(푝, 휌)∣. Lemma 2.3. (Depth bound) The maximum depth of any point 푝in the explicit representation is O(푐2 log 푁). Single point search: Single tree nearest neighbor. Given a cover tree 푇built on a set ℛ, the nearest neighbor of a query 푞can be found with the FindNN subroutine in Algorithm 1. The algorithm uses the triangular inequality to prune away portions of the tree that contain points distant from 푞. The following theorem provides a runtime bound for the single point search. Theorem 2.1. (Query time) If the dataset ℛ∪{푞} has expansion constant 푐, the nearest neighbor of 푞can be found in time O(푐12 log 푁). Batch Query: The dual tree algorithm for all-nearest-neighbor (FindAllNN subroutine in Algorithm 1) using cover trees is provided in Beygelzimer et.al., 2006 [15] as batch-nearest-neighbor. 3 Runtime Analysis of All-Nearest-Neighbors In the bichromatic case, the performance of the FindAllNN algorithm (or any dual-tree algorithm) will depend on the degree of difference between the query and reference sets. If the sets are nearly identical, then the runtime will be close to the monochromatic case. If the inter-point distances in the query set are very large relative to those between references, then the algorithm may have to descend to the leaves of the query tree before making any descends in the reference tree. This case offers no improvement over the performance of the single-tree algorithm applied to each query. In order to quantify this difference in scale for our runtime analysis, we introduce the degree of bichromaticity: Definition 3.1. Let 푆and 푇be cover trees built on query set 풬and reference set ℛrespectively. Consider a dual-tree algorithm with the property that the scales of 푆and 푇are kept as close as possible – i.e. the tree with the larger scale is always descended. Then, the degree of bichromaticity 휅of the query-reference pair (풬, ℛ) is the maximum number of descends in 푆between any two descends in 푇. In the monochromatic case, the trees are identical and the traversal alternates between them. Thus, the degree of bichromaticity is 휅= 1. As the difference in scales of the two data sets increases, more descends in the query tree become necessary, giving a higher degree of bichromaticity. Using this definition, we can prove the main result of this section. Theorem 3.1. Given a reference set ℛof size 푁and expansion constant 푐ℛ, a query set 풬of size O(푁) and expansion constant 푐풬, and bounded degree of bichromaticity 휅of the (풬, ℛ) pair, the FindAllNN subroutine of Algorithm 1 computes the nearest neighbor in ℛof each point in 풬in O(푐12 ℛ푐4휅 풬푁) time. Proof. The computation at Line 3 is done for each of the query nodes at most once, hence takes O(max푖∣푅푖∣∗푁) computations. The traversal of a reference node is duplicated over the set of queries only if the query tree is descended just before the reference tree descend. For every query descend, there would be at most O(푐4 풬) duplications (width bound) for every reference node traversal. Since the number of query 3 Algorithm 1 Single tree and batch query algorithm for Nearest Neighbor search and Approximate Kernel summation FindNN(ℛ-Tree 푇, query 푞) Initialize 푅∞= 퐶∞. for 푖= ∞to −∞do 3: 푅= {퐶ℎ푖푙푑푟푒푛(푟): 푟∈푅푖} 푅푖−1 = {푟∈푅: 푑(푞, 푟) ≤푑(푞, 푅) + 2푖} end for 6: return arg min 푟∈푅−∞푑(푞, 푟) FindAllNN(풬-subtree 푞푗, ℛ-cover set 푅푖) if 푖= −∞then ∀푞∈퐿(푞푗) return arg min 푟∈푅−∞푑(푞, 푟). // 퐿(푞푗) is the set of all the leaves of the subtree 푞푗. 3: else if 푗< 푖then 푅= {퐶ℎ푖푙푑푟푒푛(푟): 푟∈푅푖} 푅푖−1 = {푟∈푅: 푑(푞푗, 푟) ≤푑(푞푗, 푅) + 2푖+ 2푗+2} 6: FindAllNN (푞푗, 푅푖−1) else ∀푝푗−1 ∈퐶ℎ푖푙푑푟푒푛(푞푗) FindAllNN(푝푗−1, 푅푖) 9: end if KernelSum(ℛ-tree 푇, query 푞) Initialize 푅∞= 퐶∞, ˆ푓(푞) = 0 for 푖= ∞to −∞do 3: 푅= {퐶ℎ푖푙푑푟푒푛(푟): 푟∈푅푖} 푅푖−1 = {푟∈푅: 퐾ℎ(푑(푞, 푟) −2푖) −퐾ℎ(푑(푞, 푟) + 2푖) > 휖} ˆ푓(푞) = ˆ푓(푞)+ ∑ 푟∈{푅−푅푖−1} 퐾ℎ(푑(푞, 푟))⋅∣퐿(푟)∣ 6: end for return ˆ푓(푞) = ˆ푓(푞) + ∑ 푟∈푅−∞ 퐾ℎ(푑(푞, 푟)) Initialize Δ푓(푞) ←0∀푞∈푞∞ AllKernelSum(풬-subtree 푞푗, ℛ-cover set 푅푖) if 푖= −∞then for ∀푞∈퐿(푞푗) do 3: ˆ푓(푞) = ˆ푓(푞) + ∑ 푟∈푅−∞ 퐾ℎ(푑(푞, 푟)) +Δ푓(푞푗) end for Δ푓(푞푗) = 0 6: else if 푗< 푖then 푅= {퐶ℎ푖푙푑푟푒푛(푟): 푟∈푅푖} 9: 푅푖−1 = {푟∈푅: 퐾ℎ(푑(푞푗, 푟) −2푖−2푗+1) −퐾ℎ(푑(푞푗, 푟) + 2푖+ 2푗+1) > 휖} Δ푓(푞푗) = Δ푓(푞푗)+ ∑ 푟∈푅∖푅푖−1 퐾ℎ(푑(푞푗, 푟)) ⋅∣퐿(푟)∣ AllKernelSum(푞푗, 푅푖−1) 12: else for ∀푝푗−1 ∈퐶ℎ푖푙푑푟푒푛(푞푗) do Δ푓(푝푗−1) = Δ푓(푝푗−1)+Δ푓(푞푗) 15: AllKernelSum(푝푗−1, 푅푖) end for Δ푓(푞푗) = 0 18: end if end if descends between any two reference descends is upper bounded by 휅and the number of explicit reference nodes is O(푁), the total number of reference node considered in Line 5 in the whole algorithm is at most O(푐4휅 풬푁). Since at any level of recursion, the size of 푅is bounded by 푐4 ℛmax푖∣푅푖∣(width bound), and the maximum depth of any point in the explicit tree is O(푐2 ℛlog 푁) (depth bound), the number of nodes encountered in Line 6 is O(푐4+2 ℛ max푖∣푅푖∣log 푁). Since the traversal down the query tree causes duplication, and the duplication of any reference node is upper bounded by 푐4휅 풬, Line 6 takes at most O(푐4휅 풬푐6 ℛmax푖∣푅푖∣log 푁) in the whole algorithm. Line 9 is executed just once for each of the explicit nodes of the query tree and hence takes at most O(푁) time. Consider any 푅푖−1 = {푟∈푅: 푑(푞푗, 푟) ≤푑+2푖+2푗+2} where 푑= 푑(푞푗, 푅). Given that 퐶푖−1 is the (푖−1)푡ℎlevel of the reference tree 푅푖−1 = 퐵(푞푗, 푑+2푖+2푗+2)∩푅⊆퐵(푞푗, 푑+2푖+2푗+2)∩퐶푖−1 ⊆ 퐵(푞푗, 푑+ 2푖+ 2푖+1) ∩퐶푖−1 since 푅⊆퐶푖−1 and 푗< 푖in this part of the recursion. If 푑> 2푖+2, ∣퐵(푞푗, 푑+ 2푖+ 2푖+1)∣≤∣퐵(푞푗, 2푑)∣≤푐2 ℛ 퐵(푞푗, 푑 2) . Now 푑≤푑(푞푗, ℛ) + 2푖since 푅⊆퐶푖−1 and 푑> 2푖+2, 푑(푞푗, ℛ) > 2푖+1, making 퐵(푞푗, 푑 2) = ∣{푞푗}∣= 1. Hence ∣푅푖−1∣≤푐2 ℛ. If 푑≤2푖+2, as in Beygelzimer et.al. [1] the number of disjoint balls of radius 2푖−2 that can be packed in 퐵(푞푗, 푑+2푖+2푖+1) is bounded as ∣퐵(푞푗, 푑+2푖+2푖+1+2푖−2)∣≤∣퐵(푟, 2(푑+2푖+2푖+1)+2푖−2)∣≤ ∣퐵(푟, 2푖+3 + 2푖+1 + 2푖+2 + 2푖−2)∣≤∣퐵(푟, 2푖+4)∣≤∣푐6 ℛ퐵(푟, 2푖−2)∣for some 푟∈퐶푖−1. Any such ball 퐵(푟, 2푖−2) can contain at most one point in 퐶푖−1, making ∣푅푖−1∣≤푐6 ℛ. 4 Thus, the algorithm takes O(푐6 ℛ푁+ 푐4휅 풬푁+ 푐12 ℛ푐4휅 풬log 푁+ 푁) which is O(푐12 ℛ푐4휅 풬푁). Corollary 3.1. In the monochromatic case with a dataset ℛof size 푁having an expansion constant 푐, the FindAllNN subroutine of Algorithm 1 has a runtime bound of O(푐16푁). Proof. In the monochromatic case, ∣풬∣= ∣ℛ∣= 푁, 푐풬= 푐ℛ= 푐and the degree of bichromaticity 휅= 1 since the query and the reference tree are the same. Therefore, by Theorem 3.1, the result follows. 4 Runtime Analysis of Approximate Kernel Summations For infinite tailed kernels 퐾(⋅), the exact computation of kernel summations is infeasible without O(푁2) operations. Hence the goal is to efficiently approximate 푓(푞) = ∑ 푟퐾(푑(푞, 푟)) where 퐾(⋅) is a monotonically decreasing non-negative kernel function. We employ the two widely used approximating schemes listed below: Definition 4.1. An algorithm guarantees 휖absolute error bound, if for each exact value 푓(푞푖) for 푞푖∈풬, it computes ˆ푓(푞푖) such that ˆ푓(푞푖) −푓(푞푖) ≤푁휖. Definition 4.2. An algorithm guarantees 휖relative error bound, if for each exact value 푓(푞푖) for 푞푖∈풬, it computes ˆ푓(푞푖) ∈ℝsuch that ˆ푓(푞푖) −푓(푞푖) ≤휖∣푓(푞푖)∣. Approximate kernel summation is more computationally intensive than nearest neighbors because pruning is not based on the distances alone but also on the analytical properties of the kernel (i.e. smoothness and extent). Therefore, we require a more extensive runtime analysis, especially for kernels with an infinite extent, such as the Gaussian kernel. We first prove logarithmic running time for the single-query kernel sum problem under an absolute error bound and then show linear running time for the dual-tree algorithm. We then extend this analysis to include relative error bounds. 4.1 Single Tree Approximate Kernel Summations Under Absolute Error The algorithm for computing the approximate kernel summation under absolute error is shown in the KernelSum subroutine of Algorithm 1. The following theorem proves that KernelSum produces an approximation satisfying the 휖absolute error. Theorem 4.1. The KernelSum subroutine of Algorithm 1 outputs ˆ푓(푞) such that ∣ˆ푓(푞)−푓(푞)∣≤푁휖. Proof. A subtree rooted at 푟∈퐶푖−1 is pruned as per Line 5 of KernelSum since for ∀푟′ ∈퐿(푟), 퐾(푑(푞, 푟) + 2푖) ≤퐾(푑(푞, 푟′)) ≤퐾(푑(푞, 푟) −2푖) and ∣퐾(푑(푞, 푟)) −퐾(푑(푞, 푟′))∣≤휖. This amounts to limiting the error per each kernel evaluation to be less than 휖(which also holds true for each contribution computed exactly for 푟∈푅−∞, and by the triangle inequality the kernel approximate sum ˆ푓(푞) will be within 푁휖of the true kernel sum 푓(푞). The following theorem proves the runtime of the single-query kernel summation with smooth and monotonically decreasing kernels using a cover tree. Theorem 4.2. Given a reference set ℛof size 푁and expansion constant 푐, an error value 휖, and a monotonically decreasing smooth non-negative kernel function 퐾(⋅) concave for 푥∈[0, ℎ] and convex for 푥∈(ℎ, ∞) for some ℎ> 0, the KernelSum subroutine of Algorithm 1 computes the kernel summation at a query 푞approximately up to 휖absolute error with a runtime bound of O(푐2(1+max{휂−푖1+3,훾−푖1+4,4}) log 푁) time where 휂= ⌈ log2 퐾(−1) (휖) ⌉ , 훾= ⌈log2 ℎ⌉, 푖1 = ⌊ log2 ( −휖 퐾′(ℎ) )⌋ , and 퐾′(⋅) is the derivative of 퐾(⋅). Proof. We assume that any argument of 퐾(⋅) is lower bounded at 0. Now define the following sets: 푅푙 푖−1 = {푟∈푅푖−1 : 푑(푞, 푟) ≤ℎ−2푖} 푅푚 푖−1 = {푟∈푅푖−1 : ℎ−2푖< 푑(푞, 푟) ≤ℎ+ 2푖} 푅푢 푖−1 = {푟∈푅푖−1 : 푑(푞, 푟) > ℎ+ 2푖} such that 푅푖−1 = 푅푙 푖−1 ∪푅푚 푖−1 ∪푅푢 푖−1, and are pairwise disjoint. For 푟∈푅푙 푖−1: 휖<퐾(max(0, (푑(푞, 푟) −2푖))) −퐾(푑(푞, 푟) + 2푖) ≤(퐾(푑(푞, 푟) + 2푖) −2푖+1퐾′(푑(푞, 푟) + 2푖)) −퐾(푑(푞, 푟) + 2푖) = −2푖+1퐾′(푑(푞, 푟) + 2푖) 5 because of the concavity of the kernel function 퐾(⋅). Now, 퐾′(−1) [0,ℎ−2푖] ( −휖 2푖+1 ) −2푖< 푑(푞, 푟) ≤ℎ−2푖 where 퐾′(−1) [푎,푏] (푥) is 1) the inverse function of the 퐾′(푥); 2) the output value is restricted to be in the interval [푎, 푏] for the given argument 푥. For 푟∈푅푚 푖−1, 휖< 퐾(max(0, (푑(푞, 푟) −2푖))) −퐾(푑(푞, 푟) + 2푖) ≤−2푖+1퐾′(ℎ) which implies that 푖≥log2 ( −휖 퐾′(ℎ) ) −1 Similarly, for 푟∈푅푢 푖−1, 휖< −2푖+1퐾′(푑(푞, 푟) −2푖) implying ℎ+ 2푖< 푑(푞, 푟) < 퐾′(−1) (ℎ+2푖,∞) ( −휖 2푖+1 ) + 2푖. Note that 0 ≥퐾′(푑(푞, 푟)) ≥퐾′(ℎ) for 푑(푞, 푟) > ℎ+ 2푖, which implies that −휖 2푖+1 ≥퐾′(ℎ) and thus 푖≥ ⌊ log2 ( −휖 퐾′(ℎ) )⌋ = 푖1. Below the level 푖1, 푅푙 푖−1 = 푅푢 푖−1 = ∅. In addition, below the level 푖1 −1, 푅푚 푖−1 = ∅. Case 1: 푖> 푖1 Trivially, for 푟∈푅푖−1, 퐾(푑푚푎푥−2푖) > 휖where 푑푚푎푥= max푟∈푅푖−1 푑(푞, 푟). We can invert the kernel function to obtain: 푑푚푎푥< 퐾(−1) (ℎ+2푖,∞) (휖)+2푖. This implies that 푑(푞, 푟) ≤푑푚푎푥< 퐾(−1) (휖)+ 2푖We can count up the number of balls of radius 2푖−2 inside 퐵 ( 푞, 퐾(−1) (휖) + 2푖+ 2푖−2) . Let 휂= ⌈ log2 퐾(−1) (휖) ⌉ . Then, max ∣푅푖−1∣≤∣퐵(푞, 2휂+2푖+2푖−2)∩퐶푖−1∣≤ ⎧ ⎨ ⎩ ∣퐵(푞, 2푖+1) ∩퐶푖−1∣≤푐3, 휂< 푖 ∣퐵(푞, 2푖+2) ∩퐶푖−1∣≤푐4, 휂= 푖 ∣퐵(푞, 2휂+1) ∩퐶푖−1∣≤푐휂−푖+3 = 푐휂−푖1+3, 휂> 푖 Case 2: 푖= 푖1 −1 Let 훾= ⌈log2 ℎ⌉. Similar to the case above, we count the number of balls of radius 2푖−2 inside 퐵 ( 푞, 2훾+ 2푖+ 2푖−2) . max ∣푅푖−1∣≤∣퐵(푞, 2훾+2푖+2푖−2)∩퐶푖−1∣≤ ⎧ ⎨ ⎩ ∣퐵(푞, 2푖+1) ∩퐶푖−1∣≤푐3, 훾< 푖 ∣퐵(푞, 2푖+2) ∩퐶푖−1∣≤푐4, 훾= 푖 ∣퐵(푞, 2훾+1) ∩퐶푖−1∣≤푐훾−푖+3 = 푐훾−푖1+4, 훾> 푖 From the runtime proof of the single-tree nearest neighbor algorithm using cover tree in Beygelzimer et.al., 2006, the running time is bounded by: O(푘max ∣푅푖−1∣2 + 푘max ∣푅푖−1∣푐4) ≤O(푐2(1+max{휂−푖1+3,훾−푖1+4,4}) log 푁) 4.2 Dual Tree Approximate Kernel Summations Under Absolute Error An algorithm for the computation of kernel sums for multiple queries is shown in the AllKernelSum subroutine of Algorithm 1, analogous to FindAllNN for batch nearest-neighbor query. The dual-tree version of the algorithm requires a stricter pruning rule to ensure correctness for all the queries in a query subtree. Additionally, every query node 푞푗has an associated O(1) storage Δ푓(푞푗) that accumulates the postponed kernel contribution for all query points under the subtree 푞푗. The following theorem proves the correctness of the AllKernelSum subroutine of Algorithm 1. Theorem 4.3. For all 푞in the in the query set 풬, the AllKernelSum subroutine of Algorithm 1 computes approximations ˆ푓(푞) such that ∣ˆ푓(푞) −푓(푞)∣≤푁휖. Proof. Line 9 of the algorithm guarantees that ∀푟∈푅∖푅푖−1 at a given level 푖, ∣퐾(푑(푞푗, 푟)) −퐾(푑(푞, 푟))∣≤∣퐾(푑(푞푗, 푟) −2푖−2푗+1) −퐾(푑(푞푗, 푟) + 2푖+ 2푗+1)∣≤휖 for all 푞∈퐿(푞푗). Basically, the minimum distance is decreased and the maximum distance is increased by 2푗+1, which denotes the maximum possible distance from 푞푗to any of its descendants. Trivially, contributions added in Line 3 (the base case) satisfy the 휖absolute error for each kernel value and the result follows by the triangle inequality. 6 Based on the runtime analysis of the batch nearest neighbor, the runtime bound of AllKernelSum is given by the following theorem: Theorem 4.4. Let ℛbe a reference set of size 푁and expansion constant 푐ℛ, and let 풬be a query set of size O(푁) and expansion constant 푐풬. Let the (풬, ℛ) pair have a bounded degree of bichromaticity. Let 퐾(⋅) be a monotonically-decreasing smooth non-negative kernel function that is concave for 푥∈[0, ℎ] and convex for 푥∈(ℎ, ∞) for some ℎ> 0. Then, given an error tolerance 휖, the AllKernelSum subroutine of Algorithm 1 computes an approximation ˆ푓(푞) ∀푞∈풬that satisfies the 휖absolute error bound in time O(푁). Proof. We first bound max ∣푅푖−1∣. Note that in Line 9 to Line 13 of the AllKernelSum, 푗≤푖+ 1, and thus 2푖+ 2푗+1 ≤2푖+ 2푖= 2푖+1. Similar to the proof for the single-tree case, we define: 푅푙 푖−1 = {푟∈푅푖−1 : 푑(푞, 푟) ≤ℎ−2푖+1} 푅푚 푖−1 = {푟∈푅푖−1 : ℎ−2푖+1 < 푑(푞, 푟) ≤ℎ+ 2푖+1} 푅푢 푖−1 = {푟∈푅푖−1 : 푑(푞, 푟) > ℎ+ 2푖+1} such that 푅푖−1 = 푅푙 푖−1 ∪푅푚 푖−1 ∪푅푢 푖−1, and pairwise disjoint. From here, we can follow the techniques shown for the single-tree case to show that max ∣푅푖−1∣is constant dependent on 푐. Therefore, the methodology of the runtime analysis of batch nearest neighbor gives the O(푁) runtime for batch approximate kernel summation. 4.3 Approximations Under Relative Error We now extend the analysis for absolute error bounds to cover approximations under the relative error criterion given in Definition 4.2. Single-tree case. For a query point 푞, the goal is compute ˆ푓(푞) satisfying Definition 4.2. An approximation algorithm for a relative error bound is similar to the KernelSum subroutine of Algorithm 1 except that the definition of 푅푖−1 (i.e. the set of reference points that are not pruned at the given level 푖) needs to be changed to satisfy the relative error constraint as follows: 푅푖−1 = {푟∈푅: 퐾(푑(푞, 푟) −2푖) −퐾(푑(푞, 푟) + 2푖) > 휖푓(푞) 푁 } where 푓(푞) is the unknown query sum. Hence, let 푑푚푎푥= max 푟∈ℛ푑(푞, 푟), and expand the set 푅푖−1 to: 푅푖−1 ⊆{푟∈푅: 퐾(푑(푞, 푟) −2푖) −퐾(푑(푞, 푟) + 2푖) > 휖퐾(푑푚푎푥)} (1) Note that 푑푚푎푥can be trivially upper bounded by: 푑푚푎푥≤푑(푞, 푟푟표표푡) + 2푝+1 = 푑푚푎푥,푢where 푝is the scale of the root of the reference cover tree in the explicit representation. Theorem 4.5. Let the conditions of Thm. 4.2 hold. Then, the KernelSum subroutine of Algorithm 1 with Line 5 redefined as Eqn. 1 computes the kernel summation ˆ푓(푞) at a query 푞with 휖relative error in O(log 푁) time. Proof. A node 푟∈퐶푖−1 can be pruned by the above pruning rule since for 푟′ ∈퐿(푟), 퐾(푑(푞, 푟) + 2푖) ≤퐾(푑(푞, 푟′)) ≤퐾(푑(푞, 푟)−2푖) and ∣퐾(푑(푞, 푟))−퐾(푑(푞, 푟′))∣≤휖퐾(푑푚푎푥,푢). This amounts to limiting the error per each kernel evaluation to be less than 휖퐾(푑푚푎푥,푢) (which also holds true for each contribution computed exactly for 푟∈푅−∞, and by the triangle inequality the kernel approximate sum ˆ푓(푞) will be within 휖푁퐾(푑푚푎푥,푢) ≤휖푓(푞) of the true kernel sum 푓(푞). Since the relative error is an instance of the absolute error, the algorithm also runs in O(log 푁). Dual-tree case. In this case, for each query point 푞∈풬, an approximation ˆ푓(푞) is to be computed as per Definition 4.2. As in the absolute error case, we must satisfy a more difficult condition. Therefore, 푑푚푎푥,푢is larger, taking into account both the maximum possible distance from the root of the query tree to its descendants and the maximum possible distance from the root of the reference tree to its descendants. Hence 푅푖−1 is defined as follows: 푅푖−1 = {푟∈푅: 퐾(푑(푞, 푟) −2푖−2푗+1) −퐾(푑(푞, 푟) + 2푖+ 2푗+1) > 휖퐾(푑푚푎푥,푢)} (2) where 푑(푞푟표표푡, 푟푟표표푡) + 2푝풬+1 + 2푝ℛ+1 = 푑푚푎푥,푢and 푝풬, 푝ℛare the scales of the roots of the query and reference cover trees respectively in the explicit representations. The correctness of the algorithm follows naturally from Theorems 4.4 and 4.5. 7 Corollary 4.1. Let the conditions of Thm. 4.4 hold. Then, given an error value 휖, the AllKernelSum subroutine of Algorithm 1 with Line 11 redefined as Eq. 2 computes an approximate kernel summation ˆ푓(푞) ∀푞∈풬that satisfies an 휖relative error bound with a runtime bound of O(푁). Note that for the single-tree and dual-tree algorithms under the relative error criterion, the pruning rules that generate 푅푖−1 shown above are sub-optimal in practice, because they require every pairwise kernel value that is pruned to be within 휖relative error. There is a more sophisticated way of accelerating this using an alternative method [9, 10, 11] that is preferable in practice. 4.4 푁-body Simulation 푁-body potential summation is an instance of the kernel summation problem that arises in computational physics and chemistry. These computations use the Coulombic kernel 퐾(푑) = 1/푑, which describes gravitational and electrostatic interactions. This kernel is infinite at zero distance and has no inflection point (i.e. it is convex for 푑∈(0, ∞)). Nevertheless, it is possible to obtain the runtime behavior using the results shown in the previous sections. The single query problem 푓(푞) = ∑ 푟 1 푑(푞,푟) is considered first under the assumption that min푟∈ℛ,푞∕=푟푑(푞, 푟) > 0. Corollary 4.2. Given a reference set ℛof size 푁and expansion constant 푐, an error value 휖and the kernel 퐾(푑) = 1/푑(푞, 푟), the KernelSum subroutine of Algorithm 1 computes the potential summation at a query 푞with 휖error in O(log 푁) time. Proof. Let 푑푚푖푛= min 푟∈ℛ,푞∕=푟푑(푞, 푟). Let 퐾푒(푑) be the 퐶2 continuous construction [16] such that: 퐾푒(푑) = { 1 푑푚푖푛 ( 15 8 −5 4 ( 푑 푑푚푖푛 )2 + 3 8 ( 푑 푑푚푖푛 )4) , 푑< 푑푚푖푛 1 푑, 푑≥푑푚푖푛 The effective kernel 퐾푒(푑) can be constructed in O(log 푁) time using the single-tree algorithm for nearest neighbor described in Beygelzimer et.al., 2006 [1]. Note that the second derivative of the effective kernel is 퐾′′ 푒(푑) = −5 2(푑푚푖푛)3 + 9푑2 2(푑푚푖푛)5 for 푑< 푑푚푖푛. Thus it is concave for 푑< √ 5 3 푑푚푖푛 and convex otherwise, so the second derivative agrees at 푑= 푑푚푖푛. Note that 퐾푒(푑) agrees with 퐾(푑) for 푑≥푑푚푖푛. Hence, by considering 푑푚푖푛equivalent to the bandwidth ℎin Theorem 4.2 and applying the same theorem on the KernelSum subroutine of Algorithm 1 with the aforementioned kernel, we prove the O(log 푁) runtime bound. The runtime analysis for the batch case of the algorithm follows naturally. Corollary 4.3. Given a reference set ℛof size 푁and expansion constant 푐ℛand a query set 풬of size O(푁) and expansion constant 푐풬with a bounded degree of bichromaticity for the (풬, ℛ) pair, an error value 휖and the kernel 퐾(푑) = 1/푑(푞, 푟), the AllKernelSum subroutine of Algorithm 1 approximates the potential summation ∀푞∈풬up to 휖error with a runtime bound of O(푁). Proof. The same effective kernel as Corollary 4.2 is used, except that 푑푚푖푛= min 푞∈풬 min 푟∈ℛ,푞∕=푟푑(푞, 푟). The result follows from applying Theorem 4.4, and noting that running the dual-tree computation with 퐾(푑(푞, 푟)) = 1/푑(푞, 푟) is equivalent to running the algorithm with 퐾푒(푑(푞, 푟)). 5 Conclusions Extensive work has attempted to reduce the quadratic scaling of the all-query problems in statistical machine learning. So far, the improvements in runtimes have only been empirical with no rigorous runtime bounds [2, 8, 9, 17, 18]. Previous work has provided algorithms with rough linear runtime arguments for certain instances of these problems [14, 5, 13], but these results only apply to the monochromatic case. In this paper, we extend the existing work [6, 1, 19, 20] to provide algorithms for two important instances of the all-query problem (namely all-nearest-neighbor and all-kernelsummation) and obtain for the first time a linear runtime bound for dual-tree algorithms for the more general bichromatic case of the all-query problems. These results provide an answer to the long-standing question of the level of improvement possible over the quadratic scaling of the all-query problems. The techniques used here finally point the way to analyzing a host of other tree-based algorithms used in machine learning, including those that involve 푛-tuples, such as the 푛-point correlation (which na¨ıvely require O(푁푛) computations). 8 References [1] A. Beygelzimer, S. Kakade, and J.C. Langford. Cover Trees for Nearest Neighbor. Proceedings of the 23rd International Conference on Machine learning, pages 97–104, 2006. [2] J. H. Freidman, J. L. Bentley, and R. A. Finkel. An Algorithm for Finding Best Matches in Logarithmic Expected Time. ACM Trans. Math. Softw., 3(3):209–226, September 1977. [3] K. Deng and A. W. Moore. Multiresolution Instance-Based Learning. pages 1233–1242. [4] D. Lee and A. G. Gray. Faster Gaussian Summation: Theory and Experiment. In Proceedings of the Twenty-second Conference on Uncertainty in Artificial Intelligence. 2006. [5] J. Barnes and P. Hut. A Hierarchical 푂(푁log 푁) Force-Calculation Algorithm. Nature, 324, 1986. [6] D. R. Karger and M. Ruhl. Finding Nearest Neighbors in Growth-Restricted Metrics. Proceedings of the Thiry-Fourth Annual ACM Symposium on Theory of Computing, pages 741–750, 2002. [7] L. Greengard and V. Rokhlin. A Fast Algorithm for Particle Simulations. Journal of Computational Physics, 73:325–248, 1987. [8] A. G. Gray and A. W. Moore. ‘푁-Body’ Problems in Statistical Learning. In NIPS, volume 4, pages 521–527, 2000. [9] A. G. Gray and A. W. Moore. Nonparametric Density Estimation: Toward Computational Tractability. In SIAM International Conference on Data Mining, 2003. [10] D. Lee, A. G. Gray, and A. W. Moore. Dual-Tree Fast Gauss Transforms. In Y. Weiss, B. Sch¨olkopf, and J. Platt, editors, Advances in Neural Information Processing Systems 18, pages 747–754. MIT Press, Cambridge, MA, 2006. [11] D. Lee and A. G. Gray. Fast High-dimensional Kernel Summations Using the Monte Carlo Multipole Method. In To appear in Advances in Neural Information Processing Systems 21. 2009. [12] S. Aluru, G. M. Prabhu, and J. Gustafson. Truly distribution-independent algorithms for the N-body problem. In Proceedings of the 1994 conference on Supercomputing, pages 420–428. IEEE Computer Society Press Los Alamitos, CA, USA, 1994. [13] P. B. Callahan. Dealing with Higher Dimensions: the Well-Separated Pair Decomposition and its applications. PhD thesis, Johns Hopkins University, Baltimore, Maryland, 1995. [14] P. B. Callahan and S. R. Kosaraju. A Decomposition of Multidimensional Point Sets with Applications to k-Nearest-Neighbors and n-body Potential Fields. Journal of the ACM, 62(1):67– 90, January 1995. [15] A. Beygelzimer, S. Kakade, and J.C. Langford. Cover trees for Nearest Neighbor. 2006. http://hunch.net/˜jl/projects/cover tree/paper/paper.ps. [16] R. D. Skeel, I. Tezcan, and D. J. Hardy. Multiple Grid Methods for Classical Molecular Dynamics. Journal of Computational Chemistry, 23(6):673–684, 2002. [17] A. G. Gray and A. W. Moore. Rapid Evaluation of Multiple Density Models. In Artificial Intelligence and Statistics 2003, 2003. [18] A. G. Gray and A. W. Moore. Very Fast Multivariate Kernel Density Estimation via Computational Geometry. In Joint Statistical Meeting 2003, 2003. to be submitted to JASA. [19] R. Krauthgamer and J. R. Lee. Navigating Nets: Simple Algorithms for Proximity Search. 15th Annual ACM-SIAM Symposium on Discrete Algorithms, pages 791–801, 2004. [20] K. Clarkson. Fast Algorithms for the All Nearest Neighbors Problem. In Proceedings of the Twenty-fourth Annual IEEE Symposium on the Foundations of Computer Science, pages 226–232, 1983. 9
2009
44
3,793
From PAC-Bayes Bounds to KL Regularization Pascal Germain, Alexandre Lacasse, Franc¸ois Laviolette, Mario Marchand, Sara Shanian Department of Computer Science and Software Engineering Laval University, Qu´ebec (QC), Canada firstname.secondname@ift.ulaval.ca Abstract We show that convex KL-regularized objective functions are obtained from a PAC-Bayes risk bound when using convex loss functions for the stochastic Gibbs classifier that upper-bound the standard zero-one loss used for the weighted majority vote. By restricting ourselves to a class of posteriors, that we call quasi uniform, we propose a simple coordinate descent learning algorithm to minimize the proposed KL-regularized cost function. We show that standard ℓp-regularized objective functions currently used, such as ridge regression and ℓp-regularized boosting, are obtained from a relaxation of the KL divergence between the quasi uniform posterior and the uniform prior. We present numerical experiments where the proposed learning algorithm generally outperforms ridge regression and AdaBoost. 1 Introduction What should a learning algorithm optimize on the training data in order to give classifiers having the smallest possible true risk? Many different specifications of what should be optimized on the training data have been provided by using different inductive principles. But the universally accepted guarantee on the true risk, however, always comes with a so-called risk bound that holds uniformly over a set of classifiers. Since a risk bound can be computed from what a classifier achieves on the training data, it automatically suggests that learning algorithms should find a classifier that minimizes a tight risk (upper) bound. Among the data-dependent bounds that have been proposed recently, the PAC-Bayes bounds [6, 8, 4, 1, 3] seem to be especially tight. These bounds thus appear to be a good starting point for the design of a bound-minimizing learning algorithm. In that respect, [4, 5, 3] have proposed to use isotropic Gaussian posteriors over the space of linear classifiers. But a computational drawback of this approach is the fact the Gibbs empirical risk is not a quasi-convex function of the parameters of the posterior. Consequently, the resultant PAC-Bayes bound may have several local minima for certain data sets—thus giving an intractable optimization problem in the general case. To avoid such computational problems, we propose here to use convex loss functions for stochastic Gibbs classifiers that upper-bound the standard zero-one loss used for the weighted majority vote. By restricting ourselves to a class of posteriors, that we call quasi uniform, we propose a simple coordinate descent learning algorithm to minimize the proposed KL-regularized cost function. We show that there are no loss of discriminative power by restricting the posterior to be quasi uniform. We also show that standard ℓp-regularized objective functions currently used, such as ridge regression and ℓp-regularized boosting, are obtained from a relaxation of the KL divergence between the quasi uniform posterior and the uniform prior. We present numerical experiments where the proposed learning algorithm generally outperforms ridge regression and AdaBoost [7]. 1 2 Basic Definitions We consider binary classification problems where the input space X consists of an arbitrary subset of Rd and the output space Y = {−1, +1}. An example is an input-output (x, y) pair where x ∈X and y ∈Y. Throughout the paper, we adopt the PAC setting where each example (x, y) is drawn according to a fixed, but unknown, distribution D on X × Y. The risk R(h) of any classifier h: X →Y is defined as the probability that h misclassifies an example drawn according to D. Given a training set S of m examples, the empirical risk RS(h) of any classifier h is defined by the frequency of training errors of h on S. Hence R(h) def = E (x,y)∼D I(h(x) ̸= y) ; RS(h) def = 1 m m X i=1 I(h(xi) ̸= yi) , where I(a) = 1 if predicate a is true and 0 otherwise. After observing the training set S, the task of the learner is to choose a posterior distribution Q over a space H of classifiers such that the Q-weighted majority vote classifier BQ will have the smallest possible risk. On any input example x, the output BQ(x) of the majority vote classifier BQ (sometimes called the Bayes classifier) is given by BQ(x) def = sgn  E h∼Q h(x)  , where sgn(s) = +1 if s > 0 and sgn(s) = −1 otherwise. The output of the deterministic majority vote classifier BQ is closely related to the output of a stochastic classifier called the Gibbs classifier GQ. To classify an input example x, the Gibbs classifier GQ chooses randomly a (deterministic) classifier h according to Q to classify x. The true risk R(GQ) and the empirical risk RS(GQ) of the Gibbs classifier are thus given by R(GQ) = E h∼Q R(h) ; RS(GQ) = E h∼Q RS(h) . Any bound for R(GQ) can straightforwardly be turned into a bound for the risk of the majority vote R(BQ). Indeed, whenever BQ misclassifies x, at least half of the classifiers (under measure Q) misclassifies x. It follows that the error rate of GQ is at least half of the error rate of BQ. Hence R(BQ) ≤2R(GQ). As shown in [5], this factor of 2 can sometimes be reduced to (1 + ϵ). 3 PAC-Bayes Bounds and General Loss Functions In this paper, we use the following PAC-Bayes bound which is obtained directly from Theorem 1.2.1 of [1] and Corollary 2.2 of [3] by using 1 −exp(−x) ≤x ∀x ∈R. Theorem 3.1. For any distribution D, any set H of classifiers, any distribution P of support H, any δ ∈(0, 1], and any positive real number C′, we have Pr S∼Dm  ∀Q on H: R(GQ) ≤ 1 1 −e−C′  C′·RS(GQ) + 1 m h KL(Q∥P) + ln 1 δ i ≥1 −δ , where KL(Q∥P) def = E h∼Q ln Q(h) P (h) is the Kullback-Leibler divergence between Q and P. Note that the dependence on Q of the upper bound on R(GQ) is realized via Gibbs’ empirical risk RS(GQ) and the PAC-Bayes regularizer KL(Q∥P). As in boosting, we focus on the case where the a priori defined class H consists (mostly) of “weak” classifiers having large risk R(h) . In this case, R(GQ) is (almost) always large (near 1/2) for any Q even if the majority vote BQ has null risk. In this case the disparity between R(BQ) and R(GQ) is enormous and the upper-bound on R(GQ) has very little relevance with R(BQ). On way to obtain a more relevant bound on R(BQ) from PAC-Bayes theory is to use a loss function ζQ(x, y) for stochastic classifiers which is distinct from the loss used for the deterministic classifiers (the zero-one loss in our case). In order to obtain a tractable optimization problem for a learning algorithm to solve, we propose here to use a loss ζQ(x, y) which is convex in Q and that upper-bounds as closely as possible the zero-one loss of the deterministic majority vote BQ. 2 Consider WQ(x, y) def = Eh∼QI(h(x) ̸= y), the Q-fraction of binary classifiers that err on example (x, y). Then, R(GQ) = E(x,y)∼D WQ(x, y). Following [2], we consider any non-negative convex loss ζQ(x, y) that can be expanded in a Taylor series around WQ(x, y) = 1/2: ζQ(x, y) def = 1 + ∞ X k=1 ak (2WQ(x, y) −1)k = 1 + ∞ X k=1 ak  E h∼Q −yh(x) k , that upper bounds the risk of the majority vote BQ, i.e., ζQ(x, y) ≥I  WQ(x, y) > 1 2  ∀Q, x, y . It has been shown [2] that ζQ(x, y) can be expressed in terms of the risk on example (x, y) of a Gibbs classifier described by a transformed posterior Q on N × H∞, i.e., ζQ(x, y) = 1 + ca h 2WQ(x, y) −1 i , where ca def = P∞ k=1 |ak| and where WQ(x, y) def = 1 ca ∞ X k=1 |ak| E h1∼Q . . . E hk∼Q I  (−y)kh1(x) . . . hk(x) = −sgn(ak)  . Since WQ(x, y) is the expectation of boolean random variable, Theorem 3.1 holds if we replace (P, Q) by (P, Q) with R(GQ) def = E (x,y)∼D WQ(x, y) and RS(GQ) def = 1 m Pm i=1 WQ(xi, yi). Moreover, it has been shown [2] that KL(Q∥P) = k · KL(Q∥P) , where k def = 1 ca ∞ X k=1 |ak| · k . If we define ζQ def = E (x,y)∼D ζ(x, y) = 1 + ca[2R(GQ) −1] c ζQ def = 1 m m X i=1 ζ(xi, yi) = 1 + ca[2RS(GQ) −1] , Theorem 3.1 gives an upper bound on ζQ and, consequently, on the true risk R(BQ) of the majority vote. More precisely, we have the following theorem. Theorem 3.2. For any D, any H, any P of support H, any δ ∈(0, 1], any positive real number C′, any loss function ζQ(x, y) defined above, we have Pr S∼Dm  ∀Q on H: ζQ ≤g(ca, C′) + C′ 1 −e−C′  c ζQ + 2ca mC′ h k · KL(Q∥P) + ln 1 δ i ≥1 −δ , where g(ca, C′) def = 1 −ca + C′ 1−e−C′ · (ca −1). 4 Bound Minimization Learning Algorithms The task of the learner is to find the posterior Q that minimizes the upper bound on ζQ for a fixed loss function given by the coefficients {ak}∞ k=1 of the Taylor series expansion for ζQ(x, y). Finding Q that minimizes the upper bound given by Theorem 3.2 is equivalent to finding Q that minimizes f(Q) def = C m X i=1 ζQ(xi, yi) + KL(Q∥P) , where C def = C′/(2cak) . 3 To compare the proposed learning algorithms with AdaBoost, we will consider, for ζQ(x, y), the exponential loss given by exp −1 γ y X h∈H Q(h)h(x) ! = exp  1 γ [2WQ(x, y) −1]  . For this choice of loss, we have ca = eγ−1 −1 and k = γ−1/(1−e−γ−1). Because of its simplicity, we will also consider, for ζQ(x, y), the quadratic loss given by 1 γ y X h∈H Q(h)h(x) −1 !2 =  1 γ [1 −2WQ(x, y)] −1 2 . For this choice of loss, we have ca = 2γ−1 + γ−2 and k = (2γ + 2)/(2γ + 1). Note that this loss has the minimum value of zero for examples having a margin y P h∈H Q(h)h(x) = γ. With these two choices of loss functions, ζQ(x, y) is convex in Q. Moreover, KL(Q∥P) is also convex in Q. Since a sum of convex functions is also convex, it follows that objective function f is convex in Q (which has a convex domain). Consequently, f has a single local minimum which coincides with the global minimum. We therefore propose to minimize f coordinate-wise, similarly as it is done for AdaBoost [7]. However, to ensure that Q is a distribution (i.e., that P h∈H Q(h) = 1), each coordinate minimization will consist of a transfer of weight from one classifier to another. 4.1 Quasi Uniform Posteriors We consider learning algorithms that work in a space H of binary classifiers such that for each h ∈H, the boolean complement of h is also in H. More specifically, we have H = {h1, . . . , hn, hn+1, . . . , h2n} where hi(x) = −hn+i(x) ∀x ∈X and ∀i ∈{1, . . . , n}. We thus say that (hi, hn+i) constitutes a boolean complement pair of classifiers. We consider a uniform prior distribution P over H, i.e., Pi = 1 2n ∀i ∈{1, . . . , 2n}. The posterior distribution Q over H is constrained to be quasi uniform. By this, we mean that Qi + Qi+n = 1 n ∀i ∈{1, . . . , n}, i.e., the total weight assigned to each boolean complement pair of classifiers is fixed to 1/n. Let wi def = Qi −Qi+n ∀i ∈{1, . . . , n}. Then wi ∈[−1/n, +1/n] ∀i ∈ {1, . . . , n} whereas Qi ∈[0, 1/n] ∀i ∈{1, . . . , 2n}. For any quasi uniform Q, the output BQ(x) of the majority vote on any example x is given by BQ(x) = sgn  2n X i=1 Qihi(x)  = sgn  n X i=1 wihi(x)  def = sgn  w · h(x)  . Consequently, the set of majority votes BQ over quasi uniform posteriors is isomorphic to the set of linear separators with real weights. There is thus no loss of discriminative power if we restrict ourselves to quasi uniform posteriors. Since all loss functions that we consider are functions of 2WQ(x, y) −1 = −y P i Qihi(x), they are thus functions of yw · h(x). Hence we will often write ζ(yw · h(x)) for ζQ(x, y). The basic iteration for the learning algorithm consists of choosing (at random) a boolean complement pair of classifiers, call it (h1, hn+1), and then attempting to change only Q1, Qn+1, w1 according to: Q1 ←Q1 + δ 2 ; Qn+1 ←Qn+1 −δ 2 ; w1 ←w1 + δ , (1) for some optimally chosen value of δ. Let Qδ and wδ be, respectively, the new posterior and the new weight vector obtained with such a change. The above-mentioned convex properties of objective function f imply that we only need to look for the value of δ∗satisfying df(Qδ) dδ = 0 . (2) 4 If w1 + δ∗> 1/n, then w1 ←1/n, Q1 ←1/n, Qn+1 ←0. If w1 + δ∗< −1/n, then w1 ← −1/n, Q1 ←0, Qn+1 ←1/n. Otherwise, we accept the change described by Equation 1 with δ = δ∗. For objective function f we simply have df(Qδ) dδ = Cmdd ζQδ dδ + dKL(Qδ∥P) dδ , (3) where dKL(Qδ∥P) dδ = d dδ " Q1 + δ 2  ln Q1 + δ 2 1 2n +  Qn+1 −δ 2  ln Qn+1 −δ 2 1 2n # = 1 2 ln  Q1 + δ/2 Qn+1 −δ/2  . (4) For the quadratic loss, we find mdd ζQδ dδ = 2mδ γ2 + 2 γ2 m X i=1 Dql w(i)yih1(xi) , (5) where Dql w(i) def = yiw · h(xi) −γ . (6) Consequently, for the quadratic loss case, the optimal value δ∗satisfies 2Cmδ γ2 + 2C γ2 m X i=1 Dql w(i)yih1(xi) + 1 2 ln  Q1 + δ/2 Qn+1 −δ/2  = 0 . (7) For the exponential loss, we find mdd ζQδ dδ = eδ/γ γ m X i=1 Del w(i)I(h1(xi) ̸= yi) −e−δ/γ γ m X i=1 Del w(i)I(h1(xi) = yi) , (8) where Del w(i) def = exp  −1 γ yiw · h(xi)  . (9) Consequently, for the exponential loss case, the optimal value δ∗satisfies Ceδ/γ γ m X i=1 Del w(i)I(h1(xi) ̸= yi) −Ce−δ/γ γ m X i=1 Del w(i)I(h1(xi) = yi) + 1 2 ln  Q1 + δ/2 Qn+1 −δ/2  = 0 . (10) After changing w1, we need to recompute1 Dw(i) ∀i ∈{1, . . . , m}. This can be done with the following update rules. Dql w(i) ← Dql w(i) + yih1(xi)δ (quadratic loss case) (11) Del w(i) ← Del w(i)e−1 γ yih1(xi)δ (exponential loss case) . (12) Since, initially we have Dql w(i) = −γ ∀i ∈{1, . . . , m} (quadratic loss case) (13) Del w(i) = 1 ∀i ∈{1, . . . , m} (exponential loss case) , (14) the dot product present in Equations 6 and 9 never needs to be computed. Consequently, updating Dw takes Θ(m) time. The computation of the summations over the m examples in Equation 7 or 10 takes Θ(m) time. Once these summations are computed, solving Equation 7 or 10 takes Θ(1) time. Consequently, it takes Θ(m) time to perform one basic iteration of the learning algorithm which consist of (1) solving Equation 7 or 10 to find δ∗, (2) modifying w1, Q1, Qn+1, and (3) updating Dw according to Equation 11 or 12. The complete algorithm, called f minimization, is described by the pseudo code of Algorithm 1. 1Dw(i) stands for either Dql w(i) or Del w(i). 5 Algorithm 1 : f minimization 1: Initialization: Let Qi = Qn+i = 1 2n, wi = 0, ∀i ∈{1, . . . , n}. Initialize Dw according to Equation 13 or 14. 2: repeat 3: Choose at random h ∈H and call it h1 (hn+1 is then the boolean complement of h1). 4: Find δ∗that solves Equation 7 or 10. 5: If [ −1 n < w1 + δ∗< 1 n] then Q1 ←Q1 + δ/2; Qn+1 ←Qn+1 −δ/2; w1 ←w1 + δ. 6: If [w1 + δ∗≥1 n] then Q1 ←1 n; Qn+1 ←0; w1 ←1 n. 7: If [w1 + δ∗≤−1 n ] then Q1 ←0; Qn+1 ←1 n; w1 ←−1 n . 8: Update Dw according to Equation 11 or 12. 9: until Convergence The repeat-until loop in Algorithm 1 was implemented as follows. We first mix at random the n boolean complement pairs of classifiers and then go sequentially over each pair (hi, hn+i) to update wi and Dw. We repeat this sequence until no weight change exceeds a specified small number ϵ. 4.2 From KL(Q∥P) to ℓp Regularization We can recover ℓ2 regularization if we upper-bound KL(Q∥P) by a quadratic function. Indeed, if we use q ln q +  1 n −q  ln  1 n −q  ≤1 n ln 1 2n + 4n  q −1 2n 2 ∀q ∈[0, 1/n] , (15) we obtain, for the uniform prior Pi = 1/(2n), KL(Q∥P) = ln(2n) + n X i=1  Qi ln Qi +  1 n −Qi  ln  1 n −Qi  ≤ 4n n X i=1  Qi −1 2n 2 = n n X i=1 w2 i . (16) With this approximation, the objective function to minimize becomes fℓ2(w) = C′′ m X i=1 ζ  1 γ yiw · h(xi)  + ∥w∥2 2 , (17) subject to the ℓ∞constraint |wj| ≤1/n ∀j ∈{1, . . . , n}. Here ∥w∥2 denotes the Euclidean norm of w and ζ(x) = (x −1)2 for the quadratic loss and e−x for the exponential loss. If, instead, we minimize fℓ2 for v def = w/γ and remove the ℓ∞constraint, we recover exactly ridge regression for the quadratic loss case and ℓ2-regularized boosting for the exponential loss case. We can obtain a ℓ1-regularized version of Equation 17 by repeating the above steps and using 4n q − 1 2n 2 ≤2 q − 1 2n ∀q ∈[0, 1/n] since, in that case, we find that KL(Q∥P) ≤ Pn i=1 |wi| def = ∥w∥1. To sum up, the KL-regularized objective function f immediately follows from PAC-Bayes theory and ℓp regularization is obtained from a relaxation of f. Consequently, PAC-Bayes theory favors the use of KL regularization if the goal of the learner is to produce a weighted majority vote with good generalization.2 2Interestingly, [9] has recently proposed a KL-regularized version of LPBoost but their objective function was not derived from a uniform risk bound. 6 5 Empirical Results For the sake of comparison, all learning algorithms of this subsection are producing a weighted majority vote classifier on the set of basis functions {h1, . . . , hn} known as decision stumps. Each decision stump hi is a threshold classifier that depends on a single attribute: its output is +b if the tested attribute exceeds a threshold value t, and −b otherwise, where b ∈{−1, +1}. For each attribute, at most ten equally-spaced possible values for t were determined a priori. Recall that, although Algorithm 1 needs a set H of 2n classifiers containing n boolean complement pairs, it outputs a majority vote with n real-valued weights defined on {h1, . . . , hn}. The results obtained for all tested algorithms are summarized in Table 1. We have compared Algorithm 1 with quadratic loss (KL-QL) and exponential loss (KL-EL) to AdaBoost [7] (AdB) and ridge regression (RR). Except for MNIST, all data sets were taken from the UCI repository. Each data set was randomly split into a training set S of |S| examples and a testing set T of |T| examples. The number a of attributes for each data set is also specified in Table 1. For AdaBoost, the number of boosting rounds was fixed to 200. For all algorithms, RT refers to the frequency of errors, measured on the testing set T. In addition to this, the “C and “γ” columns in Table 1 refer, respectively, to the C value of the objective function f and to the γ parameter present in the loss functions. These hyperparameters were determined from the training set only by performing the 10-fold cross validation (CV) method. The hyperparameters that gave the smallest 10-fold CV error were then used to train the Algorithms on the whole training set and the resulting classifiers were then run on the testing set. Table 1: Summary of results. Dataset (1) AdB (2) RR (3) KL-EL (4) KL-QL SSB Name |S| |T| a RT RT C RT C γ RT C γ BreastCancer 343 340 9 0.053 0.050 10 0.047 0.1 0.1 0.047 0.02 0.4 Liver 170 175 6 0.320 0.309 5 0.360 0.5 0.02 0.286 0.02 0.3 Credit-A 353 300 15 0.170 0.157 2 0.227 0.1 0.2 0.183 0.02 0.05 Glass 107 107 9 0.178 0.206 5 0.187 500 0.01 0.196 0.02 0.01 Haberman 144 150 3 0.260 0.273 100 0.253 500 0.2 0.260 0.02 0.5 Heart 150 147 13 0.252 0.197 1 0.211 0.2 0.1 0.177 0.05 0.2 Ionosphere 176 175 34 0.120 0.131 0.05 0.120 20 0.0001 0.097 0.2 0.1 Letter:AB 500 1055 16 0.010 0.004 0.5 0.006 0.1 0.02 0.006 1000 0.1 Letter:DO 500 1058 16 0.036 0.026 0.05 0.019 500 0.01 0.020 0.02 0.05 Letter:OQ 500 1036 16 0.038 0.045 0.5 0.043 10 0.0001 0.047 0.1 0.05 MNIST:0vs8 500 1916 784 0.008 0.015 0.05 0.006 500 0.001 0.015 0.2 0.02 (3) < (2, 4) MNIST:1vs7 500 1922 784 0.013 0.012 1 0.014 500 0.02 0.014 1000 0.1 MNIST:1vs8 500 1936 784 0.025 0.024 0.2 0.016 0.2 0.001 0.031 1 0.02 (3) < (4) MNIST:2vs3 500 1905 784 0.047 0.033 0.2 0.035 500 0.0001 0.029 0.02 0.05 (4) < (1) Mushroom 4062 4062 22 0.000 0.001 0.5 0.000 10 0.001 0.000 1000 0.02 Ringnorm 3700 3700 20 0.043 0.037 0.05 0.025 500 0.01 0.039 0.05 0.05 (3) < (1, 2, 4) Sonar 104 104 60 0.231 0.192 0.05 0.135 500 0.05 0.115 1000 0.1 Usvotes 235 200 16 0.055 0.060 2 0.060 0.5 0.1 0.055 1000 0.05 Waveform 4000 4000 21 0.085 0.079 0.02 0.080 0.2 0.05 0.080 0.02 0.05 Wdbc 285 284 30 0.049 0.049 0.2 0.039 500 0.02 0.046 1000 0.1 We clearly see that the cross-validation method generally chooses very small values for γ. This, in turn, gives a risk bound (computed from Theorem 3.2) having very large values (results not shown here). We have also tried to choose C and γ from the risk bound values.3 This method for selecting hyperparameters turned out to produce classifiers having larger testing errors (results not shown here). To determine whether or not a difference of empirical risk measured on the testing set T is statistically significant, we have used the test set bound method of [4] (based on the binomial tail inversion) 3From the standard union bound argument, the bound of Theorem 3.2 holds simultaneously for k different choices of (γ, C) if we replace δ by δ/k. 7 with a confidence level of 95%. It turns out that no algorithm has succeeded in choosing a majority vote classifier which was statistically significantly better (SSB) than the one chosen by another algorithm except for the 4 cases that are listed in the column “SSB” of Table 1. We see that on these cases, Algorithm 1 turned out to be statistically significantly better. 6 Conclusion Our numerical results indicate that Algorithm 1 generally outperforms AdaBoost and ridge regression when the hyperparameters C and γ are chosen by cross-validation. This indicates that the empirical loss c ζQ and the KL(Q∥P) regularizer that are present in the PAC-Bayes bound of Theorem 3.2 are key ingredients for learning algorithms to focus on. The fact that cross-validation turns out to be more efficient than Theorem 3.2 at selecting good values for hyperparameters indicates that PAC-Bayes theory does not yet capture quantitatively the proper tradeoff between c ζQ and KL(Q∥P) that learners should optimize on the trading data. However, we feel that it is important to pursue this research direction since it could potentially eliminate the need to perform the time-consuming cross-validation method for selecting hyperparameters and provide better guarantees on the generalization error of classifiers output by learning algorithms. In short, it could perhaps yield the best generic optimization problem for learning. Acknowledgments Work supported by NSERC discovery grants 122405 (M.M.) and 262067 (F.L.). References [1] Olivier Catoni. PAC-Bayesian surpevised classification: the thermodynamics of statistical learning. Monograph series of the Institute of Mathematical Statistics, http://arxiv.org/abs/0712.0248, December 2007. [2] Pascal Germain, Alexandre Lacasse, Franc¸ois Laviolette, and Mario Marchand. A pac-bayes risk bound for general loss functions. In B. Sch¨olkopf, J. Platt, and T. Hoffman, editors, Advances in Neural Information Processing Systems 19, pages 449–456. MIT Press, Cambridge, MA, 2007. [3] Pascal Germain, Alexandre Lacasse, Franc¸ois Laviolette, and Mario Marchand. PAC-Bayesian learning of linear classifiers. In L´eon Bottou and Michael Littman, editors, Proceedings of the 26th International Conference on Machine Learning, pages 353–360, Montreal, June 2009. Omnipress. [4] John Langford. Tutorial on practical prediction theory for classification. Journal of Machine Learning Research, 6:273–306, 2005. [5] John Langford and John Shawe-Taylor. PAC-Bayes & margins. In S. Thrun S. Becker and K. Obermayer, editors, Advances in Neural Information Processing Systems 15, pages 423–430. MIT Press, Cambridge, MA, 2003. [6] David McAllester. PAC-Bayesian stochastic model selection. Machine Learning, 51:5–21, 2003. [7] Robert E. Schapire, Yoav Freund, Peter Bartlett, and Wee Sun Lee. Boosting the margin: A new explanation for the effectiveness of voting methods. The Annals of Statistics, 26:1651–1686, 1998. [8] Matthias Seeger. PAC-Bayesian generalization bounds for gaussian processes. Journal of Machine Learning Research, 3:233–269, 2002. [9] Manfred K. Warmuth, Karen A. Glocer, and S.V.N. Vishwanathan. Entropy regularized LPBoost. In Proceedings of the 2008 conference on Algorithmic Learning Theory, Springer LNAI 5254,, pages 256–271, 2008. 8
2009
45
3,794
On Stochastic and Worst-case Models for Investing Elad Hazan IBM Almaden Research Center 650 Harry Rd, San Jose, CA 95120 ehazan@cs.princeton.edu Satyen Kale Yahoo! Research 4301 Great America Parkway, Santa Clara, CA 95054 skale@yahoo-inc.com Abstract In practice, most investing is done assuming a probabilistic model of stock price returns known as the Geometric Brownian Motion (GBM). While often an acceptable approximation, the GBM model is not always valid empirically. This motivates a worst-case approach to investing, called universal portfolio management, where the objective is to maximize wealth relative to the wealth earned by the best fixed portfolio in hindsight. In this paper we tie the two approaches, and design an investment strategy which is universal in the worst-case, and yet capable of exploiting the mostly valid GBM model. Our method is based on new and improved regret bounds for online convex optimization with exp-concave loss functions. 1 Introduction “Average-case” Investing: Much of mathematical finance theory is devoted to the modeling of stock prices and devising investment strategies that maximize wealth gain, minimize risk while doing so, and so on. Typically, this is done by estimating the parameters in a probabilistic model of stock prices. Investment strategies are thus geared to such average case models (in the formal computer science sense), and are naturally susceptible to drastic deviations from the model, as witnessed in the recent stock market crash. Even so, empirically the Geometric Brownian Motion (GBM) ([Osb59, Bac00]) has enjoyed great predictive success and every year trillions of dollars are traded assuming this model. Black and Scholes [BS73] used this same model in their Nobel prize winning work on pricing options on stocks. “Worst-case” Investing: The fragility of average-case models in the face of rare but dramatic deviations led Cover [Cov91] to take a worst-case approach to investing in stocks. The performance of an online investment algorithm for arbitrary sequences of stock price returns is measured with respect to the best CRP (constant rebalanced portfolio, see [Cov91]) in hindsight. A universal portfolio selection algorithm is one that obtains sublinear (in the number of trading periods T) regret, which is the difference in the logarithms of the final wealths obtained by the two. Cover [Cov91] gave the first universal portfolio selection algorithm with regret bounded by O(log T). There has been much follow-up work after Cover’s seminal work, such as [HSSW96, MF92, KV03, BK97, HKKA06], which focused on either obtaining alternate universal algorithms or improving the efficiency of Cover’s algorithm. However, the best regret bound is still O(log T). This dependence of the regret on the number of trading periods is not entirely satisfactory for two main reasons. First, a priori it is not clear why the online algorithm should have high regret (growing with the number of iterations) in an unchanging environment. As an extreme example, consider a setting with two stocks where one has an “upward drift” of 1% daily, whereas the second stock remains at the same price. One would expect to “figure out” this pattern quickly and focus on the 1 first stock, thus attaining a constant fraction of the wealth of the best CRP in the long run, i.e. constant regret, unlike the worst-case bound of O(log T). The second problem arises from trading frequency. Suppose we need to invest over a fixed period of time, say a year. Trading more frequently potentially leads to higher wealth gain, by capitalizing on short term stock movements. However, increasing trading frequency increases T, and thus one may expect more regret. The problem is actually even worse: since we measure regret as a difference of logarithms of the final wealths, a regret bound of O(log T) implies a poly(T) factor ratio between the final wealths. In reality, however, experiments [AHKS06] show that some known online algorithms actually improve with increasing trading frequency. Bridging Worst-case and Average-case Investing: Both these issues are resolved if one can show that the regret of a “good” online algorithm depends on total variation in the sequence of stock returns, rather than purely on the number of iterations. If the stock return sequence has low variation, we expect our algorithm to be able to perform better. If we trade more frequently, then the per iteration variation should go down correspondingly, so the total variation stays the same. We analyze a portfolio selection algorithm and prove that its regret is bounded by O(log Q), where Q (formally defined in Section 1.2) is the sum of squared deviations of the returns from their mean. Since Q ≤T (after appropriate normalization), we improve over previous regret bounds and retain the worst-case robustness. Furthermore, in an average-case model such as GBM, the variation can be tied very nicely to the volatility parameter, which explains the experimental observation the regret doesn’t increase with increasing trading frequency. Our algorithm is efficient, and its implementation requires constant time per iteration (independent of the number of game iterations). 1.1 New Techniques and Comparison to Related Work Cesa-Bianchi, Mansour and Stoltz [CBMS07] initiated work on relating worst case regret to the variation in the data for the related learning problem of prediction from expert advice, and conjectured that the optimal regret bounds should depend on the observed variation of the cost sequence. Recently, this conjectured was proved and regret bounds of ˜O(√Q) were obtained in the full information and bandit linear optimization settings [HK08, HK09], where Q is the variation in the cost sequence. In this paper we give an exponential improvement in regret, viz. O(log Q), for the case of online exp-concave optimization, which includes portfolio selection as a special case. Another approach to connecting worst-case to average-case investing was taken by Jamshidian [Jam92] and Cross and Barron [CB03]. They considered a model of “continuous trading”, where there are T “trading intervals”, and in each the online investor chooses a fixed portfolio which is rebalanced k times with k →∞. They prove familiar regret bounds of O(log T) (independent of k) in this model w.r.t. the best fixed portfolio which is rebalanced T × k times. In this model our algorithm attains the tighter regret bounds of O(log Q), although our algorithm has more flexibility. Furthermore their algorithms, being extensions of Cover’s algorithm, may require exponential time in general1. Our bounds of O(log Q) regret require completely different techniques compared to the ˜O(√Q) regret bounds of [HK08, HK09]. These previous bounds are based on first-order gradient descent methods which are too weak to obtain O(log Q) regret. Instead we have to use the second-order Newton step ideas based on [HKKA06] (in particular, the Hessian of the cost functions). The second-order techniques of [HKKA06] are, however, not sensitive enough to obtain O(log Q) bounds. This is because progress was measured in terms of the distance between successive portfolios in the usual Euclidean norm, which is insensitive to variation in the cost sequence. In this paper, we introduce a different analysis technique, based on analyzing the distance between successive predictions using norms that keep changing from iteration to iteration and are actually sensitive to the variation. A key technical step in the analysis is a lemma (Lemma 6) which bounds the sum of differences of successive Cesaro means of a sequence of vectors by the logarithm of its variation. This lemma, 1Cross and Barron give an efficient implementation for some interesting special cases, under assumptions on the variation in returns and bounds on the magnitude of the returns, and assuming k →∞. A truly efficient implementation of their algorithm can probably be obtained using the techniques of Kalai and Vempala. 2 which may be useful in other contexts when variation bounds on the regret are desired, is proved using the Kahn-Karush-Tucker conditions, and also improves the regret bounds in previous papers. 1.2 The model and statement of results Portfolio management. In the universal portfolio management model [Cov91], an online investor iteratively distributes her wealth over n assets before observing the change in asset price. In each iteration t = 1, 2, . . . the investor commits to an n-dimensional distribution of her wealth, xt ∈ ∆n = {P i xi = 1 , x ≥0}. She then observes a price relatives vector rt ∈Rn +, where rt(i) is the ratio between the closing price of the ith asset on trading period t and the opening price. In the tth trading period, the wealth of the investor changes by a factor of (rt · xt). The overall change in wealth is thus Q t(rt ·xt). Since in a typical market wealth grows at an exponential rate, we measure performance by the exponential growth rate, which is log Q t(rt · xt) = P t log(rt · xt). A constant rebalanced portfolio (CRP) is an investment strategy which rebalances the wealth in every iteration to keep a fixed distribution. Thus, for a CRP x ∈∆n, the change in wealth is Q t(rt · x). The regret of the investor is defined to be the difference between the exponential growth rate of her investment strategy and that of the best CRP strategy in hindsight, i.e. Regret := max x∗∈∆n X t log(rt · x∗) − X t log(rt · xt) Note that the regret doesn’t change if we scale all the returns in any particular period by the same amount. So we assume w.l.o.g. that in all periods t, maxi rt(i) = 1. We assume that there is known parameter r > 0, such that for all periods t, mint,i rt(i) ≥r. We call r the market variability parameter. This is the only restriction we put on the stock price returns; they could be chosen adversarially as long as they respect the market variability bound. Online convex optimization. In the online convex optimization problem [Zin03], which generalizes universal portfolio management, the decision space is a closed, bounded, convex set K ∈Rn, and we are sequentially given a series of convex cost2 functions ft : K →R for t = 1, 2, . . .. The algorithm iteratively produces a point xt ∈K in every round t, without knowledge of ft (but using the past sequence of cost functions), and incurs the cost ft(xt). The regret at time T is defined to be Regret := T X t=1 ft(xt) −min x∈K T X t=1 ft(x). Usually, we will let P t denote PT t=1. In this paper, we restrict our attention to convex cost functions which can be written as ft(x) = g(vt · x) for some univariate convex function g and a parameter vector vt ∈Rn (for example, in the portfolio management problem, K = ∆n, ft(x) = −log(rt·x), g = −log, and vt = rt). Thus, the cost functions are parametrized by the vectors v1, v2, . . . , vT . Our bounds will be expressed as a function of the quadratic variability of the parameter vectors v1, v2, . . . , vT , defined as Q(v1, ..., vT ) := min µ T X t=1 ∥vt −µ∥2. This expression is minimized at µ = 1 T PT t=1 vt, and thus the quadratic variation is just T −1 times the sample variance of the sequence of vectors {v1, ..., vt}. Note however that the sequence can be generated adversarially rather than by some stochastic process. We shall refer to this as simply Q if the vectors are clear from the context. Main theorem. In the setup of the online convex optimization problem above, we have the following algorithmic result: Theorem 1. Let the cost functions be of the form ft(x) = g(vt·x). Assume that there are parameters R, D, a, b > 0 such that the following conditions hold: 2Note the difference from the portfolio selection problem: here we have convex cost functions, rather than concave payoff functions. The portfolio selection problem is obtained by using −log as the cost function. 3 1. for all t, ∥vt∥≤R, 2. for all x ∈K, we have ∥x∥≤D, 3. for all x ∈K, and for all t, either g′(vt · x) ∈[0, a] or g′(vt · x) ∈[−a, 0], and 4. for all x ∈K, and for all t, g′′(vt · x) ≥b. Then there is an algorithm that guarantees the following regret bound: Regret = O((a2n/b) log(1 + bQ + bR2) + aRD log(2 + Q/R2) + D2). Now we apply Theorem 1 to the portfolio selection problem. First, we estimate the relevant parameters. We have ∥rt∥≤√n since all rt(i) ≤1, thus R = √n. For any x ∈∆n, ∥x∥≤1, so D = 1. g′(vt · x) = − 1 (vt·x), and thus g′(vt · x) ∈[−1 r, 0], so a = 1 r. Finally, g′′(vt · x) = 1 (vt·x)2 ≥1, so b = 1. Applying Theorem 1 we get the following corollary: Corollary 2. For the portfolio selection problem over n assets, there is an algorithm that attains the following regret bound: Regret = O ³ n r2 log(Q + n) ´ . 2 Bounding the Regret by the Observed Variation in Returns 2.1 Preliminaries All matrices are assumed be real symmetric matrices in Rn×n, where n is the number of stocks. We use the notation A ⪰B to say that A −B is positive semidefinite. We require the notion of a norm of a vector x induced by a positive definite matrix M, defined as ∥x∥M = √ x⊤Mx. The following simple generalization of the Cauchy-Schwartz inequality is used in the analysis: ∀x, y ∈Rn : x · y ≤∥x∥M∥y∥M −1. We denote by |A| the determinant of a matrix A, and by A • B = Tr(AB) = P ij AijBij. As we are concerned with logarithmic regret bounds, potential functions which behave like harmonic series come into play. A generalization of harmonic series to high dimensions is the vector-harmonic series, which is a series of quadratic forms that can be expressed as (here A ≻0 is a positive definite matrix, and v1, v2, . . . are vectors in Rn): v⊤ 1 (A + v1v⊤ 1 )−1v1, v⊤ 2 (A + v1v⊤ 1 + v2v⊤ 2 )−1v2, . . . , v⊤ t (A + Pt τ=1vτv⊤ τ )−1vt, . . . The following lemma is from [HKKA06]: Lemma 3. For a vector harmonic series given by an initial matrix A and vectors v1, v2, . . . , vT , we have T X t=1 v⊤ t (A + Pt τ=1vτv⊤ τ )−1vt ≤log " |A + PT τ=1 vτv⊤ τ | |A| # . The reader can note that in one dimension, if all vectors vt = 1 and A = 1, then the series above reduces exactly to the regular harmonic series whose sum is bounded, of course, by log(T + 1). 2.2 Algorithm and analysis We analyze the following algorithm and prove that it attains logarithmic regret with respect to the observed variation (rather than number of iterations). The algorithm follows the generic algorithmic scheme of “Follow-The-Regularized-Leader” (FTRL) with squared Euclidean regularization. Algorithm Exp-Concave-FTL. In iteration t, use the point xt defined as: xt ≜arg min x∈∆n Ãt−1 X τ=1 fτ(x) + 1 2∥x∥2 ! (1) Note the mathematical program which the algorithm solves is convex, and can be solved in time polynomial in the dimension and number of iterations. The running time, however, for solving this 4 convex program can be quite high. In the full version of the paper, for the specific problem of portfolio selection, where ft(x) = −log(rt · x), we give a faster implementation whose per iteration running time is independent of the number of iterations, using the more sophisticated “online Newton method” of [HKKA06]. In particular, we have the following result: Theorem 4. For the portfolio selection problem, there is an algorithm that runs in O(n3) time per iteration whose regret is bounded by Regret = O ³ n r3 log(Q + n) ´ . In this paper, we retain the simpler algorithm and analysis for an easier exposition. We now proceed to prove the Theorem 1. Proof. [Theorem 1] First, we note that the algorithm is running a “Follow-the-leader” procedure on the cost functions f0, f1, f2, . . . where f0(x) = 1 2∥x∥2 is a fictitious period 0 cost function. In other words, in each iteration, it chooses the point that would have minimized the total cost under all the observed functions so far (and, additionally, a fictitious initial cost function f0). This point is referred to as the leader in that round. The first step in analyzing such an algorithm is to use a stability lemma from [KV05], which bounds the regret of any Follow-the-leader algorithm by the difference in costs (under ft) of the current prediction xt and the next one xt+1, plus an additional error term which comes from the regularization. Thus, we have Regret ≤P tft(xt) −ft(xt+1) + 1 2(∥x∗∥2 −∥x0∥2) ≤P t∇ft(xt) · (xt −xt+1) + 1 2D2 = P tg′(vt · xt)[vt · (xt −xt+1)] + 1 2D2 (2) The second inequality is because ft is convex. The last equality follows because ∇ft(xt) = g′(xt · vt)vt. Now, we need a handle on xt −xt+1. For this, define Ft = Pt−1 τ=0fτ, and note that xt minimizes Ft over K. Consider the difference in the gradients of Ft+1 evaluated at xt+1 and xt: ∇Ft+1(xt+1) −∇Ft+1(xt) = Pt τ=0∇fτ(xt+1) −∇fτ(xt) = Pt τ=1[g′ τ(vτ · xt+1) −g′ τ(vτ · xt)]vτ + (xt+1 −xt) = Pt τ=1[∇g′ τ(vτ · ζt τ) · (xt+1 −xt)]vτ + (xt+1 −xt) (3) = Pt τ=1g′′ τ (vτ · ζt τ)vτv⊤ τ (xt+1 −xt) + (xt+1 −xt). (4) Equation 3 follows by applying the Taylor expansion of the (multi-variate) function g′ τ(vτ · x) at point xt, for some point ζt τ on the line segment joining xt and xt+1. The equation (4) follows from the observation that ∇g′ τ(vτ · x) = g′′ τ (vτ · x)vτ. Define At = Pt τ=1g′′(vt · ζt τ)vtv⊤ t + I, where I is the identity matrix, and ∆xt = xt+1 −xt. Then equation (4) can be re-written as: ∇Ft+1(xt+1) −∇Ft(xt) −g′(vt · xt)vt = At∆xt. (5) Now, since xt minimizes the convex function Ft over the convex set K, a standard inequality of convex optimization (see [BV04]) states that for any point y ∈K, we have ∇Ft(xt)·(y −xt) ≥0. Thus, for y = xt+1, we get that ∇Ft(xt) · (xt+1 −xt) ≥0. Similarly, we get that ∇Ft+1(xt+1) · (xt −xt+1) ≥0. Putting these two inequalities together, we get that (∇Ft+1(xt+1) −∇Ft(xt)) · ∆xt ≤0. (6) Thus, using the expression for At∆xt from (5) we have ∥∆xt∥2 At = At∆xt · ∆xt = (∇Ft+1(xt+1) −∇Ft(xt) −g′(vt · xt)vt) · ∆xt ≤g′(vt · xt)[vt · (xt −xt+1)] (from (6)) (7) 5 Assume that g′(vt · x) ∈[−a, 0] for all x ∈K and all t. The other case is handled similarly. Inequality (7) implies that g′(vt · xt) and vt · (xt −xt+1) have the same sign. Thus, we can upper bound g′(vt · xt)[vt · (xt −xt+1)] ≤a(vt · ∆xt). (8) Define ˜vt = vt −µt, µt = 1 t+1 Pt τ=1vτ. Then, we have P tvt · ∆xt = P t˜vt · ∆xt + PT t=2xt(µt−1 −µt) −x1µ1 + xT +1µT , (9) where ˜vt = vt −µt, µt = 1 t+1 Pt τ=1vt. Now, define ρ = ρ(v1, . . . , vT ) = PT −1 t=1 ∥µt+1 −µt∥. Then we bound PT t=2xt(µt−1 −µt) −x1µ1 + xT +1µT ≤PT t=2∥xt∥∥µt−1 −µt∥+ ∥x1∥∥µ1∥+ ∥xT +1∥∥µT ∥ ≤Dρ + 2DR. (10) We will bound ρ momentarily. For now, we turn to bounding the first term of (9) using the CauchySchwartz generalization as follows: ˜vt · ∆xt ≤∥˜vt∥A−1 t ∥∆xt∥At. (11) By the usual Cauchy-Schwartz inequality, P t∥˜vt∥A−1 t ∥∆xt∥At ≤ qP t∥˜vt∥2 A−1 t · qP t∥∆xt∥2 At ≤ qP t∥˜vt∥2 A−1 t · qP ta(vt · ∆xt) from (7) and (8). We conclude, using (9), (10) and (11), that P ta(vt · ∆xt) ≤a qP t∥˜vt∥2 A−1 t · qP ta(vt · ∆xt) + aDρ + 2aDR. This implies (using the AM-GM inequality applied to the first term on the RHS) that P ta(vt · ∆xt) ≤a2P t∥˜vt∥2 A−1 t + 2aDρ + 4aDR. Plugging this into the regret bound (2) we obtain, via (8), Regret ≤a2P t∥˜vt∥2 A−1 t + 2aDρ + 4aDR + 1 2D2. The proof is completed by the following two lemmas (Lemmas 5 and 6) which bound the RHS. The first term is a vector harmonic series, and the second term can be bounded by a (regular) harmonic series. Lemma 5. P t∥˜vt∥2 A−1 t ≤ 3n b log £ 1 + bQ + bR2¤ . Proof. We have At = Pt τ=1g′′(vt·ζt τ)vtv⊤ t +I. Since g′′(vt·ζt τ) ≥b, we have At ⪰I +bP tvtv⊤ t . Using the fact that ˜vt = vt −µt and µt = 1 t+1 P τ≤t vτ, we get that t X τ=1 ˜vτ ˜v⊤ τ = t X s=1 à 1 + t X τ=s 1 (τ+1)2 ! vsv⊤ s + t X s=1 X r<s à −1 s + t X τ=s 1 (τ+1)2 ! [vrv⊤ s + vsv⊤ r ]. Now, Pt τ=s 1 (τ+1)2 ≤ R t+1 s 1 x2 dx = 1 s − 1 t+1. Since (vr + vs)(vr + vs)⊤⪰0, we get that vrv⊤ r + vsv⊤ s ⪰−[vrv⊤ s + vsv⊤ r ], and hence we have t X τ=1 ˜vτ ˜v⊤ τ ⪯ t X s=1 ¡ 1 + 1 s ¢ vsv⊤ s + t X s=1 X r<s 1 t+1[vrv⊤ r + vsv⊤ s ] ⪯ t X s=1 ¡ 2 + 1 s ¢ vsv⊤ s ⪯3 t X s=1 vsv⊤ s . Let ˜At = 1 3I+b P t ˜vt˜v⊤ t . Note that the inequality above shows that 3 ˜At ⪰At. Thus, using Lemma 3, we get X t ∥˜vt∥2 A−1 t = X t ˜vtA−1 t ˜vt ≤ 3 b X t [ √ b˜vt]⊤˜A−1 t [ √ b˜vt] ≤ 3 b log h | ˜ AT | | ˜ A0| i . (12) To bound the latter quantity note that | ˜A0| = |I| = 1, and that | ˜AT | = |I + bP t˜vt˜v⊤ t | ≤(1 + bP t∥˜vt∥2 2)n = (1 + b ˜Q)n where ˜Q = P t ∥˜vt∥2 = P t ∥˜vt −µt∥2. Lemma 7 (proved in the full version of the paper), we show that ˜Q ≤Q + R2. This implies that | ˜AT | ≤(1 + bQ + bR2)n and the proof is completed by substituting this bound into (12). 6 Lemma 6. ρ(v1, . . . , vT ) ≤2R[log(2 + Q/R2) + 1]. Proof. Define, for τ ≥0, the vector uτ = vτ −µT +1. Note that by convention, we have v0 = 0. We have PT τ=0∥uτ∥2 = ∥µT +1∥2 + PT τ=1∥vτ −µT +1∥2 = R2 + Q. Furthermore, ∥µt+1 −µt∥= °°° 1 t+2 Pt+1 τ=0vτ − 1 t+1 Pt τ=0vτ °°° = °°° 1 t+2 Pt+1 τ=0uτ − 1 t+1 Pt τ=0uτ °°° ≤ 1 (t+1)2 Pt τ=0∥uτ∥+ 1 t+1∥ut+1∥ Summing up over all iterations, P t∥µt+1−µt∥≤P t ³ 1 (t+1)2 Pt τ=0∥uτ∥+ 1 t+1∥ut+1∥ ´ ≤P t 2 t ∥ut−1∥≤2R[log(2+Q/R2)+1]. The last inequality follows from Lemma 8 (proved in the full version) below by setting xt = ∥ut−1∥/R, for t ≥1. Lemma 7. ˜Q ≤Q + R2. Lemma 8. Suppose that 0 ≤xt ≤1 and P t x2 t ≤Q. Then PT t=1 xt/t ≤log(1 + Q) + 1. 3 Implications in the Geometric Brownian Motion Model We begin with a brief description of the model. The model assumes that stocks can be traded continuously, and that at any time, the fractional change in the stock price within an infinitesimal time interval is normally distributed, with mean and variance proportional to the length of the interval. The randomness is due to many infinitesimal trades that jar the price, much like particles in a physical medium are jarred about by other particles, leading to the classical Brownian motion. Formally, the model is parameterized by two quantities, the drift µ, which is the long term trend of the stock prices, and volatility σ, which characterizes deviations from the long term trend. The parameter σ is typically specified as annualized volatility, i.e. the standard deviation of the stock’s logarithmic returns in one year. Thus, a trading interval of [0, 1] specifies 1 year. The model postulates that the stock price at time t, St, follows a geometric Brownian motion with drift µ and volatility σ: dSt = µStdt + σStdWt, where Wt is a continuous-time stochastic process known as the Wiener process or simply Brownian motion. The Wiener process is characterized by three facts: 1. W0 = 0, 2. Wt is almost surely continuous, and 3. for any two disjoint time intervals [s1, t1] and [s2, t2], the random variables Wt1 −Ws1 and Wt2 −Ws2 are independent zero mean Gaussian random variables with variance t1 −s1 and t2 −s2 respectively. Using It¯o’s lemma (see, for example, [KS04]), it can be shown that the stock price at time t is given by St = S0 exp((µ −σ2/2)t + σWt). (13) Now, we consider a situation where we have n stocks in the GBM model. Let µ = (µ1, µ2, . . . , µn) be the vector of drifts, and σ = (σ1, σ2, . . . , σn) be the vector of (annualized) volatilities. Suppose we trade for one year. We now study the effect of trading frequency on the quadratic variation of the stock price returns. For this, assume that the year-long trading interval is sub-divided into T equally sized intervals of length 1/T, and we trade at the end of each such interval. Let rt = (rt(1), rt(2), . . . , rt(n)) be the vector of stock returns in the tth trading period. We assume that T is “large enough”, which is taken to mean that it is larger than µ(i), σ(i), ( µ(i) σ(i))2 for any i. 7 Then using the facts of the Wiener process stated above, we can prove the following lemma, which shows that the expected quadratic variation, and its variance, is the essentially the same regardless of trading frequency. The proof is a straightforward calculation and deferred to the full version of this paper. Lemma 9. In the setup of trading n stocks in the GBM model over one year with T trading periods, there is a vector v such that E hPT t=1 ∥rt −v∥2i ≤∥σ∥2(1 + O( 1 T )) and VAR hPT t=1 ∥rt −v∥2i ≤6∥σ∥2(1 + O( 1 T )), regardless of how the stocks are correlated. Applying this bound in our algorithm, we obtain the following regret bound from Corollary 2. Theorem 10. In the setup of Lemma 9, for any δ > 0, with probability at least 1 −2e−δ, we have Regret ≤O(n(log(∥σ∥2 + n) + δ)). Theorem 10 shows that one expects to achieve constant regret independent of the trading frequency, as long as the total trading period is fixed. This result is only useful if increasing trading frequency improves the performance of the best constant rebalanced portfolio. Indeed, this has been observed empirically (see e.g. [AHKS06], and more empirical evidence is given in the full version of this paper.). To obtain a theoretical justification for increasing trading frequency, we consider an example where we have two stocks that follow independent Black-Scholes models with the same drifts, but different volatilities σ1, σ2. The same drift assumption is necessary because in the long run, the best CRP is the one that puts all its wealth on the stock with the greater drift. We normalize the drifts to be equal to 0, this doesn’t change the performance in any qualitative manner. Since the drift is 0, the expected return of either stock in any trading period is 1; and since the returns in each period are independent, the expected final change in wealth, which is the product of the returns, is also 1. Thus, in expectation, any CRP (indeed, any portfolio selection strategy) has overall return 1. We therefore turn to a different criterion for selecting a CRP. The risk of an investment strategy is measured by the variance of its payoff; thus, if different investment strategies have the same expected payoff, then the one to choose is the one with minimum variance. We therefore choose the CRP with the least variance. We prove the following lemma in the full version of the paper: Lemma 11. In the setup where we trade two stocks with zero drift and volatilities σ1, σ2, the variance of the minimum variance CRP decreases as the trading frequency increases. Thus, increasing the trading frequency decreases the variance of the minimum variance CRP, which implies that it gets less risky to trade more frequently; in other words, the more frequently we trade, the more likely the payoff will be close to the expected value. On the other hand, as we show in Theorem 10, the regret does not change even if we trade more often; thus, one expects to see improving performance of our algorithm as the trading frequency increases. 4 Conclusions and Future Work We have presented an efficient algorithm for regret minimization with exp-concave loss functions whose regret strictly improves upon the state of the art. For the problem of portfolio selection, the regret is bounded in terms of the observed variation in stock returns rather than the number of iterations. Recently, DeMarzo, Kremer and Mansour [DKM06] presented a novel game-theoretic framework for option pricing. Their method prices options using low regret algorithms, and it is possible that our analysis can be applied to options pricing via their method (although that would require a much tighter optimization of the constants involved). Increasing trading frequency in practice means increasing transaction costs. We have assumed no transaction costs in this paper. It would be very interesting to extend our portfolio selection algorithm to take into account transaction costs as in the work of Blum and Kalai [BK97]. 8 References [AHKS06] Amit Agarwal, Elad Hazan, Satyen Kale, and Robert E. Schapire. Algorithms for portfolio management based on the newton method. In ICML, pages 9–16, 2006. [Bac00] L. Bachelier. Th´eorie de la sp´eculation. Annales Scientifiques de l’ ´Ecole Normale Sup´erieure, 3(17):21–86, 1900. [BK97] Avrim Blum and Adam Kalai. Universal portfolios with and without transaction costs. In COLT, pages 309–313, New York, NY, USA, 1997. ACM. [BS73] Fischer Black and Myron Scholes. The pricing of options and corporate liabilities. Journal of Political Economy, 81(3):637–654, 1973. [BV04] Stephen Boyd and Lieven Vandenberghe. Convex Optimization. Cambridge University Press, New York, NY, USA, 2004. [CB03] Jason E Cross and Andrew R Barron. Efficient universal portfolios for past dependent target classes. Mathematical Finance, 13(2):245–276, 2003. [CBMS07] Nicol`o Cesa-Bianchi, Yishay Mansour, and Gilles Stoltz. Improved second-order bounds for prediction with expert advice. Mach. Learn., 66(2-3):321–352, 2007. [Cov91] T. Cover. Universal portfolios. Math. Finance, 1:1–19, 1991. [DKM06] Peter DeMarzo, Ilan Kremer, and Yishay Mansour. Online trading algorithms and robust option pricing. In STOC ’06: Proceedings of the thirty-eighth annual ACM symposium on Theory of computing, pages 477–486, New York, NY, USA, 2006. ACM. [HK08] Elad Hazan and Satyen Kale. Extracting certainty from uncertainty: Regret bounded by variation in costs. In Proceedings of 21st COLT, 2008. [HK09] Elad Hazan and Satyen Kale. Better algorithms for benign bandits. In SODA, pages 38–47, Philadelphia, PA, USA, 2009. Society for Industrial and Applied Mathematics. [HKKA06] Elad Hazan, Adam Kalai, Satyen Kale, and Amit Agarwal. Logarithmic regret algorithms for online convex optimization. In COLT, pages 499–513, 2006. [HSSW96] David P. Helmbold, Robert E. Schapire, Yoram Singer, and Manfred K. Warmuth. Online portfolio selection using multiplicative updates. In ICML, pages 243–251, 1996. [Jam92] F. Jamshidian. Asymptotically optimal portfolios. Mathematical Finance, 2:131–150, 1992. [KS04] Ioannis Karatzas and Steven E. Shreve. Brownian Motion and Stochastic Calculus. Springer Verlag, New York, NY, USA, 2004. [KV03] Adam Kalai and Santosh Vempala. Efficient algorithms for universal portfolios. J. Mach. Learn. Res., 3:423–440, 2003. [KV05] Adam Kalai and Santosh Vempala. Efficient algorithms for online decision problems. Journal of Computer and System Sciences, 71(3):291–307, 2005. [MF92] Neri Merhav and Meir Feder. Universal sequential learning and decision from individual data sequences. In COLT, pages 413–427, 1992. [Osb59] M. F. M. Osborne. Brownian motion in the stock market. Operations Research, 2:145– 173, 1959. [Zin03] Martin Zinkevich. Online convex programming and generalized infinitesimal gradient ascent. In ICML, pages 928–936, 2003. 9
2009
46
3,795
Structured output regression for detection with partial truncation Andrea Vedaldi Andrew Zisserman Department of Engineering University of Oxford Oxford, UK {vedaldi,az}@robots.ox.ac.uk Abstract We develop a structured output model for object category detection that explicitly accounts for alignment, multiple aspects and partial truncation in both training and inference. The model is formulated as large margin learning with latent variables and slack rescaling, and both training and inference are computationally efficient. We make the following contributions: (i) we note that extending the Structured Output Regression formulation of Blaschko and Lampert [1] to include a bias term significantly improves performance; (ii) that alignment (to account for small rotations and anisotropic scalings) can be included as a latent variable and efficiently determined and implemented; (iii) that the latent variable extends to multiple aspects (e.g. left facing, right facing, front) with the same formulation; and (iv), most significantly for performance, that truncated and truncated instances can be included in both training and inference with an explicit truncation mask. We demonstrate the method by training and testing on the PASCAL VOC 2007 data set – training includes the truncated examples, and in testing object instances are detected at multiple scales, alignments, and with significant truncations. 1 Introduction There has been a steady increase in the performance of object category detection as measured by the annual PASCAL VOC challenges [3]. The training data provided for these challenges specifies if an object is truncated – when the provided axis aligned bounding box does not cover the full extent of the object. The principal cause of truncation is that the object partially lies outside the image area. Most participants simple disregard the truncated training instances and learn from the non-truncated ones. This is a waste of training material, but more seriously many truncated instances are missed in testing, significantly reducing the recall and hence decreasing overall recognition performance. In this paper we develop a model (Fig. 1) which explicitly accounts for truncation in both training and testing, and demonstrate that this leads to a significant performance boost. The model is specified as a joint kernel and learnt using an extension of the structural SVM with latent variables framework of [13]. We use this approach as it allows us to address a second deficiency of the provided supervision – that the annotation is limited to axis aligned bounding boxes, even though the objects may be in plane rotated so that the box is a loose bound. The latent variables allow us to specify a pose transformation for each instances so that we achieve a spatial correspondence between all instances with the same aspect. We show the benefits of this for both the learnt model and testing performance. Our model is complementary to that of Felzenszwalb et al. [4] who propose a latent SVM framework, where the latent variables specify sub-part locations. The parts give their model some tolerance to in plane rotation and foreshortening (though an axis aligned rectangle is still used for a first 1 RIGHT (a) LEFT LEFT (b) LEFT LEFT LEFT LEFT (c) LEFT RIGHT (d) RIGHT (e) Figure 1: Model overview. Detection examples on the VOC images for the bicycle class demonstrate that the model can handle severe truncations (a-b), multiple objects (c), multiple aspects (d), and pose variations (small in-plane rotations) (e). Truncations caused by the image boundary, (a) & (b), are a significant problem for template based detectors, since the template can then only partially align with the image. Small in-plane rotations and anisotropic rescalings of the template are approximated efficiently by rearranging sub-blocks of the HOG template (white boxes in (e)). stage as a “root filter”) but they do not address the problem of truncation. Like them we base our implementation on the efficient and successful HOG descriptor of Dalal and Triggs [2]. Previous authors have also considered occlusion (of which truncation is a special case). Williams et al. [11] used pixel wise binary latent variables to specify the occlusion and an Ising prior for spatial coherence. Inference involved marginalizing out the latent variables using a mean field approximation. There was no learning of the model from occluded data. For faces with partial occlusion, the resulting classifier showed an improvement over a classifier which did not model occlusion. Others have explicitly included occlusion at the model learning stage, such as the Constellation model of Fergus et al. [5] and the Layout Consistent Random Field model of Winn et al. [12]. There are numerous papers on detecting faces with various degrees of partial occlusion from glasses, or synthetic truncations [6, 7]. Our contribution is to define an appropriate joint kernel and loss function to be used in the context of structured output prediction. We then learn a structured regressor, mapping an image to a list of objects with their pose (or bounding box), while at the same time handling explicitly truncation and multiple aspects. Our choice of kernel is inspired by the restriction kernel of [1]; however, our kernel performs both restriction and alignment to a template, supports multiple templates to handle different aspects and truncations, and adds a bias term which significantly improves performance. We refine pose beyond translation and scaling with an additional transformation selected from a finite set of possible perturbations covering aspect ratio change and small in plane rotations. Instead of explicitly transforming the image with each element of this set (which would be prohibitively expensive) we introduce a novel approximation based on decomposing the HOG descriptor into small blocks and quickly rearranging those. To handle occlusions we selectively switch between an object descriptor and an occlusion descriptor. To identify which portions of the template are occluded we use a field of binary variables. These could be treated as latent variables; however, since we consider here only occlusions caused by the image boundaries, we can infer them deterministically from the position of the object relative to the image boundaries. Fig. 1 illustrates various detection examples including truncation, multiple instances and aspects, and in-plane rotation. In training we improve the ground-truth pose parameters, since the bounding boxes and aspect associations provided in PASCAL VOC are quite coarse indicators of the object pose. For each instance we add a latent variable which encodes a pose adjustment. Such variables are then treated as part of learning using the technique presented in [13]. However, while there the authors use the CCCP algorithm to treat the case of margin rescaling, here we show that a similar algorithm applies to the case of slack rescaling. The resulting optimization alternates between optimizing the model parameters given the latent variables (a convex problem solved by a cutting plane algorithm) and optimizing the latent variable given the model (akin to inference). 2 The overall method is computationally efficient both in training and testing, achieves very good performances, and it is able to learn and recognise truncated objects. 2 Model Our purpose is to learn a function y = f(x), x ∈X, y ∈Y which, given an image x, returns the poses y of the objects portrayed in the image. We use the structured prediction learning framework of [9, 13], which considers along with the input and output variables x and y, an auxiliary latent variable h ∈H as well (we use h to specify a refinement to the ground-truth pose parameters). The function f is then defined as f(x; w) = ˆyx(w) where (ˆyx(w), ˆhx(w)) = argmax (y,h)∈Y×H F(x, y, h; w), F(x, y, h; w) = ⟨w, Ψ(x, y, h)⟩, (1) and Ψ(x, y, h) ∈Rd is a joint feature map. This maximization estimates both y and h from the data x and corresponds to performing inference. Given training data (x1, y1), . . . , (xN, yN), the parameters w are learned by minimizing the regularized empirical risk R(w) = 1 2∥w∥2 + C N N X i=1 ∆(yi, ˆyi(w), ˆhi(w)), where ˆyi(w) = ˆyxi(w), ˆhi(w) = ˆhxi(w). (2) Here ∆(yi, y, h) ≥0 is an appropriate loss function that encodes the cost of an incorrect prediction. In this section we develop the model Ψ(x, y, h), or equivalently the joint kernel function K(x, y, h, x′, y′, h′) = ⟨Ψ(x, y, h), Ψ(x′, y′, h′)⟩, in a number of stages. We first define the kernel for the case of a single unoccluded instance in an image including scale and perturbing transformations, then generalise this to include truncations and aspects; and finally to multiple instances. An appropriate loss function ∆(yi, y, h) is subsequently defined which takes into account the pose of the object specified by the latent variables. 2.1 Restriction and alignment kernel Denote by R a rectangular region of the image x, and by x|R the image cropped to that rectangle. A restriction kernel [1] is the kernel K((x, R), (x′, R′)) = Kimage(x|R, x′|R) where Kimage is an appropriate kernel between images. The goal is that the joint kernel should be large when the two regions have similar appearance. Our kernel is similar, but captures both the idea of restriction and alignment. Let R0 be a reference rectangle and denote by R(p) = gpR0 the rectangle obtained from R0 by a geometric transformation gp : R2 →R2. We call p the pose of the rectangle R(p). Let ¯x be an image defined on the reference rectangle R0 and let H(¯x) ∈Rd be a descriptor (e.g. SIFT, HOG, GIST [2]) computed from the image appearance. Then a natural definition of the restriction and alignment kernel is K((x, p), (x′, p′)) = Kdescr(H(x; p), H(x′; p′)) (3) where Kdescr is an appropriate kernel for descriptors, and H(x; p) is the descriptor computed on the transformed patch x as H(x; p) = H(g−1 p x). Implementation with HOG descriptors. Our choice of the HOG descriptor puts some limits on the space of poses p that can be efficiently explored. To see this, it is necessary to describe how HOG descriptors are computed. The computation starts by decomposing the image x into cells of d × d pixels (here d = 8). The descriptor of a cell is the nine dimensional histogram of the orientation of the image gradient inside the cell (appropriately weighed and normalized as in [2]). We obtain the HOG descriptor of a rectangle of w × h cells by stacking the enclosed cell descriptors (this is a 9 × w × h vector). Thus, given the cell histograms, we can immediately obtain the HOG descriptors H(x, y) for all the cellaligned translations (x, y) of the dw × dh pixels rectangle. To span rectangles of different scales this construction is simply repeated on the rescaled image g−1 s x, where gs(z) = γsz is a rescaling, γ > 0, and s is a discrete scale parameter. 3 To further refine pose beyond scale and translation, here we consider an additional perturbation gt, indexed by a pose parameter t, selected in a set of transformations g1, . . . , gT (in the experiments we use 16 transformations, obtained from all combinations of rotations of ±5 and ±10 degrees and scaling along x of 95%, 90%, 80% and 70%). Those could be achieved in the same manner as scaling by transforming the image g−1 t x for each one, but this would be very expensive (we would need to recompute the cell descriptors every time). Instead, we approximate such transformations by rearranging the cells of the template (Fig. 1 and 2). First, we partition the w × h cells of the template into blocks of m × m cells (e.g. m = 4). Then we transform the center of each block according to gt and we translate the block to the new center (approximated to units of cells). Notice that we could pick m = 1 (i.e. move each cell of the template independently), but we prefer to use blocks as this accelerates inference (see Sect. 4). Hence, pose is for us a tuple (x, y, s, t) representing translation, scale, and additional perturbation. Since HOG descriptors are designed to be compared with a linear kernel, we define K((x, p), (x′, p′)) = ⟨Ψ(x, p), Ψ(x′, p′)⟩, Ψ(x, p) = H(x; p). (4) 2.2 Modeling truncations If part of the object is occluded (either by clutter or by the image boundaries), some of the descriptor cells will be either unpredictable or undefined. We explicitly deal with occlusion at the granularity of the HOG cells by adding a field of w × h binary indicator variables v ∈{0, 1}wh. Here vj = 1 means that the j-th cell of the HOG descriptor H(x, p) should be considered to be visible, and vj = 0 that it is occluded. We thus define a variant of (4) by considering the feature map Ψ(x, p, v) =  (v ⊗19) ⊙H(x, p) ((1wh −v) ⊗19) ⊙H(x, p)  (5) where 1d is a d-dimensional vector of all ones, ⊗denotes the Kroneker product, and ⊙the Hadamard (component wise) product. To understand this expression, recall that H is the stacking of w × h 9dimensional histograms, so for instance (v ⊗19) ⊙H(x, p) preserves the visible cells and nulls the others. Eq. (5) is effectively defining a template for the object and one for the occlusions. Notice that v are in general latent variables and should be estimated as such. However here we note that the most severe and frequent occlusions are caused by the image boundaries (finite field of view). In this case, which we explore in the experiments, we can write v = v(p) as a function of the pose p, and remove the explicit dependence on v in Ψ. Moreover the truncated HOG cells are undefined and can be assigned a nominal common value. So here we work with a simplified kernel, in which occlusions are represented by a scalar proportional to the number of truncated cells: Ψ(x, p) =  (v(p) ⊗19) ⊙H(x, p) wh −|v(p)|  (6) 2.3 Modeling aspects A template model works well as long as pose captures accurately enough the transformations resulting from changes in the viewing conditions. In our model, the pose p, combined with the robustness of the HOG descriptor, can absorb a fair amount of viewpoint induced deformation. It cannot, however, capture the 3D structure of a physical object. Therefore, extreme changes of viewpoint require switching between different templates. To this end, we augment pose with an aspect indicator a (so that pose is the tuple p = (x, y, s, t, a)), which indicates which template to use. Note that now the concept of pose has been generalized to include a parameter, a, which, differently from the others, does not specify a geometric transformation. Nevertheless, pose specifies how the model should be aligned to the image, i.e. by (i) choosing the template that corresponds to the aspect a, (ii) translating and scaling such template according to (x, y, s), and (iii) applying to it the additional perturbation gt. In testing, all such parameters are estimated as part of inference. In training, they are initialized from the ground truth data annotations (bounding boxes and aspect labels), and are then refined by estimating the latent variables (Sect. 2.4). 4 We assign each aspect to a different “slot” of the feature vector Ψ(x, p). Then we null all but the one of the slots, as indicated by a: Ψ(x, p) =   δa=1Ψ1(x; p) ... δa=AΨA(x; p)   (7) where Ψa(x; p) is a feature vector in the form of (6). In this way, we compare different templates for different aspects, as indicated by a. The model can be extended to capture symmetries of the aspects (resulting from symmetries of the objects). For instance, a left view of a bicycle can be obtained by mirroring a right view, so that the same template can be used for both aspects by defining Ψ(x; p) = δa=leftΨleft(x; p) + δa=right flip Ψright(x; p), (8) where flip is the operator that “flips” the descriptor (this can be defined in general by computing the descriptor of the mirrored image, but for HOG it reduces to rearranging the descriptor components). The problem remains of assigning aspects to the training data. In the Pascal VOC data, objects are labeled with one of five aspects: front, left, right, back, undefined. However, such assignments may not be optimal for use in a particular algorithm. Fortunately, our method is able to automatically reassign aspects as part of the estimation of the hidden variables (Sect. 2.4 and Fig. 2). 2.4 Latent variables The PASCAL VOC bounding boxes yield only a coarse estimate of the ground truth pose parameters (e.g. they do not contain any information on the object rotation) and the aspect assignments may also be suboptimal (see previous section). Therefore, we introduce latent variables h = (δp) that encode an adjustment to the ground-truth pose parameters y = (p). In practice, the adjustment δp is a small variation of translation x, y, scale s, and perturbation t, and can switch the aspect a all together. We modify the feature maps to account for the adjustment in the obvious way. For instance (6) becomes Ψ(x, p, δp) =  (v(p + δp) ⊗19) ⊙H(x, p + δp) wh −|v(p + δp)|  (9) 2.5 Variable number of objects: loss function, bias, training So far, we have defined the feature map Ψ(x, y) = Ψ(x; p) for the case in which the label y = (p) contains exactly one object, but an image may contain no or multiple object instances (denoted respectively y = ϵ and y = (p1, . . . , pn)). We define the loss function between a ground truth label yi and the estimated output y as ∆(yi, y) =    0 if yi = y = ϵ, 1 −overl(B(p), B(p′)) if yi = (p) and y = (p′), 1 if yi ̸= ϵ and y = ϵ, or yi = ϵ and y ̸= ϵ, (10) where B is the ground truth bounding box, and B′ is the prediction (the smallest axis aligned bounding box that contains the warped template gpR0). The overlap score between B and B′ is given by overl(B, B′) = |B ∩B′|/|B ∪B′|. Note that the ground truth poses are defined so that B(pl) matches the PASCAL provided bounding boxes [1] (or the manually extended ones for the truncated ones). The hypothesis y = ϵ (no object) receives score F(x, ϵ; w) = 0 by defining Ψ(x, ϵ) = 0 as in [1]. In this way, the hypothesis y = (p) is preferred to y = ϵ only if F(x, p; w) > F(x, ϵ; w) = 0, which implicitly sets the detection threshold to zero. However, there is no reason to assume that this threshold should be appropriate (in Fig. 2 we show that it is not). To learn an arbitrary threshold, it suffices to append to the feature vector Ψ(x, p) a large constant κbias, so that the score of the hypothesis y = (p) becomes F(x, (p); w) = ⟨w, Ψ(x, p)⟩+ κbiaswbias. Note that, since the constant is large, the weight wbias remains small and has negligible effect on the SVM regularization term. 5 Finally, an image may contain more than one instance of the object. The model can be extended to this case by setting F(x, y; w) = PL l=1 F(x, pl; w) + R(y), where R(y) encodes a “repulsive” force that prevents multiple overlapping detections of the same object. Performing inference with such a model becomes however combinatorial and in general very difficult. Fortunately, in training the problem can be avoided entirely. If an image contains multiple instances, the image is added to the training set multiple times, each time “activating” one of the instances, and “deactivating” the others. Here “deactivating” an instance simply means removing it from the detector search space. Formally, let p0 be the pose of the active instance and p1, . . . , pN the poses of the inactive ones. A pose p is removed from the search space if, and only if, maxi overl(B(p), B(pi)) ≥max{overl(B(p), B(p0)), 0.2}. 3 Optimisation Minimising the regularised risk R(w) as defined by Eq. (2) is difficult as the loss depends on w through ˆyi(w) and ˆhi(w) (see Eq. (1)). It is however possible to optimise an upper bound (derived below) given by 1 2∥w∥2 + C N N X i=1 max (y,h)∈Y×H ∆(yi, y, h) [1 + ⟨w, Ψ(xi, y, h)⟩−⟨w, Ψ(xi, yi, h∗ i (w))⟩] . (11) Here h∗ i (w) = argmaxh∈H⟨w, Ψ(xi, yi, h)⟩completes the label (yi, h∗ i (w)) of the sample xi (of which only the observed part yi is known from the ground truth). Alternation optimization. Eq. (11) is not a convex energy function due to the dependency of h∗ i (w) on w. Similarly to [13], however, it is possible to find a local minimum by alternating optimizing w and estimating h∗ i . To do this, the CCCP algorithm proposed in [13] for the case of margin rescaling, must be extended to the slack rescaling formulation used here. Starting from an estimate wt of the solution, define h∗ it = hi(wt), so that, for any w, ⟨w, Ψ(xi, yi, h∗ i (w))⟩= max h′ ⟨w, Ψ(xi, yi, h′)⟩≥⟨w, Ψ(xi, yi, h∗ it)⟩ and the equality holds for w = wt. Hence the energy (11) is bounded by 1 2∥w∥2 + C N N X i=1 max (y,h)∈Y×H ∆(yi, y, h) [1 + ⟨w, Ψ(xi, y, h)⟩−⟨w, Ψ(xi, yi, h∗ it)⟩] (12) and the bound is strict for w = wt. Optimising (12) will therefore result in an improvement of the energy (11) as well. The latter can be carried out with the cutting-plane technique of [9]. Derivation of the bound (11). The derivation involves a sequence of bounds, starting from ∆(yi, ˆyi(w), ˆhi(w)) ≤∆(yi, ˆyi(w), ˆhi(w)) h 1 + ⟨w, Ψ(xi, ˆyi(w), ˆhi(w))⟩−⟨w, Ψ(xi, yi, h∗ i (w))⟩ i (13) This bound holds because, by construction, the quantity in the square brackets is not smaller than one, as can be verified by substituting the definitions of ˆyi(w), ˆhi(w) and h∗ i (w). We further upper bound the loss by ∆(yi, ˆyi(w), ˆhi(w)) ≤∆(yi, y, h) [1 + ⟨w, Ψ(xi, y, h)⟩−⟨w, Ψ(xi, yi, h∗ i (w))⟩] ˛˛˛ y=ˆyi(w),h=ˆhi(w) ≤ max (y,h)∈Y×H ∆(yi, y, h) [1 + ⟨w, Ψ(xi, y, h)⟩−⟨w, Ψ(xi, yi, h∗ i (w))⟩] (14) Substituting this bound into (2) yields (11). Note that ˆyi(w) and ˆhi(w) are defined as the maximiser of ⟨w, Ψ(xi, y, h)⟩alone (see Eq. 1), while the energy maximised in (14) depends on the loss ∆(yi, y, h) as well. 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 VOC 2007 left−right bicycles recall precision baseline 22.9 + bias 33.7 + test w/ trunc. 55.7 + train w/ trunc. 58.6 + empty cells count 60.0 + transformations 63.0 MISC (a) LEFT (b) Figure 2: Effect of different model components. The left panel evaluates the effect of different components of the model on the task of learning a detector for the left-right facing PASCAL VOC 2007 bicycles. In order of increasing AP (see legend): baseline model (see text); bias term (Sect. 2.5); detecting trunctated instances, training on truncated instances, and counting the truncated cells as a feature (Sect.: 2.2); with searching over small translation, scaling, rotation, skew (Sect. 2.1). Right panel: (a) Original VOC specified bounding box and aspect; (b) alignment and aspect after pose inference – in addition to translation and scale, our templates are searched over a set of small perturbations. This is implemented efficiently by breaking the template into blocks (dashed boxes) and rearranging those. Note that blocks can partially overlap to capture foreshortening. The ground truth pose parameters are approximate because they are obtained from bounding boxes (a). The algorithm improves their estimate as part of inference of the latent variables h. Notice that not only translation, scale, and small jitters are re-estimated, but also the aspect subclass can be updated. In the example, an instance originally labeled as misc (a) is reassigned to the left aspect (b). 4 Experiments Data. As training data we use the PASCAL VOC annotations. Each object instance is labeled with a bounding box and a categorical aspect variable (left, right, front, back, undefined). From the bounding box we estimate translation and scale of the object, and we use aspect to select one of multiple HOG templates. Symmetric aspects (e.g. left and right) are mapped to the same HOG template as suggested in Sect. 2.3. While our model is capable of handling correctly truncations, truncated bounding boxes provide a poor estimate of the pose of the object pose which prevents using such objects for training. While we could simply avoid training with truncated boxes (or generate artificially truncated examples whose pose would be known), we prefer exploiting all the available training data. To do this, we manually augment all truncated PASCAL VOC annotations with an additional “physical” bounding box. The purpose is to provide a better initial guess for the object pose, which is then refined by optimizing over the latent variables. Training and testing speed. Performing inference with the model requires evaluating ⟨w, Ψ(x, p)⟩ for all possible poses p. This means matching a HOG template O(WHTA) times, where W × H is the dimension of the image in cells, T the number of perturbations (Sect. 2.1), and A the number of aspects (Sect. 2.3).1 For a given scale and aspect, matching the template for all locations reduces to convolution. Moreover, by breaking the template into blocks (Fig. 2) and pre-computing the convolution with each of those, we can quickly compute perturbations of the template. All in all, detection requires roughly 30 seconds per image with the full model and four aspects. The cutting plane algorithm used to minimize (12) requires at each iteration solving problems similar to inference. This can be easily parallelized, greatly improving training speed. To detect additional objects at test time we run inference multiple times, but excluding all detections that overlap by more than 20% with any previously detected object. 1Note that we do not multiply by the number S of scales as at each successive scale W and H are reduced geometrically. 7 Figure 3: Top row. Examples of detected bicycles. The dashed boxes are bicycles that were detected with or without truncation support, while the solid ones were detectable only when truncations were considered explicitly. Bottom row. Some cases of correct detections despite extreme truncation for the horse class. Benefit of various model components. Fig. 2 shows how the model improves by the successive introduction of the various features of the model. The example is carried on the VOC left-right facing bicycle, but similar effects were observed for other categories. The baseline model uses only the HOG template without bias, truncations, nor pose refinement (Sect. 2.1). The two most significant improvements are (a) the ability of detecting truncated instances (+22% AP, Fig. 3) and (b) the addition of the bias (+11% AP). Training with the truncated instances, adding the number of occluded HOG cells as a feature component, and adding jitters beyond translation and scaling all yield an improvement of about +2–3% AP. Full model. The model was trained to detect the class bicycle in the PASCAL VOC 2007 data, using five templates, initialized from the PASCAL labeling left, right, front/rear, other. Initially, the pose refinimenent h is null and the alternation optimization algorithm is iterated five times to estimate the model w and refinement h. The detector is then tested on all the test data, enabling multiple detections per image, and computing average-precision as specified by [3]. The AP score was 47%. By comparison, the state of the art for this category [8] achieves 56%. The experiment was repeated for the class horse, obtaining a score of 40%. By comparison, the state of the art on this category, our MKL sliding window classifier [10], achieves 51%. Note that the proposed method uses only HOG, while the others use a combination of at least two features. However [4], using only HOG but a flexible part model, also achieves superior results. Further experiments are needed to evaluate the combined benefits of truncation/occlusion handling (proposed here), with multiple features [10] and flexible parts [4]. Conclusions We have shown how structured output regression with latent variables provides an integrated and effective solution to many problems in object detection: truncations, pose variability, multiple objects, and multiple aspects can all be dealt in a consistent framework. While we have shown that truncated examples can be used for training, we had to manually extend the PASCAL VOC annotations for these cases to include rough “physical” bounding boxes (as a hint for the initial pose parameters). We plan to further extend the approach to infer pose for truncated examples in a fully automatic fashion (weak supervision). Acknowledgments. We are grateful for discussions with Matthew Blaschko. Funding was provided by the EU under ERC grant VisRec no. 228180; the RAEng, Microsoft, and ONR MURI N0001407-1-0182. 8 References [1] M. B. Blaschko and C. H. Lampert. Learning to localize objects with structured output regression. In Proc. ECCV, 2008. [2] N. Dalal and B. Triggs. Histograms of oriented gradients for human detection. In Proc. CVPR, 2005. [3] M. Everingham, L. Van Gool, C. K. I. Williams, J. Winn, and A. Zisserman. The PASCAL Visual Object Classes Challenge 2008 (VOC2008) Results. http://www. pascal-network.org/challenges/VOC/voc2008/workshop/index.html, 2008. [4] P. F. Felzenszwalb, R. B. Grishick, D. McAllister, and D. Ramanan. Object detection with discriminatively trained part based models. PAMI, 2009. [5] R. Fergus, P. Perona, and A. Zisserman. Object class recognition by unsupervised scaleinvariant learning. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, volume 2, pages 264–271, June 2003. [6] K. Hotta. Robust face detection under partial occlusion. In Proceedings of the IEEE International Conference on Image Processing, 2004. [7] Y. Y. Lin, T. L. Liu, and C. S. Fuh. Fast object detection with occlusions. In Proceedings of the European Conference on Computer Vision, pages 402–413. Springer-Verlag, May 2004. [8] P. Schnitzspan, M. Fritz, S. Roth, and B. Schiele. Discriminative structure learning of hierarchical representations for object detection. In Proc. CVPR, 2009. [9] I. Tsochantaridis, T. Hofmann, T. Joachims, and Y. Altun. Support vector machine learning for interdependent and structured output spaces. In Proc. ICML, 2004. [10] A. Vedaldi, V. Gulshan, M. Varma, and A. Zisserman. Multiple kernels for object detection. In Proc. ICCV, 2009. [11] O. Williams, A. Blake, and R. Cipolla. The variational ising classifier (VIC) algorithm for coherently contaminated data. In Proc. NIPS, 2005. [12] J. Winn and J. Shotton. The Layout Consistent Random Field for Recognizing and Segmenting Partially Occluded Objects. In Proc. CVPR, 2006. [13] C.-N. J. Yu and T. Joachims. Learning structural SVMs with latent variables. In Proc. ICML, 2009. 9
2009
47
3,796
On Invariance in Hierarchical Models Jake Bouvrie, Lorenzo Rosasco, and Tomaso Poggio Center for Biological and Computational Learning Massachusetts Institute of Technology Cambridge, MA USA {jvb,lrosasco}@mit.edu, tp@ai.mit.edu Abstract A goal of central importance in the study of hierarchical models for object recognition – and indeed the mammalian visual cortex – is that of understanding quantitatively the trade-off between invariance and selectivity, and how invariance and discrimination properties contribute towards providing an improved representation useful for learning from data. In this work we provide a general group-theoretic framework for characterizing and understanding invariance in a family of hierarchical models. We show that by taking an algebraic perspective, one can provide a concise set of conditions which must be met to establish invariance, as well as a constructive prescription for meeting those conditions. Analyses in specific cases of particular relevance to computer vision and text processing are given, yielding insight into how and when invariance can be achieved. We find that the minimal intrinsic properties of a hierarchical model needed to support a particular invariance can be clearly described, thereby encouraging efficient computational implementations. 1 Introduction Several models of object recognition drawing inspiration from visual cortex have been developed over the past few decades [3, 8, 6, 12, 10, 9, 7], and have enjoyed substantial empirical success. A central theme found in this family of models is the use of Hubel and Wiesel’s simple and complex cell ideas [5]. In the primary visual cortex, simple units compute features by looking for the occurrence of a preferred stimulus in a region of the input (“receptive field”). Translation invariance is then explicitly built into the processing pathway by way of complex units which pool locally over simple units. The alternating simple-complex filtering/pooling process is repeated, building increasingly invariant representations which are simultaneously selective for increasingly complex stimuli. In a computer implementation, the final representation can then be presented to a supervised learning algorithm. Following the flow of processing in a hierarchy from the bottom upwards, the layerwise representations gain invariance while simultaneously becoming selective for more complex patterns. A goal of central importance in the study of such hierarchical architectures and the visual cortex alike is that of understanding quantitatively this invariance-selectivity tradeoff, and how invariance and selectivity contribute towards providing an improved representation useful for learning from examples. In this paper, we focus on hierarchical models incorporating an explicit attempt to impose transformation invariance, and do not directly address the case of deep layered models without local transformation or pooling operations (e.g. [4]). In a recent effort, Smale et al. [11] have established a framework which makes possible a more precise characterization of the operation of hierarchical models via the study of invariance and discrimination properties. However, Smale et al. study invariance in an implicit, rather than constructive, fashion. In their work, two cases are studied: invariance with respect to image rotations and string reversals, and the analysis is tailored to the particular setting. In this paper, we reinterpret and extend the invariance analysis of Smale et al. using a group-theoretic language towards clarifying and unifying the general properties necessary for invariance in a family of hierarchical models. We show that by systematically applying algebraic tools, one can provide a concise set of conditions which must be met to establish invariance, as well as a constructive prescription for meeting those conditions. We additionally find that when one imposes the mild requirement that the transformations of interest have group structure, a broad class of hierarchical models can only be invariant to orthog1 onal transformations. This result suggests that common architectures found in the literature might need to be rethought and modified so as to allow for broader invariance possibilities. Finally, we show that our framework automatically points the way to efficient computational implementations of invariant models. The paper is organized as follows. We first recall important definitions from Smale et al. Next, we extend the machinery of Smale et al. to a more general setting allowing for general pooling functions, and give a proof for invariance of the corresponding family of hierarchical feature maps. This contribution is key because it shows that several results in [11] do not depend on the particular choice of pooling function. We then establish a group-theoretic framework for characterizing invariance in hierarchical models expressed in terms of the objects defined here. Within this framework, we turn to the problem of invariance in two specific domains of practical relevance: images and text strings. Finally, we conclude with a few remarks summarizing the contributions and relevance of our work. All proofs are omitted here, but can be found in the online supplementary material [2]. The reader is assumed to be familiar with introductory concepts in group theory. An excellent reference is [1]. 2 Invariance of a Hierarchical Feature Map We first review important definitions and concepts concerning the neural response feature map presented in Smale et al. The reader is encouraged to consult [11] for a more detailed discussion. We will draw attention to the conditions needed for the neural response to be invariant with respect to a family of arbitrary transformations, and then generalize the neural response map to allow for arbitrary pooling functions. The proof of invariance given in [11] is extended to this generalized setting. The proof presented here (and in [11]) hinges on a technical “Assumption” which must be verified to hold true, given the model and the transformations to which we would like to be invariant. Therefore the key step to establishing invariance is verification of this Assumption. After stating the Assumption and how it figures into the overall picture, we explore its verification in Section 3. There we are able to describe, for a broad range of hierarchical models (including a class of convolutional neural networks [6]), the necessary conditions for invariance to a set of transformations. 2.1 Definition of the Feature Map and Invariance First consider a system of patches of increasing size associated to successive layers of the hierarchy, v1 ⊂v2 ⊂· · · ⊂vn ⊆S, with vn taken to be the size of the full input. Here layer n is the top-most layer, and the patches are pieces of the domain on which the input data are defined. The set S could contain, for example, points in R2 (in the case of 2D graphics) or integer indices (the case of strings). Until Section 4, the data are seen as general functions, however it is intuitively helpful to think of the special case of images, and we will use a notation that is suggestive of this particular case. Next, we’ll need spaces of functions on the patches, Im(vi). In many cases it will only be necessary to work with arbitrary successive pairs of patches (layers), in which case we will denote by u the smaller patch, and v the next larger patch. We next introduce the transformation sets Hi, i = 1, . . . , n intrinsic to the model. These are abstract sets in general, however here we will take them to be comprised of translations with h ∈Hi defined by h : vi →vi+1. Note that by construction, the functions h ∈Hi implicitly involve restriction. For example, if f ∈Im(v2) is an image of size v2 and h ∈H1, then f ◦h is a piece of the image of size v1. The particular piece is determined by h. Finally, to each layer we also associate a dictionary of templates, Qi ⊆Im(vi). The templates could be randomly sampled from Im(vi), for example. Given the ingredients above, the neural response Nm(f) and associated derived kernel bKm are defined as follows. Definition 1 (Neural Response). Given a non-negative valued, normalized, initial reproducing kernel bK1, the m-th derived kernel bKm, for m = 2, . . . , n, is obtained by normalizing Km(f, g) = ⟨Nm(f), Nm(g)⟩L2(Qm−1) where Nm(f)(q) = maxh∈H bKm−1(f ◦h, q), q ∈Qm−1 with H = Hm−1. Here a kernel is normalized by taking bK(f, g) = K(f, g)/ p K(f, f)K(g, g). Note that the neural response decomposes the input into a hierarchy of parts, analyzing sub-regions at different scales. The neural response and derived kernels describe in compact, abstract terms the core operations built into the many related hierarchical models of object recognition cited above. We next define a set of transformations, distinct from the Hi above, to which we would like to be invariant. Let r ∈Ri, i ∈{1, . . . , n −1}, be transformations that can be viewed as mapping either vi to itself or vi+1 to itself (depending on the context in which it is applied). We rule out the degenerate translations and transformations, h or r mapping their entire domain to a single point. When it is necessary to identify transformations defined on a specific domain v, we will use the notation rv : v →v. Invariance of the neural response feature map can now be defined. 2 Definition 2 (Invariance). The feature map Nm is invariant to the domain transformation r ∈R if Nm(f) = Nm(f ◦r), for all f ∈Im(vm), or equivalently, bKm(f ◦r, f) = 1, for all f ∈Im(vm). In order to state the invariance properties of a given feature map, a technical assumption is needed. Assumption 1 (from [11]). Fix any r ∈R. There exists a surjective map π : H →H satisfying rv ◦h = π(h) ◦ru (1) for all h ∈H. This technical assumption is best described by way of an example. Consider images and rotations: the assumption stipulates that rotating an image and then taking a restriction must be equivalent to first taking a (different) restriction and then rotating the resulting image patch. As we will describe below, establishing invariance will boil down to verifying Assumption 1. 2.2 Invariance and Generalized Pooling We next provide a generalized proof of invariance of a family of hierarchical feature maps, where the properties we derive do not depend on the choice of the pooling function. Given the above assumption, invariance can be established for general pooling functions of which the max is only one particular choice. We will first define such general pooling functions, and then describe the corresponding generalized feature maps. The final step will then be to state an invariance result for the generalized feature map, given that Assumption 1 holds. Let H = Hi, with i ∈{1, . . . , n −1}, and let B(R) denote the Borel algebra of R. As in Assumption 1, we define π : H →H to be a surjection, and let Ψ : B(R++) →R++ be a bounded pooling function defined for Borel sets B ∈B(R) consisting of only positive elements. Here R++ denotes the set of strictly positive reals. Given a positive functional F acting on elements of H, we define the set F(H) ∈B(R) as F(H) = {F[h] | h ∈H}. Note that since π is surjective, π(H) = H, and therefore (F ◦π)(H) = F(H). With these definitions in hand, we can define a more general neural response as follows. For H = Hm−1 and all q ∈Q = Qm−1, let the neural response be given by Nm(f)(q) = (Ψ ◦F)(H) where F[h] = bKm−1(f ◦h, q). Given Assumption 1, we can now prove invariance of a neural response feature map built from the general pooling function Ψ. Theorem 1. Given any function Ψ : B(R++) →R++, if the initial kernel satisfies bK1(f, f ◦r) = 1 for all r ∈R, f ∈Im(v1), then Nm(f) = Nm(f ◦r), for all r ∈R, f ∈Im(vm) and m ≤n. We give a few practical examples of the pooling function Ψ. Maximum: The original neural response is recovered setting Ψ(B) = sup B . Averaging: We can consider average pooling by setting Ψ(B) = R x∈B xdµ . If H has a measure ρH, then a natural choice for µ is the induced push-forward measure ρH ◦F −1. The measure ρH may be simply uniform, or in the case of a finite set H, discrete. Similarly, we may consider more general weighted averages. 3 A Group-Theoretic Invariance Framework This section establishes general definitions and conditions needed to formalize a group-theoretic concept of invariance. When Assumption 1 holds, then the neural response map can be made invariant to the given set of transformations. Proving invariance thus reduces to verifying that the Assumption actually holds, and is valid. A primary goal of this paper is to place this task within an algebraic framework so that the question of verifying the Assumption can be formalized and explored in full generality with respect to model architecture, and the possible transformations. Formalization of Assumption 1 culminates in Definition 3 below, where purely algebraic conditions are separated from conditions stemming from the mechanics of the hierarchy. This separation results in a simplified problem because one can then tackle the algebraic questions independent of and untangled from the model architecture. Our general approach is as follows. We will require that R is a subset of a group and then use algebraic tools to understand when and how Assumption 1 can be satisfied given different instances 3 of R. If R is fixed, then the assumption can only be satisfied by placing requirements on the sets of built-in translations Hi, i = 1, . . . , n. Therefore, we will make quantitative, constructive statements about the minimal sets of translations associated to a layer required to support invariance to a set of transformations. Conversely, one can fix Hi and then ask whether the resulting feature map will be invariant to any transformations. We explore this perspective as well, particularly in the examples of Section 4, where specific problem domains are considered. 3.1 Formulating Conditions for Invariance Recall that vi ⊂S. Because it will be necessary to translate in S, it is assumed that an appropriate notion of addition between the elements of S is given. If G is a group, we denote the (left) action of G on S by A : G×S →S. Given an element g ∈G, the notation Ag : S →S will be utilized. Since A is a group action, it satisfies (Ag ◦Ag′)(x) = Agg′(x) for all x ∈S and all g, g′ ∈G. Consider an arbitrary pair of successive layers with associated patch sizes u and v, with u ⊂v ⊂S. Recall that the definition of the neural response involves the “built-in” translation functions h : u →v, for h ∈H = Hu. Since S has an addition operation, we may parameterize h ∈H explicitly as ha(x) = x + a for x ∈u and parameter a ∈v such that (u + a) ⊂v. The restriction behavior of the translations in H prevents us from simply generating a group out of the elements of H. To get around this difficulty, we will decompose the h ∈H into a composition of two functions: a translation group action and an inclusion. Let S generate a group of translations T by defining the injective map S →T a 7→ta. (2) That is, to every element of a ∈S we associate a member of the group T whose action corresponds to translation in S by a: Ata(x) = x + a for x, a ∈S. (Although we assume the specific case of translations throughout, the sets of intrinsic operations Hi may more generally contain other kinds of transformations. We assume, however, that T is abelian.) Furthermore, because the translations H can be parameterized by an element of S, one can apply Equation (2) to define an injective map τ : H →T by ha 7→ta. Finally, we define ιu : u ,→S to be the canonical inclusion of u into S. We can now rewrite ha : u →v as ha = Ata ◦ιu Note that because a satisfies (u + a) ⊂v by definition, im(Ata ◦ιu) ⊂v automatically. In the statement of Assumption 1, the transformations r ∈R can be seen as maps from u to itself, or from v to itself, depending on which side of Equation (1) they are applied. To avoid confusion we denoted the former case by ru and the latter by rv. Although ru and rv are the same “kind” of transformation, one cannot in general associate to each “kind” of transformation r ∈R a single element of some group as we did in the case of translations above. The group action could very well be different depending on the context. We will therefore consider ru and rv to be distinct transformations, loosely associated to r. In our development, we will make the important assumption that the transformations ru, rv ∈R can be expressed as actions of elements of some group, and denote this group by R. More precisely, for every ru ∈R, there is assumed to be a corresponding element ρu ∈R whose action satisfies Aρu(x) = ru(x) for all x ∈u, and similarly, for every rv ∈ R, there is assumed to be a corresponding element ρv ∈R whose action satisfies Aρv(x) = rv(x) for all x ∈v. The distinction between ρu and ρv will become clear in the case of feature maps defined on functions whose domain is a finite set (such as strings). In the case of images, we will see that ρu = ρv. Assumption 1 requires that rv ◦h = h′ ◦ru for h, h′ ∈H, with the map π : h 7→h′ onto. We now restate this condition in group-theoretic terms. Define ˜T = τ(Hu) ⊆T to be the set of group elements corresponding to Hu. Set h = ha, h′ = hb, and denote also by ru, rv the elements of the group R corresponding to the given transformation r ∈R. The Assumption says in part that rv ◦h = h′ ◦ru for some h′ ∈H. This can now be expressed as Arv ◦Ata ◦ιu = Atb ◦ιu ◦Aru ◦ιu (3) for some tb ∈˜T. In order to arrive at a purely algebraic condition for invariance, we will need to understand and manipulate compositions of group actions. However on the right-hand side of Equation (3) the translation Atb is separated from the transformation Aru by the inclusion ιu. We will therefore need to introduce an additional constraint on R. This constraint leads to our first condition for invariance: If x ∈u, then we require that Aru(x) ∈u for all r ∈R. One can now see that if this condition is met, then verifying Equation (3) reduces to checking that Arv ◦Ata = Atb ◦Aru, (4) 4 and that the map ta 7→tb is onto. The next step is to turn compositions of actions Ax ◦Ay into an equivalent action of the form Axy. Do do this, one needs R and T to be subgroups of the same group G so that the associativity property of group actions applies. A general way to accomplish this is to form the semidirect product G = T ⋊R. (5) Recall that the semidirect product G = X ⋊Y is a way to put two subgroups X, Y together where X is required to be normal in G, and X ∩Y = {1} (the usual direct product requires both subgroups to be normal). In our setting G is easily shown to be isomorphic to a group with normal subgroup T and subgroup R where each element may be written in the form g = tr for t ∈T, r ∈R. We will see below that we do not loose generality by requiring T to be normal. Note that although this construction precludes R from containing the transformations in T, allowing R to contain translations is an uninteresting case. Consider now the action Ag for g ∈G = T ⋊R. Returning to Equation (4), we can apply the associativity property of actions and see that Equation (4) will hold as long as rv ˜T = ˜Tru (6) for every r ∈R. This is our second condition for invariance, and is a purely algebraic requirement concerning the groups R and T, distinct from the restriction related conditions involving the patches u and v. The two invariance conditions we have described thus far combine to capture the content of Assumption 1, but in a manner that separates group related conditions from constraints due to restriction and the nested nature of an architecture’s patch domains. We can summarize the invariance conditions in the form of a concise definition that can be applied to establish invariance of the neural response feature maps Nm(f), 2 ≤m ≤n with respect to a set of transformations. Let ˜R ⊆R be the set of transformations for which we would like to prove invariance, in correspondence with R. Definition 3 (Compatible Sets). The subsets ˜R ⊂R and ˜T ⊂T are compatible if all of the following conditions hold: 1. For each r ∈˜R, rv ˜T = ˜Tru. When ru = rv for all r ∈R, this means that normalizer of ˜T in ˜R is ˜R. 2. Left transformations rv never take a point in v outside of v, and right transformations ru never take a point in u/v outside of u/v (respectively): imArv ◦ιv ⊆v, imAru ◦ιu ⊆u, imAru ◦ιv ⊆v, for all r ∈˜R. 3. Translations never take a point in u outside of v: imAt ◦ιu ⊆v for all t ∈˜T. The final condition above has been added to ensure that any set of translations ˜T we might construct satisfy the implicit assumption that the hierarchy’s translation functions h ∈H are maps which respect the definition h : u →v. If ˜R and ˜T are compatible, then for each ta ∈˜T Equation 3 holds for some tb ∈˜T, and the map ta 7→tb is surjective from ˜T →˜T (by Condition (1) above). So Assumption 1 holds. As will become clear in the following section, the tools available to us from group theory will provide insight into the structure of compatible sets. 3.2 Orbits and Compatible Sets Suppose we assume that ˜R is a subgroup (rather than just a subset), and ask for the smallest compatible ˜T. We will show that the only way to satisfy Condition (1) in Definition 3 is to require that ˜T be a union of ˜R-orbits, under the action (t, r) 7→rvtr−1 u (7) for t ∈T, r ∈˜R. This perspective is particularly illuminating because it will eventually allow us to view conjugation by a transformation r as a permutation of ˜T, thereby establishing surjectivity of 5 the map π defined in Assumption 1. For computational reasons, viewing ˜T as a union of orbits is also convenient. If rv = ru = r, then the action (7) is exactly conjugation and the ˜R-orbit of a translation t ∈T is the conjugacy class C ˜ R(t) = {rtr−1 | r ∈˜R}. Orbits of this form are also equivalence classes under the relation s ∼s′ if s′ ∈C ˜ R(s), and we will require ˜T to be partitioned by the conjugacy classes induced by ˜R. The following Proposition shows that, given set of candidate translations in H, we can construct a set of translations compatible with ˜R by requiring ˜T to be a union of ˜R-orbits under the action of conjugation. Proposition 1. Let Γ ⊆T be a given set of translations, and assume the following: (1) G ∼= T ⋊R, (2) For each r ∈R, r = ru = rv, (3) ˜R is a subgroup of R. Then Condition (1) of Definition 3 is satisfied if and only if ˜T can be expressed as a union of orbits of the form ˜T = [ t∈Γ C ˜ R(t) . (8) An interpretation of the above Proposition, is that when ˜T is a union of ˜R-orbits, conjugation by r can be seen as a permutation of ˜T. In general, a given ˜T may be decomposed into several such orbits and the conjugation action of ˜R on ˜T may not necessarily be transitive. 4 Analysis of Specific Invariances We continue with specific examples relevant to image processing and text analysis. 4.1 Isometries of the Plane Consider the case where G is the group M of planar isometries, u ⊂v ⊂S = R2, and H involves translations in the plane. Let O2 be the group of orthogonal operators, and let ta ∈T denote a translation represented by the vector a ∈R2. In this section we assume the standard basis and work with matrix representations of G when it is convenient. We first need that T ◁M, a property that will be useful when verifying Condition (1) of Definition 3. Indeed, from the First Isomorphism Theorem [1], the quotient space M/T is isomorphic to O2, giving the following commutative diagram: M π- O2 M/T φ ? ˜π where the isomorphism ˜π : M/T →O2 is given by ˜π(mT) = π(m) and φ(m) = mT. We recall that the kernel of a group homomorphism π : G →G′ is a normal subgroup of G, and that normal subgroups N of G are invariant under the operation of conjugation by elements g of G. That is, gNg−1 = N for all g ∈G. With this picture in mind, the following Lemma establishes that T ◁M, and further shows that M is isomorphic to T ⋊R with R = O2, and T a normal subgroup of M. Lemma 1. For each m ∈M, ta ∈T, mta = tbm for some unique element tb ∈T. We are now in a position to verify the Conditions of Definition 3 for the case of planar isometries. Proposition 2. Let H be the set of translations associated to an arbitrary layer of the hierarchical feature map and define the injective map τ : H →T by ha 7→ta, where a is a parameter characterizing the translation. Set Γ = {τ(h) | h ∈H}. Take G = M ∼= T ⋊O2 as above. The sets ˜R = O2, ˜T = [ t∈Γ C ˜ R(t) are compatible. This proposition states that the hierarchical feature map may be made invariant to isometries, however one might reasonably ask whether the feature map can be invariant to other transformations. The following Proposition confirms that isometries are the only possible transformations, with group structure, to which the hierarchy may be made invariant in the exact sense of Definition 2. Proposition 3. Assume that the input spaces {Im(vi)}n−1 i=1 are endowed with a norm inherited from Im(vn) by restriction. Then at all layers, the group of orthogonal operators O2 is the only group of transformations to which the neural response can be invariant. 6 vi vi+1 ta OR~(tc) OR~(tb) OR~(ta) tb tc Figure 1: Example illustrating construction of an appropriate H. Suppose H initially contains the translations Γ = {ha, hb, hc}. Then to be invariant to rotations, the condition on H is that H must also include translations defined by the ˜R-orbits O ˜ R(ta), O ˜ R(tb) and O ˜ R(tc). In this example ˜R = SO2, and the orbits are translations to points lying on a circle in the plane. The following Corollary is immediate: Corollary 1. The neural response cannot be scale invariant, even if bK1 is. We give a few examples illustrating the application of the Propositions above. Example 1. If we choose the group of rotations of the plane by setting ˜R = SO2 ◁O2, then the orbits O ˜ R(a) are circles of radius ∥a∥. See Figure 1. Therefore rotation invariance is possible as long as the set ˜T (and therefore H, since we can take H = τ −1( ˜T)) includes translations to all points along the circle of radius a, for each element ta ∈˜T. In particular if H includes all possible translations, then Assumption 1 is verified, and we can apply Theorem 1: Nm will be invariant to rotations as long as bK1 is. A similar argument can be made for reflection invariance, as any rotation can be built out of the composition of two reflections. Example 2. Analogous to the previous example, we may also consider finite cyclical groups Cn describing rotations by θ = 2π/n. In this case the construction of an appropriate set of translations is similar: we require that ˜T include at least the conjugacy classes with respect to the group Cn, CCn(t) for each t ∈Γ = τ(H). Example 3. Consider a simple convolutional neural network [6] consisting of two layers, one filter at the first convolution layer, and downsampling at the second layer defined by summation over all distinct k × k blocks. In this case, Proposition 2 and Theorem 1 together say that if the filter kernel is rotation invariant, then the output representation will be invariant to global rotation of the input image. This is so because convolution implies the choice K1(f, g) = ⟨f, g⟩L2, average pooling, and H = H1 containing all possible translations. If the convolution filter z is rotation invariant, z ◦r = z for all rotations r, and K1(f ◦r, z) = K1(f, z ◦r−1) = K1(f, z). So we can conclude invariance of the initial kernel. 4.2 Strings, Reflections, and Finite Groups We next consider the case of finite length strings defined on a finite alphabet. One of the advantages group theory provides in the case of string data is that we need not work with permutation representations. Indeed, we may equivalently work with group elements which act on strings as abstract objects. The definition of the neural response given in Smale et al. involves translating an analysis window over the length of a given string. Clearly translations over a finite string do not constitute a group as the law of composition is not closed in this case. We will get around this difficulty by first considering closed words formed by joining the free ends of a string. Following the case of circular data where arbitrary translations are allowed, we will then consider the original setting described in Smale et al. in which strings are finite non-circular objects. Taking a geometric standpoint sheds light on groups of transformations applicable to strings. In particular, one can interpret the operation of the translations in H as a circular shift of a string followed by truncation outside of a fixed window. The cyclic group of circular shifts of an n-string is readily seen to be isomorphic to the group of rotations of an n-sided regular polygon. Similarly, reversal of an n-string is isomorphic to reflection of an n-sided polygon, and describes a cyclic group of order two. As in Equation (5), we can combine rotation and reflection via a semidirect product Dn ∼= Cn ⋊C2 (9) 7 where Ck denotes the cyclic group of order k. The resulting product group has a familiar presentation. Let t, r be the generators of the group, with r corresponding to reflection (reversal), and t corresponding to a rotation by angle 2π/n (leftward circular shift by one character). Then the group of symmetries of a closed n-string is described by the relations Dn = ⟨t, r | tn, r2 v, rvtrvt⟩. (10) These relations can be seen as describing the ways in which an n-string can be left unchanged. The first says that circularly shifting an n-string n times gives us back the original string. The second says that reflecting twice gives back the original string, and the third says that left-shifting then reflecting is the same as reflecting and then right-shifting. In describing exhaustively the symmetries of an n-string, we have described exactly the dihedral group Dn of symmetries of an n-sided regular polygon. As manipulations of a closed n-string and an n-sided polygon are isomorphic, we will use geometric concepts and terminology to establish invariance of the neural response defined on strings with respect to reversal. In the following discussion we will abuse notation and at times denote by u and v the largest index associated with the patches u and v. In the case of reflections of strings, ru is quite distinct from rv. The latter reflection, rv, is the usual reflection of an v-sided regular polygon, whereas we would like ru to reflect a smaller u-sided polygon. To build a group out of such operations, however, we will need to ensure that ru and rv both apply in the context of v-sided polygons. This can be done by extending Aru to v by defining ru to be the composition of two operations: one which reflects the u portion of a string and leaves the rest fixed, and another which reflects the remaining (v −u)-substring while leaving the first u-substring fixed. In this case, one will notice that ru can be written in terms of rotations and the usual reflection rv: ru = rvt−u = turv . (11) This also implies that for any x ∈T, {rxr−1 | r ∈⟨rv⟩} = {rxr−1 | r ∈⟨rv, ru⟩}, where we have used the fact that T is abelian, and applied the relations in Equation (10). We can now make an educated guess as to the form of ˜T by starting with Condition (1) of Definition 3 and applying the relations appearing in Equation (10). Given x ∈˜T, a reasonable requirement is that there must exist an x′ ∈˜T such that rvx = x′ru. In this case x′ = rvxru = rvxrvt−u = x−1rvrvt−u = x−1t−u, (12) where the second equality follows from Equation (11), and the remaining equalities follow from the relations (10). The following Proposition confirms that this choice of ˜T is compatible with the reflection subgroup of G = Dv, and closely parallels Proposition 2. Proposition 4. Let H be the set of translations associated to an arbitrary layer of the hierarchical feature map and define the injective map τ : H →T by ha 7→ta, where a is a parameter characterizing the translation. Set Γ = {τ(h) | h ∈H}. Take G = Dn ∼= T ⋊R, with T = Cn = ⟨t⟩and R = C2 = {r, 1}. The sets ˜R = R, ˜T = Γ ∪Γ−1t−u are compatible. One may also consider non-closed strings, as in Smale et al., in which case substrings which would wrap around the edges are disallowed. Proposition 4 in fact points to the minimum ˜T for reversals in this scenario as well, noticing that the set of allowed translations is the same set above but with the illegal elements removed. If we again take length u substrings of length v strings, this reduced set of valid transformations in fact describes the symmetries of a regular (v −u + 1)-gon. We can thus apply Proposition 4 working with the Dihedral group G = Dv−u+1 to settle the case of non-closed strings. 5 Conclusion We have shown that the tools offered by group theory can be profitably applied towards understanding invariance properties of a broad class of deep, hierarchical models. If one knows in advance the transformations to which a model should be invariant, then the translations which must be built into the hierarchy can be described. In the case of images, we showed that the only group to which a model in the class of interest can be invariant is the group of planar orthogonal operators. Acknowledgments This research was supported by DARPA contract FA8650-06-C-7632, Sony, and King Abdullah University of Science and Technology. 8 References [1] M. Artin. Algebra. Prentice-Hall, 1991. [2] J. Bouvrie, L. Rosasco, and T. Poggio. Supplementary material for “On Invariance in Hierarchical Models”. NIPS, 2009. Available online: http://cbcl.mit.edu/ publications/ps/978_supplement.pdf. [3] K. Fukushima. Neocognitron: A self-organizing neural network model for a mechanism of pattern recognition unaffected by shift in position. Biol. Cyb., 36:193–202, 1980. [4] G.E. Hinton and R.R. Salakhutdinov. Reducing the dimensionality of data with neural networks. Science, 313(5786):504–507, 2006. [5] D.H. Hubel and T.N. Wiesel. Receptive fields and functional architecture of monkey striate cortex. J. Phys., 195:215–243, 1968. [6] Y. LeCun, L. Bottou, Y. Bengio, and P. Haffner. Gradient-based learning applied to document recognition. Proc. of the IEEE, 86(11):2278–2324, November 1998. [7] H. Lee, R. Grosse, R. Ranganath, and A. Ng. Convolutional deep belief networks for scalable unsupervised learning of hierarchical representations. In Proceedings of the Twenty-Sixth International Conference on Machine Learning, 2009. [8] B.W. Mel. SEEMORE: Combining color, shape, and texture histogramming in a neurally inspired approach to visual object recognition. Neural Comp., 9:777–804, 1997. [9] T. Serre, A. Oliva, and T. Poggio. A feedforward architecture accounts for rapid categorization. Proceedings of the National Academy of Science, 104:6424–6429, 2007. [10] T. Serre, L. Wolf, S. Bileschi, M. Riesenhuber, and T. Poggio. Robust object recognition with cortex-like mechanisms. IEEE Trans. on Pattern Analysis and Machine Intelligence, 29:411– 426, 2007. [11] S. Smale, L. Rosasco, J. Bouvrie, A. Caponnetto, and T. Poggio. Mathematics of the neural response. Foundations of Computational Mathematics, June 2009. available online, DOI:10.1007/s10208-009-9049-1. [12] H. Wersing and E. Korner. Learning optimized features for hierarchical models of invariant object recognition. Neural Comput., 7(15):1559–1588, July 2003. 9
2009
48
3,797
Submanifold density estimation Arkadas Ozakin Georgia Tech Research Institute Georgia Insitute of Technology arkadas.ozakin@gtri.gatech.edu Alexander Gray College of Computing Georgia Institute of Technology agray@cc.gatech.edu Abstract Kernel density estimation is the most widely-used practical method for accurate nonparametric density estimation. However, long-standing worst-case theoretical results showing that its performance worsens exponentially with the dimension of the data have quashed its application to modern high-dimensional datasets for decades. In practice, it has been recognized that often such data have a much lower-dimensional intrinsic structure. We propose a small modification to kernel density estimation for estimating probability density functions on Riemannian submanifolds of Euclidean space. Using ideas from Riemannian geometry, we prove the consistency of this modified estimator and show that the convergence rate is determined by the intrinsic dimension of the submanifold. We conclude with empirical results demonstrating the behavior predicted by our theory. 1 Introduction: Density estimation and the curse of dimensionality Kernel density estimation (KDE) [8] is one of the most popular methods for estimating the underlying probability density function (PDF) of a dataset. Roughly speaking, KDE consists of having the data points “contribute” to the estimate at a given point according to their distances from the point. In the simplest multi-dimensional KDE [3], the estimate ˆfm(y0) of the PDF f(y0) at a point y0 ∈RN is given in terms of a sample {y1, . . . , ym} as, ˆfm(y0) = 1 m m X i=1 1 hN m K ∥yi −y0∥ hm  , (1) where hm > 0, the bandwidth, is chosen to approach to zero at a suitable rate as the number m of data points increases, and K : [0.∞) →[0, ∞) is a kernel function that satisfies certain properties such as boundedness. Various theorems exist on the different types of convergence of the estimator to the correct result and the rates of convergence. The earliest result on the pointwise convergence rate in the multivariable case seems to be given in [3], where it is stated that under certain conditions for f and K, assuming hm →0 and mhm →∞as m →∞, the mean squared error in the estimate ˆf(y0) of the density at a point goes to zero with the rate, MSE[ ˆfm(y0)] = E  ˆfm(y0) −f(y0) 2 = O  h4 m + 1 mhN m  as m →∞. If hm is chosen to be proportional to m−1/(N+4), one gets, MSE[ ˆfm(p)] = O  1 m4/(N+4)  , (2) as m →∞. This is an example of a curse of dimensionality; the convergence rate slows as the dimensionality N of the data set increases. In Table 4.2 of [12], Silverman demonstrates how the sample size required for a given mean square error for the estimate of a multivariable normal distribution increases with the dimensionality. The numbers look as discouraging as the formula 2. 1 One source of optimism towards various curses of dimensionality is the fact that although the data for a given problem may have many features, in reality the intrinsic dimensionality of the “data subspace” of the full feature space may be low. This may result in there being no curse at all, if the performance of the method/algorithm under consideration can be shown to depend only on the intrinsic dimensionality of the data. Alternatively, one may be able to avoid the curse by devising ways to work with the low-dimensional data subspace by using dimensional reduction techniques on the data. One example of the former case is the results on nearest neighbor search [6, 2] which indicate that the performance of certain nearest-neighbor search algortihms is determined not by the full dimensionality of the feature space, but only on the intrinsic dimensionality of the data subspace. Riemannian manifolds. In this paper, we will assume that the data subspace is a Riemannian manifold. Riemannian manifolds provide a generalization of the notion of a smooth surface in R3 to higher dimensions. As first clarified by Gauss in the two-dimensional case (and by Riemann in the general case) it turns out that intrinsic features of the geometry of a surface such as lengths of its curves or intrinsic distances between its points, etc., can be given in terms of the so-called metric tensor1 g without referring to the particular way the the surface is embedded in R3. A space whose geometry is defined in terms of a metric tensor is called a Riemannian manifold (for a rigorous definition, see, e.g., [5, 7, 1]). Previous work. In [9], Pelletier defines an estimator of a PDF on a Riemannian manifold M by using the distances measured on M via its metric tensor, and obtains the same convergence rate as in (2), with N being replaced by the dimensionality of the Riemannian manifold. Thus, if we know that the data lives on a Riemannian manifold M, the convergence rate of this estimator will be determined by the dimensionality of M, instead of the full dimensionality of the feature space on which the data may have been originally sampled. While an interesting generalization of the usual KDE, this approach assumes that the data manifold M is known in advance, and that we have access to certain geometric quantities related to this manifold such as intrinsic distances between its points and the so-called volume density function. Thus, this Riemannian KDE cannot be used directly in a case where the data lives on an unknown Riemannian submanifold of RN. Certain tools from existing nonlinear dimensionality reduction methods could perhaps be utilized to estimate the quantities needed in the estimator of [9], however, a more straightforward method that directly estimates the density of the data as measured in the subspace is desirable. Other related works include [13], where the authors propose a submanifold density estimation method that uses a kernel function with a variable covariance but do not present theorerical results, [4] where the author proposes a method for doing density estimation on a Riemannian manifold by using the eigenfunctions of the Laplace-Beltrami operator, which, as in [9], assumes that the manifold is known in advance, together with intricate geometric information pertaining to it, and [10, 11], which discuss various issues related to statistics on a Riemannian manifold. This paper. In this paper, we propose a direct way to estimate the density of Euclidean data that lives on a Riemannian submanifold of RN with known dimension n < N. We prove the pointwise consistency of the estimator, and prove bounds on its convergencerates given in terms of the intrinsic dimension of the submanifold the data lives in. This is an example of the avoidance of the curse of dimensionality in the manner mentioned above, by a method whose performance depends on the intrinsic dimensionality of the data instead of the full dimensionality of the feature space. Our method is practical in that it works with Euclidean distances on RN. In particular, we do not assume any knowledge of the quantities pertaining to the intrinsic geometry of the underlying submanifold such as its metric tensor, geodesic distances between its points, its volume form, etc. 2 The estimator and its convergence rate Motivation. In this paper, we are concerned with the estimation of a PDF that lives on an (unknown) n-dimensional Riemannian submanifold M of RN, where N > n. Usual, N-dimensional kernel density estimation would not work for this problem, since if interpreted as living on RN, the 1The metric tensor can be thought of as giving the “infinitesimal distance” ds between two points whose coordinates differ by the infinitesimal amounts (dy1, . . . , dyN) as ds2 = P ij gijdyidyj. 2 underlying PDF would involve a “delta function” that vanishes when one moves away from M, and “becomes infinite” on M in order to have proper normalization. More formally, the N-dimensional probability measure for such an n-dimensional PDF on M will have support only on M, will not be absolutely continuous with respect to the Lebesgue measure on RN, and will not have a probability density function on RN. If one attempts to use the usual, N-dimensional KDE for data drawn from such a probability measure, the estimator will “try to converge” to a singular PDF, one that is infinite on M, zero outside. In order to estimate the probability density function on M by using data given in RN, we propose a simple modification of usual KDE on RN, namely, to use a kernel that is normalized for n-dimensions instead of N, while still using the Euclidean distances in RN. The intuition behind this approach is based on three facts: 1) For small distances, an n-dimensional Riemannian manifold “looks like” Rn, and densities in Rn should be estimated by an n-dimensional kernel, 2) For points of M that are close enough to each other, the intrinsic distances as measured on M are close to Euclidean distances as measured in RN, and, 3) For small bandwidths, the main contribution to the estimate at a point comes from data points that are nearby. Thus, as the number of data points increases and the bandwidth is taken to be smaller and smaller, estimating the density by using a kernel normalized for n-dimensions and distances as measured in RN should give a result closer and closer to the correct value. We will next give the formal definition of the estimator motivated by these considerations, and state our theorem on its asymptotics. As in the original work of Parzen [8], the proof that the estimator is asymptotically unbiased consists of proving that as the bandwidth converges to zero, the kernel function becomes a “delta function”. This result is also used in showing that with an appropriate choice of vanishing rate for the bandwidth, the variance also vanishes asymptotically, hence the estimator is pointwise consistent. Statement of the theorem Let M be an n-dimensional, embedded, complete Riemannian submanifold of RN (n < N) with an induced metric g and injectivity radius rinj > 0.2 Let d(p, q) be the length of a length-minimizing geodesic in M between p, q ∈M, and let u(p, q) be the geodesic (linear) distance between p and q as measured in RN. Note that u(p, q) ≤d(p, q). We will use the notation up(q) = u(p, q) and dp(q) = d(p, q). We will denote the Riemannian volume measure on M by V , and the volume form by dV . Theorem 2.1. Let f : M →[0, ∞) be a probability density function defined on M (so that the related probability measure is fV ), and K : [0, ∞) →[0, ∞) be a continous function that satisfies vanishes outside [0, 1), is differentiable with a bounded derivative in [0, 1), and satisfies, R ∥z∥≤1 K(∥z∥)dnz = 1. Assume f is differentiable to second order in a neighborhood of p ∈M, and for a sample q1, . . . , qm of size m drawn from the density f, define an estimator ˆfm(p) of f(p) as, ˆfm(p) = 1 m m X j=1 1 hnm K up(qj) hm  (3) where hm > 0. If hm satisfies limm→∞hm = 0 and limm→∞mhn m = ∞, then, there exists non-negative numbers m∗, Cb, and CV such that for all m > m∗we have, MSE h ˆfm(p) i = E  ˆfm(p) −f(p) 2 < Cbh4 m + CV mhnm . (4) If hm is chosen to be proportional to m−1/(n+4), this gives, E h (fm(p) −f(p))2i = O 1 m4/(n+4)  as m →∞. Thus, the convergence rate of the estimator is given as in [3, 9], with the dimensionality replaced by the intrinsic dimension n of M. The proof will follow from the two lemmas below on the convergence rates of the bias and the variance. 2The injectivity radius rinj of a Riemannian manifold is a distance such that all geodesic pieces (i.e., curves with zero intrinsic acceleration) of length less than rinj minimize the length between their endpoints. On a complete Riemannian manifold, there exists a distance-minimizing geodesic between any given pair of points, however, an arbitrary geodesic need not be distance minimizing. For example, any two non-antipodal points on the sphere can be connected with two geodesics with different lengths, namely, the two pieces of the great circle passing throught the points. For a detailed discussion of these issues, see, e.g., [1]. 3 3 Preliminary results The following theorem, which is analogous to Theorem 1A in [8], tells that up to a constant, the kernel becomes a “delta function” as the bandwidth gets smaller. Theorem 3.1. Let K : [0, ∞) →[0, ∞) be a continuous function that vanishes outside [0, 1) and is differentiable with a bounded derivative in [0, 1), and let ξ : M →R be a function that is differentiable to second order in a neighborhood of p ∈M. Let ξh(p) = 1 hn Z M K up(q) h  ξ(q) dV (q) , (5) where h > 0 and dV (q) denotes the Riemannian volume form on M at point q. Then, as h →0, ξh(p) −ξ(p) Z Rn K(∥z∥)dnz = O(h2) , (6) where z = (z1, . . . , zn) denotes the Cartesian coordinates on Rn and dnz = dz1 . . . dzn denotes the volume form on Rn. In particular, limh→0 ξh(p) = ξ(p) R Rn K(∥z∥)dnz. Before proving this theorem, we prove some results on the relation between up(q) and dp(q). Lemma 3.1. There exist δup > 0 and Mup > 0 such that for all q with dp(q) ≤δup, we have, dp(q) ≥up(q) ≥dp(q) −Mup [dp(q)]3 . (7) In particular, limq→p up(q) dp(q) = 1. Proof. Let cv0(s) be a geodesic in M parametrized by arclength s, with c(0) = p and initial velocity dcv0 ds s=0 = v0. When s < rinj, s is equal to dp(cv0(s)) [7, 1]. Now let xv0(s) be the representation of cv0(s) in RN in terms of Cartesian coordinates with the origin at p. We have up(cv0(s)) = ∥xv0(s)∥and ∥x′ v0(s)∥= 1, which gives3 x′ v0(s) · x′′ v0(s) = 0. Using these we get, dup(cv0 (s)) ds s=0 = 1 , and d2up(cv0(s)) ds2 s=0 = 0. Let M3 ≥0 be an upper bound on the absolute value of the third derivative of up(cv0(s)) for all s ≤rinj and all unit length v0: d3up(cv0(s)) ds3 ≤M3. Taylor’s theorem gives up(cv0(s)) = s + Rv0(s) where |Rv0(s)| ≤M3 s3 3! . Thus, (7) holds with Mup = M3 3! , for all r < rinj. For later convenience, instead of δu = rinj, we will pick δup as follows. The polynomial r −Mupr3 is monotonically increasing in the interval 0 ≤r ≤1/p3Mup. We let δup = min{rinj, 1/pMup}, so that r −Mupr3 is ensured to be monotonic for 0 ≤r ≤δup. Definition 3.2. For 0 ≤r1 < r2, let, Hp(r1, r2) = inf{up(q) : r1 ≤dp(q) < r2} , (8) Hp(r) = Hp(r, ∞) = inf{up(q) : r1 ≤dp(q)} , (9) i.e., Hp(r1, r2) is the smallest u-distance from p among all points that have a d-distance between r1 and r2. Since M is assumed to be an embedded submanifold, we have Hp(r) > 0 for all r > 0. In the below, we will assume that all radii are smaller than rinj, in particular, a set of the form {q : r1 ≤ dp(q) < r2} will be assumed to be non-empty and so, due to the completeness of M, to contain a point q ∈M such that dp(q) = r1. Note that, Hp(r1) = min{H(r1, r2), H(r2)} . (10) Lemma 3.2. Hp(r) is a non-decreasing, non-negativefunction, and there exist δHp > 0 and MHp ≥ 0 such that, r ≥Hp(r) ≥r −MHpr3 , for all r < δHp. In particular, limr→0 Hp(r) r = 1. 3Primes denote differentiation with respect to s. 4 Proof. Hp(r) is clearly non-decreasing and Hp(r) ≤r follows from up(q) ≤dp(q) and the fact that there exists at least one point q with dp(q) = r in the set {q : r ≤dp(q)} Let δHp = Hp(δup) where δup is as in the proof of Lemma 3.1 and let r < δHp. Since r < δHp = Hp(δup) ≤δup, by Lemma 3.1 we have, r ≥up(r) ≥r −Mupr3 , (11) for some Mup > 0. Now, since r and r −Mupr3 are both monotonic for 0 ≤r ≤δup, we have (see figure) r ≥Hp(r, δup) ≥r −Mupr3 . (12) In particular, H(r, δup) ≤r < δHp = Hp(δup), i.e, H(r, δup) < Hp(δup). Using (10) this gives, Hp(r) = Hp(r, δup). Combining this with (12), we get r ≥Hp(r) ≥r −Mupr3 for all r < δHp. Next we show that for all small enough h, there exists some radius Rp(h) such that for all points q with a dp(q) ≥Rp(h), we have up(q) ≥h. Rp(h) will roughly be the inverse function of Hp(r). Lemma 3.3. For any h < Hp(rinj), let Rp(h) = sup{r : Hp(r) ≤h}. Then, up(q) ≥h for all q with dp(q) ≥Rp(h) and there exist δRp > 0 and MRp > 0 such that for all h ≤δRp, Rp(h) satisfies, h ≤Rp(h) ≤h + MRph3 . (13) In particular, limh→0 Rp(h) h = 1. Proof. That up(q) ≥h when dq(q) ≥Rp(h) follows from the definitions. In order to show (13), we will use Lemma 3.2. Let α(r) = r −MHpr3, where MHp is as in Lemma 3.2. Then, α(r) is oneto-one and continuous in the interval 0 ≤r ≤δHp ≤δup. Let β = α−1 be the inverse function of α in this interval. From the definition of Rp(h) and Lemma 3.2, it follows that h ≤Rp(h) ≤β(h) for all h ≤α(δHp). Now, β(0) = 0, β′(0) = 1, β′′(0) = 0, so by Taylor’s theorem and the fact that the third derivative of β is bounded in a neighborhood of 0, there exists δg and MRp such that β(h) ≤h + MRph3 for all h ≤δg. Thus, h ≤Rp(h) ≤h + MRph3, (14) for all h ≤δR where δR = min{α(δHp), δg}. Proof of Theorem 3.1. We will begin by proving that for small enough h, there is no contribution to the integral in the definition of ξh(p) (see (5)) from outside the coordinate patch covered by normal coordinates.4 Let h0 > 0 be such that Rp(h0) < rinj (such an h0 exists since limh→0 Rp(h) = 0). For any h ≤h0, all points q with dp(q) > rinj will satisfy up(q) > h. This means if h is small enough, K( up(q) h ) = 0 for all points outside the injectivity radius and we can perform the integral in (5) solely in the patch of normal coordinates at p. For normal coordinates y = (y1, . . . , yn) around the point p with y(p) = 0, we have dp(q) = ∥y(q)∥[7, 1]. With slight abuse of notation, we will write up(y(q)) = up(q), ξ(y(q)) = ξ(q) and g(q) = g(y(q)), where g is the metric tensor of M. Since K( up(q) h ) = 0 for all q with dp(q) > Rp(h), we have, ξh(p) = 1 hn Z ∥y∥≤Rp(h) K up(y) h  ξ(y) p g(y)dy1 . . . dyn , (15) 4Normal coordinates at a point p in a Riemannian manifold are a close approximation to Cartesian coordinates, in the sense that the components of the metric have vanishing first derivatives at p, and gij(p) = δij [1]. Normal coordinates can be defined in a “geodesic ball” of radius less than rinj. 5 where g denotes the determinant of g as calculated in normal coordinates. Changing the variable of integration to z = y/h, we get, ξh(p) −ξ(p) Z K(∥z∥)dnz = Z ∥z∥≤Rp(h)/h K up(zh) h  ξ(zh) p g(zh)dnz −ξ(0) Z ∥z∥≤1 K(∥z∥)dnz = Z ∥z∥≤1 K up(zh) h  ξ(zh) p g(zh) −1  dnz + Z ∥z∥≤1 ξ(zh)  K up(zh) h  −K(∥z∥)  dnz + Z ∥z∥≤1 K(∥z∥) (ξ(zh) −ξ(0)) dnz + Z 1<∥z∥≤Rp(h)/h K up(zh) h  ξ(zh) p g(zh)dnz . Thus, ξh(p) −ξ(p) Z K (∥z∥) dnz ≤ (16) sup t∈R K(t) . sup ∥z∥≤1 |ξ(zh)| . sup ∥z∥≤1 p g(zh) −1 . Z ∥z∥≤1 dnz + (17) sup ∥z∥≤1 |ξ(zh)| . sup ∥z∥≤1 K(up(zh) h ) −K(∥z∥) . Z ∥z∥≤1 dnz + (18) Z ∥z∥≤1 K(∥z∥)(ξ(zh) −ξ(0))dnz + (19) sup t∈R K(t) . sup 1<∥z∥≤Rp(h)/h p g(zh) . sup 1<∥z∥≤Rp(h)/h |ξ(zh)| . Z 1<∥z∥≤Rp(h)/h dnz . (20) Letting h →0, the terms (17)-(20) approach zero at the following rates: (17): K(t) is bounded and ξ(y) is continuous at y = 0, so the first two terms can be bounded by constants as h →0. In normal coordinates y, gij(y) = δij + O(∥y∥2) as ∥y∥→0, so, sup∥z∥≤1 p g(zh) −1 = O(h2) as h →0. (18): Since K is assumed to be differentiable with a bounded derivative in [0, 1), we get K(b) − K(a) = O(b −a) as b →a. By Lemma 3.1 we have up(zh) h −∥z∥= O(h2) as h →0. Thus, K  up(zh) h  −K(∥z∥) = O(h2) as h →0. (19): Since ξ(y) is assumed to have partial derivatives up to second order in a neighborhood of y(p) = 0, for ∥z∥≤1, Taylor’s theorem gives, ξ(zh) = ξ(0) + h n X i=1 zi ∂ξ(y) ∂yi y=0 + O(h2) (21) as h →0. Since R ∥z∥≤1 zK(∥z∥)dnz = 0, we get R ∥z∥≤1 K(∥z∥)(ξ(zh) −ξ(0))dnz = O(h2) as h →0. (20): The first three terms can be bounded by constants. By Lemma 3.3, Rp(h) = h + O(h3) as h →0. A spherical shell 1 < ∥z∥≤1 + ǫ has volume O(ǫ) as ǫ →0+. Thus, the volume of 1 < ∥z∥≤Rp(h)/h is O(Rp(h)/h −1) = O(h2) as h →0. Thus, the sum of the terms (17-20), is O(h2) as h →0, as claimed in Theorem 3.1. 6 4 Bias, variance and mean squared error Let M, f, ˆfm, K, p be as in Theorem 2.1 and assume hm →0 as m →∞. Lemma 4.1. Bias h ˆfm(p) i = O(h2 m), as m →∞. Proof. We have Bias[fm(p)] = Bias h 1 hm K  up(q) h i , so recalling R Rn K(∥z∥)dnz = 1, the lemma follows from Theorem 3.1 with ξ replaced with f. Lemma 4.2. If in addition to hm →0, we have mhn m →∞as m →∞, then, Var[fm(p)] = O  1 mhn m  , as m →∞. Proof. Var[fm(p)] = 1 m Var  1 hnm K up(q) hm  (22) (23) Now, Var  1 hnm K up(q) hm  = E  1 h2n m K2 up(q) hm  −  E  1 hnm K up(q) hm 2 , (24) and, E  1 h2n m K2 up(q) hm  = 1 hnm Z M f(q) 1 hnm K2 up(q) hm  dV (q) . (25) By Theorem 3.1, the integral in (25) converges to f(p) R K2(∥z∥)dnz, so, the right hand side of (25) is O  1 hn m  as m →∞. By Lemma 4.1 we have,  E h 1 hn m K  up(q) hm i2 →f 2(p). Thus, Var[ ˆfm(p)] = O  1 mhn m  as m →∞. Proof of Theorem 2.1 Finally, since MSE h ˆfm(p) i = Bias2[ ˆfm(p)] + Var[ ˆfm(p)], the theorem follows from Lemma 4.1 and 4.2. 5 Experiments and discussion We have empirically tested the estimator (3) on two datasets: A unit normal distribution mapped onto a piece of a spiral in the plane, so that n = 1 and N = 2, and a uniform distribution on the unit disc x2 +y2 ≤1 mapped onto the unit hemisphere by (x, y) →(x, y, 1− p x2 + y2), so that n = 2 and N = 3. We picked the bandwidths to be proportional to m−1/(n+4) where m is the number of data points. We performed live-one-out estimates of the density on the data points, and obtained the MSE for a range of ms. See Figure 5. 6 Conclusion and future work We have proposed a small modification of the usual KDE in order to estimate the density of data that lives on an n-dimensional submanifold of RN, and proved that the rate of convergence of the estimator is determined by the intrinsic dimension n. This shows that the curse of dimensionality in KDE can be overcome for data with low intrinsic dimension. Our method assumes that the intrinsic dimensionality n is given, so it has to be supplemented with an estimator of the dimension. We have assumed various smoothness properties for the submanifold M, the density f, and the kernel K. We find it likely that our estimator or slight modifications of it will be consistent under weaker requirements. Such a relaxation of requirements would have practical consequences, since it is unlikely that a generic data set lives on a smooth Riemannian manifold. 7 50000 100000 150000 200000# of data points 0.000025 0.00005 0.000075 0.0001 0.000125 0.00015 0.000175 MSE Mean squared error for the spiral data 50000 100000 150000 200000 # of data points 0.0002 0.0004 0.0006 0.0008 MSE Mean squared error for the hemisphere data Figure 1: Mean squared error as a function of the number of data points for the spiral data (left) and the hemisphere data. In each case, we fit a curve of the form MSE(m) = amb, which gave b = −0.80 for the spiral and b = −0.69 for the hemisphere. Theorem 2.1 bounds the MSE by Cm−4/(n+4), which gives the exponent as −0.80 for the spiral and −0.67 for the hemisphere. References [1] M. Berger and N. Hitchin. A panoramic view of Riemannian geometry. The Mathematical Intelligencer, 28(2):73–74, 2006. [2] A. Beygelzimer, S. Kakade, and J. Langford. Cover trees for nearest neighbor. In Proceedings of the 23rd international conference on Machine learning, pages 97–104. ACM New York, NY, USA, 2006. [3] T. Cacoullos. Estimation of a multivariate density. Annals of the Institute of Statistical Mathematics, 18(1):179–189, 1966. [4] H. Hendriks. Nonparametric estimation of a probability density on a Riemannian manifold using Fourier expansions. The Annals of Statistics, 18(2):832–849, 1990. [5] J. Jost. Riemannian geometry and geometric analysis. Springer, 2008. [6] F. Korn, B. Pagel, and C. Faloutsos. On dimensionality and self-similarity . IEEE Transactions on Knowledge and Data Engineering, 13(1):96–111, 2001. [7] J. Lee. Riemannian manifolds: an introduction to curvature. Springer Verlag, 1997. [8] E. Parzen. On estimation of a probability density function and mode. The Annals of Mathematical Statistics, pages 1065–1076, 1962. [9] B. Pelletier. Kernel density estimation on Riemannian manifolds. Statistics and Probability Letters, 73(3):297–304, 2005. [10] X. Pennec. Probabilities and statistics on Riemannian manifolds: Basic tools for geometric measurements. In IEEE Workshop on Nonlinear Signal and Image Processing, volume 4. Citeseer, 1999. [11] X. Pennec. Intrinsic statistics on Riemannian manifolds: Basic tools for geometric measurements. Journal of Mathematical Imaging and Vision, 25(1):127–154, 2006. [12] B. Silverman. Density estimation for statistics and data analysis. Chapman & Hall/CRC, 1986. [13] P. Vincent and Y. Bengio. Manifold Parzen Windows. Advances in Neural Information Processing Systems, pages 849–856, 2003. 8
2009
49
3,798
Learning models of object structure Joseph Schlecht Department of Computer Science University of Arizona schlecht@cs.arizona.edu Kobus Barnard Department of Computer Science University of Arizona kobus@cs.arizona.edu Abstract We present an approach for learning stochastic geometric models of object categories from single view images. We focus here on models expressible as a spatially contiguous assemblage of blocks. Model topologies are learned across groups of images, and one or more such topologies is linked to an object category (e.g. chairs). Fitting learned topologies to an image can be used to identify the object class, as well as detail its geometry. The latter goes beyond labeling objects, as it provides the geometric structure of particular instances. We learn the models using joint statistical inference over category parameters, camera parameters, and instance parameters. These produce an image likelihood through a statistical imaging model. We use trans-dimensional sampling to explore topology hypotheses, and alternate between Metropolis-Hastings and stochastic dynamics to explore instance parameters. Experiments on images of furniture objects such as tables and chairs suggest that this is an effective approach for learning models that encode simple representations of category geometry and the statistics thereof, and support inferring both category and geometry on held out single view images. 1 Introduction In this paper we develop an approach to learn stochastic 3D geometric models of object categories from single view images. Exploiting such models for object recognition systems enables going beyond simple labeling. In particular, fitting such models opens up opportunities to reason about function or utility, how the particular object integrates into the scene (i.e., perhaps it is an obstacle), how the form of the particular instance is related to others in its category (i.e., perhaps it is a particularly tall and narrow one), and how categories themselves are related. Capturing the wide variation in both topology and geometry within object categories, and finding good estimates for the underlying statistics, suggests a large scale learning approach. We propose exploiting the growing number of labeled single-view images to learn such models. While our approach is trivially extendable to exploit multiple views of the same object, large quantities of such data is rare. Further, the key issue is to learn about the variation of the category. Put differently, if we are limited to 100 images, we would prefer to have 100 images of different examples, rather than, say, 10 views of 10 examples. Representing, learning, and using object statistical geometric properties is potentially simpler in the context of 3D models. In contrast, statistical models that encode image-based appearance characteristics and/or part configuration statistics must deal with confounds due to the imaging process. For example, right angles in 3D can have a wide variety of angles in the image plane, leading to using the same representations for both structure variation and pose variation. This means that the represented geometry is less specific and less informative. By contrast, encoding the structure variation in 3D models is simpler and more informative because they are linked to the object alone. To deal with the effect of an unknown camera, we estimate the camera parameters simultaneously while fitting the model hypothesis. A 3D model hypothesis is a relatively strong hint as to what 1 the camera might be. Further, we make the observation that the variations due to standard camera projection are quite unlike typical category variation. Hence, in the context of a given object model hypothesis, the fact that the camera is not known is not a significant impediment, and much can be estimated about the camera under that hypothesis. We develop our approach with object models that are expressible as a spatially contiguous assemblage of blocks. We include in the model a constraint on right angles between blocks. We further simplify matters by considering images where there are minimal distracting features in the background. We experiment with images from five categories of furniture objects. Within this domain, we are able to automatically learn topologies. The models can then be used to identify the object category using statistical inference. Recognition of objects in clutter is likely effective with this approach, but we have yet to integrate support for occlusion of object parts into our inference process. We learn the parameters of each category model using Bayesian inference over multiple image examples for the category. Thus we have a number of parameters specifying the category topology that apply to all images of objects from the category. Further, as a side effect, the inference process finds instance parameters that apply specifically to each object. For example, all tables have legs and a top, but the proportions of the parts differ among the instances. In addition, the camera parameters for each image are determined, as these are simultaneously fit with the object models. The object and camera hypotheses are combined with an imaging model to provide the image likelihood that drives the inference process. For learning we need to find parameters that give a high likelihood of the data from multiple examples. Because we are searching for model topologies, we need to search among models with varying dimension. For this we use the trans-dimensional sampling framework [7, 8]. We explore the posterior space within a given probability space of a particular dimension by combining standard Metropolis-Hastings [1, 14], with stochastic dynamics [18]. As developed further below, these two methods have complementary strengths for our problem. Importantly, we arrange the sampling so that the hybrid of samplers are guaranteed to converge to the posterior distribution. This ensures that the space will be completely explored, given enough time. Related work. Most work on learning representations for object categories has focused on imagebased appearance characteristics and/or part configuration statistics (e.g., [4, 5, 6, 12, 13, 24]). These approaches typically rely on effective descriptors that are somewhat resilient to pose change (e.g., [16]). A second force favoring learning 2D representations is the explosion of readily available images compared with that for 3D structure, and thus treating category learning as statistical pattern recognition is more convenient in the data domain (2D images). However, some researchers have started imposing more projective geometry into the spatial models. For example, Savarese and Fei-Fei [19, 20] build a model where arranged parts are linked by a fundamental matrix. Their training process is helped by multiple examples of the same objects, but notably they are able to use training data with clutter. Their approach is different than ours in that models are built more bottom up, and this process is somewhat reliant on the presence of surface textures. A different strategy proposed by Hoeim et al. [9] is to fit a deformable 3D blob to cars, driven largely by appearance cues mapped onto the model. Our work also relates to recent efforts in learning abstract topologies [11, 26] and structure models for 2D images of objects constrained by grammar representations [29, 30]. Also relevant is a large body of older work on representing objects with 3D parts [2, 3, 28] and detecting objects in images given a precise 3D model [10, 15, 25], such as one for machined parts in an industrial setting. Finally, we have also been inspired by work on fitting deformable models of known topology to 2D images in the case of human pose estimation (e.g., [17, 22, 23]). 2 Modeling object category structure We use a generative model for image features corresponding to examples from object categories (Fig. 1). A category is associated with a sampling from category level parameters which are the number of parts, n, their interconnections (topology), t, the structure statistics rs, and the camera statistics, rs. Associating camera distributional parameters with a category allows us to exploit regularity in how different objects are photographed during learning. We support clusters within categories to model multiple structural possibilities (e.g., chairs with and without arm rests). The cluster variable, z, selects a category topology and structure distributional parameters for attachment locations and part sizes. We denote the specific values for a particular example by s. Similarly, we 2 z µ s π n Σ D t Σ dc d x d c µc rc rs s d s Figure 1: Graphical model for the generative approach to images of objects from categories described by stochastic geometric models. The category level parameters are the number of parts, n, their interconnections (topology), t, the structure statistics rs, and the camera statistics, rs. Hyperparameters for category level parameters are omitted for clarity. A sample of category level parameters provides a statistical model for a given category, which is then sampled for the camera and object structure values cd and sd, optionally selected from a cluster within the category by zd. cd and sd yield a distribution over image features xd. denote the camera capturing it by c. The projected model image then generates image features, x, for which we use edge points and surface pixels. In summary, the parameters for an image are θ(n) = (c, s, t, rc, rs, n). Given a set of D images containing examples of an object category, our goal is to learn the model Θ(n) generating them from detected features sets X = x1, . . . , xD. In addition to category-level parameters shared across instances which is of most interest, Θ(n) comprises camera models C = c1, . . . , cD and structure part parameters S = s1, . . . , sD assuming a hard cluster assignment. In other words, the camera and the geometry of the training examples are fit collaterally. We separate the joint density into a likelihood and prior p ³ X, Θ(n)´ = p(n)(X, C, S | t, rc, rs) p(n)(t, rc, rs, n) , (1) where we use the notation p(n)(·) for a density function corresponding to n parts. Conditioned on the category parameters, we assume that the D sets of image features and instance parameters are independent, giving p(n)(X, C, S | t, rc, rs) = D Y d=1 p(n)(xd, cd, sd | t, rc, rs) . (2) The feature data and structure parameters are generated by a sub-category cluster with weights and distributions defined by rs = (π, µs, Σs). As previously mentioned, the camera is shared across clusters, and drawn from a distribution defined by rc = (µc, Σc). We formalize the likelihood of an object, camera, and image features under M clusters as p(n)(xd, cd, sd | t, rc, rs) = M X m=1 πm p(nm)(xd | cd, smd) | {z } Image p(cd | µc, Σc) | {z } Camera p(nm)(smd | tm, µsm, Σsm) | {z } Object . (3) We arrive at equation (3) by introducing a binary assignment vector z for each image feature set, such that zm =1 if the mth cluster generated it and 0 otherwise. The cluster weights are then given by πm = p(zm =1) . For the prior probability distribution, we assume category parameter independence, with the clustered topologies conditionally independent given the number of parts. The prior in (1) becomes p(n)(t, rc, rs, n) = p(rc) M Y m=1 p(nm)(tm | nm) p(nm)(rsm) p(nm) . (4) For category parameters in the camera and structure models, rc and rs, we use Gaussian statistics with weak Gamma priors that are empirically chosen. We set the number of parts in the object subcategories, n to be geometrically distributed. We set the prior over edges in the topology given n to be uniform. 2.1 Object model We model object structure as a set of connected three-dimensional block constructs representing object parts. We account for symmetric structure in an object category, e.g., legs of a table or chair, 3 d f,s ϑ x y z Figure 2: The camera model is constrained to reduce the ambiguity introduced in learning from a single view of an object. We position the camera at a fixed distance and direct its focus at the origin; rotation is allowed about the x-axis. Since the object model is allowed to move about the scene and rotate, this model is capable of capturing most images of a scene. by introducing compound block constructs. We define two constructs for symmetrically aligned pairs (2) or quartets (4) of blocks. Unless otherwise specified, we will use blocks to specify both simple blocks and compound blocks as they handled similarly. The connections between blocks are made at a point on adjacent, parallel faces. We consider the organization of these connections as a graph defining the structural topology of an object category, where the nodes in the graph represent structural parts and the edges give the connections. We use directed edges, inducing attachment dependence among parts. Each block has three internal parameters representing its width, height, and length. Blocks representing symmetric pairs or quartets have one or two extra parameters defining the relative positioning of the sub-blocks Blocks potentially have two external attachment parameters u, v where one other is connected. We further constrain blocks to attach to at most one other block, giving a directed tree for the topology and enabling conditional independence among attachments. Note that blocks can be visually “attached” to additional blocks that they abut, but representing them as true attachments makes the model more complex and is not necessary. Intuitively, the model is much like physically building a piece of furniture block by block, but saving on glue by only connecting an added block to one other block. Despite its simplicity, this model can approximate a surprising range of man made objects. For a set of n connected blocks of the form b = (w, h, l, u1, v1, . . .), the structure model is s = (ϕ, po, b1, . . . , bn). We position the connected blocks in an object coordinate system defined by a point po ∈R3 on one of the blocks and a y-axis rotation angle, ϕ, about this position. Since we constrain the blocks to be connected at right angles on parallel faces, the position of other blocks within the object coordinate system is entirely defined by po and the attachments points between blocks. The object structure instance parameters are assumed Gaussian distributed according to µs, Σs in the likelihood (3). Since the instance parameters in the object model are conditionally independent given the category, the covariance matrix is diagonal. Finally, for a block bi attaching to bj on faces defined by the kth size parameter, the topology edge set is defined as t = ³ i, j, k : bi k ←−bj ´ . 2.2 Camera model A full specification of the camera and the object position, pose, and scale leads to a redundant set of parameters. We choose a minimal set for inference that retains full expressiveness as follows. Since we are unable to distinguish the actual size of an object from its distance to the camera, we constrain the camera to be at a fixed distance from the world origin. We reduce potential ambiguity from objects of interest being variably positioned in R3 by constraining the camera to always look at the world origin. Because we allow an object to rotate around its vertical axis, we only need to specify the camera zenith angle, ϑ. Thus we set the horizontal x-coordinate of the camera in the world to zero and allow ϑ to be the only variable extrinsic parameter. In other words, the position of the camera is constrained to a circular arc on the y, z-plane (Figure 2). We model the amount of perspective in the image from the camera by parameterizing its focal length, f. Our camera instance parameters are thus c = (ϑ, f, s), where ϑ ∈[−π/2, π/2], and f, s > 0. The camera instance parameters in (3) are modeled as Gaussian with category parameters µs, Σs. 2.3 Image model We represent an image as a collection of detected feature sets that are statistically generated by an instance of our object and camera. Each image feature sets as arising from a corresponding feature generator that depends on projected object information. For this work we generate edge points from projected object contours and image foreground from colored surface points (Figure 3). 4 Fg Detection Projected Surface Projected Contours Edge Detection x Image Data i e ( ) θ xi ( ) θ s Object Model Figure 3: Example of the generative image model for detected features. The left side of the figure gives a rendering of the object and camera models fit to the image on the right side. The rightward arrows show the process of statistical generation of image features. The leftward arrows are feature detection in the image data. We assume that feature responses are conditionally independent given the model and that the G different types of features are also independent. Denoting the detected feature sets in the dth image by xd = xd1, . . . , xdG, we expand the image component of equation (3) to p(nm)(xd | cd, smd, tm) = G Y g=1 Nx Y i=1 f (nm) θg (xdgi) . (5) The function f (nm) θg (·) measures the likelihood of a feature generator producing the response of a detector at each pixel using our object and camera models. Effective construction and implementation of the edge and surface point generators is intricate, and thus we only briefly summarize them. Please refer to our technical report [21] for more details. Edge point generator. We model edge point location and orientation as generated from projected 3D contours of our object model. Since the feature generator likelihood in (5) is computed over all detection responses in an image, we define the edge generator likelihood as Nx Y i=1 fθ(xi) = Nx Y i=1 eθ(xi)Ei · e′ θ(xi)(1−Ei) , (6) where the probability density function eθ(·) gives the likelihood of detected edge point at the ith pixel, and e′ θ(·) is the density for pixel locations not containing an edge point. The indicator Ei is 1 if the pixel is an edge point and 0 otherwise. This can be approximated by [21] Nx Y i=1 fθ(xi) ≈ ( Nx Y i=1 eeθ(xi)Ei ) eNbg bg eNmiss miss , (7) where eNbg bg and eNmiss miss are the probabilities of background and missing detections and Nbg and Nmiss are the number of background and missing detections. The density eeθ approximates eθ by estimating the most likely correspondence between observed edge points and model edges. To compute the edge point density eθ, we assume correspondence and use the ith edge point generated from the jth model point as a Gaussian distributed displacement dij in the direction perpendicular of the projected model contour. We further define the gradient direction of the generated edge point to have Gaussian error in its angle difference φij with the perpendicular direction of the projected contour. If mj is a the model point assumed to generate xi, then eθ(xi) = ce N (dij; 0, σd) N (φij; 0, σφ) (8) where the perpendicular distance between xi and mj and angular difference between edge point gradient gi and model contour perpendicular vj are defined dij = ∥xi −mj ∥and φij = cos−1 ¡ gT i vj/∥gi∥∥vj∥ ¢ . The range of dij is ≥0, and the angle φij is in [0, 1]. Surface point generator. Surface points are the projected points of viewable surfaces in our object model. Image foreground pixels are found using k-means clustering on pixel intensities. Setting k = 2 works well as our training images were selected to have minimal clutter. Surface point detections intersecting with model surface projection leads to four easily identifiable cases: foreground, background, missing, and noise. Similar to the edge point generator, the surface point generator likelihood expands to Nx Y i=1 fθ(xi) = sNfg fg sNbg bg sNnoise noise sNmiss miss , (9) 5 3 Learning To learn a category model, we sample the posterior, p ¡ Θ(n) | X ¢ ∝p ¡ X, Θ(n)¢ , to find good parameters shared by images of multiple object examples from the category. Given enough iterations, a good sampler converges to the target distribution and an optimal value can be readily discovered in the process. However, our posterior distribution is highly convoluted with many sharp, narrow ridges for close fits to the edge points and foreground. In our domain, as in many similar problems, standard sampling techniques tend to get trapped in these local extrema for long periods of time. Our strategy for inference is to combine a mixture of sampling techniques with different strengths in exploring the posterior distribution while still maintaining convergence conditions. Our sampling space is over all category and instance parameters for a set of input images. We denote the space over an instance of the camera and object models with n parts as C × S(n). Let T(n) be the space over all topologies and R(n) c × R(n) s over all category statistics. The complete sampling space with m subcategories and D instances is then defined as Ω= [ n ∈Nm CD × S(n)D × T(n) × R(n) c × R(n) s , (10) Our goal is to sample the posterior with Θ(n) ∈Ωsuch that we find the set of parameters that maximizes it. Since the number of parameters in the sampling space is a unknown, some proposals must change the model dimension. In particular, these jump moves (following the terminology of Tu and Zhu [27]) arise from changes in topology. Diffusion moves make changes to parameters within a given topology. We cycle between the two kinds of moves. Diffusion moves for sampling within topology. We found that a multivariate Gaussian with small covariance values on the diagonal to be a good proposal distribution for the instance parameters. Proposals for block size changes are done in one of two ways: scaling or shifting attached blocks. We found that both are useful good exploration of the object structure parameter space. Category parameters were sampled by making proposals from the Gamma priors. Using standard Metropolis-Hastings (MH) [1, 14], the proposed moves are accepted with probability α ³ ˜θ(n)´ = min ( 1, p(˜θ(n) | X) q(θ(n) | ˜θ(n)) p(θ(n) | X) q(˜θ(n) | θ(n)) ) . (11) The MH diffusion moves exhibit a random walk behavior and can take extended periods of time with many rejections to converge and properly mix well in regions of high probability in the target distribution. Hence we occasionally follow a hybrid Markov chain based on stochastic dynamics, where our joint density is used in a potential energy function. We use the common leapfrog discretization [18] to follow the dynamics and sample from phase space. The necessary derivative calculations are approximated using numerical differentiation (details in [21]). Jump moves for topology changes. For jump moves, we use the trans-dimensional sampling approach outlined by Green [7]. For example, in the case of a block birth in the model, we modify the standard MH acceptance probability to α ³ ˜θ(n+1)´ = min ( 1, p(˜θ(n+1) | X) p(θ(n) | X) q(˜b, ˜t) rd rb ¯¯¯¯¯ ∂(˜θ(n+1)) ∂(θ(n), ˜b, ˜t) ¯¯¯¯¯ ) . (12) The jump proposal distribution generates a new block and attachment edge in the topology that are directly used in the proposed object model. Hence, the change of variable factor in the Jacobian reduces to 1. The probability of selecting a birth move versus a death move is given by the ratio of rd/rb, which we have also defined to be 1. The complimentary block death move is similar with the inverse ratio of posterior and proposal distributions. We additionally define split and merge moves. These are essential moves in our case because the sampler often generates blocks with strong partial fits and proposing splitting it is often accepted. 4 Results We evaluated our model and its inference with image sets of furniture categories, including tables, chairs, sofas, footstools, and desks. We have 30 images in each category containing a single arbitrary 6 (a) (b) Actual Predicted Table Chair Footstool Sofa Desk Table 10 5 4 0 2 Chair 5 9 10 5 3 Footstool 0 0 1 3 1 Sofa 0 1 0 7 3 Desk 0 0 0 0 6 Figure 4: Generated samples of tables (a) and chairs (b) from the learned structure topology and statistical category parameters. The table shows the confusion matrix for object category recognition. view of the object instance. The images we selected for our data set have the furniture object prominently in the foreground. This enables focusing on evaluating how well we learn 3D structure models of objects. Inference of the object and camera instances was done on detected edge and surface points in the images. We applied a Canny-based detector for the edges in each image, using the same parameterization each time. Thus, the images contain some edge points considered noise or that are missing from obvious contours. To extract the foreground, we applied a dynamic-threshold discovered in each image with a k-means algorithm. Since the furniture objects in the images primarily occupy the image foreground, the detection is quite effective. We learned the object structure for each category over a 15-image subset of our data for training purposes. We initialized each run of the sampler with a random draw of the category and instance parameters. This is accomplished by first sampling the prior for the object position, rotation and camera view; initially there are no structural elements in the model. We then sample the likelihoods for the instance parameters. The reversible-jump moves in the sampler iteratively propose adding and removing object constructs to the model. The mixture of moves in the sampler was 1-to-1 for jump and diffusion and very infrequently performing a stochastic dynamics chain. Figure 6 shows examples of learned furniture categories and their instances to images after 100K iterations. We visualize the inferred structure topology and statistics in Figure 4 with generated samples from the learned table and chair categories. We observe that the topology of the object structure is quickly established after roughly 10K iterations, this can be seen in Figure 5, which shows the simultaneous inference of two table instances through roughly 10K iterations. We tested the recognition ability of the learned models on a held out 15-image subset of our data for each category. For each image, we draw a random sample from the category statistics and a topology and begin the diffusion sampling process to fit it. The best overall fit according to the joint density is declared the predicted category. The confusion matrix shown in Figure 4 shows mixed results. Overall, recognition is substantively better than chance (20%), but we expect that much better results are possible with our approach. We conclude from the learned models and confusion matrix that the chair topology shares much of its structure with the other categories and causes the most mistakes. We continue to experiment with larger training data sets, clustering category structure, and longer run times to get better structure fits in the difficult training examples, each of which could help resolve this confusion. Figure 5: From left to right, successive random samples from 2 of 15 table instances, each after 2K iterations of model inference. The category topology and statistics are learned simultaneously from the set of images; the form of the structure is shared across instances. 7 Figure 6: Learning the topology of furniture objects. Sets of contiguous blocks were fit across five image data sets. Model fitting is done jointly for the fifteen images of each set. The fits for the training examples is shown by the blocks drawn in red. Detected edge points are shown in green. Acknowledgments This work is supported in part by NSF CAREER Grant IIS-0747511. 8 References [1] C. Andrieu, N. de Freitas, A. Doucet, and M. I. Jordan. An introduction to MCMC for machine learning. Machine Learning, 50(1):5–43, 2003. [2] I. Biederman. Recognition-by-components: A theory of human image understanding. Psychological Review, 94(2):115–147, April 1987. [3] M. B. Clowes. On seeing things. Artificial Intelligence, 2(1):79–116, 1971. [4] D. Crandall and D. Huttenlocher. Weakly-supervised learning of part-based spatial models for visual object recognition. In 9th European Conference on Computer Vision, 2006. [5] 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. In Workshop on Generative-Model Based Vision, 2004. [6] R. Fergus, P. Perona, and A. Zisserman. Object class recognition by unsupervised scale-invariant learning. In IEEE Conference on Computer Vision and Pattern Recognition, 2003. [7] P. J. Green. Reversible jump Markov chain Monte Carlo computation and Bayesian model determination. Biometrika, 82(4):711–732, 1995. [8] P. J. Green. Trans-dimensional markov chain monte carlo. In Highly Structured Stochastic Systems. 2003. [9] D. Hoiem, C. Rother, and J. Winn. 3d layoutcrf for multi-view object class recognition and segmentation. In CVPR, 2007. [10] D. Huttenlocher and S. Ullman. Recognizing solid objects by alignment with an image. IJCV, 5(2):195– 212, 1990. [11] C. Kemp and J. B. Tenenbaum. The discovery of structural form. Proceedings of the National Academy of Sciences, 105(31):10687–10692, 2008. [12] A. Kushal, C. Schmid, and J. Ponce. Flexible object models for category-level 3d object recognition. In CVPR, 2007. [13] M. Leordeanu, M. Hebert, and R. Sukthankar. Beyond local appearance: Category recognition from pairwise interactions of simple features. In CVPR, 2007. [14] J. S. Liu. Monte Carlo Strategies in Scientific Computing. Springer-Verlag, 2001. [15] D. G. Lowe. Fitting parameterized three-dimensional models to images. IEEE Transactions on Pattern Analysis and Machine Intelligence, 13(5):441–450, 1991. [16] D. G. Lowe. Distinctive image features from scale-invariant keypoint. International Journal of Computer Vision, 60(2):91–110, 2004. [17] G. Mori and J. Malik. Recovering 3d human body configurations using shape contexts. IEEE Transactions on Pattern Analysis and Machine Intelligence, 2006. [18] R. M. Neal. Probabilistic inference using Markov chain Monte Carlo methods. Technical Report CRGTR-93-1, University of Toronto, 1993. [19] S. Savarese and L. Fei-Fei. 3d generic object categorization, localization and pose estimation. In IEEE Intern. Conf. in Computer Vision (ICCV), 2007. [20] S. Savarese and L. Fei-Fei. View synthesis for recognizing unseen poses of object classes. In European Conference on Computer Vision (ECCV), 2008. [21] J. Schlecht and K. Barnard. Learning models of object structure. Technical report, University of Arizona, 2009. [22] C. Sminchisescu. Kinematic jump processes for monocular 3d human tracking. In Computer vision and pattern recognition, 2003. [23] C. Sminchisescu and B. Triggs. Estimating articulated human motion with covariance scaled sampling. International Journal of Robotics Research, 22(6):371–393, 2003. [24] E. B. Sudderth, A. Torralba, W. T. Freeman, and A. S. Willsky. Learning hierarchical models of scenes, objects, and parts. In ICCV, 2005. [25] K. Sugihara. A necessary and sufficient condition for a picture to represent a polyhedral scene. IEEE Transactions on Pattern Analysis and Machine Intelligence, 6(5):578–586, September 1984. [26] 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. [27] Z. Tu and S.-C. Zhu. Image segmentation by data-driven markov chain monte-carlo. IEEE Trans. Patt. Analy. Mach. Intell., 24(5):657–673, 2002. [28] P. H. Winston. Learning structural descriptions from examples. In P. H. Winston, editor, The psychology of computer vision, pages 157–209. McGraw-Hill, 1975. [29] L. Zhu, Y. Chen, and A. Yuille. Unsupervised learning of a probabilistic grammar for object detection and parsing. In NIPS, 2006. [30] S. Zhu and D. Mumford. A stochastic grammar of images. Foundations and Trends in Computer Graphics and Vision, 4(2):259–362, 2006. 9
2009
5
3,799
Nonlinear Learning using Local Coordinate Coding Kai Yu NEC Laboratories America kyu@sv.nec-labs.com Tong Zhang Rutgers University tzhang@stat.rutgers.edu Yihong Gong NEC Laboratories America ygong@sv.nec-labs.com Abstract This paper introduces a new method for semi-supervised learning on high dimensional nonlinear manifolds, which includes a phase of unsupervised basis learning and a phase of supervised function learning. The learned bases provide a set of anchor points to form a local coordinate system, such that each data point x on the manifold can be locally approximated by a linear combination of its nearby anchor points, and the linear weights become its local coordinate coding. We show that a high dimensional nonlinear function can be approximated by a global linear function with respect to this coding scheme, and the approximation quality is ensured by the locality of such coding. The method turns a difficult nonlinear learning problem into a simple global linear learning problem, which overcomes some drawbacks of traditional local learning methods. 1 Introduction Consider the problem of learning a nonlinear function f(x) on a high dimensional space x ∈Rd. We are given a set of labeled data (x1, y1), . . . , (xn, yn) drawn from an unknown underlying distribution. Moreover, assume that we observe a set of unlabeled data x ∈Rd from the same distribution. If the dimensionality d is large compared to n, then the traditional statistical theory predicts overfitting due to the so called “curse of dimensionality”. One intuitive argument for this effect is that when the dimensionality becomes larger, pairwise distances between two similar data points become larger as well. Therefore one needs more data points to adequately fill in the empty space. However, for many real problems with high dimensional data, we do not observe this so-called curse of dimensionality. This is because although data are physically represented in a high-dimensional space, they often lie on a manifold which has a much smaller intrinsic dimensionality. This paper proposes a new method that can take advantage of the manifold geometric structure to learn a nonlinear function in high dimension. The main idea is to locally embed points on the manifold into a lower dimensional space, expressed as coordinates with respect to a set of anchor points. Our main observation is simple but very important: we show that a nonlinear function on the manifold can be effectively approximated by a linear function with such an coding under appropriate localization conditions. Therefore using Local Coordinate Coding, we turn a very difficult high dimensional nonlinear learning problem into a much simpler linear learning problem, which has been extensively studied in the literature. This idea may also be considered as a high dimensional generalization of low dimensional local smoothing methods in the traditional statistical literature. 2 Local Coordinate Coding We are interested in learning a smooth function f(x) defined on a high dimensional space Rd. Let ∥· ∥be a norm on Rd. Although we do not restrict to any specific norm, in practice, one often employs the Euclidean norm (2-norm): ∥x∥= ∥x∥2 = p x2 1 + · · · + x2 d. 1 Definition 2.1 (Lipschitz Smoothness) A function f(x) on Rd is (α, β, p)-Lipschitz smooth with respect to a norm ∥· ∥if |f(x′) −f(x)| ≤α∥x −x′∥and |f(x′) −f(x) −∇f(x)⊤(x′ −x)| ≤ β∥x −x′∥1+p, where we assume α, β > 0 and p ∈(0, 1]. Note that if the Hessian of f(x) exists, then we may take p = 1. Learning an arbitrary Lipschitz smooth function on Rd can be difficult due to the curse of dimensionality. That is, the number of samples required to characterize such a function f(x) can be exponential in d. However, in many practical applications, one often observe that the data we are interested in approximately lie on a manifold M which is embedded into Rd. Although d is large, the intrinsic dimensionality of M can be much smaller. Therefore if we are only interested in learning f(x) on M, then the complexity should depend on the intrinsic dimensionality of M instead of d. In this paper, we approach this problem by introducing the idea of localized coordinate coding. The formal definition of (non-localized) coordinate coding is given below, where we represent a point in Rd by a linear combination of a set of “anchor points”. Later we show it is sufficient to choose a set of “anchor points” with cardinality depending on the intrinsic dimensionality of the manifold rather than d. Definition 2.2 (Coordinate Coding) A coordinate coding is a pair (γ, C), where C ⊂Rd is a set of anchor points, and γ is a map of x ∈Rd to [γv(x)]v∈C ∈R|C| such that P v γv(x) = 1. It induces the following physical approximation of x in Rd: γ(x) = P v∈C γv(x)v. Moreover, for all x ∈Rd, we define the corresponding coding norm as ∥x∥γ = P v∈C γv(x)21/2. The quantity ∥x∥γ will become useful in our learning theory analysis. The condition P v γv(x) = 1 follows from the shift-invariance requirement, which means that the coding should remain the same if we use a different origin of the Rd coordinate system for representing data points. It can be shown (see the appendix file accompanying the submission) that the map x →P v∈C γv(x)v is invariant under any shift of the origin for representing data points in Rd if and only if P v γv(x) = 1. The importance of the coordinate coding concept is that if a coordinate coding is sufficiently localized, then a nonlinear function can be approximate by a linear function with respect to the coding. This critical observation, illustrate in the following linearization lemma, is the foundation of our approach. Due to the space limitation, all proofs are left to the appendix that accompanies the submission. Lemma 2.1 (Linearization) Let (γ, C) be an arbitrary coordinate coding on Rd. Let f be an (α, β, p)-Lipschitz smooth function. We have for all x ∈Rd: f(x) − X v∈C γv(x)f(v) ≤α ∥x −γ(x)∥+ β X v∈C |γv(x)| ∥v −γ(x)∥1+p . To understand this result, we note that on the left hand side, a nonlinear function f(x) in Rd is approximated by a linear function P v∈C γv(x)f(v) with respect to the coding γ(x), where [f(v)]v∈C is the set of coefficients to be estimated from data. The quality of this approximation is bounded by the right hand side, which has two terms: the first term ∥x −γ(x)∥means x should be close to its physical approximation γ(x), and the second term means that the coding should be localized. The quality of a coding γ with respect to C can be measured by the right hand side. For convenience, we introduce the following definition, which measures the locality of a coding. Definition 2.3 (Localization Measure) Given α, β, p, and coding (γ, C), we define Qα,β,p(γ, C) = Ex " α∥x −γ(x)∥+ β X v∈C |γv(x)| ∥v −γ(x)∥1+p # . Observe that in Qα,β,p, α, β, p may be regarded as tuning parameters; we may also simply pick α = β = p = 1. Since the quality function Qα,β,p(γ, C) only depends on unlabeled data, in principle, we can find [γ, C] by optimizing this quality using unlabeled data. Later, we will consider simplifications of this objective function that are easier to compute. Next we show that if the data lie on a manifold, then the complexity of local coordinate coding depends on the intrinsic manifold dimensionality instead of d. We first define manifold and its intrinsic dimensionality. 2 Definition 2.4 (Manifold) A subset M ⊂Rd is called a p-smooth (p > 0) manifold with intrinsic dimensionality m = m(M) if there exists a constant cp(M) such that given any x ∈M, there exists m vectors v1(x), . . . , vm(x) ∈Rd so that ∀x′ ∈M: infγ∈Rm x′ −x −Pm j=1 γjvj(x) ≤ cp(M)∥x′ −x∥1+p. This definition is quite intuitive. The smooth manifold structure implies that one can approximate a point in M effectively using local coordinate coding. Note that for a typical manifold with welldefined curvature, we can take p = 1. Definition 2.5 (Covering Number) Given any subset M ⊂Rd, and ϵ > 0. The covering number, denoted as N(ϵ, M), is the smallest cardinality of an ϵ-cover C ⊂M. That is, supx∈M infv∈C ∥x −v∥≤ϵ. For a compact manifold with intrinsic dimensionality m, there exists a constant c(M) such that its covering number is bounded by N(ϵ, M) ≤c(M)ϵ−m. The following result shows that there exists a local coordinate coding to a set of anchor points C of cardinality O(m(M)N(ϵ, M)) such that any (α, β, p)-Lipschitz smooth function can be linearly approximated using local coordinate coding up to the accuracy O( p m(M)ϵ1+p). Theorem 2.1 (Manifold Coding) If the data points x lie on a compact p-smooth manifold M, and the norm is defined as ∥x∥= (x⊤Ax)1/2 for some positive definite matrix A. Then given any ϵ > 0, there exist anchor points C ⊂M and coding γ such that |C| ≤(1+m(M))N(ϵ, M), Qα,β,p(γ, C) ≤[αcp(M)+(1+ p m(M)+21+pp m(M))β] ϵ1+p. Moreover, for all x ∈M, we have ∥x∥2 γ ≤1 + (1 + p m(M))2. The approximation result in Theorem 2.1 means that the complexity of linearization in Lemma 2.1 depends only on the intrinsic dimension m(M) of M instead of d. Although this result is proved for manifolds, it is important to observe that the coordinate coding method proposed in this paper does not require the data to lie precisely on a manifold, and it does not require knowing m(M). In fact, similar results hold even when the data only approximately lie on a manifold. In the next section, we characterize the learning complexity of the local coordinate coding method. It implies that linear prediction methods can be used to effectively learn nonlinear functions on a manifold. The nonlinearity is fully captured by the coordinate coding map γ (which can be a nonlinear function). This approach has some great advantages because the problem of finding local coordinate coding is much simpler than direct nonlinear learning: • Learning (γ, C) only requires unlabeled data, and the number of unlabeled data can be significantly more than the number of labeled data. This step also prevents overfitting with respect to labeled data. • In practice, we do not have to find the optimal coding because the coordinates are merely features for linear supervised learning. This significantly simplifies the optimization problem. Consequently, it is more robust than some standard approaches to nonlinear learning that direct optimize nonlinear functions on labeled data (e.g., neural networks). 3 Learning Theory In machine learning, we minimize the expected loss Ex,yφ(f(x), y) with respect to the underlying distribution within a function class f(x) ∈F. In this paper, we are interested in the function class Fα,β,p = {f(x) : (α, β, p) −Lipschitz smooth function in Rd}. The local coordinate coding method considers a linear approximation of functions in Fα,β,p on the data manifold. Given a local coordinate coding scheme (γ, C), we approximate each f(x) ∈Fa α,β,p by f(x) ≈fγ,C( ˆw, x) = P v∈C ˆwvγv(x), where we estimate the coefficients using ridge regression as: [ ˆwv] = arg min [wv] " n X i=1 φ (fγ,C(w, xi), yi) + λ X v∈C (wv −g(v))2 # , (1) 3 where g(v) is an arbitrary function assumed to be pre-fixed. In the Bayesian interpretation, this can be regarded as the prior mean for the weights [wv]v∈C. The default values of g(v) are simply g(v) ≡0. Given a loss function φ(p, y), let φ′ 1(p, y) = ∂φ(p, y)/∂p. For simplicity, in this paper we only consider convex Lipschitz loss function, where |φ′ 1(p, y)| ≤B. This includes the standard classification loss functions such as logistic regression and SVM (hinge loss), both with B = 1. Theorem 3.1 (Generalization Bound) Suppose φ(p, y) is Lipschitz: |φ′ 1(p, y)| ≤B. Consider coordinate coding (γ, C), and the estimation method (1) with random training examples Sn = {(x1, y1), . . . , (xn, yn)}. Then the expected generalization error satisfies the inequality: ESn Ex,yφ(fγ,C( ˆw, x), y) ≤ inf f∈Fα,β,p " Ex,yφ (f(x), y) + λ X v∈C (f(v) −g(v))2 # + B2 2λnEx∥x∥2 γ + BQα,β,p(γ, C). We may choose the regularization parameter λ that optimizes the bound in Theorem 3.1. Moreover, if we pick g(v) ≡0, and find (γ, C) at some ϵ > 0, then Theorem 2.1 implies the following simplified generalization bound for any f ∈Fα,β,p such that |f(x)| = O(1): Ex,yφ (f(x), y) + O hp ϵ−m(M)/n + ϵ1+pi . By optimizing over ϵ, we obtain a bound: Ex,yφ (f(x), y) + O(n−(1+p)/(2+2p+m(M))). By combining Theorem 2.1 and Theorem 3.1, we can immediately obtain the following simple consistency result. It shows that the algorithm can learn an arbitrary nonlinear function on manifold when n →∞. Note that Theorem 2.1 implies that the convergence only depends on the intrinsic dimensionality of the manifold M, not d. Theorem 3.2 (Consistency) Suppose the data lie on a compact manifold M ⊂Rd, and the norm ∥· ∥is the Euclidean norm in Rd. If loss function φ(p, y) is Lipschitz. As n →∞, we choose α, β →∞, α/n, β/n →0 (α, β depends on n), and p = 0. Then it is possible to find coding (γ, C) using unlabeled data such that |C|/n →0 and Qα,β,p(γ, C) →0. If we pick λn →∞, and λ|C| →0. Then the local coordinate coding method (1) with g(v) ≡0 is consistent as n →∞: limn→∞ESn Ex,yφ(f( ˆw, x), y) = inff:M→R Ex,yφ (f(x), y). 4 Practical Learning of Coding Given a coordinate coding (γ, C), we can use (1) to learn a nonlinear function in Rd. We showed that (γ, C) can be obtained by optimizing Qα,β,p(γ, C). In practice, we may also consider the following simplifications of the localization term: X v∈C |γv(x)| ∥v −γ(x)∥1+p ≈ X v∈C |γv(x)| ∥v −x∥1+p . Note that we may simply chose p = 0 or p = 1. The formulation is related to sparse coding [6] which has no locality constraints with p = −1. In this representation, we may either enforce the constraint P v γv(x) = 1 or for simplicity, remove it because the formulation is already shift-invariant. Putting the above together, we try to optimize the following objective function in practice: Q(γ, C) = Ex inf [γv]   x − X v∈C γvv 2 + µ X v∈C |γv|∥v −x∥1+p  . We update C and γ via alternating optimization. The step of updating γ can be transformed into a canonical LASSO problem, where efficient algorithms exist. The step of updating C is a leastsquares problem in case p = 1. 5 Relationship to Other Methods Our work is related to several existing approaches in the literature of machine learning and statistics. The first class of them is nonlinear manifold learning, such as LLE [8], Isomap [9], and Laplacian 4 Eigenmaps [1]. These methods find global coordinates of data manifold based on a pre-computed affinity graph of data points. The use of affinity graphs requires expensive computation and lacks a coherent way of generalization to new data. Our method learns a compact set of bases to form local coordinates, which has a linear complexity with respect to data size and can naturally handle unseen data. More importantly, local coordinate coding has a direct connection to nonlinear function approximation on manifold, and thus provides a theoretically sound unsupervised pre-training method to facilitate further supervised learning tasks. Another set of related models are local models in statistics, such as local kernel smoothing and local regression, e.g.[4, 2], both traditionally using fixed-bandwidth kernels. Local kernel smoothing can be regarded as a zero-order method; while local regression is higher-order, including local linear regression as the 1st-order case. Traditional local methods are not widely used in machine learning practice, because data with non-uniform distribution on the manifold require to use adaptivebandwidth kernels. The problem can be somehow alleviated by using K-nearest neighbors. However, adaptive kernel smoothing still suffers from the high-dimensionality and noise of data. On the other hand, higher-order methods are computationally expensive and prone to overfitting, because they are highly flexible in locally fitting many segments of data in high-dimension space. Our method can be seen as a generalized 1st-order local method with basis learning and adaptive locality. Compared to local linear regression, the learning is achieved by fitting a single globally linear function with respect to a set of learned local coordinates, which is much less prone to overfitting and computationally much cheaper. This means that our method achieves better balance between local and global aspects of learning. The importance of such balance has been recently discussed in [10]. Finally, local coordinate coding draws connections to vector quantization (VQ) coding, e.g., [3], and sparse coding, which have been widely applied in processing of sensory data, such as acoustic and image signals. Learning linear functions of VQ codes can be regarded as a generalized zeroorder local method with basis learning. Our method has an intimate relationship with sparse coding. In fact, we can regard local coordinate coding as locally constrained sparse coding. Inspired by biological visual systems, people has been arguing sparse features of signals are useful for learning [7]. However, to the best of our knowledge, there is no analysis in the literature that directly answers the question why sparse codes can help learning nonlinear functions in high dimensional space. Our work reveals an important finding — a good first-order approximation to nonlinear function requires the codes to be local, which consequently requires the codes to be sparse. However, sparsity does not always guarantee locality conditions. Our experiments demonstrate that sparse coding is helpful for learning only when the codes are local. Therefore locality is more essential for coding, and sparsity is a consequence of such a condition. 6 Experiments Due to the space limitation, we only include two examples: one synthetic and one real, to illustrate various aspects of our theoretical results. We note that image classification based on LCC recently achieved state-of-the-art performance in PASCAL Visual Object Classes Challenge 2009. 1 6.1 Synthetic Data Our first example is based on a synthetic data set, where a nonlinear function is defined on a Swissroll manifold, as shown in Figure 1-(1). The primary goal is to demonstrate the performance of nonlinear function learning using simple linear ridge regression based on representations obtained from traditional sparse coding and the newly suggested local coordinate coding, which are, respectively, formulated as the following, min γ,C X x 1 2 ∥x −γ(x)∥2 + µ X v∈C |γv(x)|∥v −x∥2 + λ X v∈C ∥v∥2 (2) where γ(x) = P v∈C γv(x)v. We note that (2) is an approximation to the original formulation, mainly for the simplicity of computation. 1http://pascallin.ecs.soton.ac.uk/challenges/VOC/voc2009/workshop/index.html 5 (1) A nonlinear function (2) RMSE=4.394 (3) RMSE=0.499 (4)RMSE=4.661 (5) RMSE=0.201 (6) RMSE=0.109 (7) RMSE=0.669 (8) RMSE=1.170 Figure 1: Experiments of nonlinear regression on Swiss-roll: (1) a nonlinear function on the Swissroll manifold, where the color indicates function values; (2) result of sparse coding with fixed random anchor points; (3) result of local coordinate coding with fixed random anchor points; 4) result of sparse coding; (5) result of local coordinate coding; (6) result of local kernel smoothing; (7) result of local coordinate coding on noisy data; (8) result of local kernel smoothing on noisy data. We randomly sample 50, 000 data points on the manifold for unsupervised basis learning, and 500 labeled points for supervised regression. The number of bases is fixed to be 128. The learned nonlinear functions are tested on another set of 10, 000 data points, with their performances evaluated by root mean square error (RMSE). In the first setting, we let both coding methods use the same set of fixed bases, which are 128 points randomly sampled from the manifold. The regression results are shown in Figure 1-(2) and (3), respectively. Sparse coding based approach fails to capture the nonlinear function, while local coordinate coding behaves much better. We take a closer look at the data representations obtained from the two different encoding methods, by visualizing the distributions of distances from encoded data to bases that have positive, negative, or zero coefficients in Figure 2. It shows that sparse coding lets bases faraway from the encoded data have nonzero coefficients, while local coordinate coding allows only nearby bases to get nonzero coefficients. In other words, sparse coding on this data does not ensure a good locality and thus fails to facilitate the nonlinear function learning. As another interesting phenomenon, local coordinate coding seems to encourage coefficients to be nonnegative, which is intuitively understandable — if we use several bases close to a data point to linearly approximate the point, each basis should have a positive contribution. However, whether there is any merit by explicitly enforcing nonnegativity will remain an interesting future work. In the next two experiments, given the random bases as a common initialization, we let the two algorithms learn bases from the 50, 000 unlabeled data points. The regression results based on the learned bases are depicted in Figure 1-(4) and (5), which indicate that regression error is further reduced for local coordinate coding, but remains to be high for sparse coding. We also make a comparison with local kernel smoothing, which takes a weighted average of function values of K-nearest training points to make prediction. As shown in Figure 1-(6), the method works very well on this simple low-dimensional data, even outperforming the local coordinate coding approach. However, if we increase the data dimensionality to be 256 by adding 253-dimensional independent Gaussian noises with zero mean and unitary variance, local coordinate coding becomes superior to local kernel smoothing, as shown in Figure 1-(7) and (8). This is consistent with our theory, which suggests that local coordinate coding can work well in high dimension; on the other hand, local kernel smoothing is known to suffer from high dimensionality and noise. 6.2 Handwritten Digit Recognition Our second example is based on the MNIST handwritten digit recognition benchmark, where each data point is a 28 × 28 gray image, and pre-normalized into a unitary 784-dimensional vector. In our setting, the set C of anchor points is obtained from sparse coding, with the regularization on 6 (a-1) (a-2) (b-1) (b-2) Figure 2: Coding locality on Swiss roll: (a) sparse coding vs. (b) local coordinate coding. v replaced by inequality constraints ∥v∥≤1. Our focus here is not on anchor point learning, but rather on checking whether a good nonlinear classifier can be obtained if we enforce sparsity and locality in data representation, and then apply simple one-against-all linear SVMs. Since the optimization cost of sparse coding is invariant under flipping the sign of v, we take a postprocessing step to change the sign of v if we find the corresponding γv(x) for most of x is negative. This rectification will ensure the anchor points to be on the data manifold. With the obtained C, for each data point x we solve the local coordinate coding problem (2), by optimizing γ only, to obtain the representation [γv(x)]v∈C. In the experiments we try different sizes of bases. The classification error rates are provided in Table 1. In addition we also compare with linear classifier on raw images, local kernel smoothing based on K-nearest neighbors, and linear classifiers using representations obtained from various unsupervised learning methods, including autoencoder based on deep belief networks [5], Laplacian eigenmaps [1], locally linear embedding (LLE) [8], and VQ coding based on K-means. We note that, like most of other manifold learning approaches, Laplacian eigenmaps or LLE is a transductive method which has to incorporate both training and testing data in training. The comparison results are summarized in Table 2. Both sparse coding and local coordinate coding perform quite good for this nonlinear classification task, significantly outperforming linear classifiers on raw images. In addition, local coordinate coding is consistently better than sparse coding across various basis sizes. We further check the locality of both representations by plotting Figure-3, where the basis number is 512, and find that sparse coding on this data set happens to be quite local — unlike the case of Swiss-roll data — here only a small portion of nonzero coefficients (again mostly negative) are assigned onto the bases whose distances to the encoded data exceed the average of basis-to-datum distances. This locality explains why sparse coding works well on MNIST data. On the other hand, local coordinate coding is able to remove the unusual coefficients and further improve the locality. Among those compared methods in Table 2, we note that the error rate 1.2% of deep belief network reported in [5] was obtained via unsupervised pre-training followed by supervised backpropagation. The error rate based on unsupervised training of deep belief networks is about 1.90%.2 Therefore our result is competitive to the-state-of-the-art results that are based on unsupervised feature learning plus linear classification without using additional image geometric information. 2This is obtained via a personal communication with Ruslan Salakhutdinov at University of Toronto. 7 (a-1) (a-2) (b-1) (b-2) Figure 3: Coding locality on MNIST: (a) sparse coding vs. (b) local coordinate coding. Table 1: Error rates (%) of MNIST classification with different |C|. |C| 512 1024 2048 4096 Linear SVM with sparse coding 2.96 2.64 2.16 2.02 Linear SVM with local coordinate coding 2.64 2.44 2.08 1.90 Table 2: Error rates (%) of MNIST classification with different methods. Methods Error Rate Linear SVM with raw images 12.0 Linear SVM with VQ coding 3.98 Local kernel smoothing 3.48 Linear SVM with Laplacian eigenmap 2.73 Linear SVM with LLE 2.38 Linear classifier with deep belief network 1.90 Linear SVM with sparse coding 2.02 Linear SVM with local coordinate coding 1.90 7 Conclusion This paper introduces a new method for high dimensional nonlinear learning with data distributed on manifolds. The method can be seen as generalized local linear function approximation, but can be achieved by learning a global linear function with respect to coordinates from unsupervised local coordinate coding. Compared to popular manifold learning methods, our approach can naturally handle unseen data and has a linear complexity with respect to data size. The work also generalizes popular VQ coding and sparse coding schemes, and reveals that locality of coding is essential for supervised function learning. The generalization performance depends on intrinsic dimensionality of the data manifold. The experiments on synthetic and handwritten digit data further confirm the findings of our analysis. 8 References [1] Mikhail Belkin and Partha Niyogi. Laplacian eigenmaps for dimensionality reduction and data representation. Neural Computation, 15:1373 – 1396, 2003. [2] Leon Bottou and Vladimir Vapnik. Local learning algorithms. Neural Computation, 4:888 – 900, 1992. [3] Robert M. Gray and David L. Neuhoff. Quantization. IEEE Transaction on Information Theory, pages 2325 – 2383, 1998. [4] Trevor Hastie and Clive Loader. Local regression: Automatic kernel carpentry. Statistical Science, 8:139 – 143, 1993. [5] Geoffrey E. Hinton and Ruslan R. Salakhutdinov. Reducing the dimensionality of data with neural networks. Science, 313:504 – 507, 2006. [6] Honglak Lee, Alexis Battle, Rajat Raina, and Andrew Y. Ng. Efficient sparse coding algorithms. Neural Information Processing Systems (NIPS) 19, 2007. [7] Rajat Raina, Alexis Battle, Honglak Lee, Benjamin Packer, and Andrew Y. Ng. Self-taught learning: Transfer learning from unlabeled data. International Conference on Machine Learning, 2007. [8] Sam Roweis and Lawrence Saul. Nonlinear dimensionality reduction by locally linear embedding. Science, 290:2323 – 2326, 2000. [9] Joshua B. Tenenbaum, Vin De Silva, and John C. Langford. A global geometric framework for nonlinear dimensionality reduction. Science, 290:2319 – 2323, 2000. [10] Alon Zakai and Ya’acov Ritov. Consistency and localizability. Journal of Machine Learning Research, 10:827 – 856, 2009. 9
2009
50