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,400
Optimization on a Budget: A Reinforcement Learning Approach Paul Ruvolo Department of Computer Science University of California San Diego La Jolla, CA 92093 pruvolo@cs.ucsd.edu Ian Fasel Department of Computer Sciences University of Texas at Austin ianfasel@cs.utexas.edu Javier Movellan Machine Perception Laboratory University of California San Diego movellan@mplab.ucsd.edu Abstract Many popular optimization algorithms, like the Levenberg-Marquardt algorithm (LMA), use heuristic-based “controllers” that modulate the behavior of the optimizer during the optimization process. For example, in the LMA a damping parameter λ is dynamically modified based on a set of rules that were developed using heuristic arguments. Reinforcement learning (RL) is a machine learning approach to learn optimal controllers from examples and thus is an obvious candidate to improve the heuristic-based controllers implicit in the most popular and heavily used optimization algorithms. Improving the performance of off-the-shelf optimizers is particularly important for time-constrained optimization problems. For example the LMA algorithm has become popular for many real-time computer vision problems, including object tracking from video, where only a small amount of time can be allocated to the optimizer on each incoming video frame. Here we show that a popular modern reinforcement learning technique using a very simple state space can dramatically improve the performance of general purpose optimizers, like the LMA. Surprisingly the controllers learned for a particular domain also work well in very different optimization domains. For example we used RL methods to train a new controller for the damping parameter of the LMA. This controller was trained on a collection of classic, relatively small, non-linear regression problems. The modified LMA performed better than the standard LMA on these problems. This controller also dramatically outperformed the standard LMA on a difficult computer vision problem for which it had not been trained. Thus the controller appeared to have extracted control rules that were not just domain specific but generalized across a range of optimization domains. 1 Introduction Most popular optimization algorithms, like the Levenberg-Marquardt algorithm (LMA) use simple “controllers” that modulate the behavior of the optimization algorithm based on the state of the optimization process. For example, in the LMA a damping factor λ modifies the descent step to behave more like Gradient Descent or more like the Gauss-Newton optimization algorithm [1, 2]. 1 The LMA uses the following heuristic for controlling λ: If an iteration of the LMA with the current damping factor λt reduces the error then the new parameters produced by the LMA iteration are accepted and the damping factor is divided by a constant term η > 0, i.e., λt+1 = λt/η. Otherwise, if the error is not reduced, the new parameters are not accepted, the damping factor is multiplied by η, and the LMA iteration is repeated with the new damping parameter. While various heuristic arguments have been used to justify this particular way of controlling the damping factor, it is not clear whether this “controller” is optimal in any way or whether it can be significantly improved. Improving the performance of off-the-shelf optimizers is particularly important for time-constrained optimization problems. For example the LMA algorithm has become popular for many real-time computer vision problems, including object tracking from video, where only a small amount of time can be allocated to the optimizer on each incoming video frame. Time constrained optimization is in fact becoming an increasingly important problem in applications such as operations research, robotics, and machine perception. In these problems the focus is on achieving the best possible solution in a fixed amount of time. Given the special properties of time constrained optimization problems it is likely that the heuristic-based controllers used in off-the-shelf optimizers may not be particularly efficient. Additionally, standard techniques for non-linear optimization like the LMA do not address issues such as when to stop a fruitless local search or when to revisit a previously visited part of the parameter space. Reinforcement learning (RL) is a machine learning approach to learn optimal controllers by examples and thus is an obvious candidate to improve the heuristic-based controllers used in the most popular and heavily used optimization algorithms. An advantage of RL methods over other approaches to optimal control is that they do not require prior knowledge of the underlying system dynamics and the system designer is free to choose reward metrics that best match the desiderata for controller performance. For example, in the case of optimization under time constraints a suitable reward could be to achieve the minimum loss within a fixed amount of time. 2 Related Work The idea of using RL in optimization problems is not new [3, 4, 5, 6, 7]. However, previous approaches have focused on using RL methods to develop problem-specific optimizers for NPcomplete problems. Here our focus is on using RL methods to modify the controllers implicit in the most popular and heavily used optimization algorithms. In particular our goal is to make these algorithms more efficient for optimization on time budget problems. As we will soon show, a simple RL approach can result in dramatic improvements in performance of these popular optimization packages. There has also been some work on empirical evaluations of the LMA algorithm versus other nonlinear optimization methods in the computer vision community. In [8], the LMA and Powell’s dog-leg method are compared on the problem of bundle adjustment. The approach outlined in this document could in principle learn to combine these two methods to perform efficient optimization. 3 The Levenberg Marquardt Algorithm Consider the problem of optimizing a loss function f : Rn →R over the space Rn. There are many approaches to this problem, including zeroth-order methods (such as the Metropolis-Hastings algorithm), first order approaches, such as gradient descent and the Gauss-Newton method, and second order approaches such as the Newton-Raphson algorithm. Each of these algorithms have advantages and disadvantages. For example, on each iteration of gradient descent, parameters are changed in the opposite direction of the gradient of the loss function, e.g., xk+1 = xk −η ▽x f(xk) (1) Steepest Descent has convergence guarantees provided the value of η is reduced over the course of the optimization and in general is robust, but quite slow. The Gauss-Newton method is a technique for minimizing sums of squares of non-linear functions. Let g be a function from Rn →Rm with a corresponding loss function L(x) = g(x)⊤g(x). The 2 if f(xk)⊤f(xk) > f(xk−1)⊤f(xk−1) then xk ←xk−1 λ ←η × λ else λ ←1 η × λ end if Figure 1: A heuristic algorithm for updating lambda during Levenberg-Marquardt non-linear least squares optimization. algorithm works by first linearizing the function g using its first order Taylor expansion. The sum of squares loss function, L, then becomes a quadratic function that can be analytically minimized. Let H = J(xk)⊤J(xk) and d = J(xk)⊤g(xk), where J is the Jacobian of g with respect to x. Each iteration of the Gauss-Newton method is of the following form: xk+1 = xk −H−1d (2) The Gauss-Newton method has a much faster convergence rate than gradient descent, however, it is not as robust as gradient descent. It can actually perform very poorly when the linear approximation to g is not accurate. Levenberg-Marquardt [1] is a popular optimization algorithm that attempts to blend gradient descent and Gauss-Newton in order to obtain both the fast convergence rate of Gauss-Newton and the convergence guarantees of gradient descent. The algorithm has the following update rule: xk+1 = xk −(H + λdiag(H))−1d (3) This update rule is also known as damped Gauss-Newton because the λ parameter serves to dampen the Gauss-Newton step by blending it with the gradient descent step. Marquardt proposed a heuristic based control law to dynamically modify λ during the optimization process (see Figure 1). This control has become part of most LMA packages. The LMA algorithm has recently become a very popular approach to solve real-time problems in computer vision [9, 10, 11], such as object tracking and feature tracking in video. Due to the special nature of this problem it is unclear whether the heuristic-based controller embedded in the algorithm is optimal or could be significantly improved upon. In the remainder of this document we explore whether reinforcement learning methods can help improve the performance of LMA by developing an empirically learned controller of the damping factor rather than the commonly used heuristic controller. 4 Learning Control Policies for Optimization Algorithms An optimizer is an algorithm that uses some statistics about the current progress of the optimization in order to produce a next iterate to evaluate. It is natural to frame optimization in the language of control theory by thinking of the statistics of the optimization progress used by the controller to choose the next iterate as the control state and the next iterate to visit as the control action. In this work we choose to restrict our state space to a few statistics that capture both the current time constraints and the recent progress of the optimization procedure. The action space is restricted by making the observation that current methods for non-linear optimization provide good suggestions for the next point to visit. In this way our action space encodes which one of a fixed set of optimization subroutines (see Section 3) to use for the next iteration, along with actions that control various heuristic parameters for each optimization subroutine (for instance schedules for updating η in gradient descent and heuristics for modifying the value of λ in the LMA). In order to define the optimality of a controller we define a reward function that indicates the desirability of the solution found during optimization. In the context of optimization with semi-rigid time constraints an appropriate reward function balances reduction in loss of the objective function with the number of steps needed to achieve that reduction. In the case of optimization with a fixed budget, a more natural choice might be the overall reduction in the loss function within the alloted budget of function evaluations. For specific applications, in a similar spirit to the work of Boyan [6], 3 Initialize a policy π0 that explores randomly S ←{} for i = 1 to n do Generate a random optimization problem U Optimize U for T time steps using policy π0 and generate samples V ∈(s, a, r, s′)T S ←S ∪V end for repeat Construct the approximate action-value function Qπt t using the samples S Set πt+1 to be the one step policy improvement of πt using Qπt t t ←t + 1 until Qπ t−1 ≈Qπ t return πt Figure 2: Our algorithm for learning controllers for optimization on a budget. The construction of the approximate action-value function and the policy improvement step are performed using the techniques outlined in [12]. the reward function could be modified to include features of intermediate solutions that are likely to indicate the desirability of the current point. Given a state space, action space, and reward function for a given optimization problem, reinforcement learning methods provide an appropriate set of techniques for learning an optimal optimization controller. While there are many reinforcement learning algorithms that are appropriate for our problem formulation, in this work we employ Least-Squares Policy Iteration (LSPI) [12]. Least Squares Policy Iteration is particularly attractive since it handles continuous state spaces, is efficient in terms of the number of interactions with the system needed to learn a good controller, does not need an underlying model of the process dynamics, and learns models that are amenable to interpretation. LSPI is an iterative procedure that repeatedly applies the following two steps until convergence: approximating the action-value function as a linear combination of a fixed set of basis functions and then improving the current policy greedily over the approximate value function. The bases are functions of the state and action and can be non-linear. The method is efficient in terms of the number of interactions required with the dynamical system and can reuse the same set of samples to evaluate multiple policies, which is a crucial difference between LSPI and earlier methods like LSTD. The output of the LSPI procedure is a weight vector that defines the action-value function of the optimal policy as a linear combination of the basis vectors. Our method for learning an optimization controller consists of two phases. In the first phase samples are collected through interactions between a random optimization controller and an optimization problem in a series of fixed length optimization episodes. These samples are tuples of the form (s, a, r, s′) where s′ denotes the state arrived at when action a was executed starting from state s and reward r was received. The second phase of our algorithm applies LSPI to learn an actionvalue function and implicitly an optimal policy (which is given by the greedy maximization of the action-value function over actions for a given state). A sketch of our algorithm is given in Figure 2. 5 Experiments We demonstrate the ability of our method to both achieve superior performance to off the shelf nonlinear optimization techniques as well as provide insight into the specific policies and action-value functions learned. 5.1 Optimizing Nonlinear Least-Squares Functions with a Fixed Budget Both the classical non-linear problems and the facial expression recognition task were formulated in terms of optimization given a fixed budget of function evaluations. This criterion suggests a natural reward function where L is a loss function we are trying to minimize, B is the budget of function evaluations, I is the indicator function, x0 is the initial point visited in the optimization, and xopt is 4 the point with the lowest loss visited in the current optimization episode: rk = I(k < B) × I(L(xk) < L(xopt)) × (L(xopt) −L(xk)) × 1 L(x0) (4) This reward function encourages controllers that achieve large reductions in loss within the fixed budget of function evaluations. Each optimization problem takes the form of minimizing the sum of squares of non-linear functions and thus are well-suited to Levenberg-Marquardt style optimization. The action space we consider in our experiments consists of adjustments to the damping factor (maintain, decrease by a multiplicative factor, or increase by a multiplicative factor) used in the LMA, the decision of whether or not to throw away the last descent step, along with two actions that are not available to the LMA. These additional actions include moving to a new random point in the domain of the objective function and also returning to the best point found so far and performing one descent step using the LMA (using the current damping factor). The number of actions available at each step is 8 (6 for various combinations of adjustments to λ and returning the the previous iterate along with the 2 additional actions just described). The state space used to make the action decision includes a fixed-length window of history that encodes whether a particular step in the past increased or decreased the residual error from the previous iterate. This window is set to size 2 for most of our experiments, however, we did evaluate the relative improvement of using a window size of 1 versus 2 (see Figure 4). Also included in the state space is the amount of function evaluations left in our budget and a problem-specific state feature described in Section 5.3. The state and action space are mapped through a collection of fixed basis functions which the LSPI algorithm combines linearly to approximate the optimal action-value function. For most applications of LSPI these functions consist of radial-basis functions distributed throughout the continuous state and action space. The basis we use in our problem treats each action independently and thus constructs a tuple of basis functions for each action. To encode the number of evaluations left in the optimization episode, we use a collection of radial-basis functions centered at different values of budget remaining (specifically we use basis functions spaced at 4 step intervals with a bandwidth of .3). The history window of whether the loss went up or down during recent iterations of the algorithm is represented as a d-dimensional binary vector where d is the length of history window considered. For the facial expression recognition task the tuple includes an additional basis described in Section 5.3. 5.2 Classical Nonlinear Least Squares Problems In order to validate our approach we apply it to a dataset of classical non-linear optimization problems [13]. This dataset of problems includes famous optimization problems that cover a wide variety of non-linear behavior. Examples include the Kowalik and Osborne function and the Scaled Meyer function. When restricted to a budget of 5 function evaluations, our method is able to learn a policy which results in a 6% gain in performance (measured in total reduction in loss from the starting point) when compared to the LMA. 5.3 Learning to Classify Facial Expressions The box-filter features that proved successful for face detection in [14] have also shown promise for recognizing facial expressions when combined using boosting methods. The response of a box-filter to an image patch is obtained by weighting the sum of the pixel brightnesses in various boxes by a coefficient defined by the particular box-filter kernel. In our work we frame the problem of feature selection as an optimization procedure over a continuous parameter space. The parameter space defines an infinite set of box-filters that includes many of those proposed in [14] as a special case (see Figure 3). Each feature can be described as a vector in [0, 1]6 where the 6 dimensions of the vector are depicted in Figure 3. We learn a detector for the presence or absence of a smile using the pixel intensities of an image patch containing a face. We accomplish this by employing the sequential regression procedure L2boost [15]. L2-boost creates a strong classifier by iteratively fitting the residuals of the current model 5 Filter Width Vertical Offset Horizontal Filter Height Offset Crossbar Vert Crossbar Horiz Figure 3: A parameterized feature space. The position of the cross-hairs in the middle of the box filter can freely float. This added generality allows for the features proposed in [14] to be generated as special cases. A complete description of a feature is composed of the 6 parameters depicted above: horizontal offset, vertical crossbar, vertical offset, filter height, horizontal crossbar, and filter width. The weighting coefficients for the four boxes (depicted in a checkerboard pattern) is determined by linear regression between filter outputs of each box and the labels of the training set. over a collection of weak-learners (in this case our parameterized features). The L2-boost procedure selects a box-filter at each iteration that most reduces the difference between the current predictions of the model and the correct image labels. Once a sufficiently good feature is found this feature is added to the current ensemble. L2-boost learns a linear model for predicting the label of the image patch since each weak learner (box-filter) is a linear filter on the pixel values and L2-boost combines weak learners in a linear fashion. The basis space for LSPI is augmented for this task by included a basis that specifies the number of features already selected by the L2-boost procedure. We test our algorithm on the task of smile detection using a subset of 1, 000 images from the GENKI dataset (which is a collection of 60, 000 faces from the web). Along with information about the location of faces and facial features, human labelers have labeled each image as containing or not containing a smile. In this experiment our goal is to predict the human smile labels using the L2boost procedure outlined above. During each trial 3 box filters are selected using the L2-boosting procedure. Within each round of feature selection a total of 20 feature evaluations are allowed per round. We use the default version of the LMA as a mode of comparison. After collecting samples from 100 episodes of optimization on the GENKI dataset, LSPI is able to learn a policy that achieves a 2.66 fold greater reduction in total loss than the LMA on a test set of faces from the GENKI dataset (see Figure 4). Since the LMA does not have access to the ability to move to a new random part of the state space a more fair comparison would be to our method without access to this action. In this experiment our method is still able to achieve a 20% greater reduction in total loss than the LMA. Figure 4 shows that the policies learned using our method not only achieves greater reduction in loss on the training set, but that this reduction in loss translates to a significant gain in performance for classification on a validation set of test images. Our method achieves between .036 and .083 better classification performance (as measured by area under the ROC curve) depending on the optimization budget. Note that given the relatively high baseline performance of the LMA on the smile detection task, an improvement of .083 in terms of area under the ROC translates to almost halving the error rate. Also of significance is that the information encoded in the state space does make a difference in the performance of the algorithm. Learning a policy that uses a history window of error changes on the last two time steps is able to achieve a 16% greater reduction in total loss than a policy learned with a history window of size 1. Also of interest is the nature of the policies learned for smile detection on a fixed budget. The policies learned exhibit the following general trend: during the early stages of selecting a specific feature the learned policies either sample a new point in the feature space (if the error has increased from the last iteration) or do a Levenberg-Marquardt step on the best point visited up until now (if the error has gone down at the last iteration). This initial strategy makes sense since if the current point does not look promising (error has increased) it is wise to try a different part of the state space, 6 0 10 20 30 40 50 60 0.8 0.85 0.9 Optimization Budget Per Feature Selection Area Under the ROC Performance on Smile Detection as a function of Budget Learned Method Default LMA Controller Type Average Reduction in Loss Relative to the LMA Learned (history window = 1) 2.3 Learned (history window = 2) 2.66 Learned (no random restarts) 1.2 Learned on Classical (no random restarts) 1.19 Default LMA 1.0 Figure 4: Top: The performance on detecting smile versus not smile is substantially better when using an optimization controller learned with our algorithm than using the default LMA. In each run 3 features are selected by the L2-boost procedure. The number of feature evaluations per feature (the budget) varies along the x-axis. Bottom: This table describes the relative improvement in total loss reduction for policies learned using our method. however, if the error is decreasing it is best to continue to apply local optimization methods. Later in the optimization, the policy always performs a Levenberg-Marquardt step on the current best point no matter what the change in error was. This strategy makes sense since once a few different parts of the state space have been investigated the utility of sampling a new part of the state space is reduced. Several trends can be seen by examining the basis weights learned by LSPI. The first trend is that the learned policy favors discarding the last iterate versus keeping (similar to the LMA). The second trend is that the policy favors increasing the damping parameter when the error has increased on the last iteration and decreasing the damping factor when the error has decreased (also similar to the LMA). 5.4 Cross Generalization A property of choosing a general state space for our method is that the policies learned on one class of optimization problem are applicable to other classes of optimization. The optimization controllers learned in the classical least squares minimization task achieve a 19% improvement over the standard LMA on the smile detection task. Applying the controllers learned on the smile detection task to the classical least squares problem yields a more modest 5% improvement. These results support the claim that our method is extracting useful structure for optimizing under a fixed budget and not simply learning a controller that is amenable to a particular problem domain. 6 Conclusion We have presented a novel approach to the problem of learning optimization procedures for optimization on a fixed budget. We have shown that our approach achieves better performance than ubiquitous methods for non-linear least squares optimization on the task of optimizing within a fixed budget of function evaluations for both classical non-linear functions and a difficult computer vision task. We have also provided an analysis of the patterns learned by our method and how they 7 make sense in the context of optimization under a fixed budget. Additionally, we have presented extensions to the features used in [14] that are significant in their own right. In the future we will more fully explore the framework that we have outlined in this document. The specific application of the framework in the current work (state, action, and bases) while quite effective may be able to be improved. For instance, by incorporating domain specific features into the state space richer policies might be learned. We also want to apply this technique to other problems in machine perception. An upcoming project will test the viability of our technique for finding feature point locations on a face that simultaneously exhibit high likelihood in terms of appearance and high likelihood in terms of the relative arrangement of facial features. The real-time constraints of this problem make it a particularly appropriate target for the methods presented in this document. References [1] K. Levenberg, “A method for the solution of certain problems in least squares,” Applied Math Quarterly, 1944. [2] D. Marquardt, “An algorithm for least-squares estimation of nonlinear parameters,” SIAM Journal of Applied Mathematics, 1963. [3] V. V. Miagkikh and W. F. P. III, “Global search in combinatorial optimization using reinforcement learning algorithms,” in Proceedings of the Congress on Evolutionary Computation, vol. 1. IEEE Press, 6-9 1999, pp. 189–196. [4] Y. Zhang, “Solving large-scale linear programs by interior-point methods under the MATLAB environment,” Optimization Methods and Software, vol. 10, pp. 1–31, 1998. [5] L. M. Gambardella and M. Dorigo, “Ant-q: A reinforcement learning approach to the traveling salesman problem,” in International Conference on Machine Learning, 1995, pp. 252–260. [6] J. A. Boyan and A. W. Moore, “Learning evaluation functions for global optimization and boolean satisfiability,” in AAAI/IAAI, 1998, pp. 3–10. [7] R. Moll, T. J. Perkins, and A. G. Barto, “Machine learning for subproblem selection,” in ICML ’00: Proceedings of the Seventeenth International Conference on Machine Learning. San Francisco, CA, USA: Morgan Kaufmann Publishers Inc., 2000, pp. 615–622. [8] M. I. Lourakis and A. A. Argyros, “Is levenberg-marquardt the most efficient optimization algorithm for implementing bundle adjustment?” Proceedings of ICCV, 2005. [9] D. Cristinacce and T. F. Cootes, “Feature detection and tracking with constrained local models,” BMVC, pp. 929–938, 2006. [10] M. Pollefeys, L. V. Gool, M. Vergauwen, F. Verbiest, K. Cornelis, J. Tops, and R. Koch, “Visual modeling with a hand-held camera,” IJCV, vol. 59, no. 3, pp. 207–232, 2004. [11] P. Beardsley, P. Torr, and A. Zisserman, “3d model acquisition from extended image sequences.” Proceedings of ECCV, pp. 683–695, 1996. [12] M. Lagoudakis and R. Parr, “Least-squares policy iteration,” Journal of Machine Learning Research, 2003. [13] H. B. Nielsen, “Uctp problems for unconstrained optimization,” Technical Report, Technical University of Denmark, 2000. [14] P. Viola and M. Jones, “Robust real-time object detection,” International Journal of Computer Vision, 2002. [15] P. Buhlmann and B. Yu, “Boosting with the l2 loss: Regression and classification,” Journal of the American Statistical Association, 2003. 8
2008
152
3,401
Dependent Dirichlet Process Spike Sorting Jan Gasthaus, Frank Wood, Dilan G¨or¨ur, Yee Whye Teh Gatsby Computational Neuroscience Unit University College London London, WC1N 3AR, UK {j.gasthaus, fwood, dilan, ywteh}@gatsby.ucl.ac.uk Abstract In this paper we propose a new incremental spike sorting model that automatically eliminates refractory period violations, accounts for action potential waveform drift, and can handle “appearance” and “disappearance” of neurons. Our approach is to augment a known time-varying Dirichlet process that ties together a sequence of infinite Gaussian mixture models, one per action potential waveform observation, with an interspike-interval-dependent likelihood that prohibits refractory period violations. We demonstrate this model by showing results from sorting two publicly available neural data recordings for which a partial ground truth labeling is known. 1 Introduction Spike sorting (see [1] and [2] for review and methodological background) is the name given to the problem of grouping action potentials by source neuron. Generally speaking, spike sorting involves a sequence of steps; 1) recording the activity of an unknown number of neurons using some kind of extra-cellular recording device, 2) detecting the times at which action potentials are likely to have occurred, 3) slicing action potential waveforms from the surrounding raw voltage trace where action potentials were posited to have occurred, 4) (often) performing some kind of dimensionality reduction/feature extraction on the set of collected action potential waveform snippets, 5) running a clustering algorithm to produce grouping of action potentials attributed to a single neuron, and finally 6) running some kind of post hoc algorithm that detects refractory period violations and thins or adjusts the clustering results accordingly. Neuroscientists are interested in arriving at the optimal solution to this problem. Towards this end they have traditionally utilized maximum likelihood clustering methods such as expectation maximization for finite Gaussian mixture models with cross-validation model selection. This of course allows them to arrive at an optimal solution, but it is difficult to say whether or not it is the optimal solution, and it affords them no way of establishing the level of confidence they should have in their result. Recently several groups have suggested a quite different approach to this problem which eschews the quest for a single optimal solution in favor of a Bayesian treatment of the problem [3, 4, 5, 6]. In each of these, instead of pursuing the optimal sorting, multiple sortings of the spikes are produced (in fact what each model produces is a posterior distribution over spike trains). Neural data analyses may then be averaged over the resulting spike train distribution to account for uncertainties that may have arisen at various points in the spike sorting process and would not have been explicitly accounted for otherwise. Our work builds on this new Bayesian approach to spike sorting; going beyond them in the way steps five and six are accomplished. Specifically we apply the generalized Polya urn dependent Dirichlet process mixture model (GPUDPM) [7, 8] to the problem of spike sorting and show how it allows us to model waveform drift and account for neuron appearance and disappearance. By introducing a time dependent likelihood into the model we are also able to eliminate refractory period violations. 1 The need for a spike sorting approach with these features arises from several domains. Waveform non-stationarities either due to changes in the recording environment (e.g. movement of the electrode) or due to changes in the firing activity of the neuron itself (e.g. burstiness) cause almost all current spike sorting approaches to fail. This is because most pool waveforms over time, discarding the time at which the action potentials were observed. A notable exception to this is the spike sorting approach of [9], in which waveforms were pooled and clustered in short fixed time intervals. Multiple Gaussian mixture models are then fit to the waveforms in each interval and then are pruned and smoothed until a single coherent sequence of mixture models is left that describes the entire time course of the data. This is accomplished by using a forward-backward-like algorithm and the Jenson-Shannon divergence between models in consecutive intervals. Although very good results can be produced by such a model, using it requires choosing values for a large number of parameters, and, as it is a smoothing algorithm, it requires the entire data set to have been observed already. A recent study by [10] puts forward a compelling case for online spike sorting algorithms that can handle waveform non-stationarity, as well as sudden jumps in waveform shape (e.g. abrupt electrode movements due to high acceleration events), and appearance and disappearance of neurons from the recording over time. This paper introduces a chronical recording paradigm in which a chronically implanted recording device is mated with appropriate storage such that very long term recordings can be made. Unfortunately as the animal being recorded from is allowed its full range of natural movements, accelerations may cause the signal characteristics of the recording to vary dramatically over short time intervals. As such data theoretically can be recorded forever without stopping, forward-backward spike sorting algorithms such as that in [9] are ruled out. As far as we know our proposed model is the only sequential spike sorting model that meets all of the requirements of this new and challenging spike sorting problem, In the next sections we review the GPUDPM on which our spike sorting model is based, introduce the specifics of our spike sorting model, then demonstrate its performance on real data for which a partial ground truth labeling is known. 2 Review Our model is based on the generalized Polya urn Dirichlet process mixture model (GPUDPM) described in [7, 8]. The GPUDPM is a time dependent Dirichlet process (DDP) mixture model formulated in the Chinese restaurant process (CRP) sampling representation of a Dirichlet process mixture model (DPM). We will first very briefly review DPMs in general and then turn to the specifics of the GPUDPM. DPMs are a widely used tool for nonparametric density estimation and unsupervised learning in models where the true number of latent classes is unknown. In a DPM, the mixing distribution G is distributed according to a DP with base distribution G0, i.e. G|α, G0 ∼ DP(α, G0) θi|G ∼ G xi|θi ∼ F(θi) (1) Placing a DP prior over G induces a clustering tendency amongst the θi. If θi takes on K distinct values φ1, . . . , φK, we can write out an equivalent model using indicator variables ci ∈{1, . . . , K} that assigns data points to clusters. In this representation we track the distinct φk drawn from G0 for each cluster, and use the Chinese restaurant process to sample the conditional distributions of the indicator variables ci P(ci = k|c1, . . . , ci−1) = mk i−1+α for k ∈{cj : j < i} P(ci ̸= cj for all j < i|c1, . . . , ci−1) = α i−1+α (2) where mk = #{cj : cj = k ∧j < i}. The GPUDPM consists of T individual DPMs, one per discrete time step t = 1, . . . , T, all tied together through a particular way of sharing the component parameters φt k and table occupancy counts mt k between adjacent time steps (here t indexes the parameters and cluster sizes of the T DPMs). Dependence among the mt k is introduced by perturbing the number of customers sitting at each table when moving forward through time. Denote by mt = (mt 1, . . . , mt Kt) the vector containing the 2 number of customers sitting at each table at time t before a “deletion” step, where Kt is the number of non-empty tables at time t. Similarly denote by mt+1 the same quantity after this deletion step. Then the perturbation of the class counts from one step to the next is governed by the process mt+1|mt, ρ ∼ mt −ξt with probability γ mt −ζt with probability 1 −γ (3) where ξt k ∼Binomial(mt k, 1 −ρ) and ζt j = mt j for j ̸= ℓand ζt j = 0 for j = ℓwhere ℓ∼ Discrete(mt/ PKt k=1 mt k). Before seating the customers arriving at time step t + 1, the number of customers sitting at each table is initialized to mt+1. This perturbation process can either remove some number of customers from a table or effectively delete a table altogether. This deletion procedure accounts for the ability of the GPUDPM to model births and deaths of clusters. The GPUDPM is also capable of modeling drifting cluster parameters. This drift is modeled by tying together the component parameters φt k through a transition kernel P(φt k|φt−1 k ) from which the class parameter at time t is sampled given the class parameter at time t −1. For various technical reasons one must ensure that the mixture component parameters φt k are all drawn independently from G0, i.e. {φt k}T t=1 ∼G0. This can be achieved by ensuring that G0 is the invariant distribution of the transition kernel P(φt k|φt−1 k ) [8]. 3 Model In order to apply the GPUDPM model to spike sorting problems one first has to make a number of modeling assumptions. First is choosing a form for the likelihood function describing the distribution of action potential waveform shapes generated by a single neuron P(xt|ct = k, θt k) (the distibution of which was denoted F(θt k) above), the prior over the parameters of that model (the base distribution G0 above), and the transition kernel P(φt k|φt−1 k ) that governs how the waveshape of the action potentials emitted by a neuron can change over time. In the following we describe modeling choices we made for the spike sorting task, as well as how the continuous spike occurrence times can be incorporated into the model to allow for correct treatment of neuron behaviour during the absolute refractory period. Let {xt}T t=1 be the the set of action potential waveforms extracted from an extracellular recording (referred to as “spikes” in the following), and let τ 1, . . . , τ T be the time stamps (in ms) associated with these spikes in ascending order (i.e. τ t ≥τ t′ if t > t′). The model thus incorporates two different concepts of time: the discrete sequence of time steps t = 1, . . . , T corresponding to the time steps in the GPUDPM model and the actual spike times τ t at which the spike xt occurs in the recording. We assume that only one spike occurs per time step t, i.e. we set N = 1 in the model above and identify ct = (ct 1) = ct. It is well known that the distribution of action potential waveforms originating from a single neuron in a PCA feature space is well approximated by a Normal distribution [1]. We choose to model each dimension xd (d ∈{1, . . . , D}) of the data independently with a univariate Normal distribution and use a product of independent Normal-Gamma priors as the base distribution G0 of the DP. P(x|φ) def = N(x|φ) = D Y d=1 N xd|µd, λ−1 d  (4) G0(µ0, n0, a, b) def = D Y d=1  N µd|µ0,d, (n0λd)−1 Ga (λd|a, b)  (5) where φ = (λ1, . . . , λD, µ1, . . . , µD), and µ0 = (µ0,1, . . . , µ0,D), n0, a, and b are parameters of the model. The independence assumption is made here mainly to increase computational efficiency. A model where P(x|φ) is a multivariate Gaussian with full covariance matrix is also possible, but makes sampling from (7) computationally expensive. While correlations between the components can be observed in neural recordings, they can at least partially be attributed to temporal waveform variation. To account for the fact that neurons have an absolute refractory period following each action potential during which no further action potential can occur, we extend the GPUDPM by conditioning the model 3 on the spike occurrence times τ1, . . . , τT and modifying the conditional probability of assigning a spike to a cluster given the other cluster labels and the spike occurrence times τ1, . . . , τt in the following way: P(ct = k|mt, c1:t−1, τ 1:t, α) ∝    0 if τ t −ˆτ t k ≤rabs mt k if τ t −ˆτ t k > rabs and k ∈{1, . . . , Kt−1} α ifτ t −ˆτ t k > rabs and k = Kt−1 + 1 (6) where ˆτ t k is the spike time of the last spike assigned to cluster k before time step t, i.e. ˆτ t k = τ t′, t′ = max{t′′|t′′ < t ∧ct′′ = k}. Essentially, the conditional probability of assigning the spike at time t to cluster k is zero if the difference of the occurrence time of this spike and the occurrence time of the last spike associated with cluster k is smaller than the refractory period rabs. If the time difference is larger than rabs then the usual CRP conditional probabilities are used. In terms of the Chinese restaurant metaphor, this setup corresponds to a restaurant in which seating a customer at a table removes that table as an option for new customers for some period of time. Note that this extension introduces additional dependencies among the indicator variables c1, . . . , cT . The transition kernel P(φt k|φt−1 k ) specifies how the action potential waveshape can vary over time. To meet the technical requirements of the GPUDPM and because its waveform drift modeling semantics are reasonable we use the update rule of the Metropolis algorithm [11] as the transition kernel P(φt k|φt−1 k ), i.e. we set P(φt k|φt−1 k ) = S(φt−1 k , φt k)A(φt−1 k , φt k) +  1 − Z S(φ′, φt k)A(φ′, φt k)dφ′  δφt−1 k (φt k) (7) where S(φ′, φt k) is a (symmetric) proposal distribution and A(φ′, φt k) = min 1, G0(φt k)/G0(φt−1 k )  . We choose an isotropic Gaussian centered at the old value as proposal distribution S(φ′, φt k) = N(φt−1 k , σI). This choice of P(φt k|φt−1 k ) ensures that G0 is the invariant distribution of the transition kernel, while at the same time allowing us to control the amount of correlation between time steps through σ. A transition kernel of this form allows the distribution of the action potential waveforms to vary slowly (if σ is chosen small) from one time step to the next both in mean waveform shape as well as in variance. While small changes are preferred, larger changes are also possible if supported by the data. Inference in this model is performed using the sequential Monte Carlo algorithm (particle filter) defined in [7, 8]. 4 Experiments 4.1 Methodology Experiments were performed on a subset of the publicly available1 data set described in [12, 13], which consists of simultaneous intracellular and extracellular recordings of cells in the hippocampus of anesthetized rats. Recordings from an extracellular tetrode and an intracellular electrode were made simultaneously, such that the cell recorded on the intracellular electrode was also recorded extracellularly by a tetrode. Action potentials detected on the intracellular (IC) channel are an almost certain indicator that the cell being recorded spiked. Action potentials detected on the extracellular (EC) channels may include the action potentials generated by the intracellularly recorded cell, but almost certainly include spiking activity from other cells as well. The intracellular recording therefore can be used to obtain a ground truth labeling for the spikes originating from one neuron that can be used to evaluate the performance of human sorters and automatic spike sorting algorithms that sort extracellular recordings [13]. However, by this method ground truth can only be determined for one of the neurons whose spikes are present in the extracellular recording, and this should be kept in mind when evaluating the performance of spike sorting algorithms on such a data set. Neither the correct number of distinct neurons recorded from by the extracellular electrode nor the correct labeling for any spikes not originating from the neuron recorded intracellularly can be determined by this methodology. 1http://crcns.org/data-sets/hc/hc-1/ 4 Data set DPM GPUDPM FP FN RPV FP FN RPV 1 MAP 4.90% 4.21% 4 4.71% 1.32% 0 AVG 5.11% 5.17% 4 4.77% 1.68% 0 2 MAP 0.94% 9.40% 1 0.85% 18.63% 0 AVG 0.83% 12.48% 1 0.86% 18.81% 0 Table 1: Performance of both algorithms on the two data sets: % false positives (FP), % false negatives (FN), # of refratory period violations (RPV). Results are shown for the MAP solution (MAP) and averaged over the posterior distribution (AVG). The subset of that data set that was used for the experiments consisted of two recordings from different animals (4 minutes each), recorded at 10 kHz. The data was bandpass filtered (300Hz – 3kHz), and spikes on the intracellular channel were detected as the local maxima of the first derivative of the signal larger than a manually chosen threshold. Spikes on the extracellular channels were determined as the local minima exceeding 4 standard deviations in magnitude. Spike waveforms of length 1 ms were extracted from around each spike (4 samples before and 5 samples after the peak). The positions of the minima within the spike waveforms were aligned by upsampling, shifting and then downsampling the waveforms. The extracellular spikes corresponding to action potentials from the identified neuron were determined as the spikes occurring within 0.1 ms of the IC spike. For each spike the signals from the four tetrode channels were combined into a vector of length 40. Each dimensions was scaled by the maximal variance among all dimensions and PCA dimensionality reduction was performed on the scaled data sets (for each of the two recordings separately). The first three principal components were used as input to our spike sorting algorithm. The first recording (data set 1) consists of 3187 spikes, 831 originate from the identified neuron, while the second (data set 2) contains 3502 spikes, 553 of which were also detected on the IC channel. As shown in Figure 1, there is a clearly visible change in waveform shape of the identified neuron over time in data set 1, while in data set 2 the waveform shapes remain roughly constant. Presumably this change in waveform shape is due to the slow death of the cell as a result of the damage done to the cell by the intracellular recording procedure. The parameters for the prior (µ0, n0, a, b) were chosen empirically and were fixed at µ0 = 0, n0 = 0.1, a = 4, b = 1 for all experiments. The parameters governing the deletion procedure were set to ρ = 0.985 and γ = 1 −10−5, reflecting the fact that we consider relative firing rates of the neurons to stay roughly constant over time and neuron death a relatively rare process respectively. The variance of the proposal distribution σ was fixed at 0.01, favoring small changes in the cluster parameters from one time step to the next. Experiments on both data sets were performed for α ∈{0.01, 0.005, 0.001} and the model was found to be relatively sensitive to this parameter in our experiments. The sequential Monte Carlo simulations were run using 1000 particles, and multinomial resampling was performed at each step. For comparison, the same data set was also sorted using the DPM-based spike sorting algorithm described in [6]2, which pools waveforms over time and thus does not make use of any information about the occurrence times of the spikes. The algorithm performs Gibbs sampling in a DPM with Gaussian likelihood and a conjugate Normal-Inverse-Wishart prior. A Gamma prior is placed on the DP concentration parameter α. The parameters of the priors the prior were set to µ0 = 0, κ0 = 0.1, λ0 = 0.1 × I, a0 = 1 and b0 = 1. The Gibbs sampler was run for 6000 iterations, where the first 1000 were discarded as burn-in. 4.2 Results The performance of both algorithms is shown in Table 1. The data labelings corresponding to these results are illustrated in Figure 1. As expected, our algorithm outperforms the DPM-based algorithm on data set 1, which includes waveform drift which the DPM cannot account for. As data set 2 does not show waveform drift it can be adequately modeled without introducing time dependence. The DPM model which has the advantage of being significantly less complex than the GPUDPM is able 2Code publicly available from http://www.gatsby.ucl.ac.uk/˜fwood/code.html 5 (a) Ground Truth (b) Ground Truth (c) DPM (d) DPM (e) GPUDPM (f) GPUDPM Figure 1: A comparison of DPM to GPUDPM spike sorting for two channels of tetrode data for which the ground truth labeling of one neuron is known. Each column shows subsampled results for one data set. In all plots the vertical axis is time and the horizontal axes are the first two principal components of the detected waveforms. The top row of graphs shows the ground truth labeling of both data sets where the action potentials known to have been generated by a single neuron are labeled with x’s. Other points in the top row of graphs may also correspond to action potentials but as we do not know the ground truth labeling for them we label them all with dots. The middle row shows the maximum a posteriori labeling of both data sets produced by a DP mixture model spike sorting algorithm which does not utilize the time at which waveforms were captured, nor does it model waveform shape change. The bottom row shows the maximum a posteriori labeling of both data sets produced by our GPUDPM spike sorting algorithm which does model both the time at which the spikes occurred and the changing action potential waveshape. The left column shows that the GPUDPM performs better than the DPM when the waveshape of the underlying neurons changes over time. The right column shows that the GPUDPM performs no worse than the DPM when the waveshape of the underlying neurons stays constant. 6 to outperform our model on this data set. The inferior performance of the GPUDPM model on this data set can also partly be be explained by the inference procedure used: For the GPUDPM model inference is performed by a particle filter using a relatively small number of particles (1000), whereas a large number of Gibbs sampler iterations (5000) are used to estimate the posterior for the DPM. With a larger number of particles (or samples in the Gibbs sampler), one would expect both models to perform equally well, with possibly a slight advantage for the GPUDPM which can exploit the information contained in the refractory period violations. As dictated by the model, the GPUDPM algorithm does not assign two spikes that are within the refractory period of each other to the same cluster, whereas the DPM does not incorporate this restriction, and therefore can produce labelings containing refractory period violations. Though only a relatively small number of such mistakes are made by the DPM algorithm, these effects are likely to become larger in longer and/or noisier recordings, or when more neurons are present. For some values of α the GPUDPM algorithm produced different results, showing either a large number of false positives or a large number of false negatives. In the former case the algorithm incorrectly places the waveforms from the IC channel and the waveform of another neuron in one cluster, in the latter case the algorithm starts assigning the IC waveforms to a different cluster after some point in time. This behavior is illustrated for data set 1 and α = 0.01 in Figure 2, and can be explained by shortcomings of the inference scheme: While in theory the algorithm should be able to maintain multiple labeling hypotheses throughout the entire time span, the particle filter approach – especially when the number of particles is small and no specialized resampling scheme (e.g. [14]) is used – in practice often only represents the posterior accurately for the last few time steps. Figure 2: An alternative “interpretation” of the data from the left column of Fig. 1 given by the GPUDPM spike sorter. Here the labels assigned to both the the neuron with changing waveshape and one of the neurons with stationary waveshape change approximately half-way through the recording. Although it is difficult to see because the data set must be significantly downsampled for display purposes, there is a “noise event” at the point in time where the labels switch. A feature of the DDP is that it assigns posterior mass to both of these alternative interpretations of the data. While for this data set we know this labeling to be wrong because we know the ground truth, in other recordings such an “injection of noise” could, for instance, signal a shift in electrode position requiring similar rapid births and deaths of clusters. 5 Discussion We have demonstrated that spike sorting using time-varying Dirichlet process mixtures in general, and more specifically our spike sorting specialization of the GPUDPM, produce promising results. With such a spike sorting approach we, within a single model, are able to account for action potential waveform drift, refractory period violations, and neuron appearance and disappearance from a recording. Previously no single model addressed all of these simultaneously, requiring solutions in the form of ad hoc combinations of strategies and algorithms that produces spike sorting results that were potentially difficult to characterize. Our model-based approach makes it easy to explicitly state modeling assumptions and produces results that are easy to characterize. Also, more complex or application specific models of the interspike interval distribution and/or the data likelihood can easily 7 be incorporated into the model. The performance of the model on real data suggests that a more complete characterization of its performance is warranted. Directions for further research include the development of a more efficient sequential inference scheme or a hybrid sequential/Gibbs sampler scheme that allows propagation of interspike interval information backwards in time. Parametric models for the interspike interval density for each neuron whose parameters are inferred from the data, which can improve spike sorting results [15], can also be incorporated into the model. Finally, priors may be placed on some of the parameters in order to make make the algorithm more robust and easily applicable to new data. Acknowledgments This work was supported by the Gatsby Charitable Foundation and the PASCAL Network of Excellence. References [1] M. S. Lewicki. A review of methods for spike sorting: the detection and classification of neural action potentials. Network: Computation in Neural Systems, 9(4):53–78, 1998. [2] M. Sahani. Latent variable models for neural data analysis. PhD thesis, California Institute of Technology, Pasadena, California, 1999. [3] D. P. Nguyen, L. M. Frank, and E. N. Brown. An application of reversible-jump Markov chain Monte Carlo to spike classification of multi-unit extracellular recordings. Network, 14(1):61–82, 2003. [4] D. G¨or¨ur, C. R. Rasmussen, A. S. Tolias, F. Sinz, and N.K. Logothetis. Modeling spikes with mixtures of factor analyzers. In Proceeding of the DAGM Symposium, pages 391–398. Springer, 2004. [5] F. Wood, S. Goldwater, and M. J. Black. A non-parametric Bayesian approach to spike sorting. In Proceedings of the 28th Annual International Conference of the IEEE Engineering in Medicine and Biology Society, pages 1165–1168, 2006. [6] F. Wood and M. J. Black. A nonparametric Bayesian alternative to spike sorting. Journal of Neuroscience Methods, 173:1–12, 2008. [7] F. Caron. Inf´erence Bay´esienne pour la d´etermination et la s´election de mod`eles stochastiques. PhD thesis, ´Ecole Centrale de Lille and Universit´e des Sciences et Technologiques de Lille, Lille, France, 2006. [8] F. Caron, M. Davy, and A. Doucet. Generalized Polya urn for time-varying Dirichlet process mixtures. In 23rd Conference on Uncertainty in Artificial Intelligence (UAI’2007), Vancouver, Canada, July 2007, 2007. [9] A. Bar-Hillel, A. Spiro, and E. Stark. Spike sorting: Bayesian clustering of non-stationary data. Journal of Neuroscience Methods, 157(2):303–316, 2006. [10] G. Santhanam, M. D. Linderman, V. Gilja, A. Afshar, S. I. Ryu, T. H. Meng, and K. V. Shenoy. HermesB: A continuous neural recording system for freely behaving primates. IEEE Transactions on Biomedical Engineering, 54(11):2037–2050, 2007. [11] A. W. Metropolis, A. W. Rosenbluth, M. N. Rosenbluth, A. H. Teller, and E. Teller. Equations of state calculations by fast computing machines. Journal of Chemical Physics, 21:1087–1092, 1953. [12] D. A. Henze, Z. Borhegyi, J. Csicsvari, A. Mamiya, K. D. Harris, and G. Buzs´aki. Intracellular features predicted by extracellular recordings in the hippocampus in vivo. Journal of Neurophysiology, 84(1):390– 400, 2000. [13] K. D. Harris, D. A. Henze, J. Csicsvari, H. Hirase, and G. Buzs´aki. Accuracy of tetrode spike separation as determined by simultaneous intracellular and extracellular measurements. Journal of Neurophysiology, 81(1):401–414, 2000. [14] P. Fearnhead. Particle filters for mixture models with an unknown number of components. Journal of Statistics and Computing, 14:11–21, 2004. [15] C. Pouzat, M. Delescluse, P. Viot, and J. Diebolt. Improved spike-sorting by modeling firing statistics and burst-dependent spike amplitude attenuation: A Markov Chain Monte Carlo approach. Journal of Neurophysiology, 91(6):2910–2928, 2004. 8
2008
153
3,402
The Recurrent Temporal Restricted Boltzmann Machine Ilya Sutskever, Geoffrey Hinton, and Graham Taylor University of Toronto {ilya, hinton, gwtaylor}@cs.utoronto.ca Abstract The Temporal Restricted Boltzmann Machine (TRBM) is a probabilistic model for sequences that is able to successfully model (i.e., generate nice-looking samples of) several very high dimensional sequences, such as motion capture data and the pixels of low resolution videos of balls bouncing in a box. The major disadvantage of the TRBM is that exact inference is extremely hard, since even computing a Gibbs update for a single variable of the posterior is exponentially expensive. This difficulty has necessitated the use of a heuristic inference procedure, that nonetheless was accurate enough for successful learning. In this paper we introduce the Recurrent TRBM, which is a very slight modification of the TRBM for which exact inference is very easy and exact gradient learning is almost tractable. We demonstrate that the RTRBM is better than an analogous TRBM at generating motion capture and videos of bouncing balls. 1 Introduction Modeling sequences is an important problem since there is a vast amount of natural data, such as speech and videos, that is inherently sequential. A good model for these data sources could be useful for finding an abstract representation that is helpful for solving “natural” discrimination tasks (see [4] for an example of this approach for the non-sequential case). In addition, it could be also used for predicting the future of a sequence from its past, be used as a prior for denoising tasks, and be used for other applications such as tracking objects in video. The Temporal Restricted Boltzmann Machine [14, 13] is a recently introduced probabilistic model that has the ability to accurately model complex probability distributions over high-dimensional sequences. It was shown to be able to generate realistic motion capture data [14], and low resolution videos of 2 balls bouncing in a box [13], as well as complete and denoise such sequences. As a probabilistic model, the TRBM is a directed graphical model consisting of a sequence of Restricted Boltzmann Machines (RBMs) [3], where the state of one or more previous RBMs determines the biases of the RBM in next timestep. This probabilistic formulation straightforwardly implies a learning procedure where approximate inference is followed by learning. The learning consists of learning a conditional RBM at each timestep, which is easily done with Contrastive Divergence (CD) [3]. Exact inference in TRBMs, on the other hand, is highly non-trivial, since computing even a single Gibbs update requires computing the ratio of two RBM partition functions. The approximate inference procedure used in [13] was heuristic and was not even derived from a variational principle. In this paper we introduce the Recurrent TRBM (RTRBM), which is a model that is very similar to the TRBM, and just as expressive. Despite the similarity, exact inference is very easy in the RTRBM and computing the gradient of the log likelihood is feasible (up to the error introduced by the use of Contrastive Divergence). We demonstrate that the RTRBM is able to generate more realistic samples than an equivalent TRBM for the motion capture data and for the pixels of videos of bouncing balls. The RTRBM’s performance is better than the TRBM mainly because it learns to convey more information through its hidden-to-hidden connections. 2 Restricted Boltzmann Machines The building block of the TRBM and the RTRBM is the Restricted Boltzmann Machine [3]. An RBM defines a probability distribution over pairs of vectors, V ∈{0, 1}NV and H ∈{0, 1}NH (a shorthand for visible and hidden) by the equation P(v, h) = P(V = v, H = h) = exp(v⊤bV + h⊤bH + v⊤Wh)/Z (1) where bV is a vector of biases for the visible vectors, bH is a vector of biases for the hidden vectors, and W is the matrix of connection weights. The quantity Z = Z(bV , bH, W) is the value of the partition function that ensures that Eq. 1 is a valid probability distribution. The RBM’s definition implies that the conditional distributions P(H|v) and P(V |h) are factorial (i.e., all the components of H in P(H|v) are independent) and are given by P(H(j) = 1|v) = s(bH + W ⊤v)(j) and P(V (i) = 1|h) = s(bV + Wh)(i), where s(x)(j) = (1 + exp(−x(j)))−1 is the logistic function and x(j) is the jth component of the vector x. In general, we use i to index visible vectors V and j to index hidden vectors H. 1 The RBM can be slightly modified to allow the vector V to take real values; one way of achieving this is by the definition P(v, h) = exp(−∥v∥2/2 + v⊤bV + h⊤bH + v⊤Wh)/Z. (2) Using this equation does not change the form of the gradients and the conditional distribution P(H|v). The only change it introduces is in the conditional distribution P(V |h), which is equal to a multivariate Gaussian with parameters N(bV + Wh, I). See [18, 14] for more details and generalizations. The gradient of the average log probability given a dataset S, L = 1/|S| P v∈S log P(v), has the following simple form: ∂L/∂W = V · H⊤ P (H|V ) ˜ P (V ) − V · H⊤ P (H,V ) (3) where ˜P(V ) = 1/|S| P v∈S δv(V ) (here δx(X) is a distribution over real-valued vectors that is concentrated at x), and ⟨f(X)⟩P (X) is the expectation of f(X) under the distribution P. Computing the exact values of the expectations ⟨·⟩P (H,V ) is computationally intractable, and much work has been done on methods for computing approximate values for the expectations that are good enough for practical learning and inference tasks (e.g., [16, 12, 19], including [15], which works well for the RBM). We will approximate the gradients with respect to the RBM’s parameters using the Contrastive Divergence [3] learning procedure, CDn, whose updates are computed by the following algorithm. Algorithm 1 (CDn) 1. Sample (v, h) ∼P(H|V ) ˜P(V ) 2. Set ∆W to v · h⊤ 3. repeat n times: sample v ∼P(V |h), then sample h ∼P(H|v) 4. Decrease ∆W by v · h⊤ Models learned by CD1 are often reasonable generative models of the data [3], but if learning is continued with CD25, the resulting generative models are much better [11]. The RBM also plays a critical role in deep belief networks [4], [5], but we do not use this connection in this paper. 3 The TRBM It is easy to construct the TRBM with RBMs. The TRBM, as described in the introduction, is a sequence of RBMs arranged in such a way that in any given timestep, the RBM’s biases depend only on the state of the RBM in the previous timestep. In its simplest form, the TRBM can 1We use uppercase variables (as in P(H|v)) to denote distributions and lowercase variables (as in P(h|v)) to denote the (real-valued) probability P(H = h|v). Figure 1: The graphical structure of a TRBM: a directed sequence of RBMs. be viewed as a Hidden Markov Model (HMM) [9] with an exponentially large state space that has an extremely compact parameterization of the transition and the emission probabilities. Let XtB tA = (XtA, . . . , XtB) denote a sequence of variables. The TRBM defines a probability distribution P(V T 1 = vT 1 , HT 1 = hT 1 ) by the equation P(vT 1 , hT 1 ) = T Y t=2 P(vt, ht|ht−1)P0(v1, h1) (4) which is identical to the defining equation of the HMM. The conditional distribution P(Vt, Ht|ht−1) is that of an RBM, whose biases for Ht are a function of ht−1. Specifically, P(vt, ht|ht−1) = exp v⊤ t bV + v⊤ t Wht + h⊤ t (bH + W ′ht−1)  /Z(ht−1) (5) where bV , bH and W are as in Eq. 1, while W ′ is the weight matrix of the connections from Ht−1 to Ht, making bH + W ′ht−1 be the bias of RBM at time t. In this equation, V ∈{0, 1}NV and H ∈{0, 1}NH; it is easy to modify this definition to allow V to take real values as was done in Eq. 2. The RBM’s partition function depends on ht−1, because the parameters (i.e., the biases) of the RBM at time t depend on the value of the random variable Ht−1. Finally, the distribution P0 is defined by an equation very similar to Eq. 5, except that the (undefined) term W ′h0 is replaced by the term binit, so the hidden units receive a special initial bias at P0; we will often write P(V1, H1|h0) for P0(V1, H1) and W ′h0 for binit. It follows from these equations that the TRBM is a directed graphical model that has an (undirected) RBM at each timestep (a related directed sequence of Boltzmann Machines has been considered in [7]). As in most probabilistic models, the weight update is computed by solving the inference problem and computing the weight update as if the inferred variables were observed. fully-visible case. If the hidden variables are observed, equation 4 implies that the gradient of the log likelihood with respect to the TRBM’s parameters is PT t=1 ∇log P(vt, ht|ht−1), and each term, being the gradient of the log likelihood of an RBM, can be approximated using CDn. Thus the main computational difficulty of learning TRBMs is in obtaining samples from a distribution approximating the posterior P(HT 1 |vT 1 ). Inference in a TRBM Unfortunately, the TRBM’s inference problem is harder than that of a typical undirected graphical model, because even computing the probability P(H(j) t = 1| everything else) involves evaluating the exact ratio of two RBM partition functions, which can be seen from Eq. 5. This difficulty necessitated the use of a heuristic inference procedure [13], which is based on the observation that the distribution P(Ht|ht−1 1 , vt 1) = P(Ht|ht−1, vt) is factorial by definition. This inference procedure does not do any kind of smoothing from the future and only does approximate filtering from the past by sampling from the distribution QT t=1 P(Ht|Ht−1 1 , vt 1) instead of the true posterior distribution QT t=1 P(Ht|Ht−1 1 , vT 1 ), which is easy because P(Ht|ht−1 1 , vt 1) is factorial. 2 4 Recurrent TRBMs Let us start with notation. Consider an arbitrary factorial distribution P ′(H). The statement h ∼ P ′(H) means that h is sampled from the factorial distribution P ′(H), so each h(j) is set to 1 with 2This is a slightly simplified description of the inference procedure in [13]. Figure 2: The graphical structure of the RTRBM, Q. The variables Ht are real valued while the variables H′ t are binary. The conditional distribution Q(Vt, H′ t|ht−1) is given by the equation Q(vt, h′ t|ht−1) = exp v⊤ t Wh′ t + v⊤ t bV + h′ t(bH + W ′ht−1)  /Z(ht−1), which is essentially the same as the TRBM’s conditional distribution P from equation 5. We will always integrate out H′ t and will work directly with the distribution Q(Vt|ht−1). Notice that when V1 is observed, H′ 1 cannot affect H1. probability P ′(H(j) = 1), and 0 otherwise. In contrast, the statement h ←P ′(H) means that each h(j) is set to the real value P ′(H(j) = 1), so this is a “mean-field” update [8, 17]. The symbol P stands for the distribution of some TRBM, while the symbol Q stands for the distribution defined by an RTRBM. Note that the outcome of the operation · ←P(Ht|vt, ht−1) is s(Wvt +W ′ht−1 +bH). An RTRBM, Q(V T 1 , HT 1 ), is defined by the equation Q(vT 1 , hT 1 ) = T Y t=2 Q(vt|ht−1)Q(ht|vt, ht−1) · Q0(v1). Q0(h1|v1) (6) The terms appearing in this equation will be defined shortly. Let us contrast the generative process of the two models. To sample from a TRBM P, we need to perform a directed pass, sampling from each RBM on every timestep. One way of doing this is described by the following algorithm. Algorithm 2 (for sampling from the TRBM): for 1 ≤t ≤T: 1. sample vt ∼P(Vt|ht−1) 2. sample ht ∼P(Ht|vt, ht−1) 3 where step 1 requires sampling from the marginals of a Boltzmann Machine (by integrating out Ht), which involves running a Markov chain. By definition, RTRBMs and TRBMs are parameterized in the same way, so from now on we will assume that P and Q have identical parameters, which are W, W ′, bV , bH, and binit. The following algorithm samples from the RTRBM Q under this assumption. Algorithm 3 (for sampling from the RTRBM) for 1 ≤t ≤T: 1. sample vt ∼P(Vt|ht−1) 2. set ht ←P(Ht|vt, ht−1) We can infer that Q(Vt|ht−1) = P(Vt|ht−1) because of step 1 in Algorithm 3, which is also consistent with the equation given in figure 2 where H′ t is integrated out. The only difference between Algorithm 2 and Algorithm 3 is in step 2. The difference may seem small, since the operations ht ∼P(Ht|vt, ht−1) and ht ←P(Ht|vt, ht−1) appear similar. However, this difference significantly alters the inference and learning procedures of the RTRBM; in particular, it can already be seen that Ht are real-valued for the RTRBM. 3When t = 1, P(Ht|vt, ht−1) stands for P0(H1|v1), and similarly for other conditional distributions. The same convention is used in all algorithms. 4.1 Inference in RTRBMs Inference in RTRBMs given vT 1 is very easy, which might be surprising in light of its similarity to the TRBM. The reason inference is easy is similar to the reason inference in square ICAs is easy [1]: There is a unique and an easily computable value of the hidden variables that has a nonzero posterior probability. Suppose, for example, that the value of V1 is v1, which means that v1 was produced at the end of step 1 in Algorithm 3. Since step 2, the deterministic operation h1 ←P0(H1|v1), has been executed, the only value h1 can take is the value assigned by the operation · ←P0(H1|v1). Any other value for h1 is never produced by a generative process that outputs v1 and thus has posterior probability 0. In addition, by executing this operation, we can recover h1. Thus, Q0(H1|v1) = δs(W v1+bH+binit)(H1). Note that H1’s value is completely independent of vT 2 . Once h1 is known, we can consider the generative process that produced v2. As before, since v2 was produced at the end of step 1, then the fact that step 2 has been executed implies that h2 can be computed by h2 ←P(H2|v2, h1) (recall that at this point h1 is known with absolute certainty). If the same reasoning is repeated t times, then all of ht 1 is uniquely determined and is easily computed when V t 1 is known. There is no need for smoothing because Vt and Ht−1 influence Ht with such strength that the knowledge of V T t+1 cannot alter the model’s belief about Ht. This is because Q(Ht|vt, ht−1) = δs(W vt+bH+W ′ht−1)(Ht). The resulting inference algorithm is simple: Algorithm 4 (inference in RTRBMs) for 1 ≤t ≤T: 1. ht ←P(Ht|vt, ht−1) Let h(v)T 1 denote the output of the inference algorithm on input vT 1 , in which case the posterior is described by Q(HT 1 |vT 1 ) = δh(v)T 1 (HT 1 ). (7) 4.2 Learning in RTRBMs Learning in RTRBMs may seem easy once inference is solved, since the main difficulty in learning TRBMs is the inference problem. However, the RTRBM does not allow EM-like learning because the equation ∇log Q(vT 1 ) = ∇log Q(vT 1 , hT 1 ) hT 1 ∼Q(HT 1 |vT 1 ) is not meaningful. To be precise, the gradient ∇log Q(vT 1 , hT 1 ) is undefined because δs(W ′ht−1+bH+W T vt)(ht) is not, in general, a continuous function of W. Thus, the gradient has to be computed differently. Notice that the RTRBM’s log probability satisfies log Q(vT 1 ) = PT t=1 log Q(vt|vt−1 1 ), so we could try computing the sum ∇PT t=1 log Q(vt|vt−1 1 ). The key observation that makes the computation feasible is the equation Q(Vt|vt−1 1 ) = Q(Vt|h(v)t−1) (8) where h(v)t−1 is the value computed by the RTRBM inference algorithm with inputs vt 1. This equation holds because Q(vt|vt−1 1 ) = R h′ t−1 Q(vt|h′ t−1)Q(h′ t−1|vt−1 1 )dh′ t−1 = Q(vt|h(v)t−1), as the posterior distribution Q(Ht−1|vt−1 1 ) = δh(v)t−1(Ht−1) is a point-mass at h(v)t−1, which follows from Eq. 7. The equality Q(Vt|vt−1 1 ) = Q(Vt|h(v)t−1) allows us to define a recurrent neural network (RNN) [10] whose parameters are identical to those of the RTRBM, and whose cost function is equal to the log likelihood of the RTRBM. This is useful because it is easy to compute gradients with respect to the RNN’s parameters using the backpropagation through time algorithm [10]. The RNN has a pair of variables at each timestep, {(vt, rt)}T t=1, where vt are the input variables and rt are the RNN’s hidden variables (all of which are deterministic). The hiddens rT 1 are computed by the equation rt = s(Wvt + bH + W ′rt−1) (9) where W ′rt−1 is replaced with binit when t = 1. This definition was chosen so that the equation rT 1 = h(v)T 1 would hold. The RNN attempts to probabilistically predict the next timestep from its history using the marginal distribution of the RBM Q(Vt+1|rt), so its objective function at time t is defined to be log Q(vt+1|rt), where Q depends on the RNN’s parameters in the same way it depends on the RTRBM’s parameters (the two sets of parameters being identical). This is a valid definition of an RNN whose cumulative objective for the sequence vT 1 is O = T X t=1 log Q(vt|rt−1) (10) where Q(v1|r0) = Q0(v1). But since rt as computed in equation 9 on input vT 1 is identical to h(v)t, the equality log Q(vt|rt−1) = log Q(vt|vt−1 1 ) holds. Substituting this identity into Eq. 10 yields O = T X t=1 log Q(vt|rt−1) = T X t=1 log Q(vt|vt−1 1 ) = log Q(vT 1 ) (11) which is the log probability of the corresponding RTRBM. This means that ∇O = ∇log Q(vT 1 ) can be computed with the backpropagation through time algorithm [10], where the contribution of the gradient from each timestep is computed with Contrastive Divergence. 4.3 Details of the backpropagation through time algorithm The backpropagation through time algorithm is identical to the usual backpropagation algorithm where the feedforward neural network is turned “on its side”. Specifically, the algorithm maintains a term ∂O/∂rt which is computed from ∂O/∂rt+1 and ∂log Q(vt+1|rt)/∂rt using the chain rule, by the equation ∂O/∂rt = W ′⊤(rt+1.(1 −rt+1).∂O/∂rt+1) + W ′⊤∂log Q(vt|rt−1)/∂bH (12) where a.b denotes component-wise multiplication, the term rt.(1 −rt) arises from the derivative of the logistic function s′(x) = s(x).(1 −s(x)), and ∂log Q(vt+1|rt)/∂bH is computed by CD. Once ∂O/∂rt is computed for all t, the gradients of the parameters can be computed using the following equations ∂O ∂W ′ = T X t=2 rt−1(rt.(1 −rt).∂O/∂rt)⊤ (13) ∂O ∂W = T −1 X t=1 vt  W ′⊤(rt+1.(1 −rt+1).∂O/∂rt+1) ⊤ + T X t=1 ∂log Q(vt|rt−1)/∂W (14) The first summation in Eq. 14 arises from the use of W as weights for inference for computing rt and the second summation arises from the use of W as RBM parameters for computing log Q(vt|rt−1). Each term of the form ∂log Q(vt+1|rt)/∂W is also computed with CD. Computing ∂O/∂rt is done most conveniently with a single backward pass through the sequence. As always, log Q(v1|r0) = Q0(v1). It is also seen that the gradient would be computed exactly if CD were to return the exact gradient of the RBM’s log probability. 5 Experiments We report the results of experiments comparing an RTRBM to a TRBM. The results in [14, 13] were obtained using TRBMs that had several delay-taps, which means that each hidden unit could directly observe several previous timesteps. To demonstrate that the RTRBM learns to use the hidden units to store information, we did not use delay-taps for the RTRBM nor the TRBM, which causes the results to be worse (but not much) than in [14, 13]. If delay-taps are allowed, then the results of [14, 13] show that there is little benefit from the hidden-to-hidden connections (which are W ′), making the comparison between the RTRBM and the TRBM uninteresting. In all experiments, the RTRBM and the TRBM had the same number of hidden units, their parameters were initialized in the same manner, and they were trained for the same number of weight updates. When sampling from the TRBM, we would use the sampling procedure of the RTRBM using the TRBM’s parameters to eliminate the additional noise from its hidden units. If this is not done, the samples produced by the TRBM are significantly worse. Unfortunately, the evaluation metric is entirely qualitative since computing the log probability on a test set is infeasible for both the TRBM and the RTRBM. We provide the code for our experiments in [URL]. Figure 3: This figure shows the receptive fields of the first 36 hidden units of the RTRBM on the left, and the corresponding hidden-to-hidden weights between these units on the right: the ith row on the right corresponds to the ith receptive field on the left, when counted left-to-right. Hidden units 18 and 19 exhibit unusually strong hidden-to-hidden connections; they are also the ones with the weakest visible-hidden connections, which effectively makes them belong to another hidden layer. 5.1 Videos of bouncing balls We used a dataset consisting of videos of 3 balls bouncing in a box. The videos are of length 100 and of resolution 30×30. Each training example is synthetically generated, so no training sequence is seen twice by the model which means that overfitting is highly unlikely. The task is to learn to generate videos at the pixel level. This problem is high-dimensional, having 900 dimensions per frame, and the RTRBM and the TRBM are given no prior knowledge about the nature of the task (e.g., by convolutional weight matrices). Both the RTRBM and the TRBM had 400 hidden units. Samples from these models are provided as videos 1,2 (RTRBM) and videos 3,4 (TRBM). A sample training sequence is given in video 5. All the samples can be found in [URL]. The real-values in the videos are the conditional probabilities of the pixels [13]. The RTRBM’s samples are noticeably better than the TRBM’s samples; a key difference between these samples is that the balls produced by the TRBM moved in a random walk, while those produced by the RTRBM moved in a more persistent direction. An examination of the visible to hidden connection weights of the RTRBM reveals a number of hidden units that are not connected to visible units. These units have the most active hidden to hidden connections, which must be used to propagate information through time. In particular, these units are the only units that do not have a strong self connection (i.e., W ′ i,i is not large; see figure 3). No such separation of units is found in the TRBM and all its hidden units have large visible to hidden connections. 5.2 Motion capture data We used a dataset that represents human motion capture data by sequences of joint angle, translations, and rotations of the base of the spine [14]. The total number of frames in the dataset set was 3000, from which the model learned on subsequences of length 50. Each frame has 49 dimensions, and both models have 200 hidden units. The data is real-valued, so the TRBM and the RTRBM were adapted to have Gaussian visible variables using equation 2. The samples produced by the RTRBM exhibit less sticking and foot-skate than those produced by the TRBM; samples from these models are provided as videos 6,7 (RTRBM) and videos 8,9 (TRBM); video 10 is a sample training sequence. Part of the Gaussian noise was removed in a manner described in [14] in both models. 5.3 Details of the learning procedures Each problem was trained for 100,000 weight updates, with a momentum of 0.9, where the gradient was normalized by the length of the sequence for each gradient computation. The weights are updated after computing the gradient on a single sequence. The learning starts with CD10 for the first 1000 weight updates, which is then switched to CD25. The visible to hidden weights, W, were initialized with static CD5 (without using the (R)TRBM learning rules) on 30 sequences (which resulted in 30 weight updates) with learning rate of 0.01 and momentum 0.9. These weights were then given to the (R)TRBM learning procedure, where the learning rate was linearly reduced towards 0. The weights W ′ and the biases were initialized with a sample from spherical Gaussian of standard-deviation 0.005. For the bouncing balls problem the initial learning rate was 0.01, and for the motion capture data it was 0.005. 6 Conclusions In this paper we introduced the RTRBM, which is a probabilistic model as powerful as the intractable TRBM that has an exact inference and an almost exact learning procedure. The common disadvantage of the RTRBM is that it is a recurrent neural network, a type of model known to have difficulties learning to use its hidden units to their full potential [2]. However, this disadvantage is common to many other probabilistic models, and it can be partially alleviated using techniques such as the long short term memory RNN [6]. Acknowledgments This research was partially supported by the Ontario Graduate Scholarship and by the Natural Council of Research and Engineering of Canada. The mocap data used in this project was obtained from http://people.csail.mit.edu/ehsu/work/sig05stf/. For Matlab playback of motion and generation of videos, we have adapted portions of Neil Lawrence’s motion capture toolbox (http://www.dcs.shef.ac.uk/∼neil/mocap/). References [1] A.J. Bell and T.J. Sejnowski. An Information-Maximization Approach to Blind Separation and Blind Deconvolution. Neural Computation, 7(6):1129–1159, 1995. [2] Y. Bengio, P. Simard, and P. Frasconi. Learning long-term dependencies with gradient descent is difficult. Neural Networks, IEEE Transactions on, 5(2):157–166, 1994. [3] G.E. Hinton. Training Products of Experts by Minimizing Contrastive Divergence. Neural Computation, 14(8):1771–1800, 2002. [4] G.E. Hinton, S. Osindero, and Y.W. Teh. A Fast Learning Algorithm for Deep Belief Nets. Neural Computation, 18(7):1527–1554, 2006. [5] G.E. Hinton and R.R. Salakhutdinov. Reducing the Dimensionality of Data with Neural Networks. Science, 313(5786):504–507, 2006. [6] S. Hochreiter and J. Schmidhuber. Long Short-Term Memory. Neural Computation, 9(8):1735–1780, 1997. [7] S. Osindero and G. Hinton. Modeling image patches with a directed hierarchy of Markov random fields. Advances Neural Information Processing Systems, 2008. [8] C. Peterson and J.R. Anderson. A mean field theory learning algorithm for neural networks. Complex Systems, 1(5):995–1019, 1987. [9] L.R. Rabiner. A tutorial on hidden Markov models and selected applications inspeech recognition. Proceedings of the IEEE, 77(2):257–286, 1989. [10] D.E. Rumelhart, G.E. Hinton, and R.J. Williams. Learning representations by back-propagating errors. Nature, 323(6088):533–536, 1986. [11] R. Salakhutdinov and I. Murray. On the quantitative analysis of deep belief networks. In Proceedings of the International Conference on Machine Learning, volume 25, 2008. [12] D. Sontag and T. Jaakkola. New Outer Bounds on the Marginal Polytope. Advances in Neural Information Processing Systems, 2008. [13] I. Sutskever and G.E. Hinton. Learning multilevel distributed representations for high-dimensional sequences. Proceeding of the Eleventh International Conference on Artificial Intelligence and Statistics, pages 544–551, 2007. [14] G.W. Taylor, G.E. Hinton, and S. Roweis. Modeling human motion using binary latent variables. Advances in Neural Information Processing Systems, 19:1345–1352, 2007. [15] T. Tieleman. Training restricted boltzmann machines using approximations to the likelihood gradient. In Proceedings of the International Conference on Machine Learning, volume 25, 2008. [16] M.J. Wainwright, T.S. Jaakkola, and A.S. Willsky. A new class of upper bounds on the log partition function. IEEE Transactions on Information Theory, 51(7):2313–2335, 2005. [17] M.J. Wainwright and M.I. Jordan. Graphical models, exponential families, and variational inference. UC Berkeley, Dept. of Statistics, Technical Report, 649, 2003. [18] M. Welling, M. Rosen-Zvi, and G. Hinton. Exponential family harmoniums with an application to information retrieval. Advances in Neural Information Processing Systems, 17:1481–1488, 2005. [19] J.S. Yedidia, W.T. Freeman, and Y. Weiss. Understanding belief propagation and its generalizations. Exploring Artificial Intelligence in the New Millennium, pages 239–236, 2003.
2008
154
3,403
Short-Term Depression in VLSI Stochastic Synapse Peng Xu, Timothy K. Horiuchi, and Pamela Abshire Department of Electrical and Computer Engineering, Institute for Systems Research University of Maryland, College Park, MD 20742 pxu,timmer,pabshire@umd.edu Abstract We report a compact realization of short-term depression (STD) in a VLSI stochastic synapse. The behavior of the circuit is based on a subtractive single release model of STD. Experimental results agree well with simulation and exhibit expected STD behavior: the transmitted spike train has negative autocorrelation and lower power spectral density at low frequencies which can remove redundancy in the input spike train, and the mean transmission probability is inversely proportional to the input spike rate which has been suggested as an automatic gain control mechanism in neural systems. The dynamic stochastic synapse could potentially be a powerful addition to existing deterministic VLSI spiking neural systems. 1 Introduction Synapses are the primary locations in neural systems where information is processed and transmitted. Synaptic transmission is a stochastic process by nature, i.e. it has been observed that at central synapses transmission proceeds in an all-or-none fashion with a certain probability. The synaptic weight has been modeled as R = npq [1], where n is the number of quantal release sites, p is the probability of release per site, and q is some measure of the postsynaptic effect. The synapse undergoes constant changes in order to learn from and adapt to the ever-changing outside world. The variety of synaptic plasticities differ in the triggering condition, time span, and involvement of preand postsynaptic activity. Regulation of the vesicle release probability has been considered as the underlying mechanism for various synaptic plasticities [1–3]. The stochastic nature of the neural computation has been investigated and the benefits of stochastic computation such as energy efficiency, communication efficiency, and computational efficiency have been shown [4–6]. Recently there is increasing interest in probabilistic modeling of brain functions [7]. VLSI stochastic synapse could provide a useful hardware tool to investigate stochastic nature of the synapse and also function as the basic computing unit for VLSI implementation of stochastic neural computation. Although adaptive deterministic VLSI synapses have been extensively studied and developed for neurally inspired VLSI learning systems [8–13], stochastic synapses have been difficult to implement in VLSI because it is hard to properly harness the probabilistic behavior, normally provided by noise. Although stochastic behavior in integrated circuits has been investigated in the context of random number generators (RNGs) [14], these circuits either are too complicated to use for a stochastic synapse or suffer from poor randomness. Therefore other approaches were explored to bring randomness into the systems. Stochastic transmission was implemented in software using a lookup table and a pseudo random number generator [15]. Stochastic transition between potentiation and depression has been demonstrated in bistable synapses driven by stochastic spiking behavior at the network level for stochastic learning [16]. Previously we reported the first VLSI stochastic synapse. Experimental results demonstrated true randomness as well as the adjustable transmission probability. The implementation with ∼15 transistors is compact for these added features, although there are much more compact deterministic synapses with as few as five transistors. We also proposed the method to implement plasticity and demonstrated the implementation of STD by modulating the probability of spike transmission. Like its deterministic counterpart, this stochastic synapse operates on individual spike train inputs; its stochastic character, however, creates the possibility of a broader range of computational primitives such as rate normalization of Poisson spike trains, probabilistic multiplication, or coincidence detection. In this paper we extend the subtractive single release model of STD to the VLSI stochastic synapse. We present the simulation of the new model. We describe a novel compact VLSI implementation of a stochastic synapse with STD and demonstrate extensive experimental results showing the agreement with both simulation and theory over a range of conditions and biases. 2 VLSI Stochastic Synapse and Plasticity Vdd2 Vi+ Vc VoVg+ VgVo+ M1 M2 M3 M4 Ibias M5 Vpre~ Vw Vp ViM7 M6 Vdd Vdd Vh Vw Vicm Vr Vicm Vr Vpre Vbias Vo+ VoC Vtran Figure 1: Schematic of the stochastic synapse with STD. Previously we demonstrated a compact stochastic synapse circuit exhibiting true randomness and consuming very little power (10-44 µW). The core of the structure is a clocked, cross-coupled differential pair comparator with input voltages Vi+ and Vi−, as shown in the dashed box in Fig. 1. It uses competition between two intrinsic circuit noise sources to generate random events. The differential design helps to reduce the influence from other noise sources. When a presynaptic spike arrives, Vpre∼goes low, and transistor M5 shuts off. Vo+ and Vo−are nearly equal and the circuit is in its metastable state. When the two sides are closely matched, the imbalance between Vo+ and Vo− caused by current noise in M1-M4 eventually triggers positive feedback, which drives one output to Vc and the other close to ground. We use a dynamic buffer, shown in the dotted box in Fig. 1, to generate rail-to-rail transmitted spikes Vtran. Vtran either goes high (with probability p) or stays low (with probability 1 −p) during an input spike, emulating stochastic transmission. Fabrication mismatch in an uncompensated stochastic synapse circuit would likely permanently bias the circuit to one solution. In this circuit, floating gate inputs to a pFET differential pair allow the mismatch to be compensated. By controlling the common-mode voltage of the floating gates, we operate the circuit such that hot-electron injection occurs only on the side where the output voltage is close to ground. Over multiple clock cycles hot-electron injection works in negative feedback to equalize the floating gate voltages, bringing the circuit into stochastic operation. The procedure can be halted to achieve a specific probability or allowed to reach equilibrium (50% transmission probability). The transmission probability can be adjusted by changing the input offset or the floating gate charges. The higher Vg+ is, the lower p is. The probability tuning function is closely fitted by an error function f(v) = 0.5 ³ 1 + erf ³ v−µ √ 2δ ´´ , where µ is the input offset voltage for p = 50%, δ is the standard deviation characterizing the spread of the probability tuning, and v = Vi−−Vi+ is the input offset voltage. Synaptic plasticity can be implemented by dynamically modulating the probability. Input offset modulation is suitable for short-term plasticity. Short-term depression is triggered by the transmitted input spikes Vtran to emulate the probability decrease because of vesicle depletion. Short-term facilitation is triggered by the input spikes Vpre to emulate the probability increase because of presynaptic Ca2+ accumulation. Nonvolatile storage at the floating gate is suitable for long-term plasticity. STDP can be implemented by modulating the probability depending on the precise timing relation between the pre- and postsynaptic spikes. 3 Short-Term Depression: Model and Simulation Although long-term plasticity has attracted much attention because of its apparent association with learning and memory, the functional role of short-term plasticity has only recently begun to be understood. Recent evidence suggests that short-term synaptic plasticity is involved in many functions such as gain control [17], phase shift [18], coincidence detection, and network reconfiguration [19]. It has also been shown that depressing stochastic synapses can increase information transmission efficiency by filtering out redundancy in presynaptic spike trains [5]. Activity dependent short-term changes in synaptic efficacy at the macroscopic level are determined by activity dependent changes in vesicle release probability at the microscopic level. We will focus on STD here. STD during repetitive stimulation results from a decrease in released vesicles. Since there is a finite pool of vesicles, and released vesicles cannot be replenished immediately, a successful release triggered by one spike potentially reduces the probability of release triggered by the next spike. We propose an STD model based on our VLSI stochastic synapse that closely emulates the simple subtractive single release model [5, 20]. A presynaptic spike that is transmitted reduces the input offset voltage v at the VLSI stochastic synapse by ∆v, so that the transmission probability p(t) is reduced. Between successful releases, v relaxes back to its maximum value vmax exponentially with a time constant τd so that p(t) relaxes back to its maximum value pmax as well. The model can be written as v(t+) = v(t−) −∆v, successful transmission at t (1) τd dv(t) dt = vmax −v(t) (2) p(t) = f(v(t)) (3) For an input spike train with Poisson arrivals, the model can be expressed as a stochastic differential equation dv = vmax −v τd dt −∆v · dNp·r(t) (4) where dNp·r(t) is a Poisson counting process with rate p · r(t), and r(t) is the input spike rate. By taking the expectation E(·) on both sides, we obtain a differential equation dE(v) dt = vmax −E(v) τd −∆v · E(p)r(t) (5) When v is reduced, the probability that it will be reduced again becomes smaller. v is effectively constrained to a small range where we can approximate the function f(v) = 0.5 ³ 1 + erf ³ v−µ √ 2δ ´´ by a linear function f(v) = av + 0.5, where µ = 0 for simplicity. We can then solve for E(p) at steady state: pss ≈avmax + 0.5 1 + a∆vτdr ≈ pmax a∆vτdr ∝1 r (6) Therefore the steady state mean probability is inversely proportional to the input spike rate when a∆vτdr ≫1. This is consistent with prior work that modeled STD at the macroscopic level [17]. We simulated the model (1)-(3). We use the function f(v) = 0.5 ³ 1 + erf ³ v √ 2·2.16 ´´ , obtained from the best fit of the experimental data. Initially v is set to 5 mV which sets pmax close to 1. Although the transformation from v to p is nonlinear, both simulation and experimental data show that this implementation exhibits behavior similar to the model with the linear approximation and the biological data. Fig. 2(a) and 2(b) show that the mean probability is a linear function of the inverse of the input spike rate at various ∆v and τd for high input spike rates. Both ∆v and τd affect the slope of the linear relation, following the trend suggested by (6): the bigger the ∆v or the bigger the τd, the smaller the slope is. Fig. 3 shows a simulation of the transient probability for a period of 200 ms. Fig. 4 shows that the output spike train exhibits negative autocorrelation at small time intervals and lower power spectral density (PSD) at low frequencies. This is a direct consequence of STD. 0 0.002 0.004 0.006 0.008 0.01 0 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 1/r p ∆v = 2 mV ∆v = 4 mV ∆v = 6 mV (a) ∆v = 2, 4, 6 mV, τd = 100 ms. 0 0.002 0.004 0.006 0.008 0.01 0 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 1/r p τd = 100 ms τd = 200 ms τd = 300 ms (b) τd = 100, 200, 300 ms, ∆v = 2 mV. Figure 2: Mean probability as a function of input spike rate from simulation. Data were collected at input rates from 100 Hz to 1000 Hz at 100 Hz intervals. The solid lines show the least mean square fit for input rates from 400 Hz to 1000 Hz. 0 20 40 60 80 100 120 140 160 180 200 0 0.1 0.2 0.3 0.4 0.5 0.6 Time (ms) p(t) Figure 3: Simulated probability trajectory over 200 ms period. r = 100 Hz, τ = 100 ms, ∆v = 2 mV. 0 10 20 30 40 50 −0.02 0 0.02 0.04 0.06 0.08 0.1 Intervals Autocorrelation (a) Autocorrelation. 0 10 20 30 40 50 −80 −60 −40 −20 0 20 Frequency (Hz) PSD (dB) (b) Power spectral density. Figure 4: Characterization of the output spike train from the simulation of the stochastic synapse with STD. r = 100 Hz, τd = 200 ms, ∆v = 6 mV, Vmax = 5 mV. 4 VLSI Implementation of Short-Term Depression We implemented this model using the stochastic synapse circuit described above (see Fig. 1). Both inputs are restored up to an equilibrium value Vicm by tunable resistors implemented by subthreshold pFETs operating in the ohmic region. To change the transmission probability we only need to modulate one side of the input, in this case Vi−. The resistor and capacitor provide for exponential recovery of the voltage to its equilibrium value. The input Vi−is modulated by transistors M6 and M7 based on the result of the previous spike transmission. Every time a spike is transmitted successfully, a pulse with height Vh and width Tp is generated at Vp. Tp is same as the input spike pulse width. This pulse discharges the capacitor with a small current determined by Vw and reduces Vi−by a small amount, thus decreasing the transmission probability. The value of the tunable resistors is controlled by the gate voltage of the pFETs, Vr. When Vi−is reduced, the probability that it will be reduced again becomes smaller. Since the probability tuning only occurs in a small voltage range (∼10 mV), the change in Vi−is limited to this small range as well. Under this special condition, the resistance implemented by the subthreshold pFET is linear and large (∼ GΩ). With capacitance as small as 100 fF, the exponential time constant is tens of milliseconds and is adjustable. Similar control circuits can be applied to Vi+ to implement short-term facilitation. The update mechanism would then be driven by the presynaptic spike rather than the successfully transmitted spike. The extra components on the left provide for future implementation of short-term facilitation and also symmetrize the stochastic synapse, improving its randomness. 5 Experimental Results The circuit has been fabricated in a commercially-available 0.5 µm CMOS process with 2 polysilicon layers and 3 metal layers. The layout size of the stochastic synapse is 151.9 µm × 91.7 µm and the layout size of the STD block is 35 µm × 32.2 µm. A 2-to-1 multiplexer with size 35 µm × 30 µm is used to enable or disable STD. As a proof of concept, the layout of the circuit is quite conservative. Assuming no loss of performance, the existing circuit area could be reduced by 50%. The circuit uses a nominal power supply of 5 V for normal operation. The differential pair comparator uses a separate power supply for hot-electron injection. Each floating-gate pFET has a tunnelling structure, which is a source-drain connected pFET with its gate connected to the floating node. A separate power supply provides the tunnelling voltage to the shorted source and drain (tunnelling node). When the tunnelling voltage is high enough (∼14-15 V), electron tunnels through the silicon dioxide, from the floating gate to the tunnelling node. We use this phenomenon to remove electrons from the floating gate only during initialization. Alternatively Ultra-Violet (UV) activated conductances may be used to remove electrons from the gate to avoid the need for special power supplies. To begin the test, we first remove residual charges on the floating gates in the stochastic synapse. We set Vicm = 2 V. We raise the power supply of the differential pair comparator to 5.3 V to facilitate the hot-electron injection. We use the negative feedback operation of hot-electron injection described above to automatically program the circuit into its stochastic regime. We halt the injection by lowering the power supply to 5 V. During this procedure, STD is disabled, so that the probability at this operating point is the synaptic transmission probability without any dynamics. We then enable STD. We use a signal generator to generate pulse signals which serve as input spikes. Although spike trains are better modeled by Poisson arrivals, the averaging behavior should be similar for deterministic spike trains which make testing easier. We use Ibias = 100 nA. The power consumption of the STD block is much smaller than the stochastic synapse. The total power consumption is about 10 µW. We collect output spikes from the depressing stochastic synapse at an input spike rate of 100 Hz. We divide time into bins according to the input spike rate so that in each bin there is either 1 or 0 output spike. In this way, we convert the output spike train into a bit sequence s(k). We then compute the normalized autocorrelation, defined as A(n) = E(s(k)s(k + n)) −E2(s(k)), where n is the number of time intervals between two bits. A(0) gives the variance of the sequence. For two bits with distance n > 0, A(n) = 0 if they are independent, indicating good randomness, and A(n) < 0 if they are anticorrelated, indicating the depressing effect of preceding spikes on the later spikes. Fig. 5 shows the autocorrelation of the output spike trains at two different Vr. There is significant negative correlation at small time intervals and little correlation at large time intervals, as expected from STD. Fig. 6 shows the PSD of the output spike trains from the same data shown in Fig. 5. Clearly, the PSD is reduced at low frequencies. The time constant of STD increases with Vr so that the larger Vr is, the longer the period of the negative autocorrelation is and the lower the frequencies where power is reduced. This agrees with simulation results. Notice that the autocorrelation and PSD for Vr = 1.59 V show very close similarity to the simulation results in Fig. 4. Normally redundant information is represented by positive autocorrelation in the time domain, which is characterized by power at low frequencies. By reducing the low frequency component of the spike train, redundant information is suppressed and overall information transmission efficiency is improved. If the negative autocorrelation of the synaptic dynamics matches the positive autocorrelation in the input spike train, the redundancy is cancelled and the output is uncorrelated [5]. 0 10 20 30 40 50 −0.1 −0.05 0 0.05 0.1 0.15 0.2 0.25 Intervals Autocorrelation Vr = 1.56 V 0 10 20 30 40 50 −0.02 0 0.02 0.04 0.06 0.08 0.1 Intervals Autocorrelation Vr = 1.59 V Figure 5: Autocorrelation of output spike trains from the VLSI stochastic synapse with STD for an input spike rate of 100 Hz. Autocorrelation at zero time represents the sequence variance, and negative autocorrelation at short time intervals indicates STD. 0 10 20 30 40 50 −80 −60 −40 −20 0 20 Frequency (Hz) PSD (dB) Vr = 1.56 V 0 10 20 30 40 50 −80 −60 −40 −20 0 20 Frequency (Hz) PSD (dB) Vr = 1.59 V Figure 6: Power spectral density of output spike trains from the VLSI stochastic synapse with STD for an input spike rate of 100 Hz. Lower PSD at low frequencies indicates STD. We collect output spikes in response to 104 input spikes at input spike rates from 100 Hz to 1000 Hz with 100 Hz intervals. Fig. 7(a) shows that the mean transmission probability is inversely proportional to the input spike rate for various pulse widths when the rate is high enough. This matches the theoretical prediction in (6) very well. By scaling the probability with the input spike rate, the synapse tends to normalize the DC component of input frequency and preserve the neuron dynamic range, thus avoiding saturation due to fast firing presynaptic neurons and retaining sensitivity to less frequently firing neurons [17]. The slope of mean probability decreases as the pulse width increases. Since the pulse width determines the discharging time of the capacitor at Vi−, the larger the pulse width, the larger the ∆v is and the smaller the slope is. Fig. 7(b) shows that a∆vτd scales linearly with the pulse width. The discharging current is approximately constant, thus ∆v is proportional to the pulse width. 0 0.002 0.004 0.006 0.008 0.01 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 1/r p 10 us 20 us 30 us 40 us 50 us (a) Mean probability as a function of input spike rate for pulse width Tp =10, 20, 30, 40, 50 µs. Data were collected at input rates from 100 Hz to 1000 Hz at 100 Hz intervals. The dotted lines show the least mean square fit from 200 Hz to 1000 Hz. 10 20 30 40 50 0.01 0.02 0.03 0.04 Pulse width (µs) a∆v⋅τd (b) a∆vτd as a function of the pulse width. The dotted line shows the least mean square fit, f(x) = 0.0008x + 0.0017. Figure 7: Steady state behavior of VLSI stochastic synapse with STD for different pulse widths. We perform the same experiments for different Vr and Vw. As Vr increases, the slope of mean transmission probability as a linear function of 1 r decreases. This is due to the increasing τd = RC, where the equivalent resistance R from the pFET increases with Vr. Fig. 8(a) shows that a∆vτd is approximately an exponential function of Vr, indicating that the equivalent R of the pFET is approximately exponential to its gate voltage Vr. For Vw, the slope of mean transmission probability decreases as Vw increases. This is due to the increasing ∆v with Vw. Fig. 8(b) shows that a∆vτd is approximately an exponential function of Vw, indicating that the discharging current from the transistor M6 is approximately exponential to its gate voltage Vw. This matches the I-V characteristics of the MOSFET in subthreshold. 1.55 1.56 1.57 1.58 1.59 0.02 0.04 0.06 0.08 0.1 0.12 0.14 Vr (V) a∆v⋅τd (a) a∆vτd as a function of Vr. The dotted line shows the least mean square fit, f(x) = e(44.54x−72.87). 0.3 0.35 0.4 0.45 0.5 0 0.02 0.04 0.06 0.08 0.1 0.12 Vw (V) a∆v⋅τd (b) a∆vτd as a function of Vw. The dotted line shows the least mean square fit, f(x) = e(15.47x−9.854). Figure 8: The effect of biases Vr and Vw on the depressing behavior. 6 Conclusion We designed and tested a VLSI stochastic synapse with short-term depression. The behavior of the depressing synapse agrees with theoretical predictions and simulation. The strength and time duration of the depression can be tuned by the biases. The circuit is compact and consumes low power. It is a good candidate to bring randomness and rich dynamics into VLSI spiking neural systems, such as for rate-independent coincidence detection of Poisson spike trains. However, the application of such dynamic stochastic synapses in large networks still remains a challenge. References [1] C. Koch, Biophysics of Computation: Information Processing in Single Neurons. New York, NY: Oxford University Press, 1999. [2] M. V. Tsodyks and H. Markram, “The neural code between neocortical pyramidal neurons depends on neurotransmitter release probability,” Proc. Natl. Acad. Sci. USA, vol. 94, pp. 719– 723, 1997. [3] W. Senn, H. Markram, and M. Tsodyks, “An algorithm for modifying neurotransmitter release probability based on pre- and postsynaptic spike timing,” Neural Computation, vol. 13, pp. 35–67, 2000. [4] W. Maass and A. M. Zador, “Dynamic stochastic synapses as computational units,” Neural Comput., vol. 11, no. 4, pp. 903–917, 1999. [5] M. S. Goldman, P. Maldonado, and L. F. Abbott, “Redundancy reduction and sustained firing with stochastic depressing synapses,” J. Neurosci., vol. 22, no. 2, pp. 584–591, 2002. [6] W. B. Levy and R. A. Baxter, “Energy-efficient neuronal computation via quantal synaptic failures,” J. Neurosci., vol. 22, no. 11, pp. 4746–4755. [7] R. Rao, B. Olshausen, and M. Lewicki, Eds., Statistical Theories of the Brain. MIT Press, 2001. [8] C. Diorio, P. Hasler, B. A. Minch, and C. Mead, “A single-transistor silicon synapse,” IEEE Trans. Electron Devices, vol. 43, pp. 1972–1980, Nov. 1996. [9] P. H¨afliger and M. Mahowald, “Spike based normalizing Hebbian learning in an analog VLSI artificial neuron,” Int. J. Analog Integr. Circuits Signal Process., vol. 18, no. 2-3, pp. 133–139, 1999. [10] S.-C. Liu, “Analog VLSI circuits for short-term dynamic synapses,” EURASIP Journal on Applied Signal Processing, vol. 2003, pp. 620–628, 2003. [11] E. Chicca, G. Indiveri, and R. Douglas, “An adaptive silicon synapse,” in Proc. IEEE Int. Symp. Circuits Systems, vol. 1, Bangkok, Thailand, May 2003, pp. 81–84. [12] A. Bofill, A. F. Murray, and D. P. Thompson, “Circuits for VLSI implementation of temporally asymmetric Hebbian learning,” in Advances in Neural Information Processing Systems, S. B. T. G. Dietterich and Z. Ghahramani, Eds. Cambridge, MA, USA: MIT Press, 2002. [13] G. Indiveri, E. Chicca, and R. Douglas, “A VLSI array of low-power spiking neurons and bistable synapses with spike-timing dependent plasticity,” IEEE Trans. Neural Networks, vol. 17, pp. 211–221, 2006. [14] C. S. Petrie and J. A. Connelly, “A noise-based IC random number generator for applications in cryptography,” IEEE Trans. Circuits Syst. I, vol. 47, no. 5, pp. 615–621, May 2000. [15] D. H. Goldberg, G. Cauwenberghs, and A. G. Andreou, “Probabilistic synaptic weighting in a reconfigurable network of VLSI integrate-and-fire neurons,” Neural Networks, vol. 14, pp. 781–793, 2001. [16] S. Fusi, M. Annunziato, D. Badoni, A. Salamon, and D. J. Amit, “Spike driven synaptic plasticity: theory, simulation, VLSI implementation,” Neural Computation, vol. 12, pp. 2227–2258, 2000. [17] L. F. Abbott, J. A. Varela, K. Sen, and S. B. Nelson, “Synaptic depression and cortical gain control,” Science, vol. 275, pp. 220–224, 1997. [18] F. S. Chance, S. B. Nelson, and L. F. Abbott, “Synaptic depression and the temporal response characteristics of V1 cells,” J. Neurosci., vol. 18, no. 12, pp. 4785–4799, 1998. [19] F. Nadim and Y. Manor, “The role of short-term synaptic dynamics in motor control,” Curr. Opin. Neurobiol., vol. 10, pp. 683–690, Dec. 2000. [20] R. S. Zucker, “Short-term synaptic plasticity,” Ann. Rev. Neurosci., vol. 12, pp. 13–31, 1989.
2008
155
3,404
Generative and Discriminative Learning with Unknown Labeling Bias Miroslav Dud´ık Carnegie Mellon University 5000 Forbes Ave, Pittsburgh, PA 15213 mdudik@cmu.edu Steven J. Phillips AT&T Labs −Research 180 Park Ave, Florham Park, NJ 07932 phillips@research.att.com Abstract We apply robust Bayesian decision theory to improve both generative and discriminative learners under bias in class proportions in labeled training data, when the true class proportions are unknown. For the generative case, we derive an entropybased weighting that maximizes expected log likelihood under the worst-case true class proportions. For the discriminative case, we derive a multinomial logistic model that minimizes worst-case conditional log loss. We apply our theory to the modeling of species geographic distributions from presence data, an extreme case of labeling bias since there is no absence data. On a benchmark dataset, we find that entropy-based weighting offers an improvement over constant estimates of class proportions, consistently reducing log loss on unbiased test data. 1 Introduction In many real-world classification problems, it is not equally easy or affordable to verify membership in different classes. Thus, class proportions in labeled data may significantly differ from true class proportions. In an extreme case, labeled data for an entire class might be missing (for example, negative experimental results are typically not published). A naively trained learner may perform poorly on test data that is not similarly afflicted by labeling bias. Several techniques address labeling bias in the context of cost-sensitive learning and learning from imbalanced data [5, 11, 2]. If the labeling bias is known or can be estimated, and all classes appear in the training set, a model trained on biased data can be corrected by reweighting [5]. When the labeling bias is unknown, a model is often selected using threshold-independent analysis such as ROC curves [11]. A good ROC curve, however, does not guarantee a low loss on test data. Here, we are concerned with situations when the labeling bias is unknown and some classes may be missing, but we have access to unlabeled data. We want to construct models that in addition to good ROC-based performance, also yield low test loss. We will be concerned with minimizing joint and conditional log loss, or equivalently, maximizing joint and conditional log likelihood. Our work is motivated by the application of modeling species’ geographic distributions from occurrence data. The data consists of a set of locations within some region (for example, the Australian wet tropics) where a species (such as the golden bowerbird) was observed, and a set of features such as precipitation and temperature, describing environmental conditions at each location. Species distribution modeling suffers from extreme imbalance in training data: we often only have information about species presence (positive examples), but no information about species absence (negative examples). We do, however, have unlabeled data, obtained either by randomly sampling locations from the region [4], or pooling presence data for several species collected with similar methods to yield a representative sample of locations which biologists have surveyed [13]. Previous statistical methods for species distribution modeling can be divided into three main approaches. The first interprets all unlabeled data as examples of species absence and learns a rule to discriminate them from presences [19, 4]. The second embeds a discriminative learner in the EM algorithm in order to infer presences and absences in unlabeled data; this explicitly requires knowledge of true class probabilities [17]. The third models the presences alone, which is known in machine learning as one-class estimation [14, 7]. When using the first approach, the training data is commonly reweighted so that positive and negative examples have the same weight [4]; this models a quantity monotonically related to conditional probability of presence [13], with the relationship depending on true class probabilities. If we use y to denote the binary variable indicating presence and x to denote a location on the map, then the first two approaches yield models of conditional probability p(y = 1|x), given estimates of true class probabilities. On the other hand, the main instantiation of the third approach, maximum entropy density estimation (maxent) [14] yields a model of the distribution p(x|y = 1). To convert this to an estimate of p(y = 1|x) (as is usually required, and necessary for measuring conditional log loss on which we focus here) again requires knowledge of the class probabilities p(y = 1) and p(y = 0). Thus, existing discriminative approaches (the first and second) as well as generative approaches (the third) require estimates of true class probabilities. We apply robust Bayesian decision theory, which is closely related to the maximum entropy principle [6], to derive conditional probability estimates p(y | x) that perform well under a wide range of test distributions. Our approach can be used to derive robust estimates of class probabilities p(y) which are then used to reweight discriminative models or to convert generative models into discriminative ones. We present a treatment for the general multiclass problem, but our experiments focus on one-class estimation and species distribution modeling in particular. Using an extensive evaluation on real-world data, we show improvement in both generative and discriminative techniques. Throughout this paper we assume that the difficulty of uncovering the true class label depends on the class label y alone, but is independent of the example x. Even though this assumption is simplistic, we will see that our approach yields significant improvements. A related set of techniques estimates and corrects for the bias in sample selection, also known as covariate shift [9, 16, 18, 1, 13]. When the bias can be decomposed into an estimable and inestimable part, the right approach might be to use a combination of techniques presented in this paper and those for sample-selection bias. 2 Robust Bayesian Estimation with Unknown Class Probabilities Our goal is to estimate an unknown conditional distribution π(y | x), where x ∈X is an example and y ∈Y is a label. The input consists of labeled examples (x1, y1), . . . , (xm, ym) and unlabeled examples xm+1, . . . , xM. Each example x is described by a set of features fj : X →R, indexed by j ∈J. For simplicity, we assume that sets X, Y, and J are finite, but we would like to allow the space X and the set of features J to be very large. In species distribution modeling from occurrence data, the space X corresponds to locations on the map, features are various functions derived from the environmental variables, and the set Y contains two classes: presence (y = 1) and absence (y = 0) for a particular species. Labeled examples are presences of the species, e.g., recorded presence locations of the golden bowerbird, while unlabeled examples are locations that have been surveyed by biologists, but neither presence nor absence was recorded. The unlabeled examples can be obtained as presence locations of species observed by a similar protocol, for example other birds [13]. We posit a joint density π(x, y) and assume that examples are generated by the following process. First, a pair (x, y) is chosen according to π. We always get to see the example x, but the label y is revealed with an unknown probability that depends on y and is independent of x. This means that we have access to independent samples from π(x) and from π(x | y), but no information about π(y). In our example, species presence is revealed with an unknown fixed probability whereas absence is revealed with probability zero (i.e., never revealed). 2.1 Robust Bayesian Estimation, Maximum Entropy, and Logistic Regression Robust Bayesian decision theory formulates an estimation problem as a zero-sum game between a decision maker and nature [6]. In our case, the decision maker chooses an estimate p(x, y) while nature selects a joint density π(x, y). Using the available data, the decision maker forms a set P in which he believes nature’s choice lies, and tries to minimize worst-case loss under nature’s choice. In this paper we are interested in minimizing the worst-case log loss relative to a fixed default estimate ν (equivalently, maximizing the worst-case log likelihood ratio) min p∈∆max π∈P Eπ  ln p(X, Y ) ν(X, Y )  . (1) Here, ∆is the simplex of joint densities and Eπ is a shorthand for EX,Y ∼π. The default density ν represents any prior information we have about π; if we have no prior information, ν is typically the uniform density. Gr¨unwald and Dawid [6] show that the robust Bayesian problem (Eq. 1) is often equivalent to the minimum relative entropy problem min p∈P RE(p ∥ν) , (2) where RE(p ∥q) = Ep[ln(p(X, Y )/q(X, Y )] is relative entropy or Kullback-Leibler divergence and measures discrepancy between distributions p and q. The formulation intuitively says that we should choose the density p which is closest to ν while respecting constraints P. When ν is uniform, minimizing relative entropy is equivalent to maximizing entropy H(p) = Ep[−ln p(X, Y )]. Hence, the approach is mainly referred to as maximum entropy [10] or maxent for short. The next theorem outlines the equivalence of robust Bayes and maxent for the case considered in this paper. It is a special case of Theorem 6.4 of [6]. Theorem 1 (Equivalence of maxent and robust Bayes). Let X × Y be a finite sample space, ν a density on X × Y and P ⊆∆a closed convex set containing at least one density absolutely continuous w.r.t. ν . Then Eqs. (1) and (2) have the same optimizers. For the case without labeling bias, the set P is usually described in terms of equality constraints on moments of the joint distribution (feature expectations). Specifically, feature expectations with respect to p are required to equal their empirical averages. When features are functions of x, but the goal is to discriminate among classes y, it is natural to consider a derived set of features which are versions of fj(x) active solely in individual classes y (see for instance [8]). If we were to estimate the distribution of the golden bowerbird from presence-absence data then moment equality constraints require that the joint model p(x, y) match the average altitude of presence locations as well as the average altitude of absence locations (both weighted by their respective training proportions). When the number of samples is too small or the number of features too large then equality constraints lead to overfitting because the true distribution does not match empirical averages exactly. Overfitting is alleviated by relaxing the constraints so that feature expectations are only required to lie within a certain distance of sample averages [3]. The solution of Eq. (2) with equality or relaxed constraints can be shown to lie in an exponential family parameterized by λ = ⟨λy⟩y∈Y, λy ∈RJ, and containing densities qλ(x, y) ∝ν(x, y)eλy·f(x) . The optimizer of Eq. (2) is the unique density which minimizes the empirical log loss 1 m X i≤m ln qλ(xi, yi) (3) possibly with an additional ℓ1-regularization term accounting for slacks in equality constraints. (See [3] for a proof.) In addition to constraints on moments of the joint distribution, it is possible to introduce constraints on marginals of p. The most common implementations of maxent impose marginal constraints p(x) = ˜πlab(x) where ˜πlab is the empirical distribution over labeled examples. The solution then takes form qλ(x, y) = ˜πlab(x)qλ(y | x) where qλ(y | x) is the multinomial logistic model qλ(y | x) ∝ν(y | x)eλy·f(x) . As before, the maxent solution is the unique density of this form which minimizes the empirical log loss (Eq. 3). The minimization of Eq. (3) is equivalent to the minimization of conditional log loss 1 m X i≤m −ln qλ(yi | xi) . Hence, this approach corresponds to logistic regression. Since it only models the labeling process π(y | x), but not the sample generation π(x), it is known as discriminative training. The case with equality constraints p(y) = ˜πlab(y) has been analyzed for example by [8]. The solution has the form qλ(x, y) = ˜πlab(y)qλ(x | y) with qλ(x | y) ∝ν(x | y)eλy·f(x) . Log loss can be minimized for each class separately, i.e., each λy is the maximum likelihood estimate (possibly with regularization) of π(x | y). The joint estimate qλ(x, y) can be used to derive the conditional distribution qλ(y | x). Since this approach estimates the sample generating distributions of individual classes, it is known as generative training. Naive Bayes is a special case of generative training when ν(x | y) = Q j νj(fj(x) | y). The two approaches presented in this paper can be viewed as generalizations of generative and discriminative training with two additional components: availability of unlabeled examples and lack of information about class probabilities. The former will influence the choice of the default ν, the latter the form of constraints P. 2.2 Generative Training: Entropy-weighted Maxent When the number of labeled and unlabeled examples is sufficiently large, it is reasonable to assume that the empirical distribution ˜π(x) over all examples (labeled and unlabeled) is a faithful representation of π(x). Thus, we consider defaults with ν(x) = ˜π(x), shown to work well in species distribution modeling [13]. For simplicity, we assume that ν(y | x) does not depend on x and focus on ν(x, y) = ˜π(x)ν(y). Other options are possible. For example, when the number of examples is small, ˜π(x) might be replaced by an estimate of π(x). The distribution ν(y) can be chosen uniform across y, but if some classes are known to be rarer than others then a non-uniform estimate will perform better. In Section 3, we analyze the impact of this choice. Constraints on moments of the joint distribution, such as those in the previous section, will misspecify true moments in the presence of labeling bias. However, as discussed earlier, labeled examples from each class y approximate conditional distributions π(x | y). Thus, instead of constraining joint expectations, we constrain conditional expectations Ep[fj(X) | y]. In general, we consider robust Bayes and maxent problems with the set P of the form P = {p ∈∆: py X ∈Py X} where py X denotes the |X|-dimensional vector of conditional probabilities p(x | y) and Py X expresses the constraints on py X. For example, relaxed constraints for class y are expressed as ∀j : Ep[fj(X) | y] −˜µy j ≤βy j (4) where ˜µy j is the empirical average of fj among labeled examples in class y and βy j are estimates of deviations of averages from true expectations. Similar to [14], we use standard-error-like deviation estimates βy j = β˜σy j /√my where β is a single tuning constant, ˜σy j is the empirical standard deviation of fj among labeled examples in class y, and my is the number of labeled examples in class y. When my equals 0, we choose βy j = ∞and thus leave feature expectations unconstrained. The next theorem and the following corollary show that robust Bayes (and also maxent) with the constraint set P of the form above yield estimators similar to generative training. In addition to the notation py X for conditional densities, we use the notation pY and pX to denote vectors of marginal probabilities p(y) and p(x), respectively. For example, the empirical distribution over examples is denoted ˜πX. Theorem 2. Let Py X, y ∈Y be closed convex sets of densities over X and P = {p ∈∆: py X ∈Py X}. If P contains at least one density absolutely continuous w.r.t. ν then robust Bayes and maxent over P are equivalent. The solution ˆp has the form ˆp(y)ˆp(x | y) where class-conditional densities ˆpy X minimize RE(py X ∥˜πX) among py X ∈Py X and ˆp(y) ∝ν(y)e−RE(ˆpy X ∥˜πX) . (5) Proof. It is not too difficult to verify that the set P is a closed convex set of joint densities, so the equivalence of robust Bayes and maxent follows from Theorem 1. To prove the remainder, we rewrite the maxent objective as RE(p ∥ν) = RE(pY ∥νY) + X y p(y)RE(py X ∥˜πX) . Maxent problem is then equivalent to min pY h RE(pY ∥νY) + X y p(y) min py X∈Py X RE(py X ∥˜πX) i = min pY " X y p(y) ln p(y) ν(y) !! + X y p(y)RE(ˆpy X ∥˜πX) !# = min pY "X y p(y) ln p(y) ν(y)e−RE(ˆpy X ∥˜πX) !# = const. + min pY RE(pY ∥ˆpY) . Since RE(p ∥q) is minimized for p = q, we indeed obtain that for the minimizing p, pY = ˆpY. Theorem 2 generalizes to the case when in addition to constraining py X to lie in Py X, we also constrain pY to lie in a closed convex set PY. The solution then takes form p(y)ˆp(x | y) with ˆp(x | y) as in the theorem, but with p(y) minimizing RE(pY ∥ˆpY) subject to pY ∈PY. Unlike generative training without labeling bias, the class-conditional densities in the theorem above influence class probabilities. When sets Py X are specified using constraints of Eq. (4) then ˆp has a form derived from regularized maximum likelihood estimates in an exponential family (see, e.g., [3]): Corollary 3. If sets Py X are specified by inequality constraints of Eq. (4) then robust Bayes and maxent are equivalent. The class-conditional densities ˆp(x | y) of the solution take form qλ(x | y) ∝˜π(x)e ˆλ y·f(x) (6) and solve single-class regularized maximum likelihood problems min λy n X i:yi=y  −ln qλ(xi | y)  + my X j∈J βj|λy j | o . (7) One-class Estimation. In one-class estimation problems, there are two classes (0 and 1), but we only have access to labeled examples from one class (e.g., class 1). In species distribution modeling, we only have access to presence records of the species. Based on labeled examples, we derive a set of constraints on p(x | y = 1), but leave p(x | y = 0) unconstrained. By Theorem 2, ˆp(x | y = 1) then solves the single-class maximum entropy problem, we write ˆp(x | y = 1) = ˆpME(x), and ˆp(x | y = 0) = ˜π(x). Assume without loss of generality that examples x1, . . . , xM are distinct (but allow them to have identical feature vectors). Thus, ˜π(x) = 1/M on examples and zero elsewhere, and RE(ˆpME ∥˜πX) = −H(ˆpME) + ln M. Plugging these into Theorem 2, we can derive the conditional estimate ˆp(y = 1 | x) across all unlabeled examples x: ˆp(y = 1 | x) = ν(y = 1)ˆpME(x)eH(ˆpME) ν(y = 0) + ν(y = 1)ˆpME(x)eH(ˆpME) . (8) If constraints on p(x | y = 1) are chosen as in Corollary 3 then ˆpME is exponential and Eq. (8) thus describes a logistic model. This model has the same coefficients as ˆpME, with the intercept chosen so that “typical” examples x under ˆpME (examples with log probability close to the expected log probability) yield predictions close to the default. 2.3 Discriminative Training: Class-robust Logistic Regression Similar to the previous section, we consider ν(x, y) = ˜π(x)ν(y). The set of constraints P will now also include equality constraints on p(x). Since ˜πlab(x) misspecifies the marginal, we use p(x) = ˜π(x). Next theorem is an analog of Corollary 3 for discriminative training. It follows from a combination of Theorem 1 and duality of maxent with maximum likelihood [3]. A complete proof will appear in the extended version of this paper. Theorem 4. Assume that sets Py X are specified by inequality constraints of Eq. (4). Let P = {p ∈ ∆: py X ∈Py X and pX = ˜πX}. If the set P is non-empty then robust Bayes and maxent over P are equivalent. For the solution ˆp, ˆp(x) = ˜π(x) and ˆp(y | x) takes form qλ(y | x) ∝ν(y)e λy·f(x)−λy·˜µy+P j βy j |λy j | (9) and solves the regularized “logistic regression” problem min λ ( 1 M X i≤M X y∈Y h −¯π(y | xi) ln qλ(y | xi) i + X y∈Y ¯π(y) X j∈J h βy j λy j + (¯µy j −˜µy j)λy j i) . (10) where ¯π is an arbitrary feasible point, ¯π ∈P, and ¯µy j its class-conditional feature expectations. We put logistic regression in quotes, because the model described by Eq. (9) is not the usual logistic model; however, once the parameters λy are fixed, Eq. (9) simply determines a logistic model with a special form of the intercept. Note that the second term of Eq. (10) is indeed a regularization, albeit possibly an asymmetric one, since any feasible ¯π will have |¯µy j −˜µy j| ≤βy j . Since ¯π(x) = ˜π(x), ¯π is specified solely by ¯π(y | x) and thus can be viewed as a tentative imputation of labels across all examples. We remark that the value of the objective of Eq. (10) does not depend on the choice of ¯π, because a different choice of ¯π (influencing the first term) yields a different set of means ¯µy j (influencing the second term) and these differences cancel out. To provide a more concrete example and some intuition about Eq. (10), we now consider one-class estimation. One-class estimation. A natural choice of ¯π is the “pseudo-empirical” distribution which views all unlabeled examples as negatives. Pseudo-empirical means of class 1 match empirical averages of class 1 exactly, whereas pseudo-empirical means of class 0 can be arbitrary because they are unconstrained. The lack of constraints on class 0 forces the corresponding λy to equal zero. The objective can thus be formulated solely using λy for the class 1; therefore, we will omit the superscript y. Eq. (10) after multiplying by M then becomes min λ (X i≤m  −ln qλ(y = 1 | xi)  + X m<i≤M  −ln qλ(y = 0 | xi)  + m X j∈J βj|λj| ) . Thus the objective of class-robust logistic regression is the same as of regularized logistic regression discriminating positives from unlabeled examples. 3 Experiments We evaluate our techniques using a large real-world dataset containing 226 species from 6 regions of the world, produced by the “Testing alternative methodologies for modeling species’ ecological niches and predicting geographic distributions” Working Group at the National Center for Ecological Analysis and Synthesis (NCEAS). The training set contains presence-only data from unplanned surveys or incidental records, including those from museums and herbariums. The test set contains presence-absence data from rigorously planned independent surveys (i.e., without labeling bias). The regions are described by 11–13 environmental variables, with 20–54 species per region, 2–5822 training presences per species (median of 57), and 102–19120 test points (presences and absences); for details see [4]. As unlabeled examples we use presences of species captured by similar methods, known as “target group”, with the groups as in [13]. We evaluate both entropy-weighted maxent and class-robust logistic regression while varying the default estimate ν(y = 1), referred to as default species prevalence by analogy with p(y = 1), which is called species prevalence. Entropy-weighted maxent solutions for different default prevalences are derived by Eq. (8) from the same one-class estimate ˆpME. Class-robust logistic regression requires separate optimization for each default prevalence. We calculate ˆpME using the Maxent package [15] with features spanning the space of piecewise linear splines (of each environmental variable separately) and a tuned value of β (see [12] for the details on features and tuning). Class-robust logistic models are calculated by a boosting-like algorithm SUMMET [3] with the same set of features and the same value β as the maxent runs. For comparison, we also evaluate default-weighted maxent, using class probabilities p(y) = ν(y) instead of Eq. (5), and two “oracle” methods based on class probabilities in the test data: constant Bernoulli prediction p(y | x) = π(y), and oracle-weighted maxent, using p(y) = π(y) instead of Eq. (5). Note that the constant Bernoulli prediction has no discrimination power (its AUC is 0.5) even though it matches class probabilities perfectly. 0 0.2 0.4 0.05 0.1 0.15 0.2 0 0.2 0.4 0.25 0.3 0.35 0.2 0.4 0.6 0.55 0.6 0.65 0 0.2 0.4 0.6 0.3 0.35 0.4 default prevalence average test log loss maxent weighted by default prevalence Bernoulli according to test prevalence (oracle setting) maxent weighted by default*exp{−RE} maxent weighted by test prevalence (oracle setting) species with test prev. 0.00−0.04 species with test prev. 0.04−0.15 species with test prev. 0.15−0.70 all species 0.05 0.1 0.15 0.2 0 0.2 0.4 0.25 0.3 0.35 0 0.2 0.4 0.55 0.6 0.65 0 0.2 0.4 0.3 0.35 0.4 0 0.2 0.4 test log loss range of default prev. values achieving given test loss maxent weighted by default prevalence class−robust logistic regression maxent weighted by default*exp{−RE} BRT reweighted by default prevalence Bernoulli according to test prevalence (oracle setting) BRT reweighted by default*exp{−RE} maxent weighted by test prevalence (oracle setting) species with test prev. 0.00−0.04 species with test prev. 0.04−0.15 species with test prev. 0.15−0.70 all species species with test prev. 0.00−0.04 species with test prev. 0.04−0.15 species with test prev. 0.15−0.70 all species species with test prev. 0.00−0.04 species with test prev. 0.04−0.15 species with test prev. 0.15−0.70 all species Figure 1: Comparison of reweighting schemes. Top: Test log loss averaged over species with given values of test prevalence, for varying default prevalence. Bottom: For each value of test log loss, we determine the range of default prevalence values that achieve it. To test entropy-weighting as a general method for estimating class probabilities, we also evaluate boosted regression trees (BRT), which have the highest predictive accuracy along with maxent among species distribution modeling techniques [4]. In this application, BRT is used to construct a logistic model discriminating positive examples from unlabeled examples. Recent work [17] uses a more principled approach where unknown labels are fitted by an EM algorithm, but our preliminary runs had too low AUC values, so they are excluded from our comparison. We train BRT using the R package gbm on datasets weighted so that the total weight of positives is equal to the total weight of unlabeled examples, and then apply Elkan’s reweighting scheme [5]. Specifically, the BRT result ˆpBRT(y | x) is transformed to p(y = 1 | x) = p(y = 1)ˆpBRT(y = 1 | x) p(y = 1)ˆpBRT(y = 1 | x) + p(y = 0)ˆpBRT(y = 0 | x) for two choices of p(y): default, p(y) = ν(y), and entropy-based (using ˆpME). All three techniques yield state-of-the-art discrimination (see [13]) measured by the average AUC: maxent achieves AUC of 0.7583; class-robust logistic regression 0.7451–0.7568; BRT 0.7545. Unlike maxent and BRT estimates, class-robust logistic estimates are not monotonically related, so they yield different AUC for different default prevalence. However, log loss performance varies broadly according to the reweighting scheme. In the top portion of Fig. 1, we focus on maxent. Naive weighting by default prevalence yields sharp peaks in performance around the best default prevalence. Entropy-based weighting yields broader peaks, so it is less sensitive to the default prevalence. The improvement diminishes as the true prevalence increases, but entropy-based weighting is never more sensitive. Thanks to smaller sensitivity, entropy-based weighting outperforms naive weighting when a single default needs to be chosen for all species (the rightmost plot). Note that the optimal default values are higher for entropy-based weighting, because in one-class estimation the entropy-based prevalence is always smaller than default (unless the estimate ˆpME is uniform). Improved sensitivity is demonstrated more clearly in the bottom portion of Fig. 1, now also including BRT and class-robust logistic regression. We see that BRT and maxent results are fairly similar, with BRT performing overall slightly better than maxent. Note that entropy-reweighted BRT relies both on BRT and maxent for its performance. A striking observation is the poor performance of classrobust logistic regression for species with larger prevalence values; it merits further investigation. 4 Conclusion and Discussion To correct for unknown labeling bias in training data, we used robust Bayesian decision theory and developed generative and discriminative approaches that optimize log loss under worst-case true class proportions. We found that our approaches improve test performance on a benchmark dataset for species distribution modeling, a one-class application with extreme labeling bias. Acknowledgments. We would like to thank all of those who provided data used here: A. Ford, CSIRO Atherton, Australia; M. Peck and G. Peck, Royal Ontario Museum; M. Cadman, Bird Studies Canada, Canadian Wildlife Service of Environment Canada; the National Vegetation Survey Databank and the Allan Herbarium, New Zealand; Missouri Botanical Garden, especially R. Magill and T. Consiglio; and T. Wohlgemuth and U. Braendi, WSL Switzerland. References [1] Bickel, S., M. Br¨uckner, and T. Scheffer (2007). Discriminative learning for differing training and test distributions. In Proc. 24th Int. Conf. Machine Learning, pp. 161–168. [2] Chawla, N. V., N. Japkowicz, and A. Kołcz (2004). Editorial: special issue on learning from imbalanced data sets. SIGKDD Explorations 6(1), 1–6. [3] Dud´ık, M., S. J. Phillips, and R. E. Schapire (2007). Maximum entropy density estimation with generalized regularization and an application to species distribution modeling. J. Machine Learning Res. 8, 1217–1260. [4] Elith, J., C. H. Graham, et al. (2006). Novel methods improve prediction of species’ distributions from occurrence data. Ecography 29(2), 129–151. [5] Elkan, C. (2001). The foundations of cost-sensitive learning. In Proc. 17th Int. Joint Conf. on Artificial Intelligence, pp. 973–978. [6] Gr¨unwald, P. D. and A. P. Dawid (2004). Game theory, maximum entropy, minimum discrepancy, and robust Bayesian decision theory. Ann. Stat. 32(4), 1367–1433. [7] Guo, Q., M. Kelly, and C. H. Graham (2005). Support vector machines for predicting distribution of Sudden Oak Death in California. Ecol. Model. 182, 75–90. [8] Haffner, P., S. Phillips, and R. Schapire (2005). Efficient multiclass implementations of L1-regularized maximum entropy. E-print arXiv:cs/0506101. [9] Heckman, J. J. (1979). Sample selection bias as a specification error. Econometrica 47(1), 153–161. [10] Jaynes, E. T. (1957). Information theory and statistical mechanics. Phys. Rev. 106(4), 620–630. [11] Maloof, M. (2003). Learning when data sets are imbalanced and costs are unequal and unknown. In Proc. ICML’03 Workshop on Learning from Imbalanced Data Sets. [12] Phillips, S. J. and M. Dud´ık (2008). Modeling of species distributions with Maxent: new extensions and a comprehensive evaluation. Ecography 31(2), 161–175. [13] Phillips, S. J., M. Dud´ık, J. Elith, C. H. Graham, A. Lehmann, J. Leathwick, and S. Ferrier. Sample selection bias and presence-only models of species distributions: Implications for selection of background and pseudo-absences. Ecol. Appl. To appear. [14] Phillips, S. J., M. Dud´ık, and R. E. Schapire (2004). A maximum entropy approach to species distribution modeling. In Proc. 21st Int. Conf. Machine Learning, pp. 655–662. ACM Press. [15] Phillips, S. J., M. Dud´ık, and R. E. Schapire (2007). Maxent software for species habitat modeling. http:// www.cs.princeton.edu/∼schapire/maxent. [16] Shimodaira, H. (2000). Improving predictive inference under covariate shift by weighting the log-likelihood function. J. Stat. Plan. Infer. 90(2), 227–244. [17] Ward, G., T. Hastie, S. Barry, J. Elith, and J. Leathwick (2008). Presence-only data and the EM algorithm. Biometrics. In press. [18] Zadrozny, B. (2004). Learning and evaluating classifiers under sample selection bias. In Proc. 21st Int. Conf. Machine Learning, pp. 903–910. ACM Press. [19] Zaniewski, A. E., A. Lehmann, and J. M. Overton (2002). Predicting species spatial distributions using presence-only data: A case study of native New Zealand ferns. Ecol. Model. 157, 261–280.
2008
156
3,405
Large Margin Taxonomy Embedding with an Application to Document Categorization Kilian Weinberger Yahoo! Research kilian@yahoo-inc.com Olivier Chapelle Yahoo! Research chap@yahoo-inc.com Abstract Applications of multi-class classification, such as document categorization, often appear in cost-sensitive settings. Recent work has significantly improved the state of the art by moving beyond “flat” classification through incorporation of class hierarchies [4]. We present a novel algorithm that goes beyond hierarchical classification and estimates the latent semantic space that underlies the class hierarchy. In this space, each class is represented by a prototype and classification is done with the simple nearest neighbor rule. The optimization of the semantic space incorporates large margin constraints that ensure that for each instance the correct class prototype is closer than any other. We show that our optimization is convex and can be solved efficiently for large data sets. Experiments on the OHSUMED medical journal data base yield state-of-the-art results on topic categorization. 1 Introduction Multi-class classification is a problem that arises in many applications of machine learning. In many cases the cost of misclassification varies strongly between classes. For example, in the context of object recognition it may be significantly worse to misclassify a male pedestrian as a traffic light than as a female pedestrian. Similarly, in the context of document categorization it seems more severe to misclassify a medical journal on heart attack as a publication on athlete’s foot than on Coronary artery disease. Although the scope of the proposed method is by no means limited to text data and topic hierarchies, for improved clarity we will restrict ourselves to terminology from document categorization throughout this paper. The most common approach to document categorization is to reduce the problem to a “flat” classification problem [13]. However, it is often the case that the topics are not just discrete classes, but are nodes in a complex taxonomy with rich inter-topic relationships. For example, web pages can be categorized into the Yahoo! web taxonomy or medical journals can be categorized into the Medical Subject Headings (MeSH) taxonomy. Moving beyond flat classification to settings that utilize these hierarchical representations of topics has significantly pushed the state-of-the art [4, 15]. Additional information about inter-topic relationships can for example be leveraged through cost-sensitive decision boundaries or knowledge sharing between documents from closely related classes. In reality, however, the topic taxonomy is a crude approximation of topic relations, created by an editor with knowledge of the true underlying semantic space of topics. In this paper we propose a method that moves beyond hierarchical presentations and aims to re-discover the continuous latent semantic space underlying the topic taxonomy. Instead of regarding document categorization as classification, we will think of it as a regression problem where new documents are mapped into this latent semantic topic space. Very different from approaches like LSI or LDA [1, 7], our algorithm is entirely supervised and explicitly embeds the topic taxonomy and the documents into a single latent semantic space with “semantically meaningful” Euclidean distances. 1 Topic taxonomy Low dimensional semantic space High dimensional input space W P class prototypes embedded inputs ⃗xi ⃗pα original inputs W⃗xi arthritis heart attack stroke pneumonia F X T Figure 1: A schematic layout of our taxem method (for Taxonomy Embedding). The classes are embedded as prototypes inside the semantic space. The input documents are mapped into the same space, placed closest to their topic prototypes. In this paper we derive a method to embed the taxonomy of topics into a latent semantic space in form of topic prototypes. A new document can be classified by first mapping it into this space and then assigning the label of the closest prototype. A key contribution of our paper is the derivation of a convex problem that learns the regressor for the documents and the placement of the prototypes in a single optimization. In particular, it places the topic prototypes such that for each document the prototype of the correct topic is much closer than any other prototype by a large margin. We show that this optimization is a special instance of semi-definite programs [2], that can be solved efficiently [16] for large data sets. Our paper is structured as follows: In section 2 we introduce necessary notation and a first version of the algorithm based on a two-step approach of first embedding the hierarchical taxonomy into a semantic space and then regressing the input documents close to their respective topic prototypes. In section 3 we extend our model to a single optimization that learns both steps in one convex optimization with large margin constraints. We evaluate our method in section 4 and demonstrate state-of-the-art results on eight different document categorization tasks from the OHSUMED medical journal data set. Finally, we relate our method to previous work in section 5 and conclude in section 6. 2 Method We assume that our input consists of documents, represented as a set of high dimensional sparse vectors ⃗x1, . . . , ⃗xn ∈X of dimensionality d. Typically, these could be binary bag of words indicators or tfidf scores. In addition, the documents are accompanied by single topic labels y1, . . . , yn ∈{1, . . . , c} that lie in some taxonomy T with c total topics. This taxonomy T gives rise to some cost matrix C ∈Rc×c, where Cαβ ≥0 defines the cost of misclassifying an element of topic α as β and Cαα = 0. Technically, we only require knowledge of the cost matrix C, which could also be obtained from side-information independent of a topic taxonomy. In this paper we will not focus on how C is obtained. However, we would like to point out that a common way to infer a cost matrix from a taxonomy is to set Cαβ to the length of the shortest path between node α and β, but other approaches have also been studied [3]. Throughout this paper we denote document indices as i, j ∈{1, . . . , n} and topic indices as α, β ∈{1, . . . , c}. Matrices are written in bold (e.g. C) and vectors have top arrows (e.g. ⃗xi). Figure 1 illustrates our setup schematically. We would like to create a low dimensional semantic feature space F in which we represent each topic α as a topic prototype ⃗pα ∈F and each document ⃗xi ∈X as a low dimensional vector ⃗zi ∈F. Our goal is to discover a representation of the data where distances reflect true underlying dissimilarities and proximity to prototypes indicates topic membership. In other words, documents on the same or related topics should be close to the respective topic prototypes, documents on highly different topics should be well separated. 2 Throughout this paper we will assume that F = Rc, however our method can easily be adapted to even lower dimensional settings F = Rr where r < c. As an essential part of our method is to embed the classes that are typically found in a taxonomy, we refer to our algorithm as taxem (short for “taxonomy embedding”). Embedding topic prototypes The first step of our algorithm is to embed the document taxonomy into a Euclidean vector space. More formally, we derive topic prototypes ⃗p1, . . . , ⃗pc ∈F based on the cost matrix C, where ⃗pα is the prototype that represents topic α. To simplify notation, we define the matrix P = [⃗p1, . . . , ⃗pc] ∈Rc×c whose columns consist of the topic prototypes. There are many ways to derive the prototypes from the cost matrix C. By far the simplest method is to ignore the cost matrix C entirely and let PI = I, where I ∈Rc×c denotes the identity matrix. This results in a c dimensional feature space, where the class-prototypes are all in distance √ 2 from each other at the corner of a c-dimensional simplex. We will refer to PI as the simplex prototypes. Better results can be expected when the prototypes of similar topics are closer than those of dissimilar topics. We use the cost matrix C as an estimate of dissimilarity and aim to place the prototypes such that the distance ∥⃗pα −⃗pβ∥2 2 reflects the cost specified in C2 αβ. More formally, we set Pmds = argminP c ! α,β=1 (∥⃗pα −⃗pβ∥2 2 −(Cαβ)2)2. (1) If the cost matrix C defines Euclidean distances (e.g. when the cost is obtained through the shortest path between nodes), we can solve eq. (1) with metric multi-dimensional scaling [5]. Let us denote ¯C = −1 2HCH, where the centering matrix H is defined as H = I −1 c11⊤, and let its eigenvector decomposition be ¯C = VΛV⊤. We obtain the solution by setting Pmds = √ ΛV. We will refer to Pmds as the mds prototypes.1 Both prototypes embeddings PI and Pmds are still independent of the input data {⃗xi}. Before we can derive a more sophisticated method to place the prototypes with large margin constraints on the document vectors, we will briefly describe the mapping W : X →F of the input documents into the low dimensional feature space F. Document regression Assume for now that we have found a suitable embedding P of the class-prototypes. We need to find an appropriate mapping W : X →F, that maps each input ⃗xi with label yi as close as possible to its topic prototype ⃗pyi. We can find such a linear transformation ⃗zi = W⃗xi by setting W = argminW ! i ∥⃗pyi −W⃗xi∥2 + λ∥W∥2 F . (2) Here, λ is the weight of the regularization of W, which is necessary to prevent potential overfitting due to the high number of parameters in W. The minimization in eq. (2) is an instance of linear ridge regression and has the closed form solution W = PJX⊤(XX⊤+ λI)−1, (3) where X = [⃗x1, . . . ⃗xn] and J ∈{0, 1}c×n, with Jαi = 1 if and only if yi = α. Please note that eq. (3) can be solved very accurately without the need to ever compute the d × d matrix inverse (XX⊤+ λI)−1 explicitly, by solving with linear conjugate gradient for each row of W independently. Inference Given an input vector ⃗xt we first map it into F and estimate its label as the topic with the closest prototype ⃗pα ˆyt = argminα∥⃗pα −W⃗xt∥2. (4) 1If ¯C does not contain Euclidean distances one can use the common approximation of forcing negative eigenvalues in Λ to zero and thereby fall back onto the projection of C onto the cone of positive semi-definite matrices. 3 Topic taxonomy Low dimensional semantic space High dimensional input space ⃗xi ⃗eyi class prototypes embedded inputs A I Rd Rc P large margin Rc F ⃗x′ i ⃗zi yi ⃗pyi ⃗pα X T α ⃗eα Figure 2: The schematic layout of the large-margin embedding of the taxonomy and the documents. As a first step, we represent topic α as the vector ⃗eα and document ⃗xi as ⃗x′ i = A⃗xi. We then learn the matrix P whose columns are the prototypes ⃗pα = P⃗eα and which defines the final transformation of the documents ⃗zi = P⃗x′ i. This final transformation is learned such that the correct prototype ⃗pyi is closer to ⃗zi than any other prototype ⃗pα by a large margin. For a given set of labeled documents (⃗x1, y1), . . . , (⃗xn, yn) we measure the quality of our semantic space with the averaged cost-sensitive misclassification loss, E = 1 n n ! i=1 Cyi ˆyi. (5) 3 Large Margin Prototypes So far we have introduced a two step approach: First, we find the prototypes P based on the cost matrix C, then we learn the mapping ⃗x →W⃗x that maps each input closest to the prototype of its class. However, learning the prototypes independent of the data {⃗xi} is far from optimal in order to reduce the loss in (5). In this section we will create a joint optimization problem that places the prototypes P and learns the mapping W while minimizing an upper bound on (5). Combined learning In our attempt to learn both mappings jointly, we are faced with a “chicken and egg” problem. We want to map the input documents closest to their prototypes and at the same time place the prototypes where the documents of the respective topic are mapped to. Therefore our first task is to de-tangle this mutual dependency of W and P. Let us define A as the following matrix product: A = JX⊤(XX⊤+ λI)−1. (6) It follows immediately form eqs. (3) and (6) that W = PA. Note that eq. (6) is entirely independent of P and can be pre-computed before the prototypes have been positioned. With this relation we have reduced the problem of determining W and P to the single problem of determining P. Let ⃗x′ i = A⃗xi and let ⃗eα = [0, . . . , 1, . . . , 0]⊤be the vector with all zeros and a single 1 in the αth position. We can then rewrite both, the topic prototypes ⃗pα and the low dimensional documents ⃗zi, as vectors within the range of P : Rc →Rc: ⃗pα = P⃗eα, and ⃗zi = P⃗x′ i. (7) Optimization Ideally we would like to learn P to minimize (5) directly. However, this function is non-continuous and non-differentiable. For this reason we will derive a surrogate loss function that strictly bounds (5) from above. 4 The loss for a specific document ⃗xi is zero if its corresponding vector ⃗zi is closer to the correct prototype ⃗pyi than to any other prototype ⃗pα. For better generalization it would be preferable if prototype ⃗pyi was in fact much closer by a large margin. We can go even further and demand that prototypes that would incur a larger misclassification loss should be further separated than those with a small cost. More explicitly, we will try to enforce a margin of Cyiα. We can express this condition as a set of “soft” inequality constraints, in terms of squared-distances, ∀i, α̸=yi ∥P(⃗eyi −⃗x′ i)∥2 2 + Cyiα ≤∥P(⃗eα −⃗x′ i)∥2 2 + ξiα, (8) where the slack-variable ξiα ≥0 absorbs the amount of violation of prototype ⃗pα into the margin of ⃗x′ i. Given this formulation, we create an upper bound on the loss function (5): Lemma 1 Given a prototype matrix P, the training error (5) is bounded above by 1 n " iα ξiα. Proof: First, note that we can rewrite the assignment of the closest prototype (4) as ˆyi = argminα∥P(⃗eα −⃗x′ i)∥2. It follows that ∥P(⃗eyi −⃗x′ i)∥2 2 −∥P(⃗eˆyi −⃗x′ i)∥2 2 ≥0 for all i (with equality when ˆyi = yi). We therefore obtain: ξiˆyi = ∥P(⃗eyi −⃗x′ i)∥2 2 + Cyi ˆyi −∥P(⃗eˆyi −⃗x′ i)∥2 2 ≥Cyi ˆyi. (9) The result follows immediately from (9) and that ξiα ≥0: ! i,α ξiα ≥ ! i ξiˆyi ≥ ! i,ˆyi Cyi ˆyi. (10) Lemma 1, together with the constraints in eq. (8), allows us to create an optimization problem that minimizes an upper bound on the average loss in eq. (5) with maximum-margin constraints: Minimize ! i,α ξiα subject to: P (1) ∥P(⃗eyi −⃗x′ i)∥2 2 + Cyiα ≤∥P(⃗eα −⃗x′ i)∥2 2 + ξiα (2) ξiα ≥0 (11) Note that if we have a very large number of classes, it might be beneficial to choose P ∈Rr×c with r < c. However, the convex formulation described in the next paragraph requires P to be square. Convex formulation The optimization in eq. (11) is not convex. The constraints of type (8) are quadratic with respect to P. Intuitively, any solution P gives rise to infinitely many solutions as any rotation of P results in the same objective value and also satisfies all constraints. We can make (11) invariant to rotation by defining Q = P⊤P, and rewriting all distances in terms of Q, ∥P(⃗eα −⃗x′ i)∥2 2 = (⃗eα −⃗x′ i)⊤Q(⃗eα −⃗x′ i) = ∥⃗eα −⃗x′ i∥2 Q. (12) Note that the distance formulation in eq. (12) is linear with respect to Q. As long as the matrix Q is positive semi-definite, we can re-decompose it into Q = P⊤P. Hence, we enforce positive semidefiniteness of Q by adding the constraint Q ⪰0. We can now solve (11) in terms of Q instead of P with the large-margin constraints ∀i, α̸=yi ∥⃗eyi −⃗x′ i∥2 Q + Cyiα ≤∥⃗eα −⃗x′ i∥2 Q + ξiα. (13) Regularization If the size of the training data n is small compared to the number of parameters c2, we might run into problems of overfitting to the training data set. To counter those effects, we add a regularization term to the objective function. Even if the training data might differ from the test data, we know that the taxonomy does not change. It is straight-forward to verify that if the mapping A was perfect, i.e. for all i we have ⃗x′ i = ⃗eyi, Pmds satisfies all constraints (8) as equalities with zero slack. This gives us confidence that the optimal solution P for the test data should not deviate too much from Pmds. We will therefore penalize 5 Top category A B C D E F G H # samples n 7544 4772 4858 2701 7300 1961 8694 8155 # topics c 424 160 453 339 457 151 425 150 # nodes 519 312 610 608 559 218 533 170 Table 1: Statistics of the different OHSUMED problems. Note that not all nodes are populated and that we pruned all strictly un-populated subtrees. ∥Q −¯C∥2 F , where ¯C = P⊤ mdsPmds (as defined in section 2). The final convex optimization of taxem with regularized objective becomes: Minimize (1 −µ) ! i,α ξiα + µ∥Q −¯C∥2 F subject to: Q (1) ∥⃗eyi −⃗x′ i∥2 Q + Cyiα ≤∥⃗eα −⃗x′ i∥2 Q + ξiα (2) ξiα ≥0 (3) Q ⪰0 (14) The constant µ ∈[0, 1] regulates the impact of the regularization term. The optimization in (14) is an instance of a semidefinite program (SDP) [2]. Although SDPs can often be expensive to solve, the optimization (14) falls into a special category2 and can be solved very efficiently with special purpose sub-gradient solvers even with millions of constraints [16]. Once the optimal solution Q∗ is found, one can obtain the position of the prototypes with a simple svd or cholesky decomposition Q∗=P⊤P and consequently also obtains the mapping W from W = PA. 4 Results We evaluated our algorithm taxem on several classification problems derived from categorizing publications in the public OHSUMED medical journal data base into the Medical Subject Headings (MeSH) taxonomy. Setup and data set description We used the OHSUMED 87 corpus [9], which consists of abstracts and titles of medical publications. Each of these entries has been assigned one or more categories in the MeSH taxonomy3. We used the 2001 version of these MeSH headings resulting in about 20k categories organized in a taxonomy. To preprocess the data we proceeded as follows: First, we discarded all database entries with empty abstracts, which left us with 36890 documents. We tokenized (after stop word removal and stemming) each abstract, and represented the corresponding bag of words as its d = 60727 dimensional tfidf scores (normalized to unit length). We removed all topic categories that did not appear in the MeSH taxonomy (due to out-dated topic names). We further removed all subtrees of nodes that were populated with one or less documents. The top categories in the OHSUMED data base are “orthogonal” — for instance the B top level category is about organism while C is about diseases. We thus created 8 independent classification problems out of the top categories A,B,C,D,E,F,G,H. For each problem, we kept only the abstracts that were assigned exactly one category in that tree, making each problem single-label. The statistics of the different problems are summrized in Table 1. For each problem, we created a 70%/30% random split in training and test samples, ensuring however that each topic had at least one document in the training corpus. Document Categorization The classification results on the OHSUMED data set are summarized in Table 2. We set the regularization constants to be λ = 1 for the regression and µ = 0.1 for the SDP. Preliminary experiments on data set B showed that regularization was important but the exact settings of the µ and λ had no 2The solver described in [16] utilizes that many constraints are inactive and that the sub-gradient can be efficiently derived from previous gradient steps. 3see http://en.wikipedia.org/wiki/Medical_Subject_Headings 6 data SVM 1/all MCSVM SVM cost SVM tax PI-taxem Pmds-taxem LM-taxem A 2.17 2.13 2.11 1.96 2.11 2.33 1.95 B 1.50 1.38 1.64 1.52 1.57 1.99 1.39 C 2.41 2.32 2.25 2.25 2.30 2.61 2.16 D 3.10 2.76 2.92 2.82 2.82 3.05 2.66 E 3.44 3.42 3.26 3.25 3.45 3.05 3.05 F 2.59 2.65 2.66 2.69 2.63 2.77 2.51 G 3.98 4.12 3.89 3.82 4.10 3.63 3.59 H 2.42 2.48 2.40 2.32 2.45 2.24 2.17 all 2.78 2.77 2.77 2.65 2.79 2.73 2.50 Table 2: The cost-sensitive test error results on various ohsumed classification data sets. The algorithms are from left to right: one vs. all SVM, MCSVM [6], cost-sensitive MCSVM, Hierarchical SVM [4], simplex regression, mds regression, large-margin taxem. The best results (up to statistical significance) are highlighted in bold. The taxem algorithm obtains the lowest overall loss and the lowest individual loss on each data set except B. crucial impact. We compared taxem against four commonly used algorithms for document categorization: 1. A linear support vector machine (SVM) trained in one vs. all mode (SVM 1/all) [12], 2. the Crammer and Singer multi-class SVM formulation (MCSVM) [6], 3. the Cai and Hoffmann SVM classifer with cost-sensitive loss function (SVM cost) [4], 4. the Cai and Hoffmann SVM formulation with a cost sensitive hierarchical loss function (SVM tax) [4]. All SVM classifiers were trained with regularization constant C = 1 (which worked best on problem B; this value is also commonly used in text classification when the documents have unit length). Further, we also evaluated the difference between our large margin formulation (taxem) and the results with the simplex (PI-taxem) and mds (Pmds-taxem) prototypes. To check the significance of our results we applied a standard t-test with a 5% confidence interval. The best results up to statistical significance are highlighted in bold font. The final entry in Table 2 shows the average error over all test points in all data sets. Up to statistical significance, taxem obtains the lowest loss on all data sets and the lowest overall loss. Ignoring statistical significance, taxem has the lowest loss on all data sets except B. All algorithms had comparable speed during test-time. The computation time required for solving eq. (6) and the optimization (14) was on the order of several minutes with our MATLABTM implementation on a standard IntelTM 1.8GHz core 2 duo processor (without parallelization efforts). 5 Related Work In recent years, several algorithms for document categorization have been proposed. Several authors proposed adaptations of support vector machines that incorporate the topic taxonomy through costsensitive loss re-weighting and classification at multiple nodes in the hierarhchy [4, 8, 11]. Our algorithm is based on a very different intuition. It differs from all these methods in that it learns a low dimensional semantic representation of the documents and classifies by finding the nearest prototype. Most related to our work is probably the work by Karypis and Han [10]. Although their algorithm also reduces the dimensionality with a linear projection, their low dimensional space is obtained through supervised clustering on the document data. In contrast, the semantic space obtained with taxem is obtained through a convex optimization with maximum margin constraints. Further, the low dimensional representation of our method is explicitly constructed to give rise to meaningful Euclidean distances. The optimization with large-margin constraints was partially inspired by recent work on large margin distance metric learning for nearest neighbor classification [16]. However our formulation is a much more light-weight optimization problem with O(cn) constraints instead of O(n2) as in [16]. The optimization problem in section 3 is also related to recent work on automated speech recognition through discriminative training of Gaussian mixture models [14]. 7 6 Conclusion In this paper, we have presented a novel framework for classification with inter-class relationships based on taxonomy embedding and supervised dimensionality reduction. We derived a single convex optimization problem that learns an embedding of the topic taxonomy as well as a linear mapping from the document space to the resulting low dimensional semantic space. As future work we are planning to extend our algorithm to the more general setting of document categorization with multiple topic memberships and multi-modal topic distributions. Further, we are keen to explore the implications of our proposed conversion of discrete topic taxonomies into continuous semantic spaces. This framework opens new interesting directions of research that go beyond mere classification. A natural step is to consider the document matching problem (e.g. of web pages and advertisements) in the semantic space: a fast nearest neighbor search can be performed in a joint low dimensional space without having to resort to classification all together. Although this paper is presented in the context of document categorization, it is important to emphasize that our method is by no means limited to text data or class hierarchies. In fact, the proposed algorithm can be applied in almost all multi-class settings with cost-sensitive loss functions (e.g. object recognition in computer vision). References [1] D. Blei, A. Ng, M. Jordan, and J. Lafferty. Latent Dirichlet Allocation. Journal of Machine Learning Research, 3(4-5):993–1022, 2003. [2] S. Boyd and L. Vandenberghe. Convex Optimization. Cambridge University Press, 2004. [3] A. Budanitsky and G. Hirst. Semantic distance in wordnet: An experimental, application-oriented evaluation of five measures. In Workshop on WordNet and Other Lexical Resources, in the North American Chapter of the Association for Co mputational Linguistics (NAACL), 2001. [4] L. Cai and T. Hofmann. Hierarchical document categorization with support vector machines. In ACM 13th Conference on Information and Knowledge Management, 2004. [5] T. Cox and M. Cox. Multidimensional Scaling. Chapman & Hall, London, 1994. [6] K. Crammer and Y. Singer. On the algorithmic implementation of multiclass kernel-based vector machines. Journal of Machine Learning Research, 2:265–292, 2001. [7] S. Deerwester, S. Dumais, G. Furnas, T. Landauer, and R. Harshman. Indexing by latent semantic analysis. Journal of the American Society for Information Science, 41(6):391–407, 1990. [8] S. Dumais and H. Chen. Hierarchical classification of Web content. In Proceedings of SIGIR-00, 23rd ACM International Conference on Research and Development in Information Retrieval, pages 256–263. ACM Press, New York, US, 2000. [9] W. Hersh, C. Buckley, T. J. Leone, and D. Hickam. OHSUMED: an interactive retrieval evaluation and new large test collection for research. In SIGIR ’94: Proceedings of the 17th annual international ACM conference on Research and development in information retrieval, pages 192–201. Springer-Verlag New York, Inc., 1994. [10] G. Karypis, E. Hong, and S. Han. Concept indexing a fast dimensionality reduction algorithm with applications to document retrieval & categorization, 2000. Technical Report: 00-016 karypis, han@cs.umn.edu Last updated on. [11] T.-Y. Liu, Y. Yang, H. Wan, H.-J. Zeng, Z. Chen, and W.-Y. Ma. Support vector machines classification with a very large-scale taxonomy. SIGKDD Explorations Newsletter, 7(1):36–43, 2005. [12] R. Rifkin and A. Klautau. In Defense of One-Vs-All Classification. The Journal of Machine Learning Research, 5:101–141, 2004. [13] F. Sebastiani. Machine learning in automated text categorization. ACM Computing Surveys, 34(1):1–47, 2002. [14] F. Sha and L. K. Saul. Large margin hidden markov models for automatic speech recognition. In Advances in Neural Information Processing Systems 19, Cambridge, MA, 2007. MIT Press. [15] A. Weigend, E. Wiener, and J. Pedersen. Exploiting Hierarchy in Text Categorization. Information Retrieval, 1(3):193–216, 1999. [16] K. Q. Weinberger and L. K. Saul. Fast solvers and efficient implementations for distance metric learning. In Proceedings of the Twenty-fifth International Conference on Machine Learning (ICML 2008), Helsinki, Finland, 2008. 8
2008
157
3,406
Modeling the effects of memory on human online sentence processing with particle filters Roger Levy Department of Linguistics University of California, San Diego rlevy@ling.ucsd.edu Florencia Reali Thomas L. Griffiths Department of Psychology University of California, Berkeley {floreali,tom griffiths}@berkeley.edu Abstract Language comprehension in humans is significantly constrained by memory, yet rapid, highly incremental, and capable of utilizing a wide range of contextual information to resolve ambiguity and form expectations about future input. In contrast, most of the leading psycholinguistic models and fielded algorithms for natural language parsing are non-incremental, have run time superlinear in input length, and/or enforce structural locality constraints on probabilistic dependencies between events. We present a new limited-memory model of sentence comprehension which involves an adaptation of the particle filter, a sequential Monte Carlo method, to the problem of incremental parsing. We show that this model can reproduce classic results in online sentence comprehension, and that it naturally provides the first rational account of an outstanding problem in psycholinguistics, in which the preferred alternative in a syntactic ambiguity seems to grow more attractive over time even in the absence of strong disambiguating information. 1 Introduction Nearly every sentence occurring in natural language can, given appropriate contexts, be interpreted in more than one way. The challenge of comprehending a sentence is identifying the intended intepretation from among these possibilities. More formally, each interpretation of a sentence w can be associated with a structural description T, and to comprehend a sentence is to infer T from w – parsing the sentence to reveal its underlying structure. From a probabilistic perspective, this requires computing the posterior distribution P(T|w) or some property thereof, such as the description T with highest posterior probability. This probabilistic perspective has proven extremely valuable in developing both effective methods by which computers can process natural language [1, 2] and models of human language processing [3]. In real life, however, people receive nearly all linguistic input incrementally: sentences are spoken, and written sentences are by and large read, from beginning to end. There is considerable evidence that people also comprehend incrementally, making use of linguistic input moment by moment to resolve structural ambiguity and form expectations about future inputs [4, 5]. The incremental parsing problem can, roughly, be stated as the problem of computing the posterior distribution P(T|w1...i) for a partial input w1...i. To be somewhat more precise, incremental parsing involves constructing a distribution over partial structural descriptions of w1...i which implies the posterior P(T|w1...i). A variety of “rational” models of online sentence processing [6, 7, 8, 9] take exactly this perspective, using the properties of P(T|w1...i) or quantities derived from it to explain why people find some sentences more difficult to comprehend than others. Despite their success in capturing a variety of psycholinguistic phenomena, existing rational models of online sentence processing leave open a number of questions, both theoretical and empirical. On the theoretical side, these models assume that humans are “ideal comprehenders” capable of computing P(T|w1...i) despite its significant computational cost. This kind of idealization is common in rational models of cognition, but raises questions about how resource constraints might affect language processing. For structured probabilistic formalisms in widespread use in computational linguistics, such as probabilistic context-free grammars (PCFGs), incremental processing algorithms exist that allow the exact computation of the posterior (implicitly represented) in polynomial time [10, 11, 12], from which k-best structures [13] or samples from the posterior [14] can be efficiently obtained. However, these algorithms are psychologically implausible for two reasons: (1) their run time (both worst-case and practical) is superlinear in sentence length, whereas human processing time is essentially linear in sentence length; and (2) the probabilistic formalisms utilized in these algorithms impose strict locality conditions on the probabilistic dependence between events at different levels of structure, whereas humans seem to be able to make use of arbitrary features of (extra-)linguistic context in forming incremental posterior expectations [4, 5]. Theoretical questions about the mechanisms underlying online sentence processing are complemented by empirical data that are hard to explain purely in probabilistic terms. For example, one of the most compelling phenomena in psycholinguistics is that of garden-path sentences, such as: (1) The woman brought the sandwich from the kitchen tripped. Comprehending such sentences presents a significant challenge, and many readers fail completely on their first attempt. However, the sophisticated dynamic programming algorithms typically used for incremental parsing implicitly represent all possible continuations of a sentence, and are thus able to recover the correct interpretation in a single pass. Another phenomenon that is hard to explain simply in terms of the probabilities of interpretations of a sentence is the “digging in” effect, in which the preferred alternative in a syntactic ambiguity seems to grow more attractive over time even in the absence of strong disambiguating information [15]. In this paper, we explore the hypothesis that these phenomena can be explained as the consequence of constraints on the resources available for incremental parsing. Previous work has addressed the issues of feature locality and resource constraints by adopting a pruning approach, in which hard locality constraints on probabilistic dependence are abandoned and only high-probability candidate structures are maintained after each step of incremental parsing [6, 16, 17, 18]. These approaches can be thought of as focusing on holding on to the highest posterior-probability parse as often as possible. Here, we look to the machine learning literature to explore an alternative approach focused on approximating the posterior distribution P(T|w1...i). We use particle filters [19], a sequential Monte Carlo method commonly used for approximate probabilistic inference in an online setting, to explore how the computational resources available influence the comprehension of sentences. This approach builds on the strengths of rational models of online sentence processing, allowing us to examine how performance degrades as the resources of the ideal comprehender decrease. The plan of the paper is as follows. Section 2 introduces the key ideas behind particle filters, while Section 3 outlines how these ideas can be applied in the context of incremental parsing. Section 4 illustrates the approach for the kind of garden-path sentence given above, and Section 5 presents an experiment with human participants testing the predictions that the resulting model makes about the digging-in effect. Section 6 concludes the paper. 2 Particle filters Particle filters are a sequential Monte Carlo method typically used for probabilistic inference in contexts where the amount of data available increases over time [19]. The canonical setting in which a particle filter would be used involves a sequence of latent variables z1, . . . , zn and a sequence of observed variables x1, . . . , xn, with the goal of estimating P(zn|x1...n). The particle filter solves this problem recursively, relying on the fact that the chain rule gives P(zn|x1...n) ∝P(xn|zn) X z n−1 P(zn|zn−1)P(zn−1|x1...n−1) (1) where we assume xn and zn are independent of all other variables given zn and zn−1 respectively. Assume we know P(zn−1|x1...n−1). Then we can use this distribution to construct an importance sampler for P(zn|x1...n). We generate several values of zn−1 from P(zn−1|x1...n−1). Then, we draw zn from P(zn|zn−1) for each instance of zn−1, to give us a set of values from P(zn|x1...n−1). Finally, we assign each value of zn a weight proportional to P(xn|zn), to give us an approximation to P(zn|x1...n). The particle filter is simply the recursive version of this algorithm, in which a similar approximation was used to construct to P(zn−1|x1...n−1) from P(zn−2|x1...n−2) and so forth. The algorithm thus approximates P(zn−1|x1...n−1) with a weighted set of “particles” – discrete values of zi – which are updated using P(zn|zn−1) and P(xn|zn) to provide an approximation to P(zn|x1...n). The particle filter thus has run-time linear in the number of observations, and provides a way to explore the influence of memory capacity (reflected in the number of particles) on probabilistic inference (cf. [20, 21]). In this paper, we focus on the conditions under which the particle filter fails as a source of information about the challenges of limited memory capacity for online sentence processing. 3 Incremental parsing with particle filters In this section we develop an algorithm for top-down, incremental particle-filter parsing. We first lay out the algorithm, then consider options for representations and grammars. 3.1 The basic algorithm We assume that the structural descriptions of a sentence are context-free trees, as might be produced by a PCFG. Without loss of generality, we also assume that preterminal expansions are always unary rewrites. A tree is generated incrementally in a sequence of derivation operations π1...m, such that no word can be generated unless all the words preceding it in the sentence have already been generated. The words of the sentence can thus be considered observations, and the hidden state is a partial derivation (D, S), where D is an incremental tree structure and S is a stack of items of the form ⟨N, Op⟩, where N is a target node in D and Op is a derivation operation type. Later in this section, we outline three possible derivation orders. The problem of inferring a distribution over partial derivations from observed words can be approximated using particle filters as outlined in Section 2. Assume a model that specifies a probability distribution P(π|(D, S), w1...i) over the next derivation operation π given the current partial derivation and words already seen. By (D, S) π1...j ⇒ (D′, S′) we denote that the sequence of derivation operations π1...j takes the partial derivation (D, S) to a new partial derivation (D′, S′). Now consider a partial derivation (Di|, Si|) in which the most recent derivation operation has generated the ith word in the input. Through the π⇒relation, our model implies a probability distribution over new partial derivations in which the next operation would be the generation of the i + 1th word; call this distribution P((D|i+1, S|i+1)|(Di|, Si|)). In the nomenclature of particle filters introduced above, partial derivations (D|i, S|i) thus correspond to latent variables zi, words wi to observations xi, and our importance sampler involves drawing from P((D|i, S|i)|(Di−1|, Si−1|)) and reweighting by P(wi|(D|i, S|i)). This differs from the standard particle filter only in that zi is not necessarily independent of x1...i−1 given zi−1. 3.2 Representations and grammars We now describe three possible derivation orders that can be used with our approach. For each order, a derivation operation πOp of a given type Op specifies a sequence of symbols Y 1 . . . Y k (possibly the empty sequence ǫ), and can be applied to a partial derivation: (D, [⟨N, Op⟩]⊕S) πOp ⇒(D′, A⊕S), with ⊕being list concatenation. That is, a derivation operation involves popping the top item off the stack, choosing a derivation operation of the appropriate type, applying it to add some symbols to D yielding D′, and pushing a list of new items A back on the stack. Derivation operations differ in the relationship between D and D′, and derivation orders differ in the contents of A. Order 1: Expansion (Exp) only. D′ consists of D with node N expanded to have daughters Y 1 . . . Y k; and A = [⟨Y 1, Exp⟩, . . . , ⟨Y k, Exp⟩]. Order 2: Expansion and Right-Sister (Sis). The sequence of symbols specified by any πOp is of maximum length 1. Expansion operations affect D as above. For a right-sister operation πSis, D′ consists of D with Y 1 added as the right sister of N (if πSis specifies ǫ, then D = D′). A = [⟨Y 1, Exp⟩, ⟨Y 1, Sis⟩, . . . , ⟨Y k, Exp⟩, ⟨Y k, Sis⟩]. Order 3: Expansion, Right-Sister, and Adjunction (Adj). The sequence of symbols specified by any πOp is of maximum length 1. Expansion operations affect D as above. Expansion and right-sister operations are as above. For a right-sister operation πAdj, D′ consists of D with Y 1 spliced in at the node N – that is, Y 1 replaces N in the tree, and N becomes the lone daughter of Y 1 (if πAdj specifies ǫ, then D = D′). A = [⟨Y 1, Exp⟩, ⟨Y 1, Sis⟩, ⟨Y 1, Adj⟩, . . . , ⟨Y k, Exp⟩, ⟨Y k, Sis⟩, ⟨Y k, Adj⟩]. D S ROOT S1 S2 NP N Pat VP VBD ADVP CC S3 ⟨VBD, Exp⟩ ⟨ADVP, Exp⟩ ⟨CC, Exp⟩ ⟨S3, Exp⟩ (a) D S ROOT S1 S2 NP N Pat VP VBD ⟨VBD, Exp⟩ ⟨VBD, Sis⟩ ⟨VP, Sis⟩ ⟨S2, Sis⟩ ⟨S1, Sis⟩ (b) D S ROOT S2 NP N Pat VP VBD ⟨VBD, Exp⟩ ⟨VBD, Sis⟩ ⟨VBD, Adj⟩ ⟨VP, Sis⟩ ⟨VP, Adj⟩ ⟨S2, Sis⟩ ⟨S2, Adj⟩ (c) Figure 1: Three possible derivation orders for the sentence “Pat walked yesterday and Sally slept”. In each case, the partial derivation (D|i, S|i) is shown for i = 2 – up to just before the generation of the word “walked”. The symbols ADVP, CC, and S3 in (a) will be generated later in the derivations of (b) and (c) as right-sister operations; the symbol S1 will be generated in (c) as an adjunction operation. During the incremental parsing of “walked” these partial derivations would be reweighted by P Exp(walked|(D|i, S|i)). In all cases, the initial state of a derivation is a root symbol targeted for expansion: (ROOT, [⟨ROOT, Exp⟩]), and a derivation is complete when the stack is empty. Figure 1 illustrates the partial derivation state for each order just after the generation of a word in mid-sentence. For each derivation operation type Op, it is necessary to define an underlying grammar and estimate the parameters of a distribution P Op(π|(D, S)) over next derivation operations given the current state of the derivation. For a sentence whose tree structure is known, the sequence of derivation operations for derivation orders 1 and 2 is unambiguous and thus supervised training can be used for such a model. For derivation order 3, a known tree structure still underspecifies the order of derivation operations, so the underlying sequence of derivation operations could either be canonicalized or treated as a latent variable in training. Finally, we note that a known PCFG could be encoded in a model using any of these derivation orders; for PCFGs, the partial derivation representations used in order 3 may be thought of as marginalizing over the unary chains on the right frontier of the representations in order 2, which in turn may be thought of as marginalizing over the extra childless nonterminals in the incremental representations of order 1. In the context of the particle filter, the representations with more operation types could thus be expected to function as having larger effective sample sizes for a fixed number of particles [22]. For the experiments reported in this paper, we use derivation order 2 with a PCFG trained using unsmoothed relative-frequency estimation on the parsed Brown corpus. This approach has several attractive features for the modeling of online human sentence comprehension. The number of particles can be considered a rough estimate of the quantity of working memory resources devoted to the sentence comprehension task; as we will show in Section 5, sentences difficult to parse can become easier when more particles are used. After each word, the incremental posterior over partial structures T can be read off the particle structures and weights. Finally, the approximate surprisal of each word – a quantity argued to be correlated with many types of processing difficulty in sentence comprehension [8, 9, 23] – is essentially a by-product of the incremental parsing process: it is the negative log of the mean (unnormalized) weight P(wi|(D|i, S|i)). 4 The garden-path sentence To provide some intuitions about our approach, we illustrate its ability to model online disambiguation in sentence comprehension using the garden-path sentence given in Example 1. In this sentence, a local structural ambiguity is introduced at the word brought due to the fact that this word could be either (i) a past-tense verb, in which case it is the main verb of the sentence and The woman is its complete subject; or (ii) a participial verb, in which case it introduces a reduced relative clause, The woman is its recipient, and the subject of the main clause has not yet been completed. This ambiguity is resolved in favor of (ii) by the word tripped, the main verb of the sentence. It is well documented (e.g., [24]) that locally ambiguous sentences such as Example 1 are read more slowly at the disambiguating region when compared with unambiguous counterparts (c.f. The woman who 0.66 0.64 0.91 0.90 0.89 0.90 0.91 0.87 0.37 S NP DT S NP DT NN S NP DT NN VP VBD S NP DT NN VP VBD NP DT S NP DT NN VP VBD NP DT NN S NP DT NN VP VBD NP DT NN PP IN S NP DT NN VP VBD NP DT NN PP IN NP DT S NP DT NN VP VBD NP DT NN PP IN NP DT NN N/A 0.15 0.19 0.04 0.04 0.04 0.05 0.03 0.05 0.63 S NP NP DT S NP NP DT NN S NP NP DT NN VP VBN S NP NP DT NN VP VBN NP DT S NP NP DT NN VP VBN NP DT NN S NP NP DT NN VP VBN NP DT NN PP IN S NP NP DT NN VP VBN NP DT NN PP IN NP DT S NP NP DT NN VP VBN NP DT NN PP IN NP DT NN S NP NP DT NN VP VBN NP DT NN PP IN NP DT NN VP VBD Thewoman brought the sandwich from the kitchen tripped 1.00 0.99 0.96 0.92 0.90 0.83 0.83 0.83 0.17 0.4 0.09 0.29 0.78 0.09 0.3 0.2 0.09 4 Figure 2: Incremental parsing of a garden-path sentence. Trees indicate the canonical structures for main-verb (above) and reduced-relative (below) interpretations. Numbers above the trees indicate the posterior probabilites of main-verb and reduced-relative interpretations, marginalizing over precise details of parse structure, as estimated by a parser using 1000 particles. Since the grammar is quite noisy, the main-verb interpretation still has some posterior probability after disambiguation at tripped. Numbers in the second-to-last line indicate the proportion of particle filters with 20 particles that produce a viable parse tree including the given word. The final line indicates the variance (×10−3) of particle weights after parsing each word. was brought the sandwich from the kitchen tripped), and in cases where the local bias strongly favors (i), many readers may fail to recover the correct reading altogether. Figure 2 illustrates the behavior of the particle filter on the garden-path sentence in Example 1. The word brought shifts the posterior strongly toward the main-verb interpretation. The rest of the reduced relative clause has little effect on the posterior, but the disambiguator tripped shifts the posterior in favor of the correct reduced-relative interpretation. In low-memory situations, as represented by a particle filter with a small number of particles (e.g., 20), the parser is usually able to construct an interpretation for the sentence up through the word kitchen, but fails at the disambiguator, and when it succeeds the variance in particle weights is high. 5 Exploring the “digging in” phenomenon An important feature distinguishing “rational” models of online sentence comprehension [6, 7, 8, 9] from what are sometimes called “dynamical systems” models [25, 15] is that the latter have an internal feedback mechanism: in the absence of any biasing input, the activation of the leading candidate interpretation tends to grow with the passage of time. A body of evidence exists in the psycholinguistic literature that seems to support an internal feedback mechanism: increasing the duration of a local syntactic ambiguity increases the difficulty of recovery at disambiguation to the disfavored interpretation. It has been found, for example, that 2a and 3a, in which the second NP (the gossip.../the deer...) initially seems to be the object of the preceding verb, are harder to recover from than 2b and 3b [26, 27, 15]. (2) “NP/S” ambiguous sentences a. Long (A-L): Tom heard the gossip about the neighbors wasn’t true. b. Short (A-S): Tom heard the gossip wasn’t true. (3) “NP/Z” ambiguous sentences a. Long (A-L): While the man hunted the deer that was brown and graceful ran into the woods. b. Short (A-S): While the man hunted the deer ran into the woods. From the perspective of exact rational inference – or even for rational pruning models such as [6] – this “digging in” effect is puzzling.1 The result finds an intuitive explanation, however, in our limited-memory particle-filter model. The probability of parse failure at the disambiguating word wi is a function of (among other things) the immediately preceding estimated posterior probability of the disfavored interpretation. If this posterior probability is low, then the resampling of particles performed after processing each word provides another point at which particles representing the disfavored interpretation could be deleted. Consequently, total parse failure at the disambiguator will become more likely the greater the length of the preceding ambiguous region. We quantify these predictions by assuming that the more often no particle is able to integrate a given word wi in context – that is, P(wi|(D|i, S|i)) – the more difficult, on average, people should find wi to read. In the sentences of Examples 2-3, by far the most likely position for the incremental parser to fail is at the disambiguating verb. We can also compare processing of these sentences with syntactically similar but unambiguous controls. (4) “NP/S” unambiguous controls a. Long (U-L): Tom heard that the gossip about the neighbors wasn’t true. b. Short (U-S): Tom heard that the gossip wasn’t true. (5) “NP/Z” unambiguous controls a. Long (U-L): While the man hunted, the deer that was brown and graceful ran into the woods. b. Short (U-S): While the man hunted, the deer ran into the woods. Figure 3a shows, for each sentence of each type, the proportion of runs in which the parser successfully integrated (assigned non-zero probability to) the disambiguating verb (was in Example 2a and ran in Example 3a), among those runs in which the sentence was successfully parsed up to the preceding word. Consistent with our intuitive explanation, both the presence of local ambiguity and length of the preceding region make parse failure at the disambiguator more likely. In the remainder of this section we test this explanation with an offline sentence acceptability study of digging-in effects. The experiment provides a way to make more detailed comparisons between the model’s predictions and sentence acceptability. Consistent with the predictions of the model, ratings show differences in the magnitude of digging-in effects associated with different types of structural ambiguities. As the working-memory resources (i.e. number of particles) devoted to comprehension of the sentence increase, the probability of successful comprehension goes up, but local ambiguity and length of the second NP remain associated with greater comprehension difficulty. 5.1 Method Thirty-two native English speakers from the university subject pool completed a questionnaire corresponding to the complexity-rating task. Forty experimental items were tested with four conditions per item, counterbalanced across questionnaires, plus 84 fillers, with sentence order pseudorandomized. Twenty experimental items were NP/S sentences and twenty were NP/Z sentences. We used a 2 × 2 design with ambiguity and length of the ambiguous noun phrase as factors. In NP/S sentences, structural ambiguity was manipulated by the presence/absence of the complementizer that, while in NP/Z sentences, structural ambiguity was manipulated by the absence/presence of a comma after the first verb. Participants were asked to rate how difficult to understand sentences are on a scale from 0 to 10, 0 indicating “Very easy” and 10 “Very difficult”. 5.2 Results and Discussion Figure 3b shows the mean complexity rating for each type of sentences. For both NP/S and NP/Z sentences, the ambiguous long-subject (A-L) was rated the hardest to understand, and the unambiguous short-subject (U-S) condition was rated the easiest; these results are consistent with model predictions. Within sentence type, the ratings were subjected to an analysis of variance (ANOVA) with two factors: ambiguity and length. In the case of NP/S sentences there was a main effect of ambiguity, F1(1, 31) = 12.8, p < .001, F2(1, 19) = 47.8, p < .0001 and length, F1(1, 31) = 4.9, 1For these examples, noun phrase length is a weakly misleading cue – objects tend to be longer than subjects – and that these “digging in” examples might also be analyzable as cases of exact rational inference [9]. However, the effects of length in some of the relevant experiments are quite strong. The explanation we offer here would magnify the effects of weakly misleading cues, and also extend to where cues are neutral or even favor the ultimately correct interpretation. 0 100 200 300 400 0.0 0.2 0.4 0.6 0.8 1.0 NP/S Number of particles Proportion of parse successes at disambiguator U−S A−S U−L A−L 0 100 200 300 400 0.0 0.2 0.4 0.6 0.8 1.0 NP/Z Number of particles Proportion of parse successes at disambiguator U−S A−S U−L A−L (a) Model results Mean difficulty rating 0 1 2 3 4 5 6 U−S A−S U−L A−L NP/S NP/Z (b) Behavioral results Figure 3: Frequency of irrevocable garden path in particle-filter parser as a function of number of particles, and mean empirical difficulty rating, for NP/S and NP/Z sentences. p = .039, F2(1, 19) = 32.9, p < .0001, and the interaction between factors was significant, F1(1, 31) = 8.28, p = .007, F2(1, 19) = 5.56, p = .029. In the case of NP/Z sentences there was a main effect of ambiguity, F1(1, 31) = 63.6, p < .0001, F2(1, 19) = 150.9, p < .0001 and length, F1(1, 31) = 127.2, p < .0001, F2(1, 19) = 124.7, p < .0001 and the interaction between factors was significant by subjects only, F1(1, 31) = 4.6, p = .04, F2(1, 19) = 1.6, p = .2. The experiment thus bore out most of the model’s predictions, with ambiguity and length combining to make sentence processing more difficult. One reason that our model may underestimate the effect of subject length on ease of understanding, at least in the NP/Z case, is the tendency of subject NPs to be short in English, which was not captured in the grammar used by the model. 6 Conclusion and Future Work In this paper we have presented a new incremental parsing algorithm based on the particle filter and shown that it provides a useful foundation for modeling the effect of memory limitations in human sentence comprehension, including a novel solution to the problem posed by “digging-in” effects [15] for rational models. In closing, we point out two issues – both involving the problem of resampling prominent in particle filter research – in which we believe future research may help deepen our understanding of language processing. The first issue involves the question of when to resample. In this paper, we have take the approach of generating values of zn−1 from which to draw P(zn|zn−1, x1...n−1) by sampling with replacement (i.e., resampling) after every word from the multinomial over P(zn−1|x1...n−1) represented by the weighted particles. This approach has the problem that particle diversity can be lost rapidly, as it decreases monotonically with the number of observations. Another option is to resample only when the variance in particle weights exceeds a predefined threshold, sampling without replacement when this variance is low [22]. As Figure 2 shows, a word that resolves a garden-path generally creates high weight variance. Our preliminary investigations indicate that associating variance-sensitive resampling with processing difficulty leads to qualitatively similar predictions to the total parse failure approach taken in Section 5, but further investigation is required. The other issue involves how to resample. Since particle diversity can never increase, when parts of the space of possible T are missed by chance early on, they can never be recovered. As a consequence, applications of the particle filter in machine learning and statistics tend to supplement the basic algorithm with additional steps such as running Markov chain Monte Carlo on the particles in order to re-introduce diversity (e.g., [28]). Further work would be required, however, to specify an MCMC algorithm over trees given an input prefix. Both of these issues may help achieve a deeper understanding of the details of reanalysis in garden-path recovery [29]. For example, the initial reaction of many readers to the sentence The horse raced past the barn fell is to wonder what a “barn fell” is. With variance-sensitive resampling, this observation could be handled by smoothing the probabilistic grammar; with diversity-introducing MCMC, it might be handled by tree-changing operations chosen during reanalysis. Acknowledgments RL would like to thank Klinton Bicknell and Gabriel Doyle for useful comments and suggestions. FR and TLG were supported by grants BCS-0631518 and BCS-070434 from the National Science Foundation. References [1] C. D. Manning and H. Sch¨utze. Foundations of Statistical Natural Language Processing. MIT Press, 1999. [2] D. Jurafsky and J. H. Martin. Speech and Language Processing: An Introduction to Natural Language Processing, Computational Linguistics, and Speech Recognition. Prentice-Hall, second edition, 2008. [3] D. Jurafsky. Probabilistic modeling in psycholinguistics: Linguistic comprehension and production. In Rens Bod, Jennifer Hay, and Stefanie Jannedy, editors, Probabilistic Linguistics, pages 39–95. MIT Press, 2003. [4] M. K. Tanenhaus, M. J. Spivey-Knowlton, K. Eberhard, and J. C. Sedivy. Integration of visual and linguistic information in spoken language comprehension. Science, 268:1632–1634, 1995. [5] G. T. Altmann and Y. Kamide. Incremental interpretation at verbs: restricting the domain of subsequent reference. Cognition, 73(3):247–264, 1999. [6] D. Jurafsky. A probabilistic model of lexical and syntactic access and disambiguation. Cognitive Science, 20(2):137–194, 1996. [7] N. Chater, M. Crocker, and M. Pickering. The rational analysis of inquiry: The case for parsing. In M. Oaksford and N. Chater, editors, Rational models of cognition. Oxford, 1998. [8] J. Hale. A probabilistic Earley parser as a psycholinguistic model. In Proceedings of NAACL, volume 2, pages 159–166, 2001. [9] R. Levy. Expectation-based syntactic comprehension. Cognition, 106:1126–1177, 2008. [10] J. Earley. An efficient context-free parsing algorithm. Communications of the ACM, 13(2):94–102, 1970. [11] A. Stolcke. An efficient probabilistic context-free parsing algorithm that computes prefix probabilities. Computational Linguistics, 21(2):165–201, 1995. [12] M.-J. Nederhof. The computational complexity of the correct-prefix property for TAGs. Computational Linguistics, 25(3):345–360, 1999. [13] L. Huang and D. Chiang. Better k-best parsing. In Proceedings of the International Workshop on Parsing Technologies, 2005. [14] M. Johnson, T. L. Griffiths, and S. Goldwater. Bayesian inference for PCFGs via Markov chain Monte Carlo. In Proceedings of Human Language Technologies 2007: The Conference of the North American Chapter of the Association for Computational Linguistics, 2007. [15] W. Tabor and S. Hutchins. Evidence for self-organized sentence processing: Digging in effects. Journal of Experimental Psychology: Learning, Memory, and Cognition,, 30(2):431–450, 2004. [16] B. Roark. Probabilistic top-down parsing and language modeling. Computational Linguistics, 27(2):249–276, 2001. [17] M. Collins and B. Roark. Incremental parsing with the perceptron algorithm. In Proceedings of the ACL, 2004. [18] J. Henderson. Lookahead in deterministic left-corner parsing. In Proceedings of the Workshop on Incremental Parsing: Bringing Engineering and Cognition Together, 2004. [19] A. Doucet, N. de Freitas, and N. Gordon, editors. Sequential Monte Carlo Methods in Practice. Springer, 2001. [20] A. N. Sanborn, T. L. Griffiths, and D. J. Navarro. A more rational model of categorization. In Proceedings of the 28th Annual Conference of the Cognitive Science Society, Mahwah, NJ, 2006. Erlbaum. [21] N. Daw and A. Courville. The pigeon as particle filter. In Advances in Neural Information Processing Systems 20, Cambridge, MA, 2008. MIT Press. [22] A. Doucet, N. de Freitas, K. Murphy, and S. Russell. Rao-Blackwellised particle filtering for dynamic Bayesian networks. In Advances in Neural Information Processing Systems, 2000. [23] N. Smith and R. Levy. Optimal processing times in reading: a formal model and empirical investigation. In Proceedings of the 30th Annual Meeting of the Cognitive Science Society, 2008. [24] M. C. MacDonald. Probabilistic constraints and syntactic ambiguity resolution. Language and Cognitive Processes, 9(2):157–201, 1994. [25] M. J. Spivey and M. K. Tanenhaus. Syntactic ambiguity resolution in discourse: Modeling the effects of referential content and lexical frequency. Journal of Experimental Psychology: Learning, Memory, and Cognition, 24(6):1521–1543, 1998. [26] L. Frazier and K. Rayner. Making and correcting errors during sentence comprehension: Eye movements in the analysis of structurally ambiguous sentences. Cognitive Psychology, 14:178–210, 1982. [27] F. Ferreira and J. M. Henderson. Recovery from misanalyses of garden-path sentences. Journal of Memory and Language, 31:725–745, 1991. [28] N. Chopin. A sequential particle filter method for static models. Biometrika, 89:539–552, 2002. [29] P. Sturt, M. J. Pickering, and M. W. Crocker. Structural change and reanalysis difficulty in language comprehension. Journal of Memory and Language, 40:143–150, 1999.
2008
158
3,407
Clusters and Coarse Partitions in LP Relaxations David Sontag CSAIL, MIT dsontag@csail.mit.edu Amir Globerson School of Computer Science and Engineering The Hebrew University gamir@cs.huji.ac.il Tommi Jaakkola CSAIL, MIT tommi@csail.mit.edu Abstract We propose a new class of consistency constraints for Linear Programming (LP) relaxations for finding the most probable (MAP) configuration in graphical models. Usual cluster-based LP relaxations enforce joint consistency on the beliefs of a cluster of variables, with computational cost increasing exponentially with the size of the clusters. By partitioning the state space of a cluster and enforcing consistency only across partitions, we obtain a class of constraints which, although less tight, are computationally feasible for large clusters. We show how to solve the cluster selection and partitioning problem monotonically in the dual LP, using the current beliefs to guide these choices. We obtain a dual message passing algorithm and apply it to protein design problems where the variables have large state spaces and the usual cluster-based relaxations are very costly. The resulting method solves many of these problems exactly, and significantly faster than a method that does not use partitioning. 1 Introduction A common inference task in graphical models is finding the most likely setting of the values of the variables (the MAP assignment). Indeed, many important practical problems can be formulated as MAP problems (e.g., protein-design problems [9]). The complexity of the MAP problem depends on the structure of the dependencies between the variables (i.e. the graph structure) and is known to be NP-hard in general. Specifically, for problems such as protein-design, the underlying interaction graphs are dense, rendering standard exact inference algorithms useless. A great deal of effort has been spent recently on developing approximate algorithms for the MAP problem. One promising approach is based on linear programming relaxations, solved via message passing algorithms akin to belief propagation [2, 3]. In this case, the MAP problem is first cast as an integer linear program, and then is relaxed to a linear program by removing the integer constraints and adding new constraints on the continuous variables. Whenever the relaxed solution is integral, it is guaranteed to be the optimal solution. However, this happens only if the relaxation is sufficiently “tight” (with respect to a particular objective function). Relaxations can be made increasingly tight by introducing LP variables that correspond to clusters of variables in the original model. In fact, in recent work [6] we have shown that by adding a set of clusters over three variables, complex problems such as protein-design and stereo-vision may be solved exactly. The problem with adding clusters over variables is that computational cost scales exponentially with the cluster size. Consider, for example, a problem where each variable has 100 states (cf. protein-design). Using clusters of s variables means adding 100s LP variables, which is computationally demanding even for clusters of size three. Our goal in the current paper is to design methods that introduce constraints over clusters at a reduced computational cost. We achieve this by representing clusters at a coarser level of granularity. The key observation is that it may not be necessary to represent all the possible joint states of a cluster of variables. Instead, we partition the cluster’s assignments at a coarser level, and enforce consistency only across such partitions. This removes the number of states per variable from consideration, and instead focuses on resolving currently ambiguous settings of the variables. Following the approach of [2], we formulate a dual LP for the partition-based LP relaxations and derive a message passing algorithm for optimizing the dual LP based on block coordinate descent. Unlike standard message passing algorithms, the algorithm we derive involves passing messages between coarse and fine representations of the same set of variables. MAP and its LP relaxation. We consider discrete pairwise Markov random fields on a graph G = (V, E), defined as the following exponential family distribution1 p(x; θ) = 1 Z e P ij∈E θij(xi,xj) (1) Here θ is a parameter vector specifying how pairs of variables in E interact. The MAP problem we consider here is to find the most likely assignment of the variables under p(x; θ) (we assume that the evidence has already been incorporated into the model). This is equivalent to finding the assignment xM that maximizes the function f(x; θ) = P ij∈E θij(xi, xj). The resulting discrete optimization problem may also be cast as a linear program. Define µ to be a vector of marginal probabilities associated with the interacting pairs of variables (edges) {µij(xi, xj)}ij∈E as well as {µi(xi)}i∈V for the nodes. The set of µ’s that could arise from some joint distribution on G is known as the marginal polytope M(G) [7]. The MAP problem is then equivalent to the following linear program: max x f(x; θ) = max µ∈M(G) µ · θ , (2) where µ · θ = P ij∈E P xi,xj θij(xi, xj)µij(xi, xj). The extreme points of the marginal polytope are integral and correspond one-to-one with assignments x. Thus, there always exists a maximizing µ that is integral and corresponds to xM. Although the number of variables in this LP is only O(|E| + |V |), the difficulty comes from an exponential number of linear inequalities typically required to describe the marginal polytope M(G). LP relaxations replace the difficult global constraint that the marginals in µ must arise from some common joint distribution by ensuring only that the marginals are locally consistent with one another. The most common such relaxation, pairwise consistency, enforces that the edge marginals are consistent with the node marginals, {µ | P xj µij(xi, xj) = µi(xi)}. The integral extreme points of this local marginal polytope also correspond to assignments. If a solution is obtained at one such extreme point, it is provably the MAP assignment. However, the local marginal polytope also contains fractional extreme points, and, as a relaxation, will in general not be tight. We are therefore interested in tightening the relaxation. There are many known ways to do so, including cycle inequalities [5] and semi-definite constraints [8]. However, perhaps the most straightforward approach corresponds to lifting the relaxation by adding marginals over clusters of nodes to the model (cf. generalized belief propagation [10]) and constraining them to be consistent with the edge marginals. However, each cluster comes with a computational cost that grows as ks, where s is the number of variables in the cluster and k is the number of states for each variable. We seek to offset this exponential cost by introducing coarsened clusters, as we show next. 2 Coarsened clusters and consistency constraints We begin with an illustrative example. Suppose we have a graphical model that is a triangle with each variable taking k states. We can recover the exact marginal polytope in this case by forcing the pairwise marginals µij(xi, xj) to be consistent with some distribution µ123(x1, x2, x3). However, when k is large, introducing the corresponding k3 variables to our LP may be too costly and perhaps unnecessary, if a weaker consistency constraint would already lead to an integral extreme point. To this end, we will use a coarse-grained version of µ123 where the joint states are partitioned into larger collections, and consistency is enforced over the partitions. 1We do not use potentials on single nodes θi(xi) since these can be folded into θij(xi, xj). Our algorithm can also be derived with explicit θi(xi), and we omit the details for brevity. xi zj zk zi zk xk zi Figure 1: A graphical illustration of the consistency constraint between the original (fine granularity) edge (xi,xk) and the coarsened triplet (zi,zj,zk). The two should agree on the marginal of zi,zk. For example, the shaded area in all three figures represents the same probability mass. The simplest partitioning scheme builds on coarse-grained versions of each variable Xi. Let Zi denote a disjoint collection of sets covering the possible values of Xi. For example, if variable Xi has five states, Zi might be defined as  { 1,2} ,{ 3,5} ,{ 4}  . Given such a partitioning scheme, we can introduce a distribution over coarsened variables µ 123(z1,z2,z3) and constrain it to agree with µ ik(xi,xk) in the sense that they both yield the same marginals for zi,zk. This is illustrated graphically in Fig. 1. In the case when Zi individuates each state, i.e.,  { 1} ,{ 2} ,{ 3} ,{ 4}  , we recover the usual cluster consistency constraint. We use the above idea to construct tighter outer bounds on the marginal polytope and incorporate them into the MAP-LP relaxation. We assume that we are given a set of clusters C. For each cluster c  C and variable i  c we also have a partition Zc i as in the above example2 (the choice of clusters and partitions will be discussed later). We introduce marginals over the coarsened clusters µ (zc) and constrain them to agree with the edge variables µ ij(xi,xj) for all edges ij  c:  xi zc i ,xj zc j µ ij(xi,xj) =  zc\ { zc i ,zc j } µ c(zc). (3) The key idea is that the coarsened cluster represents higher-order marginals albeit at a lower resolution, whereas the edge variables represent lower-order marginals but at a finer resolution. The constraint in Eq. 3 implies that these two representations should agree. We can now state the LP that we set out to solve. Our LP optimizes over the following marginal variables: µ ij(xi,xj),µ i(xi) for the edges and nodes of the original graph, and µ c(zc) for the coarse-grained clusters. We would like to constrain these variables to belong to the following outer bound on the marginal polytope: MC(G) =    µ  0   xj µ ij(xi,xj) = µ i(xi)  xi zc i ,xj zc j µ ij(xi,xj) =  zc\ { zc i ,zc j } µ c(zc)  xi,xj µ ij(xi,xj) = 1    (4) Note that  zc µ c(zc) = 1 is implied by the above constraints. The corresponding MAP-LP relaxation is then: max µ  MC(G) µ ·  (5) This LP could in principle be solved using generic LP optimization tools. However, a more efficient and scalable approach is to solve it via message passing in the dual LP, which we show how to do in the next section. In addition, for this method to be successful, it is critical that we choose good coarsenings, meaning that it should have few partitions per variable, yet still sufficiently tightens the relaxation. Our approach for choosing the coarsenings is to iteratively solve the LP using an initial relaxation (beginning with the pairwise consistency constraints), then to introduce additional cluster constraints, letting the current solution guide how to coarsen the variables. As we showed in earlier work [6], solving with the dual LP gives us a simple method for “warm starting” the new LP (the tighter relaxation) using the previous solution, and also results in an algorithm for which every step monotonically decreases an upper bound on the MAP assignment. We will give further details of the coarsening scheme in Section 4. 2We use a superscript of c to highlight the fact that different clusters may use different partitionings for Zi. Also, there can be multiple clusters on the same set of variables, each using a different partitioning. 3 Dual linear program and a message passing algorithm In this section we give the dual of the partition-based LP from Eq. 5, and use it to obtain a message passing algorithm to efficiently optimize this relaxation. Our approach extends earlier work by Globerson and Jaakkola [2] who gave the generalized max-product linear programming (MPLP) algorithm to solve the usual (non-coarsened) cluster LP relaxation in the dual. The dual formulation in [2] was derived by adding auxiliary variables to the primal. We followed a similar approach to obtain the LP dual of Eq. 5. The dual variables are as follows: βij→i(xi, xj), βij→j(xi, xj), βij→ij(xi, xj) for every edge ij ∈E, and βc→ij(zc) for every coarsened cluster c and edge ij ∈c. As in [2], we define the following functions of β: λij→i(xi) = max xj βij→i(xi, xj), λij→ij(xi, xj) = βij→ij(xi, xj) (6) λc→ij(zc i , zc j) = max zc\{zc i ,zc j } βc→ij(zc) (7) As we show below, the variables λ correspond to the messages sent in the message passing algorithm that we use for optimizing the dual. Thus λij→i(xi) should be read as the message sent from edge ij to node i, and λc→ij(zc i , zc j) is the message from the coarsened cluster to one of its intersection edges. Finally, λij→ij(xi, xj) is the message sent from an edge to itself. The dual of Eq. 5 is the following constrained minimization problem: min β X i max xi X k∈N(i) λik→i(xi) + X ij∈E max xi,xj h λij→ij(xi, xj) + X c:ij∈c λc→ij(zc i [xi], zc j[xj]) i s.t. βij→i(xi, xj) + βij→j(xi, xj) + βij→ij(xi, xj) = θij(xi, xj) ∀ij ∈E, xi, xj X ij∈c βc→ij(zc) = 0 ∀c, zc (8) The notation zc i [xi] refers to the mapping from xi ∈Xi to the coarse state zc i ∈Zc i such that xi ∈zc i . By convex duality, the dual objective evaluated at a dual feasible point upper bounds the primal LP optimum, which in turn upper bounds the value of the MAP assignment. It is illustrative to compare this dual LP with [2] where the cluster dual variables were βc→ij(xc). Our dual corresponds to introducing the additional constraint that βc→ij(xc) = βc→ij(x′ c) whenever zc[xc] = zc[x′ c]. The advantage of the above dual is that it can be optimized via a simple message passing algorithm that corresponds to block coordinate descent. The key idea is that it is possible to fix the values of the β variables corresponding to all clusters except one, and to find a closed form solution for the non-fixed βs. It then turns out that one does not need to work with β variables directly, but can keep only the λ message variables. Fig. 2 provides the form of the updates for all three message types. S(c) is the set of edges in cluster c (e.g. ij, jk, ik). Importantly, all messages outgoing from a cluster or edge must be sent simultaneously. Here we derive the cluster to edge updates, which differ from [2]. Assume that all values of β are fixed except for βc→ij(zc i , zc j) for all ij ∈c in some cluster c. The term in the dual objective that depends on βc→ij(zc i , zc j) can be written equivalently as max xi,xj h λij→ij(xi, xj) + X c′:c′̸=c,ij∈c′ λc′→ij(zc′ i [xi], zc′ j [xj]) + λc→ij(zc i [xi], zc j[xj]) i = max zc i ,zc j h bij(zc i , zc j) + λc→ij(zc i [xi], zc j[xj]) i . (11) Due to the constraint P ij∈c βc→ij(zc) = 0, all of the βc→ij need to be updated simultaneously. It can be easily shown (using an equalization argument as in [2]) that the βc→ij(zc) that satisfy the constraint and minimize the objective are given by βc→ij(zc) = −bij(zc i , zc j) + 1 |S(c)| X st∈c bst(zc s, zc t). (12) The message update given in Fig. 2 follows from the definition of λc→ij. Note that none of the cluster messages involve the original cluster variables xc, but rather only zc. Thus, we have achieved the goal of both representing higher-order clusters and doing so at a reduced computational cost. • Edge to Node: For every edge ij ∈E and node i (or j) in the edge: λij→i(xi)←−2 3λ−j i (xi)+1 3 max xj h X c:ij∈c λc→ij(zc i [xi], zc j[xj])+λij→ij(xi, xj)+λ−i j (xj)+θij(xi, xj) i where λ−j i (xi) = P k∈N(i)\j λik→i(xi). • Edge to Edge: For every edge ij ∈E: λij→ij(xi, xj)←−2 3 X c:ij∈c λc→ij(zc i [xi], zc j[xj]) + 1 3 h λ−i j (xj) + λ−j i (xi) + θij(xi, xj) i • Cluster to Edge: First define bij(zc i , zc j) = max xi ∈zc i xj ∈zc j  λij→ij(xi, xj) + X c′̸=c:ij∈c′ λc′→ij(zc′ i [xi], zc′ j [xj])   (9) The update is then: λc→ij(zc i , zc j)←−bij(zc i , zc j) + 1 |S(c)| max zc\{zc i ,zc j } X st∈c bst(zc s, zc t) (10) Figure 2: The message passing updates for solving the dual LP given in Eq. 8. The algorithm in Fig. 2 solves the dual for a given choice of coarsened clusters. As mentioned in Sec. 2, we would like to add such clusters gradually, as in [6]. Our overall algorithm is thus similar in structure to [6] and proceeds as follows (we denote the message passing algorithm from Fig. 2 by MPLP): 1. Run MPLP until convergence using the pairwise relaxation, 2. Find an integral solution x by locally maximizing the single node beliefs bi(xi) = P k∈N(i) λki→i(xi), 3. If the dual objective given in Eq. 8 is sufficiently close to the primal objective f(x; θ), terminate, 4. Add a new coarsened cluster c using the strategy given in Sec. 4, 5. Initialize messages going out of the new cluster c to zero, and keep all the previous message values (this will not change the bound value), 6. Run MPLP for N iterations, then return to 2. 4 Choosing coarse partitions Until now we have not discussed how to choose the clusters to add and their partitionings. Our strategy for doing so closely follows that of our earlier work [6]. Given a set C of candidate clusters to add (e.g., the set of all triplets in the graph as in [6]), we would like to add a cluster that would result in the maximum decrease of the dual bound on the MAP. In principle such a cluster could be found by optimizing the dual for each candidate cluster, then choosing the best one. However, this is computationally costly, so in [6] we instead use the bound decrease resulting from just once sending messages from the candidate cluster to its intersection edges. If we were to add the full (un-coarsened) cluster, this bound decrease would be: d(c) = X ij∈c max xi,xj bij(xi, xj) −max xc X ij∈c bij(xi, xj), (13) where bij(xi, xj) = λij→ij(xi, xj) + P c:ij∈c λc→ij(zc i [xi], zc j[xj]). Our strategy now is as follows: we add the cluster c that maximizes d(c), and then choose a partitioning Zc i for all i ∈c that is guaranteed to achieve a decrease that is close to d(c). This can clearly be achieved by using the trivial partition Zc i = Xi (which achieves d(c)). However, in many cases it is also possible to achieve it while using much coarser partitionings. The set of all possible partitionings Zc i is too large to optimize over. Instead, we consider just |Xi| candidate partitions that are generated based on the beliefs bi(xi). Intuitively, the states with lower belief values bi(xi) are less likely to influence the MAP, and can thus be bundled together. We will therefore consider partitions where the k states with lowest belief values are put into the same “catch-all” coarse state sc i, and all other states of xi get their own coarse state. Formally, a partition Zc i is characterized by a value κi such that sc i is the set of all xi with bi(xi) < κi. The question next is how big we can make the catch-all state without sacrificing the bound decrease. We employ a greedy scheme whereby each i ∈c (in arbitrary order) is partitioned separately, while the other partitions are kept fixed. The process starts with Zc i = Xi for all i ∈c. We would like to choose sc i such that it is sufficiently separated from the state that achieves d(c). Formally, given a margin parameter γ we choose κi to be as large as possible such that the following constraint still holds3: max zc\{zc i }, zc i = sc i X st∈c bst(zc s, zc t) ≤max xc X st∈c bst(xs, xt) −γ, where the first maximization is over the coarse variables Zc\i, and Zc i is fixed to the catch-all state sc i (note that the partitioning for Zc i is a function of κi). We can find the optimal κi in time O(|Xi||c|) by starting with κi = −∞and increasing it until the constraint is violated. Since each subsequent value of sc i differs by one additional state xi, we can re-use the maximizations over zc\i for the previous value of sc i in evaluating the constraint for the current sc i. It can be shown by induction that this results in a coarsening that has a guaranteed bound decrease of at least d(c) + min(0, γ). Setting γ < 0 would give a partitioning with fewer coarse states at the cost of a smaller guaranteed bound decrease. On the other hand, setting γ > 0 results in a margin between the value of the dual objective (after sending the coarsened cluster message) and its value if we were to fix xi in the max terms of Eq. 11 to a value in sc i. This makes it less likely that a state in sc i will become important again in subsequent message passing iterations. For the experiments in this paper we use γ = 3d(c), scaling γ with the value of the guaranteed bound decrease for the full cluster. Note that this greedy algorithm does not necessarily find the partitioning with the fewest number of coarse states that achieves the bound decrease. 5 Experiments We report results on the protein design problem, originally described in [9]. The protein design problem is the inverse of the protein folding problem. Given a desired backbone structure for the protein, the goal is to construct the sequence of amino-acids that results in a low energy, and thus stable, configuration. We can use an approximate energy function to guide us towards finding a set of amino-acids and rotamer configurations with minimal energy. In [9] the design problem was posed as finding a MAP configuration in a pairwise MRF. The models used there (which are also available online) have a number of states per variable that is between 2 and 158, and contain up to 180 variables per model. The models are also quite dense so that exact calculation is not feasible. Recently we showed [6] that all but one of the problems described in [9] can be solved exactly by using a LP relaxation with clusters on three variables. However, since each individual state has roughly 100 possible values, processing triplets required 106 operations, making the optimization costly. In what follows we describe two sets of experiments that show that, by coarsening, we can both significantly reduce the computation time and achieve similar performance as if we had used un-coarsened triplets [6]. The experiments differ in the strategy for adding triplets, and illustrate two performance regimes. In both experimental setups we first run the standard edge-based message passing algorithm for 1000 iterations. In the first experiment, we add all triplets that correspond to variables whose single node beliefs are tied (within 10−5) at the maximum after running the edge-based algorithm. Since tied beliefs correspond to fractional LP solutions, it is natural to consider these in tighter relaxations. The triplets correspond to partitioned variables, as explained in Sec. 2. The partitioning is guided by the ties in the single node beliefs. Specifically, for each variable Xi we find states whose single node beliefs are tied at the maximum. Denote the number of states maximizing the belief by r. Then, we partition 3The constraint may be infeasible for γ > 0, in which case we simply choose Zc i = Xi. 0 1 2 3 4 5 160 180 200 220 240 260 Hours Objective This paper Sontag et al. UAI ’08 Primal (best decoding) Dual 1000 1200 1400 1600 1800 0 5 10 15 20 25 30 35 Iteration Number Time (Seconds) This paper Sontag et al. UAI ’08 Figure 3: Comparison with algorithm from [6] for the protein “1aac”, after the first 1000 iterations. Left: Dual objective as a function of time. Right: The cost per one iteration over the entire graph. the states into r subsets, each containing a different maximizing state. The other (non-maximizing) states are split randomly among the r subsets. The triplets are then constructed over the coarsened variables Zc i and the message passing algorithm of Sec. 3 is applied to the resulting structure. After convergence of the algorithm, we recalculate the single node beliefs. These may result in a different partition scheme, and hence new variables Zc i . We add new triplets corresponding to the new variables and re-run. We repeat until the dual-LP bound is sufficiently close to the value of the integral assignment obtained from the messages (note that these values would not coincide if the relaxation were not tight; in these experiments they do, so the final relaxation is tight). We applied the above scheme to the ten smallest proteins in the dataset used in [6] (for the larger proteins we used a different strategy described next). We were able to solve all ten exactly, as in [6]. The mean running time was six minutes. The gain in computational efficiency as a result of using coarsened-triplets was considerable: The average state space size for coarsened triplets was on average 3000 times smaller than that of the original triplet state space, resulting in a factor 3000 speed gain over a scheme that uses the complete (un-coarsened) triplets.4 This big factor comes about because a very small number of states are tied per variable, thus increasing the efficiency of our method where the number of partitions is equal to the number of tied states. While running on full triplets was completely impractical, the coarsened message passing algorithm is very practical and achieves the exact MAP assignments. Our second set of experiments follows the setup of [6] (see Sec. 3), alternating between adding 5 triplets to the relaxation and running MPLP for 20 more iterations. The only difference is that, after deciding to add a cluster, we use the algorithm from Sec. 4 to partition the variables. We tried various settings of γ, including γ = 0 and .01, and found that γ = 3d(c) gave the best overall runtimes. We applied this second scheme to the 15 largest proteins in the dataset.5 Of these, we found the exact MAP in 47% of the cases (according to the criterion used in [6]), and in the rest of the cases were within 10−2 of the known optimal value. For the cases that were solved exactly, the mean running time was 1.5 hours, and on average the proteins were solved 8.1 times faster than with [6].6 To compare the running times on all 15 proteins, we checked how long it took for the difference between the dual and primal objectives to be less than .01f(xM; θ), where xM is the MAP assignment. This revealed that our method is faster by an average factor of 4.3. The reason why these factors are less than the 3000 in the previous setup is that, for the larger proteins, the number of tied states is typically much higher than that for the small ones. Results for one of the proteins that we solved exactly are shown in Fig. 3. The cost per iteration increases very little after adding each triplet, showing that our algorithm significantly coarsened the clusters. The total number of iterations and number of triplets added were roughly the same. Two triplet clusters were added twice using different coarsenings, but otherwise each triplet only needed to be added once, demonstrating that our algorithm chose the right coarsenings. 4These timing comparisons do not apply to [6] since that algorithm did not use all the triplets. 5We do not run on the protein 1fpo, which was not solved in [6]. 6We made sure that differences were not due to different processing powers or CPU loads. 6 Discussion We presented an algorithm that enforces higher-order consistency constraints on LP relaxations, but at a reduced computational cost. Our technique further explores the trade-offs of representing complex constraints on the marginal polytope while keeping the optimization tractable. In applying the method, we chose to cluster variables’ states based a bound minimization criterion after solving using a looser constraint on the polytope. A class of approaches related to ours are the “coarse-to-fine” applications of belief propagation [1, 4]. In those, one solves low-resolution versions of an MRF, and uses the resulting beliefs to initialize finer resolution versions. Although they share the element of coarsening with our approach, the goal of coarse-to-fine approaches is very different from our objective. Specifically, the low-resolution MRFs only serve to speed-up convergence of the full resolution MRF via better initialization. Thus, one typically should not expect it to perform better than the finest granularity MRF. In contrast, our approach is designed to strictly improve the performance of the original MRF by introducing additional (coarse) clusters. One of the key technical differences is that in our formulation the setting of coarse and fine variables are refined iteratively whereas in [1], once a coarse MRF has been solved, it is not revisited. There are a number of interesting directions to explore. Using the same ideas as in this paper, one can introduce coarsened pairwise consistency constraints in addition the full pairwise consistency constraints. Although this would not tighten the relaxation, by passing messages more frequently in the coarsened space, and only occasionally revisiting the full edges, this could give significant computational benefits when the nodes have large numbers of states. This would be much more similar to the coarse-to-fine approach described above. With the coarsening strategy used here, the number of variables still grows exponentially with the cluster size, albeit at a lower rate. One way to avoid the exponential growth is to partition the states of a cluster into a fixed number of states (e.g., two), and then constrain such partitions to be consistent with each other. Such a process may be repeated recursively, generating a hierarchy of coarsened variables. The key advantage in this approach is that it represents progressively larger clusters, but with no exponential growth. An interesting open question is to understand how these hierarchies should be constructed. Our techniques may also be helpful for finding the MAP assignment in MRFs with structured potentials, such as context-specific Bayesian networks. Finally, these constraints can also be used when calculating marginals. References [1] P. F. Felzenszwalb and D. P. Huttenlocher. Efficient belief propagation for early vision. Int. J. Comput. Vision, 70(1):41–54, 2006. [2] A. Globerson and T. Jaakkola. Fixing max-product: Convergent message passing algorithms for MAP LP-relaxations. In Advances in Neural Information Processing Systems 21. MIT Press, 2008. [3] V. Kolmogorov. Convergent tree-reweighted message passing for energy minimization. IEEE Trans. Pattern Anal. Mach. Intell., 28(10):1568–1583, 2006. [4] C. Raphael. Coarse-to-fine dynamic programming. IEEE Transactions on Pattern Analysis and Machine Intelligence, 23(12):1379–1390, 2001. [5] D. Sontag and T. Jaakkola. New outer bounds on the marginal polytope. In Advances in Neural Information Processing Systems 21. MIT Press, 2008. [6] D. Sontag, T. Meltzer, A. Globerson, Y. Weiss, and T. Jaakkola. Tightening LP relaxations for MAP using message-passing. In UAI, 2008. [7] M. Wainwright and M. I. Jordan. Graphical models, exponential families and variational inference. Technical report, UC Berkeley, Dept. of Statistics, 2003. [8] M. Wainwright and M. I. Jordan. Log-determinant relaxation for approximate inference in discrete Markov random fields. IEEE Transactions on Signal Processing, 54(6):2099–2109, June 2006. [9] C. Yanover, T. Meltzer, and Y. Weiss. Linear programming relaxations and belief propagation – an empirical study. JMLR, 7:1887–1907, 2006. [10] J.S. Yedidia, W.T. Freeman, and Y. Weiss. Constructing free-energy approximations and generalized belief propagation algorithms. IEEE Trans. on Information Theory, 51(7):2282– 2312, 2005.
2008
159
3,408
Unifying the Sensory and Motor Components of Sensorimotor Adaptation Adrian Haith School of Informatics University of Edinburgh, UK adrian.haith@ed.ac.uk Carl Jackson School of Psychology University of Birmingham, UK c.p.jackson.1@bham.ac.uk Chris Miall School of Psychology University of Birmingham, UK r.c.miall@bham.ac.uk Sethu Vijayakumar School of Informatics University of Edinburgh, UK sethu.vijayakumar@ed.ac.uk Abstract Adaptation of visually guided reaching movements in novel visuomotor environments (e.g. wearing prism goggles) comprises not only motor adaptation but also substantial sensory adaptation, corresponding to shifts in the perceived spatial location of visual and proprioceptive cues. Previous computational models of the sensory component of visuomotor adaptation have assumed that it is driven purely by the discrepancy introduced between visual and proprioceptive estimates of hand position and is independent of any motor component of adaptation. We instead propose a unified model in which sensory and motor adaptation are jointly driven by optimal Bayesian estimation of the sensory and motor contributions to perceived errors. Our model is able to account for patterns of performance errors during visuomotor adaptation as well as the subsequent perceptual aftereffects. This unified model also makes the surprising prediction that force field adaptation will elicit similar perceptual shifts, even though there is never any discrepancy between visual and proprioceptive observations. We confirm this prediction with an experiment. 1 Introduction When exposed to a novel visuomotor environment, for instance while wearing prism goggles, subjects initially exhibit large directional errors during reaching movements but are able to rapidly adapt their movement patterns and approach baseline performance levels within around 30-50 reach trials. Such visuomotor adaptation is multifaceted, comprising both sensory and motor components [5]. The sensory components of adaptation can be measured through alignment tests in which subjects are asked to localize either a visual target or their unseen fingertip, with their other (also unseen) fingertip (without being able to make contact between hands). These tests reveal substantial shifts in the perceived spatial location of both visual and proprioceptive cues, following adaptation to shifted visual feedback [7]. While a shift in visual spatial perception will be partially reflected in reaches towards visual targets, sensory adaptation alone cannot fully account for the completenes of visuomotor adaptation, since the shifts in visual perception are always substantially less than the experimentally-imposed shift. There must therefore be some additional motor component of adaptation, i.e. some change in the relationship between the planned movement and the rv t rp t ry t ut yt vt pt disturbances } motor command hand position proprioceptive observation visual observation Figure 1: Graphical model of a single reach in a motor adaptation experiment. Motor command ut, and visual and proprioceptive observations of hand position, vt and pt, are available to the subject. Three distinct disturbances affect observations: A motor disturbance ry t may affect the hand position yt given the motor command ut. Visual and proprioceptive disturbances, rv t and rp t , may affect the respective observations given hand position. issued motor command. This argument is reinforced by the finding that patterns of reach aftereffects following visuomotor adaptation depend strongly on the motor task performed during adaptation [5]. From a modelling point of view, the sensory and motor components of adaptation have previously only been addressed in isolation of one another. Previously proposed models of sensory adaptation have assumed that it is driven purely by discrepancies between hand position estimates from different sensory modalities. Ghahramani et al. [2] proposed a computational model based on a maximum likelihood principle, details of which we give in Section 3. On its own, this sensory adaptation model cannot provide a complete description of visuomotor adaptation since it does not fully account for improvements in performance from trial to trial. It can, however, be plausibly combined with a conventional error-driven motor adaptation model in which the performance error is calculated using the maximum likelihood estimate of hand position. The resulting composite model could plausibly account for both performance improvements and perceptual shifts during visuomotor adaptation. According to this view, sensory and motor adaptation are very much independent processes, one driven by sensory discrepancy and the other driven by (estimated) task performance error. In Section 4, we argue for a more unified view of sensory and motor adaptation in which all three components of adaptation are jointly guided by optimal Bayesian inference of the corresponding potential sources of error experienced on each trial, given noisy visual and proprioceptive observations of performance and noisy motor execution. This unified sensory and motor adaptation model is also able to account for both performance improvements and perceptual shifts during visuomotor adaptation. However, our unified model also makes the surprising prediction that a motor disturbance, e.g. an external force applied to hand via a manipulandum, will also elicit sensory adaptation. The MLE-based model predicts no such sensory adaptation, since there is never any discrepancy between sensory modalities. We test this prediction directly with an experiment (Section 5) and find that force field adaptation does indeed lead to sensory as well as motor adaptation. 2 Modelling framework Before describing the details of the models, we first outline a basic mathematical framework for describing reaching movements in the context of a motor adaptation experiment, representing the assumptions common to both the MLE-based and the Bayesian adaptation models. Figure 1 illustrates a graphical model of a single reaching movement during an adaptation experiment, from the subject’s point of view. The multiple components of visuomotor adaptation described above correspond to three distinct potential sources of observed outcome error (across both observation) modalities in a single reaching trial. On trial t, the subject generates a (known) motor command ut. This motor command ut leads to a final hand position yt, which also depends on some (unknown) motor disturbance yt vt pt rv rp Figure 2: MLE-based sensor adaptation model. Visual and proprioceptive disturbances rv, rp are treated as parameters of the model. Estimates ˆrv t and ˆrp t of these parameters are maintained via an online EM-like procedure. ry t (e.g. an external force applied to the hand) and motor noise ǫu t . We assume the final hand position yt is given by yt = ut + ry t + ǫu t , (1) where ǫu t ∼N(0, σ2 u). Although this is a highly simplified description of the forward dynamics of the reaching movement, it can be regarded as a first-order approximation to the true dynamics. Similar assumptions have proved very successful elsewhere in models of force field adaptation, e.g. [1] The experimenter ultimately measures the hand position yt, however this is not directly observed by the subject. Instead, noisy and potentially shifted observations are available through visual and proprioceptive modalities, vt = yt + rv t + ǫv t , (2) pt = yt + rp t + ǫp t , (3) where the observation noises ǫv t and ǫp t are zero-mean and Gaussian with variances σ2 v and σ2 p, respectively. We denote the full set of potential disturbances on trial t by rt = (rv t , rp t , ry t )T . (4) We assume that the subject maintains an internal estimate ˆrt = (ˆrv t , ˆrp t , ˆry t )T of the total disturbance rt and selects his motor commands on each trial accordingly. For reaches to a visual target located at v∗ t , the appropriate motor command is given by ut = v∗ t −ˆrv t −ˆry t . (5) Adaptation can be viewed as a process of iteratively updating the disturbance estimate, ˆrt, following each trial given the new (noisy) observations vt and pt and the motor command ut. Exactly how the subject uses the information available to infer the current disturbances is the subject of subsequent sections of this paper. 3 Existing sensory adaptation models The prevailing view of sensory adaptation centres around the principle of maximum likelihood estimation and was first proposed by Ghahramani et al. [2] in the context of combining discrepant visual and auditory cues in a target location task. It has nevertheless been wideley accepted as a model of how the nervous system deals with visual and proprioceptive cues. Van Beers et al. [7], for instance, based an analysis of the relative uncertainty of visual and proprioceptive estimates of hand location on this principle. We suppose that, given the subject’s current estimate of the visual and proprioceptive disturbance, ˆrv t and ˆrp t , the visual and proprioceptive estimates of hand position are given by ˆyv t = vt −ˆrv t , (6) ˆyp t = pt −ˆrp t (7) respectively. These distinct estimates of hand position are combined via maximum likelihood estimation [7] into a single fused estimate of hand position.The maximum likelihood estimate (MLE) of the true hand position yt is given by ˆyMLE t = σ2 p σ2v + σ2p ˆyv t + σ2 v σ2v + σ2p ˆyp t . (8) rv t rp t ry t ut yt vt pt rv t+1 rp t+1 ry t+1 ut+1 yt+1 vt+1 pt+1 Figure 3: Bayesian combined sensory and motor adaptation model. The subject assumes that disturbances vary randomly, but smoothly, from trial to trial. The MLE-based sensory adaptation model states that subjects adapt their future visual and proprioceptive estimates of hand location towards the MLE in such a way that the MLE itself remains unchanged. The corresponding updates are given by ˆrv t+1 = ˆrv t + ηwp [ˆyp t −ˆyv t ] , (9) ˆrp t+1 = ˆrp t + ηwv [ˆyv t −ˆyp t ] , (10) where η is some fixed adaptation rate. This adaptation principle can be interpreted as an online expectation-maximization (EM) procedure in the graphical model shown in Figure 2. In this model, rv and rp are treated as parameters of the model. The E-step of the EM procedure corresponds to finding the MLE of yt and the M-step corresponds to gradient ascent on the likelihood of ˆrv and ˆrp. 3.1 Extending the MLE model to account for motor component of adaptation As it stands, the MLE-based model described above only accounts for sensory adaptation and does not provide a complete description of sensorimotor adaptation. Visual adaptation will affect the estimated location of a visual target, and therefore also the planned movement, but the effect on performance will not be enough to account for complete (or nearly complete) adaptation. The performance gain from this component of adaptation will be equal to the discrepancy between the initial visual setimate of hand posion and the MLE - which will be substantially less than the experimentally imposed shift. This sensory adaptation model can, however, be plausibly combined with a conventional error-driven state space model [6, 1] of motor adaptation to yield an additional motor component of adaptation ˆry t . The hand position MLE ˆyt can be used in place of the usual uni-modal observation assumed in these models when calculating the endpoint error. The resulting update for the estimated motor disturbance ˆry t on trial t is given by ˆry t+1 = ˆry t + γ(ˆy∗ t −ˆyMLE t ), (11) where ˆy∗ t = (v∗−ˆrv t ) is the estimated desired hand location, and γ is some fixed adaptation rate. This combined model reflects the view that sensory and motor adaptation are distinct processes. The sensory adaptation component is driven purely by discrepancy between the senses, while the motor adaptation component only has access to a single, fused estimate of hand position and is driven purely by estimated performance error. 4 Unified Bayesian sensory and motor adapatation model We propose an alternative approach to solving the sensorimotor adaptation problem. Rather than treat the visual shifts rv and rp as parameters, we consider all the disturbances (including ry t ) as dynamic random variables. We assume that the subject’s beliefs about how 0 5 10 15 20 25 30 0 10 20 30 Trial Number Directional Error/o Data Bayesian Model MLE Model Figure 4: Model comparison with visuomotor adaptation data. The Bayesian model (solid blue line) and MLE-based model (dashed red line) were fitted to performance data (filled circles) from a visuomotor adaptation experiment [4]. Both models made qualitatively similar predictions about how adaptation was distributed across components. these disturbances evolve over time are characterised by a trial-to-trial disturbance dynamics model given by rt+1 = Art + ηt, (12) where A is some diagonal matrix and ηt is a random drift term with zero mean and diagonal covariance matrix Q, i.e. ηt ∼N(0, Q). (13) A and Q are both diagonal to reflect the fact that each disturbance evolves independently. We denote the diagonal elements of A by a = (av, ap, au) and the diagonal of Q by q = (qv, qp, qu). The vector a describes the timescales over which each disturbance persists, while q describes the amount of random variation from trial to trial, or volatility of each disturbance. These parameters reflect the statistics of the usual fluctuations in sensory calibration errors and motor plant dynamics, which the sensorimotor system must adapt to on an ongoing basis. (Similar assumptions have previously been made elsewhere [3, 4]). Combining these assumptions with the statistical model of each individual trial described in Section 2 (and Figure 1), gives rise to a dynamical model of the disturbances and their impact on reaching movements, across all trials. This model, representing the subjects beliefs about how his sensorimotor performance is liable to vary over time, is illustrated in Figure 4. We propose that the patterns of adaptation and the sensory aftereffects exhibited by subjects correspond to optimal inference of the disturbances rt within this model, given the observations on each trial. The linear dynamics and Gaussian noise of the observer’s model mean that exact inference is straightforward and equivalent to a Kalman filter. The latent state tracked by the Kalman filter is the vector of disturbances rt = (rv t , rp t , ry t )T , with state dynamics given by (12). The observations vt and pt are related to the disturbances via  vt pt  =  ut ut  +  1 0 1 0 1 1  (rt + ǫt) , (14) where ǫt = (ǫv t , ǫp t , ǫu t )T . We can write this in a more conventional form as zt = Hrt + Hǫt, (15) where zt = (vt −ut, pt −ut)T and H is the matrix of 1’s and 0’s in equation (14). The observation noise covariance is given by R = E  (Hǫt)(Hǫt)T  =  σ2 v + σ2 u σ2 u σ2 u σ2 p + σ2 u  . (16) The standard Kalman filter update equations can be used to predict how a subject will update estimates of the disturbances following each trial and therefore how he will select his actions on the next trial, leading to a full prediction of performance from the first trial onwards. 5 Model comparison and experiments We have described two alternative models of visuomotor adaptation which we have claimed can account for both the motor and sensory components of adaptation. We fitted both (a) (b) x y Target Start Catch trial trajectory Adapted trajectory Error Figure 5: (a) Experimental Setup, (b) Sample trajectories and performance error measure models to performance data from a visuomotor adaptation experiment [4] to validate this claim. In this study in which this data was taken from, subjects performed visually guided reaching movements to a number of targets. Visual feedback of hand position (given via a cursor on a screen) was rotated by 30o relative to the starting position of each movement. The mean directional error (averaged over targets and over subjects) over trials is plotted in Figure 4. The Matlab function lsqnonlin was used to find the parameters for each model which minimized the sum of the error between the data and the predictions of each model. There were 5 free parameters for the MLE-based model (σ2 v, σ2 p, σ2 u, η, γ). For the Bayesian model we assumed that all disturbances had the same timescale, i.e. all elements of a were the same, leaving 7 free parameters (σ2 v, σ2 p, σ2 u, qv, qp, qu, a). The results of the fits are shown in Figure 4. The spread of adaptation across components of the model was qualitatively similar between the two models, although no data on perceptual aftereffects was available from this study for quantitative comparison. The Bayesian model clearly displays a closer fit to the data and the Akaike information criterion (AIC) confirmed that this was not simply due to extra parameters (AIC = 126.7 for the Bayesian model vs AIC = 159.6 for the MLE-based model). Although the Bayesian model appears to describe the data better, this analysis is by no means conclusive. Furthermore, the similar scope of predictions between the two models means that gathering additional data from alignment tests may not provide any further leverage to distinguish between the two models. There is, however, a more striking difference in predictions between the two models. While the MLE-based model predicts there will be sensory adaptation only when there is a discrepancy between the senses, the Bayesian model predicts that there will also be sensory adaptation in response to a motor disturbance such as an external force applied to the hand). Just as a purely visual disturbance can lead to a multifaceted adaptive response, so can a purely motor disturbance, with both motor and sensory components predicted, even though there is never any discrepancy between the senses. This prediction enables us to distinguish decisively between the two models. 5.1 Experimental Methods We experimentally tested the hypothesis that force field adaptation would lead to sensory adaptation. We tested 11 subjects who performed a series of trials consisting of reaching movements interleaved with perceptual alignment tests. Subjects grasped the handle of a robotic manipulandum with their right hand. The hand was not visible directly, but a cursor displayed via a mirror/flat screen monitor setup (Figure 5.1(a)) was exactly co-planar and aligned with the handle of the manipulandum. In the movement phase, subjects made an out-and-back reaching movement towards a visual target with their right hand. In the visual localization phase, a visual target was displayed pseudorandomly in one of 5 positions and the subjects moved their left fingertip to the perceived location of the target. In the proprioceptive localization phase, the right hand was passively moved to a random target location, with no visual cue of its position, and subjects moved their left fingertip to the perceived location of the right hand. Left fingertip Vision Proprioception −1 −0.5 0 0.5 1 1.5 2 2.5 3 3.5 4 Mean Localization Error − x Modality Mean Error / cm Pre−Adaptation Post−Adaptation Vision Proprioception 6 6.5 7 7.5 8 8.5 9 9.5 10 10.5 11 Mean Localization Error − y Modality Mean Error / cm Pre−Adaptation Post−Adaptation Figure 6: (a) Average lateral (in direction of the perturbation) localization error across subjects before vs after adaptation, for vision and proprioception. Error bars indicate standard errors. (b) Same plots for y-direction positions were recorded using a Polhemus motion tracker. Neither hand was directly visible at any time during the experiment. Subjects were given 25 baseline trials with zero external force, after which a force field was gradually introduced. A leftward lateral force Fx was applied to the right hand during the reaching phase. The magnitude of the force was proportional to the forward velocity ˙y of the hand, i.e. Fx = −a ˙y. (17) The force was applied only on the outward part of the movement (i.e. only when ˙y > 0). After steadily incrementing a during 50 adaptation trials, the force field was then kept constant at a = 0.3 N/(cms−1) for a further 25 post-adaptation test trials. All subjects received a catch trial at the very end in which the force field was turned off. The particular force field used was chosen so that the cursor trajectories (and motor commands required to counter the perturbation) would be as close as possible to those used to generate the linear trajectories required when exposed to a visuomotor shift (such as that described in [7]). Figure 5.1(b) shows two trajectories from a typical subject, one from the post-adaptation test phase and one from the catch trial after adaptation. The initial outward part of the catch trial trajectory, the initial movement is very straight, implying that similar motor commands were used to those required by a visuomotor shift. 5.2 Results We compared the average performance in the visual and proprioceptive alignment tests before and after adaptation in the velocity-dependent force field. The results are summarized in Figure 6(a). Most subjects exhibited small but significant shifts in performance in both the visual and proprioceptive alignment tests. Two subjects exhibited shifts which were more than two standard deviations away from the average shift and were excluded from the analysis. We found significant lateral shifts in both visual and proprioceptive localization error in the direction of the perturbation (both p < .05, one-tailed paired t-test). Figure 6(b) shows the same data for the direction perpendicular to the perturbation. Although the initial localization bias was high, there was no significant shift in this direction following adaptation. We quantified each subject’s performance on each trial as the perpendicular distance of the furthest point in the trajectory from the straight line between the starting point and the target (Fig. 5.1(b)). We fitted the Bayesian and MLE-based models to the data following the same procedure as before, only this time penalizing the disagreement between the model and the data for the alignment tests, in addition to the reaching performance. Figure 7 illustrates the averaged data along with the model fits. Both models were able to account reasonably well for the trends in reaching performance across trials (7(a)). Figures 7(b) and 7(c) show the model fits for the perceptual localization task. The Bayesian model is able to account for both the extent of the shift and the timecourse of this shift during adaptation. 0 20 40 60 80 100 −3 −2 −1 0 1 2 3 Trial Number Performance Error / cm (a) Reaching Performance Data Bayesian Model MLE Model 0 20 40 60 80 100 −2 0 2 4 (b) Visual Alignment Trial Number Alignment Error / cm 0 20 40 60 80 100 −2 0 2 4 (c) Proprioceptive Alignment Trial Number Alignment Error / cm Figure 7: Trial-by-trial data and model fits. (a) Reaching error, (b) Visual alignment test error, (c) Proprioceptive alignment test error. The Bayesian (solid blue lines) and MLEbased (dashed red lines) were fitted to averaged data across subjects (circles). Since there was never any sensory discrepancy, the MLE-based model predicted no change in the localization task. 6 Conclusions and discussion Our experimental results demonstrate that adaptation of reaching movements in a force field results in shifts in visual and proprioceptive spatial perception. This novel finding strongly supports the Bayesian model, which predicted such adaptation, and refutes the MLE-based model, which did not. The Bayesian model was able to account for the trends in both reaching performance and alignment test errors on a trial-to-trial basis. Several recent models have similarly described motor adaptation as a process of Bayesian inference of the potential causes of observed error. K¨ording et al. [3] proposed a model of saccade adaptation and Krakauer et al. [4] modelled visuomotor adaptation based on this principle. Our work extends the framework of these models to include multiple observation modalities instead of just one, and multiple classes of disturbances which affect the different observation modalities in different, experimentally measurable ways. Overall, our results suggest that the nervous system solves the problems of sensory and motor adaptation in a principled and unified manner, supporting the view that sensorimotor adaptation proceeds according to optimal estimation of encountered disturbances. References [1] Opher Donchin, Joseph T Francis, and Reza Shadmehr. Quantifying generalization from trial-by-trial behavior of adaptive systems that learn with basis functions: theory and experiments in human motor control. J Neurosci, 23(27):9032–9045, Oct 2003. [2] Z. Ghahramani, D.M. Wolpert, and M.I. Jordan. Computational models for sensorimotor integration. In P.G. Morasso and V. Sanguineti, editors, Self-Organization, Computational Maps and Motor Control, pages 117–147. North-Holland, Amsterdam, 1997. [3] Konrad P. K¨ording, Joshua B. Tenenbaum, and Reza Shadmehr. The dynamics of memory as a consequence of optimal adaptation to a changing body. Nat Neurosci, 10(6):779–786, June 2007. [4] John W Krakauer, Pietro Mazzoni, Ali Ghazizadeh, Roshni Ravindran, and Reza Shadmehr. Generalization of motor learning depends on the history of prior action. PLoS Biol, 4(10):e316, Sep 2006. [5] M.C. Simani, L.M. McGuire, and P.N. Sabes. Visual-shift adaptation is composed of separable sensory and task-dependent effects. J Neurophysiol, 98:2827–2841, Nov 2007. [6] K A Thoroughman and R Shadmehr. Learning of action through adaptive combination of motor primitives. Nature, 407(6805):742–747, Oct 2000. [7] Robert J van Beers, Daniel M Wolpert, and Patrick Haggard. When feeling is more important than seeing in sensorimotor adaptation. Curr Biol, 12(10):834–837, May 2002.
2008
16
3,409
Bounds on marginal probability distributions Joris Mooij MPI for Biological Cybernetics T¨ubingen, Germany joris.mooij@tuebingen.mpg.de Bert Kappen Department of Biophysics Radboud University Nijmegen, the Netherlands b.kappen@science.ru.nl Abstract We propose a novel bound on single-variable marginal probability distributions in factor graphs with discrete variables. The bound is obtained by propagating local bounds (convex sets of probability distributions) over a subtree of the factor graph, rooted in the variable of interest. By construction, the method not only bounds the exact marginal probability distribution of a variable, but also its approximate Belief Propagation marginal (“belief”). Thus, apart from providing a practical means to calculate bounds on marginals, our contribution also lies in providing a better understanding of the error made by Belief Propagation. We show that our bound outperforms the state-of-the-art on some inference problems arising in medical diagnosis. 1 Introduction Graphical models are used in many different fields. A fundamental problem in the application of graphical models is that exact inference is NP-hard [1]. In recent years, much research has focused on approximate inference techniques, such as sampling methods and deterministic approximation methods, e.g., Belief Propagation (BP) [2]. Although the approximations obtained by these methods can be very accurate, there are only few useful guarantees on the error of the approximation, and often it is not known (without comparing with the intractable exact solution) how accurate an approximate result is. Thus it is desirable to calculate, in addition to the approximate results, tight bounds on the approximation error. There exist various methods to bound the BP error [3, 4, 5, 6], which can be used, in conjunction with the results of BP, to calculate bounds on the exact marginals. Furthermore, upper bounds on the partition sum, e.g., [7, 8], can be combined with lower bounds on the partition sum, such as the well-known mean field bound or higher-order lower bounds [9], to obtain bounds on marginals. Finally, a method called Bound Propagation [10] directly calculates bounds on marginals. However, most of these bounds (with the exception of [3, 10]) have only been formulated for the special case of pairwise interactions, which limits their applicability, excluding for example the interesting class of Bayesian networks. In this contribution we describe a novel bound on exact single-variable marginals in factor graphs which is not limited to pairwise interactions. The original motivation for this work was to better understand and quantify the BP error. This has led to bounds which are at the same time bounds for the exact single-variable marginals as well as for the BP beliefs. A particularly nice feature of our bounds is that their computational cost is relatively low, provided that the number of possible values of each variable in the factor graph is small. On the other hand, the computational complexity is exponential in the number of possible values of the variables, which limits application to factor graphs in which each variable has a low number of possible values. On these factor graphs however, our bound can significantly outperform existing methods, either in terms of accuracy or in terms of computation time (or both). We illustrate this on two toy problems and on real-world problems arising in medical diagnosis. The basic idea underlying our method is that we recursively propagate bounds over a particular subtree of the factor graph. The propagation rules are similar to those of Belief Propagation; however, instead of propagating messages, we propagate convex sets of messages. This can be done in such a way that the final “beliefs” at the root node of the subtree are convex sets which contain the exact marginal of the root node (and, by construction, also its BP belief). In the next section, we describe our method in more detail. Due to space constraints, we have omitted the proofs and other technical details; these are provided in a technical report [11], which also reports additional experimental results and presents an extension that uses self-avoiding-walk trees instead of subtrees (inspired by [6]). 2 Theory 2.1 Preliminaries Factorizing probability distributions. Let V := {1, . . . , N} and consider N discrete random variables (xi)i∈V. Each variable xi takes values in a discrete domain Xi. We will use the following multi-index notation: let A = {i1, i2, . . . , im} ⊆V with i1 < i2 < . . . im; we write XA := Xi1 × Xi2 × · · · × Xim and for any family (Yi)i∈B with A ⊆B ⊆V, we write YA := (Yi1, Yi2, . . . , Yim). We consider a probability distribution over x = (x1, . . . , xN) ∈XV that can be written as a product of factors (ψI)I∈F: P(x) = 1 Z Y I∈F ψI(xNI), where Z = X x∈XV Y I∈F ψI(xNI). (1) For each factor index I ∈F, there is an associated subset NI ⊆V of variable indices and the factor ψI is a nonnegative function ψI : XNI →[0, ∞). For a Bayesian network, the factors are (conditional) probability tables. In case of Markov random fields, the factors are often called potentials. In general, the normalizing constant (“partition sum”) Z is not known and exact computation of Z is infeasible, due to the fact that the number of terms to be summed is exponential in the number of variables N. Similarly, computing marginal distributions P(xA) for subsets of variables A ⊆V is intractable in general. In this article, we focus on the task of obtaining rigorous bounds on single-variable marginals P(xi) = P xV\{i} P(x). Factor graphs. We can represent the structure of the probability distribution (1) using a factor graph (V, F, E). This is a bipartite graph, consisting of variable nodes i ∈V, factor nodes I ∈F, and edges e ∈E, with an edge {i, I} between i ∈V and I ∈F if and only if the factor ψI depends on xi (i.e., if i ∈NI). We will represent factor nodes visually as rectangles and variable nodes as circles. Figure 1(a) shows a simple example of a factor graph. The set of neighbors of a factor node I is precisely NI; similarly, we denote the set of neighbors of a variable node i by Ni := {I ∈F : i ∈NI}. We will assume throughout this article that the factor graph corresponding to (1) is connected. Convexity. We denote the set of extreme points of a convex set X ⊆Rd by ext (X). For a subset Y ⊆Rd, the convex hull of Y is defined as the smallest convex set X ⊆Rd with Y ⊆X; we denote the convex hull of Y as conv (Y ). Measures. For A ⊆V, define MA := [0, ∞)XA as the set of nonnegative functions on XA. Each element of MA can be identified with a finite measure on XA; therefore we will call the elements of MA “measures on A”. We write M∗ A := MA \ {0}. Operations on measures. Adding two measures Ψ, Φ ∈MA results in the measure Ψ+Φ in MA. For A, B ⊆V, we can multiply a measure on MA with a measure on MB to obtain a measure on MA∪B; a special case is multiplication with a scalar. Note that there is a natural embedding of MA in MB for A ⊆B ⊆V obtained by multiplying a measure Ψ ∈MA by 1B\A ∈MB\A, the constant function with value 1 on XB\A. Another important operation is the partial summation: given A ⊆B ⊆V and Ψ ∈MB, define P xA Ψ to be the measure in MB\A obtained by summing Ψ over all xa ∈XA, i.e., P xA Ψ : xB\A 7→P xA∈XA Ψ(xA, xB\A). Operations on sets of measures. We will define operations on sets of measures by applying the operation on elements of these sets and taking the set of the resulting measures; e.g., if we have two subsets ΞA ⊆MA and ΞB ⊆MB for A, B ⊆V, we define the product of the sets ΞA and ΞB to be the set of the products of elements of ΞA and ΞB, i.e., ΞAΞB := {ΨAΨB : ΨA ∈ΞA, ΨB ∈ΞB}. Completely factorized measures. For A ⊆V, we will define QA to be the set of completely factorized measures on A, i.e., QA := Q a∈A M{a}. Note that MA is the convex hull of QA. Indeed, we can write each measure Ψ ∈MA as a convex combination of measures in QA which are zero everywhere except at one particular value of their argument. We denote Q∗ A := QA \ {0}. Normalized (probability) measures. We denote with PA the set of probability measures on A, i.e., PA = {Ψ ∈MA : P xA Ψ = 1}. The set PA is called a simplex. Note that a simplex is convex; the simplex PA has precisely #(XA) extreme points, each of which corresponds to putting all probability mass on one of the possible values of xA. We define the normalization operator N which normalizes measures, i.e., for Ψ ∈M∗ A we define NΨ := 1 Z Ψ with Z = P xA Ψ. Boxes. Let a, b ∈Rd such that aα ≤bα for all components α = 1, . . . , d. Then we define the box with lower bound a and upper bound b by B (a, b) := {x ∈Rd : aα ≤xα ≤ bα for all α = 1, . . . , d}. Note that a box is convex; indeed, its extreme points are the “corners” of which there are 2d. Smallest bounding boxes. Let X ⊆Rd be bounded. The smallest bounding box of X is defined as B (X) := B (a, b) where the lower bound a is given by the pointwise infimum of X and the upper bound b is given by the pointwise supremum of X, that is aα := inf{xα : x ∈X} and bα := sup{xα : x ∈X} for all α = 1, . . . , d. Note that B (X) = B (conv (X)). Therefore, if X is convex, the smallest bounding box for X depends only on the extreme points ext (X), i.e., B (X) = B (ext (X)); this bounding box can be easily calculated if the number of extreme points is not too large. 2.2 The basic tools To calculate marginals of subsets of variables in some factor graph, several operations performed on measures are relevant: normalization, taking products of measures, and summing over subsets of variables. Here we study the interplay between convexity and these operations. This will turn out to be useful later on, because our bounds make use of convex sets of measures that are propagated over the factor graph. The interplay between convexity and normalization, taking products and partial summation is described by the following lemma. Lemma 1 Let A ⊆V and let Ξ ⊆M∗ A. Then: 1. conv (NΞ) = N(conv Ξ); 2. for all B ⊆V, Ψ ∈MB: conv (ΨΞ) = Ψ(conv Ξ); 3. for all B ⊆A: conv P xB Ξ  = P xB conv Ξ. □ The next lemma concerns the interplay between convexity and taking products; it says that if we take the product of convex sets of measures on different spaces, the resulting set is contained in the convex hull of the product of the extreme points of the convex sets. Lemma 2 Let (At)t=1,...,T be disjoint subsets of V. For each t = 1, . . . , T, let Ξt ⊆MAt be convex with a finite number of extreme points. Then conv QT t=1 Ξt  = conv QT t=1 ext Ξt  . □ The third lemma says that the product of several boxes on the same subset A of variables can be easily calculated: the product of the boxes is again a box, with as lower (upper) bound the product of the lower (upper) bounds of the boxes. Lemma 3 Let A ⊆V and for each t = 1, . . . , T, let Ψt, Ψt ∈MA such that Ψt ≤Ψt. Then QT t=1 B Ψt, Ψt  = B QT t=1 Ψt, QT t=1 Ψt  . □ We are now ready to state the basic lemma. It basically says that one can bound the marginal of a variable by replacing a factor depending on some other variables by a product of single-variable (a) i j k J K L (b) i j k J K δ j′ L (c) i j k J K ? j′ L ? (d) i j k J K L (e) i j k J K L Pj Pj Bi BJ→i BK→i Bj→J Bk→K BL→k BL→j Bj→L Figure 1: (a) Example factor graph with three variable nodes (i, j, k) and three factor nodes (J, K, L), with probability distribution P(xi, xj, xk) = 1 Z ψJ(xi, xj)ψK(xi, xk)ψL(xj, xk); (b) Cloning node j by adding a new variable j′ and a factor ψδ(xj, xj′) = δxj(xj′); (c) Illustration of the bound on P(xi) based on (b): “what can we say about the range of P(xi) when the factors corresponding to the nodes marked with question marks are arbitrary?”; (d) Subtree of the factor graph; (e) Propagating convex sets of measures (boxes or simplices) on the subtree (d), leading to a bound Bi on the marginal probability of xi in G. factors and bounding the result. This can be exploited to simplify the computational complexity of bounding the marginal. An example of its use will be given in the next subsection. Lemma 4 Let A, B, C ⊆V be mutually disjoint subsets of variables. Let Ψ ∈MA∪B∪C such that for each xC ∈XC, P xA∪B Ψ > 0. Then: B N X xB,xC ΨM∗ C !! = B N X xB,xC ΨQ∗ C !! . Proof. Note that M∗ C is the convex hull of Q∗ C and apply Lemma 1. □ The positivity condition is a technical condition, which in our experience is fulfilled for many practically relevant factor graphs. 2.3 A simple example Before proceeding to our main result, we first illustrate for a simple case how the basic lemma can be employed to obtain computationally tractable bounds on marginals. We derive a bound for the marginal of the variable xi in the factor graph in Figure 1(a). We start by cloning the variable xj, i.e., adding a new variable xj′ that is constrained to take the same value as xj. In terms of the factor graph, we add a variable node j′ and a factor node δ, connected to variable nodes j and j′, with corresponding factor ψδ(xj, xj′) := δxj(xj′); see also Figure 1(b). Clearly, the marginal of xi satisfies: P(xi) = N  X xj X xk ψJψKψL  = N  X xj X xj′ X xk ψJψKψLδxj(xj′)   where it should be noted that the first occurrence of ψL is shorthand for ψL(xj, xk), but the second occurrence is shorthand for ψL(xj′, xk). Noting that ψδ ∈M∗ {j,j′} and applying the basic lemma with A = {i}, B = {k}, C = {j, j′} and Ψ = ψJψKψL yields: P(xi) ∈N  X xj X xj′ X xk ψJψKψLM∗ {j,j′}  ∈BN  X xj X xj′ X xk ψJψKψLQ∗ {j,j′}  . Applying the distributive law, we obtain (see also Figure 1(c)): P(xi) ∈BN    X xj ψJM∗ {j}    X xk ψK X xj′ ψLM∗ {j′}    , which we relax to P(xi) ∈BN  BN  X xj ψJP{j}  BN  X xk ψKBN  X xj′ ψLP{j′}      . Now it may seem that this smallest bounding box would be difficult to compute. Fortunately, we only need to compute the extreme points of these sets because of convexity. Since smallest bounding boxes only depend on extreme points, we conclude that P(xi) ∈BN  BN  X xj ψJext P{j}  BN  X xk ψKBN  X xj′ ψLext P{j′}      . which can be calculated efficiently if the number of possible values of each variable is small. 2.4 The main result The example in the previous subsection can be generalized as follows. First, one chooses a particular subtree of the factor graph, rooted in the variable for which one wants to calculate a bound on its marginal. Then, one propagates messages (which are either bounding boxes or simplices) over this subtree, from the leaf nodes towards the root node. The update equations resemble those of Belief Propagation. The resulting “belief” at the root node is a box that bounds the exact marginal of the root node. The choice of the subtree is arbitrary; different choices lead to different bounds in general. We now describe this “box propagation” algorithm in more detail. Definition 5 Let (V, F, E) be a factor graph. We call the bipartite graph (V, F, E) a subtree of (V, F, E) with root i if i ∈V ⊆V, F ⊆F, E ⊆E such that (V, F, E) is a tree with root i and for all {j, J} ∈E, j ∈V and J ∈F (i.e., there are no “loose edges”).1 We denote the parent of j ∈V according to (V, F, E) by par(j) and similarly, we denote the parent of J ∈F by par(J). An illustration of a possible subtree of the factor graph in Figure 1(a) is the one shown in Figure 1(d). The bound that we will obtain using this subtree corresponds to the example described in the previous subsection. In the following, we will use the topology of the original factor graph (V, F, E) whenever we refer to neighbors of variables or factors. Each edge of the subtree will carry one message, oriented such that it “flows” towards the root node. In addition, we define messages entering the subtree for all “missing” edges in the subtree (see also Figure 1(e)). Because of the bipartite character of the factor graph, we can distinguish two types of messages: messages BJ→j ⊆Mj sent to a variable j ∈V from a neighboring factor J ∈Nj, and messages Bj→J ⊆Mj sent to a factor J ∈F from a neighboring variable j ∈NJ. The messages entering the subtree are all defined to be simplices; more precisely, we define the incoming messages Bj→J = Pj for all J ∈F, {j, J} ∈E \ E BJ→j = Pj for all j ∈V , {j, J} ∈E \ E. We propagate messages towards the root i of the tree using the following update rules (note the similarity with the BP update rules). The message sent from a variable j ∈V to its parent J = par(j) ∈F is defined as Bj→J =    Y K∈Nj\J BK→j if all incoming BK→j are boxes Pj if at least one of the BK→j is the simplex Pj, where the product of the boxes can be calculated using Lemma 3. The message sent from a factor J ∈F to its parent k = par(J) ∈V is defined as BJ→k = BN  X xNJ \k ψJ Y l∈NJ\k Bl→J  = BN  X xNJ \k ψJ Y l∈NJ\k ext Bl→J  , (2) 1Note that this corresponds to the notion of subtree of a bipartite graph; for a subtree of a factor graph, one sometimes imposes the additional constraint that for all factors J ∈F, all its connecting edges {J, j} with j ∈NJ have to be in E; here we do not impose this additional constraint. where the second equality follows from Lemmas 1 and 2. The final “belief” Bi at the root node i is calculated by Bi =      BN Y K∈Ni BK→i ! if all incoming BK→i are boxes Pi if at least one of the BK→i is the simplex Pi. We can now formulate our main result, which gives a rigorous bound on the exact single-variable marginal of the root node: Theorem 6 Let (V, F, E) be a factor graph with corresponding probability distribution (1). Let i ∈V and (V, F, E) be a subtree of (V, F, E) with root i ∈V . Apply the “box propagation” algorithm described above to calculate the final “belief” Bi on the root node i. Then P(xi) ∈Bi. Proof sketch The first step consists in extending the subtree such that each factor node has the right number of neighboring variables by cloning the missing variables. The second step consists of applying the basic lemma where the set C consists of all the variable nodes of the subtree which have connecting edges in E \ E, together with all the cloned variable nodes. Then we apply the distributive law, which can be done because the extended subtree has no cycles. Finally, we relax the bound by adding additional normalizations and smallest bounding boxes at each factor node in the subtree. It should now be clear that the “box propagation” algorithm described above precisely calculates the smallest bounding box at the root node i that corresponds to this procedure. □ Because each subtree of the orginal factor graph is also a subtree of the computation tree for i [12], the bounds on the (exact) marginals that we just derived are at the same time bounds on the approximate Belief Propagation marginals (beliefs): Corollary 7 In the situation described in Theorem 6, the final bounding box Bi also bounds the (approximate) Belief Propagation marginal of the root node i, i.e., PBP (xi) ∈Bi. □ 2.5 Related work We briefly discuss the relationship of our bound to previous work. More details are provided in [11]. The bound in [6] is related to the bound we present here; however, the bound in [6] differs from ours in that it (i) goes deeper into the computation tree by propagating bounds over self-avoiding-walk (SAW) trees instead of mere subtrees, (ii) uses a different parameterization of the propagated bounds and a different update rule, and (iii), it is only formulated for the special case of factors depending on two variables, while it is not entirely obvious how to extend the result to more general factor graphs. Another method to obtain bounds on exact marginals is “Bound Propagation” [10]. The idea underlying Bound Propagation is very similar to the one employed in this work, with one crucial difference. For a variable i ∈V, we define the sets ∆i := S Ni (consisting of all variables that appear in some factor in which i participates) and ∂i := ∆i \ {i} (the Markov blanket of i). Whereas our method uses a cavity approach, using as basis equation P(xi) ∝ X x∂i Y I∈Ni ψI ! P\i(x∂i), P\i(x∂i) ∝ X xV\∆i Y I∈F\Ni ψI and bound the quantity P(xi) by optimizing over P\i(x∂i), the basis equation employed by Bound Propagation is P(xi) = P x∂i P(xi | x∂i)P(x∂i) and the optimization is over P(x∂i). Unlike in our case, the computational complexity of Bound Propagation is exponential in the size of the Markov blanket, because of the required calculation of the conditional distribution P(xi | x∂i). On the other hand, the advantage of this approach is that a bound on P(xj) for j ∈∂i is also a bound on P(x∂i), which in turn gives rise to a bound on P(xi). In this way, bounds can propagate through the graphical model, eventually yielding a new (tighter) bound on P(x∂i). Although the iteration can result in rather tight bounds, the main disadvantage of Bound Propagation is its computational cost: it is exponential in the Markov blanket and often many iterations are needed for the bounds to become tight. 0.0001 0.001 0.01 0.1 1 0.0001 0.001 0.01 0.1 1 Gaps [10] Gaps BoxProp PROMEDAS 0 0.2 0.4 0.6 0.8 1 0 0.2 0.4 0.6 0.8 1 Gaps [6] Gaps BoxProp 100x100 grid, strong interactions [4] [5] BoxProp [6] [10] [3]+[8] MF-[8] [9]-[8] MF-[7] [9]-[7] 0.001 0.01 0.1 1 Gaps 8x8 toroidal grid, medium interactions Figure 2: Comparisons of various methods on different factor graphs: PROMEDAS (left), a large grid with strong interactions (middle) and a small grid with medium-strength interactions (right). 3 Experiments In this section, we present only few empirical results due to space constraints. More details and additional experimental results are given in [11]. We have compared different methods for calculating bounds on single-variable marginals; for each method and each variable, we calculated the gap (tightness) of the bound, which we defined as the ℓ∞distance between the upper and lower bound of the bounding box. We have investigated three different types of factor graphs; the results are shown in Figure 2. The factor graphs used for our experiments are provided as supplementary material to the electronic version of this article at books.nips.cc. We also plan to release the source code of several methods as part of a new release of the approximate inference library libDAI [13]. For our method, we chose the subtrees in a breadth-first manner. First, we applied our bound on simulated PROMEDAS patient cases [14]. These factor graphs have binary variables and singleton, pairwise and triple interactions (containing zeros). We generated nine different random instances. For each instance, we calculated bounds for each “finding” variable in that instance using our method (“BOXPROP”) and the method in [10]. Note that the tightness of both bounds varies widely depending on the instance and on the variable of interest. Our bound was tighter than the bound from [10] for all but one out of 1270 variables. Furthermore, whereas [10] had only finished on 7 out of 9 instances after running for 75000 s (after which we decided to abort the calculation on the remaining two instances), our method only needed 51 s to calculate all nine instances. We also compared our method with the method described in [6] on a large grid of 100 × 100 binary (±1-valued) variables with strong interactions. Note that this is an intractable problem for exact inference methods. The single-variable factors were chosen as exp(θixi) with θi ∼N(0, 1), the pair factors were exp(θijxixj) with θij ∼N(0, 1). We truncated the subtree to 400 nodes and the SAW tree to 105 nodes. Note that our method yields the tightest bound for almost all variables. Finally, we compared our method with several other methods referred to in Section 1 on a small 8 × 8 grid with medium-strength interactions (similarly chosen as for the large grid, but with θi ∼N(0, 0.22) and θij ∼N(0, 0.22)). The small size of the grid was necessary because some methods would need several days to handle a large grid. In this case, the method by [6] yields the tightest bounds, followed by [10], and our method gets a third place. Note that many methods return completely uninformative bounds in this case. 4 Conclusion and discussion We have described a novel bound on exact single-variable marginals, which is at the same time a bound on the (approximate) Belief Propagation marginals. Contrary to many other existing bounds, it is formulated for the general case of factor graphs with discrete variables and factors depending on an arbitrary number of variables. The bound is calculated by propagating convex sets of measures over a subtree of the factor graph, with update equations resembling those of BP. For variables with a limited number of possible values, the bounds can be computed efficiently. We have compared our bounds with existing methods and conclude that our method belongs to the best methods, but that it is difficult to say in general which method will yield the tightest bounds for a given variable in a specific factor graph. Our method could be further improved by optimizing over the choice of the subtree. Although our bounds are a step forward in quantifying the error of Belief Propagation, the actual error made by BP is often at least one order of magnitude lower than the tightness of these bounds. This is due to the fact that (loopy) BP cycles information through loops in the factor graph; this cycling apparently often improves the results. The interesting and still unanswered question is why it makes sense to cycle information in this way and whether this error reduction effect can be quantified. Acknowledgments We thank Wim Wiegerinck for several fruitful discussions, Bastian Wemmenhove for providing the PROMEDAS test cases, and Martijn Leisink for kindly providing his implementation of Bound Propagation. The research reported here was supported by the Interactive Collaborative Information Systems (ICIS) project (supported by the Dutch Ministry of Economic Affairs, grant BSIK03024), the Dutch Technology Foundation (STW), and the IST Programme of the European Community, under the PASCAL2 Network of Excellence, IST-2007-216886. References [1] G.F. Cooper. The computational complexity of probabilistic inferences. Artificial Intelligence, 42(23):393–405, March 1990. [2] J. Pearl. Probabilistic Reasoning in Intelligent systems: Networks of Plausible Inference. Morgan Kaufmann, San Francisco, CA, 1988. [3] M.J. Wainwright, T.S. Jaakkola, and A.S. Willsky. Tree-based reparameterization framework for analysis of sum-product and related algorithms. IEEE Transactions on Information Theory, 49(5):1120–1146, May 2003. [4] S. C. Tatikonda. Convergence of the sum-product algorithm. In Proceedings 2003 IEEE Information Theory Workshop, pages 222–225, April 2003. [5] Nobuyuki Taga and Shigeru Mase. Error bounds between marginal probabilities and beliefs of loopy belief propagation algorithm. In MICAI, pages 186–196, 2006. [6] A. Ihler. Accuracy bounds for belief propagation. In Proceedings of the 23th Annual Conference on Uncertainty in Artificial Intelligence (UAI-07), July 2007. [7] T. S. Jaakkola and M. Jordan. Recursive algorithms for approximating probabilities in graphical models. In Proc. Conf. Neural Information Processing Systems (NIPS 9), pages 487–493, Denver, CO, 1996. [8] M. J. Wainwright, T. Jaakkola, and A. S. Willsky. A new class of upper bounds on the log partition function. IEEE Transactions on Information Theory, 51:2313–2335, July 2005. [9] M. A. R. Leisink and H. J. Kappen. A tighter bound for graphical models. In Lawrence K. Saul, Yair Weiss, and L´eon Bottou, editors, Advances in Neural Information Processing Systems 13 (NIPS*2000), pages 266–272, Cambridge, MA, 2001. MIT Press. [10] M. Leisink and B. Kappen. Bound propagation. Journal of Artificial Intelligence Research, 19:139–154, 2003. [11] J. M. Mooij and H. J. Kappen. Novel bounds on marginal probabilities. arXiv.org, arXiv:0801.3797 [math.PR], January 2008. Submitted to Journal of Machine Learning Research. [12] S. C. Tatikonda and M. I. Jordan. Loopy belief propagation and Gibbs measures. In Proc. of the 18th Annual Conf. on Uncertainty in Artificial Intelligence (UAI-02), pages 493–500, San Francisco, CA, 2002. Morgan Kaufmann Publishers. [13] J. M. Mooij. libDAI: A free/open source C++ library for discrete approximate inference methods, 2008. http://mloss.org/software/view/77/. [14] B. Wemmenhove, J. M. Mooij, W. Wiegerinck, M. Leisink, H. J. Kappen, and J. P. Neijt. Inference in the Promedas medical expert system. In Proceedings of the 11th Conference on Artificial Intelligence in Medicine (AIME 2007), volume 4594 of Lecture Notes in Computer Science, pages 456–460. Springer, 2007.
2008
160
3,410
Relative Performance Guarantees for Approximate Inference in Latent Dirichlet Allocation Indraneel Mukherjee David M. Blei Department of Computer Science Princeton University 35 Olden Street Princeton, NJ 08540 {imukherj,blei}@cs.princeton.edu Abstract Hierarchical probabilistic modeling of discrete data has emerged as a powerful tool for text analysis. Posterior inference in such models is intractable, and practitioners rely on approximate posterior inference methods such as variational inference or Gibbs sampling. There has been much research in designing better approximations, but there is yet little theoretical understanding of which of the available techniques are appropriate, and in which data analysis settings. In this paper we provide the beginnings of such understanding. We analyze the improvement that the recently proposed collapsed variational inference (CVB) provides over mean field variational inference (VB) in latent Dirichlet allocation. We prove that the difference in the tightness of the bound on the likelihood of a document decreases as O(k−1)+ p log m/m, where k is the number of topics in the model and m is the number of words in a document. As a consequence, the advantage of CVB over VB is lost for long documents but increases with the number of topics. We demonstrate empirically that the theory holds, using simulated text data and two text corpora. We provide practical guidelines for choosing an approximation. 1 Introduction Hierarchical probabilistic models of discrete data have emerged as powerful tool for large-scale text analysis. Based on latent semantic indexing (LSI) [1] and probabilistic latent semantic indexing (pLSI) [2], hierarchical topic models [3, 4] have been extended and applied to sequential settings [5, 6], authorship [7], email [8], social networks [9, 10], computer vision [11, 12], bioinformatics [5, 13], information retrieval [14], and other application areas [15, 16, 17, 18]. See [19] for a good review. A topic model posits a generative probabilistic process of a document collection using a small number of distributions over words, which are called topics. Conditioned on the observed documents, the distribution of the underlying latent variables is inferred to probabilistically partition the data according to their hidden themes. Research in topic models has involved tailoring the latent structure to new kinds of data and designing new posterior inference algortihms to infer that latent structure. In generative models, such as latent Dirichlet allocation (LDA) and its extensions, inferring the posterior of the latent variables is intractable [3, 4]. (Some topic models, such as LSI and pLSI, are not fully generative.) Several algorithms have emerged in recent years to approximate such posteriors, including mean-field variational inference [3], expectation propagation [20], collapsed Gibbs sampling [19] and, most recently, collapsed variational inference [21]. Choosing from among the several available algorithms is difficult. There has been some empirical comparison in the topic modeling literature [4, 19], but little theoretical guidance. 1 We provide some of the first theoretical understanding of which of the available techniques is appropriate, and in which data analysis settings. We analyze two variational inference algorithms for topic models, mean field variational inference (VB) [3] and collapsed variational inference (CVB) [21]. “Collapsing,” or marginalizing out, a latent variable is a known technique for speeding up the convergence of Gibbs samplers, and CVB brought this idea to the world of variational algorithms. Empirically, CVB was more accurate than VB for LDA [21]. The advantage of CVB applied to Dirichlet process mixtures was less conclusive [22]. Variational algorithms minimize the distance between a simple distribution of the latent variables and the true posterior. This is equivalent to maximizing a lower bound on the log probability of a document. We prove that the uncollapsed variational bound on the log probability of a document approaches the collapsed variational bound as the number of words in the document increases. This supports the empirical improvement observed for LDA, where documents are relatively short, and the smaller improvement observed in the DP mixture, which is akin to inference in a single long document. We also show how the number of topics and the sparsity of those topics affects the performance of the two algorithms. We prove that the difference between the two bounds decreases as O(k −1) + p log m/m, where k is the number of topics in the model, and m is the number of words in the document. Thus, the advantage of CVB over VB is lost for longer documents. We examine the consequences of the theory on both simulated and real text data, exploring the relative advantage of CVB under different document lengths, topic sparsities, and numbers of topics. The consequences of our theory lead to practical guidelines for choosing an appropriate variational algorithm. 2 Posterior inference for latent Dirichlet allocation Latent Dirichlet allocation (LDA) is a model of an observed corpus of documents. Each document is a collection of m words x1:m, where each word is from a fixed vocabulary χ of size N. The model parameters are k topics, β1, . . . , βk, each of which is a distribution on χ, and a k-vector ⃗α, which is the parameter to a Dirichlet over the (k −1)-simplex. The topic matrix β denotes the N × k matrix whose columns are the topic distributions. Given the topic matrix and Dirichlet parameters, LDA assumes that each document arises from the following process. First, choose topic proportions θ ∼D(⃗α). Then, for each word choose a topic assignment zi ∼θ. Finally, choose the word xi ∼βzi. This describes a joint probability distribution of the observed and latent variables p(⃗x,⃗z, θ|⃗α, β). Analyzing data with LDA involves two tasks. In parameter estimation, we find the topics and Dirichlet parameters that maximize the likelihood of an observed corpus. In posterior inference, we fix the model and compute the posterior distribution of the latent structure that underlies a particular document. Here, we focus on posterior inference. (Parameter estimation crucially depends on posterior inference via the expectation-maximization algorithm.) Given a document ⃗x, the posterior distribution of the latent variables is p(θ,⃗z|⃗x) = p(θ,⃗z,⃗x) p(⃗x) . This distribution is infeasible to compute exactly because of the difficulty in computing the normalizing constant, i.e., the marginal probability of the document, p(⃗x) = Γ(P z αz) Q z Γ(αz) X ⃗z Z Y z θαz−1 z ! Y i βzi,xiθzi ! dθ. Approximating the posterior is equivalent to approximating the normalizing constant. Variational methods approximate an intractable posterior by finding the member of a simpler family of distributions that is closest to it, where closeness is measured by relative entropy. This is equivalent to minimizing the Jensen’s bound on the negative log probability of the data [23]. We will analyze two alternative variational methods. Variational inference for LDA In the variational inference algorithm for LDA introduced in [3] (VB), the posterior p(θ,⃗z|⃗x) is approximated by a fully-factorized variational distribution q(θ,⃗z|⃗γ, φ1:m) = q(θ|⃗γ) Q i q(zi|φi). 2 Here q(θ|⃗γ) is a Dirichlet distribution with parameters ⃗γ, and each q(zi|φi) is a multinomial distribution on the set of K topic indices. This family does not contain the true posterior. In the true posterior, the latent variables are dependent; in this family of distributions, they are independent [3]. The algorithm seeks to find the variational parameters that minimize the relative entropy between the true posterior and the approximation, RE(q(θ,⃗z|⃗γ, φ1:m) ∥p(θ,⃗z|⃗x)). This is equivalent to finding the optimal parameters ⃗γ∗, φ∗ 1:m as follows: (⃗γ∗, φ∗ 1:m) = arg min ⃗γ,φ1:m  Eq(θ,⃗z|⃗γ,φ1:m) log q(θ,⃗z|⃗γ, φ1:m) p(θ,⃗z, ⃗x)  . The expression minimized by ⃗γ∗, φ∗ 1:m is also known as the variational free energy of (⃗γ, φ1:m) and will be denoted by F(⃗x,⃗γ, φ1:m). Note that F(⃗x,⃗γ∗, φ∗ 1:m) is the Jensen’s bound on the negative log probability of ⃗x. The value of the objective function is a measure of the quality of the VB approximation. We denote this with VB(⃗x) ∆= min ⃗γ,φ1:m F(⃗x,⃗γ, φ1:m). (1) Collapsed variational inference for LDA The collapsed variational inference algorithm (CVB) reformulates the LDA model by marginalizing out the topic proportions θ. This yields a formulation where the topic assignments z are fully dependent, but where the dimensionality of the latent space has been reduced. The variational family in CVB is a fully-factorized product of multinomial distributions, q(z) = Y i q(zi|φi). CVB finds the optimal variational parameters φ∗ 1:m as follows: φ∗ 1:m = arg min φ1:m  Eq(⃗z|φ1:m) log q(⃗z|φ1:m) p(⃗z, ⃗x)  . It approximates the negative log probability of ⃗x with the collapsed variational free energy F(⃗x,⃗γ), which is the expression that φ∗ 1:m minimizes. Analogous to VB, CVB’s performance is measured by CVB(⃗x) ∆= min φ1:m F(⃗x, φ1:m). (2) Both CVB(⃗x) and VB(⃗x) approximate the negative log probability of ⃗x by Jensen’s inequality. It has been shown that CVB(⃗x) will always be a better bound than VB(⃗x) [21]. Efficiency of the algorithms Both VB and CVB proceed by coordinate ascent to reach a local minimum of their respective free energies. CVB achieves higher accuracy at the price of increased computation. Each coordinate update for VB requires in O(mk) time, where m is the length of a document and k is the number of topics. Each coordinate update for CVB requires O(m2k) time. The CVB updates are prohibitive for large documents and, moreover, are numerically unstable. Both shortcomings are overcome in [21] by substituting exact computations with an efficient second-order Taylor approximation. This approximation, however, does not yield a proper bound.1 It is thus inappropriate for computing held out probability, a typical measure of quality of a topic model. For such a quantity, exact CVB implementation takes quadratic time. 3 Relative performance of VB and CVB We try to obtain a theoretical handle on the size of the advantage of CVB over VB, and how it is affected by the length of the document, the number of topics, and the structure of those topics. Our main result states that for sufficiently large documents, the difference in approximation quality decreases with document length and converges to a constant that depends on the number of topics. 1The first-order Taylor approximation yields an upper-bound, but these turn out to be too inaccurate. Such an estimate can yield bounds worse than those achieved by VB. 3 Theorem 1. Consider any LDA model with k topics, and a document consisting of m words x1, . . . , xm, where m is sufficiently large. Recall that VB(⃗x) and CVB(⃗x), defined in (1) and (2), are the free energies measured by VB and CVB respectively. Then, 0 ≤[VB(⃗x) −CVB(⃗x)] ≤O(k −1) + o(1) (3) for this model. Here o(1) goes to 0 at least as fast as q log m m . A strength of Theorem 1 is that it holds for any document, and not necessarily one generated by an LDA model. In previous work on analyzing mean-field variational inference, [24] analyze the performance of VB for posterior inference in a Gaussian mixture model. Unlike the assumptions in Theorem 1, their analysis requires that the data be generated by a specific model. Topic models are often evaluated and compared by approximation of the per-word log probability. Concerning this quantity, the following corollary is immediate because the total free energy scales with the length of the document. Corollary 1. The per word free energy change, as well as the percentage free energy change, between VB and CVB goes to zero with the length of the document. Our results are stated in log-space. The bounds on the difference in free energy is equivalent to a bound on the ratio of probability obtained by VB and CVB. Since the probability of a document falls exponentially fast with the number of words, the additive difference in the probability estimates of VB and CVB is again negligible for large documents. Corollary 2. For sufficiently long documents, the difference in probability estimates of CVB and VB decrease as cm−k for some constant c < 1 whose value depends on the model parameters β. The upper-bound in (3) is nearly tight. When all topics are uniform distributions, the difference in the free energy estimates is Ω(k) for long documents. 3.1 Proof Sketch We sketch the proof of Theorem 1. The full proof is in the supporting material. We first introduce some notation. We denote a vector with an arrow, like ⃗ν. All vectors have k real coordinates. νj will denote its coordinates, with j ∈[k] = {1, . . . , k}. When iterating over indices in [k], we will use the variable j. To iterate from 1 to m we will use i. We state three lemmas which are needed to prove (3). The left inequality in (3) follows from the fact that CVB optimizes over a larger family of distributions [21]. We concentrate on the right inequality. The first step is to carry out calculations similar to [24] to arrive at the following. Lemma 1. Suppose q(⃗z) = Q i qi(zi) is the optimal approximation to the posterior p(⃗z|⃗x). Then, VB(⃗x) −CVB(⃗x) ≤ X z Eq(⃗z)[log Γ(mj + αj)] −log Γ(γj + αj)  (4) where γj = P i qi(Zi = j), ∀j ∈[k], and mj is the number of occurrences of the topic j in ⃗z. Note that to analyze the term Eq(⃗z)[log Γ(mj + αj)] corresponding to a particular topic j, we need consider only those positions i where qi(Zi = j) ̸= 0; we denote the number of such positions by Nz. The difficulty in analyzing arbitrary documents lay in working with the right hand side of (4) without any prior knowledge about the qi’s. This was overcome by the following lemma. Lemma 2. Suppose Xi is Bernoulli random with probability qi, for i = 1 to m. Let f : R →R be convex, and γ ∈[0, m]. Then the following optimization problem is solved when each qi = γ m maxq1,...,qm E[f(X1 + . . . + Xm)] s.t. qi ∈[0, 1] q1 + . . . + qm = γ. As an immediate corollary of the previous two lemmas and the fact that log Γ is convex, we get VB(⃗x) −CVB(⃗x) ≤ X j E[log Γ(mj + αj)] −log Γ(γj + αj). 4 0 1000 2000 3000 4000 5000 0.000 0.005 0.010 0.015 0.020 0.025 βparam = 1e−04 # words free energy change 0 1000 2000 3000 4000 5000 0 10 20 30 40 50 60 70 βparam = 0.01 # words free energy change 0 1000 2000 3000 4000 5000 0 50 100 150 βparam = 0.1 # words free energy change (a) Difference in total free energy estimates 0 1000 2000 3000 4000 5000 0.0000 0.0005 0.0010 0.0015 βparam = 1e−04 # words free energy change k 5 10 25 50 0 1000 2000 3000 4000 5000 0.0 0.5 1.0 1.5 2.0 βparam = 0.01 # words free energy change k 5 10 25 50 0 1000 2000 3000 4000 5000 0.0 0.1 0.2 0.3 0.4 βparam = 0.1 # words free energy change k 5 10 25 50 (b) Percentage difference in free energy estimates Figure 1: Results on synthetic text data. We sample k topics from a symmetric Dirichlet distribution with parameter βparam. We sample 10 documents from LDA models with these topics. We consider prefixes of varying lengths for each document. For each prefix length, the VB and CVB free energies are averaged over the 10 documents.The curves obtained show how the advantage of CVB over VB changes with the length of a document, number of topics and sparsity of topics. where mj is now a Binomial random variable with probability γj m and number of trials m. The last piece of the proof is the following concentration lemma. Lemma 3. Let X be the number of heads in m coin tosses each with probability q. We require m > q−(2+o(1)). Let a > 0 be constants. Then 0 ≤E[log Γ(X + a)] −log Γ(E[X + a]) ≤O(1 −q) + o(1) (5) Here o(1) = O( q log m m ). The requirement of m > 1/q2+o(1) is necessary, and translates to the condition that document lengths be greater than (Nj/γj)2+o(1) for Theorem 1 to hold. This gives an implicit lower bound on the required length of a document which depends on the sparsity of the topics. (Sparse topics place their mass on few words, i.e., low entropy, and dense topics spread their mass on more words, i.e., high entropy). When the vocabulary is large, dense topics require long documents for the theory to take effect. This is supported by our simulations. 4 Empirical results We studied the results of this theory on synthetic and real text data. We implemented the algorithms described in [3] and [21]. While these algorithms are only guaranteed to find a local optimum of the objective, we aim to study whether our theorem about the global optimum is borne out in practice. 5 Synthetic data The synthetic data was generated as follows. We first sampled k topics β1, . . . , βk independently from a symmetric Dirichlet distribution with parameter βparam. We then sampled a corpus of 10 documents, each of length 5000 from an LDA model with these topics and Dirichlet hyper-parameter 1/k. The vocabulary size was 10000. For each document, we considered sub-documents of the first m words with lengths as small as 100. On each sub-document, we ran both VB and CVB initialized from a common point. For every subdocument length, the average converged values of the free energy was recorded for both algorithms. Thus, we obtain a trajectory representing how the advantage of CVB over VB changes with the number of words m. We repeated this simulation with different values of k to reveal the dependence of this advantage on the number of topics. Moreover, we investigated the dependence of the advantage on topic sparsity. We repeat the above experiment, with three different values of the Dirichlet parameter βparam for the topic matrix. The topics become sparse rapidly as βparam decreases. The results of this study are in Figure 1. We see similar trends across all data. The advantage decreases with document length m and increases with the number of topics k. The theory predicts that the difference in free energy converges to a constant, implying that the percentage advantage decays as O(1)/m. Figure 1 reveals this phenomenon. Moreover, the constant is estimated to be on the order of k, implying that the advantage is higher for more topics. Comparing the curves for different values of k reveals this fact. Finally, for denser topic models the performances of CVB and VB converge only for very long documents, as was discussed at the end of Section 3.1. When βparam = 0.1, CVB retains its advantage even for 5000 word long documents. Real-world corpora We studied the relative performance of the algorithms on two text data sets. First, we examined 3800 abstracts from the ArXiv, an on-line repository of scientific pre-prints. We restricted attention to 5000 vocabulary terms, removing very frequent and very infrequent terms. Second, we examined 1000 full documents from the Yale Law Journal. Again, we used a vocabulary of 5000 terms. Each data set was split into a training and test corpus. The ArXiv test corpus contained 2000 short documents. The Yale Law test corpus contained 200 documents of lengths between a thousand and 10, 000 words. For each data set, we fit LDA models of different numbers of topics to the training corpus (k = 5, 10, 25, 50), and then evaluated the model on the held-out test set. In Figure 2, we plot the percentage difference of the per-word variational free energies achieved by CVB and VB as a function of document length and number of topics. We also plot the difference in the total free energy. As for the simulated data, the graphs match our theory; the percent decrease in per word free energy goes to zero with increasing document length, and the absolute difference approaches a constant. The difference is more pronounced as the number of topics increases. The predicted trends occur even for short documents containing around a hundred words. Topics estimated from real-world data tend to be sparse. The issues seen with dense topics on simulated data are not relevant for real-world applications. 5 Conclusion We have provided a theoretical analysis of the relative performance of the two variational inference algorithms for LDA. We showed that the advantage of CVB decreases as document length increases, and increases with the number of topics and density of the topic distributions. Our simulations on synthetic and real-world data empirically confirm our theoretical bounds and their consequences. Unlike previous analyses of variational methods, our theorem does not require that the observed data arise from the assumed model. Since the approximation to the likelihood based on CVB is more expensive to compute than for VB, this theory can inform our choice of a good variational approximation. Shorter documents and models with more topics lend themselves to analysis with CVB. Longer documents and models with fewer topics lend themselves to VB. One might use both, within the same data set, depending on the length of the document. 6 Figure 2: Experiments with the two text data sets described in Section 4. We fit LDA models with numbers of topics equal to 5, 10, 25, 50, and evaluated the models on a held-out corpus. We plot the percentage difference of the per-word variational free energies achieved by CVB and VB as a function of document length. We also plot the difference in the total free energy. The %-age decrease in per word free energy goes to zero with increasing document length, and the absolute difference approaches a constant. The difference is higher for larger k. 0 20 40 60 80 100 120 140 0.0 0.5 1.0 1.5 2.0 2.5 VB vs CVB: per word free energy (10 mov. avgd.) #words %age change in free energy k 5 10 25 50 0 20 40 60 80 100 120 140 1 2 3 4 5 VB − CVB: total free energies (10 mov. avgd.) #words total free energy diff (a) ArXiv data-set 2000 4000 6000 8000 10000 0.00 0.02 0.04 0.06 0.08 0.10 0.12 VB vs CVB: per word free energy (1000 mov. avgd.) #words %age change in free energy k 5 10 25 50 2000 4000 6000 8000 10000 2 4 6 8 10 12 14 VB − CVB: total free energies (1000 mov. avgd.) #words total free energy diff (b) Yale Law data-set In one strain of future work, we will analyze the consequences of the approximate posterior inference algorithm on parameter estimation. Our results regarding the sparsity of topics indicate that CVB is a better algorithm early in the EM algorithm, when topics are dense, and that VB will be more efficient as the fitted topics become more sparse. References [1] S. Deerwester, S. Dumais, T. Landauer, G. Furnas, and R. Harshman. Indexing by latent semantic analysis. Journal of the American Society of Information Science, 41(6):391–407, 1990. 7 [2] T. Hofmann. Probabilistic latent semantic analysis. In UAI, 1999. [3] D. Blei, A. Ng, and M. Jordan. Latent Dirichlet allocation. Journal of Machine Learning Research, 3:993–1022, 2003. [4] W. Buntine and A. Jakulin. Discrete component analysis. In Subspace, Latent Structure and Feature Selection. Springer, 2006. [5] M. Girolami and A. Kaban. Simplicial mixtures of Markov chains: Distributed modelling of dynamic user profiles. In NIPS 16, pages 9–16. MIT Press, 2004. [6] H. Wallach. Topic modeling: Beyond bag of words. In Proceedings of the 23rd International Conference on Machine Learning, 2006. [7] M. Rosen-Zvi, T. Griffiths, M. Steyvers, and P. Smith. The author-topic model for authors and documents. In Proceedings of the 20th Conference on Uncertainty in Artificial Intelligence, pages 487–494. AUAI Press, 2004. [8] A. McCallum, A. Corrada-Emmanuel, and X. Wang. The author-recipient-topic model for topic and role discovery in social networks: Experiments with Enron and academic email. Technical report, University of Massachusetts, Amherst, 2004. [9] E. Airoldi, D. Blei, S. Fienberg, and E. Xing. Mixed membership stochastic blockmodels. arXiv, May 2007. [10] D. Zhou, E. Manavoglu, J. Li, C. Giles, and H. Zha. Probabilistic models for discovering e-communities. In WWW Conference, pages 173–182, 2006. [11] L. Fei-Fei and P. Perona. A Bayesian hierarchical model for learning natural scene categories. IEEE Computer Vision and Pattern Recognition, pages 524–531, 2005. [12] B. Russell, A. Efros, J. Sivic, W. Freeman, and A. Zisserman. Using multiple segmentations to discover objects and their extent in image collections. In IEEE Conference on Computer Vision and Pattern Recognition, pages 1605–1614, 2006. [13] S. Rogers, M. Girolami, C. Campbell, and R. Breitling. The latent process decomposition of cDNA microarray data sets. IEEE/ACM Transactions on Computational Biology and Bioinformatics, 2(2):143–156, 2005. [14] X. Wei and B. Croft. LDA-based document models for ad-hoc retrieval. In SIGIR, 2006. [15] D. Mimno and A. McCallum. Organizing the OCA: Learning faceted subjects from a library of digital books. In Joint Conference on Digital Libraries, 2007. [16] B. Marlin. Collaborative filtering: A machine learning perspective. Master’s thesis, University of Toronto, 2004. [17] C. Chemudugunta, P. Smyth, and M. Steyvers. Modeling general and specific aspects of documents with a probabilistic topic model. In NIPS 19, 2006. [18] D. Andrzejewski, A. Mulhern, B. Liblit, and X. Zhu. Statistical debugging using latent topic models. In European Conference on Machine Learning, 2007. [19] T. Griffiths and M. Steyvers. Probabilistic topic models. In T. Landauer, D. McNamara, S. Dennis, and W. Kintsch, editors, Latent Semantic Analysis: A Road to Meaning. Laurence Erlbaum, 2006. [20] T. Minka and J. Lafferty. Expectation-propagation for the generative aspect model. In Uncertainty in Artificial Intelligence (UAI), 2002. [21] Y. Teh, D. Newman, and M. Welling. A collapsed variational bayesian inference algorithm for latent dirichlet allocation. In NIPS, pages 1353–1360, 2006. [22] K. Kurihara, M. Welling, and Y. Teh. Collapsed variational Dirichlet process mixture models. 2007. [23] M. Jordan, Z. Ghahramani, T. Jaakkola, and L. Saul. Introduction to variational methods for graphical models. Machine Learning, 37:183–233, 1999. [24] K. Watanabe and S. Watanabe. Stochastic complexities of gaussian mixtures in variational bayesian approximation. Journal of Machine Learning Research, 7:625–644, 2006. 8
2008
161
3,411
Exploring Large Feature Spaces with Hierarchical Multiple Kernel Learning Francis Bach INRIA - Willow Project, ´Ecole Normale Sup´erieure 45, rue d’Ulm, 75230 Paris, France francis.bach@mines.org Abstract For supervised and unsupervised learning, positive definite kernels allow to use large and potentially infinite dimensional feature spaces with a computational cost that only depends on the number of observations. This is usually done through the penalization of predictor functions by Euclidean or Hilbertian norms. In this paper, we explore penalizing by sparsity-inducing norms such as the ℓ1-norm or the block ℓ1-norm. We assume that the kernel decomposes into a large sum of individual basis kernels which can be embedded in a directed acyclic graph; we show that it is then possible to perform kernel selection through a hierarchical multiple kernel learning framework, in polynomial time in the number of selected kernels. This framework is naturally applied to non linear variable selection; our extensive simulations on synthetic datasets and datasets from the UCI repository show that efficiently exploring the large feature space through sparsity-inducing norms leads to state-of-the-art predictive performance. 1 Introduction In the last two decades, kernel methods have been a prolific theoretical and algorithmic machine learning framework. By using appropriate regularization by Hilbertian norms, representer theorems enable to consider large and potentially infinite-dimensional feature spaces while working within an implicit feature space no larger than the number of observations. This has led to numerous works on kernel design adapted to specific data types and generic kernel-based algorithms for many learning tasks (see, e.g., [1, 2]). Regularization by sparsity-inducing norms, such as the ℓ1-norm has also attracted a lot of interest in recent years. While early work has focused on efficient algorithms to solve the convex optimization problems, recent research has looked at the model selection properties and predictive performance of such methods, in the linear case [3] or within the multiple kernel learning framework (see, e.g., [4]). In this paper, we aim to bridge the gap between these two lines of research by trying to use ℓ1-norms inside the feature space. Indeed, feature spaces are large and we expect the estimated predictor function to require only a small number of features, which is exactly the situation where ℓ1-norms have proven advantageous. This leads to two natural questions that we try to answer in this paper: (1) Is it feasible to perform optimization in this very large feature space with cost which is polynomial in the size of the input space? (2) Does it lead to better predictive performance and feature selection? More precisely, we consider a positive definite kernel that can be expressed as a large sum of positive definite basis or local kernels. This exactly corresponds to the situation where a large feature space is the concatenation of smaller feature spaces, and we aim to do selection among these many kernels, which may be done through multiple kernel learning. One major difficulty however is that the number of these smaller kernels is usually exponential in the dimension of the input space and applying multiple kernel learning directly in this decomposition would be intractable. In order to peform selection efficiently, we make the extra assumption that these small kernels can be embedded in a directed acyclic graph (DAG). Following [5], we consider in Section 2 a specific combination of ℓ2-norms that is adapted to the DAG, and will restrict the authorized sparsity patterns; in our specific kernel framework, we are able to use the DAG to design an optimization algorithm which has polynomial complexity in the number of selected kernels (Section 3). In simulations (Section 5), we focus on directed grids, where our framework allows to perform non-linear variable selection. We provide extensive experimental validation of our novel regularization framework; in particular, we compare it to the regular ℓ2-regularization and shows that it is always competitive and often leads to better performance, both on synthetic examples, and standard regression and classification datasets from the UCI repository. Finally, we extend in Section 4 some of the known consistency results of the Lasso and multiple kernel learning [3, 4], and give a partial answer to the model selection capabilities of our regularization framework by giving necessary and sufficient conditions for model consistency. In particular, we show that our framework is adapted to estimating consistently only the hull of the relevant variables. Hence, by restricting the statistical power of our method, we gain computational efficiency. 2 Hierarchical multiple kernel learning (HKL) We consider the problem of predicting a random variable Y ∈Y ⊂R from a random variable X ∈ X, where X and Y may be quite general spaces. We assume that we are given n i.i.d. observations (xi, yi) ∈X × Y, i = 1, . . . , n. We define the empirical risk of a function f from X to R as 1 n Pn i=1 ℓ(yi, f(xi)), where ℓ: Y × R 7→R+ is a loss function. We only assume that ℓis convex with respect to the second parameter (but not necessarily differentiable). Typical examples of loss functions are the square loss for regression, i.e., ℓ(y, ˆy) = 1 2(y −ˆy)2 for y ∈R, and the logistic loss ℓ(y, ˆy) = log(1 + e−yˆy) or the hinge loss ℓ(y, ˆy) = max{0, 1 −yˆy} for binary classification, where y ∈{−1, 1}, leading respectively to logistic regression and support vector machines [1, 2]. 2.1 Graph-structured positive definite kernels We assume that we are given a positive definite kernel k : X × X →R, and that this kernel can be expressed as the sum, over an index set V , of basis kernels kv, v ∈V , i.e, for all x, x′ ∈X, k(x, x′) = P v∈V kv(x, x′). For each v ∈V , we denote by Fv and Φv the feature space and feature map of kv, i.e., for all x, x′ ∈X, kv(x, x′) = ⟨Φv(x), Φv(x′)⟩. Throughout the paper, we denote by ∥u∥the Hilbertian norm of u and by ⟨u, v⟩the associated dot product, where the precise space is omitted and can always be inferred from the context. Our sum assumption corresponds to a situation where the feature map Φ(x) and feature space F for k is the concatenation of the feature maps Φv(x) for each kernel kv, i.e, F = Q v∈V Fv and Φ(x) = (Φv(x))v∈V . Thus, looking for a certain β ∈F and a predictor function f(x) = ⟨β, Φ(x)⟩ is equivalent to looking jointly for βv ∈Fv, for all v ∈V , and f(x) = P v∈V ⟨βv, Φv(x)⟩. As mentioned earlier, we make the assumption that the set V can be embedded into a directed acyclic graph. Directed acyclic graphs (DAGs) allow to naturally define the notions of parents, children, descendants and ancestors. Given a node w ∈V , we denote by A(w) ⊂V the set of its ancestors, and by D(w) ⊂V , the set of its descendants. We use the convention that any w is a descendant and an ancestor of itself, i.e., w ∈A(w) and w ∈D(w). Moreover, for W ⊂V , we let denote sources(W) the set of sources of the graph G restricted to W (i.e., nodes in W with no parents belonging to W). Given a subset of nodes W ⊂V , we can define the hull of W as the union of all ancestors of w ∈W, i.e., hull(W) = S w∈W A(w). Given a set W, we define the set of extreme points of W as the smallest subset T ⊂W such that hull(T ) = hull(W) (note that it is always well defined, as T T ⊂V, hull(T )=hull(W) T ). See Figure 1 for examples of these notions. The goal of this paper is to perform kernel selection among the kernels kv, v ∈V . We essentially use the graph to limit the search to specific subsets of V . Namely, instead of considering all possible subsets of active (relevant) vertices, we are only interested in estimating correctly the hull of these relevant vertices; in Section 2.2, we design a specific sparsity-inducing norms adapted to hulls. In this paper, we primarily focus on kernels that can be expressed as “products of sums”, and on the associated p-dimensional directed grids, while noting that our framework is applicable to many other kernels. Namely, we assume that the input space X factorizes into p components X = X1 ×· · ·×Xp and that we are given p sequences of length q + 1 of kernels kij(xi, x′ i), i ∈{1, . . ., p}, j ∈ Figure 1: Example of graph and associated notions. (Left) Example of a 2D-grid. (Middle) Example of sparsity pattern (× in light blue) and the complement of its hull (+ in light red). (Right) Dark blue points (×) are extreme points of the set of all active points (blue ×); dark red points (+) are the sources of the set of all red points (+). {0, . . . , q}, such that k(x, x′) = Pq j1,...,jp=0 Qp i=1 kiji(xi, x′ i) = Qp i=1 Pq ji=0 kiji(xi, x′ i)  . We thus have a sum of (q+1)p kernels, that can be computed efficiently as a product of p sums. A natural DAG on V = Qp i=1{0, . . . , q} is defined by connecting each (j1, . . . , jp) to (j1 +1, j2, . . . , jp), . . . , (j1, . . . , jp−1, jp +1). As shown in Section 2.2, this DAG will correspond to the constraint of selecting a given product of kernels only after all the subproducts are selected. Those DAGs are especially suited to nonlinear variable selection, in particular with the polynomial and Gaussian kernels. In this context, products of kernels correspond to interactions between certain variables, and our DAG implies that we select an interaction only after all sub-interactions were already selected. Polynomial kernels We consider Xi = R, kij(xi, x′ i) = q j  (xix′ i)j; the full kernel is then equal to k(x, x′) = Qp i=1 Pq j=0 q j  (xix′ i)j = Qp i=1(1 + xix′ i)q. Note that this is not exactly the usual polynomial kernel (whose feature space is the space of multivariate polynomials of total degree less than q), since our kernel considers polynomials of maximal degree q. Gaussian kernels We also consider Xi = R, and the Gaussian-RBF kernel e−b(x−x′)2. The following decomposition is the eigendecomposition of the non centered covariance operator for a normal distribution with variance 1/4a (see, e.g., [6]): e−b(x−x′)2 = P∞ k=0 (b/A)k 2kk! [e−b A (a+c)x2Hk( √ 2cx)][e−b A (a+c)(x′)2Hk( √ 2cx′)], where c2 = a2 + 2ab, A = a + b + c, and Hk is the k-th Hermite polynomial. By appropriately truncating the sum, i.e, by considering that the first q basis kernels are obtained from the first q single Hermite polynomials, and the (q + 1)-th kernel is summing over all other kernels, we obtain a decomposition of a uni-dimensional Gaussian kernel into q + 1 components (q of them are one-dimensional, the last one is infinite-dimensional, but can be computed by differencing). The decomposition ends up being close to a polynomial kernel of infinite degree, modulated by an exponential [2]. One may also use an adaptive decomposition using kernel PCA (see, e.g., [2, 1]), which is equivalent to using the eigenvectors of the empirical covariance operator associated with the data (and not the population one associated with the Gaussian distribution with same variance). In simulations, we tried both with no significant differences. ANOVA kernels When q = 1, the directed grid is isomorphic to the power set (i.e., the set of subsets) with the inclusion DAG. In this setting, we can decompose the ANOVA kernel [2] as Qp i=1(1 + e−b(xi−x′ i)2) = P J⊂{1,...,p} Q i∈J e−b(xi−x′ i)2 = P J⊂{1,...,p} e−b∥xJ−x′ J∥2 2, and our framework will select the relevant subsets for the Gaussian kernels. Kernels or features? In this paper, we emphasize the kernel view, i.e., we are given a kernel (and thus a feature space) and we explore it using ℓ1-norms. Alternatively, we could use the feature view, i.e., we have a large structured set of features that we try to select from; however, the techniques developed in this paper assume that (a) each feature might be infinite-dimensional and (b) that we can sum all the local kernels efficiently (see in particular Section 3.2). Following the kernel view thus seems slightly more natural. 2.2 Graph-based structured regularization Given β ∈Q v∈V Fv, the natural Hilbertian norm ∥β∥is defined through ∥β∥2 = P v∈V ∥βv∥2. Penalizing with this norm is efficient because summing all kernels kv is assumed feasible in polynomial time and we can bring to bear the usual kernel machinery; however, it does not lead to sparse solutions, where many βv will be exactly equal to zero. As said earlier, we are only interested in the hull of the selected elements βv ∈Fv, v ∈V ; the hull of a set I is characterized by the set of v, such that D(v) ⊂Ic, i.e., such that all descendants of v are in the complement Ic: hull(I) = {v ∈V, D(v) ⊂Ic}c. Thus, if we try to estimate hull(I), we need to determine which v ∈V are such that D(v) ⊂Ic. In our context, we are hence looking at selecting vertices v ∈V for which βD(v) = (βw)w∈D(v) = 0. We thus consider the following structured block ℓ1-norm defined as P v∈V dv∥βD(v)∥ = P v∈V dv(P w∈D(v) ∥βw∥2)1/2, where (dv)v∈V are positive weights. Penalizing by such a norm will indeed impose that some of the vectors βD(v) ∈Q w∈D(v) Fw are exactly zero. We thus consider the following minimization problem1: minβ∈Q v∈V Fv 1 n Pn i=1 ℓ(yi, P v∈V ⟨βv, Φv(xi)⟩) + λ 2 P v∈V dv∥βD(v)∥ 2 . (1) Our Hilbertian norm is a Hilbert space instantiation of the hierarchical norms recently introduced by [5] and also considered by [7] in the MKL setting. If all Hilbert spaces are finite dimensional, our particular choice of norms corresponds to an “ℓ1-norm of ℓ2-norms”. While with uni-dimensional groups/kernels, the “ℓ1-norm of ℓ∞-norms” allows an efficient path algorithm for the square loss and when the DAG is a tree [5], this is not possible anymore with groups of size larger than one, or when the DAG is a not a tree. In Section 3, we propose a novel algorithm to solve the associated optimization problem in time polynomial in the number of selected groups/kernels, for all group sizes, DAGs and losses. Moreover, in Section 4, we show under which conditions a solution to the problem in Eq. (1) consistently estimates the hull of the sparsity pattern. Finally, note that in certain settings (finite dimensional Hilbert spaces and distributions with absolutely continuous densities), these norms have the effect of selecting a given kernel only after all of its ancestors [5]. This is another explanation why hulls end up being selected, since to include a given vertex in the models, the entire set of ancestors must also be selected. 3 Optimization problem In this section, we give optimality conditions for the problems in Eq. (1), as well as optimization algorithms with polynomial time complexity in the number of selected kernels. In simulations we consider total numbers of kernels larger than 1030, and thus such efficient algorithms are essential to the success of hierarchical multiple kernel learning (HKL). 3.1 Reformulation in terms of multiple kernel learning Following [8, 9], we can simply derive an equivalent formulation of Eq. (1). Using Cauchy-Schwarz inequality, we have that for all η ∈RV such that η ⩾0 and P v∈V d2 vηv ⩽1, (P v∈V dv∥βD(v)∥)2 ⩽P v∈V ∥βD(v)∥2 ηv = P w∈V (P v∈A(w) η−1 v )∥βw∥2, with equality if and only if ηv = d−1 v ∥βD(v)∥(P v∈V dv∥βD(v)∥)−1. We associate to the vector η ∈RV , the vector ζ ∈RV such that ∀w ∈V , ζ−1 w = P v∈A(w) η−1 v . We use the natural convention that if ηv is equal to zero, then ζw is equal to zero for all descendants w of v. We let denote H the set of allowed η and Z the set of all associated ζ. The set H and Z are in bijection, and we can interchangeably use η ∈H or the corresponding ζ(η) ∈Z. Note that Z is in general not convex 2 (unless the DAG is a tree, see [10]), and if ζ ∈Z, then ζw ⩽ζv for all w ∈D(v), i.e., weights of descendant kernels are smaller, which is consistent with the known fact that kernels should always be selected after all their ancestors. The problem in Eq. (1) is thus equivalent to min η∈H min β∈Q v∈V Fv 1 n Pn i=1 ℓ(yi, P v∈V ⟨βv, Φv(xi)⟩) + λ 2 P w∈V ζw(η)−1∥βw∥2. (2) Using the change of variable ˜βv = βvζ−1/2 v and ˜Φ(x) = (ζ1/2 v Φv(x))v∈V , this implies that given the optimal η (and associated ζ), β corresponds to the solution of the regular supervised learning problem with kernel matrix K = P w∈V ζwKw, where Kw is n × n the kernel matrix associated 1We consider the square of the norm, which does not change the regularization properties, but allow simple links with multiple kernel learning. 2Although Z is not convex, we can still maximize positive linear combinations over Z, which is the only needed operation (see [10] for details). with kernel kw. Moreover, the solution is then βw = ζw Pn i=1 αiΦw(xi), where α ∈Rn are the dual parameters associated with the single kernel learning problem. Thus, the solution is entirely determined by α ∈Rn and η ∈RV (and its corresponding ζ ∈RV ). More precisely, we have (see proof in [10]): Proposition 1 The pair (α, η) is optimal for Eq. (1), with ∀w, βw = ζw Pn i=1 αiΦw(xi), if and only if (a) given η, α is optimal for the single kernel learning problem with kernel matrix K = P w∈V ζw(η)Kw, and (b) given α, η ∈H maximizes P w∈V (P v∈A(w) η−1 v )−1α⊤Kwα. Moreover, the total duality gap can be upperbounded as the sum of the two separate duality gaps for the two optimization problems, which will be useful in Section 3.2 (see [10] for more details). Note that in the case of “flat” regular multiple kernel learning, where the DAG has no edges, we obtain back usual optimality conditions [8, 9]. Following a common practice for convex sparsity problems [11], we will try to solve a small problem where we assume we know the set of v such that ∥βD(v)∥is equal to zero (Section 3.3). We then “simply” need to check that variables in that set may indeed be left out of the solution. In the next section, we show that this can be done in polynomial time although the number of kernels to consider leaving out is exponential (Section 3.2). 3.2 Conditions for global optimality of reduced problem We let denote J the complement of the set of norms which are set to zero. We thus consider the optimal solution β of the reduced problem (on J), namely, minβJ∈Q v∈JFv 1 n Pn i=1 ℓ(yi, P v∈J⟨βv, Φv(xi)⟩) + λ 2 P v∈V dv∥βD(v)∩J∥ 2 , (3) with optimal primal variables βJ, dual variables α and optimal pair (ηJ, ζJ). We now consider necessary conditions and sufficient conditions for this solution (augmented with zeros for non active variables, i.e., variables in Jc) to be optimal with respect to the full problem in Eq. (1). We denote by δ = P v∈J dv∥βD(v)∩J∥the optimal value of the norm for the reduced problem. Proposition 2 (NJ) If the reduced solution is optimal for the full problem in Eq. (1) and all kernels in the extreme points of J are active, then we have maxt∈sources(Jc) α⊤Ktα/d2 t ⩽δ2 . Proposition 3 (SJ,ε) If maxt∈sources(Jc) P w∈D(t) α⊤Kwα/(P v∈A(w)∩D(t) dv)2 ⩽δ2 + ε/λ, then the total duality gap is less than ε. The proof is fairly technical and can be found in [10]; this result constitutes the main technical contribution of the paper: it essentially allows to solve a very large optimization problem over exponentially many dimensions in polynomial time. The necessary condition (NJ) does not cause any computational problems. However, the sufficient condition (SJ,ε) requires to sum over all descendants of the active kernels, which is impossible in practice (as shown in Section 5, we consider V of cardinal often greater than 1030). Here, we need to bring to bear the specific structure of the kernel k. In the context of directed grids we consider in this paper, if dv can also be decomposed as a product, then P v∈A(w)∩D(t) dv is also factorized, and we can compute the sum over all v ∈D(t) in linear time in p. Moreover we can cache the sums P w∈D(t) Kw/(P v∈A(w)∩D(t) dv)2 in order to save running time. 3.3 Dual optimization for reduced or small problems When kernels kv, v ∈V have low-dimensional feature spaces, we may use a primal representation and solve the problem in Eq. (1) using generic optimization toolboxes adapted to conic constraints (see, e.g., [12]). However, in order to reuse existing optimized supervised learning code and use high-dimensional kernels, it is preferable to use a dual optimization. Namely, we use the same technique as [8]: we consider for ζ ∈Z, the function B(ζ) = minβ∈Q v∈V Fv 1 n Pn i=1 ℓ(yi, P v∈V ⟨βv, Φv(xi)⟩)+ λ 2 P w∈V ζ−1 w ∥βw∥2, which is the optimal value of the single kernel learning problem with kernel matrix P w∈V ζwKw. Solving Eq. (2) is equivalent to minimizing B(ζ(η)) with respect to η ∈H. If a ridge (i.e., positive diagonal) is added to the kernel matrices, the function B is differentiable [8]. Moreover, the function η 7→ζ(η) is differentiable on (R∗ +)V . Thus, the function η 7→B[ζ((1 − ε)η + ε |V |d−2)] , where d−2 is the vector with elements d−2 v , is differentiable if ε > 0. We can then use the same projected gradient descent strategy as [8] to minimize it. The overall complexity of the algorithm is then proportional to O(|V |n2)—to form the kernel matrices—plus the complexity of solving a single kernel learning problem—typically between O(n2) and O(n3). Note that this algorithm is only used for small reduced subproblems for which V has small cardinality. 3.4 Kernel search algorithm We are now ready to present the detailed algorithm which extends the feature search algorithm of [11]. Note that the kernel matrices are never all needed explicitly, i.e., we only need them (a) explicitly to solve the small problems (but we need only a few of those) and (b) implicitly to compute the sufficient condition (SJ,ε), which requires to sum over all kernels, as shown in Section 3.2. • Input: kernel matrices Kv ∈Rn×n, v ∈V , maximal gap ε, maximal # of kernels Q • Algorithm 1. Initialization: set J = sources(V ), compute (α, η) solutions of Eq. (3), obtained using Section 3.3 2. while (NJ) and (SJ,ε) are not satisfied and #(V ) ⩽Q – If (NJ) is not satisfied, add violating variables in sources(Jc) to J else, add violating variables in sources(Jc) of (SJ,ε) to J – Recompute (α, η) optimal solutions of Eq. (3) • Output: J, α, η The previous algorithm will stop either when the duality gap is less than ε or when the maximal number of kernels Q has been reached. In practice, when the weights dv increase with the depth of v in the DAG (which we use in simulations), the small duality gap generally occurs before we reach a problem larger than Q. Note that some of the iterations only increase the size of the active sets to check the sufficient condition for optimality; forgetting those does not change the solution, only the fact that we may actually know that we have an ε-optimal solution. In order to obtain a polynomial complexity, the maximal out-degree of the DAG (i.e., the maximal number of children of any given node) should be polynomial as well. Indeed, for the directed pgrid (with maximum out-degree equal to p), the total running time complexity is a function of the number of observations n, and the number R of selected kernels; with proper caching, we obtain the following complexity, assuming O(n3) for the single kernel learning problem, which is conservative: O(n3R + n2Rp2 + n2R2p), which decomposes into solving O(R) single kernel learning problems, caching O(Rp) kernels, and computing O(R2p) quadratic forms for the sufficient conditions. 4 Consistency conditions As said earlier, the sparsity pattern of the solution of Eq. (1) will be equal to its hull, and thus we can only hope to obtain consistency of the hull of the pattern, which we consider in this section. For simplicity, we consider the case of finite dimensional Hilbert spaces (i.e., Fv = Rfv) and the square loss. We also hold fixed the vertex set of V , i.e., we assume that the total number of features is fixed, and we let n tend to infinity and λ = λn decrease with n. Following [4], we make the following assumptions on the underlying joint distribution of (X, Y ): (a) the joint covariance matrix Σ of (Φ(xv))v∈V (defined with appropriate blocks of size fv × fw) is invertible, (b) E(Y |X) = P w∈W ⟨βw, Φw(x)⟩with W ⊂V and var(Y |X) = σ2 > 0 almost surely. With these simple assumptions, we obtain (see proof in [10]): Proposition 4 (Sufficient condition) If max t∈sources(W c) P w∈D(t) ∥ΣwW Σ−1 W W Diag(dv∥βD(v)∥−1)v∈W βW ∥2 (P v∈A(w)∩D(t) dv)2 < 1, then β and the hull of W are consistently estimated when λnn1/2 →∞and λn →0. Proposition 5 (Necessary condition) If the β and the hull of W are consistently estimated for some sequence λn, then maxt∈sources(W c) ∥ΣwW Σ−1 W W Diag(dv/∥βD(v)∥)v∈W βW ∥2/d2 t ⩽1. Note that the last two propositions are not consequences of the similar results for flat MKL [4], because the groups that we consider are overlapping. Moreover, the last propositions show that we indeed can estimate the correct hull of the sparsity pattern if the sufficient condition is satisfied. In particular, if we can make the groups such that the between-group correlation is as small as possible, 2 3 4 5 6 7 0 0.5 1 log2(p) test set error HKL greedy L2 2 3 4 5 6 7 0 0.5 1 log2(p) test set error HKL greedy L2 Figure 2: Comparison on synthetic examples: mean squared error over 40 replications (with halved standard deviations). Left: non rotated data, right: rotated data. See text for details. dataset n p k #(V ) L2 greedy lasso-α MKL HKL abalone 4177 10 pol4 ≈107 44.2±1.3 43.9±1.4 47.9±0.7 44.5±1.1 43.3±1.0 abalone 4177 10 rbf ≈1010 43.0±0.9 45.0±1.7 49.0±1.7 43.7±1.0 43.0±1.1 bank-32fh 8192 32 pol4 ≈1022 40.1±0.7 39.2±0.8 41.3±0.7 38.7±0.7 38.9±0.7 bank-32fh 8192 32 rbf ≈1031 39.0±0.7 39.7±0.7 66.1±6.9 38.4±0.7 38.4±0.7 bank-32fm 8192 32 pol4 ≈1022 6.0±0.1 5.0±0.2 7.0±0.2 6.1±0.3 5.1±0.1 bank-32fm 8192 32 rbf ≈1031 5.7±0.2 5.8±0.4 36.3±4.1 5.9±0.2 4.6±0.2 bank-32nh 8192 32 pol4 ≈1022 44.3±1.2 46.3±1.4 45.8±0.8 46.0±1.2 43.6±1.1 bank-32nh 8192 32 rbf ≈1031 44.3±1.2 49.4±1.6 93.0±2.8 46.1±1.1 43.5±1.0 bank-32nm 8192 32 pol4 ≈1022 17.2±0.6 18.2±0.8 19.5±0.4 21.0±0.7 16.8±0.6 bank-32nm 8192 32 rbf ≈1031 16.9±0.6 21.0±0.6 62.3±2.5 20.9±0.7 16.4±0.6 boston 506 13 pol4 ≈109 17.1±3.6 24.7±10.8 29.3±2.3 22.2±2.2 18.1±3.8 boston 506 13 rbf ≈1012 16.4±4.0 32.4±8.2 29.4±1.6 20.7±2.1 17.1±4.7 pumadyn-32fh 8192 32 pol4 ≈1022 57.3±0.7 56.4±0.8 57.5±0.4 56.4±0.7 56.4±0.8 pumadyn-32fh 8192 32 rbf ≈1031 57.7±0.6 72.2±22.5 89.3±2.0 56.5±0.8 55.7±0.7 pumadyn-32fm 8192 32 pol4 ≈1022 6.9±0.1 6.4±1.6 7.5±0.2 7.0±0.1 3.1±0.0 pumadyn-32fm 8192 32 rbf ≈1031 5.0±0.1 46.2±51.6 44.7±5.7 7.1±0.1 3.4±0.0 pumadyn-32nh 8192 32 pol4 ≈1022 84.2±1.3 73.3±25.4 84.8±0.5 83.6±1.3 36.7±0.4 pumadyn-32nh 8192 32 rbf ≈1031 56.5±1.1 81.3±25.0 98.1±0.7 83.7±1.3 35.5±0.5 pumadyn-32nm 8192 32 pol4 ≈1022 60.1±1.9 69.9±32.8 78.5±1.1 77.5±0.9 5.5±0.1 pumadyn-32nm 8192 32 rbf ≈1031 15.7±0.4 67.3±42.4 95.9±1.9 77.6±0.9 7.2±0.1 Table 1: Mean squared errors (multiplied by 100) on UCI regression datasets, normalized so that the total variance to explain is 100. See text for details. we can ensure correct hull selection. Finally, it is worth noting that if the ratios dw/ maxv∈A(w) dv tend to infinity slowly with n, then we always consistently estimate the depth of the hull, i.e., the optimal interaction complexity. We are currently investigating extensions to the non parametric case [4], in terms of pattern selection and universal consistency. 5 Simulations Synthetic examples We generated regression data as follows: n = 1024 samples of p ∈[22, 27] variables were generated from a random covariance matrix, and the label y ∈R was sampled as a random sparse fourth order polynomial of the input variables (with constant number of monomials). We then compare the performance of our hierarchical multiple kernel learning method (HKL) with the polynomial kernel decomposition presented in Section 2 to other methods that use the same kernel and/or decomposition: (a) the greedy strategy of selecting basis kernels one after the other, a procedure similar to [13], and (b) the regular polynomial kernel regularization with the full kernel (i.e., the sum of all basis kernels). In Figure 2, we compare the two approaches on 40 replications in the following two situations: original data (left) and rotated data (right), i.e., after the input variables were transformed by a random rotation (in this situation, the generating polynomial is not sparse anymore). We can see that in situations where the underlying predictor function is sparse (left), HKL outperforms the two other methods when the total number of variables p increases, while in the other situation where the best predictor is not sparse (right), it performs only slightly better: i.e., in non sparse problems, ℓ1-norms do not really help, but do help a lot when sparsity is expected. UCI datasets For regression datasets, we compare HKL with polynomial (degree 4) and GaussianRBF kernels (each dimension decomposed into 9 kernels) to the following approaches with the same dataset n p k #(V ) L2 greedy HKL mushrooms 1024 117 pol4 ≈1082 0.4±0.4 0.1±0.1 0.1±0.2 mushrooms 1024 117 rbf ≈10112 0.1±0.2 0.1±0.2 0.1±0.2 ringnorm 1024 20 pol4 ≈1014 3.8±1.1 5.9±1.3 2.0±0.3 ringnorm 1024 20 rbf ≈1019 1.2±0.4 2.4±0.5 1.6±0.4 spambase 1024 57 pol4 ≈1040 8.3±1.0 9.7±1.8 8.1±0.7 spambase 1024 57 rbf ≈1054 9.4±1.3 10.6±1.7 8.4±1.0 twonorm 1024 20 pol4 ≈1014 2.9±0.5 4.7±0.5 3.2±0.6 twonorm 1024 20 rbf ≈1019 2.8±0.6 5.1±0.7 3.2±0.6 magic04 1024 10 pol4 ≈107 15.9±1.0 16.0±1.6 15.6±0.8 magic04 1024 10 rbf ≈1010 15.7±0.9 17.7±1.3 15.6±0.9 Table 2: Error rates (multiplied by 100) on UCI binary classification datasets. See text for details. kernel: regular Hilbertian regularization (L2), same greedy approach as earlier (greedy), regularization by the ℓ1-norm directly on the vector α, a strategy which is sometimes used in the context of sparse kernel learning [14] but does not use the Hilbertian structure of the kernel (lasso-α), multiple kernel learning with the p kernels obtained by summing all kernels associated with a single variable (MKL). For all methods, the kernels were held fixed, while in Table 1, we report the performance for the best regularization parameters obtained by 10 random half splits. We can see from Table 1, that HKL outperforms other methods, in particular for the datasets bank32nm, bank-32nh, pumadyn-32nm, pumadyn-32nh, which are datasets dedicated to non linear regression. Note also, that we efficiently explore DAGs with very large numbers of vertices #(V ). For binary classification datasets, we compare HKL (with the logistic loss) to two other methods (L2, greedy) in Table 2. For some datasets (e.g., spambase), HKL works better, but for some others, in particular when the generating problem is known to be non sparse (ringnorm, twonorm), it performs slightly worse than other approaches. 6 Conclusion We have shown how to perform hierarchical multiple kernel learning (HKL) in polynomial time in the number of selected kernels. This framework may be applied to many positive definite kernels and we have focused on polynomial and Gaussian kernels used for nonlinear variable selection. In particular, this paper shows that trying to use ℓ1-type penalties may be advantageous inside the feature space. We are currently investigating applications to string and graph kernels [2]. References [1] B. Sch¨olkopf and A. J. Smola. Learning with Kernels. MIT Press, 2002. [2] J. Shawe-Taylor and N. Cristianini. Kernel Methods for Pattern Analysis. Camb. U. P., 2004. [3] P. Zhao and B. Yu. On model selection consistency of Lasso. JMLR, 7:2541–2563, 2006. [4] F. Bach. Consistency of the group Lasso and multiple kernel learning. JMLR, 9:1179–1225, 2008. [5] P. Zhao, G. Rocha, and B. Yu. Grouped and hierarchical model selection through composite absolute penalties. Ann. Stat., To appear, 2008. [6] C. K. I. Williams and M. Seeger. The effect of the input density distribution on kernel-based classifiers. In Proc. ICML, 2000. [7] M. Szafranski, Y. Grandvalet, and A. Rakotomamonjy. Composite kernel learning. In Proc. ICML, 2008. [8] A. Rakotomamonjy, F. Bach, S. Canu, and Y. Grandvalet. Simplemkl. JMLR, 9:2491–2521, 2008. [9] M. Pontil and C.A. Micchelli. Learning the kernel function via regularization. JMLR, 6:1099–1125, 2005. [10] F. Bach. Exploring large feature spaces with hierarchical MKL. Technical Report 00319660, HAL, 2008. [11] H. Lee, A. Battle, R. Raina, and A. Ng. Efficient sparse coding algorithms. In NIPS, 2007. [12] S. Boyd and L. Vandenberghe. Convex Optimization. Cambridge Univ. Press, 2003. [13] K. Bennett, M. Momma, and J. Embrechts. Mark: A boosting algorithm for heterogeneous kernel models. In Proc. SIGKDD, 2002. [14] V. Roth. The generalized Lasso. IEEE Trans. on Neural Networks, 15(1), 2004.
2008
162
3,412
MCBoost: Multiple Classifier Boosting for Perceptual Co-clustering of Images and Visual Features Tae-Kyun Kim∗ Sidney Sussex College University of Cambridge Cambridge CB2 3HU, UK tkk22@cam.ac.uk Roberto Cipolla Department of Engineering University of Cambridge Cambridge CB2 1PZ, UK cipolla@cam.ac.uk Abstract We present a new co-clustering problem of images and visual features. The problem involves a set of non-object images in addition to a set of object images and features to be co-clustered. Co-clustering is performed in a way that maximises discrimination of object images from non-object images, thus emphasizing discriminative features. This provides a way of obtaining perceptual joint-clusters of object images and features. We tackle the problem by simultaneously boosting multiple strong classifiers which compete for images by their expertise. Each boosting classifier is an aggregation of weak-learners, i.e. simple visual features. The obtained classifiers are useful for object detection tasks which exhibit multimodalities, e.g. multi-category and multi-view object detection tasks. Experiments on a set of pedestrian images and a face data set demonstrate that the method yields intuitive image clusters with associated features and is much superior to conventional boosting classifiers in object detection tasks. 1 Introduction It is known that visual cells (visual features) selectively respond to imagery patterns in perception. Learning process may be associated with co-clusters of visual features and imagery data in a way of facilitating image data perception. We formulate this in the context of boosting classifiers with simple visual features for object detection task [3]. There are two sets of images: a set of object images and a set of non-object images, labelled as positive and negative class members respectively. There are also a huge number of simple image features, only a small fraction of which are selected to discriminate the positive class from the negative class by H(x) = P t αtht(x) where x is an input vector, αt, ht are the weight and the score of t-th weak-learner using a single feature. As object images typically exhibit multi-modalities, a single aggregation of simple features often does not dichotomise all object images from non-object images. Our problem is to find out subsets of object images, each of which is associated with a set of features for maximising classification. Note that image clusters to be obtained are coupled with selected features and likewise features to be selected are dependent on image clusters, requiring a concurrent clustering of images and features. See Figure 1 for an example where subsets of face images are pose-wise obtained with associated features by the proposed method (Section 3). Features are placed around eyes, nose, mouth and etc. as the cues for discriminating faces from background. As such facial features are distributed differently mainly according to face pose, the obtained pose-wise face clusters are, therefore, intuitive and desirable in perception. Note the challenges in achieving this: The input set of face images are mixed up by different faces, lighting conditions as well as pose. Some are photographs of real-faces and the others are drawings. Desired image clusters are not observable in input space. See Figure 2 ∗Webpage: http://mi.eng.cam.ac.uk/∼tkk22 1 ... ... Face image set Random image set Visual feature set Face cluster-1 Face cluster-2 Feature set-1 Feature set-2 Figure 1: Perceptual co-clusters of images and visual features. For given a set of face and random images and simple visual features, the proposed method finds perceptual joint-clusters of face images and features, which facilitates classification of face images from random images. Face clusters are pose-wise obtained. for the result of the traditional unsupervised method (k-means clustering) applied to the face images. Images of the obtained clusters are almost random with respect to pose. To obtain perceptual face clusters, a method requires a discriminative process and part-based representations (like the simple features used). Technically, we must be able to cope with an arbitrary initialisation of image clusters (as target clusters are hidden) and feature selection among a huge number of simple visual features. The proposed method (Section 3) has potential for wide-applications Face cluster-1 Face cluster-2 Figure 2: Image sets obtained by the k-means clustering method. in perceptual data exploration. It generally solves a new co-clustering problem of a data set (e.g. a set of face images) and a feature set (e.g. simple visual features) in a way to maximise discrimination of the data set from another data set (e.g. a set of random images). The method is also useful for object detection tasks. Boosting a classifier with simple features [3] is a state-of-the-art in object detection tasks. It delivers high accuracy and is very time-efficient. Conventionally, multiple boosting classifiers are separately learnt for multiple categories and/or multiple views of object images [6]. It is, however, tedious to manually label category/pose for a large data set and, importantly, it is not clear to define object categories and scopes of each pose. Would there be a better partitioning for learning multiple boosting classifiers? We let this be a part of automatic learning in the proposed method. It simultaneously boosts multiple strong classifiers, each of which has expertise on a particular set of object images by a set of weak-learners. The remainder of this paper is arranged as follows: we briefly review the previous work in Section 2 and present our solution in Section 3. Experiments and conclusions are drawn in Section 4 and Section 5 respectively. 2 Related work Existing co-clustering work (e.g. [1]) is formulated as an unsupervised learning task. It simultaneously clusters rows and columns of a co-occurrence table by e.g. maximising mutual information between the cluster variables. Conversely, we make use of class labels for discriminative learning. Using a co-occurrence table in prior work is also prohibitive due to a huge number of visual features that we consider. Mixture of Experts [2] (MoE) jointly learns multiple classifiers and data partitions. It much emphasises local experts and is suitable when input data can be naturally divided into homogeneous subsets, which is, however, often not possible as observed in Figure 2. In practice, it is difficult to establish a good initial data partition and to perform expert selection based on localities. Note that EM in MoE resorts to a local optimum. Furthermore, the data partitions of MoE could be undesirably affected by a large background class in our problem and the linear transformations used in MoE are limited for delivering a meaningful part-based representation of images. 2 Step 5 Step 4 Step 3 Step 2 Step 1 A Classifier 1 C C A C C A A B B C C Classifier 3 Classifier 2 B B B B B B C A A A B B A B B B B A C B C C B C A A B Figure 3: (left) Risk map for given two class data (circle and cross). The weak-learners (either a vertical or horizontal line) found by Adaboost method [7] are placed on high risk regions. (right) State diagram for the concept of MCBoost. Boosting [7] is a sequential method of aggregating multiple (weak) classifiers. It finds weak-learners to correctly classify erroneous samples in previous weak-learners. While MoE makes a decision by dynamically selected local experts, all weak-learners contribute to a decision with learnt weights in boosting classifier. As afore-mentioned, expert selection is a difficult problem when an input space is not naturally divided into sub-regions (clusters). Boosting classifier solves various non-linear classification problems but cannot solve XOR problems where only half the data can be correctly classified by a set of weak-learners. Two disjointed sets of weak-learners, i.e. two boosting classifiers, are required to conquer each half of data by a set of weak-learners. Torralba et al. have addressed joint-learning of multiple boosting classifiers for multiple category and multiple view object detection [4]. The complexity of resulting classifiers is reduced by sharing visual features among classifiers. Each classifier in their method is based on each of category-wise or pose-wise clusters of object images, which requires manual labels for cateogry/pose, whereas we optimise image clusters and boosting classifiers simultaneously. 3 MCBoost: multiple strong classifier boosting Our formulation considers K strong classifiers, each of which is represented by a linear combination of weak-learners as Hk(x) = X t αkthkt(x), k = 1, ...K, (1) where αkt and hkt are the weight and the score of t-th weak-learner of k-th strong classifier. Each strong classifier is devoted to a subset of input patterns allowing repetition and each weak-learner in a classifier comprises of a single visual feature and a threshold. For aggregating multiple strong classifiers, we formulate Noisy-OR as P(x) = 1 − Y k (1 −Pk(x)), (2) where Pk(x) = 1 1+exp(−Hk(x)). It assigns samples to a positive class if any of classifiers does and assigns samples to a negative class if every classifier does. Conventional design in object detection study [6] also favours OR decision as it does not require classifier selection. An individual classifier is learnt from a subset of positive samples and all negative samples, enforcing a positive sample to be accepted by one of the classifiers and a negative sample to be rejected by all. Our derivation builds on the previous Noisy-OR Boost algorithm [5], which has been proposed for multiple instance learning. The sample weights are initialised by random partitioning of positive samples, i.e. wki = 1 if xi ∈k and wki = 0 otherwise, where i and k denote i-th sample and k-th classifier respectively. We set wki = 1/K for all k’s for negative samples. For given weights, the method finds K weak-learners 3 Algorithm 1. MCBoost Input: A data set (xi, yi) and a set of pre-defined weak-learners Output: Multiple boosting classifiers Hk(x) = PT t=1 αkthkt(x), k = 1..., K 1.Compute a reduced set of weak-learners H by risk map (4) and randomly initialise the weights wki 2.Repeat for t = 1, ..., T: 3. Repeat for k = 1, ..., K: 4. Find weak-learners hkt that maximise P i wki · hkt(xi), hkt ∈H. 5. Find the weak-learner weights αkt that maximise J(H + αkthkt). 6. Update the weights by wki = yi−P (xi) P (xi) · Pk(xi). 7. End 8.End Figure 4: Pseudocode of MCBoost algorithm at t-th round of boosting, to maximise X i wki · hkt(xi), hkt ∈H, (3) where hkt ∈{−1, +1} and H is a reduced set of weak-learners for speeding up the proposed multiple classifier boosting. The reduced set is obtained by restricting the location of weak-learners around the expected decision boundary. Each weak-learner, h(x) = sign(aT x + b), where a and b represent a simple feature and its threshold respectively, can be represented by aT (x −xo), where xo is interpreted as the location of the weak-learner. By limiting xo to the data points that have high risk to be misclassified, the complexity of searching weak-learners at each round of boosting is greatly reduced. The risk is defined as R(xi) = exp{− P j∈N B i ∥xi −xj∥2 1 + P j∈N W i ∥xi −xj∥2 } (4) where N B i and N W i are the set of predefined number of nearest neighbors of xi in the opposite class and the same class of xi (See Figure 3). The weak-learner weights αkt, k = 1, ..., K are then found to maximise J(H + αkthkt) by a line search. Following the AnyBoost method [8], we set the sample weights as the derivative of the cost function with respect to the classifier score. For the cost function J = log Q i P(xi)yi(1 −P(xi))(1−yi), where yi ∈{0, 1} is the label of i-th sample, the weight of k-th classifier over i-th sample is updated by wki = ∂J ∂Hk(xi) = yi −P(xi) P(xi) · Pk(xi). (5) See Figure 4 for the pseudocode of the proposed method. 3.1 Data clustering We propose a new data clustering method which assigns a positive sample xi to a classifier (or cluster) that has the highest Pk(xi). The sample weight of k-th classifier in (5) is determined by the joint probability P(x) and the probability of k-th classifier Pk(x). For a negative class (yi = 0), the weights only depend on the probability of k-th classifier. The classifier gives high weights to the negative samples that are misclassified by itself, independently of other classifiers. For a positive class, high weights are assigned to the samples that are misclassified jointly (i.e. the left term in (5)) but may be correctly classified by the k-th classifier at next rounds (i.e. high Pk(x)). That is, classifiers concentrate on samples in their expertise through the rounds of boosting. This can be interpreted as data partitioning. 3.2 Examples Figure 3 (right) illustrates the concept of the MCBoost algorithm. The method iterates two main steps: learning weak-learners and updating sample weights. States in the figure represent the sam4 1 31 1 31 1 31 10 20 30 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 1.1 1.2 classifier 1 boosting round weaklearner weight 10 20 30 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 1.1 1.2 classifier 2 10 20 30 0.4 0.5 0.6 0.7 0.8 0.9 1 1.1 1.2 1.3 classifier 3 Figure 5: Example of learning on XOR classification problem. For a given random initialisation (three different color blobs in the left), the method learns three classifiers that nicely settle into desired clusters and decision boundaries (middle). The weak-learner weights (right) show the convergence. ples that are correctly classified by weak-learners at each step. The sample weighting (5) is represented by data re-allocation. Assume that a positive class has samples of three target clusters denoted by A, B and C. Samples of more than two target clusters are initially assigned to every classifier. Weak-learners are found to classify dominant samples (bold letter) in each classifier (step 1). Classifiers then re-assign samples according to their expertise (step 2): Samples C that are misclassified by all are given more importance (bold letter). Samples B are moved to the third classifier as the expert on B. The first classifier learns next weak-learners for classifying sample C while the second and third classifiers focus on samples A and B respectively (step 3). Similarly, samples A, C are moved into the respective most experts (step 4) and all re-allocated samples are correctly classified by weak-learners (step 5). We present an example of XOR classification problems (See Figure 5). The positive class (circle) comprising the three sub-clusters and the negative class (cross) in background make the XOR configuration. Any single or double boosting classifiers, therefore, cannot successfully dichotomise the classes. We exploit vertical or horizontal lines as weak-learners and set the number of classifiers K to be three. We performed random partitioning of positive samples (shown in the left by three different color blobs) for initialising the sample weights. The final decision boundaries and the tracks of data cluster centres of the three boosting classifiers are shown in the middle. Despite the mixed-up initialisation, the method learns the three classifiers that nicely settle into the target clusters after a bit of jittering in the first few rounds. The weak-learner weights (in the right) show the convergence of the three classifiers. Note that the method does not exploit any distance information between input data points, by which conventional clustering methods can apparently yield the same data clusters in this example. As exemplified in Figure 2, obtaining desired data clusters by conventional ways are, however, difficult in practice. The proposed method works well with random initialisations and desirably exhibits quicker convergence when a better initialisation is given. 3.3 Discussion on mixture of experts and future work The existing local optimisation method, MoE, suffers from the absence of a good initialisation solution, but has nice properties once a good initialisation exists. We have implemented MoE in the Anyboost framework. The sample probability in MoE is P(xi) = 1/(1 + exp(− X k Qk(xi) · Hk(xi))) where Qk(xi) is the responsibility of k-th classifier over xi. Various clustering methods can define the function Qk(xi). By taking the derivative of the cost function, the sample weight of k-th classifier is given as wki = (yi −P(xi)) · Qk(xi). An EM-like algorithm iterates each round of boosting and the update of Qk(xi). Dynamic selection of local experts helps time-efficient classification as it does not use all experts. Useful future studies on the MCBoost method include development of a method to automatically determine K, the number of classifiers. At the moment, we first try a large K and decide the right number as the number of visually heterogeneous clusters obtained (See Section 4). A post-corrective step of initial weak-learners would be useful for more efficient classification. When the classifiers start from wrong initial clusters and oscillate between clusters until settling down, some initial weak5 K=5 K=3 K=9 Pedestrian images Face images Image cluster centres Random images and simple visual features Figure 6: Perceptual clusters of pedestrian and face images. Clusters are found to maximise discrimination power of pedestrian and face images from random images by simple visual features. learners are wrong and others may be wasted to make up for the wrong ones. Once the classifiers find right clusters, they exhibit convergence by decreasing the weak-learner weights. 4 Experiments We performed experiments using a set of INRIA pedestrian data [10] and PIE face data [9]. The INRIA set contains 618 pedestrian images as a positive class and 2436 random images as a negative class in training and 589 pedestrian and 9030 random images in testing. The pedestrian images show wide-variations in background, human pose and shapes, clothes and illuminations (Figure 6). The PIE data set involves 900 face images as a positive class (20 persons, 9 poses and 5 lighting conditions) and 2436 random images as a negative class in training and 900 face and 12180 random images in testing. The 9 poses are distributed form left profile to right profile of face, and the 5 lighting conditions make sharp changes on face appearance as shown in Figure 6. Some facial parts are not visible depending on both pose and illumination. All images are cropped and resized into 24×24 pixel images. A total number of 21780 simple rectangle features (as shown in Figure 1) were exploited. MCBoost learning was performed with the initial weights that were obtained by the k-means clustering method. Avoiding the case that any of the k-means clusters is too small (or zero) in size has helped quick convergence in the proposed method. We set the portion of high risk data as 20% of total samples for speeding up. The number of classifiers was set as K ∈{2, 3, 4, 5} and K ∈{3, 5, 7, 9} for the INRIA and PIE data set respectively. For all cases, every classifier converged within 50 boosting rounds. Figure 6 shows the cluster centers obtained by the proposed method. The object images were partitioned into K clusters (or classifiers) by assigning them to the classifier that has the highest Pk(x). For the given pedestrian images, the first three cluster centres look unique and the last two are rather redundant. The three pedestrian clusters obtained are intuitive. They emphasise the direction of intensity changes at contours of the human body as discriminating cues of pedestrian images from random images. It is interesting to see distinction of upper and lower body in the second cluster, which may be due to different clothes. For the PIE data set, the obtained face clusters reflect both pose and illumination changes, which is somewhat different from our initial expectation of getting purely pose-wise clusters as the case in Figure 1. This result is, however, also reasonable when considering the strong illumination conditions that cause shadowing of face parts. For example, frontal faces whose right-half side is not visible by the lighting cannot share any features with those having left-half side not visible. Certain profile faces rather share more facial features (e.g. one eye, eye brow and a half mouth) with the half-shadowed frontal faces, jointly making a cluster. All 9 face clusters seem to capture unique characteristics of the face images. We have also evaluated the proposed method in terms of classification accuracy. Figure 7 shows false-negative and false-positive curves of MCBoost method and AdaBoost method [7]. We set all 6 0 0.1 0.2 0.3 0.4 0.5 0 0.1 0.2 0.3 0.4 0.5 False positives False negatives 0 0.1 0.2 0.3 0.4 0.5 0 0.1 0.2 0.3 0.4 0.5 0 0.1 0.2 0.3 0.4 0.5 0 0.1 0.2 0.3 0.4 0.5 0 0.1 0.2 0.3 0.4 0.5 0 0.1 0.2 0.3 0.4 0.5 MCBoost AdaBoost K=2 K=3 K=4 K=5 0 0.1 0.2 0.3 0.4 0.5 0 0.1 0.2 0.3 0.4 0.5 False positives False negatives 0 0.1 0.2 0.3 0.4 0.5 0 0.1 0.2 0.3 0.4 0.5 0 0.1 0.2 0.3 0.4 0.5 0 0.1 0.2 0.3 0.4 0.5 0 0.1 0.2 0.3 0.4 0.5 0 0.1 0.2 0.3 0.4 0.5 AdaBoost MCBoost Pose label AdaBoost MCBoost K=3 K=5 K=7 K=9 Figure 7: ROC curves for the pedestrian data (top four) and face data (bottom four). MCBoost significantly outperformed AdaBoost method for both data sets and different cluster numbers K. MCBoost is also much superior to AdaBoost method learnt with manual pose label (bottom right). conditions (e.g. number of weak-learners) equivalent in both methods. The k-means clustering method was applied to positive samples. Boosting classifiers were individually learnt by the positive samples of each cluster and all negative samples in AdaBoost method. The clusters obtained by the k-means method were exploited as the initialisation in MCBoost method. For the PIE data set, we also performed data partitioning by the manual pose label and learnt boosting classifiers separately for each pose in AdaBoost method. For both pedestrian and face experiments and all different number of classifiers K, MCBoost significantly outperformed AdaBoost method by finding optimal data clusters and associated feature sets. Our method is also much superior to the Adaboost learnt with manual pose labels (bottom right). In the AdaBoost method, increasing number 0.2 0.4 0.6 0.8 Figure 8: Example pedestrian detection result. of clusters deteriorated the accuracy for the pedestrian data, whereas it increased the performance for the face data. This may be explained by the number of meaningful data clusters. We observed in Figure 6 that there are only three heterogenous pedestrian clusters while there are more than nine face clusters. In general, a smaller number of positive samples in each classifier (i.e. a larger K) causes performance degradation, if it is not counteracted by finding meaningful clusters. We deduce, by a similar reason, that the performance of our method was not much boosted when the number of classifiers was increased (although it tended to gradually improve the accuracy for both data sets). Figure 8 shows an example pedestrian detection result. Scanning the example image yields a total number of 172,277 image patches to classify. Our method ran in 3.6 seconds by non-optimised Matlab codes in a 3GHz CPU PC. 5 Conclusions We have introduced a discriminative co-clustering problem of images and visual features and have proposed a method of multiple classifier boosting called MCBoost. It simultaneously learns image clusters and boosting classifiers, each of which has expertise on an image cluster. The method works well with either random initialisation or initialisation by conventional unsupervised clustering 7 methods. We have shown in the experiments that the proposed method yields perceptual co-clusters of images and features. In object detection tasks, it significantly outperforms two conventional designs that individually learn multiple boosting classifiers by the clusters obtained by the k-means clustering method and pose-labels. We will apply MCBoost to various other co-clustering problems in the future. Some useful studies on MCBoost method have also been discussed in Section 3.3. Learning with a more exhaustive training set would improve the performance of the method in object detection tasks. Acknowledgements The authors are grateful to many people who have helped by proofreading drafts and providing comments and suggestions. They include Z. Ghahramani, B. Stenger, T. Woodley, O. Arandjelovic, F. Viola and J. Kittler. T-K. Kim is financially supported by the research fellowship of the Sidney Sussex College of the University of Cambridge. References [1] I.S. Dhillon, S. Mallela and D.S. Modha, Information-theoretic co-clustering, Proc. ACM SIGKDD Int’l Conf. on Knowledge discovery and data mining, pages 89–98, 2003. [2] M.I. Jordan and R.A. Jacobs, Hierarchical mixture of experts and the EM algorithm, Neural Computation, 6(2):181–214, 1994. [3] P. Viola and M. Jones, Robust real-time object detection, Int’l J. Computer Vision, 57(2):137–154, 2002. [4] A. Torralba, K. P. Murphy and W. T. Freeman, Sharing visual features for multiclass and multiview object detection, IEEE Trans. on Pattern Analysis and Machine Intelligence, 29(5):854–869, 2007. [5] P. Viola, J.C. Platt and C. Zhang, Multiple Instance Boosting for Object Detection, Proc. Advances in Neural Information Processing Systems, pages 1417–1426, 2006. [6] S.Z. Li and Z. Zhang, Floatboost learning and statistical face detection, IEEE Trans. on Pattern Analysis and Machine Intelligence, 26(9):1112–1123, 2004. [7] R. Schapire, The strength of weak learnability, Machine Learning, 5(2):197–227, 1990. [8] L. Mason, J. Baxter, P. Bartlett and M. Frean, Boosting algorithms as gradient descent, Proc. Advances in Neural Information Processing Systems, pages 512–518, 2000. [9] T. Sim, S. Baker, and M. Bsat, The CMU Pose, Illumination, and Expression Database, IEEE Trans. on Pattern Analysis and Machine Intelligence, 25(12):1615–1618, 2003. [10] N. Dalal and B. Triggs, Histograms of Oriented Gradients for Human Detection, Proc. IEEE Conf. Computer Vision and Pattern Recognition, pages 886–893, 2005. 8
2008
163
3,413
Load and Attentional Bayes Peter Dayan Gatsby Computational Neuroscience Unit, UCL London, England, WC1N 3AR dayan@gatsby.ucl.ac.uk Abstract Selective attention is a most intensively studied psychological phenomenon, rife with theoretical suggestions and schisms. A critical idea is that of limited capacity, the allocation of which has produced continual conflict about such phenomena as early and late selection. An influential resolution of this debate is based on the notion of perceptual load (Lavie, 2005), which suggests that low-load, easy tasks, because they underuse the total capacity of attention, mandatorily lead to the processing of stimuli that are irrelevant to the current attentional set; whereas high-load, difficult tasks grab all resources for themselves, leaving distractors high and dry. We argue that this theory presents a challenge to Bayesian theories of attention, and suggest an alternative, statistical, account of key supporting data. 1 Introduction It was some fifty years after James (1950)’s famously poetic description of our capacities for attention that more analytically-directed experiments began, based originally on dichotic listening Cherry (1953). There are three obvious dichotic tasks: (i) being able to interpret fully two separate streams of information coming into the two ears; (ii) the less ambitious version of this of being able to interpret fully one of the streams, specified top-down, without interference from the other one; and (iii) being able to combine information from the two ears appropriately, perhaps into a single percept. Various forms, interpretations and conflicts about these three tasks have permeated the field of attention ever since (Driver, 2001; Paschler, 1998), driven by different notions of the computational tasks and constraints at hand. The experiments in dichotic listening coincided with the quickly burgeoning realization that mathematical concepts from Shannonian information theory would be very helpful for understanding biological information processing. One central concept in information theory is that of a limited capacity channel, and Broadbent (1958) adopted this as a formal basis for understanding the necessity for, and hence the nature of, selection. Broadbent (1958)’s theory critically involves early selection, in that following a first, automatic, parallel stage of low-level perceptual processing (itself the subject of important studies of bottom-up influences on selection, Zhaoping, 2006), a relevant stream should be selected for subsequent higher-level, semantic, processing, leaving any irrelevant streams in the cold. However, evidence that information in unattended streams is actually processed semantically (eg being able to bias the perception of ambiguous words in the attended stream; Mackay, 1973), led to alternative theories, either late selection (influentially, Deutsch and Deutsch, 1963; Duncan, 1980), in which both streams are fully processed, but with the irrelevant stream being prevented by a selective process at the last step from entering memory or awareness, or weaker forms of this, such as the notion that elements from the irrelevant stream might be attenuated, only sometimes progressing through to higher levels of processing (Treisman, 1960, 1969). Many hypotheses in the field depend on this collection of metaphors, nicely exemplified by the zoom-lens theory of Eriksen and St. James (1986) (based on influential experiments on distractor processing such as Eriksen and Eriksen, 1974), which suggests that the smaller the attentional focus, the more intense it can somehow be, given that the limited capacity is ‘spread’ over a smaller area. However, of course, late selection makes little sense from a limited capacity viewpoint; and short of a theory of what controls the degree of attenuation of irrelevant stimuli, Treisman (1960)’s idea is hard to falsify. Here, we consider the seminal sharp operationalization of Lavie and Tsal (1994); Lavie (2005), who suggested that attenuation is a function of load, such that in easy tasks, irrelevant data is always processed, even at the cost of worse performance on the relevant information, whereas in difficult tasks, no capacity remains, and so distractors are more effectively removed. To reiterate, the attentional load hypothesis, although an attractive formalization of attenuation, suggests that the brain is unable on easy tasks to exclude information that is known to be irrelevant. It therefore involves an arguably infelicitous combination of sophisticated attentional shaping (as to what can be attended in high-load situations) with inept control. Although the Bayesian revolution in cognitive science has had a huge impact over modern views of sensory processing (see, for instance, Rao et al., 2002, and references therein), having the ability to resolve many issues in the field as a whole, there are few recent attempts to build probabilistic models for selective attention (see Shaw, 1982; Palmer, 1994; Dayan and Zemel, 1999; Navalpakkam and Itti, 2006; Mozer and Baldwin, 2008; Yu and Dayan, 2005; Yu et al., 2008). This is despite the many other computational models of attention (see Itti and Koch, 2001; Zhaoping, 2006). Indeed, Whiteley and Sahani (2008) have suggested that this lacuna arises from a focus on optimal Bayesian inference in the face of small numbers of objects in the focus of attention, rather than the necessity of using approximate methods in the light of realistic, cluttered, complex scenes. Some of the existing probabilistic models are aimed at variants of search (Navalpakkam and Itti, 2006; Mozer and Baldwin, 2008); however others, including Palmer (1994); Dayan and Zemel (1999), and one of the two models in Yu et al. (2008), are more similar to the account here. They acknowledge that there is a critical limited resource coming from the existence of neurons with large receptive fields into which experimenters slot multiple sensory objects, some relevant, some irrelevant. Probabilistically-correct inference should then implement selection, when data that is known to be irrelevant is excluded to the advantage of the relevant information (eg Dayan and Zemel, 1999; Palmer, 1994). However, in other circumstances, it will be appropriate to take advantage of the information about the target that is available in the neurons with large fields, even if this means allowing some influence on the final decisions from distractors. Here, we build a Bayesian-inspired account of key data used to argue for the attentional load hypothesis (based on an extension of Yu et al. (2008)’s model of Eriksen and Eriksen (1974)). Section 2 describes the key data; section 3 the model and results; and section 4 discusses the implications. 2 Attentional Load Figure 1 shows the central experiment and results from Lavie and de Fockert (2003) that we set out to capture. Subjects had to report the identity of a target letter that was either an ‘X’ or an ‘N’ (here, the former) presented in one of eight locations arranged in a circle around the fixation point. The reaction times and accuracies of their selections were measured. There was also a distractor letter in the further periphery (the larger ‘N’) which was either compatible (ie the same as the target), incompatible (as here, the opposite of the target), or, in so-called neutral trials, a different letter altogether. Figure 1A-C show the three key conditions. Figure 1A is a high-load condition, in that there are irrelevant non-targets in the remaining 7 positions around the circle. Figure 1B is a low-load condition, since there is no non-target. Figure 1C is a critical control, called the degraded low-load condition, and was actually the main topic of Lavie and de Fockert (2003). In this, the difficulty of the sensory processing was increased (by making the target smaller and dimmer) without changing the attentional (ie selectional) load. Figure 1D shows the mean reaction times (RTs) for these conditions for the three sorts of distractor (RTs suffice here, since there was no speed accuracy tradeoff at work in the different conditions; data not shown). There are three key results: 1. The central finding about attentional load is that the distractor exerted a significant effect over target processing only in the low load case – that is, an incompatible distractor slowed down the RTs compared with a neutral distractor for the low load case but not the high load case. Figure 1: The attentional load task, from Lavie and de Fockert (2003). Subjects had to judge whether a target letter in the central circle around fixation was ‘N’ or ‘X’ in the face of a compatible, incompatible (shown) or neutral distractor. A) high-load condition with non-target letters occupying the other positions in the circle. B) low-load condition with no non-target letters. C) degraded low-load condition with no non-targets but a smaller (not shown) and darker target. D) reaction times (RTs) for the conditions, averaging only over correct choices. 2. Since, in the degraded low-load case the RTs were slower but the influence of the distractor was if anything greater, this could not just be a function of the processing time or difficulty. Indeed, Lavie and de Fockert (2003) noted the distinction made by Norman and Bobrow (1975) between data- and resource-limited processing, with excess resources (putatively ample, given the low load) unable to make up for the poor quality sensory data, and so predicted this greater distractor impact. 3. It is apparent that compatible distractors were of almost no help in any case, whereas incompatible distractors were harmful. 3 The Bayesian model The data in figure 1 pose the question for normative modeling as to why the distractor would corrupt processing of the target in the easy, low-load, case, but not the difficult, high-load case. No normative account could simply assume that extra data ‘leak’ through in the low-load condition (which is the attentional load hypothesis) if the subjects have the ability to fashion attention far more finely in other cases, such as that of high load. We argue that these results stem from the simple observation that the visual system has available receptive fields with a range of sizes, including smaller, spatially precise ones, which can be nicely confined to the target; and larger, spatially extended ones, which may include both target and distractor. In this case, normative processing will combine information from all the receptive fields, with Bayesian inference and marginalization exactly eliminating any substantial impact from those that are useless or confusing. In the high load case, the proximal non-target stimuli have the effect of adding so much extra noise to the units with large receptive fields compared with their signal about the target, that only the smallest receptive fields will be substantially useful. This implies that the distractor will exert little influence. In the low load case, large receptive fields that also include the distractor will be usefully informative about the target, and so the distractor will exert an influence. Note that this happens automatically through inference – indeed to make this point starkly, there is no explicit attentional control signal in our model whatsoever, only inference and marginalization.1 1Note that Lavie and de Fockert (2003) chose the conditions in the experiment at random, so many forms of top-down selection would not be possible. neutral incompatible compatible load n t n d n t n d n t n d low 0 +c 0 0 0 +c 0 -1 0 +c 0 +1 high +1 +c -1 0 +1 +c -1 -1 +1 +c -1 +1 Table 1: Our version of the task. This table shows 6 out of the 18 conditions. Each display consists of four stimulus positions labelled n for the non-targets; t for the target (shown in the table, though not the display, as being boxed); and d for the distractor, which is relatively far from the target. The target takes the values ±c, where c acts like a contrast; subjects have to report its sign. The distractor can be 0 (neutral) or ±1; and is compatible if it has the same sign as the target (and conversely, incompatible). Load is increased by having non-zero non-targets which are spatially balanced, with mean 0, so providing no net information about the sign of the target, but only noise. The 18 conditions come from using c = ±1 and c = ±0.3, with the degraded condition (|c| = 0.3) only being run for the case of low load, as in figure 1D. Lavie and de Fockert (2003)’s experiment is rather complicated. Table 1 shows our simplification of it, to a form which is slightly closer to a version of an Eriksen task (Eriksen and Eriksen, 1974) with two optional flankers in known positions on either size of the target (the non-targets) and a farther-flung distractor (the input layer of figure 2A cartoons the spatial arrangement). The target takes the value ±c; subjects have to report its sign. The distractor can be neutral (0) or have the same sign as (compatible) or a different sign from (incompatible) the target. In the low load condition, the non-target units are 0; in the high load, one is +1; the other is −1, making them balanced, but confusing, because they lead to excess noise. The generative model Table 1 indicates the values determining the various conditions from the perspective of the experimenter. We assume that the subject performs inference about the sign of the target based on noisy observations created by a generative model. In the generative model, the values in table 1 amount to hidden structure, which, as in Yu et al. (2008), is mapped and mixed through various receptive fields to provide the noisy input to a Bayesian recognition model. The job of the recognition model is to calculate the posterior probability of the various hidden settings given data, and, by marginalizing (summing) out all the hidden settings apart from the state of the target, report on its sign. Figure 2A shows the generative model, indicating the receptive fields (RFs) associated with this mixing. We consider 8 topographically-mapped units, 4 with small RFs covering only a single input (the generative weights are just the identity map); and 4 with large RFs (in which the inputs are mixed together more holistically). Since the distractor is relatively far from the target and non-target stimuli, the weights associated with its hidden values are lower for the three large RFs mapped to the target and non-target hidden units; the target and non-target hidden units have smaller weights to the generated input associated with the distractor. For simplicity, we treat the distractor as equidistant from the target and non-target input, partially modeling the fact that it can be in different locations. We assume a crude form of signal-dependent noise; it is this that makes the non-target stimuli so devastating. Figure 2B shows the means and standard deviations arising from the generative model for the 8 units (one per column) for the six conditions in table 1 (rows from top to bottom – low load: neutral, incompatible, compatible; then high load: neutral, incompatible, compatible). For this figure, c = +1. The means associated with the small and large RF target units show the lack of bias from the non-targets in the high-load condition; and for the large RF case, the bias associated with the distractor. The standard deviations play the most critical role in the model, defining what it means for the nontarget stimuli, when present, to make inference difficult. They therefore constitute a key modeling assumption. In the high load case, the units with the large RFs are assumed to have very high standard deviations, coming from a crude form of signal-dependent noise. This captures the relatively uselessness of these large RFs in the high load condition. However, and importantly, their mean values are unaffected by the non-target stimuli, since the non-targets are balanced between positive and negative values, preferring neither sign of target. A B large RFs input n n t d weights small RFs 1 2 3 4 5 6 7 8 n n d t small large n n d t small large 3 4 5 1 6 7 8 2 3 4 5 1 6 7 8 2 inco neut comp neut comp inco std mean RF size RF size unit # attn load high low Figure 2: The generative model. A) In the model, the four input units, representing non-targets, the target and the distractor, are assumed to generate 8 input units which fall into two groups, with small and large receptive fields (RFs). The Hinton diagrams of the weights indicate how the RFs are represented (all weights are positive; the maximum value is 0.3). B) These plots show the means and standard deviations in the generative model associated with the 8 input units for the low and high load cases shown in table 1 (in raster scan order). The means for the large RFs (based on the weights in A) are unaffected by the load; the standard deviations for the units with large receptive fields are much higher in the high load condition. Standard deviations are affected by a coarse form of signal-dependent noise. In all cases, a new sample from the generative model is provided at each time step; the noise corrupting each of the observed units is assumed to be Gaussian, and independent across units and over time. The recognition model We build a recognition model based on this generative model. The recognition model is quite similar to a sequential probability ratio test (SPRT; Wald, 1947), except that, as in Yu and Dayan (2005); Yu et al. (2008), it is necessary to perform inference over all the possible values of the hidden variables (all the possible values of the hidden structure2), then marginalizing out all the variables apart the the target itself. We accumulate evidence until a threshold of 0.9 is reached on the probability that the target is either positive or negative (reporting whichever one is more likely). However, to take account of the possibility of erroneous, early, responses, there is also a probability of 0.01 per step of stopping the accumulation and reporting whichever sign of target has a higher probability (guessing randomly if this probability is 0.5). This factor played a critical role in Yu et al. (2008) in generating early responses. Results Figure 3 shows the results of inference based on the model. For each of the conditions, figure 3A shows the reaction times in the form of the mean number of steps to a choice. Here, as in the data in Lavie and de Fockert (2003), the RTs are averaged only over cases in which the model got the answer correct. However, figure 3B shows the percentage correct answers in each condition; the errors are relatively rare, and so the RTs plots look identical. The datapoints are averages over more than 35, 000 samples (depending on the actual error rates) and so the errorbars are too small to see. Comparing figure 3A with the data in figure 1D, it is apparent that the main trends in the data are closely captured. This general pattern of results is robust to many different parameter values; though it is possible (by reducing c) to make inference take very much longer still in the degraded low load condition whilst maintaining and boosting the effect of high load. The error probabilities in figure 3B indicate that the pattern of RTs is not accounted for by a tradeoff between speed and accuracy. The three characteristics of these data described above are explained in the model as: 1. In the low load case, the lack of non-targets means that the inputs based on the large RFs are usefully informative about the target, and therefore automatically play a key role in posterior inference. Since these inputs are also influenced by the distractor, there is an RT 2In fact, also including the possibility of a degraded high-load case low load high load degraded low load low load high load degraded low load 5 10 15 20 25 30 steps Incompatible Neutral Compatible 0 0.1 0.2 0.3 0.4 0.5 error rate Incompatible Neutral Compatible error rate RT A B Figure 3: Results. A) Mean RTs (steps of inference) for correct choices in each of the 9 cases (since the target is equally often positive and negative, we averaged over these cases. Here, the threshold on the (marginalized) probability was 0.9, and there was a probability of 0.01 per step that inference would terminate early with whichever response was more probable. B) Error probabilities for the same conditions showing the lack of a speed-accuracy trade-off. All points are averages over more than 35000 points, and so errorbars would be too small to see. cost in the face of incompatibility. However, in the high load case, the non-target stimuli are closer to the target and exert substantial influence over the noise corrupting the large RF units associated with it (and no net signal). This makes these large RF units relatively poor sources of information about the target. Thus the smaller RF units are relied upon instead, which are not affected by the distractor. 2. Rather as suggested in Norman and Bobrow (1975); Lavie and de Fockert (2003): in the data-poor case of the degraded input, it is particularly important to take advantage of information from the large RFs, to make inferences about the target; therefore the distractor exerts a large influence over target processing. 3. The compatible distractor is helpful to a lesser extent than the incompatible one is harmful, for a couple of reasons. First, there is a ceiling effect for the former coming from the non-linearity of an effective sigmoid function that arises in turning log likelihood ratios into probabilities. Second, compared with a neutral distractor, the compatible distractor increases the (signal-dependent) noise associated with the units with large RFs, reducing their informativeness about the target. 4 Discussion In this paper, we have shown how to account for key results used to argue for an attentional load hypothesis. Our model involves simple Bayesian inference based on a generative process recognizing the existence of small and large receptive fields. The attentional load hypothesis suggests that when little attention is required to solve the set task, inputs associated with distractor stimuli leak through with little attenuation, and so cause disruption; when the task is difficult, attention is totally occupied with the set task, leaving nothing left over. By contrast, we have suggested that an inferential model taking advantage of all the information in the input will show exactly the same characteristic, with the key issue being whether the units with large RFs, which include the distractor, are rendered useless by the non-target stimuli that make for the high load in the first place. The advantage of this version of an attenuation theory (Treisman, 1960, 1969) is that it obviates the requirement to appeal to an inexplicable inefficiency, over and above the existence of units with large RFs, and indeed relates this set of selective attentional tasks to the wide range of other accounts of probabilisticallycorrect sensory inference. One key characteristic of this model (shared with, among others, Yu et al., 2008) is that the form of selection it considers is an output of inference rather than an input into it. That is, the model does not employ an explicit attentional mechanism in inference which has the capacity to downplay some input units over others. The model does know the location of the target, and focuses all its resources on it; but there is no further way of boosting or suppressing some RFs compared with others. Most of the substantial results on the neuroscience of selective attention (eg Moran and Desimone, 1985; Desimone and Duncan, 1995; Reynolds and Chelazzi, 2004) study the focusing process, rather than the post-focus information integration that we have looked at; the forms of attention at play in the load-related tasks we have discussed are somewhat orthogonal. It would be interesting to design neurophysiological experiments to probe the form of online selection at work in the attentional load tasks. The difference between the present model and the spatial version of Yu et al. (2008) is that the model here includes RFs of different sizes, whereas in that model, the distractors were always close to the target. Further, the two neutral conditions here (no distractor, and low load) were not modeled in the earlier study. Yu et al. (2008) suggested that the anterior cingulate might monitor conflict between the cases of compatible and incompatible distractors as part of an approximate inference strategy. That seems most unlikely here, since the conflict would have to be between the multidimensional collection of hidden nuisance variables (notably the cross product between the states of the nontargets and the state of the distractor), which seems implausibly complicated. The assumptions of large RFs and their high standard deviations in the high load condition are certainly rather simplistic. However, (a) RFs in inferotemporal cortex are indeed very large, allowing for the possibility of distractor interference in the low load condition; and (b) even under the attentional load hypothesis, the only reason that an unattenuated distractor stimulus would interfere with target processing is that there is something in common about them, since it is known that there is more to the effects of distractors than just competition at the stage of the actual responses (Driver, 2001). Further, the assumption that the inputs with large RFs have high standard deviations in the high load condition is a most straightforward way to capture the essential effect of the non-target stimuli in disrupting target processing in a way that forces a more stringent attentional effect associated with the use of the small RFs. The attentional load theory has been applied to many tasks (including the regular Eriksen task, Eriksen and Eriksen, 1974) as well as the one here. However, it would be good to extend the current model to match the experimental circumstances in Lavie and de Fockert (2003) more faithfully. Perhaps the most significant lacuna is that, as in the Eriksen task, we assumed that the subjects knew the location of the target in the stimulus array, whereas in the real experiment, this had to be inferred from the letters in the circle of targets close to fixation (figure 1A). Modeling this would effectively require a more complex collection of letter-based RFs, together with a confusion matrix associated with the perceptual similarities of letters. This induces a search problem, more like the one studied by Mozer and Baldwin (2008), except, again, multiple sizes of RFs would play a critical role. It would also be worth extending the current model to the much wider range of other tasks used to explore the effects of attentional load (such as Forster and Lavie, 2008). In conclusion, we have suggested a particular rationale for an attenuation theory of attention, which puts together the three tasks suggested at the outset for dichotic listening. Inputs should automatically be attenuated to the extent that they do not bear on (or, worse, are confusing with respect to) a task. The key resource limitation is the restricted number, and therefore, the necessarily broad tuning of RFs; the normative response to his makes attenuation and combination kissing cousins. Acknowledgements I am most grateful to Louise Whiteley for helpful comments and to her and Nillie Lavie for discussions. Funding came from the Gatsby Charitable Foundation. References Broadbent, D. (1958). Perception and communication. OUP, Oxford, England. Cherry, E. (1953). Some experiments on the recognition of speech with one and with two ears. Journal of the Acoustical Society of America, 25:975–979. Dayan, P. and Zemel, R. (1999). Statistical models and sensory attention. In ICANN 1999, volume 2. IEE. Desimone, R. and Duncan, J. (1995). Neural mechanisms of selective visual attention. Annu Rev Neurosci, 18:193–222. Deutsch, J. A. and Deutsch, D. (1963). Attention: Some theoretical considerations. Psychol Rev, 70:80–90. Driver, J. (2001). A selective review of selective attention research from the past century. Br J Psychol, 92 Part 1:53–78. Duncan, J. (1980). The locus of interference in the perception of simultaneous stimuli. Psychol Rev, 87(3):272–300. Eriksen, B. and Eriksen, C. (1974). Effects of noise-letters on identification of a target letter in a nonsearch task. Perception & Psychophysics, 16:143–149. Eriksen, C. W. and St. James, J. D. (1986). Visual attention within and around the field of focal attention: a zoom lens model. Percept Psychophys, 40(4):225–240. Forster, S. and Lavie, N. (2008). Failures to ignore entirely irrelevant distractors: the role of load. J Exp Psychol Appl, 14(1):73–83. Itti, L. and Koch, C. (2001). Computational modelling of visual attention. Nat Rev Neurosci, 2(3):194–203. James, W. (1890/1950). The Principles of Psychology. Dover, New York, NY. Lavie, N. (2005). Distracted and confused?: selective attention under load. Trends Cogn Sci, 9(2):75–82. Lavie, N. and de Fockert, J. W. (2003). Contrasting effects of sensory limits and capacity limits in visual selective attention. Percept Psychophys, 65(2):202–212. Lavie, N. and Tsal, Y. (1994). Perceptual load as a major determinant of the locus of selection in visual attention. Percept Psychophys, 56(2):183–197. Mackay, D. (1973). Aspects of the theory of comprehension, memory and attention. Quarterly Journal of Experimental Psychology,, 25:22–40. Moran, J. and Desimone, R. (1985). Selective attention gates visual processing in the extrastriate cortex. Science, 229(4715):782–784. Mozer, M. and Baldwin, D. (2008). Experience-guided search: A theory of attentional control. In Platt, J., Koller, D., Singer, Y., and Roweis, S., editors, Advances in Neural Information Processing Systems 20, pages 1033–1040. MIT Press, Cambridge, MA. Navalpakkam, V. and Itti, L. (2006). Optimal cue selection strategy. In Weiss, Y., Sch¨olkopf, B., and Platt, J., editors, Advances in Neural Information Processing Systems 18, pages 987–994. MIT Press, Cambridge, MA. Norman, D. and Bobrow, D. (1975). On Data-limited and Resource-limited Processes. Cognitive Psychology, 7(1):44–64. Palmer, J. (1994). Set-size effects in visual search: the effect of attention is independent of the stimulus for simple tasks. Vision Res, 34(13):1703–1721. Paschler, H. (1998). The Psychology of Attention. MIT Press, Cambridge, MA. Rao, R. P. N., Olshausen, B. A., and Lewicki, M. S., editors (2002). Probabilistic Models of the Brain. MIT Press, Cambridge, MA. Reynolds, J. H. and Chelazzi, L. (2004). Attentional modulation of visual processing. Annu Rev Neurosci, 27:611–647. Shaw, M. (1982). Attending to multiple sources of information. Cognitive Psychology, 14:353–409. Treisman, A. M. (1960). Contextual cues in selective listening. Quarterly Journal of Experimental Psychology, 12:242–248. Treisman, A. M. (1969). Strategies and models of selective attention. Psychol Rev, 76(3):282–299. Wald, A. (1947). Sequential Analysis. Wiley, New York. Whiteley, L. and Sahani, M. (2008). Attention resolves the effects of a computational bottleneck: modelling binding, precueing, and task-driven bias. In COSYNE 2008, pages I–98. Yu, A., Dayan, P., and Cohen, J. (2008). Bayesian account of attentional control. Journal of Experimental Psychology: Human Percept Psychophys, in press. Yu, A. J. and Dayan, P. (2005). Inference, attention, and decision in a bayesian neural architecture. In Saul, L. K., Weiss, Y., and Bottou, L., editors, Advances in Neural Information Processing Systems 17, pages 1577–1584. MIT Press, Cambridge, MA. Zhaoping, L. (2006). Theoretical understanding of the early visual processes by data compression and data selection. Network, 17(4):301–334.
2008
164
3,414
Dependence of Orientation Tuning on Recurrent Excitation and Inhibition in a Network Model of V1 Klaus Wimmer1*, Marcel Stimberg1*, Robert Martin1, Lars Schwabe2, Jorge Mariño3, James Schummers4, David C. Lyon5, Mriganka Sur4, and Klaus Obermayer1 1 Bernstein Center for Computational Neuroscience and Technische Universität Berlin, Germany 2 Dept of Computer Science and Electrical Engineering, University of Rostock, Germany 3 Dept of Medicine, Neuroscience, and Motor Control Group, Univ. A Coruña, Spain 4 Dept of Brain and Cognitive Sci and Picower Ctr for Learning and Memory, MIT, Cambridge 5 Dept of Anatomy and Neurobiology, University of California, Irvine, USA [klaus, mst]@cs.tu-berlin.de Abstract The computational role of the local recurrent network in primary visual cortex is still a matter of debate. To address this issue, we analyze intracellular recording data of cat V1, which combine measuring the tuning of a range of neuronal properties with a precise localization of the recording sites in the orientation preference map. For the analysis, we consider a network model of Hodgkin-Huxley type neurons arranged according to a biologically plausible two-dimensional topographic orientation preference map. We then systematically vary the strength of the recurrent excitation and inhibition relative to the strength of the afferent input. Each parametrization gives rise to a different model instance for which the tuning of model neurons at different locations of the orientation map is compared to the experimentally measured orientation tuning of membrane potential, spike output, excitatory, and inhibitory conductances. A quantitative analysis shows that the data provides strong evidence for a network model in which the afferent input is dominated by strong, balanced contributions of recurrent excitation and inhibition. This recurrent regime is close to a regime of “instability”, where strong, self-sustained activity of the network occurs. The firing rate of neurons in the best-fitting network is particularly sensitive to small modulations of model parameters, which could be one of the functional benefits of a network operating in this particular regime. 1 Introduction One of the major tasks of primary visual cortex (V1) is the computation of a representation of orientation in the visual field. Early models [1], combining the center-surround receptive fields of lateral geniculate nucleus to give rise to orientation selectivity, have been shown to be over-simplistic [2; 3]. Nonetheless, a debate remains regarding the contribution of afferent and recurrent excitatory and inhibitory influences [4; 5]. Information processing in cortex changes dramatically with this “cortical operating regime”, i. e. depending on the relative strengths of the afferent and the different recurrent inputs [6; 7]. Recently, experimental and theoretical studies have investigated how a cell’s orientation tuning depends on its position in the orientation preference map [7–10]. However, the computation of orientation selectivity in primary visual cortex is still a matter of debate. The wide range of models operating in different regimes that are discussed in the literature are an indication that models of V1 orientation selectivity are underconstrained. Here, we assess whether the specific location dependence of the tuning of internal neuronal properties can provide sufficient *K. Wimmer and M. Stimberg contributed equally to this work. 1 constraints to determine the corresponding cortical operating regime. The data originates from intracellular recordings of cat V1 [9], combined with optical imaging. This allowed to measure, in vivo, the output (firing rate) of neurons, the input (excitatory and inhibitory conductances) and a state variable (membrane potential) as a function of the position in the orientation map. Figure 1 shows the experimentally observed tuning strength of each of these properties depending on the distribution of orientation selective cells in the neighborhood of each neuron. The x-axis spans the range from pinwheels (0) to iso-orientation domains (1), and each y-axis quantifies the sharpness of tuning of the individual properties (see section 2.2). The tuning of the membrane potential (Vm) as well as the tuning of the total excitatory (ge) and inhibitory (gi) conductances vary strongly with map location, whereas the tuning of the firing rate (f) does not. Specifically, the conductances and the membrane potential are sharper tuned for neurons within an iso-orientation domain, where the neighboring neurons have very similar orientation preferences, as compared to neurons close to a pinwheel center, where the neighboring neurons show a broad range of orientation preferences. Figure 1: Variation of the orientation selectivity indices (OSI, cf. Equation 2) of the firing rate (f), the average membrane potential (Vm), and the excitatory (ge) and inhibitory (gi) input conductances of neurons in cat V1 with the map OSI (the orientation selectivity index of the orientation map at the location of the measured neuron). Dots indicate the experimentally measured values from 18 cells [9]. Solid lines show the result of a linear regression. The slopes (values ± 95% confidence interval) are −0.02 ± 0.24 (f), 0.27 ± 0.22 (Vm), 0.49 ± 0.20 (ge), 0.44 ± 0.19 (gi). This paper focuses on the constraints that this specific map-location dependence of neuronal properties imposes on the operating regime of a generic network composed of Hodgkin-Huxley type model neurons. The model takes into account that the lateral inputs a cell receives are determined (1) by the position in the orientation map and (2) by the way that synaptic inputs are pooled across the map. The synaptic pooling radius has been shown experimentally to be independent of map location [9], resulting in essentially different local recurrent networks depending on whether the neighborhood is made up of neurons with similar preferred orientation, such as in an iso-orientation domain, or is highly non-uniform, such as close to a pinwheel. The strength of lateral connections, on the other hand, is unknown. Mariño et al. [9] have shown that their data is compatible with a model showing strong recurrent excitation and inhibition. However, this approach cannot rule out alternative explanations accounting for the emergence of orientation tuning in V1. Here, we systematically explore the model space, varying the strength of the recurrent excitation and inhibition. This, in effect, allows us to test the full range of models, including feed-forward-, inhibition- and excitation-dominated models as well as balanced recurrent models, and to determine those that are compatible with the observed data. 2 Methods 2.1 Simulation: The Hodgkin-Huxley network model The network consists of Hodgkin-Huxley type point neurons and includes three voltage dependent currents (Na+ and K+ for generation of action potentials, and a non-inactivating K+-current that is responsible for spike-frequency adaptation). Spike-frequency adaptation was reduced by a factor 0.1 for inhibitory neurons. For a detailed description of the model neuron and the parameter values, see Destexhe et al. [11]. Every neuron receives afferent, recurrent and background input. We 2 used exponential models for the synaptic conductances originating from GABAA-like inhibitory and AMPA-like excitatory synapses [12]. Slow NMDA-like excitatory synapses are modeled by a difference of two exponentials (parameters are summarized in Table 1). Additional conductances represent background activity (Ornstein-Uhlenbeck conductance noise, cf. Destexhe et al. [11]). Table 1: Parameters of the Hodgkin-Huxley type neural network. PARAMETER DESCRIPTION VALUE NAff Number of afferent exc. synaptic connections per cell 20 NE Number of recurrent exc. synaptic connections per cell 100 NI Number of recurrent inh. synaptic connections per cell 50 σE = σI Spread of recurrent connections (std. dev.) 4 units (125 µm) Ee Reversal potential excitatory synapses 0 mV Ei Reversal potential inhibitory synapses -80 mV τE Time constant of AMPA-like synapses 5 ms τI Time constant of GABAA-like synapses 5 ms τ1 Time constant of NMDA-like synapses 80 ms τ2 Time constant of NMDA-like synapses 2 ms µd E, σd E Mean and standard deviation of excitatory synaptic delay 4 ms, 2 ms µd I, σd I Mean and standard deviation of inhibitory synaptic delay 1.25 ms, 1 ms gAff E Peak conductance of afferent input to exc. cells 141 nS gAff I Peak conductance of afferent input to inh. cells 0.73 gAff E gII Peak conductance from inh. to inh. cells 1.33 gAff E gEI Peak conductance from inh. to exc. cells 1.33 gAff E The network was composed of 2500 excitatory cells arranged on a 50 × 50 grid and 833 inhibitory neurons placed at random grid locations, thus containing 75% excitatory and 25% inhibitory cells. The complete network modeled a patch of cortex 1.56 × 1.56 mm2 in size. Connection probabilities for all recurrent connections (between the excitatory and inhibitory population and within the populations) were determined from a spatially isotropic Gaussian probability distribution (for parameters, see Table 1) with the same spatial extent for excitation and inhibition, consistent with experimental measurements [9]. In order to avoid boundary effects, we used periodic boundary conditions. Recurrent excitatory conductances were modeled as arising from 70% fast (AMPA-like) versus 30% slow (NMDA-like) receptors. If a presynaptic neuron generated a spike, this spike was transferred to the postsynaptic neuron with a certain delay (parameters are summarized in Table 1). The afferent inputs to excitatory and inhibitory cortical cells were modeled as Poisson spike trains with a time-independent firing rate fAff given by fAff(θstim) = 30 Hz  rbase + (1 −rbase) exp  −(θstim −θ)2 (2σAff)2  , (1) where θstim is the orientation of the presented stimulus, θ is the preferred orientation of the cell, rbase = 0.1 is a baseline firing rate, and σAff = 27.5° is the tuning width. These input spike trains exclusively trigger fast, AMPA-like excitatory synapses. The orientation preference for each neuron was assigned according to its location in an artificial orientation map (Figure 2A). This map was calibrated such that the pinwheel distance and the spread of recurrent connections matches experimental data [9]. In order to measure the orientation tuning curves of f, Vm, ge, and gi, the response of the network to inputs with different orientations was computed for 1.5 s with 0.25 ms resolution (usually, the network settled into a steady state after a few hundred milliseconds). We then calculated the firing rate, the average membrane potential, and the average total excitatory and inhibitory conductances for every cell in an interval between 0.5 s and 1.5 s. 2.2 Quantitative evaluation: Orientation selectivity index (OSI) and OSI-OSI slopes We analyze orientation tuning using the orientation selectivity index [13], which is given by OSI = qPN i=1 R(φi) cos(2φi)2+PN i=1 R(φi) sin(2φi)2/PN i=1 R(φi). (2) 3 Figure 2: (A) Artificial orientation map with four pinwheels of alternating handedness arranged on a 2-dimensional grid. The white (black) circle denotes the one-(two-) σ-area corresponding to the radial Gaussian synaptic connection profile (σE = σI = 125 µm). (B) Map OSI of the artificial orientation map. Pinwheel centers appear in black. R(φi) is the value of the quantity whose tuning is considered, in response to a stimulus of orientation φi (e. g. the spiking activity). For all measurements, eight stimulus orientations φi ∈ {−67.5, −45, −22.5, 0, 22.5, 45, 67.5, 90} were presented. The OSI is then a measure of tuning sharpness ranging from 0 (unselective) to 1 (perfectly selective). In addition, the OSI was used to characterize the sharpness of the recurrent input a cell receives based on the orientation preference map. To calculate this map OSI, we estimate the local orientation preference distribution by binning the orientation preference of all pixels within a radius of 250 µm around a cell into bins of 10° size; the number of cells in each bin replaces R(φi). Figure 2 shows the artificial orientation map and the map OSI for the cells in our network model. The map OSI ranges from almost 0 for cells close to pinwheel centers to almost 1 in the linear zones of the iso-orientation domains. The dependence of each tuning property on the local map OSI was then described by a linear regression line using the least squares method. These linear fits provided a good description of the relationship between map OSI and the tuning of the neuronal properties in the simulations (mean squared deviation around the regression lines was typically below 0.0025 and never above a value of 0.015) as well as in the experimental data (mean squared deviation was between 0.009 (gi) and 0.015 (f)). In order to find the regions of parameter space where the linear relationship predicted by the models is compatible with the data, the confidence interval for the slope of the linear fit to the data was used. 3 Results The parameter space of the class of network models considered in this paper is spanned by the peak conductance of synaptic excitatory connections to excitatory (gEE) and inhibitory (gIE) neurons. We shall first characterize the operating regimes found in this model space, before comparing the location dependence of tuning observed in the different models with that found experimentally. 3.1 Operating regimes of the network model The operating regimes of a firing rate model can be defined in terms of the strength and shape of the effective recurrent input [7]. The definitions of Kang et al. [7], however, are based on the analytical solution of a linear firing rate model where all neurons are above threshold and cannot be applied to the non-linear Hodgkin-Huxley network model used here. Therefore, we characterize the parameter space explored here using a numerical definition of the operating regimes. This definition is based on the orientation tuning of the input currents to the excitatory model cells in the orientation domain (0.6 < map OSI < 0.9). Specifically, if the sum of input currents is positive (negative) for all presented orientations, recurrent excitation (inhibition) is dominant, and the regime thus excitatory (EXC; respective inhibitory, INH). If the sum of input currents has a positive maximum and a negative minimum (i. e. Mexican-hat like), a model receives significant excitation as well as inhibi4 Figure 3: (A) Operating regimes of the network model as a function of the peak conductance of synaptic excitatory connections to excitatory (gEE) and inhibitory (gIE) neurons: FF – feed-forward, EXC – recurrent excitatory dominated, INH – recurrent inhibitory dominated, REC – strong recurrent excitation and inhibition, and unstable. The conductances are given as multiples of the afferent peak conductance of excitatory neurons (gAff E ). The figure summarizes simulation results for 38 × 28 different values of gEE and gIE. (B) Tuning curves for one example network in the REC regime (marked by a cross in A). Mean responses across cells are shown for the firing rate (f), the membrane potential (Vm), the total excitatory (ge), and the total inhibitory conductance (gi), separately for cells in iso-orientation domains (0.6 < map OSI < 0.9, thick lines) and cells close to pinwheel centers (map OSI < 0.3, thin lines). For each cell, responses were individually aligned to its preferred orientation and normalized to its maximum response; for the Vm tuning curve, the mean membrane potential without any stimulation (Vm = −64.5 mV) was subtracted beforehand. To allow comparison of the magnitude of gi and ge responses, both types of conductances were normalized to the maximum gi response. tion and we refer to such a model as operating in the recurrent regime (REC). An example for the orientation tuning properties observed in the recurrent regime is shown in Figure 3B. Finally, if the sum of the absolute values of the currents through excitatory and inhibitory recurrent synapses of the model cells (at preferred orientation) is less than 30% of the current through afferent synapses, the afferent drive is dominant and we call such regimes feed-forward (FF). The regions of parameter space corresponding to these operating regimes are depicted in Figure 3A as a function of the peak conductance of synaptic excitatory connections to excitatory (gEE) and inhibitory (gIE) neurons. We refer to the network as “unstable” if the model neurons show strong responses (average firing rate exceeds 100 Hz) and remain at high firing rates if the afferent input is turned off; i. e. the network shows self-sustained activity. In this regime, the model neurons lose their orientation tuning. 3.2 Orientation tuning properties in the different operating regimes We analyzed the dependence of the orientation tuning properties on the operating regimes and compared them to the experimental data. For every combination of gEE and gIE, we simulated the responses of neurons in the network model to oriented stimuli in order to measure the orientation tuning of Vm, f, ge and gi (see Methods). The OSI of each of the four quantities can then be plotted against the map OSI to reveal the dependence of the tuning on the map location (similar to the experimental data shown in Figure 1). The slope of the linear regression of this OSI-OSI dependence was used to characterize the different operating points of the network. Figure 4 shows these slopes for the tuning of f, Vm, ge and gi, as a function of gEE and gIE of the respective Hodgkin-Huxley network models (gray scale). Model networks with strong recurrent excitation (large values of gEE), as in the REC regime, predict steeper slopes than networks with less recurrent excitation. In other words, as the regime becomes increasingly more recurrently dominated, the recurrent contribution leads to sharper tuning in neurons within iso-orientation domains as compared to neurons near the 5 Figure 4: Location dependence of orientation tuning of the conductances, the membrane potential, and the firing rate in the network model. The figure shows the slope values of the OSI-OSI regression lines (in gray values) as a function of the peak conductance of synaptic excitatory connections to excitatory (gEE) and inhibitory (gIE) neurons, separately for the spike rate (A), the membrane potential (B), the total synaptic excitatory (C), and inhibitory conductance (D). The conductances are given as multiples of the afferent peak conductance of excitatory neurons (gAff E ). Thin lines denote the borders of the different operating regimes (cf. Figure 3). The region delimited by the thick yellow line corresponds to slope values within the 95% confidence interval of the corresponding experimental data. Note that in (A) this region covers the whole range of operating regimes except the unstable regime. pinwheel centers. However, yet closer to the line of instability the map-dependence of the tuning almost vanishes (slope approaching zero). This reflects the strong excitatory recurrent input in the EXC regime which leads to an overall increase in the network activity that is almost untuned and therefore provides very similar input to all neurons, regardless of map location. Also, the strongly inhibitory-dominated regimes (large values of gIE) at the bottom right corner of Figure 4 are of interest. Here, the slope of the location dependence becomes negative for the tuning of firing rate f and membrane potential Vm. Such a sharpening of the tuning close to pinwheels in an inhibition dominated regime has been observed elsewhere [8]. Comparing the slope of the OSI-OSI regression lines to the 95% confidence interval of the slopes estimated from the experimental data (Figure 1) allows us to determine those regions in parameter space that are compatible with the data (yellow contours in Figure 4). The observed locationindependence of the firing rate tuning is compatible with all stable models in the parameter space (Figure 4A) and therefore does not constrain the model class. In contrast to this, the observed location-dependence of the membrane potential tuning (Figure 4B) and the inhibitory conductance tuning (Figure 4D) excludes most of the feed-forward and about half of the inhibitory-dominated regime. Most information, however, is gained from the observed location-dependence of the excitatory conductance tuning (Figure 4C). It constrains the network to operate in either a recurrent regime with strong excitation and inhibition or in a slightly excitatory-dominated regime. 6 3.3 Only the strongly recurrent regime satisfies all constraints Combining the constraints imposed by the OSI-OSI relationship of the four measured quantities (yellow contour in both panels of Figure 5), we can conclude that the experimental data constrains the network to operate in a recurrent operating regime, with recurrent excitation and inhibition strong, approximately balanced, and dominating the afferent input. In addition, we calculated the sum of squared differences between the data points (Figure 1) and the OSI-OSI relationship predicted by the model, for each operating regime. The “best fitting” operating regime, which had the lowest squared difference, is marked with a cross in Figure 5. The corresponding simulated tuning curves for orientation domain and pinwheel cells are shown in Figure 3B. Figure 5: Ratio between (A) the excitatory current through the recurrent synapses and the current through afferent synapses of excitatory model cells and between (B) the inhibitory recurrent and the excitatory afferent current (in gray values). Currents were calculated for stimuli at the cells’ preferred orientations, and averaged over all model cells within orientation domains (0.6 < map OSI < 0.9). The region delimited by the thick yellow line corresponds to slope values that are in the 95% confidence interval for each experimentally measured quantity (spike rate, membrane potential, the total synaptic excitatory, and inhibitory conductance). The white cross at (2.0, 1.7) denotes the combination of model parameters that yields the best fit to the experimental data (see text). Thin lines denote the borders of the different operating regimes (cf. Figure 3). In line with the definition of the operating regimes, the excitatory current through the recurrent synapses (gray values in Figure 5A) plays a negligible role in the feed-forward and in most of the inhibitory-dominated regimes. Only in the recurrent and the excitatory-dominated regime is the recurrent current stronger than the afferent current. A similar observation holds for the inhibitory current (Figure 5B). The strong recurrent currents in the excitatory-dominated regime reflect the strong overall activity that reduce the map-location dependence of the total excitatory and inhibitory conductances (cf. Figure 4C and D). 4 Discussion Although much is known about the anatomy of lateral connections in the primary visual cortex of cat, the strengths of synapses formed by short-range connections are largely unknown. In our study, we use intracellular physiological measurements to constrain the strengths of these connections. Extensively exploring the parameter space of a spiking neural network model, we find that neither feed-forward dominated, nor recurrent excitatory- or inhibitory-dominated networks are consistent with the tuning properties observed in vivo. We therefore conclude that the cortical network in cat V1 operates in a regime with a dominant recurrent influence that is approximately balanced between inhibition and excitation. 7 The analysis presented here focuses on the steady state the network reaches when presented with one non-changing orientation. In this light, it is very interesting, that a comparable operating regime has been indicated in an analysis of the dynamic properties of orientation tuning in cat V1 [14]. Our main finding – tuning properties of cat V1 are best explained by a network operating in a regime with strong recurrent excitation and inhibition – is robust against variation of the values chosen for other parameters not varied here, e. g. gII and gEI (data not shown). Nevertheless, the network architecture is based on a range of basic assumptions: e. g. all neurons in the network receive equally sharply tuned input. The explicit inclusion of location dependence of the input tuning might well lead to tuning properties compatible with the experimental data in different operating regimes. However, there is no evidence supporting such a location dependence of the afferent input and therefore assuming location-independent input seemed the most prudent basis for this analysis. Another assumption is the absence of untuned inhibition, since the inhibitory neurons in the network presented here receive tuned afferent input, too. The existence of an untuned inhibitory subpopulation is still a matter of debate (compare e. g. [15] and [16]). Naturally, such an untuned component would considerably reduce the location dependence of the inhibitory conductance gi. Given that in our exploration only a small region of parameter space exists where the slope of gi is steeper than in the experiment, a major contribution of such an untuned inhibition seems incompatible with the data. Our analysis demonstrates that the network model is compatible with the data only if it operates in a regime that – due to the strong recurrent connections – is close to instability. Such a network is very sensitive to changes in its governing parameters, e. g. small changes in connection strengths lead to large changes in the overall firing rate: In the regimes close to the line of instability, increasing gEE by just 5% typically leads to increases in firing rate of around 40% (EXC), respectively 20% (REC). In the other regimes (FF and INH) firing rate only changes by around 2–3%. In the “best fitting” operating regime, a 10% change in firing rate, which is of similar magnitude as observed firing rate changes under attention in macaque V1 [17], is easily achieved by increasing gEE by 2%. It therefore seems plausible that one benefit of being in such a regime is the possibility of significantly changing the “operating point” of the network through only small adjustments of the underlying parameters. Candidates for such an adjustment could be contextual modulations, adaptation or attentional effects. The analysis presented here is based on data for cat V1. However, the ubiquitous nature of some of the architectural principles in neocortex suggests that our results may generalize to other cortical areas, functions and species. References [1] Hubel, D. H & Wiesel, T. N. (1962) J Physiol 160, 106–154. [2] Sompolinsky, H & Shapley, R. (1997) Curr Opin Neurobiol 7, 514–522. [3] Ferster, D & Miller, K. D. (2000) Annu Rev Neurosci 23, 441–471. [4] Martin, K. A. C. (2002) Curr Opin Neurobiol 12, 418–425. [5] Teich, A. F & Qian, N. (2006) J Neurophysiol 96, 404–419. [6] Ben-Yishai, R, Bar-Or, R. L, & Sompolinsky, H. (1995) Proc Natl Acad Sci U S A 92, 3844–3848. [7] Kang, K, Shelley, M, & Sompolinsky, H. (2003) Proc Natl Acad Sci U S A 100, 2848–2853. [8] McLaughlin, D, Shapley, R, Shelley, M, & Wielaard, D. J. (2000) Proc Natl Acad Sci U S A 97, 8087–92. [9] Mariño, J, Schummers, J, Lyon, D. C, Schwabe, L, Beck, O, Wiesing, P, Obermayer, K, & Sur, M. (2005) Nat Neurosci 8, 194–201. [10] Nauhaus, I, Benucci, A, Carandini, M, & Ringach, D. L. (2008) Neuron 57, 673–679. [11] Destexhe, A, Rudolph, M, Fellous, J, & Sejnowski, T. (2001) Neuroscience 107, 13–24. [12] Destexhe, A, Mainen, Z. F, & Sejnowski, T. J. (1998) in Methods in neuronal modeling, eds. Koch, C & Segev, I. (MIT Press, Cambridge, Mass), 2nd edition, pp. 1–25. [13] Swindale, N. V. (1998) Biol Cybern 78, 45–56. [14] Schummers, J, Cronin, B, Wimmer, K, Stimberg, M, Martin, R, Obermayer, K, Koerding, K, & Sur, M. (2007) Frontiers in Neuroscience 1, 145–159. [15] Cardin, J. A, Palmer, L. A, & Contreras, D. (2007) J Neurosci 27, 10333–10344. [16] Nowak, L. G, Sanchez-Vives, M. V, & McCormick, D. A. (2008) Cereb Cortex 18, 1058–1078. [17] McAdams, C. J & Maunsell, J. H. (1999) J Neurosci 19, 431–441. 8
2008
165
3,415
An interior-point stochastic approximation method and an L1-regularized delta rule Peter Carbonetto pcarbo@cs.ubc.ca Mark Schmidt schmidtm@cs.ubc.ca Nando de Freitas nando@cs.ubc.ca Department of Computer Science University of British Columbia Vancouver, B.C., Canada V6T 1Z4 Abstract The stochastic approximation method is behind the solution to many important, actively-studied problems in machine learning. Despite its farreaching application, there is almost no work on applying stochastic approximation to learning problems with general constraints. The reason for this, we hypothesize, is that no robust, widely-applicable stochastic approximation method exists for handling such problems. We propose that interior-point methods are a natural solution. We establish the stability of a stochastic interior-point approximation method both analytically and empirically, and demonstrate its utility by deriving an on-line learning algorithm that also performs feature selection via L1 regularization. 1 Introduction The stochastic approximation method supplies the theoretical underpinnings behind many well-studied algorithms in machine learning, notably policy gradient and temporal differences for reinforcement learning, inference for tracking and filtering, on-line learning [1, 17, 19], regret minimization in repeated games, and parameter estimation in probabilistic graphical models, including expectation maximization (EM) and the contrastive divergences algorithm. The main idea behind stochastic approximation is simple yet profound. It is simple because it is only a slight modification to the most basic optimization method, gradient descent. It is profound because it suggests a fundamentally different way of optimizing a problem—instead of insisting on making progress toward the solution at every iteration, it only requires that progress be achieved on average. Despite its successes, people tend to steer clear of constraints on the parameters. While there is a sizable body of work on treating constraints by extending established optimization techniques to the stochastic setting, such as projection [14], subgradient (e.g. [19, 27]) and penalty methods [11, 24], existing methods are either unreliable or suited only to specific types of constraints. We argue that a reliable stochastic approximation method that handles constraints is needed because constraints routinely arise in the mathematical formulation of learning problems, and the alternative approach—penalization—is often unsatisfactory. Our main contribution is a new stochastic approximation method in which each step is the solution to the primal-dual system arising in interior-point methods [7]. Our method is easy to implement, dominates other approaches, and provides a general solution to constrained learning problems. Moreover, we show interior-point methods are remarkably well-suited to stochastic approximation, a result that is far from trivial when one considers that stochastic algorithms do not behave like their deterministic counterparts (e.g. Wolfe conditions [13] do not apply). We derive a variant of Widrow and Hoff’s classic “delta rule” for on-line learning (Sec. 5). It achieves feature selection via L1 regularization (known to statisticians as the Lasso [22] and to signal processing engineers as basis pursuit [3]), so it is well-suited to learning problems with lots of data in high dimensions, such as the problem of filtering spam from your email account (Sec. 5.2). To our knowledge, no method has been proposed that reliably achieves L1 regularization in large-scale problems when data is processed online or on-demand. Finally, it is important that we establish convergence guarantees for our method (Sec. 4). To do so, we rely on math from stochastic approximation and optimization. 2 Overview of algorithm In their 1952 research paper, Robbins and Monro [15] examined the problem of tuning a control variable x (e.g. amount of alkaline solution) so that the expected outcome of the experiment F(x) (pH of soil) attains a desired level α (so your Hydrangea have pink blossoms). When the distribution of the experimental outcomes is unknown to the statistician or gardener, it may be still possible to take observations at x. In such case, Robbins and Monro showed that a particularly effective way to achieve a response level α = 0 is to take a (hopefully unbiased) measurement yk ≈F(xk), adjust the control variable according to xk+1 = xk −akyk (1) for step size ak > 0, then repeat. Provided the sequence {ak} behaves like the harmonic series (see Sec. 4.1), this algorithm converges to the solution F(x⋆) = 0. Since the original publication, mathematicians have extended, generalized, and further weakened the convergence conditions; see [11] for some of these developments. Kiefer and Wolfowitz re-interpreted the stochastic process as one of optimizing an unconstrained objective (F(x) acts as the gradient vector) and later Dvoretsky pointed out that each measurement y is actually the gradient F(x) plus some noise ξ(x). Hence, the stochastic gradient algorithm. In this paper, we introduce a convergent sequence of nonlinear systems Fµ(x) = 0 and interpret the Robbins-Monro process {xk} as solving a constrained optimization problem. procedure IP–SG (Interior-point stochastic gradient) for k = 1, 2, 3, . . . • Set max. step size ˆak and centering parameter σk. • Set barrier parameter µk = σkzT k c(xk)/m. • Run simulation to obtain gradient observation yk. • Compute primal-dual search direction (∆xk, ∆zk) by solving equations (6,7) with ∇f(x) = yk. • Run backtracking line search to find largest ak ≤min{ˆak, 0.995 mini(−zk,i/∆zk,i)} such that c(xk−1 + ak∆xk) < 0, and mini( · ) is over all i such that ∆zk,i < 0. • Set xk = xk−1 + ak∆xk and zk = zk−1 + ak∆zk. Figure 1: Proposed stochastic gradient algorithm. We focus on convex optimization problems [2] of the form minimize f(x) subject to c(x) ≤0, (2) where c(x) is a vector of inequality constraints, f(x) and c(x) have continous partial derivatives, and measurements yk of the gradient at xk are noisy. The feasible set, by contrast, should be known exactly. To simplify our exposition, we do not consider equality constraints; techniques for handling them are discussed in [13]. Convexity is a standard assumption made to simplify analysis of stochastic approximation algorithms and, besides, constrained, non-convex optimization raises unresolved complications. We assume standard constraint qualifications so we can legitimately identify optimal solutions via the Karush-Kuhn-Tucker (KKT) conditions [2, 13]. Following the standard barrier approach [7], we frame the constrained optimization problem as a sequence of unconstrained objectives. This in turn is cast as a sequence of root-finding problems Fµ(x) = 0, where µ > 0 controls for the accuracy of the approximate objective and should tend toward zero. As we explain, a dramatically more effective strategy is to solve for the root of the primal-dual equations Fµ(x, z), where z represents the set of dual variables. This is the basic formula of the interior-point stochastic approximation method. Fig. 1 outlines our main contribution. Provided x0 is feasible and z0 > 0, every subsequent iterate (xk, zk) will be a feasible or “interior” point as well. Notice the absence of a sufficient decrease condition on ∥Fµ(x, z)∥or suitable merit function; this is not needed in the stochastic setting. Our stochastic approximation algorithm requires a slightly non-standard treatment because the target Fµ(x, z) moves as µ changes. Fortunately, convergence under non-stationarity has been studied in the literature on tracking and adaptive filtering. The next section is devoted to deriving the primal-dual search direction (∆x, ∆z). 3 Background on interior-point methods We motivate and derive primal-dual interior-point methods starting from the logarithmic barrier method. Barrier methods date back to the work of Fiacco and McCormick [6] in the 1960s, but they lost favour due to their unreliable nature. Ill-conditioning was long considered their undoing. However, careful analysis [7] has shown that poor conditioning is not the problem—rather, it is a deficiency in the search direction. In the next section, we exploit this very analysis to show that every iteration of our algorithm produces a stable iterate in the face of: 1) ill-conditioned linear systems, 2) noisy observations of the gradient. The logarithmic barrier approach for the constrained optimization problem (2) amounts to solving a sequence of unconstrained subproblems of the form minimize fµ(x) ≡f(x) −µ Pm i=1 log(−ci(x)), (3) where µ > 0 is the barrier parameter, and m is the number of inequality constraints. As µ becomes smaller, the barrier function fµ(x) acts more and more like the objective. The philosophy of barrier methods differs fundamentally from “exterior” penalty methods that penalize points violating the constraints [13, Chapter 17] because the logarithm in (3) prevents iterates from violating the constraints at all, hence the word “barrier”. The central thrust of the barrier method is to progressively push µ to zero at a rate which allows the iterates to converge to the constrained optimum x⋆. Writing out a first-order Taylor-series expansion to the optimality conditions ∇fµ(x) = 0 about a point x, the Newton step ∆x is the solution to the linear equations ∇2fµ(x) ∆x = −∇fµ(x). The barrier Hessian has long been known to be incredibly ill-conditioned—this fact becomes apparent by writing out ∇2fµ(x) in full—but an analysis by Wright [25] shows that the ill-conditioning is not harmful under the right conditions. The “right conditions” are that x be within a small distance1 from the central path or barrier trajectory, which is defined to be the sequence of isolated minimizers x⋆ µ satisfying ∇fµ(x⋆ µ) = 0 and c(x⋆ µ) < 0. The bad news: the barrier method is ineffectual at remaining on the barrier trajectory—it pushes iterates too close to the boundary where they are no longer well-behaved [7]. Ordinarily, a convergence test is conducted for each value of µ, but this is not a plausible option for the stochastic setting. Primal-dual methods form a Newton search direction for both the primal variables and the Lagrange multipliers. Like classical barrier methods, they fail catastrophically outside the central path. But their virtue is that they happen to be extremely good at remaining on the central path (even in the stochastic setting; see Sec. 4.2). Primal-dual methods are also blessed with strong results regarding superlinear and quadratic rates of convergence [7]. The principal innovation is to introduce Lagrange multiplier-like variables zi ≡−µ/ci(x). By setting ∇xfµ(x) to zero, we recover the “perturbed” KKT optimality conditions: Fµ(x, z) ≡  ∇xf(x) + JT Z1 CZ1 + µ1  = 0, (4) where Z and C are matrices with z and c(x) along their diagonals, and J ≡∇xc(x). Forming a first-order Taylor expansion about (x, z), the primal-dual Newton step is the solution to  W JT ZJ C   ∆x ∆z  = −  ∇xf(x) + JT Z1 CZ1 + µ1  , (5) where W = H+Pm i=1 zi∇2 xci(x) is the Hessian of the Lagrangian (as written in any textbook on constrained optimization), and H is the Hessian of the objective or an approximation. Through block elimination, the Newton step ∆x is the solution to the symmetric system (W −JT ΣJ)∆x = −∇xfµ(x), (6) where Σ ≡C−1Z. The dual search direction is then recovered according to ∆z = −(z + µ/c(x) + ΣJ∆x). (7) Because (2) is a convex optimization problem, we can derive a sensible update rule for the barrier parameter by guessing the distance between the primal and dual objectives [2]. This guess is typically µ = −σzT c(x)/m, where σ > 0 is a centering parameter. This update is supported by the convergence theory (Sec. 4.1) so long as σk is pushed to zero. 1See Sec. 4.3.1 of [7] for the precise meaning of a “small distance”. Since x must be close to the central path but far from the boundary, the favourable neighbourhood shrinks as µ nears 0. 4 Analysis of convergence First we establish conditions upon which the sequence of iterates generated by the algorithm converges almost surely to the solution (x⋆, z⋆) as the amount of data or iteration count goes to infinity. Then we examine the behaviour of the iterates under finite-precision arithmetic. 4.1 Asymptotic convergence A convergence proof from first principles is beyond the scope of this paper; we build upon the martingale convergence proof of Spall and Cristion for non-stationary systems [21]. Assumptions: We establish convergence under the following conditions. They may be weakened by applying results from the stochastic approximation and optimization literature. 1. Unbiased observations: yk is a discrete-time martingale difference with respect to the true gradient ∇f(xk); that is, E(yk | xk, history up to time k) = ∇f(xk). 2. Step sizes: The maximum step sizes ˆak bounding ak (see Fig. 1) must approach zero (ˆak →0 as k →∞and P∞ k=1 ˆa2 k < ∞) but not too quickly (P∞ k=1 ˆak = ∞). 3. Bounded iterates: lim supk ∥xk∥< ∞almost surely. 4. Bounded gradient estimates: for some ρ and for every k, E(∥yk∥) < ρ. 5. Convexity: The objective f(x) and constraints c(x) are convex. 6. Strict feasibility: There must exist an x that is strictly feasible; i.e. c(x) < 0. 7. Regularity assumptions: There exists a feasible minimizer x⋆to the problem (2) such that first-order constraint qualification and strict complementarity hold, and ∇xf(x), ∇xc(x) are Lipschitz-continuous. These conditions allow us to directly apply standard theorems on constrained optimization for convex programming [2, 6, 7, 13]. Proposition: Suppose Assumptions 1–7 hold. Then θ⋆≡(x⋆, z⋆) is an isolated (locally unique within a δ-neighbourhood) solution to (2), and the iterates θk ≡(xk, zk) of the feasible interior-point stochastic approximation method (Fig. 1) converge to θ⋆almost surely; that is, as k approaches the limit, ||θk −θ⋆|| = 0 with probability 1. Proof: See Appendix A. 4.2 Considerations regarding the central path The object of this section is to establish that computing the stochastic primal-dual search direction is numerically stable. (See Part III of [23] for what we mean by “stable”.) The concern is that noisy gradient measurements will lead to wildly perturbed search directions. As we mentioned in Sec. 3, interior-point methods are surprisingly stable provided the iterates remain close to the central path, but the prospect of keeping close to the path seems particularly tenuous in the stochastic setting. A key observation is that the central path is itself perturbed by the stochastic gradient estimates. Following arguments similar to those given in Sec. 5 of [7], we show that the stochastic Newton step (6,7) stays on target. We define the noisy central path as θ(µ, ε) = (x, z), where (x, z) is a solution to Fµ(x, z) = 0 with gradient estimate y ≡∇f(x) + ε. Suppose we are currently at point θ(µ, ε) = (x, z) along the path, and the goal is to move closer to θ(µ⋆, ε⋆) = (x⋆, z⋆) by solving (5) or (6,7). One way to assess the quality of the Newton step is to compare it to the tangent line of the noisy central path at (µ, ε). Taking implicit partial derivatives at (x, z), the tangent line is θ(µ⋆, ε⋆) ≈θ(µ, ε) + (µ⋆−µ) ∂θ(µ,ε) ∂µ + (y⋆−y) ∂θ(µ,ε) ∂ε , such that (8)  H JT ZJ C  " (µ⋆−µ) ∂x ∂µ + (y⋆−y) ∂x ∂ε (µ⋆−µ) ∂z ∂µ + (y⋆−y) ∂z ∂ε # = −  y⋆−y (µ⋆−µ)1,  . (9) with y⋆≡∇f(x) + ε⋆. Since we know that Fµ(x, z) = 0, the Newton step (5) at (x, z) with perturbation µ⋆and stochastic gradient estimate y⋆is the solution to  H JT ZJ C   ∆x ∆z  = −  y⋆−y (µ⋆−µ)1.  . (10) In conclusion, if the tangent line (8) is a fairly reasonable approximation to the central path, then the stochastic Newton step (10) will make good progress toward θ(µ⋆, ε⋆). Having established that the stochastic gradient algorithm closely follows the noisy central path, the analysis of M. H. Wright [26] directly applies, in which round-offerror (ǫmachine) is occasionally replaced by gradient noise (ε). Since stability is of fundamental concern— particularly in computing the values of W −JT ΣJ, the right-hand side of (6), and the solution to ∆x and ∆z—we elaborate on the significance of Wright’s results in Appendix B. 5 On-line L1 regularization In this section, we apply our findings to the problem of computing an L1-regularized least squares estimator in an “on-line” manner; that is, by making adjustments to each new example without having to review all the previous training instances. While this problem only involves simple bound constraints, we can use it to compare our method to existing approaches such as gradient projection. We start with some background behind the L1, motivate the on-line learning approach, draw some experimental comparisons with existing methods, then show that our algorithm can be used to filter spam. Suppose we have n training examples xi ≡(xi1, . . . , xim)T paired with real-valued responses yi. (The notation here is separate from previous sections.) Assuming a linear model and centred coordinates, the least squares estimate β minimizes the mean squared error (MSE). Linear regression based on the maximum likelihood estimator is one of the basic statistical tools of science and engineering and, while primitive, generalizes to many popular statistical estimators, including linear discriminant analysis [9]. Because the least squares estimator is unstable when m is large, it can generalize poorly to unseen examples. The standard cure is “regularization,” which introduces bias, but typically produces estimators that are better at predicting the outputs of unseen examples. For instance, the MSE with an L1-penalty, MSE(L1) ≡ 1 2n Pn i=1(yi −xT i β)2 + λ n∥β∥1, (11) not only prevents overfitting but tends to produce estimators that shrink many of the components βj to zero, resulting in sparse codes. Here, ∥· ∥1 is the L1 norm and λ > 0 controls for the level of regularization. This approach has been independently studied for many problems, including statistical regression [22] and sparse signal reconstruction [3, 10], precisely because it is effective at choosing useful features for prediction. We can treat the gradient of MSE as a sample expectation over responses of the form −xi(yi −xT i β), so the on-line or stochastic update β(new) = β + axi(yi −xT i β), (12) improves the linear regression with only a single data point (a is the step size).2 This is the famed “delta rule” of Widrow and Hoff[12]. Since standard “batch” learning requires a full pass through the data for each gradient evaluation, the on-line update (12) may be the only viable option when faced with, for instance, a collection of 80 million images [16]. On-line learning for regression and classification—including L2 regularization—is a well-researched topic, particularly for neural networks [17] and support vector machines (e.g. [19]). On-line learning with L1 regularization, despite its ascribed benefits, has strangely avoided study. (The only known work that has approached the problem is [27] using subgradient methods.) We derive an on-line, L1-regularized learning rule of the form β(new) pos = βpos + a∆βpos z(new) pos = zpos + a(µ/βpos −zpos −∆βposzpos/βpos) β(new) neg = βneg + a∆βneg z(new) neg = zneg + a(µ/βneg −zneg −∆βnegzneg/βneg), (13) such that ∆βpos = (xi(yi −xT i β) −λ n + µ/βpos)/(1 + zpos/βpos) ∆βneg = (−xi(yi + xT i β) −λ n + µ/βneg)/(1 + zneg/βneg), and where µ > 0 is the barrier parameter, β = βpos −βneg, zpos and zneg are the Lagrange multipliers associated with the lower bounds βpos ≥0 and βneg ≥0, respectively, and a is a step size ensuring the variables remain in the positive quadrant. Multiplication and division in (13) are component-wise. The remainder of the algorithm (Fig. 1) consists of choosing µ and feasible step size a at each iteration. Let us briefly explain how we arrived at (13). 2The gradient descent direction can be a poor choice because it ignores the scaling of the problem. Much work has focused on improving the delta rule, but we shall not discuss these improvements. Figure 2: (left) Performance of constrained stochastic gradient methods for different step size sequences. (right) Performance of methods for increasing levels of variance in the dimensions of the training data. Note the logarithmic scale in the vertical axis. It is difficult to find a collection of regression coefficients β that directly minimizes MSE(L1) because the L1 norm is not differentiable near zero. The trick is to separate the coefficients into their positive (βpos) and negative (βneg) components following [3], thereby transforming the non-smooth, unconstrained optimization problem (11) into a smooth problem with convex, quadratic objective and bound constraints βpos, βneg ≥0. The regularized delta rule (13) is then obtained from direct application of the primal-dual interior-point Newton search direction (6,7) with a stochastic gradient (see Eq. 12), and identity in place of H. 5.1 Experiments We ran four small experiments to assess the reliability and shrinkage effect of the interiorpoint stochastic gradient method for linear regression with L1 regularization; refer to Fig. 1 and Eq. 13.3 We also studied four alternatives to our method: 1) a subgradient method, 2) a smoothed, unconstrained approximation to (11), 3) a projected gradient method, and 4) the augmented Lagrangian approach described in [24]. See [18] for an in-depth discussion of the merits of applying the first three optimization approaches to L1 regularization. All these methods have a per-iteration cost on the order of the number of features. Method. For the first three experiments, we simulated 20 data sets following the procedure described in Sec. 7.5 of [22]. Each data set had n = 100 observations with m = 40 features. We defined observations by xij = zij + zi, where zi was drawn from the standard normal and zij was drawn i.i.d. from the normal with variance σ2 j, which in turn was drawn from the inverse Gamma with shape 2.5 and scale ν = 1. (The mean of σ2 j is proportional to ν.) The regression coefficients were β = (0, . . . , 0, 2, . . . , 2, 0, . . . , 0, 2, . . . , 2)T with 10 repeats in each block [22]. Outputs were generated according to yi = βT xi +ǫ with standard Gaussian noise ǫ. Each method was executed with a single pass on the data (100 iterations) with step sizes ˆak = 1/(k0 + k), where k0 = 50 by default. We chose L1 penalty λ/n = 1.25, which tended to produce about 30% zero coefficients at the solution to (11). The augmented Lagrangian required a sequence of penalty terms rk →0; after some trial and error, we chose rk = 50/(k0 + k)0.1. The control variables of Experiments 1, 2 and 3 were, respectively, the step size parameter k0, the inverse Gamma scale parameter ν, and the L1 penalty parameter λ. In Experiment 4, each example yi in the training set xi had 8 features, and we set the true coefficients were set to β = (0, 0, 2, −4, 0, 0, −1, 3)T . Results. Fig. 2 shows the results of Experiments 1 and 2, with error 1 n∥βexact −βon-line∥1 averaged over the 20 data sets, in which βexact is the solution to (11), and βon-line is the estimate obtained after 100 iterations of the on-line or stochastic gradient method. With a large enough step size, almost all the methods converged close to βexact. The stochastic interiorpoint method, however, always came closest to βexact and, for the range of values we tried, its solution was by far the least sensitive to the step size sequence and level of variance in the observations. Experiment 3 (Fig. 3) shows that even with well-chosen step sizes for all methods, 3The Matlab code for all our experiments is on the Web at http://www.cs.ubc.ca/∼pcarbo. Figure 4: Shrinkage effect for different choices of the L1 penalty parameter. the stochastic interior-point method still best approximated the exact solution, and its performance did not degrade when λ was small. (The dashed vertical line at λ/n = 1.25 in Fig. 3 corresponds to k0 = 50 and E(σ2) = 2/3 in the left and right plots of Fig. 2.) Fig. 4 shows the Figure 3: Performance of the methods for various choices of the L1 penalty. regularized estimates of Experiment 4. After one pass through the data (middle)—equivalent to a single iteration of an exact solver—the interiorpoint stochastic gradient method shrank some of the data components, but didn’t quite discard irrelevant features altogether. After 10 visits to the training data (right), the stochastic algorithm exhibited feature selection close to what we would normally expect from the Lasso (left). 5.2 Filtering spam Classifying email as spam or not is most faithfully modeled as an on-line learning problem in which supervision is provided after each email has been designated for the inbox or trash [5]. An effective filter is one that minimizes misclassification of incoming messages—throwing away a good email being considerably more deleterious than incorrectly placing a spam in the inbox. Without any prior knowledge as to what spam looks like, any filter will be error-prone at initial stages of deployment. Spam filtering necessarily involves lots of data and an even larger number of features, so a sparse, stable model is essential. We adapted the L1-regularized delta rule to the spam filtering problem by replacing the linear regression with a binary logistic regression [9]. The on-line updates are similar to (13), only xT i β is replaced by φ(xT i β), with φ(u) ≡1/(1+e−u). To our knowledge, no one has investigated this approach for on-line spam filtering, though there is some work on logistic regression plus the Lasso for batch classification in text corpora [8]. Needless to say, batch learning is completely impractical in this setting. Method. We simulated the on-line spam filtering task on the trec2005 corpus [4] containing emails from the legal investigations of Enron corporation. We compared our on-line classifier (λ = 10, σ = 1 2, ˆai = 1 1+i) with two open-source software packages, SpamBayes 1.0.3 and Bogofilter 0.93.4. (These packages are publicly available at spambayes.sourceforge.net and bogofilter.sourceforge.net.) A full comparison is certainly beyond the scope of this paper; see [5] for a comprehensive evaluation. We represented each email as a vector of normalized word frequencies, and used the word tokens extracted by SpamBayes. In the end, we had an on-line learning problem involving n = 92189 documents and m = 823470 features. true not spam spam pred. not spam 39382 3291 spam 17 49499 Results for SpamBayes true not spam spam pred. not spam 39393 5515 spam 3 47275 Results for Bogofilter true not spam spam pred. not spam 39389 2803 spam 10 49987 Results for Logistic + L1 Table 1: Contingency tables for on-line spam filtering task on the trec2005 data set. Results. Following [5], we use contingency tables to present results of the on-line spam filtering experiment (Table 1). The top-right/bottom-left entry of each table is the number of misclassified spam/non-spam. Everything was evaluated on-line. We tagged an email for deletion only if p(yi = spam) ≥97%. Our spam filter dominated SpamBayes on the trec2005 corpus, and performed comparably to Bogofilter—one of the best spam filters to date [5]. Our model’s expense was slightly greater than the others. As we found in Sec. 5.1, assessing sparsity of the on-line solution is more difficult than in the exact case, but we can say that removing the 41% smallest entries of β resulted in almost no (< 0.001) change. 6 Conclusions Our experiments on a learning problem with noisy gradient measurements and bound constraints show that the interior-point stochastic approximation algorithm is a significant improvement over other methods. The interior-point approach also has the virtue of being much more general, and our analysis guarantees that it will be numerically stable. Acknowledgements. Thanks to Ewout van den Berg, Matt Hoffman and Firas Hamze. References [1] L. Bottou and O. Bousquet, The tradeoffs of large scale learning, in Advances in Neural Information Processing Systems, vol. 20, 1998. [2] S. Boyd and L. Vandenberghe, Convex optimization, Cambridge University Press, 2004. [3] S. Chen, D. Donoho, and M. Saunders, Atomic decomposition by basis pursuit, SIAM Journal on Scientific Computing, 20 (1999), pp. 33–61. [4] G. V. Cormack and T. R. Lynam, Spam corpus creation for TREC, in Proc. 2nd CEAS, 2005. [5] , Online supervised spam filter evaluation, ACM Trans. Information Systems, 25 (2007). [6] A. V. Fiacco and G. P. McCormick, Nonlinear programming: sequential unconstrained minimization techniques, John Wiley and Sons, 1968. [7] A. Forsgren, P. E. Gill, and M. H. Wright, Interior methods for nonlinear optimization, SIAM Review, 44 (2002), pp. 525–597. [8] A. Genkin, D. D. Lewis, and D. Madigan, Large-scale Bayesian logistic regression for text categorization, Technometrics, 49 (2007), pp. 291–304. [9] T. Hastie, R. Tibshirani, and J. Friedman, The elements of statistical learning, Springer, 2001. [10] S.-J. Kim, K. Koh, M. Lustig, S. Boyd, and D. Gorinevsky, An interior-point method for large-scale L1-regularized least squares, IEEE J. Selected Topics in Signal Processing, 1 (2007). [11] H. J. Kushner and D. S. Clark, Stochastic approximation methods for constrained and unconstrained systems, Springer-Verlag, 1978. [12] T. M. Mitchell, Machine Learning, McGraw-Hill, 1997. [13] J. Nocedal and S. J. Wright, Numerical Optimization, Springer, 2nd ed., 2006. [14] B. T. Poljak, Nonlinear programming methods in the presence of noise, Mathematical Programming, 14 (1978), pp. 87–97. [15] H. Robbins and S. Monro, A stochastic approximation method, Annals Math. Stats., 22 (1951). [16] B. C. Russell, A. Torralba, K. P. Murphy, and W. T. Freeman, LabelMe: a database and web-based tool for image annotation, Intl. Journal of Computer Vision, 77 (2008), pp. 157–173. [17] D. Saad, ed., On-line learning in neural networks, Cambridge University Press, 1998. [18] M. Schmidt, G. Fung, and R. Rosales, Fast optimization methods for L1 regularization, in Proceedings of the 18th European Conference on Machine Learning, 2007, pp. 286–297. [19] S. Shalev-Shwartz, Y. Singer, and N. Srebro, Pegasos: primal estimated sub-gradient solver for SVM, in Proceedings of the 24th Intl. Conference on Machine learning, 2007, pp. 807–814. [20] J. C. Spall, Adaptive stochastic approximation by the simultaneous perturbation method, IEEE Transactions on Automatic Control, 45 (2000), pp. 1839–1853. [21] J. C. Spall and J. A. Cristion, Model-free control of nonlinear stochastic systems with discretetime measurements, IEEE Transactions on Automatic Control, 43 (1998), pp. 1148–1210. [22] R. Tibshirani, Regression shrinkage and selection via the Lasso, Journal of the Royal Statistical Society, 58 (1996), pp. 267–288. [23] L. N. Trefethen and D. Bau, Numerical linear algebra, SIAM, 1997. [24] I. Wang and J. C. Spall, Stochastic optimization with inequality constraints using simultaneous perturbations and penalty functions, in Proc. 42nd IEEE Conf. Decision and Control, 2003. [25] M. H. Wright, Some properties of the Hessian of the logarithmic barrier function, Mathematical Programming, 67 (1994), pp. 265–295. [26] , Ill-conditioning and computational error in interior methods for nonlinear programming, SIAM Journal on Optimization, 9 (1998), pp. 84–111. [27] A. Zheng, Statistical software debugging, PhD thesis, University of California, Berkeley, 2005.
2008
166
3,416
Dynamic Visual Attention: Searching for coding length increments Xiaodi Hou1,2 and Liqing Zhang1 ∗ 1Department of Computer Science and Engineering, Shanghai Jiao Tong University No. 800 Dongchuan Road, 200240, China 2Department of Computation and Neural Systems, California Institute of Technology MC 136-93, Pasadena, CA, 91125, USA xhou@caltech.edu, zhang-lq@sjtu.edu.cn Abstract A visual attention system should respond placidly when common stimuli are presented, while at the same time keep alert to anomalous visual inputs. In this paper, a dynamic visual attention model based on the rarity of features is proposed. We introduce the Incremental Coding Length (ICL) to measure the perspective entropy gain of each feature. The objective of our model is to maximize the entropy of the sampled visual features. In order to optimize energy consumption, the limit amount of energy of the system is re-distributed amongst features according to their Incremental Coding Length. By selecting features with large coding length increments, the computational system can achieve attention selectivity in both static and dynamic scenes. We demonstrate that the proposed model achieves superior accuracy in comparison to mainstream approaches in static saliency map generation. Moreover, we also show that our model captures several less-reported dynamic visual search behaviors, such as attentional swing and inhibition of return. 1 Introduction Visual attention plays an important role in the human visual system. This voluntary mechanism allows us to allocate our sensory and computational resources to the most valuable information embedded in the vast amount of incoming visual data. In the past decade, we have witnessed the success of a number of computational models on visual attention (see [6] for a review). Many of these models analyze static images, and output “saliency maps”, which indicate the probability of eye fixations. Models such as [3] and [4] have tremendously boosted the correlation between eye fixation data and saliency maps. However, during the actual continuous perception process, important dynamic behaviors such as the sequential order of attended targets, shifts of attention by saccades, and the inhibitory mechanism that precludes us from looking at previously observed targets, are not thoroughly discussed in the research on visual attention. Rather than contributing to the accuracy of saliency map generation, we instead consider alternative approaches to understand visual attention: is there a model that characterizes the ebbs and flows of visual attention? Up to the present, this question is not comprehensively answered by existing models. Algorithms simulating saccades in some attention systems [23, 7] are designed for engineering expediency rather than scientific investigation. These algorithms are not intended to cover the full spectrum of dynamic properties of attention, nor to provide a convincing explanation of the continuous nature of attention behaviors. ∗http://www.its.caltech.edu/˜xhou http://bcmi.sjtu.edu.cn/˜zhangliqing In this paper, we present a novel attention model that is intrinsically continuous. Unlike space-based models who take discrete frames of images as the elementary units, our framework is based on continuous sampling of features. Inspired by the principle of predictive coding [9], we use the concept of energy to explain saliency, feature response intensity, and the appropriation of computational resources in one unified framework. The appropriation of energy is based on the Incremental Coding Length, which indicates the rarity of a feature. As a result, stimuli that correlate to rarely activated features will receive the highest energy, and become salient. Since the proposed model is temporally continuous, we can demonstrate a series of simulations of dynamic attention, and provide plausible explanations of previously unexamined behaviors. 1.1 Space and Feature Based Attention Many of the bottom-up visual attention models follow the Koch and Ullman framework [10]. By analyzing feature maps that topographically encode the spatial homogeneity of features, an algorithm can detect the local irregularities of the visual input. This paradigm explains the generation of attention from a one-shot observation of an image. However, several critical issues may be raised when this framework is applied to continuous observations (e.g. video). First, space-based attention itself cannot interpret ego-motion. Additional coordinate transformation models are required to translate spatial cues between two different frames. Second, there are attention mechanisms that operate after the generation of saliency, such as attentional modulation [19], and Inhibition of Return (IOR) [8]. The initial space-based framework is not likely to provide a convincing explanation to these mechanisms. In addition to saliency based on local irregularity, recent investigations in V4 and MT cortical areas demonstrate that attention can also be elicited by particular features [13, 18]. In the field of computational models, explorations that are biased by features are also used in task-dependent spatial saliency analysis [16]. The emerging evidence in feature-driven attention has encouraged us to propose a pure feature-based attention model in parallel with the space-based feature map paradigm. 1.2 On the Cause of Attention Finding “irregular patterns” as a criterion for attention is widely used in computational models. In a more rigid form, saliency can be defined by the residuals of Difference of Gaussian filter banks [7], regions with maximal self-information [3], or most discriminant center-surround composition [4]. However, all of these principles do little to address the cause of saliency mechanisms in the brain. At the level of computation, we cannot attribute the formation of attention to functional advantages such as foraging for foods [6]. In this paper, we hypothesize that visual attention is driven by the predictive coding principle, that is, the optimization of metabolic energy consumption in the brain. In our framework, the behavior of attention is explained as a consequence of an actively-searching observer who seeks a more economical neural code to represent the surrounding visual environment. 2 The Theory Motivated by the sparse coding strategy [15] discovered in primary visual cortex, we represent an image patch as a linear combination of sparse coding basis functions, which are referred as features. The activity ratio of a feature is its average response to image patches over time and space. The activity of the feature ensemble is considered as a probability function. We evaluate each feature with respect to its Incremental Coding Length (ICL). The ICL of ith feature is defined as the ensemble’s entropy gain during the activity increment of ith feature. In accordance with the general principle of predictive coding [17], we redistribute energy to features according to their ICL contribution: frequently activated features receive less energy than rarer features. Finally, the saliency of a region is obtained by summing up the activity of all features at that region. 2.1 Sparse Feature Representation Experimental studies [15] have shown that the receptive fields of simple-cells in the primary visual cortex produce a sparse representation. With standard methods [2], we learn a set of basis functions that yields a sparse representation of natural image patches. These basis functions are used as features in the analysis of attention. Specifically, we use 120000 8 × 8 RGB image patches from natural scenes for training. A set of 8 × 8 × 3 = 192 basis functions is obtained. (See Fig. 1). Let A be the sparse basis, where ai is the ith basis function. Let W = A−1 be the bank of filter functions, where W = [w1, w2, . . . , w192]⊤. Each row vector wj of W can be considered as a linear filter to the image patch. The sparse representation s of an image patch is its response to all filter functions. Given a vectorized image x, we have s = Wx. Since each basis function represents a structural primitive, in the cortex representation of natural images, only a small population of neurons are activated at one time. Considering the energy consumed by neural activity in the brain, this sparse coding strategy is advantageous [11]. A W Figure 1: First 30 components of the basis functions A and the corresponding filter functions W are shown in this figure. 2.2 The Incremental Coding Length In contrast to the long-term evolution of sparse representation, which reflects the general statistics of nature, short-term habituations, such as potentiation of synaptic strengths, occur during brief observations in a particular environment. In order to evaluate the immediate energy changes in the cortex, some previous work has analyzed the information representation and coding in early visual system [20, 21, 1]. Guided by the insights behind predictive coding [17], we propose the Incremental Coding Length (ICL) as a computational principle based on features. This principle aims to optimize the immediate energy distribution in the system in order to achieve an energyeconomic representation of its environment. The activity ratio pi for ith feature is defined as its relative response level over a sequence of sampling. Given the sample matrix X = [x1, x2, . . . , xk, . . .], where xk is an vectorized image patch, we can compute the activity ratio pi as: pi = P k | wixk | P i P k | wixk |. (1) Furthermore, we denote p = [p1, p2, . . .]⊤as the probability function of feature activities. Note that the activity ratio and the energy are abstract values that reflect the statistics of features. Wiring this structure at the neuronal level goes beyond the scope of this paper. However, studies [13] have suggested evidence of a population of neurons that is capable of generating a representation for intermodal features. In our implementation, the distribution p addresses the computational properties of this putative center. Since the visual information is jointly encoded by all features, the most efficient coding strategy should make equal use of all possible feature response levels. To achieve this optimality, the model needs to maximize the entropy H(p). Since p is determined by the samples X, it is possible for a system to actively bias the sampling process in favor of maximizing information transmission. At a certain point of time, the activity ratio distribution is p. We consider a new excitation to feature i, which will add a variation ε to pi, and change the whole distribution. The new distribution ˆp is: ˆpj = ( pj + ε 1 + ε , j = i pj 1 + ε, j ̸= i 0 20 40 60 80 100 120 140 160 180 200 0 0.01 0.02 0 20 40 60 80 100 120 140 160 180 200 0 0.02 0.04 Image Saliency map Feature distribuon Incremental Coding Length Basis Figure 2: The framework of feature-based selective attention. This variation therefore changes the entropy of feature activities. The change of entropy with respect to the feature activity probability increment is: ∂H(p) ∂pi = −∂pi log pi ∂pi − ∂P j̸=i pj log pj ∂pi = −1 −logpi − ∂P j̸=i pj log pj ∂pi , where: ∂P j̸=i pj log pj ∂pi = H(p) −1 + pi + pi log pi, Accordingly, we define the Incremental Coding Length (ICL) to be: ICL(pi) = ∂H(p) ∂pi = −H(p) −pi −log pi −pi log pi (2) 2.3 Energy Redistribution We define the salient feature set S as: S = {i | ICL(pi) > 0}. The partition {S, ¯S} tells us whether successive observations of feature i would increase H(p). In the context of visual attention, the intuition behind the salient feature set is straightforward: A feature is salient only when succeeding activations of that feature can offer entropy gain to the system. Within this general framework of feature-level optimization, we can redistribute the energy among features. The amount of energy received by each feature is denoted di. Non-salient features are automatically neglected by setting dk = 0 (k ∈¯S). For features in the salient feature set, let: di = ICL(pi) X j∈S ICL(pj) , (if i ∈S). (3) Finally, given an image X = [x1, x2, . . . , xn], we can quantify the saliency map M = [m1, m2, . . . , mn] as: mk = X i∈S diwixk. (4) In Eq. 4, we notice that the saliency of a patch is not constant. It is determined by the distribution of p, which can be obtained by sampling the environment over space and time. According to Eq. 4, we notice that the saliency of a patch may vary over time and space. An intuitive explanation to this property is the contextual influence: under different circumstances, “salient features” are defined in different manners to represent the statistical characteristics of the immediate environment. 3 The Experiment We proposed a framework that explains dynamic visual attention as a process that spends limited available energy preferentially on rarely-seen features. In this section, we examine experimentally the behavior of our attention model. 3.1 Static Saliency Map Generation By sequentially sampling over all possible image patches, we calculate the feature distribution of a static image and generate the corresponding saliency map. These maps are then compared with records of eye fixations of human subjects. The accuracy of an algorithm is judged by the area under its ROC curve. We use the fixation data collected by Bruce et al. [3] as the benchmark for comparison. This data set contains the eye fixation records from 20 subjects for the full set of 120 images. The images are down-sampled to an appropriate scale (86 × 64, 1 4 of the original size). The results for several models are indicated below. Due to a difference in the sampling density used in drawing the ROC curve, the listed performance is slightly different (about 0.003) from that given in [3] and [4]. The algorithms, however, are all evaluated using the same benchmark and their relative performance should be unaffected. Even though it is not designed for static saliency map generation, our model achieves the best performance among mainstream approaches. Table 1: Performances on static image saliency Itti et al. [7] Bruce et al. [3] Gao et al. [4] Our model 0.7271 0.7697 0.7729 0.7928 input image our approachhuman fixaons input image our approach human fixaons input image our approach human fixaons Figure 3: Some examples of our experimental images. 3.2 Dynamic Saliency on Videos A distinctive property of our model is that it is updated online. As proposed in Eq. 2, ICL is defined by the feature activity ratio distribution. This distribution can be defined over space (when sampling within one 2-D image) as well as over time (when sampling over a sequence of images). The temporal correlation among frames can be considered as a Laplacian distribution. Accordingly, at the tth frame, the cumulative activity ratio distribution pt yields: pt = 1 Z t−1 X τ=0 exp(τ −t λ ) · ˆpτ, (5) where λ is the half life. ˆpτ is the feature distribution of the τ th image. Z = R pt(x)dx is the normalization factor that ensures pt is a probability distribution. In video saliency analysis, one of the potential challenges comes from simultaneous movements of the targets and self-movements of the observer. Since our model is feature-based, spatial movements of an object or changing perspectives will not dramatically affect the generation of saliency maps. In order to evaluate the detection accuracy of our approach under changing environment, we compare the dynamic visual attention model with models proposed in [7] and [5]. In this experiment, we use a similar criterion to that described in [5]. The efficacy of the saliency maps to a videoclip is determined by comparing the response intensities at saccadic locations and random locations. Ideally, an effective saliency algorithm would have high output at locations gazed by observers, and tend not to response in most of the randomly chosen locations. To quantify this tendency of selectivity, we first compute the distribution of saliency value at human saccadic locations qs and the distribution at random locations qr. Then, KL divergency is used to measure their dissimilarity. Higher the KL divergency is, more easily a model can discriminate human saccadic locations in the image. A: input sample 0 0.2 0.4 0.6 0.8 1 0 20 40 60 80 B: model in [7] KL = 0.2493 KL = 0.3403 KL = 0.5432 0 0.2 0.4 0.6 0.8 1 0 20 40 60 80 C: model in [5] 0 0.2 0.4 0.6 0.8 1 0 20 40 60 80 D: our model Figure 4: The eye-track records and the video is obtained from [5]. This video contains both target movements and self-movements. In this video, 137 saccades (yellow dots in figure A) are collected. Given the sequence of generated saliency maps, we can obtain the saliency distribution at human saccade locations (narrow blue bars), and random locations (wide green bars). The KL-divergency of these two distribution indicates the performance of each model. 3.3 Dynamic Visual Search We are particularly interested in the dynamic behaviors of attention. Reported by researchers in neurobiological experiments, an inhibitory effect was aroused after sustained attention [12]. This mechanism is referred as Inhibition of Return (IOR) [8]. Research on the cumulative effects of attention [24] has suggested that the dynamics of visual search have broad implications for scene perception, perceptual learning, automaticity, and short term memory. In addition, as a mechanism that prevents an autonomous system from being permanently attracted to certain salient spots and thereby to facilitate productive exploration, the computational modeling of IOR is of practical value in AI and robotics. Previous computational models such as [22, 7] implemented the IOR in a spatially-organized, top-down manner, whereas our model samples the environment online and is driven by data in a bottom-up manner. Spontaneous shifts of attention to new visual cues, as well as the “refusal of perception” behavior arise naturally as consequences of our active search model. Moreover, unlike the spatial “inhibitory masking” approach in [7], our model is feature-based and is therefore free from problems caused by spatial coordinate transformations. 3.3.1 Modeling Sensory Input The sensory structure of the human retina is not uniform. The resolution of perception decreases when eccentricity increases. In order to overcome the physical limitations of the retina, an overt eye movement is made so that the desired visual stimuli can be mapped onto the foveal region. Similar to the computational approximations in [14], we consider the fovea sampling bias as a weighted mask W over the reconstructed saliency map. Let the fovea be located at (x0, y0); the saliency at (x, y) is weighted by W(x, y): W(x, y) = e−1 2 £ (x−x0)2+(y−y0)2¤ + ξ. (6) In the experiments, we choose ξ = 1. 3.3.2 Overt Eye Movements towards Saliency Targets with Inhibition of Return In the incremental perception of one static image, our dynamic visual system is guided by two factors. The first factor is the non-homogeneous composition of features in the observed data that fosters feature preferences in the system. The second factor is a foveal structure that allows the system to bias its sampling via overt eye movements. The interplay of these two factors leads to an active visual search behavior that moves towards a maximum entropy equilibrium in the feature distribution. It is also worth noting that these two factors achieve a hysteresis effect that is responsible for Inhibition Of Return (IOR). A recently attended visual region is not likely to regain eye fixation within short interval because of the foveated weighting. This property of IOR is demonstrated by our experiments. An implementation of our dynamic visual search is shown in the algorithm box. Dynamic Visual Attention 1. At time t, calculate feature ICL based on pt 2. Given current eye fixation, generate a saliency map with foveal bias. 3. By a saccade, move eye to the global maximum of the saliency map. 4. Sample top N “informative” (largest ICL) features in fixation neighborhood. (In our experiment, N = 10) 5. Calculate ˆpt, update pt+1, and go to Step. 1. It is also worth noting that, when run on the images provided by [3], our dynamic visual attention algorithm demonstrates especially pronounced saccades when multiple salient regions are presented in the same image. Although we have not yet validated these saccades against human retinal data, to our knowledge this sort of “attentional swing” has never been reported in other computational systems. 4 26 91 219 279 48 76 98 294 1 2 11 30 105 137 Figure 5: Results on dynamic visual search 4 Discussions A novel dynamic model of visual attention is described in this paper. We have proposed Incremental Coding Length as a general principle by which to distribute energy in the attention system. In this principle, the salient visual cues correspond to unexpected features - according to the definition of ICL, these features may elicit entropy gain in the perception state and are therefore assigned high energy. To validate this theoretical framework, we have examined experimentally various aspects of visual attention. In experiments comparing with static saliency maps, our model more accurately predicted saccades than did other mainstream models. Because the model updates its state in an online manner, we can consider the statistics of a temporal sequence and our model achieved strong results in video saliency generation. Finally, when feature-based ICL is combined with foveated sampling, our model provides a coherent mechanism for dynamic visual search with inhibition of return. In expectation of further endeavors, we have presented the following original ideas. 1) In addition to spatial continuity cues, which are demonstrated in other literature, saliency can also be measured using features. 2) By incorporating temporal dynamics, a visual attention system can capture a broad range of novel behaviors that have not successfully been explained by saliency map analysis. And 3) dynamic attention behaviors might quantitatively be explained and simulated by the pursuit of a maximum entropy equilibrium in the state of perception. 5 Acknowledgements We thank Neil Bruce, John Tsotsos, and Laurent Itti for sharing their experimental data. The first author would like to thank Charles Frogner, Yang Cao, Shengping Zhang and Libo Ma for their insightful discussions on the paper. The reviewers’ pertinent comments and suggestions also helped to improve the quality of the paper. The work was supported by the National High-Tech Research Program of China (Grant No. 2006AA01Z125) and the National Basic Research Program of China (Grant No. 2005CB724301) References [1] V. Balasubramanian, D. Kimber, and M. Berry. Metabolically Efficient Information Processing. Neural Computation, 13(4):799–815, 2001. [2] A. Bell and T. Sejnowski. The independent components of natural scenes are edge filters. Vision Research, 37(23):3327–3338, 1997. [3] N. Bruce and J. Tsotsos. Saliency Based on Information Maximization. Advances in Neural Information Processing Systems, 18, 2006. [4] D. Gao, V. Mahadevan, and N. Vasconcelos. The discriminant center-surround hypothesis for bottom-up saliency. pages 497–504, 2007. [5] L. Itti and P. Baldi. Bayesian Surprise Attracts Human Attention. Advances in Neural Information Processing Systems, 18:547, 2006. [6] L. Itti and C. Koch. Computational modeling of visual attention. Nature Reviews Neuroscience, 2(3):194– 203, 2001. [7] L. Itti, C. Koch, E. Niebur, et al. A model of saliency-based visual attention for rapid scene analysis. IEEE Transactions on Pattern Analysis and Machine Intelligence, 20(11):1254–1259, 1998. [8] R. Klein. Inhibition of return. Trends in Cognitive Sciences, 4(4):138–147, 2000. [9] C. Koch and T. Poggio. Predicting the visual world: silence is golden. Nature Neuroscience, 2:9–10, 1999. [10] C. Koch and S. Ullman. Shifts in selective visual attention: towards the underlying neural circuitry. Hum Neurobiol, 4(4):219–27, 1985. [11] W. Levy and R. Baxter. Energy Efficient Neural Codes. Neural Codes and Distributed Representations: Foundations of Neural Computation, 1999. [12] S. Ling and M. Carrasco. When sustained attention impairs perception. Nature neuroscience, 9(10):1243, 2006. [13] J. Maunsell and S. Treue. Feature-based attention in visual cortex. Trends in Neurosciences, 29(6):317– 322, 2006. [14] J. Najemnik and W. Geisler. Optimal eye movement strategies in visual search. Nature, 434(7031):387– 391, 2005. [15] B. Olshausen et al. Emergence of simple-cell receptive field properties by learning a sparse code for natural images. Nature, 381(6583):607–609, 1996. [16] R. Peters and L. Itti. Beyond bottom-up: Incorporating task-dependent influences into a computational model of spatial attention. IEEE Computer Society Conference on Computer Vision and Pattern Recognition, 2007. [17] R. Rao and D. Ballard. Predictive coding in the visual cortex: a functional interpretation of some extraclassical receptive-field effects. Nature Neuroscience, 2:79–87, 1999. [18] J. Reynolds, T. Pasternak, and R. Desimone. Attention Increases Sensitivity of V4 Neurons. Neuron, 26(3):703–714, 2000. [19] S. Treue and J. Maunsell. Attentional modulation of visual motion processing in cortical areas MT and MST. Nature, 382(6591):539–541, 1996. [20] J. van Hateren. Real and optimal neural images in early vision. Nature, 360(6399):68–70, 1992. [21] M. Wainwright. Visual adaptation as optimal information transmission. Vision Research, 39(23):3960– 3974, 1999. [22] D. Walther, D. Edgington, and C. Koch. Detection and tracking of objects in underwater video. Computer Vision and Pattern Recognition, 2004. CVPR 2004. Proceedings of the 2004 IEEE Computer Society Conference on, 1. [23] D. Walther, U. Rutishauser, C. Koch, and P. Perona. Selective visual attention enables learning and recognition of multiple objects in cluttered scenes. Computer Vision and Image Understanding, 100(12):41–63, 2005. [24] J. Wolfe, N. Klempen, and K. Dahlen. Post-attentive vision. Journal of Experimental Psychology: Human Perception and Performance, 26(2):693–716, 2000.
2008
167
3,417
Joint support recovery under high-dimensional scaling: Benefits and perils of ℓ1,∞-regularization Sahand Negahban Department of Electrical Engineering and Computer Sciences University of California, Berkeley Berkeley, CA 94720-1770 sahand n@eecs.berkeley.edu Martin J. Wainwright Department of Statistics, and Department of Electrical Engineering and Computer Sciences University of California, Berkeley Berkeley, CA 94720-1770 wainwrig@eecs.berkeley.edu Abstract Given a collection of r ≥2 linear regression problems in p dimensions, suppose that the regression coefficients share partially common supports. This set-up suggests the use of ℓ1/ℓ∞-regularized regression for joint estimation of the p × r matrix of regression coefficients. We analyze the high-dimensional scaling of ℓ1/ℓ∞-regularized quadratic programming, considering both consistency rates in ℓ∞-norm, and also how the minimal sample size n required for performing variable selection grows as a function of the model dimension, sparsity, and overlap between the supports. We begin by establishing bounds on the ℓ∞error as well sufficient conditions for exact variable selection for fixed design matrices, as well as designs drawn randomly from general Gaussian matrices. These results show that the high-dimensional scaling of ℓ1/ℓ∞-regularization is qualitatively similar to that of ordinary ℓ1-regularization. Our second set of results applies to design matrices drawn from standard Gaussian ensembles, for which we provide a sharp set of necessary and sufficient conditions: the ℓ1/ℓ∞-regularized method undergoes a phase transition characterized by the rescaled sample size θ1,∞(n, p, s, α) = n/{(4 −3α)s log(p −(2 −α) s)}. More precisely, for any δ > 0, the probability of successfully recovering both supports converges to 1 for scalings such that θ1,∞≥1 + δ, and converges to 0 for scalings for which θ1,∞≤1 −δ. An implication of this threshold is that use of ℓ1,∞-regularization yields improved statistical efficiency if the overlap parameter is large enough (α > 2/3), but performs worse than a naive Lasso-based approach for moderate to small overlap (α < 2/3). We illustrate the close agreement between these theoretical predictions, and the actual behavior in simulations. 1 Introduction The area of high-dimensional statistical inference is concerned with the behavior of models and algorithms in which the dimension p is comparable to, or possibly even larger than the sample size n. In the absence of additional structure, it is well-known that many standard procedures—among them linear regression and principal component analysis—are not consistent unless the ratio p/n converges to zero. Since this scaling precludes having p comparable to or larger than n, an active line of research is based on imposing structural conditions on the data—for instance, sparsity, manifold constraints, or graphical model structure—and then studying conditions under which various polynomial-time methods are either consistent, or conversely inconsistent. 1 This paper deals with high-dimensional scaling in the context of solving multiple regression problems, where the regression vectors are assumed to have shared sparse structure. More specifically, suppose that we are given a collection of r different linear regression models in p dimensions, with regression vectors β i ∈Rp, for i = 1, . . . , r. We let S(β i) = {j | β i j ̸= 0} denote the support set of β i. In many applications—among them sparse approximation, graphical model selection, and image reconstruction—it is natural to impose a sparsity constraint, corresponding to restricting the cardinality |S(β i)| of each support set. Moreover, one might expect some amount of overlap between the sets S(β i) and S(β j) for indices i ̸= j since they correspond to the sets of active regression coefficients in each problem. For instance, consider the problem of image denoising or reconstruction, using wavelets or some other type of multiresolution basis. It is well known that natural images tend to have sparse representations in such bases. Moreover, similar images—say the same scene taken from multiple cameras—would be expected to share a similar subset of active features in the reconstruction. Similarly, in analyzing the genetic underpinnings of a given disease, one might have results from different subjects and/or experiments, meaning that the covariate realizations and regression vectors would differ in their numerical values, but one expects the same subsets of genes to be active in controlling the disease, which translates to a condition of shared support in the regression coefficients. Given these structural conditions of shared sparsity in these and other applications, it is reasonable to consider how this common structure can be exploited so as to increase the statistical efficiency of estimation procedures. In this paper, we study the high-dimensional scaling of block ℓ1/ℓ∞regularization. Our main contribution is to obtain some precise—and arguably surprising—insights into the benefits and dangers of using block ℓ1/ℓ∞ regularization, as compared to simpler ℓ1-regularization (separate Lasso for each regression problem). We begin by providing a general set of sufficient conditions for consistent support recovery for both fixed design matrices, and random Gaussian design matrices. In addition to these basic consistency results, we then seek to characterize rates, for the particular case of standard Gaussian designs, in a manner precise enough to address the following questions. (a) First, under what structural assumptions on the data does the use of ℓ1/ℓ∞block-regularization provide a quantifiable reduction in the scaling of the sample size n, as a function of the problem dimension p and other structural parameters, required for consistency? (b) Second, are there any settings in which ℓ1/ℓ∞block-regularization can be harmful relative to computationally less expensive procedures? Answers to these questions yield useful insight into the tradeoff between computational and statistical efficiency. Indeed, the convex programs that arise from using block-regularization typically require a greater computational cost to solve. Accordingly, it is important to understand under what conditions this increased computational cost guarantees that fewer samples are required for achieving a fixed level of statistical accuracy. As a representative instance of our theory, consider the special case of standard Gaussian design matrices and two regression problems (r = 2), with the supports S(β 1) and S(β 2) each of size s and overlapping in a fraction α ∈[0, 1] of their entries. For this problem, we prove that block ℓ1/ℓ∞regularization undergoes a phase transition in terms of the rescaled sample size θ1,∞(n, p, s, α) : = n (4 −3α)s log(p −(2 −α)s). (1) In words, for any δ > 0 and for scalings of the quadruple (n, p, s, α) such that θ1,∞≥1 + δ, the probability of successfully recovering both S(β 1) and S(β 2) converges to one, whereas for scalings such that θ1,∞≤1 −δ, the probability of success converges to zero. By comparison to previous theory on the behavior of the Lasso (ordinary ℓ1-regularized quadratic programming), the scaling (1) has two interesting implications. For the ssparse regression problem with standard Gaussian designs, the Lasso has been shown [10] to undergo a phase transition as a function of the rescaled sample size θLas(n, p, s) : = n 2s log(p −s), (2) so that solving two separate Lasso problems, one for each regression problem, would recover both supports for problem sequences (n, p, s) such that θLas > 1. Thus, one consequence of our analysis is to provide a precise confirmation of the natural intuition: if the data is well-aligned with the regularizer, then block-regularization increases statistical efficiency. On the other hand, our analysis also conveys a cautionary message: if the overlap is too small—more precisely, if α < 2/3—then block ℓ1,∞is actually harmful relative to the naive Lasso-based approach. This fact illustrates that some care is required in the application of block regularization schemes. 2 The remainder of this paper is organized as follows. In Section 2, we provide a precise description of the problem. Section 3 is devoted to the statement of our main result, some discussion of its consequences, and illustration by comparison to empirical simulations. 2 Problem set-up We begin by setting up the problem to be studied in this paper, including multivariate regression and family of block-regularized programs for estimating sparse vectors. 2.1 Multivariate regression In this problem, we consider the following form of multivariate regression. For each i = 1, . . . , r, let βi ∈Rp be a regression vector, and consider the family of linear observation models yi = Xiβi + wi, i = 1, 2, . . . , r. (3) Here each Xi ∈Rn×p is a design matrix, possibly different for each vector βi, and wi ∈Rn is a noise vector. We assume that the noise vectors wi and wj are independent for different regression problems i ̸= j. In this paper, we assume that each wi has a multivariate Gaussian N(0, σ2In×n) distribution. However, we note that qualitatively similar results will hold for any noise distribution with sub-Gaussian tails (see the book [1] for more background). 2.2 Block-regularization schemes For compactness in notation, we frequently use B to denote the p × r matrix with β i ∈Rp as the ith column. Given a parameter q ∈[1, ∞], we define the ℓ1/ℓq block-norm as follows: ∥B∥ℓ1/ℓq : = p X k=1 ∥(β1 k, β2 k, . . . , βr k)∥q, (4) corresponding to applying the ℓq norm to each row of B, and the ℓ1-norm across all of these blocks. We note that all of these block norms are special cases of the CAP family of penalties [12]. This family of block-regularizers (4) suggests a natural family of M-estimators for estimating B, based on solving the block-ℓ1/ℓq-regularized quadratic program bB ∈ arg min B∈Rp×r  1 2n r X i=1 ∥yi −Xiβi∥2 2 + λn∥B∥ℓ1/ℓq , (5) where λn > 0 is a user-defined regularization parameter. Note that the data term is separable across the different regression problems i = 1, . . . , r, due to our assumption of independence on the noise vectors. Any coupling between the different regression problems is induced by the block-norm regularization. In the special case of univariate regression (r = 1), the parameter q plays no role, and the block-regularized scheme (6) reduces to the Lasso [7, 3]. If q = 1 and r ≥2, the block-regularization function (like the data term) is separable across the different regression problems i = 1, . . . , r, and so the scheme (6) reduces to solving r separate Lasso problems. For r ≥2 and q = 2, the program (6) is frequently referred to as the group Lasso [11, 6]. Another important case [9, 8], and the focus of this paper, is block ℓ1/ℓ∞regularization. The motivation for using block ℓ1/ℓ∞regularization is to encourage shared sparsity among the columns of the regression matrix B. Geometrically, like the ℓ1 norm that underlies the ordinary Lasso, the ℓ1/ℓ∞block norm has a polyhedral unit ball. However, the block norm captures potential interactions between the columns βi in the matrix B. Intuitively, taking the maximum encourages the elements (β1 k, β2 k . . . , βr k) in any given row k = 1, . . . , p to be zero simultaneously, or to both be non-zero simultaneously. Indeed, if βi k ̸= 0 for at least one i ∈{1, . . . , r}, then there is no additional penalty to have βj k ̸= 0 as well, as long as |βj k| ≤|βi k|. 2.3 Estimation in ℓ∞norm and support recovery For a given λn > 0, suppose that we solve the block ℓ1/ℓ∞program, thereby obtaining an estimate bB ∈ arg min B∈Rp×r  1 2n r X i=1 ∥yi −Xiβi∥2 2 + λn∥B∥ℓ1/ℓ∞ , (6) 3 We note that under high-dimensional scaling (p ≫n), this convex program (6) is not necessarily strictly convex, since the quadratic term is rank deficient and the block ℓ1/ℓ∞norm is polyhedral, which implies that the program is not strictly convex. However, a consequence of our analysis is that under appropriate conditions, the optimal solution bB is in fact unique. In this paper, we study the accuracy of the estimate bB, as a function of the sample size n, regression dimensions p and r, and the sparsity index s = maxi=1,...,r |S(β i)|. There are various metrics with which to assess the “closeness” of the estimate bB to the truth B, including predictive risk, various types of norm-based bounds on the difference bB −B, and variable selection consistency. In this paper, we prove results bounding the ℓ∞/ℓ∞ difference ∥bB −B∥ℓ∞/ℓ∞ : = max k=1,...,p max i=1,...,r | bBi k −Bi k|. In addition, we prove results on support recovery criteria. Recall that for each vector β i ∈Rp, we use S(β i) = {k | β i k ̸= 0} to denote its support set. The problem of union support recovery corresponds to recovering the set J : = r[ i=1 S(β i), (7) corresponding to the subset J ⊆{1, . . . , p} of indices that are active in at least one regression problem. Note that the cardinality of |J| is upper bounded by rs, but can be substantially smaller (as small as s) if there is overlap among the different supports. In some results, we also study the more refined criterion of recovering the individual signed supports, meaning the signed quantities sign(β i k), where the sign function is given by sign(t) =    +1 if t > 0 0 if t = 0 −1 if t < 0 (8) There are multiple ways in which the support (or signed support) can be estimated, depending on whether we use primal or dual information from an optimal solution. ℓ1/ℓ∞primal recovery: Solve the block-regularized program (6), thereby obtaining a (primal) optimal solution bB ∈Rp×r, and estimate the signed support vectors [Spri(bβ i)]k = sign(bβ i k). (9) ℓ1/ℓ∞dual recovery: Solve the block-regularized program (6), thereby obtaining an primal solution bB ∈ Rp×r. For each row k = 1, . . . , p, compute the set Mk : = arg max i=1,...,r |bβ i k|. Estimate the signed support via: [Sdua(bβ i k)] = ( sign(bβ i k) if i ∈Mk 0 otherwise. (10) As our development will clarify, this procedure corresponds to estimating the signed support on the basis of a dual optimal solution associated with the optimal primal solution. 2.4 Notational conventions Throughout this paper, we use the index p ∈{1, . . . , r} as a superscript in indexing the different regression problems, or equivalently the columns of the matrix B ∈Rp×r. Given a design matrix X ∈Rn×p and a subset S ⊆{1, . . . , p}, we use XS to denote the n × |S| sub-matrix obtained by extracting those columns indexed by S. For a pair of matrices A ∈Rm×ℓand B ∈Rm×n, we use the notation A, B : = AT B for the resulting ℓ× n matrix. We use the following standard asymptotic notation: for functions f, g, the notation f(n) = O(g(n)) means that there exists a fixed constant 0 < C < +∞such that f(n) ≤Cg(n); the notation f(n) = Ω(g(n)) means that f(n) ≥Cg(n), and f(n) = Θ(g(n)) means that f(n) = O(g(n)) and f(n) = Ω(g(n)). 4 3 Main results and their consequences In this section, we provide precise statements of the main results of this paper. Our first main result (Theorem 1) provides sufficient conditions for deterministic design matrices X1, . . . , Xr. This result allows for an arbitrary number r of regression problems. Not surprisingly, these results show that the high-dimensional scaling of block ℓ1/ℓ∞is qualitiatively similar to that of ordinary ℓ1-regularization: for instance, in the case of random Gaussian designs and bounded r, our sufficient conditions in [5] ensure that n = Ω(s log p) samples are sufficient to recover the union of supports correctly with high probability, which matches known results on the Lasso [10]. As discussed in the introduction, we are also interested in the more refined question: can we provide necessary and sufficient conditions that are sharp enough to reveal quantitative differences between ordinary ℓ1regularization and block regularization? In order to provide precise answers to this question, our final two results concern the special case of r = 2 regression problems, both with supports of size s that overlap in a fraction α of their entries, and with design matrices drawn randomly from the standard Gaussian ensemble. In this setting, our final two results (Theorem 2 and 3) show that block ℓ1/ℓ∞regularization undergoes a phase transition specified by the rescaled sample size. We then discuss some consequences of these results, and illustrate their sharpness with some simulation results. 3.1 Sufficient conditions for deterministic designs In addition to the sample size n, problem dimensions p and r, and sparsity index s, our results are stated in terms of the minimum eigenvalue Cmin of the |J| × |J| matrices 1 n⟨Xi J, Xi J⟩—that is, λmin 1 n⟨Xi J, Xi J⟩  ≥Cmin for all i = 1, . . . , r, (11) as well as an ℓ∞-operator norm of their inverses: ||| 1 n⟨Xi J, Xi J⟩ −1|||∞≤Dmax for all i = 1, . . . , r. (12) It is natural to think of these quantites as being constants (independent of p and s), although our results do allow them to scale. We assume that the columns of each design matrix Xi, i = 1, . . . , r are normalized so that ∥Xi k∥2 2 ≤ 2n for all k = 1, 2, . . . p. (13) The choice of the factor 2 in this bound is for later technical convenience. We also require the following incoherence condition on the design matrix is satisified: there exists some γ ∈(0, 1] such that max ℓ=1,...,|Jc| r X i=1 ∥ Xi ℓ, Xi J(⟨Xi J, Xi J⟩)−1 ∥1 ≤ (1 −γ), (14) and we also define the support minimum value Bmin = mink∈J maxi=1,...,r |β i k|, For a parameter ξ > 1 (to be chosen by the user), we define the probability φ1(ξ, p, s) : = 1 −2 exp(−(ξ −1)[r + log p]) −2 exp(−(ξ2 −1) log(rs)) (15) which specifies the precise rate with which the “high probability” statements in Theorem 1 hold. Theorem 1. Consider the observation model (3) with design matrices Xi satisfying the column bound (13) and incoherence condition (14). Suppose that we solve the block-regularized ℓ1/ℓ∞convex program (6) with regularization parameter ρ2 n ≥4ξσ2 γ2 r2+r log(p) n for some ξ > 1. Then with probability greater than φ1(ξ, p, s) →1, we are guaranteed that: (a) The block-regularized program has a unique solution bB such that Sr i=1 S(bβ i) ⊆J, and it satisfies the elementwise bound max i=1,...,r max k=1,...,p |bβ i k −β i k| ≤ ξ s 4σ2 Cmin log(rs) n + Dmax ρn | {z } . (16) b1(ξ, ρn, n, s) 5 (b) If in addition Bmin ≥b1(ξ, ρn, n, s), then Sr i=1 S(bβ i) = J, so that the solution bB correctly specifies the union of supports J. Remarks: To clarify the scope of the claims, part (a) guarantees that the estimator recovers the union support J correctly, whereas part (b) guarantees that for any given i = 1, . . . , r and k ∈S(β i), the sign sign(bβ i k) is correct. Note that we are guaranteed that bβ i k = 0 for all k /∈J. However, within the union support J, when using primal recovery method, it is possible to have false non-zeros—i.e., there may be an index k ∈J\S(β i) such that bβ i k ̸= 0. Of course, this cannot occur if the support sets S(β i) are all equal. This phenomenon is related to geometric properties of the block ℓ1/ℓ∞norm: in particular, for any given index k, when bβ j k ̸= 0 for some j ∈{1, . . . , r}, then there is no further penalty to having bβ i k ̸= 0 for other column indices i ̸= j. The dual signed support recovery method (10) is more conservative in estimating the individual support sets. In particular, for any given i ∈{1, . . . , r}, it only allows an index k to enter the signed support estimate Sdua(bβ i) when |bβ i k| achieves the maximum magnitude (possibly non-unique) across all indices i = 1, . . . , r. Consequently, Theorem 1 guarantees that the dual signed support method will never include an index in the individual supports. However, it may incorrectly exclude indices of some supports, but like the primal support estimator, it is always guaranteed to correctly recover the union of supports J. We note that it is possible to ensure that under some conditions that the dual support method will correctly recover each of the individual signed supports, without any incorrect exclusions. However, as illustrated by Theorem 2, doing so requires additional assumptions on the size of the gap |β i k| −|β j k | for indices k ∈B : = S(β i) ∩S(β j). 3.2 Sharp results for standard Gaussian ensembles Our results thus far show under standard mutual incoherence or irrepresentability conditions, the block ℓ1/ℓ∞ method produces consistent estimators for n = Ω(s log(p−s)). In qualitative terms, these results match known scaling for the Lasso, or ordinary ℓ1-regularization. In order to provide keener insight into the (dis)advantages associated with using ℓ1/ℓ∞block regularization, we specialize the remainder of our analysis to the case of r = 2 regression problems, where the corresponding design matrices Xi, i = 1, 2 are sampled from the standard Gaussian ensemble [2, 4]—i.e., with i.i.d. rows N(0, Ip×p). Our goal in studying this special case is to be able to make quantiative comparisons with the Lasso. We consider a sequence of models indexed by the triplet (p, s, α), corresponding to the problem dimension p, support sizes s. and overlap parameter α ∈[0, 1]. We assume that s ≤p/2, capturing the intuition of a (relatively) sparse model. Suppose that for a given model, we take n = n(p, s, α) observations. according to equation (3). We can then study the probability of successful recovery as a function of the model triplet, and the sample size n. In order to state our main result, we define the order parameter or rescaled sample size θ1,∞(n, p, s, α) : = n (4−3α)s log(p−(2−α)s). We also define the support gap value as well as c∞-gap Bgap = |β 1 B| −|β 2 B| , and c∞= 1 ρn ∥T(Bgap)∥∞, where T(Bgap) = ρn ∧Bgap. 3.2.1 Sufficient conditions We begin with a result that provides sufficient conditions for support recovery using block ℓ1/ℓ∞regularization. Theorem 2 (Achievability). Given the observation model (3) with random design X drawn with i.i.d. standard Gaussian entries, and consider problem sequences (n, p, s, α) for which θ1,∞(n, p, s, α) > 1 + δ for some δ > 0. If we solve the block-regularized program (6) with ρn = ξ q log p n and c∞→0 , then with probability greater than 1 −c1 exp(−c2 log(p −(2 −α)s)), the following properties hold: (i) The block ℓ1,∞-program (6) has a unique solution (bβ 1, bβ 2), with supports S(bβ 1) ⊆J and S(bβ 2) ⊆ J. Moreover, we have the elementwise bound max i=1,2 max k=1,...,p |bβ i k −β i k| ≤ ξ r 100 log(s) n + ρn  4s √n + 1  , | {z } (17) b3(ξ, ρn, n, s) 6 (ii) If the support minimum Bmin > 2b3(ξ, ρn, n, s), then the primal support method successfully recovers the support union J = S(β 1)∪S(β 2). Moreover, using the primal signed support recovery method (9), we have [Spri(bβ i)]k = sign(β i k) for all k ∈S(β i). (18) 3.2.2 Necessary conditions We now turn to the question of finding matching necessary conditions for support recovery. Theorem 3 (Lower bounds). Given the observation model (3) with random design X drawn with i.i.d. standard Gaussian entries. (a) For problem sequences (n, p, s, α) such that θ1,∞(n, p, s, α) < 1 −δ for some δ > 0 and for any non-increasing regularization sequence ρn > 0, no solution bB = (bβ 1, bβ 2) to the block-regularized program (6) has the correct support union S(bβ 1) ∪S(bβ 2). (b) Recalling the definition of Bgap, define the rescaled gap limit c2(ρn, Bgap) : = lim sup(n,p,s) ∥T (Bgap)∥2 ρn √s . If the sample size n is bounded as n < (1 −δ)  (4 −3α) + (c2(ρn, Bgap))2 s log[p −(2 −α)s] for some δ > 0, then the dual recovery method (10) fails to recover the individual signed supports. It is important to note that c∞≥c2, which implies then that as long as c∞→0, then c2 →0, so that the conditions of Theorem 3(a) and (b) are equivalent. However, note that if c2 does not go to 0, then in fact, the method could fail to recover the correct support even if θ1,∞> 1 + δ. This result is key to understanding the ℓ1,∞-regularization term. The gap between the vectors plays a fundamental role in in reducing the sampling complexity. Namely, if the gap is too large, then the sampling efficiency is greatly reduced as compared to if the gap is very small. In summary, while (a) and (b) seem equivalent on the surface, the requirement in (b) is in fact stronger than that in (a) and demonstrates the importance of condition (iii) in Theorem 2. It shows that if the gap is too large, then correct joint support recovery is not possible. 3.3 Illustrative simulations and some consequences In this section, we provide some illustrative simulations that illustrate the phase transitions predicted by Theorems 2 and 3, and show that the theory provides an accurate description of practice even for relatively small problem sizes (e.g., p = 128). Figure 1 plots the probability of successful recovery of the individual signed supports using dual support recovery (10)—namely, P[Sdua(bβ i) = S±(β i), Sdua(bβ 2) = S±(β 2)] for i = 1, 2— versus the order parameter θ1,∞(n, p, s, α). The plot contains four sets of “stacked” curves, each corresponding to a different choice of the overlap parameter, ranging from α = 1 (left-most stack), to α = 0.1 (right-most stack). Each stack contains three curves, corresponding to the problem sizes p ∈{128, 256, 512}. In all cases, we fixed the support size s = 0.1p. The stacking behavior of these curves demonstrates that we have isolated the correct order parameter, and the step-function behavior is consistent with the theoretical predictions of a sharp threshold. Theorems 2 and 3 have some interesting consequences, particularly in comparison to the behavior of the “naive” Lasso-based individual decoding of signed supports—that is, the method that simply applies the Lasso (ordinary ℓ1-regularization) to each column i = 1, 2 separately. By known results [10] on the Lasso, the performance of this naive approach is governed by the order parameter θLas(n, p, s) = n 2s log(p −s), (19) meaning that for any δ > 0, it succeeds for sequences such that θLas > 1+δ, and conversely fails for sequences such that θLas < 1−δ. To compare the two methods, we define the relative efficiency coefficient R(θ1,∞, θLas) : = θLas(n, p, s)/θ1,∞(n, p, s, α). A value of R < 1 implies that the block method is more efficient, while R > 1 implies that the naive method is more efficient. With this notation, we have the following: Corollary 1. The relative efficiency of the block ℓ1,∞program (6) compared to the Lasso is given by R(θ1,∞, θLas) = 4−3α 2 log(p−(2−α)s) log(p−s) . Thus, for sublinear sparsity s/p →0, the block scheme has greater statistical efficiency for all overlaps α ∈(2/3, 1], but lower statistical efficiency for overlaps α ∈[0, 2/3). 7 0 1 2 3 4 5 0 0.2 0.4 0.6 0.8 1 Control parameter θ Prob. success ℓ1,∞relaxation for s = 0.1*p and α = 1, 0.7, 0.4, 0.1 p = 128 p = 256 p = 512 α = 1 α = 0.7 α = 0.4 α = 0.1 α = 1 α = 0.7 α = 0.4 α = 0.1 α = 1 α = 0.7 α = 0.4 α = 0.1 Figure 1. Probability of success in recovering the joint signed supports plotted against the control parameter θ1,∞= n/[2s log(p −(2 −α)s))] for linear sparsity s = 0.1p. Each stack of graphs corresponds to a fixed overlap α, as labeled on the figure. The three curves within each stack correspond to problem sizes p{128, 256, 512}; note how they all align with each other and exhibit step-like behavior, consistent with Theorems 2 and 3. The vertical lines correspond to the thresholds θ∗ 1,∞(α) predicted by Theorems 2 and 3; note the close agreement between theory and simulation. References [1] V. V. Buldygin and Y. V. Kozachenko. Metric characterization of random variables and random processes. American Mathematical Society, Providence, RI, 2000. [2] E. Candes and T. Tao. The Dantzig selector: Statistical estimation when p is much larger than n. Annals of Statistics, 2006. [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] D. L. Donoho and J. M. Tanner. Counting faces of randomly-projected polytopes when the projection radically lowers dimension. Technical report, Stanford University, 2006. Submitted to Journal of the AMS. [5] S. Negahban and M. J. Wainwright. Joint support recovery under high-dimensional scaling: Benefits and perils of ℓ1,∞-regularization. Technical report, Department of Statistics, UC Berkeley, January 2009. [6] G. Obozinski, B. Taskar, and M. Jordan. Joint covariate selection for grouped classification. Technical report, Statistics Department, UC Berkeley, 2007. [7] R. Tibshirani. Regression shrinkage and selection via the lasso. Journal of the Royal Statistical Society, Series B, 58(1):267–288, 1996. [8] J. A. Tropp, A. C. Gilbert, and M. J. Strauss. Algorithms for simultaneous sparse approximation. Signal Processing, 86:572–602, April 2006. Special issue on ”Sparse approximations in signal and image processing”. [9] B. Turlach, W.N. Venables, and S.J. Wright. Simultaneous variable selection. Technometrics, 27:349–363, 2005. [10] M. J. Wainwright. Sharp thresholds for high-dimensional and noisy recovery of sparsity using using ℓ1constrained quadratic programs. Technical Report 709, Department of Statistics, UC Berkeley, 2006. [11] Kim Y., Kim J., and Y. Kim. Blockwise sparse regression. Statistica Sinica, 16(2), 2006. [12] P. Zhao, G. Rocha, and B. Yu. Grouped and hierarchical model selection through composite absolute penalties. Technical report, Statistics Department, UC Berkeley, 2007. 8
2008
168
3,418
Online Metric Learning and Fast Similarity Search Prateek Jain, Brian Kulis, Inderjit S. Dhillon, and Kristen Grauman Department of Computer Sciences University of Texas at Austin Austin, TX 78712 {pjain,kulis,inderjit,grauman}@cs.utexas.edu Abstract Metric learning algorithms can provide useful distance functions for a variety of domains, and recent work has shown good accuracy for problems where the learner can access all distance constraints at once. However, in many real applications, constraints are only available incrementally, thus necessitating methods that can perform online updates to the learned metric. Existing online algorithms offer bounds on worst-case performance, but typically do not perform well in practice as compared to their offline counterparts. We present a new online metric learning algorithm that updates a learned Mahalanobis metric based on LogDet regularization and gradient descent. We prove theoretical worst-case performance bounds, and empirically compare the proposed method against existing online metric learning algorithms. To further boost the practicality of our approach, we develop an online locality-sensitive hashing scheme which leads to efficient updates to data structures used for fast approximate similarity search. We demonstrate our algorithm on multiple datasets and show that it outperforms relevant baselines. 1 Introduction A number of recent techniques address the problem of metric learning, in which a distance function between data objects is learned based on given (or inferred) similarity constraints between examples [4, 7, 11, 16, 5, 15]. Such algorithms have been applied to a variety of real-world learning tasks, ranging from object recognition and human body pose estimation [5, 9], to digit recognition [7], and software support [4] applications. Most successful results have relied on having access to all constraints at the onset of the metric learning. However, in many real applications, the desired distance function may need to change gradually over time as additional information or constraints are received. For instance, in image search applications on the internet, online click-through data that is continually collected may impact the desired distance function. To address this need, recent work on online metric learning algorithms attempts to handle constraints that are received one at a time [13, 4]. Unfortunately, current methods suffer from a number of drawbacks, including speed, bound quality, and empirical performance. Further complicating this scenario is the fact that fast retrieval methods must be in place on top of the learned metrics for many applications dealing with large-scale databases. For example, in image search applications, relevant images within very large collections must be quickly returned to the user, and constraints and user queries may often be intermingled across time. Thus a good online metric learner must also be able to support fast similarity search routines. This is problematic since existing methods (e.g., locality-sensitive hashing [6, 1] or kd-trees) assume a static distance function, and are expensive to update when the underlying distance function changes. 1 The goal of this work is to make metric learning practical for real-world learning tasks in which both constraints and queries must be handled efficiently in an online manner. To that end, we first develop an online metric learning algorithm that uses LogDet regularization and exact gradient descent. The new algorithm is inspired by the metric learning algorithm studied in [4]; however, while the loss bounds for the latter method are dependent on the input data, our loss bounds are independent of the sequence of constraints given to the algorithm. Furthermore, unlike the Pseudo-metric Online Learning Algorithm (POLA) [13], another recent online technique, our algorithm requires no eigenvector computation, making it considerably faster in practice. We further show how our algorithm can be integrated with large-scale approximate similarity search. We devise a method to incrementally update locality-sensitive hash keys during the updates of the metric learner, making it possible to perform accurate sub-linear time nearest neighbor searches over the data in an online manner. We compare our algorithm to related existing methods using a variety of standard data sets. We show that our method outperforms existing approaches, and even performs comparably to several offline metric learning algorithms. To evaluate our approach for indexing a large-scale database, we include experiments with a set of 300,000 image patches; our online algorithm effectively learns to compare patches, and our hashing construction allows accurate fast retrieval for online queries. 1.1 Related Work A number of recent techniques consider the metric learning problem [16, 7, 11, 4, 5]. Most work deals with learning Mahalanobis distances in an offline manner, which often leads to expensive optimization algorithms. The POLA algorithm [13], on the other hand, is an approach for online learning of Mahalanobis metrics that optimizes a large-margin objective and has provable regret bounds, although eigenvector computation is required at each iteration to enforce positive definiteness, which can be slow in practice. The information-theoretic metric learning method of [4] includes an online variant that avoids eigenvector decomposition. However, because of the particular form of the online update, positive-definiteness still must be carefully enforced, which impacts bound quality and empirical performance, making it undesirable for both theoretical and practical purposes. In contrast, our proposed algorithm has strong bounds, requires no extra work for enforcing positive definiteness, and can be implemented efficiently. There are a number of existing online algorithms for other machine learning problems outside of metric learning, e.g. [10, 2, 12]. Fast search methods are becoming increasingly necessary for machine learning tasks that must cope with large databases. Locality-sensitive hashing [6] is an effective technique that performs approximate nearest neighbor searches in time that is sub-linear in the size of the database. Most existing work has considered hash functions for Lp norms [3], inner product similarity [1], and other standard distances. While recent work has shown how to generate hash functions for (offline) learned Mahalanobis metrics [9], we are not aware of any existing technique that allows incremental updates to locality-sensitive hash keys for online database maintenance, as we propose in this work. 2 Online Metric Learning In this section we introduce our model for online metric learning, develop an efficient algorithm to implement it, and prove regret bounds. 2.1 Formulation and Algorithm As in several existing metric learning methods, we restrict ourselves to learning a Mahalanobis distance function over our input data, which is a distance function parameterized by a d × d positive definite matrix A. Given d-dimensional vectors u and v, the squared Mahalanobis distance between them is defined as dA(u, v) = (u −v)T A(u −v). Positive definiteness of A assures that the distance function will return positive distances. We may equivalently view such distance functions as applying a linear transformation to the input data and computing the squared Euclidean distance in the transformed space; this may be seen by factorizing the matrix A = GT G, and distributing G into the (u −v) terms. In general, one learns a Mahalanobis distance by learning the appropriate positive definite matrix A based on constraints over the distance function. These constraints are typically distance or similarity constraints that arise from supervised information—for example, the distance between two points in the same class should be “small”. In contrast to offline approaches, which assume all constraints 2 are provided up front, online algorithms assume that constraints are received one at a time. That is, we assume that at time step t, there exists a current distance function parameterized by At. A constraint is received, encoded by the triple (ut, vt, yt), where yt is the target distance between ut and vt (we restrict ourselves to distance constraints, though other constraints are possible). Using At, we first predict the distance ˆyt = dAt(ut, vt) using our current distance function, and incur a loss ℓ(ˆyt, yt). Then we update our matrix from At to At+1. The goal is to minimize the sum of the losses over all time steps, i.e. LA = P t ℓ(ˆyt, yt). One common choice is the squared loss: ℓ(ˆyt, yt) = 1 2(ˆyt −yt)2. We also consider a variant of the model where the input is a quadruple (ut, vt, yt, bt), where bt = 1 if we require that the distance between ut and vt be less than or equal to yt, and bt = −1 if we require that the distance between ut and vt be greater than or equal to yt. In that case, the corresponding loss function is ℓ(ˆyt, yt, bt) = max(0, 1 2bt(ˆyt −yt))2. A typical approach [10, 4, 13] for the above given online learning problem is to solve for At+1 by minimizing a regularized loss at each step: At+1 = argmin A≻0 D(A, At) + ηℓ(dA(ut, vt), yt), (2.1) where D(A, At) is a regularization function and ηt > 0 is the regularization parameter. As in [4], we use the LogDet divergence Dℓd(A, At) as the regularization function. It is defined over positive definite matrices and is given by Dℓd(A, At) = tr(AA−1 t ) −log det(AA−1 t ) −d. This divergence has previously been shown to be useful in the context of metric learning [4]. It has a number of desirable properties for metric learning, including scale-invariance, automatic enforcement of positive definiteness, and a maximum-likelihood interpretation. Existing approaches solve for At+1 by approximating the gradient of the loss function, i.e. ℓ′(dA(ut, vt), yt) is approximated by ℓ′(dAt(ut, vt), yt) [10, 13, 4]. While for some regularization functions (e.g. Frobenius divergence, von-Neumann divergence) such a scheme works out well, for LogDet regularization it can lead to non-definite matrices for which the regularization function is not even defined. This results in a scheme that has to adapt the regularization parameter in order to maintain positive definiteness [4]. In contrast, our algorithm proceeds by exactly solving for the updated parameters At+1 that minimize (2.1). Since we use the exact gradient, our analysis will become more involved; however, the resulting algorithm will have several advantages over existing methods for online metric learning. Using straightforward algebra and the Sherman-Morrison inverse formula, we can show that the resulting solution to the minimization of (2.1) is: At+1 = At −η(¯y −yt)AtztzT t At 1 + η(¯y −yt)zT t Atzt , (2.2) where zt = ut −vt and ¯y = dAt+1(ut, vt) = zT t At+1zt. The detailed derivation will appear in a longer version. It is not immediately clear that this update can be applied, since ¯y is a function of At+1. However, by multiplying the update in (2.2) on the left by zT t and on the right by zt and noting that ˆyt = zT t Atzt, we obtain the following: ¯y = ˆyt − η(¯y −yt)ˆy2 t 1 + η(¯y −yt)ˆyt , and so ¯y = ηytˆyt −1 + p (ηytˆyt −1)2 + 4ηˆy2 t 2ηˆyt . (2.3) We can solve directly for ¯y using this formula, and then plug this into the update (2.2). For the case when the input is a quadruple and the loss function is the squared hinge loss, we only perform the update (2.2) if the new constraint is violated. It is possible to show that the resulting matrix At+1 is positive definite; the proof appears in our longer version. The fact that this update maintains positive definiteness is a key advantage of our method over existing methods; POLA, for example, requires projection to the positive semidefinite cone via an eigendecomposition. The final loss bound in [4] depends on the regularization parameter ηt from each iteration and is in turn dependent on the sequence of constraints, an undesirable property for online algorithms. In contrast, by minimizing the function ft we designate above in (2.1), our algorithm’s updates automatically maintain positive definiteness. This means that the regularization parameter η need not be changed according to the current constraint, and the resulting bounds (Section 2.2) and empirical performance are notably stronger. 3 We refer to our algorithm as LogDet Exact Gradient Online (LEGO), and use this name throughout to distinguish it from POLA [13] (which uses a Frobenius regularization) and the Information Theoretic Metric Learning (ITML)-Online algorithm [4] (which uses an approximation to the gradient). 2.2 Analysis We now briefly analyze the regret bounds for our online metric learning algorithm. Due to space issues, we do not present the full proofs; please see the longer version for further details. To evaluate the online learner’s quality, we want to compare the loss of the online algorithm (which has access to one constraint at a time in sequence) to the loss of the best possible offline algorithm (which has access to all constraints at once). Let ˆdt = dA∗(ut, vt) be the learned distance between points ut and vt with a fixed positive definite matrix A∗, and let LA∗= P t ℓ( ˆdt, yt) be the loss suffered over all t time steps. Note that the loss LA∗is with respect to a single matrix A∗, whereas LA (Section 2.1) is with respect to a matrix that is being updated every time step. Let A∗be the optimal offline solution, i.e. it minimizes total loss incurred (LA∗). The goal is to demonstrate that the loss of the online algorithm LA is competitive with the loss of any offline algorithm. To that end, we now show that LA ≤c1LA∗+ c2, where c1 and c2 are constants. In the result below, we assume that the length of the data points is bounded: ∥u∥2 2 ≤R for all u. The following key lemma shows that we can bound the loss at each step of the algorithm: Lemma 2.1. At each step t, 1 2αt(ˆyt −yt)2 −1 2βt(dA∗(ut, vt) −yt)2 ≤Dld(A∗, At) −Dld(A∗, At+1), where 0 ≤αt ≤ η 1+η  R 2 + q R2 4 + 1 η 2 , βt = η, and A∗is the optimal offline solution. Proof. See longer version. Theorem 2.2. LA ≤  1 + η R 2 + s R2 4 + 1 η 2 LA∗+ 1 η + R 2 + s R2 4 + 1 η 2 Dld(A∗, A0), where LA = P t ℓ(ˆyt, yt) is the loss incurred by the series of matrices At generated by Equation (2.3), A0 ≻0 is the initial matrix, and A∗is the optimal offline solution. Proof. The bound is obtained by summing the loss at each step using Lemma 2.1: X t 1 2αt(ˆyt −yt)2 −1 2βt(dA∗(ut, vt) −yt)2  ≤ X t  Dld(A∗, At) −Dld(A∗, At+1)  . The result follows by plugging in the appropriate αt and βt, and observing that the right-hand side telescopes to Dld(A∗, A0) −Dld(A∗, At+1) ≤Dld(A∗, A0) since Dld(A∗, At+1) ≥0. For the squared hinge loss ℓ(ˆyt, yt, bt) = max(0, bt(ˆyt −yt))2, the corresponding algorithm has the same bound. The regularization parameter affects the tradeoff between LA∗and Dld(A∗, A0): as η gets larger, the coefficient of LA∗grows while the coefficient of Dld(A∗, A0) shrinks. In most scenarios, R is small; for example, in the case when R = 2 and η = 1, then the bound is LA ≤ (4 + √ 2)LA∗+ 2(4 + √ 2)Dld(A∗, A0). Furthermore, in the case when there exists an offline solution with zero error, i.e., LA∗= 0, then with a sufficiently large regularization parameter, we know that LA ≤2R2Dld(A∗, A0). This bound is analogous to the bound proven in Theorem 1 of the POLA method [13]. Note, however, that our bound is much more favorable to scaling of the optimal solution A∗, since the bound of POLA has a ∥A∗∥2 F term while our bound uses Dld(A∗, A0): if we scale the optimal solution by c, then the Dld(A∗, A0) term will scale by O(c), whereas ∥A∗∥2 F will scale by O(c2). Similarly, our bound is tighter than that provided by the ITML-Online algorithm since, in the ITML-Online algorithm, the regularization parameter ηt for step t is dependent on the input data. An adversary can always provide an input (ut, vt, yt) so that the regularization 4 parameter has to be decreased arbitrarily; that is, the need to maintain positive defininteness for each update can prevent ITML-Online from making progress towards an optimal metric. In summary, we have proven a regret bound for the proposed LEGO algorithm, an online metric learning algorithm based on LogDet regularization and gradient descent. Our algorithm automatically enforces positive definiteness every iteration and is simple to implement. The bound is comparable to POLA’s bound but is more favorable to scaling, and is stronger than ITML-Online’s bound. 3 Fast Online Similarity Searches In many applications, metric learning is used in conjunction with nearest-neighbor searching, and data structures to facilitate such searches are essential. For online metric learning to be practical for large-scale retrieval applications, we must be able to efficiently index the data as updates to the metric are performed. This poses a problem for most fast similarity searching algorithms, since each update to the online algorithm would require a costly update to their data structures. Our goal is to avoid expensive naive updates, where all database items are re-inserted into the search structure. We employ locality-sensitive hashing to enable fast queries; but rather than re-hash all database examples every time an online constraint alters the metric, we show how to incorporate a second level of hashing that determines which hash bits are changing during the metric learning updates. This allows us to avoid costly exhaustive updates to the hash keys, though occasional updating is required after substantial changes to the metric are accumulated. 3.1 Background: Locality-Sensitive Hashing Locality-sensitive hashing (LSH) [6, 1] produces a binary hash key H(u) = [h1(u)h2(u)...hb(u)] for every data point. Each individual bit hi(u) is obtained by applying the locality sensitive hash function hi to input u. To allow sub-linear time approximate similarity search for a similarity function ‘sim’, a locality-sensitive hash function must satisfy the following property: Pr[hi(u) = hi(v)] = sim(u, v), where ‘sim’ returns values between 0 and 1. This means that the more similar examples are, the more likely they are to collide in the hash table. A LSH function when ‘sim’ is the inner product was developed in [1], in which a hash bit is the sign of an input’s inner product with a random hyperplane. For Mahalanobis distances, the similarity function of interest is sim(u, v) = uTAv. The hash function in [1] was extended to accommodate a Mahalanobis similarity function in [9]: A can be decomposed as GT G, and the similarity function is then equivalently ˜uT ˜v, where ˜u = Gu and ˜v = Gv. Hence, a valid LSH function for uTAv is: hr,A(u) =  1, if rT Gu ≥0 0, otherwise, (3.1) where r is the normal to a random hyperplane. To perform sub-linear time nearest neighbor searches, a hash key is produced for all n data points in our database. Given a query, its hash key is formed and then, an appropriate data structure can be used to extract potential nearest neighbors (see [6, 1] for details). Typically, the methods search only O(n1/(1+ǫ)) of the data points, where ǫ > 0, to retrieve the (1 + ǫ)-nearest neighbors with high probability. 3.2 Online Hashing Updates The approach described thus far is not immediately amenable to online updates. We can imagine producing a series of LSH functions hr1,A, ..., hrb,A, and storing the corresponding hash keys for each data point in our database. However, the hash functions as given in (3.1) are dependent on the Mahalanobis distance; when we update our matrix At to At+1, the corresponding hash functions, parameterized by Gt, must also change. To update all hash keys in the database would require O(nd) time, which may be prohibitive. In the following we propose a more efficient approach. Recall the update for A: At+1 = At −η(¯y−yt)AtztzT t At 1+η(¯y−yt)ˆyt , which we will write as At+1 = At + βtAtztzT t At, where βt = −η(¯y −yt)/(1 + η(¯y −yt)ˆyt). Let GT t Gt = At. Then At+1 = GT t (I + βtGtztzT t GT t )Gt. The square-root of I + βtGtztzT t GT t is I + αtGtztzT t GT t , where αt = ( p 1 + βtzT t Atzt−1)/(zT t Atzt). As a result, Gt+1 = Gt+αtGtztzT t At. The corresponding update to (3.1) is to find the sign of rT Gt+1x = rT Gtu + αtrT GtztzT t Atu. (3.2) 5 Suppose that the hash functions have been updated in full at some time step t1 in the past. Now at time t, we want to determine which hash bits have flipped since t1, or more precisely, which examples’ product with some rT Gt has changed from positive to negative, or vice versa. This amounts to determining all bits such that sign(rT Gt1u) ̸= sign(rT Gtu), or equivalently, (rT Gt1u)(rT Gtu) ≤0. Expanding the update given in (3.2), we can write rT Gtu as rT Gt1u + Pt−1 ℓ=t1 αℓrT GℓzℓzT ℓAℓu. Therefore, finding the bits that have changed sign is equivalent to finding all u such that (rT Gt1u)2 + (rT Gt1u)  Pt−1 ℓ=t1 αℓrT GℓzℓzT ℓAℓu  ≤0. We can use a second level of locality-sensitive hashing to approximately find all such u. Define a vector ¯u = [(rT Gt1u)2; (rT Gt1u)u] and a “query” ¯q = [−1; −Pt−1 ℓ=t1 αℓrT AℓzℓzT ℓGℓ]. Then the bits that have changed sign can be approximately identified by finding all examples ¯u such that ¯qT ¯u ≥0. In other words, we look for all ¯u that have a large inner product with ¯q, which translates the problem to a similarity search problem. This may be solved approximately using the localitysensitive hashing scheme given in [1] for inner product similarity. Note that finding ¯u for each r can be computationally expensive, so we search ¯u for only a randomly selected subset of the vectors r. In summary, when performing online metric learning updates, instead of updating all the hash keys at every step (which costs O(nd)), we delay updating the hash keys and instead determine approximately which bits have changed in the stored entries in the hash table since the last update. When we have a nearest-neighbor query, we can quickly determine which bits have changed, and then use this information to find a query’s approximate nearest neighbors using the current metric. Once many of the bits have changed, we perform a full update to our hash functions. Finally, we note that the above can be extended to the case where computations are done in kernel space. We omit details due to lack of space. 4 Experimental Results In this section we evaluate the proposed algorithm (LEGO) over a variety of data sets, and examine both its online metric learning accuracy as well as the quality of its online similarity search updates. As baselines, we consider the most relevant techniques from the literature: the online metric learners POLA [13] and ITML-Online [4]. We also evaluate a baseline offline metric learner associated with our method. For all metric learners, we gauge improvements relative to the original (non-learned) Euclidean distance, and our classification error is measured with the k-nearest neighbor algorithm. First we consider the same collection of UCI data sets used in [4]. For each data set, we provide the online algorithms with 10,000 randomly-selected constraints, and generate their target distances as in [4]—for same-class pairs, the target distance is set to be equal to the 5th percentile of all distances in the data, while for different-class pairs, the 95th percentile is used. To tune the regularization parameter η for POLA and LEGO, we apply a pre-training phase using 1,000 constraints. (This is not required for ITML-Online, which automatically sets the regularization parameter at each iteration to guarantee positive definiteness). The final metric (AT ) obtained by each online algorithm is used for testing (T is the total number of time-steps). The left plot of Figure 1 shows the k-nn error rates for all five data sets. LEGO outperforms the Euclidean baseline as well as the other online learners, and even approaches the accuracy of the offline method (see [4] for additional comparable offline learning results using [7, 15]). LEGO and ITML-Online have comparable running times. However, our approach has a significant speed advantage over POLA on these data sets: on average, learning with LEGO is 16.6 times faster, most likely due to the extra projection step required by POLA. Next we evaluate our approach on a handwritten digit classification task, reproducing the experiment used to test POLA in [13]. We use the same settings given in that paper. Using the MNIST data set, we pose a binary classification problem between each pair of digits (45 problems in all). The training and test sets consist of 10,000 examples each. For each problem, 1,000 constraints are chosen and the final metric obtained is used for testing. The center plot of Figure 1 compares the test error between POLA and LEGO. Note that LEGO beats or matches POLA’s test error in 33/45 (73.33%) of the classification problems. Based on the additional baselines provided in [13], this indicates that our approach also fares well compared to other offline metric learners on this data set. We next consider a set of image patches from the Photo Tourism project [14], where user photos from Flickr are used to generate 3-d reconstructions of various tourist landmarks. Forming the reconstructions requires solving for the correspondence between local patches from multiple images of the same scene. We use the publicly available data set that contains about 300,000 total patches 6 Wine Iris Bal−Scale Ionosphere Soybean 0 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 0.45 k−NN Error UCI data sets (order of bars = order of legend) ITML Offline LEGO ITML Online POLA Baseline Euclidean 0 0.005 0.01 0.015 0.02 0.025 0.03 0.035 0.04 0 0.005 0.01 0.015 0.02 0.025 0.03 0.035 0.04 LEGO Error POLA Error MNIST data set 0 0.05 0.1 0.15 0.2 0.25 0.3 0.6 0.65 0.7 0.75 0.8 0.85 0.9 0.95 1 False Positives True Positives PhotoTourism Dataset LEGO ITML Offline POLA ITML Online Baseline Euclidean Figure 1: Comparison with existing online metric learning methods. Left: On the UCI data sets, our method (LEGO) outperforms both the Euclidean distance baseline as well as existing metric learning methods, and even approaches the accuracy of the offline algorithm. Center: Comparison of errors for LEGO and POLA on 45 binary classification problems using the MNIST data; LEGO matches or outperforms POLA on 33 of the 45 total problems. Right: On the Photo Tourism data, our online algorithm significantly outperforms the L2 baseline and ITML-Online, does well relative to POLA, and nearly matches the accuracy of the offline method. from images of three landmarks1. Each patch has a dimensionality of 4096, so for efficiency we apply all algorithms in kernel space, and use a linear kernel. The goal is to learn a metric that measures the distance between image patches better than L2, so that patches of the same 3-d scene point will be matched together, and (ideally) others will not. Since the database is large, we can also use it to demonstrate our online hash table updates. Following [8], we add random jitter (scaling, rotations, shifts) to all patches, and generate 50,000 patch constraints (50% matching and 50% nonmatching patches) from a mix of the Trevi and Halfdome images. We test with 100,000 patch pairs from the Notre Dame portion of the data set, and measure accuracy with precision and recall. The right plot of Figure 1 shows that LEGO and POLA are able to learn a distance function that significantly outperforms the baseline squared Euclidean distance. However, LEGO is more accurate than POLA, and again nearly matches the performance of the offline metric learning algorithm. On the other hand, the ITML-Online algorithm does not improve beyond the baseline. We attribute the poor accuracy of ITML-Online to its need to continually adjust the regularization parameter to maintain positive definiteness; in practice, this often leads to significant drops in the regularization parameter, which prevents the method from improving over the Euclidean baseline. In terms of training time, on this data LEGO is 1.42 times faster than POLA (on average over 10 runs). Finally, we present results using our online metric learning algorithm together with our online hash table updates described in Section 3.2 for the Photo Tourism data. For our first experiment, we provide each method with 50,000 patch constraints, and then search for nearest neighbors for 10,000 test points sampled from the Notre Dame images. Figure 2 (left plot) shows the recall as a function of the number of patches retrieved for four variations: LEGO with a linear scan, LEGO with our LSH updates, the L2 baseline with a linear scan, and L2 with our LSH updates. The results show that the accuracy achieved by our LEGO+LSH algorithm is comparable to the LEGO+linear scan (and similarly, L2+LSH is comparable to L2+linear scan), thus validating the effectiveness of our online hashing scheme. Moreover, LEGO+LSH needs to search only 10% of the database, which translates to an approximate speedup factor of 4.7 over the linear scan for this data set. Next we show that LEGO+LSH performs accurate and efficient retrievals in the case where constraints and queries are interleaved in any order. Such a scenario is useful in many applications: for example, an image retrieval system such as Flickr continually acquires new image tags from users (which could be mapped to similarity constraints), but must also continually support intermittent user queries. For the Photo Tourism setting, it would be useful in practice to allow new constraints indicating true-match patch pairs to stream in while users continually add photos that should participate in new 3-d reconstructions with the improved match distance functions. To experiment with this scenario, we randomly mix online additions of 50,000 constraints with 10,000 queries, and measure performance by the recall value for 300 retrieved nearest neighbor examples. We recompute the hash-bits for all database examples if we detect changes in more than 10% of the database examples. Figure 2 (right plot) compares the average recall value for various methods after each query. As expected, as more constraints are provided, the LEGO-based accuracies all improve (in contrast to the static L2 baseline, as seen by the straight line in the plot). Our method achieves similar accuracy to both the linear scan method (LEGO Linear) as well as the naive LSH method where the hash table is fully recomputed after every constraint update (LEGO Naive LSH). The curves stack up 1http://phototour.cs.washington.edu/patches/default.htm 7 100 200 300 400 500 600 700 800 900 1000 0.62 0.64 0.66 0.68 0.7 0.72 0.74 0.76 0.78 0.8 Number of nearest neighbors (N) Recall L2 Linear Scan L2 LSH LEGO Linear Scan LEGO LSH 0 2000 4000 6000 8000 10000 0.62 0.64 0.66 0.68 0.7 0.72 0.74 Number of queries Average Recall LEGO LSH LEGO Linear Scan LEGO Naive LSH L2 Linear Scan Figure 2: Results with online hashing updates. The left plot shows the recall value for increasing numbers of nearest neighbors retrieved. ‘LEGO LSH’ denotes LEGO metric learning in conjunction with online searches using our LSH updates, ‘LEGO Linear’ denotes LEGO learning with linear scan searches. L2 denotes the baseline Euclidean distance. The right plot shows the average recall values for all methods at different time instances as more queries are made and more constraints are added. Our online similarity search updates make it possible to efficiently interleave online learning and querying. See text for details. appropriately given the levels of approximation: LEGO Linear yields the upper bound in terms of accuracy, LEGO Naive LSH with its exhaustive updates is slightly behind that, followed by our LEGO LSH with its partial and dynamic updates. In reward for this minor accuracy loss, however, our method provides a speedup factor of 3.8 over the naive LSH update scheme. (In this case the naive LSH scheme is actually slower than a linear scan, as updating the hash tables after every update incurs a large overhead cost.) For larger data sets, we can expect even larger speed improvements. Conclusions: We have developed an online metric learning algorithm together with a method to perform online updates to fast similarity search structures, and have demonstrated their applicability and advantages on a variety of data sets. We have proven regret bounds for our online learner that offer improved reliability over state-of-the-art methods in terms of regret bounds, and empirical performance. A disadvantage of our algorithm is that the LSH parameters, e.g. ǫ and the number of hash-bits, need to be selected manually, and may depend on the final application. For future work, we hope to tune the LSH parameters automatically using a deeper theoretical analysis of our hash key updates in conjunction with the relevant statistics of the online similarity search task at hand. Acknowledgments: This research was supported in part by NSF grant CCF-0431257, NSFITR award IIS-0325116, NSF grant IIS-0713142, NSF CAREER award 0747356, Microsoft Research, and the Henry Luce Foundation. References [1] M. Charikar. Similarity Estimation Techniques from Rounding Algorithms. In STOC, 2002. [2] L. Cheng, S. V. N. Vishwanathan, D. Schuurmans, S. Wang, and T. Caelli. Implicit Online Learning with Kernels. In NIPS, 2006. [3] M. Datar, N. Immorlica, P. Indyk, and V. Mirrokni. Locality-Sensitive Hashing Scheme Based on p-Stable Distributions. In SOCG, 2004. [4] J. Davis, B. Kulis, P. Jain, S. Sra, and I. Dhillon. Information-Theoretic Metric Learning. In ICML, 2007. [5] A. Frome, Y. Singer, and J. Malik. Image retrieval and classification using local distance functions. In NIPS, 2007. [6] A. Gionis, P. Indyk, and R. Motwani. Similarity Search in High Dimensions via Hashing. In VLDB, 1999. [7] A. Globerson and S. Roweis. Metric Learning by Collapsing Classes. In NIPS, 2005. [8] G. Hua, M. Brown, and S. Winder. Discriminant embedding for local image descriptors. In ICCV, 2007. [9] P. Jain, B. Kulis, and K. Grauman. Fast Image Search for Learned Metrics. In CVPR, 2008. [10] J. Kivinen and M. K. Warmuth. Exponentiated Gradient Versus Gradient Descent for Linear Predictors. Inf. Comput., 132(1):1–63, 1997. [11] M. Schultz and T. Joachims. Learning a Distance Metric from Relative Comparisons. In NIPS, 2003. [12] S. Shalev-Shwartz and Y. Singer. Online Learning meets Optimization in the Dual. In COLT, 2006. [13] S. Shalev-Shwartz, Y. Singer, and A. Ng. Online and Batch Learning of Pseudo-metrics. In ICML, 2004. [14] N. Snavely, S. Seitz, and R. Szeliski. Photo Tourism: Exploring Photo Collections in 3D. In SIGGRAPH Conference Proceedings, pages 835–846, New York, NY, USA, 2006. ACM Press. ISBN 1-59593-364-6. [15] K. Weinberger, J. Blitzer, and L. Saul. Distance Metric Learning for Large Margin Nearest Neighbor Classification. In NIPS, 2006. [16] E. Xing, A. Ng, M. Jordan, and S. Russell. Distance Metric Learning, with Application to Clustering with Side-Information. In NIPS, 2002. 8
2008
169
3,419
Modeling human function learning with Gaussian processes Thomas L. Griffiths Christopher G. Lucas Joseph J. Williams Department of Psychology University of California, Berkeley Berkeley, CA 94720-1650 {tom griffiths,clucas,joseph williams}@berkeley.edu Michael L. Kalish Institute of Cognitive Science University of Louisiana at Lafayette Lafayette, LA 70504-3772 kalish@lousiana.edu Abstract Accounts of how people learn functional relationships between continuous variables have tended to focus on two possibilities: that people are estimating explicit functions, or that they are performing associative learning supported by similarity. We provide a rational analysis of function learning, drawing on work on regression in machine learning and statistics. Using the equivalence of Bayesian linear regression and Gaussian processes, we show that learning explicit rules and using similarity can be seen as two views of one solution to this problem. We use this insight to define a Gaussian process model of human function learning that combines the strengths of both approaches. 1 Introduction Much research on how people acquire knowledge focuses on discrete structures, such as the nature of categories or the existence of causal relationships. However, our knowledge of the world also includes relationships between continuous variables, such as the difference between linear and exponential growth, or the form of causal relationships, such as how pressing the accelerator of a car influences its velocity. Research on how people learn relationships between two continuous variables – known in the psychological literature as function learning – has tended to emphasize two different ways in which people could be solving this problem. One class of theories (e.g., [1, 2, 3]) suggests that people are learning an explicit function from a given class, such as the polynomials of degree k. This approach attributes rich representations to human learners, but has traditionally given limited treatment to the question of how such representations could be acquired. A second approach (e.g., [4, 5]) emphasizes the possibility that people learn by forming associations between observed values of input and output variables, and generalize based on the similarity of new inputs to old. This approach has a clear account of the underlying learning mechanisms, but faces challenges in explaining how people generalize so broadly beyond their experience, making predictions about variable values that are significantly removed from their previous observations. Most recently, hybrids of these two approaches have been proposed (e.g., [6, 7]), with explicit functions being represented, but associative learning. Previous models of human function learning have been oriented towards understanding the psychological processes by which people solve this problem. In this paper, we take a different approach, 1 presenting a rational analysis of function learning, in the spirit of [8]. This rational analysis provides a way to understand the relationship between the two approaches that have dominated previous work – rules and similarity – and suggests how they might be combined. The basic strategy we pursue is to consider the abstract computational problem involved in function learning, and then to explore optimal solutions to that problem with the goal of shedding light on human behavior. In particular, the problem of learning a functional relationship between two continuous variables is an instance of regression, and has been extensively studied in machine learning and statistics. There are a variety of solution to regression problems, but we focus on methods related to Bayesian linear regression (e.g., [9]), which allow us to make the expectations of learners about the form of functions explicit through a prior distribution. Bayesian linear regression is also directly related to a nonparametric approach known as Gaussian process prediction (e.g., [10]), in which predictions about the values of an output variable are based on the similarity between values of an input variable. We use this relationship to connect the two traditional approaches to modeling function learning, as it shows that learning rules that describe functions and specifying the similarity between stimuli for use in associative learning are not mutually exclusive alternatives, but rather two views of the same solution to this problem. We exploit this fact to define a rational model of human function learning that incorporates the strengths of both approaches. 2 Models of human function learning In this section we review the two traditional approaches to modeling human function learning – rules and similarity – and some more recent hybrid approaches that combine the two. 2.1 Representing functions with rules The idea that people might represent functions explicitly appears in one of the first papers on human function learning [1]. This paper proposed that people assume a particular class of functions (such as polynomials of degree k) and use the available observations to estimate the parameters of those functions, forming a representation that goes beyond the observed values of the variables involved. Consistent with this hypothesis, people learned linear and quadratic functions better than random pairings of values for two variables, and extrapolated appropriately. Similar assumptions guided subsequent work exploring the ease with which people learn functions from different classes (e.g., [2], and papers have tested statistical regression schemes as potential models of learning, examining how well human responses were described by different forms of nonlinear regression (e.g., [3]). 2.2 Similarity and associative learning Associative learning models propose that people do not learn relationships between continuous variables by explicitly learning rules, but by forging associations between observed variable pairs and generalizing based on the similarity of new variable values to old. The first model to implement this approach was the Associative-Learning Model (ALM; [4, 5]), in which input and output arrays are used to represent a range of values for the two variables between which the functional relationship holds. Presentation of an input activates input nodes close to that value, with activation falling off as a Gaussian function of distance, explicitly implementing a theory of similarity in the input space. Learned weights determine the activation of the output nodes, being a weighted linear function of the activation of the input nodes. Associative learning for the weights is performed by applying gradient descent on the squared error between current output activation and the correct value. In practice, this approach performs well when interpolating between observed values, but poorly when extrapolating beyond those values. As a consequence, the same authors introduced the Extrapolation-Association Model (EXAM), which constructs a linear approximation to the output of the ALM when selecting responses, producing a bias towards linearity that better matches human judgments. 2.3 Hybrid approaches Several papers have explored methods for combining rule-like representations of functions with associative learning. One example of such an approach is the set of rule-based models explored in [6]. These models used the same kind of input representation as ALM and EXAM, with activation 2 of a set of nodes similar to the input value. However, the models also feature a set of hidden units, where each hidden unit corresponds to a different parameterization of a rule from a given class (polynomial, Fourier, or logistic). The values of the hidden nodes – corresponding to the values of the rules they instantiate – are combined linearly to obtain output predictions, with the weight of each hidden node being learned through gradient descent (with a penalty for the curvature of the functions involved). A more complex instance of this kind of approach is the Population of Linear Experts (POLE) model [7], in which hidden units each represent different linear functions, but the weights from input to hidden nodes indicate which linear function should be used to make predictions for particular input values. As a consequence, the model can learn non-linear functions by identifying a series of local linear approximations, and can even model situations in which people seem to learn different functions in different parts of the input space. 3 Rational solutions to regression problems The models outlined in the previous section all aim to describe the psychological processes involved in human function learning. In this section, we consider the abstract computational problem underlying this task, using optimal solutions to this problem to shed light on both previous models and human learning. Viewed abstractly, the computational problem behind function learning is to learn a function f mapping from x to y from a set of real-valued observations xn = (x1, . . . , xn) and tn = (t1, . . . , tn), where ti is assumed to be the true value yi = f(xi) obscured by additive noise.1 In machine learning and statistics, this is referred to as a regression problem. In this section, we discuss how this problem can be solved using Bayesian statistics, and how the result of this approach is related to Gaussian processes. Our presentation follows that in [10]. 3.1 Bayesian linear regression Ideally, we would seek to solve our regression problem by combining some prior beliefs about the probability of encountering different kinds of functions in the world with the information provided by x and t. We can do this by applying Bayes’ rule, with p(f|xn, tn) = p(tn|f, xn)p(f) R F p(tn|f, xn)p(f) df , (1) where p(f) is the prior distribution over functions in the hypothesis space F, p(tn|f, xn) is the probability of observing the values of tn if f were the true function, known as the likelihood, and p(f|xn, tn) is the posterior distribution over functions given the observations xn and tn. In many cases, the likelihood is defined by assuming that the values of ti are independent given f and xi, being Gaussian with mean yi = f(xi) and variance σ2 t . Predictions about the value of the function f for a new input xn+1 can be made by integrating over the posterior distribution, p(yn+1|xn+1, tn, xn) = Z f p(yn+1|f, xn+1)p(f|xn, tn) df, (2) where p(yn+1|f, xn+1) is a delta function placing all of its mass on yn+1 = f(xn+1). Performing the calculations outlined in the previous paragraph for a general hypothesis space F is challenging, but becomes straightforward if we limit the hypothesis space to certain specific classes of functions. If we take F to be all linear functions of the form y = b0 +xb1, then our problem takes the familiar form of linear regression. To perform Bayesian linear regression, we need to define a prior p(f) over all linear functions. Since these functions are identified by the parameters b0 and b1, it is sufficient to define a prior over b = (b0, b1), which we can do by assuming that b follows a multivariate Gaussian distribution with mean zero and covariance Σb. Applying Equation 1 then results in a multivariate Gaussian posterior distribution on b (see [9]) with E[b|xn, tn] = σ2 t Σ−1 b + XT nXn −1 XT ntn (3) cov[b|xn, yn] =  Σ−1 b + 1 σ2 t XT nXn −1 (4) 1Following much of the literature on human function learning, we consider only one-dimensional functions, but this approach generalizes naturally to the multi-dimensional case. 3 where Xn = [1n xn] (ie. a matrix with a vector of ones horizontally concatenated with xn+1) Since yn+1 is simply a linear function of b, applying Equation 2 yields a Gaussian predictive distribution, with yn+1 having mean [1 xn+1]E[b|xn, tn] and variance [1 xn+1]cov[b|xn, tn][1 xn+1]T . The predictive distribution for tn+1 is similar, but with the addition of σ2 t to the variance. While considering only linear functions might seem overly restrictive, linear regression actually gives us the basic tools we need to solve this problem for more general classes of functions. Many classes of functions can be described as linear combinations of a small set of basis functions. For example, all kth degree polynomials are linear combinations of functions of the form 1 (the constant function), x, x2, ..., xk. Letting φ(1), . . . , φ(k) denote a set of functions, we can define a prior on the class of functions that are linear combinations of this basis by expressing such functions in the form f(x) = b0 + φ(1)(x)b1 + . . . + φ(k)(x)bk and defining a prior on the vector of weights b. If we take the prior to be Gaussian, we reach the same solution as outlined in the previous paragraph, substituting Φ = [1n φ(1)(xn) . . . φ(k)(xn)] for X and [1 φ(1)(xn+1) . . . φ(k)(xn+1)] for [1 xn+1], where φ(xn) = [φ(x1) . . . φ(xn)]T . 3.2 Gaussian processes If our goal were merely to predict yn+1 from xn+1, yn, and xn, we might consider a different approach, simply defining a joint distribution on yn+1 given xn+1 and conditioning on yn. For example, we might take the yn+1 to be jointly Gaussian, with covariance matrix Kn+1 =  Kn kn,n+1 kT n,n+1 kn+1  (5) where Kn depends on the values of xn, kn,n+1 depends on xn and xn+1, and kn+1 depends only on xn+1. If we condition on yn, the distribution of yn+1 is Gaussian with mean kT n,n+1K−1 n y and variance kn+1 −kT n,n+1K−1 n kn,n+1. This approach to prediction uses a Gaussian process, a stochastic process that induces a Gaussian distribution on y based on the values of x. This approach can also be extended to allow us to predict yn+1 from xn+1, tn, and xn by adding σ2 t In to Kn, where In is the n × n identity matrix, to take into account the additional variance associated with tn. The covariance matrix Kn+1 is specified using a two-place function in x known as a kernel, with Kij = K(xi, xj). Any kernel that results in an appropriate (symmetric, positive-definite) covariance matrix for all x can be used. Common kinds of kernels include radial basis functions, e.g., K(xi, xj) = θ2 1 exp(−1 θ2 2 (xi −xj)2) (6) with values of y for which values of x are close being correlated, and periodic functions, e.g., K(xi, xj) = θ2 3 exp(θ2 4(cos(2π θ5 [xi −xj]))) (7) indicating that values of y for which values of x are close relative to the period θ3 are likely to be highly correlated. Gaussian processes thus provide a flexible approach to prediction, with the kernel defining which values of x are likely to have similar values of y. 3.3 Two views of regression Bayesian linear regression and Gaussian processes appear to be quite different approaches. In Bayesian linear regression, a hypothesis space of functions is identified, a prior on that space is defined, and predictions are formed averaging over the posterior, while Gaussian processes simply use the similarity between different values of x, as expressed through a kernel, to predict correlations in values of y. It might thus come as a surprise that these approaches are equivalent. Showing that Bayesian linear regression corresponds to Gaussian process prediction is straightforward. The assumption of linearity means that the vector yn+1 is equal to Xn+1b. It follows that p(yn+1|xn+1) is a multivariate Gaussian distribution with mean zero and covariance matrix Xn+1ΣbXT n+1. Bayesian linear regression thus corresponds to prediction using Gaussian processes, with this covariance matrix playing the role of Kn+1 above (ie. using the kernel function K(xi, xj) = [1 xi][1 xj]T ). Using a richer set of basis functions corresponds to taking Kn+1 = Φn+1ΣbΦT n+1 (ie. K(xi, xj) = [1 φ(1)(xi) . . . φ(k)(xi)][1 φ(1)(xi) . . . φ(k)(xi)]T ). 4 It is also possible to show that Gaussian process prediction can always be interpreted as Bayesian linear regression, albeit with potentially infinitely many basis functions. Just as we can express a covariance matrix in terms of its eigenvectors and eigenvalues, we can express a given kernel K(xi, xj) in terms of its eigenfunctions φ and eigenvalues λ, with K(xi, xj) = ∞ X k=1 λkφ(k)(xi)φ(k)(xj) (8) for any xi and xj. Using the results from the previous paragraph, any kernel can be viewed as the result of performing Bayesian linear regression with a set of basis functions corresponding to its eigenfunctions, and a prior with covariance matrix Σb = diag(λ). These results establish an important duality between Bayesian linear regression and Gaussian processes: for every prior on functions, there exists a corresponding kernel, and for every kernel, there exists a corresponding prior on functions. Bayesian linear regression and prediction with Gaussian processes are thus just two views of the same solution to regression problems. 4 Combining rules and similarity through Gaussian processes The results outlined in the previous section suggest that learning rules and generalizing based on similarity should not be viewed as conflicting accounts of human function learning. In this section, we briefly highlight how previous accounts of function learning connect to statistical models, and then use this insight to define a model that combines the strengths of both approaches. 4.1 Reinterpreting previous accounts of human function learning The models presented above were chosen because the contrast between rules and similarity in function learning is analogous to the difference between Bayesian linear regression and Gaussian processes. The idea that human function learning can be viewed as a kind of statistical regression [1, 3] clearly connects directly to Bayesian linear regression. While there is no direct formal correspondence, the basic ideas behind Gaussian process regression with a radial basis kernel and similarity-based models such as ALM are closely related. In particular, ALM has many commonalities with radial-basis function neural networks, which are directly related to Gaussian processes [11]. Gaussian processes with radial-basis kernels can thus be viewed as implementing a simple kind of similarity-based generalization, predicting similar y values for stimuli with similar x values. Finally, the hybrid approach to rule learning taken in [6] is also closely related to Bayesian linear regression. The rules represented by the hidden units serve as a basis set that specify a class of functions, and applying penalized gradient descent on the weights assigned to those basis elements serves as an online algorithm for finding the function with highest posterior probability [12]. 4.2 Mixing functions in a Gaussian process model The relationship between Gaussian processes and Bayesian linear regression suggests that we can define a single model that exploits both similarity and rules in forming predictions. In particular, we can do this by taking a prior that covers a broad class of functions – including those consistent with a radial basis kernel – or, equivalently, modeling y as being produced by a Gaussian process with a kernel corresponding to one of a small number of types. Specifically, we assume that observations are generated by choosing a type of function from the set {Positive Linear, Negative Linear, Quadratic, Nonlinear}, where the probabilities of these alternatives are defined by the vector π, and then sampling y from a Gaussian process with a kernel corresponding to the appropriate class of functions. The relevant kernels are introduced in the previous sections (taking “Nonlinear” to correspond to the radial basis kernel), with the “Positive Linear” and “Negative Linear” kernels being derived in a similar way to the standard linear kernel but with the mean of the prior on b being [0 1] and [1 −1] rather than simply zero. Using this Gaussian process model allows a learner to make an inference about the type of function from which their observations are drawn, as well as the properties of the function of that type. In practice, we perform probabilistic inference using a Markov chain Monte Carlo (MCMC) algorithm (see [13] for an introduction). This algorithm defines a Markov chain for which the stationary 5 distribution is the distribution from which we wish to sample. In our case, this is the posterior distribution over types and the hyperparameters for the kernels θ given the observations x and t. The hyperparameters include θ1 and θ2 defined above and the noise in the observations σ2 t . Our MCMC algorithm repeats two steps. The first step is sampling the type of function conditioned on x, t, and the current value of θ, with the probability of each type being proportional to the product of p(tn|xn) for the corresponding Gaussian process and the prior probability of that type as given by π. The second step is sampling the value of θ given xn, tn, and the current type, which is done using a Metropolis-Hastings procedure (see [13]), proposing a value for θ from a Gaussian distribution centered on the current value and deciding whether to accept that value based on the product of the probability it assigns to tn given xn and the prior p(θ). We use an uninformative prior on θ. 5 Testing the Gaussian process model Following a recent review of computational models of function learning [6], we look at two quantitative tests of Gaussian processes as an account of human function learning: reproducing the order of difficulty of learning functions of different types, and extrapolation performance. As indicated earlier, there is a large literature consisting of both models and data concerning human function learning, and these simulations are intended to demonstrate the potential of the Gaussian process model rather than to provide an exhaustive test of its performance. 5.1 Difficulty of learning A necessary criterion for a theory of human function learning is accounting for which functions people learn readily and which they find difficult – the relative difficulty of learning various functions. Table 1 is an augmented version of results presented in [6] which compared several models to the empirically observed difficulty of learning a range of functions. Each entry in the table is the mean absolute deviation (MAD) of human or model responses from the actual value of the function, evaluated over the stimuli presented in training. The MAD provides a measure of how difficult it is for people or a given model to learn a function. The data reported for each set of studies are ordered by increasing MAD (corresponding to increasing difficulty). In addition to reproducing the MAD for the models in [6], the table includes results for seven Gaussian process (GP) models. The seven GP models incorporated different kernel functions by adjusting their prior probability. Drawing on the {Positive Linear, Negative Linear, Quadratic, Nonlinear} set of kernel functions, the most comprehensive model took π = (0.5, 0.4, 0.09, 0.01).2 Six other GP models were examined by assigning certain kernel functions zero prior probability and re-normalizing the modified value of π so that the prior probabilities summed to one. The seven distinct GP models are presented in Table 1 and labeled by the kernel functions with non-zero prior probability: Linear (Positive Linear and Negative Linear), Quadratic, Nonlinear (Radial Basis Function), Linear and Quadratic, Linear and Nonlinear, Quadratic and Nonlinear, and Linear, Quadratic, and Nonlinear. The last two rows of Table 1 give the correlations between human and model performance across functions, expressing quantitatively how well each model captured the pattern of human function learning behavior. The GP models perform well according to this metric, providing a closer match to the human data than any of the models considered in [6], with the quadratic kernel and the models with a mixture of kernels tending to provide a closer match to human behavior. 5.2 Extrapolation performance Predicting and explaining people’s capacity for generalization – from stimulus-response pairs to judgments about a functional relationship between variables – is the second key component of our account. This capacity is assessed in the way in which people extrapolate, making judgments about stimuli they have not encountered before. Figure 1 shows mean human predictions for a linear, exponential, and quadratic function (from [4]), together with the predictions of the most comprehensive GP model (with Linear, Quadratic and Nonlinear kernel functions). The regions to the left and right of the vertical lines represent extrapolation regions, being input values for which neither people nor 2The selection of these values was guided by results indicating the order of difficulty of learning functions of these different types for human learners, but we did not optimize π with respect to the criteria reported here. 6 Hybrid models Gaussian process models Function Human ALM Poly Fourier Logistic Linear Quad RBF LQ LR QR LQR Byun (1995, Expt 1B) Linear .20 .04 .04 .05 .16 .0002 .004 .06 .0002 .0002 .001 .0001 Square root .35 .05 .06 .06 .19 .06 .02 .05 .02 .03 .02 .02 Byun (1995, Expt 1A) Linear .15 .10 .33 .33 .17 .0003 .004 .04 .0002 .0002 .0009 .0001 Power, pos. acc. .20 .12 .37 .37 .24 .11 .004 .08 .004 .05 .003 .003 Power, neg. acc. .23 .12 .36 .36 .19 .06 .02 .05 .02 .03 .02 .02 Logarithmic .30 .14 .41 .41 .19 .10 .04 .07 .04 .05 .03 .03 Logistic .39 .18 .51 .52 .33 .20 .20 .22 .20 .18 .18 .18 Byun (1995, Expt 2) Linear .18 .01 .18 .19 .12 .0003 .005 .05 .0003 .0002 .001 .0002 Quadratic .28 .03 .31 .31 .24 .20 .09 .14 .09 .12 .04 .04 Cyclic .68 .32 .41 .40 .68 .50 .50 .50 .50 .49 .49 .49 Delosh, Busemeyer, & McDaniel (1997) Linear .10 .04 .11 .11 .04 .0005 .005 .03 .0005 .0003 .002 .0004 Exponential .15 .05 .17 .17 .02 .03 .01 .02 .01 .02 .009 .01 Quadratic .24 .07 .27 .27 .11 .1 .06 .07 .06 .06 .04 .04 Correlation of human and model performance Linear 1.0 .83 .45 .45 .93 .93 .92 .92 .93 .93 .92 .92 Rank-order 1.0 .55 .51 .51 .77 .76 .80 .75 .83 .83 .82 .83 Table 1: Difficulty of learning results. Rows correspond to functions learned in experiments reviewed in [6]. Columns give the mean absolute deviation (MAD) from the true functions for human learners and different models (Gaussian process models with multiple kernels are denoted by the initials of their kernels, e.g., LQR = Linear, Quadratic, and Radial Basis Function). Human MAD values represent sample means (for a single subject over trials, then over subjects), and reflect both estimation and production errors, being higher than model MAD values which are computed using deterministic model predictions and thus reflect only estimation error. The last two rows give the linear and rank-order correlations of the human and model MAD values, providing an indication of how well the model matches the difficulty people have in learning different functions. Linear (a) Quadratic Function Human / Model Exponential (b) (c) Model Linear Exponential Quadratic EXAM .999 .997 .961 Linear .999 .989 .470 Quad .997 .997 .901 RBF .999 .997 .882 LQ .999 .997 .886 LR .999 .997 .892 RQ .998 .994 .878 LRQ .999 .995 .877 Figure 1: Extrapolation performance. (a)-(b) Mean predictions on linear, exponential, and quadratic functions for (a) human participants (from [4]) and (b) a Gaussian process model with Linear, Quadratic, and Nonlinear kernels. Training data were presented in the region between the vertical lines, and extrapolation performance was evaluated outside this region. (c) Correlations between human and model extrapolation. Gaussian process models are denoted as in Table 1. 7 the model were trained. Both people and the model extrapolate near optimally on the linear function, and reasonably accurate extrapolation also occurs for the exponential and quadratic function. However, there is a bias towards a linear slope in the extrapolation of the exponential and quadratic functions, with extreme values of the quadratic and exponential function being overestimated. Quantitative measures of extrapolation performance are shown in Figure 1 (c), which gives the correlation between human and model predictions for EXAM [4, 5] and the seven GP models. While none of the GP models produce quite as high a correlation as EXAM on all three functions, all of the models except that with just the linear kernel produce respectable correlations. It is particularly notable that this performance is achieved without the optimization of any free parameters, while the predictions of EXAM were the result of optimizing two parameters for each of the three functions. 6 Conclusions We have presented a rational account of human function learning, drawing on ideas from machine learning and statistics to show that the two approaches that have dominated previous work – rules and similarity – can be interpreted as two views of the same kind of optimal solution to this problem. Our Gaussian process model combines the strengths of both approaches, using a mixture of kernels to allow systematic extrapolation as well as sensitive non-linear interpolation. Tests of the performance of this model on benchmark datasets show that it can capture some of the basic phenomena of human function learning, and is competitive with existing process models. In future work, we aim to extend this Gaussian process model to allow it to produce some of the more complex phenomena of human function learning, such as non-monotonic extrapolation (via periodic kernels) and learning different functions in different parts of the input space (via mixture modeling). Acknowledgments. This work was supported by grant FA9550-07-1-0351 from the Air Force Office of Scientific Research and grants 0704034 and 0544705 from the National Science Foundation. References [1] J. D. Carroll. Functional learning: The learning of continuous functional mappings relating stimulus and response continua. Education Testing Service, Princeton, NJ, 1963. [2] B. Brehmer. Hypotheses about relations between scaled variables in the learning of probabilistic inference tasks. Organizational Behavior and Human Decision Processes, 11:1–27, 1974. [3] K. Koh and D. E. Meyer. Function learning: Induction of continuous stimulus-response relations. Journal of Experimental Psychology: Learning, Memory, and Cognition, 17:811–836, 1991. [4] E. L. DeLosh, J. R. Busemeyer, and M. A. McDaniel. Extrapolation: The sine qua non of abstraction in function learning. Journal of Experimental Psychology: Learning, Memory, and Cognition, 23:968–986, 1997. [5] J. R. Busemeyer, E. Byun, E. L. DeLosh, and M. A. McDaniel. Learning functional relations based on experience with input-output pairs by humans and artificial neural networks. In K. Lamberts and D. Shanks, editors, Concepts and Categories, pages 405–437. MIT Press, Cambridge, 1997. [6] M. A. McDaniel and J. R. Busemeyer. The conceptual basis of function learning and extrapolation: Comparison of rule-based and associative-based models. Psychonomic Bulletin and Review, 12:24–42, 2005. [7] M. Kalish, S. Lewandowsky, and J. Kruschke. Population of linear experts: Knowledge partitioning and function learning. Psychological Review, 111:1072–1099, 2004. [8] J. R. Anderson. The adaptive character of thought. Erlbaum, Hillsdale, NJ, 1990. [9] J. M. Bernardo and A. F. M. Smith. Bayesian theory. Wiley, New York, 1994. [10] C. K. I. Williams. Prediction with Gaussian processes: From linear regression to linear prediction and beyond. In M. I. Jordan, editor, Learning in Graphical Models, pages 599–621. MIT Press, Cambridge, MA, 1998. [11] R. M. Neal. Priors for infinite networks. Technical Report CRG-TR-94-1, Department of Computer Science, University of Toronto, 1994. [12] D.J.C. MacKay. Probable networks and plausible predictions - a review of practical bayesian methods for supervised neural networks. Network: Computation in Neural Systems, 6:469–505, 1995. [13] W.R. Gilks, S. Richardson, and D. J. Spiegelhalter, editors. Markov Chain Monte Carlo in Practice. Chapman and Hall, Suffolk, UK, 1996. 8
2008
17
3,420
Bayesian Network Score Approximation using a Metagraph Kernel Benjamin Yackley Department of Computer Science University of New Mexico Eduardo Corona Courant Institute of Mathematical Sciences New York University Terran Lane Department of Computer Science University of New Mexico Abstract Many interesting problems, including Bayesian network structure-search, can be cast in terms of finding the optimum value of a function over the space of graphs. However, this function is often expensive to compute exactly. We here present a method derived from the study of Reproducing Kernel Hilbert Spaces which takes advantage of the regular structure of the space of all graphs on a fixed number of nodes to obtain approximations to the desired function quickly and with reasonable accuracy. We then test this method on both a small testing set and a real-world Bayesian network; the results suggest that not only is this method reasonably accurate, but that the BDe score itself varies quadratically over the space of all graphs. 1 Introduction The problem we address in this paper is, broadly speaking, function approximation. Specifically, the application we present here is that of estimating scores on the space of Bayesian networks as a first step toward a quick way to obtain a network which is optimal given a set of data. Usually, the search process requires a full recomputation of the posterior likelihood of the graph at every step, and is therefore slow. We present a new approach to the problem of approximating functions such as this one, where the mapping is of an object (the graph, in this particular case) to a real number (its BDe score). In other words, we have a function f : Γn →R (where Γn is the set of all directed graphs on n nodes) from which we have a small number of samples, and we would like to interpolate the rest. The technique hinges on the set Γn having a structure which can be factored into a Cartesian product, as well as on the function we approximate being smooth over this structure. Although Bayesian networks are by definition acyclic, our approximation technique applies to the general directed-graph case. Because a given directed graph has n2 possible edges, we can imagine the set of all graphs as itself being a Hamming cube of degree n2 – a “metagraph” with 2n2 nodes, since each edge can be independently present or absent. We say that two graphs are connected with an edge in our metagraph if they differ in one and only one edge. We can similarly identify each graph with a bit string by “unraveling” the adjacency matrix into a long string of zeros and ones. However, if we know beforehand an ordering on the nodes of our graph to which all directed graphs must stay consistent (to enforce acyclicness), then there are only n 2  possible edges, and the size of our metagraph drops to 2( n 2 ). The same correspondence can then be made between these graphs and bit strings of length n 2  . Since the eigenvectors of the Laplacian of a graph form a basis for all smooth functions on the graph, then we can use our known sampled values (which correspond to a mapping from a subset of nodes on our metagraph to the real numbers) to interpolate the others. Despite the incredible size of the metagraph, we show that this problem is by no means intractable, and functions can in fact be approximated in polynomial time. We also demonstrate this technique both on a small network for which we can exhaustively compute the score of every possible directed acyclic graph, as well as on a larger real-world network. The results show that the method is accurate, and additionally suggest that the BDe scoring metric used is quadratic over the metagraph. 2 Spectral Properties of the Hypercube 2.1 The Kronecker Product and Kronecker Sum The matrix operators known as the Kronecker product and Kronecker sum, denoted ⊗and ⊕respectively, play a key role in the derivation of the spectral properties of the hypercube. Given matrices A ∈Ri×j and B ∈Rk×l, A ⊗B is the matrix in Rik×jl such that: A ⊗B =   a11B a12B · · · a1jB a21B a22B a2jB ... ... aj1B aj2B aijB   The Kronecker sum is defined over a pair of square matrices A ∈Rm×m and B ∈Rn×n as A ⊕B = A ⊗In + Im ⊗B, where In denotes an n × n identity matrix[8]. 2.2 Cartesian Products of Graphs The Cartesian product of two graphs G1 and G2, denoted G1 × G2, is intuitively defined as the result of replacing every node in G1 with a copy of G2 and connecting corresponding edges together. More formally, if the product is the graph G = G1 × G2, then the vertex set of G is the Cartesian product of the vertex sets of G1 and G2. In other words, for any vertex v1 in G1 and any vertex v2 in G2, there exists a vertex (v1, v2) in G. Additionally, the edge set of G is such that, for any edge (u1, u2) →(v1, v2) in G, either u1 = v1 and u2 →v2 is an edge in G2, or u2 = v2 and u1 →v1 is an edge in G1.[7] In particular, the set of hypercube graphs (or, identically, the set of Hamming cubes) can be derived using the Cartesian product operator. If we denote the graph of an n-dimensional hypercube as Qn, then Qn+1 = Qn × Q1, where the graph Q1 is a two-node graph with a single bidirectional edge. 2.3 Spectral Properties of Cartesian Products The Cartesian product has the property that, if we denote the adjacency matrix of a graph G as A(G), then A(G1 × G2) = A(G1) ⊕A(G2). Additionally, if A(G1) has m eigenvectors φk and corresponding eigenvalues λk (with k = 1...m) while A(G2) has n eigenvectors ψl with corresponding eigenvalues µl (with l = 1...n), then the full spectral decomposition of A(G1 × G2) is simple to obtain by the properties of the Kronecker sum; A(G1 × G2) will have mn eigenvectors, each of them of the form φk ⊗ψl for every possible φk and ψl in the original spectra, and each of them having the corresponding eigenvalue λk + µl[2]. It should also be noted that, because hypercubes are all k-regular graphs (in particular, the hypercube Qn is n-regular), the form of the normalized Laplacian becomes simple. The usual formula for the normalized Laplacian is: ˜L = I −D−1/2AD−1/2 However, since the graph is regular, we have D = kI, and so ˜L = I −(kI)−1/2A(kI)−1/2 = I −1 kA. Also note that, because the formula for the combinatorial Laplacian is L = D −A, we also have ˜L = 1 kL. The Laplacian also distributes over graph products, as shown in the following theorem. Theorem 1 Given two simple, undirected graphs G1 = (V1, E1) and G2 = (V2, E2), with combinatorial Laplacians LG1 and LG2 ,the combinatorial Laplacian of the Cartesian product graph G1 × G2 is then given by: LG1×G2 = LG1 ⊕LG2 Proof. LG1 = DG1 −A(G1) LG2 = DG2 −A(G2) Here, DG denotes the degree diagonal matrix of the graph G. Now, by the definition of the Laplacian, LG1×G2 = DG1×G2 −A(G1) ⊕A(G2) However, the degree of any vertex uv in the Cartesian product is deg(u) + deg(v), because all edges incident to a vertex will either be derived from one of the original graphs or the other, leading to corresponding nodes in the product graph. So, we have DG1×G2 = DG1 ⊕DG2 Substituting this in, we obtain LG1×G2 = DG1 ⊕DG2 −A(G1) ⊕A(G2) = DG1 ⊗Im + In ⊗DG2 −A(G1) ⊗Im −I ⊗A(G2) = DG1 ⊗Im −A(G1) ⊗Im + In ⊗DG2 −In ⊗A(G2) Because the Kronecker product is distributive over addition[8], LG1×G2 = (DG1 −A(G1)) ⊗Im + In ⊗(DG2 −A(G2)) = LG1 ⊕LG2 Additionally, if G1 × G2 is k-regular, ˜LG1×G2 = ˜LG1 ⊕˜LG2 = 1 k (LG1 ⊕LG2) Therefore, since the combinatorial Laplacian operator distributes across a Kronecker sum, we can easily find the spectra of the Laplacian of an arbitrary hypercube through a recursive process if we just find the spectrum of the Laplacian of Q1. 2.4 The Spectrum of the Hypercube Qn First, consider that A(Q1) =  0 1 1 0  . This is a k-regular graph with k = 1. So, LQ1 = I −1 k A(Q1) =  1 −1 −1 1  Its eigenvectors and eigenvalues can be easily computed; it has the eigenvector  1 1  with eigenvalue 0 and the eigenvector h 1 −1 i with eigenvalue 2. We can use these to compute the four eigenvectors of LQ2, the Laplacian of the 2-dimensional hypercube; LQ2 = LQ1×Q1 = LQ1 ⊕LQ1, so the four possible Kronecker products are [1 1 1 1]T, [1 1 −1 −1]T , [1 −1 1 −1]T, and [1 −1 −1 1]T, with corresponding eigenvalues 0, 1, 1, and 2 (renormalized by a factor of 1 k = 1 2 to take into account that our new hypercube is now degree 2 instead of degree 1; the combinatorial Laplacian would require no normalization). It should be noted here that an n-dimensional hypercube graph will have 2n eigenvalues with only n + 1 distinct values; they will be the values 2k n for k = 0...n, each of which will have multiplicity n k  [4]. If we arrange these columns in the proper order as a matrix, a familiar shape emerges:   1 1 1 1 1 −1 1 −1 1 1 −1 −1 1 −1 −1 1   This is, in fact, the Hadamard matrix of order 4, just as placing our original two eigenvectors side-by-side creates the order-2 Hadamard matrix. In fact, the eigenvectors of the Laplacian on a hypercube are simply the columns of a Hadamard matrix of the appropriate size; this can be seen by the recursive definition of the Hadamard matrix in terms of the Kronecker product: H2n+1 = H2n ⊗H2 Recall that the eigenvectors of the Kronecker sum of two matrices are themselves all possible Kronecker products of eigenvectors of those matrices. Since hypercubes can be recursively constructed using Kronecker sums, the basis for smooth functions on hypercubes (i.e. the set of eigenvectors of their graph Laplacian) is the Hadamard basis. Consequently, there is no need to ever compute a full eigenvector explicitly; there is an explicit formula for a given entry of any Hadamard matrix: (H2n)ij = (−1)⟨bi,bj⟩ The notation bx here means “the n-bit binary expansion of x interpreted as a vector of 0s and 1s”. This is the key to computing our kernel efficiently, not only because it takes very little time to compute arbitrary elements of eigenvectors, but because we are free to compute only the elements we need instead of entire eigenvectors at once. 3 The Metagraph Kernel 3.1 The Optimization Framework Given the above, we now formulate the regression problem that will allow us to approximate our desired function at arbitrary points. Given a set of k observations {yi}k i=1 corresponding to nodes xi in the metagraph, we wish to find the ˆf which minimizes the squared error between our estimate and all observed points and also which is a sufficiently smooth function on the graph to avoid overfitting. In other words, ˆf = arg min f ( 1 k k X i=1 ∥f(xi) −yi∥2 + cf T Lmf ) The variable m in this expression controls the type of smoothing; if m = 1, then we are penalizing first-differences (i.e. the gradient of the function). We will take m = 2 in our experiments, to penalize second-differences (the usual case when using spline interpolation)[6]. This problem can be formulated and solved within the Reproducing Kernel Hilbert Space framework[9]; consider the space of functions on our metagraph as the sum of two orthogonal spaces, one (called Ω0) consisting of functions which are not penalized by our regularization term (which is c ˆfLm ˆf), and one (called Ω1) consisting of functions orthogonal to those. In the case of our hypercube graph, Ω0 turns out to be particularly simple; it consists only of constant functions (i.e. vectors of the form 1T d, where 1 is a vector of all ones). Meanwhile, the space Ω1 is formulated under the RKHS framework as a set of columns of the kernel matrix (denoted K1). Consequently, we can write ˆf = 1T d + K1e, and so our formulation becomes: ˆf = arg min f ( 1 k k X i=1 (1T d + K1e)(xi) −yi 2 + ceTK1e ) The solution to this optimization problem is for our coefficients d and e to be linear estimates on y, our vector of observed values. In other words, there exist matrices Υd(c, m) and Υe(c, m), dependent on our smoothing coefficient c and our exponent m, such that: ˆd = Υd(c, m)y ˆe = Υe(c, m)y ˆf = 1T ˆd + K1ˆe = Υ(c, m)y Υ(c, m) = 1T Υd(c, m) + K1Υe(c, m) is the influence matrix[9] which provides the function estimate over the entire graph. Because Υ(c, m) is entirely dependent on the two matrices Υd and Υe as well as our kernel matrix, we can calculate an estimate for any set of nodes in the graph by explicitly calculating only those rows of Υ which correspond to those nodes and then simply multiplying that sub-matrix by the vector y. Therefore, if we have an efficient way to compute arbitrary entries of the kernel matrix K1, we can estimate functions anywhere in the graph. 3.2 Calculating entries of K1 First, we must choose an order r ∈{1, 2...n}; this is equivalent to selecting the degree of a polynomial used to perform standard interpolation on the hypercube. The effect that r will have on our problem will be to select the set of basis functions we consider; the eigenvectors corresponding to a given eigenvalue 2k n are the n k  eigenvectors which divide the space into identically-valued regions which are themselves (n −k)-dimensional hypercubes. For example, the 3 eigenfunctions on the 3-dimensional hypercube which correspond to the eigenvalue 2 3 (so k = 1) are those which separate the space into a positive plane and a negative plane along each of the three axes. Because these eigenfunctions are all equivalent apart from rotation, there is no reason to choose one to be in our basis over another, and so we can say that the total number of eigenfunctions we use in our approximation is equal to Pr k=0 n k  for our chosen value of r. All eigenvectors can be identified with a number l corresponding to its position in the natural-ordered Hadamard matrix; the columns where l is an exact power of 2 are ones that alternate in identically-sized blocks of +1 and -1, while the others are element-wise products of the columns correponsing to the ones in l’s binary expansion. Therefore, if we use the notation |x|1 to mean “the number of ones in the binary expansion of x”, then choosing the order r is equivalent to choosing a basis of eigenvectors φl such that |l|1 is less than or equal to r. Therefore, we have: (K1)ij = X 1≤|l|1≤r  n 2k m HilHjl Because k is equal to |l|1, and because we already have an explicit form for any Hxy, we can write (K1)ij = 1 n X 1≤|l|1≤r  n 2|l|1 m (−1)<bi,l>+<bj,l> = 1 n r X k=1  n 2k m X |l|1=k (−1)<bi ˙∨bj,l> The ˙∨symbol here denotes exclusive-or, which is equivalent to addition mod 2 in this domain. The justification for this is that only the parity of the exponent (odd or even) matters, and locations in the bit strings bi and bj which are both zero or both one contribute no change to the overall parity. Notably, this shows that the value of the kernel between any two bit strings bi and bj is dependent only on bi ˙∨bj, the key result which allows us to compute these values quickly. If we let Sk(bi, bj) = P |l|1=k(−1)<bi ˙∨bj,l>, there is a recursive formulation for the computation of Sk(bi, bj) in terms of Sk−1(bi, bj), which is the method used in the experiments due to its speed and feasability of computation. 4 Experiments 4.1 The 4-node Bayesian Network The first set of experiments we performed were on a four-node Bayesian Network. We generated a random “base truth” network and sampled it 1000 times, creating a data set. We then created an exhaustive set of 26 = 64 directed graphs; there are six possible edges in a four-node graph, assuming we already have some sort of node ordering that allows us to orient edges, and so this represented all possibilities. Because we chose the node ordering to be consistent with our base network, one of these graphs was in fact the correct network. We then gave each of the set of 64 graphs a log-marginal-likelihood score (i.e. the BDe score) based on the generated data. As expected, the correct network came out to have the greatest likelihood. Additionally, computation of the Rayleigh quotient shows that the function is a globally smooth one over the graph topology. We then performed a set of experiments using the metagraph kernel. 4.1.1 Randomly Drawn Observations First, we partitioned the set of 64 observations randomly into two groups. The training group ranged in size from 3 to 63 samples, with the rest used as the testing group. We then used the training group as the set of observations, and queried the metagraph kernel to predict the values of the networks in the testing group. We repeated this process 50 times for each of the different sizes of the training group, and the results averaged to obtain Figure 1. Note that order 3 performs the best overall for large numbers of observations, overtaking the order-2 approximation at 41 values observed and staying the best until the end. However, order 1 performs the best for small numbers of observations (perhaps due to overfitting errors caused by the higher orders) and order 2 performs the best in the middle. The data suggests that the proper order to which to compute the kernel in order to obtain the best approximations is a function of both the size of the space and the number of observations made within that space. 4.1.2 Best/worst-case Observations Secondly, we performed experiments where the observations were obtained from networks which were in the neighborhood around the known true maximum, as well as ones from networks which were as far from it as possible. These results are Figures 2 and 3. Despite small differences in shape, the results are largely identical, indicating that the distribution of the samples throughout Γn matters very little. 4.2 The Alarm Network The Alarm Bayesian network[1] contains 37 nodes, and has been used in much Bayes-netrelated research[3]. We first generated data according to the true network, sampling it 1000 times, then generated random directed graphs over the 37 nodes to see if their scores could be predicted as well as in the smaller four-node case. We generated two sets of these graphs: a set of 100, and a set of 1000. We made no attempt to enforce an ordering; although the graphs were all acyclic, we placed no assumption on the graphs being consistent with the same node-ordering as the original. The scores of these sets, calculated using the data drawn from the true network, served as our observed data. We then used the kernel to 0 10 20 30 40 50 60 70 10−3 10−2 10−1 100 101 102 103 Random samples Observed Nodes Root−mean−squared Error Order 1 Order 2 Order 3 Order 4 Order 5 (a) Figure 1: Randomly-drawn Samples 0 10 20 30 40 50 60 70 10−3 10−2 10−1 100 101 102 103 Observed Nodes Root−mean−squared Error Samples near Maximum Order 1 Order 2 Order 3 Order 4 Order 5 Order 6 (b) Figure 2: Samples drawn near maximum 0 10 20 30 40 50 60 70 10−3 10−2 10−1 100 101 102 103 Samples near Minimum Observed Nodes Root−mean−squared Error Order 1 Order 2 Order 3 Order 4 Order 5 Order 6 (c) Figure 3: Samples drawn near minimum 0 2 4 6 8 10 12 14 16 18 20 500 550 600 650 700 750 800 Order of approximation Root−mean−squared Error Error on approximations of Alarm network data Mean of sampled scores 100 observations 1000 observations (d) Figure 4: Samples from ALARM network approximate, given the observed scores, the score of an additional 100 randomly-generated graphs, with the order of the kernel varying from 1 to 20. The results, with root-meansquared error plotted against the order of the kernel, are shown in Figure 4. Additionally, we calculated a baseline by taking the mean of the 1000 sampled scores and calling that the estimated score for every graph in our testing set. The results show that the metagraph approximation method performs significantly better than the baseline for low orders of approximation with higher amounts of sampled data. This makes intuitive sense; the more data there is, the better the approximation should be. Additionally, the spike at order 2 suggests that the BDe score itself varies quadratically over the metagraph. To our knowledge, we are the first to make this observation. In current work, we are analyzing the BDe in an attempt to analytically validate this empirical observation. If true, this observation may lead to improved optimization techniques for finding the BDemaximizing Bayesian network. Note, however, that, even if true, exact optimization is still unlikely to be polynomial-time because the quadratic form is almost certainly indefinite and, therefore, NP-hard to optimize. 5 Conclusion Functions of graphs to real numbers, such as the posterior likelihood of a Bayesian network given a set of data, can be approximated to a high degree of accuracy by taking advantage of a hybercubic “metagraph” structure. Because the metagraph is regular, standard techniques of interpolation can be used in a straightforward way to obtain predictions for the values at unknown points. 6 Future Work Although this technique allows for quick and accurate prediction of function values on the metagraph, it offers no hints (as of yet) as to where the maximum of the function might be. This could, for instance, allow one to generate a Bayesian network which is likely to be close to optimal, and if true optimality is required, that approximate graph could be used as a starting point for a stepwise method such as MCMC. Even without a direct way to find such an optimum, though, it may be worth using this approximation technique inside an MCMC search instead of the usual exact-score computation in order to quickly converge on a something close to the desired optimum. Also, many other problems have a similar flavor. In fact, this technique should be able to be used unchanged on any problem which involves the computation of a real-valued function over bit strings. For other objects, however, the structure is not necessarily a hypercube. For example, one may desire an approximation to a function of permutations of some number of elements to real numbers. The set of permutations of a given number of elements, denoted Sn, has a similarly regular structure (which can be seen as a graph in which two permutations are connected if a single swap leads from one to the other), but not a hypercubic one. The structure-search problem on Bayes Nets can also be cast as a search over orderings of nodes alone[5], so a way to approximate a function over permutations would be useful there as well. Other domains have this ability to be turned into regular graphs – the integers mod n with edges between numbers that differ by 1 form a loop, for example. It should be possible to apply a similar trick to obtain function approximations not only on these domains, but on arbitrary Cartesian products of them. So, for instance, remembering that the directions of the edges of Bayesian network are completely specified given an ordering on the nodes, the network structure search problem on n nodes can be recast as a function approximation over the set Sn ×Q( n 2 ). Many problems can be cast into the metagraph framework; we have only just scratched the surface here. Acknowledgments The authors would like to thank Curtis Storlie and Joshua Neil from the UNM Department of Mathematics and Statistics, as well as everyone in the Machine Learning Reading Group at UNM. This work was supported by NSF grant #IIS-0705681 under the Robust Intelligence program. References [1] I. Beinlich, H.J. Suermondt, R. Chavez, G. Cooper, et al. The ALARM monitoring system: A case study with two probabilistic inference techniques for belief networks. Proceedings of the Second European Conference on Artificial Intelligence in Medicine, 256, 1989. [2] D.S. Bernstein. Matrix Mathematics: Theory, Facts, and Formulas with Application to Linear Systems Theory. Princeton University Press, 2005. [3] D.M. Chickering, D. Heckerman, and C. Meek. A Bayesian approach to learning Bayesian networks with local structure. UAI’97, pages 80–89, 1997. [4] Fan R. K. Chung. Spectral Graph Theory. Conference Board of the Mathematical Sciences. AMS, 1997. [5] N. Friedman and D. Koller. Being Bayesian about network structure. Machine Learning, 50(1-2):95–125, 2003. [6] Chong Gu. Smoothing Splines ANOVA Models. Springer Verlag, 2002. [7] G. Sabidussi. Graph multiplication. Mathematische Zeitschrift, 72(1):446–457, 1959. [8] Kathrin Schacke. On the kronecker product. Master’s thesis, University of Waterloo, 2004. [9] Grace Wahba. Spline Models for Observational Data. CBMS-NSF Regional Conference Series in Applied Mathematics. SCIAM, 1990.
2008
170
3,421
Fast Rates for Regularized Objectives Karthik Sridharan, Nathan Srebro, Shai Shalev-Shwartz Toyota Technological Institute — Chicago Abstract We study convergence properties of empirical minimization of a stochastic strongly convex objective, where the stochastic component is linear. We show that the value attained by the empirical minimizer converges to the optimal value with rate 1/n. The result applies, in particular, to the SVM objective. Thus, we obtain a rate of 1/n on the convergence of the SVM objective (with fixed regularization parameter) to its infinite data limit. We demonstrate how this is essential for obtaining certain type of oracle inequalities for SVMs. The results extend also to approximate minimization as well as to strong convexity with respect to an arbitrary norm, and so also to objectives regularized using other ℓp norms. 1 Introduction We consider the problem of (approximately) minimizing a stochastic objective F(w) = Eθ [f(w; θ)] (1) where the optimization is with respect to w ∈W, based on an i.i.d. sample θ1, . . . , θn. We focus on problems where f(w; θ) has a generalized linear form: f(w; θ) = ℓ(⟨w, φ(θ)⟩, θ) + r(w) . (2) The relevant special case is regularized linear prediction, where θ = (x, y), ℓ(⟨w, φ(x)⟩, y) is the loss of predicting ⟨w, φ(x)⟩when the true target is y, and r(w) is a regularizer. It is well known that when the domain W and the mapping φ(·) are bounded, and the function ℓ(z; θ) is Lipschitz continuous in z, the empirical averages ˆF(w) = ˆE [f(w; θ)] = 1 n n X i=1 f(w; θi) (3) converge uniformly to their expectations F(w) with rate p 1/n. This justifies using the empirical minimizer ˆw = arg min w∈W ˆF(w), (4) and we can then establish convergence of F( ˆw) to the population optimum F(w⋆) = min w∈W F(w) (5) with a rate of p 1/n. Recently, Hazan et al [1] studied an online analogue to this problem, and established that if f(w; θ) is strongly convex in w, the average online regret diminishes with a much faster rate, namely (log n)/n. The function f(w; θ) becomes strongly convex when, for example, we have r(w) = λ 2 ∥w∥2 as in SVMs and other regularized learning settings. In this paper we present an analogous “fast rate” for empirical minimization of a strongly convex stochastic objective. In fact, we do not need to assume that we perform the empirical minimization 1 exactly: we provide uniform (over all w ∈W) guarantees on the population sub-optimality F(w)− F(w⋆) in terms of the empirical sub-optimality ˆF(w)−ˆF( ˆw) with a rate of 1/n. This is a stronger type of result than what can be obtained with an online-to-batch conversion, as it applies to any possible solution w, and not only to some specific algorithmically defined solution. For example, it can be used to analyze the performance of approximate minimizers obtained through approximate optimization techniques. Specifically, consider f(w; θ) as in (2), where ℓ(z; θ) is convex and LLipschitz in z, the norm of φ(θ) is bounded by B, and r is λ-strongly convex. We show that for any a > 0 and δ > 0, with probability at least 1 −δ, for all w (of arbitrary magnitude): F(w) −F(w⋆) ≤(1 + a)( ˆF(w) −ˆF( ˆw)) + O  (1 + 1/a)L2B2(log(1/δ)) λn  . (6) We emphasize that here and throughout the paper the big-O notation hides only fixed numeric constants. It might not be surprising that requiring strong convexity yields a rate of 1/n. Indeed, the connection between strong convexity, variance bounds, and rates of 1/n, is well known. However, it is interesting to note the generality of the result here, and the simplicity of the conditions. In particular, we do not require any “low noise” conditions, nor that the loss function is strongly convex (it need only be weakly convex). In particular, (6) applies, under no additional conditions, to the SVM objective. We therefore obtain convergence with a rate of 1/n for the SVM objective. This 1/n rate on the SVM objective is always valid, and does not depend on any low-noise conditions or on specific properties of the kernel function. Such a “fast” rate might seem surprising at a first glance to the reader familiar with the 1/√n rate on the expected loss of the SVM optimum. There is no contradiction here—what we establish is that although the loss might converge at a rate of 1/√n, the SVM objective (regularized loss) always converges at a rate of 1/n. In fact, in Section 3 we see how a rate of 1/n on the objective corresponds to a rate of 1/√n on the loss. Specifically, we perform an oracle analysis of the optimum of the SVM objective (rather than of empirical minimization subject to a norm constraint, as in other oracle analyses of regularized linear learning), based on the existence of some (unknown) low-norm, low-error predictor w. Strong convexity is a concept that depends on a choice of norm. We state our results in a general form, for any choice of norm ∥·∥. Strong convexity of r(w) must hold with respect to the chosen norm ∥·∥, and the data φ(θ) must be bounded with respect to the dual norm ∥·∥∗, i.e. we must have ∥φ(θ)∥∗≤B. This allows us to apply our results also to more general forms of regularizers, including squared ℓp norm regularizers, r(w) = λ 2 ∥w∥2 p, for p < 1 ≤2 (see Corollary 2). However, the reader may choose to read the paper always thinking of the norm ∥w∥, and so also its dual norm ∥w∥∗, as the standard ℓ2-norm. 2 Main Result We consider a generalized linear function f : W × Θ →R, that can be written as in (2), defined over a closed convex subset W of a Banach space equipped with norm ∥·∥. Lipschitz continuity and boundedness We require that the mapping φ(·) is bounded by B, i.e. ∥φ(θ)∥∗≤B, and that the function ℓ(z; θ) is L-Lipschitz in z ∈R for every θ. Strong Convexity We require that F(w) is λ-strongly convex w.r.t. the norm ∥w∥. That is, for all w1, w2 ∈W and α ∈[0, 1] we have: F(αw1 + (1 −α)w2) ≤αF(w1) + (1 −α)F(w2) −λ 2 α(1 −α) ∥w1 −w2∥2 . Recalling that w⋆= arg minw F(w), this ensures (see for example [2, Lemma 13]): F(w) ≥F(w⋆) + λ 2 ∥w −w⋆∥2 (7) We require only that the expectation F(w) = E [f(w; θ)] is strongly convex. Of course, requiring that f(w; θ) is λ-strongly convex for all θ (with respect to w) is enough to ensure the condition. 2 In particular, for a generalized linear function of the form (2) it is enough to require that ℓ(z; y) is convex in z and that r(w) is λ-strongly convex (w.r.t. the norm ∥w∥). We now provide a faster convergence rate using the above conditions. Theorem 1. Let W be a closed convex subset of a Banach space with norm ∥·∥and dual norm ∥·∥∗ and consider f(w; θ) = ℓ(⟨w, φ(θ)⟩; θ) + r(w) satisfying the Lipschitz continuity, boundedness, and strong convexity requirements with parameters B, L, and λ. Let w⋆, ˆw, F(w) and ˆF(w) be as defined in (1)-(5). Then, for any δ > 0 and any a > 0, with probability at least 1 −δ over a sample of size n, we have that for all w ∈W: (where [x]+ = max(x, 0)) F(w) −F(w⋆) ≤(1 + a)[ ˆF(w) −ˆF(w⋆)]+ + 8 (1 + 1 a)L2B2(32 + log(1/δ)) λn ≤(1 + a)( ˆF(w) −ˆF( ˆw)) + 8 (1 + 1 a)L2B2(32 + log(1/δ)) λn . It is particularly interesting to consider regularizers of the form r(w) = λ 2 ∥w∥2 p, which are (p−1)λstrongly convex w.r.t. the corresponding ℓp-norm [2]. Applying Theorem 1 to this case yields the following bound: Corollary 2. Consider an ℓp norm and its dual ℓq, with 1 < p ≤2, 1 q + 1 p = 1, and the objective f(w; θ) = ℓ(⟨w, φ(θ)⟩; θ) + λ 2 ∥w∥2 p, where ∥φ(θ)∥q ≤B and ℓ(z; y) is convex and L-Lipschitz in z. The domain is the entire Banach space W = ℓp. Then, for any δ > 0 and any a > 0, with probability at least 1 −δ over a sample of size n, we have that for all w ∈W = ℓp (of any magnitude): F(w) −F(w⋆) ≤(1 + a)( ˆF(w) −ˆF( ˆw)) + O (1 + 1 a)L2B2 log(1/δ) (p −1)λn  . Corollary 2 allows us to analyze the rate of convergence of the regularized risk for ℓp-regularized linear learning. That is, training by minimizing the empirical average of: f(w; x, y) = ℓ(⟨w, x⟩, y) + λ 2 ∥w∥2 p (8) where ℓ(z, y) is some convex loss function and ∥x∥q ≤B. For example, in SVMs we use the ℓ2 norm, and so bound ∥x∥2 ≤B, and the hinge loss ℓ(z, y) = [1 −yz]+, which is 1-Lipschitz. What we obtain is a bound on how quickly we can minimize the expectation F(w) = E [ℓ(⟨w, x⟩, y)] + λ 2 ∥w∥2 p, i.e. the regularized empirical loss, or in other words, how quickly do we converge to the infinite-data optimum of the objective. We see, then, that the SVM objective converges to its optimum value at a fast rate of 1/n, without any special assumptions. This still doesn’t mean that the expected loss L( ˆw) = E [ℓ(⟨ˆw, x⟩, y)] converges at this rate. This behavior is empirically demonstrated on the left plot of Figure 1. For each data set size we plot the excess expected loss L( ˆw) −L(w⋆) and the sub-optimality of the regularized expected loss F( ˆw) −F(w⋆) (recall that F( ˆw) = L( ˆw) + λ 2 ∥ˆw∥2). Although the regularized expected loss converges to its infinite data limit, i.e. to the population minimizer, with rate roughly 1/n, the expected loss L( ˆw) converges at a slower rate of roughly p 1/n. Studying the convergence rate of the SVM objective allows us to better understand and appreciate analysis of computational optimization approaches for this objective, as well as obtain oracle inequalities on the generalization loss of ˆw, as we do in the following Section. Before moving on, we briefly provide an example of applying Theorem 1 with respect to the ℓ1norm. The bound in Corollary 2 diverges when p →1 and the Corollary is not applicable for ℓ1 regularization. This is because ∥w∥2 1 is not strongly convex w.r.t. the ℓ1-norm. An example of a regularizer that is strongly convex with respect to the ℓ1 norm is the (unnormalized) entropy regularizer [3]: r(w) = Pd i=1 |wi| log(|wi|). This regularizer is 1/B2 w-strongly convex w.r.t. ∥w∥1, as long as ∥w∥1 ≤Bw (see [2]), yielding: Corollary 3. Consider a function f(w; θ) = ℓ(⟨w, φ(θ)⟩; θ) + Pd i=1 |wi| log(|wi|), where ∥φ(θ)∥∞≤B and ℓ(z; y) is convex and L-Lipschitz in z. Take the domain to be the ℓ1 ball 3 10 3 10 4 10 −2 10 −1 n Suboptimality of Objective Excess Expected Loss 10 3 10 4 10 −2 10 −1 n Figure 1: Left: Excess expected loss L( ˆw) −L(w⋆) and sub-optimality of the regularized expected loss F( ˆw) −F(w⋆) as a function of training set size, for a fixed λ = 0.8. Right: Excess expected loss L( ˆwλ) − minw L(wo), relative to the overall optimal wo = arg minw L(w), with λn = p 300/n. Both plots are on a logarithmic scale and refer to a synthetic example with x uniform over [−1.5, 1.5]300, and y = sign x1 when |x1| > 1 but uniform otherwise. W = {w ∈Rd : ∥w∥1 ≤Bw}. Then, for any δ > 0 and any a > 0, with probability at least 1 −δ over a sample of size n, we have that for all w ∈W: F(w) −F(w⋆) ≤(1 + a)( ˆF(w) −ˆF( ˆw)) + O (1 + 1 a)L2B2B2 w log(1/δ) λn  . 3 Oracle Inequalities for SVMs In this Section we apply the results from previous Section to obtain an oracle inequality on the expected loss L(w) = E [ℓ(⟨w, x⟩, y)] of an approximate minimizer of the SVM training objective ˆFλ(w) = ˆE [fλ(w)] where fλ(w; x, y) = ℓ(⟨w, x⟩, y) + λ 2 ∥w∥2 , (9) and ℓ(z, y) is the hinge-loss, or any other 1-Lipschitz loss function. As before we denote B = supx ∥x∥(all norms in this Section are ℓ2 norms). We assume, as an oracle assumption, that there exists a good predictor wo with low norm ∥wo∥ and which attains low expected loss L(wo). Consider an optimization algorithm for ˆFλ(w) that is guaranteed to find ˜w such that ˆFλ( ˜w) ≤min ˆFλ(w) + ϵopt. Using the results of Section 2, we can translate this approximate optimality of the empirical objective to an approximate optimality of the expected objective Fλ(w) = E [fλ(w)]. Specifically, applying Corollary 2 with a = 1 we have that with probability at least 1 −δ: Fλ( ˜w) −Fλ(w⋆) ≤2ϵopt + O B2 log(1/δ) λn  . (10) Optimizing to within ϵopt = O( B2 λn) is then enough to ensure Fλ( ˜w) −Fλ(w⋆) = O B2 log(1/δ) λn  . (11) In order to translate this to a bound on the expected loss L( ˜w) we consider the following decomposition: L( ˜w) = L(wo) + (Fλ( ˜w) −Fλ(w⋆)) + (Fλ(w⋆) −Fλ(wo)) + λ 2 ∥wo∥2 −λ 2 ∥˜w∥2 ≤L(wo) + O B2 log(1/δ) λn  + 0 + λ 2 ∥wo∥2 (12) 4 where we used the bound (11) to bound the second term, the optimality of w⋆to ensure the third term is non-positive, and we also dropped the last, non-positive, term. This might seem like a rate of 1/n on the generalization error, but we need to choose λ so as to balance the second and third terms. The optimal choice for λ is λ(n) = c B p log(1/δ) ∥wo∥√n , (13) for some constant c. We can now formally state our oracle inequality, which is obtained by substituting (13) into (12): Corollary 4. Consider an SVM-type objective as in (9). For any wo and any δ > 0, with probability at least 1−δ over a sample of size n, we have that for all ˜w s.t. ˆFλ(n)( ˜w) ≤min ˆFλ(n)(w)+O( B2 λn), where λ(n) chosen as in (13), the following holds: L( ˜w) ≤L(wo) + O   s B2 ∥wo∥2 log(1/δ) n   Corollary 4 is demonstrated empirically on the right plot of Figure 1. The way we set λ(n) in Corollary 4 depends on ∥wo∥. However, using λ(n) = B p log(1/δ) √n (14) we obtain: Corollary 5. Consider an SVM-type objective as in (9) with λ(n) set as in (14). For any δ > 0, with probability at least 1 −δ over a sample of size n, we have that for all ˜w s.t. ˆFλ(n)( ˜w) ≤ min ˆFλ(n)(w) + O( B2 λn), the following holds: L( ˜w) ≤inf wo  L(wo) + O   s B2(∥wo∥4 + 1) log(1/δ) n     The price we pay here is that the bound of Corollary 5 is larger by a factor of ∥wo∥relative to the bound of Corollary 4. Nevertheless, this bound allows us to converge with a rate of p 1/n to the expected loss of any fixed predictor. It is interesting to repeat the analysis of this Section using the more standard result: Fλ(w) −Fλ(w⋆) ≤ˆFλ(w) −ˆFλ(w⋆) + O r B2wB2 n ! (15) for ∥w∥≤Bw where we ignore the dependence on δ. Setting Bw = p 2/λ, as this is a bound on the norm of both the empirical and population optimums, and using (15) instead of Corollary 2 in our analysis yields the oracle inequality: L( ˜w) ≤L(wo) + O   B2 ∥wo∥2 log(1/δ) n !1/3  (16) The oracle analysis studied here is very simple—our oracle assumption involves only a single predictor wo, and we make no assumptions about the kernel or the noise. We note that a more sophisticated analysis has been carried out by Steinwart et al [4], who showed that rates faster than 1/√n are possible under certain conditions on noise and complexity of kernel class. In Steinwart’s et al analyses the estimation rates (i.e. rates for expected regularized risk) are given in terms of the approximation error quantity λ 2 ∥w⋆∥2 + L(w⋆) −L∗where L∗is the Bayes risk. In our result we consider the estimation rate for regularized objective independent of the approximation error. 5 4 Proof of Main Result To prove Theorem 1 we use techniques of reweighing and peeling following Bartlett et al [5]. For each w, we define gw(θ) = f(w; θ) −f(w⋆; θ), and so our goal is to bound the expectation of gw in terms of its empirical average. We denote by G = {gw|w ∈W}. Since our desired bound is not exactly uniform, and we would like to pay different attention to functions depending on their expected sub-optimality, we will instead consider the following reweighted class. For any r > 0 define Gr = n gr w = gw 4k(w) : w ∈W, k(w) = min{k′ ∈Z+ : E [gw] ≤r4k′} o (17) where Z+ is the set of non-negative integers. In other words, gr w ∈Gr is just a scaled version of gw ∈G and the scaling factor ensures that E [gr w] ≤r. We will begin by bounding the variation between expected and empirical average values of gr ∈Gr. This is typically done in terms of the complexity of the class Gr. However, we will instead use the complexity of a slightly different class of functions, which ignores the non-random (i.e. non-datadependent) regularization terms r(w). Define: Hr = n hr w = hw 4k(w) : w ∈W, k(w) = min{k′ ∈Z+ : E [gw] ≤r4k′} o (18) where hw(θ) = gw(θ) −(r(w) −r(w⋆)) = ℓ(⟨w, φ(θ)⟩; θ) −ℓ(⟨w∗, φ(θ)⟩; θ). (19) That is, hr w(θ) is the data dependent component of gr w, dropping the (scaled) regularization terms. With this definition we have E [gr w] −ˆE [gr w] = E [hr w] −ˆE [hr w] (the regularization terms on the left hand side cancel out), and so it is enough to bound the deviation of the empirical means in Hr. This can be done in terms of the Rademacher Complexity of the class, R(Hr) [6, Theorem 5]: For any δ > 0, with probability at least 1 −δ, sup hr∈Hr E [hr] −ˆE [hr] ≤2R(Hr) + sup hr∈Hr,θ |hr(θ)| ! q log 1/δ 2n . (20) We will now proceed to bounding the two terms on the right hand side: Lemma 6. sup hr∈Hr,θ |hr(θ)| ≤LB p 2r / λ Proof. From the definition of hr w given in (18)–(19), the Lipschitz continuity of ℓ(·; θ), and the bound ∥φ(θ)∥∗≤B, we have for all w, θ: |hr w(θ)| ≤|hw(θ)| 4k(w) ≤LB ∥w −w⋆∥/4k(w) (21) We now use the strong convexity of F(w), and in particular eq. (7), as well as the definitions of gw and k(w), and finally note that 4k(w) ≥1, to get: ∥w −w⋆∥≤ q 2 λ(F(w) −F(w⋆)) = q 2 λE [gw] ≤ q 2 λ4k(w)r ≤ q 2 λ16k(w)r (22) Substituting (22) in (21) yields the desired bound. Lemma 7. R(Hr) ≤2L B q 2r λn Proof. We will use the following generic bound on the Rademacher complexity of linear functionals [7, Theorem 1]: for any t(w) which is λ-strongly convex (w.r.t a norm with dual norm ∥·∥∗), R({φ 7→⟨w, φ⟩| t(w) ≤a}) ≤(sup ∥φ∥∗) q 2a λn. (23) For each a > 0, define H(a) = {hw : w ∈W, E [gw] ≤a}. First note that E [gw] = F(w) − F(w⋆) is λ-strongly convex. Using (23) and the Lipschitz composition property we therefore have R(H(a)) ≤LB q 2a λn. Now: R(Hr) = R ∪∞ j=04−jH(r4j)  ≤ ∞ X j=0 4−jR(H(4rj)) ≤LB q 2r λn ∞ X j=0 4−j/2 = 2LB q 2r λn 6 We now proceed to bounding E [gw] = F(w)−F(w⋆) and thus proving Theorem 1. For any r > 0, with probability at least 1 −δ we have: E [gw] −ˆE [gw] = 4k(w)(E [gr w] −ˆE [gr w]) = 4k(w)(E [hr w] −ˆE [hr w]) ≤4k(w)√rD (24) where D = LB q 1 λn(4 √ 2+ p log(1/δ)) ≤2LB q 32+log(1/δ) λn is obtained by substituting Lemmas 6 and 7 into (20). We now consider two possible cases: k(w) = 0 and k(w) > 0. The case k(w) = 0 corresponds to functions with an expected value close to optimal: E [gw] ≤r, i.e. F(w) ≤F(w⋆) + r. In this case (24) becomes: E [gw] ≤ˆE [gw] + √rD (25) We now turn to functions for which k(w) > 0, i.e. with expected values further away from optimal. In this case, the definition of k(w) ensures 4k(w)−1r < E [gw] and substituting this into (24) we have E [gw] −ˆE [gw] ≤4 rE [gw]√rD. Rearranging terms yields: E [gw] ≤ 1 1−4D/√r ˆE [gw] (26) Combining the two cases (25) and (26) (and requiring r ≥(4D)2 so that 1 1−4D/√r ≥1), we always have: E [gw] ≤ 1 1−4D/√r h ˆE [gw] i + + √rD (27) Setting r = (1 + 1 a)2(4D)2 yields the bound in Theorem 1. 5 Comparison with Previous “Fast Rate” Guarantees Rates faster than 1/√n for estimation have been previously explored under various conditions, where strong convexity has played a significant role. Lee et al [8] showed faster rates for squared loss, exploiting the strong convexity of this loss function, but only under finite pseudodimensionality assumption, which do not hold in SVM-like settings. Bousquet [9] provided similar guarantees when the spectrum of the kernel matrix (covariance of the data) is exponentially decaying. Tsybakov [10] introduced a margin condition under which rates faster than 1/√n are shown possible. It is also possible to ensure rates of 1/n by relying on low noise conditions [9, 11], but here we make no such assumption. Most methods for deriving fast rates first bound the variance of the functions in the class by some monotone function of their expectations. Then, using methods as in Bartlett et al [5], one can get bounds that have a localized complexity term and additional terms of order faster than 1/√n. However, it is important to note that the localized complexity term typically dominates the rate and still needs to be controlled. For example, Bartlett et al [12] show that strict convexity of the loss function implies a variance bound, and provide a general result that can enable obtaining faster rates as long as the complexity term is low. For instance, for classes with finite VC dimension V , the resulting rate is n−(V +2)/(2V +2), which indeed is better than 1/√n but is not quite 1/n. Thus we see that even for a strictly convex loss function, such as the squared loss, additional conditions are necessary in order to obtain “fast” rates. In this work we show that strong convexity not only implies a variance bound but in fact can be used to bound the localized complexity. An important distinction is that we require strong convexity of the function F(w) with respect to the norm ∥w∥. This is rather different than requiring the loss function z 7→ℓ(z, y) be strongly convex on the reals. In particular, the loss of a linear predictor, w 7→ℓ(⟨w, x⟩, y) can never be strongly convex in a multi-dimensional space, even if ℓis strongly convex, since it is flat in directions orthogonal to x. As mentioned, f(w; x, y) = ℓ(⟨w, x⟩, y) can never be strongly convex in a high-dimensional space. However, we actually only require the strong convexity of the expected loss F(w). If the loss function ℓ(z, y) is λ-strongly convex in z, and the eigenvalues of the covariance of x are bounded away from zero, strong convexity of F(w) can be ensured. In particular, F(w) would be cλstrongly-convex, where c is the minimal eigenvalue of the COV[x]. This enables us to use Theorem 7 1 to obtain rates of 1/n on the expected loss itself. However, we cannot expect the eigenvalues to be bounded away from zero in very high dimensional spaces, limiting the applicability of the result of low-dimensional spaces were, as discussed above, other results also apply. An interesting observation about our proof technique is that the only concentration inequality we invoked was McDiarmid’s Inequality (in [6, Theorem 5] to obtain (20)—a bound on the deviations in terms of the Rademacher complexity). This was possible because we could make a localization argument for the ℓ∞norm of the functions in our function class in terms of their expectation. 6 Summary We believe this is the first demonstration that, without any additional requirements, the SVM objective converges to its infinite data limit with a rate of O(1/n). This improves the previous results that considered the SVM objective only under special additional conditions. The results extends also to other regularized objectives. Although the quantity that is ultimately of interest to us is the expected loss, and not the regularized expected loss, it is still important to understand the statistical behavior of the regularized expected loss. This is the quantity that we actually optimize, track, and often provide bounds on (e.g. in approximate or stochastic optimization approaches). A better understanding of its behavior can allow us to both theoretically explore the behavior of regularized learning methods, to better understand empirical behavior observed in practice, and to appreciate guarantees of stochastic optimization approaches for such regularized objectives. As we saw in Section 3, deriving such fast rates is also essential for obtaining simple and general oracle inequalities, that also helps us guide our choice of regularization parameters. References [1] E. Hazan, A. Kalai, S. Kale, and A. Agarwal. Logarithmic regret algorithms for online convex optimization. In Proceedings of the Nineteenth Annual Conference on Computational Learning Theory, 2006. [2] S. Shalev-Shwartz. Online Learning: Theory, Algorithms, and Applications. PhD thesis, The Hebrew University, 2007. [3] T. Zhang. Covering number bounds of certain regularized linear function classes. J. Mach. Learn. Res., 2:527–550, 2002. [4] I. Steinwart, D. Hush, and C. Scovel. A new concentration result for regularized risk minimizers. Highdimensional Probability IV, in IMS Lecture Notes, 51:260–275, 2006. [5] P. L. Bartlett, O. Bousquet, and S. Mendelson. Localized rademacher complexities. In COLT ’02: Proceedings of the 15th Annual Conference on Computational Learning Theory, pages 44–58, London, UK, 2002. Springer-Verlag. [6] O. Bousquet, S. Boucheron, and G. Lugosi. Introduction to statistical learning theory. In O. Bousquet, U.v. Luxburg, and G. R¨atsch, editors, Advanced Lectures in Machine Learning, pages 169–207. Springer, 2004. [7] S. M. Kakade, K. Sridharan, and A. Tewari. On the complexity of linear prediction: Risk bounds, margin bounds, and regularization. In NIPS, 2008. [8] W. S. Lee, P. L. Bartlett, and R. C. Williamson. The importance of convexity in learning with squared loss. In Computational Learing Theory, pages 140–146, 1996. [9] O. Bousquet. Concentration Inequalities and Empirical Processes Theory Applied to the Analysis of Learning Algorithms. PhD thesis, Ecole Polytechnique, 2002. [10] A. Tsybakov. Optimal aggregation of classifiers in statistical learning. Annals of Statistics, 32:135–166, 2004. [11] I. Steinwart and C. Scovel. Fast rates for support vector machines using gaussian kernels. ANNALS OF STATISTICS, 35:575, 2007. [12] P. L. Bartlett, M. I. Jordan, and J. D. McAuliffe. Convexity, classification, and risk bounds. Journal of the American Statistical Association, 101:138–156, March 2006. 8
2008
171
3,422
Bayesian Synchronous Grammar Induction Phil Blunsom, Trevor Cohn, Miles Osborne School of Informatics, University of Edinburgh 10 Crichton Street, Edinburgh, EH8 9AB, UK {pblunsom,tcohn,miles}@inf.ed.ac.uk Abstract We present a novel method for inducing synchronous context free grammars (SCFGs) from a corpus of parallel string pairs. SCFGs can model equivalence between strings in terms of substitutions, insertions and deletions, and the reordering of sub-strings. We develop a non-parametric Bayesian model and apply it to a machine translation task, using priors to replace the various heuristics commonly used in this field. Using a variational Bayes training procedure, we learn the latent structure of translation equivalence through the induction of synchronous grammar categories for phrasal translations, showing improvements in translation performance over maximum likelihood models. 1 Introduction A recent trend in statistical machine translation (SMT) has been the use of synchronous grammar based formalisms, permitting polynomial algorithms for exploring exponential forests of translation options. Current state-of-the-art synchronous grammar translation systems rely upon heuristic relative frequency parameter estimates borrowed from phrase-based machine translation[1, 2]. In this work we draw upon recent Bayesian models of monolingual parsing [3, 4] to develop a generative synchronous grammar model of translation using a hierarchical Dirichlet process (HDP) [5]. There are two main contributions of this work. The first is that we include sparse priors over the model parameters, encoding the intuition that source phrases will have few translations, and also addressing the problem of overfitting when using long multi-word translations pairs. Previous models have relied upon heuristics to implicitly bias models towards such distributions [6]. In addition, we investigate different priors based on standard machine translation models. This allows the performance benefits of these models to be combined with a principled estimation procedure. Our second contribution is the induction of categories for the synchronous grammar using a HDP prior. Such categories allow the model to learn the latent structure of translational equivalence between strings, such as a preference to reorder adjectives and nouns when translating between French to English or to encode that a phrase pair should be used at the beginning or end of a sentence. Automatically induced non-terminal symbols give synchronous grammar models increased power over single non-terminal systems such as [2], while avoiding the problems of relying on noisy domainspecific parsers, as in [7]. As the model is non-parametric, the HDP prior will provide a bias towards parameter distributions using as many, or as few, non-terminals as necessary to model the training data. Following [3] we optimise a truncated variational bound on the true posterior distribution. We evaluate the model on both synthetic data, and the real task of translating from Chinese to English, showing improvements over a maximum likelihood estimate (MLE) model. We focus on modelling the generation of a translation for a source sentence, putting aside for further work integration with common components of a state-of-the-art translation system, such as a language model and minimum error rate training [6]. While we are not aware of any previous attempts to directly induce synchronous grammars with more than a single category, a number of generatively trained machine translation models have been 百$!% to the Hundred Regiments Offensive "# is the Monument 巍然屹立 Standing tall 在太行山上 on Taihang Mountain A A B B A B B B . . B Figure 1: An example SCFG derivation from a Chinese source sentence which yields the English sentence: “Standing tall on Taihang Mountain is the Monument to the Hundred Regiment Offensive.” (Cross-bars indicate that the child nodes have been reordered in the English target.) proposed. [8] described the ITG subclass of SCFGs and performed many experiments using MLE training to induce translation models on small corpora. Most subsequent work with ITG grammars has focused on the sub-task of word alignment [9], rather than actual translation, and has continued to use MLE trained models. A notable recent exception is [10] who used Dirichlet priors to smooth an ITG alignment model. Our results clearly indicate that MLE models considerably overfit when used to estimate synchronous grammars, while the judicious use of priors can alleviate this problem. This result raises the prospect that many MLE trained models of translation (e.g. [7, 11, 12]), previously dismissed for under-performing heuristic approaches, should be revisited. 2 Synchronous context free grammar A synchronous context free grammar (SCFG, [13]) describes the generation of pairs of strings. A string pair is generated by applying a series of paired context-free rewrite rules of the form, X    ,φ,  , where X is a non-terminal,  and φ are strings of terminals and non-terminals and  specifies a one-to-one alignment between non-terminals in  and φ. In the context of SMT, by assigning the source and target languages to the respective sides of a SCFG it is possible to describe translation as the process of parsing the source sentence, while generating the target translation [2]. In this paper we only consider binary normal-form SCFGs which allow productions to rewrite as either a pair of a pair of non-terminals, or a pair of non-empty terminal strings (these may span multiple words). Such grammars are equivalent to the inversion transduction grammars presented in [8]. Note however that our approach is general and could be used with other synchronous grammar transducers (e.g., [7]). The binary non-terminal productions can specify that the order of the child non-terminals is the same in both languages (a monotone production), or is reversed (a reordering production). Monotone and reordering rules are written: Z   X 1 Y 2, X 1 Y 2 and Z   X 1 Y 2, Y 2 X 1 respectively, where X,Y and Z are non-terminals and the boxed indices denote the alignment. Without loss of generality, here we add the restriction that non-terminals on the source and target sides of the grammar must have the same category. Although conceptually simple, a binary normalform SCFGs can still represent a wide range of linguistic phenomena required for translation [8]. Figure 1 shows an example derivation for Chinese to English. The grammar in this example has non-terminals A and B which distinguish between translation phrases which permit re-orderings. 3 Generative Model A sequence of SCFG rule applications which produces both a source and a target sentence is referred to as a derivation, denoted z. The generative process of a derivation in our model is described in Table 1. First a start symbol, z1, is drawn, followed by its rule type. This rule type determines if the symbol will rewrite as a source-target translation pair, or a pair of non-terminals with either monotone or reversed order. The process then recurses to rewrite each pair of child non-terminals. HDP-SCFG π|α ∼GEM(α) (Draw top-level constituent prior distribution) φS|αS, π ∼DP(αS, π) (Draw start-symbol distribution) φT z |αY ∼Dirichlet(αY ) (Draw rule-type parameters) φM z |αM, π ∼DP(αM, ππT ) (Draw monotone binary production parameters) φR z |αR, π ∼DP(αR, ππT ) (Draw reordering binary production parameters) φE z |αE, P0 ∼DP(αE, P0) (Draw emission production parameters) z1|φS ∼Multinomial(φS) (First draw the start symbol) For each node i in the synchronous derivation z with category zi: ti|φT zi ∼Multinomial(φT zi) (Draw a rule type) if ti = Emission then: ⟨e, f⟩|φE zi ∼Multinomial(φE zi) (Draw source and target phrases) if ti = Monotone Production then: ⟨zl 1zr 2, zl 1zr 2⟩|φM zi ∼Multinomial(φM zi ) (Draw left and right (source) child constituents) if ti = Reordering Production then: ⟨zl 1zr 2, zr 2zl 1⟩|φR zi ∼Multinomial(φR zi) (Draw left and right (source) child constituents) Table 1: Hierarchical Dirichlet process model of the production of a synchronous tree from a SCFG. This continues until no non-terminals are remaining, at which point the derivation is complete and the source and target sentences can be read off. When expanding a production each decision is drawn from a multinomial distribution specific to the non-terminal, zi. This allows different nonterminals to rewrite in different ways – as an emission, reordering or monotone production. The prior distribution for each binary production is parametrised by π, the top-level stick-breaking weights, thereby ensuring that each production draws its children from a shared inventory of category labels. The parameters for each multinomial distributions are themselves drawn from their corresponding prior. The hyperparameters, α, αS, αY , αM, αR, and αE, encode prior knowledge about the sparsity of each distribution. For instance, we can encode a preference towards longer or short derivations using αY , and a preference for sparse or dense translation lexicons with αE. To simplify matters we assume a single hyperparameter for productions, i.e. αP ∆= αS = αM = αR. In addition to allowing for the incorporation of prior knowledge about sparsity, the priors have been chosen to be conjugate to the multinomial distribution. In the following sections we describe and motivate our choices for each one of these distributions. 3.1 Rule type distribution The rule type distribution determines the relative likelihood of generating a terminal string pair, a monotone production, or a reordering. Synchronous grammars that allow multiple words to be emitted at the leaves of a derivation are prone to focusing probability mass on only the longest translation pairs, i.e. if a training set sentence pair can be explained by many short translation pairs, or a few long ones the maximum likelihood solution will be to use the longest pairs. This issue is manifested by the rule type distribution assigning a high probability to emissions versus either of the binary productions, resulting in short flat derivations with few productions. We can counter this tendency by assuming a prior distribution that allows us to temper the model’s preference for short derivations with large translation pairs. We do so by setting the concentration parameter, αY , to a number greater than one which smooths the rule type distribution. 3.2 Emission distribution The Dirichlet process prior on the terminal emission distribution serves two purposes. Firstly the prior allows us to encode the intuition that our model should have few translation pairs. The translation pairs in our system are induced from noisy data and thus many of them will be of little use. Therefore a sparse prior should lead to these noisy translation pairs being assigned probabilities close to zero. Secondly, the base distribution P0 of the Dirichlet process can be used to include sophisticated prior distributions over translation pairs from other popular models of translation. The two structured priors we investigate in this work are IBM model 1, and the relative frequency count estimators from phrase based translation: IBM Model 1 (P m1 0 ) IBM Model 1 [14] is a word based generative translation model that assigns a joint probability to a source and target translation pair. The model is based on a noisy channel in which we decompose the probability of f given e from the language model probability of e. The conditional model assumes a latent alignment from words in e to those in f and that the probability of word-to-word translations are independent: P m1 0 (f, e) = P m1(f|e) × P(e) = P(e) × 1 (|e| + 1)|f| × |f| Y j=1 |e| X i=0 p(fj|ei) , where e0 represents word insertions. We use a unigram language model for the probability P(e), and train the parameters p(fj|ei) using a variational approximation, similar to that which is described in Section 3.4. Model 1 allows us to assign a prior probability to each translation pair in our model. This prior suggests that lexically similar translation pairs should have similar probabilities. For example, if the French-English pairs (chapeau, cap) and (rouge, red) both have high probability, then the pair (chapeau rouge, red cap) should also. Relative frequency (P RF 0 ) Most statistical machine translation models currently in use estimate the probabilities for translation pairs using a simple relative frequency estimator. Under this model the joint probability of a translation pair is simply the number of times the source was observed to be aligned to the target in the word aligned corpus normalised by the total number of observed pairs: P RF 0 (f, e) = C(f, e) C(∗, ∗) , where C(∗, ∗) is the total number of translation pair alignments observed. Although this estimator doesn’t take into account any generative process for how the translation pairs were observed, and by extension of the arguments for tree substitution grammars is biased and inconsistent [15], it has proved effective in many state-of-the-art translation systems.1 3.3 Non-terminal distributions We employ a structured prior for binary production rules inspired by similar approaches in monolingual grammar induction [3, 4]. The marginal distribution over non-terminals, π, is drawn from a stick-breaking prior [5]. This generates an infinite vector of scalars which sum to one and whose expected values decrease geometrically, with the rate of decay being controlled by α. The parameters of the start symbol distribution are drawn from a Dirichlet process parametrised by the stick-breaking weights, π. In addition, both the monotone and reordering production parameters are drawn from a Dirichlet process parameterised by the matrix of the expectations for each pair of nonterminals, ππT , assuming independence in the prior. This allows the model to prefer grammars with few non-terminal labels and where each non-terminal has a sparse distribution over productions. 3.4 Inference Previous work with monolingual HDP-CFG grammars have employed either Gibbs sampling [4] or variational Bayes [3] approaches to inference. In this work we follow the mean-field approximation presented in [16, 3], truncating the top-level stick-breaking prior on the non-terminals and optimising a variational bound on the probability of the training sample. The mean-field approach offers better scaling and convergence properties than a Gibbs sampler, at the expense of increased approximation. First we start with our objective, the likelihood of the observed string pairs, x = {(e, f)}: log p(x) = log Z dθ X z p(θ)p(x, z|θ) ≥ Z dθ X z q(θ, z) log p(θ)p(x, z|θ) q(θ, z) , 1Current translation systems more commonly use the conditional, rather than joint, estimator. where θ = (π, φS, φM, φR, φE, φT ) are our model parameters and z are the hidden derivations. We bound the above using Jensen’s inequality to move the logarithm (a convex function) inside the integral and sum, and introduce the mean-field distribution q(θ, z). Assuming this distribution factorises over the model parameters and latent variables, q(θ, z) = q(θ)q(z), log p(x) ≥ Z dθq(θ) log p(θ) q(θ) + X z q(z) log p(x, z|θ) q(z) ! ∆= F(q(θ), q(z)) . Upon taking the functional partial derivatives of F(q(θ), q(z)) and equating to zero, we obtain sub-normalised summary weights for each of the factorised variational distributions: Wi ∆= exp{Eq(φ) [log φi]}. For the monotone and reordering distributions these become: W M z (zl, zr) = exp{ψ C z →⟨zl 1zr 2, zl 1zr 2⟩  + αP πzlπzr  } exp{ψ C z →⟨∗1∗2, ∗1∗2⟩  + αP  } W R z (zl, zr) = exp{ψ C z →⟨zl 1zr 2, zr 2zl 1⟩  + αP πzlπzr  } exp{ψ C z →⟨∗1∗2, ∗2∗1⟩  + αP  } , where C(z →· · · ) is the expected count of rewriting symbol z using the given production. The starred rewrites in the denominators indicate a sum over any monotone or reordering production, respectively. The weights for the rule-type and emission distributions are defined similarly. The variational training cycles between optimising the q(θ) distribution by re-estimating the weights W and the stick-breaking prior π, then using these estimates, with the inside-outside dynamic programming algorithm, to calculate the q(z) distribution. Optimising the top-level stick-breaking weights has no closed form solution as a dependency is induced between the GEM prior and production distributions. [3] advocate using a gradient projection method to locally optimise this function. As our truncation levels are small, we instead use Monte-Carlo sampling to estimate a global optimum. 3.5 Prediction The predictive distribution under our Bayesian model is given by: p(z|x, f) = Z dθ p(θ|x)p(z|f, θ) ≈ Z dθ q(θ)p(z|f, θ) ≥exp Z dθ q(θ) log p(z|f, θ) , where x is the training set of parallel sentence pairs, f is a testing source sentence and z its derivation.2 Calculating the predictive probability even under the variational approximation is intractable, therefore we bound the approximation following [16]. The bound can then be maximised to find the best derivation, z, with the Viterbi algorithm, using the sub-normalised W parameters from the last E step of variational Bayes training as the model parameters. 4 Evaluation We evaluate our HDP-SCFG model on both synthetic and real-world translation tasks. Recovering a synthetic grammar This experiment investigates the ability of our model to recover a simple synthetic grammar, using the minimum number of constituent categories. Ten thousand training pairs were generated from the following synthetic grammar, with uniform weights, which includes both reordering and ambiguous terminal distributions: S →⟨A 1 A 2, A 1 A 2⟩ A →⟨a, a⟩|⟨b, b⟩|⟨c, c⟩ S →⟨B 1 B 2, B 2 B 1⟩ B →⟨d, d⟩|⟨e, e⟩|⟨f, f⟩ S →⟨C 1 C 2, C 1 C 2⟩ C →⟨g, g⟩|⟨h, h⟩|⟨i, i⟩ 2The derivation specifies the translation. Alternatively we could bound on the likelihood of a translation, marginalising out the derivation. However, this bound cannot be maximised tractably when e is unobserved. 1 2 3 4 5 HDP MLE Binary production posterior distribution Category Posterior 0.0 0.2 0.4 0.6 0.8 1.0 1 2 3 4 5 HDP MLE Emission posterior distribution Category Posterior 0.0 0.2 0.4 0.6 0.8 1.0 Figure 2: Synthetic grammar experiments. The HDP model correctly allocates a single binary production non-terminal and three equally weighted emission non-terminals. Training Development Test Sentences Chinese English Chinese English Chinese English Sentences 33164 500 506 Segments/Words 253724 279104 3464 3752 3784 3823 Av. Sentence Length 7 8 6 7 7 7 Longest Sentence 41 45 58 62 61 56 Table 2: Chinese to English translation corpus statistics. Figure 2 shows the emission and production distributions produced by the HDP-SCFG model,3 as well as an EM trained maximum likelihood (MLE) model. The variational inference for the HDP model was truncated at five categories, likewise the MLE model was trained with five categories. The hierarchical model finds the correct grammar. It allocates category 2 to the S category, giving it a 2 3 probability of generating a monotone production (A,C), versus 1 3 for a reordering (B). For the emission distribution the HDP model assigns category 1 to A, 3 to B and 5 to C, each of which has a posterior probability of 1 3. The stick-breaking prior biases the model towards using a small set of categories, and therefore the model correctly uses only four categories, assigning zero posterior probability mass to category 4. The MLE model has no bias for small grammars and therefore uses all available categories to model the data. For the production distribution it creates two categories with equal posteriors to model the S category, while for emissions the model collapses categories A and C into category 1, and splits category B over 3 and 5. This grammar is more expressive than the target grammar, over-generating but including the target grammar as a subset. The particular grammar found by the MLE model is dependent on the (random) initialisation and the fact that the EM algorithm can only find a local maximum, however it will always use all available categories to model the data. Chinese-English machine translation The real-world translation experiment aims to determine whether the model can learn and generalise from a noisy large-scale parallel machine translation corpus, and provide performance benefits on the standard evaluation metrics. We evaluate our model on the IWSLT 2005 Chinese to English translation task [17], using the 2004 test set as development data for tuning the hyperparameters. The statistics for this data are presented in Table 2. The training data made available for this task consisted of 40k pairs of transcribed utterances, drawn from the travel domain. The translation phrase pairs that form the base of our grammar are induced using the standard alignment and translation phrase pair extraction heuristics used in phrase-based translation models [6]. As these heuristics aren’t based on a generative model, and don’t guarantee that the target translation will be reachable from the source, we discard those sentence pairs for which we cannot produce a derivation, leaving 33,164 sentences for training. Model performance is evaluated using the standard Bleu4 metric [18] which measures average n-gram precision, n ≤4. 3No structured P0 was used in this model, rather a simple Dirichlet prior with uniform αE was employed for the emission distribution. G G G G G α E BLEU (%) 32.0 32.5 33.0 33.5 0.1 0.2 0.5 1.0 G G G G G G G G α Y BLEU (%) 32.0 32.5 33.0 33.5 1e+00 1e+02 1e+04 1e+06 Figure 3: Tuning the Dirichlet α parameters for the emission and rule type distributions (development set). MLE Uniform P0 P0 = M1 P0 = RF Single Category 32.9 35.5 37.1 38.7 Table 3: Test results for the model with a single non-terminal category and various emission priors (BLEU). MLE P0 = RF 5 Categories 29.9 38.8 Table 4: Test set results for the hierarchical model with the variational distribution truncated at five non-terminal categories (BLEU). We first evaluate our model using a grammar with a single non-terminal category (rendering the hierarchical prior redundant) and vary the prior P0 used for the emission parameters. For this model we investigate the effect that the emission and rule-type priors have on translation performance. Figure 3 graphs the variation in Bleu score versus the two free hyperparameters for the model with a simple uniform P0, evaluated on the development corpus. Both graphs show a convex relationship, with αY being considerably more peaked. For the αE hyperparameter the optimal value is 0.75, indicating that the emission distribution benefits from a slightly sparse distribution, but not far from the uniform value of 1.0. The sharp curve for the αY rule-type distribution hyperparameter confirms our earlier hypothesis that the model requires considerable smoothing in order to force it to place probability mass on long derivations rather than simply placing it all on the largest translation pairs. The optimal hyperparameter values on the development data for the two structured emission distribution priors, Model 1 (M 1) and relative frequency (RF), also provide insight into the underlying models. The M 1 prior has a heavy bias towards smaller translation pairs, countering the model’s inherent bias. Thus the optimal value for the αY parameter is 1.0, suggesting that the two biases balance. Conversely the RF prior is biased towards larger translation pairs reinforcing the model’s bias, thus a very large value (106) for the αY parameter gives optimal development set performance. Table 3 shows the performance of the single category models with each of the priors on the test set.4 The results show that all the Bayesian models outperform the MLE, and that non-uniform priors help considerably, with the RF prior obtaining the highest score. In Table 4 we show the results for taking the best performing RF model from the previous experiment and increasing the variational approximation’s truncation limit to five non-terminals. The αP was set to 1.0, corresponding to a sparse distribution over binary productions.5 Here we see that the HDP model improves slightly over the single category approximation. However the baseline MLE model uses the extra categories to overfit the training data significantly, resulting in much poorer generalisation performance. 4For comparison, a state-of-the-art SCFG decoder based on the heuristic estimator, incorporating a trigram language model and using minimum error rate training achieves a BLEU score of approximately 46. 5As there are five non-terminal categories, an αP = 52 would correspond to a uniform distribution. 5 Conclusion We have proposed a Bayesian model for inducing synchronous grammars and demonstrated its efficacy on both synthetic and real machine translation tasks. The sophisticated priors over the model’s parameters address limitations of MLE models, most notably overfitting, and effectively model the nature of the translation task. In addition, the incorporation of a hierarchical prior opens the door to the unsupervised induction of grammars capable of representing the latent structure of translation. Our Bayesian model of translation using synchronous grammars provides a basis upon which more sophisticated models can be built, enabling a move away from the current heuristically engineered translation systems. References [1] Andreas Zollmann and Ashish Venugopal. Syntax augmented machine translation via chart parsing. In Proc. of the HLT-NAACL 2006 Workshop on Statistical Machine Translation, New York City, June 2006. [2] David Chiang. Hierarchical phrase-based translation. Computational Linguistics, 33(2):201–228, 2007. [3] Percy Liang, Slav Petrov, Michael Jordan, and Dan Klein. The infinite PCFG using hierarchical Dirichlet processes. In Proc. of the 2007 Conference on Empirical Methods in Natural Language Processing (EMNLP-2007), pages 688–697, Prague, Czech Republic, 2007. [4] Jenny Rose Finkel, Trond Grenager, and Christopher D. Manning. The infinite tree. In Proc. of the 45th Annual Meeting of the ACL (ACL-2007), Prague, Czech Republic, 2007. [5] 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. [6] Philipp Koehn, Franz Josef Och, and Daniel Marcu. Statistical phrase-based translation. In Proc. of the 3rd International Conference on Human Language Technology Research and 4th Annual Meeting of the NAACL (HLT-NAACL 2003), pages 81–88, Edmonton, Canada, May 2003. [7] Michel Galley, Jonathan Graehl, Kevin Knight, Daniel Marcu, Steve DeNeefe, Wei Wang, and Ignacio Thayer. Scalable inference and training of context-rich syntactic translation models. In Proc. of the 44th Annual Meeting of the ACL and 21st International Conference on Computational Linguistics (COLING/ACL-2006), pages 961–968, Sydney, Australia, July 2006. [8] Dekai Wu. Stochastic inversion transduction grammars and bilingual parsing of parallel corpora. Computational Linguistics, 23(3):377–403, 1997. [9] Colin Cherry and Dekany Lin. Inversion transduction grammar for joint phrasal translation modeling. In Proc. of the HLT-NAACL Workshop on Syntax and Structure in Statistical Translation (SSST 2007), Rochester, USA, 2007. [10] Hao Zhang, Chris Quirk, Robert C. Moore, and Daniel Gildea. Bayesian learning of non-compositional phrases with synchronous parsing. In Proc. of the 46th Annual Conference of the Association for Computational Linguistics: Human Language Technologies (ACL-08:HLT), pages 97–105, Columbus, Ohio, June 2008. [11] Daniel Marcu and William Wong. A phrase-based, joint probability model for statistical machine translation. In Proc. of the 2002 Conference on Empirical Methods in Natural Language Processing (EMNLP2002), pages 133–139, Philadelphia, July 2002. Association for Computational Linguistics. [12] John DeNero, Dan Gillick, James Zhang, and Dan Klein. Why generative phrase models underperform surface heuristics. In Proc. of the HLT-NAACL 2006 Workshop on Statistical Machine Translation, pages 31–38, New York City, June 2006. [13] Philip M. Lewis II and Richard E. Stearns. Syntax-directed transduction. J. ACM, 15(3):465–488, 1968. [14] P. F. Brown, S. A. Della Pietra, V. J. Della Pietra, and R. L. Mercer. The mathematics of statistical machine translation: Parameter estimation. Computational Linguistics, 19(2):263–311, 1993. [15] Mark Johnson. The DOP estimation method is biased and inconsistent. Computational Linguistics, 28(1):71–76, 2002. [16] Matthew Beal. Variational Algorithms for Approximate Bayesian Inference. PhD thesis, The Gatsby Computational Neuroscience Unit, University College London, 2003. [17] Matthias Eck and Chiori Hori. Overview of the IWSLT 2005 evaluation campaign. In Proc. of the International Workshop on Spoken Language Translation, Pittsburgh, October 2005. [18] Kishore Papineni, Salim Roukos, Todd Ward, and Wei-Jing Zhu. Bleu: a method for automatic evaluation of machine translation. In Proc. of the 40th Annual Meeting of the ACL and 3rd Annual Meeting of the NAACL (ACL-2002), pages 311–318, Philadelphia, Pennsylvania, 2002.
2008
172
3,423
Tracking Changing Stimuli in Continuous Attractor Neural Networks C. C. Alan Fung, K. Y. Michael Wong Department of Physics, The Hong Kong University of Science and Technology, Clear Water Bay, Hong Kong, China alanfung@ust.hk, phkywong@ust.hk Si Wu Department of Informatics, University of Sussex, Brighton, United Kingdom Institute of Neuroscience, Shanghai Institutes for Biological Sciences, State Key Laboratory of Neurobiology, Chinese Academy of Sciences, Shanghai 200031, China. siwu@ion.ac.cn Abstract Continuous attractor neural networks (CANNs) are emerging as promising models for describing the encoding of continuous stimuli in neural systems. Due to the translational invariance of their neuronal interactions, CANNs can hold a continuous family of neutrally stable states. In this study, we systematically explore how neutral stability of a CANN facilitates its tracking performance, a capacity believed to have wide applications in brain functions. We develop a perturbative approach that utilizes the dominant movement of the network stationary states in the state space. We quantify the distortions of the bump shape during tracking, and study their effects on the tracking performance. Results are obtained on the maximum speed for a moving stimulus to be trackable, and the reaction time to catch up an abrupt change in stimulus. 1 Introduction Understanding how the dynamics of a neural network is shaped by the network structure, and consequently facilitates the functions implemented by the neural system, is at the core of using mathematical models to elucidate brain functions [1]. The impact of the network structure on its dynamics is twofold: on one hand, it decides stationary states of the network which leads to associative memory; and on the other hand, it carves the landscape of the state space of the network as a whole which may contribute to other cognitive functions, such as movement control, spatial navigation, population decoding and object categorization. Recently, a type of attractor networks, called continuous attractor neural networks (CANNs), has received considerable attention (see, e.g., [2, 3, 4, 6, 7, 8, 9, 10, 11, 12, 13, 5]). These networks possess a translational invariance of the neuronal interactions. As a result, they can hold a family of stationary states which can be translated into each other without the need to overcome any barriers. Thus, in the continuum limit, they form a continuous manifold in which the system is neutrally stable, and the network state can translate easily when the external stimulus changes continuously. Beyond pure memory retrieval, this large-scale stucture of the state space endows the neural system with a tracking capability. This is different from conventional models of associative memory, such as the Hopfield model [14], in which the basin of each attactor is well separated from the others. The tracking dynamics of a CANN has been investigated by several authors in the literature (see, e.g., [3, 4, 5, 8, 11]). These studies have shown that a CANN has the capacity of tracking a moving 1 stimulus continuously and that this tracking property can well justify many brain functions. Despite these successes, however, a detailed analysis of the tracking behaviors of a CANN is still lacking. These include, for instance, 1) the conditions under which a CANN can successfully track a moving stimulus, 2) the distortion of the shape of the network state during the tracking, and 3) the effects of these distortions on the tracking speed. In this paper we will report, as far as we know, the first systematic study on these issues. We hope this study will help to establish a complete picture about the potential applications of CANNs in neural systems. We will use a simple, analytically-solvable, CANN model as the working example. We display clearly how the dynamics of a CANN is decomposed into different distortion modes, corresponding to, respectively, changes in the height, position, width and skewness of the network state. We then demonstrate which of them dominates the tracking behaviors of the network. In order to solve the dynamics which is otherwise extremely complicated for a large recurrent network, we develop a time-dependent perturbation method to approximate the tracking performance of the network. The solution is expressed in a simple closed-form, and we can approximate the network dynamics up to an arbitory accuracy depending on the order of perturbation used. We expect that our method will provide a useful tool for the theoretical studies of CANNs. Our work generates new predictions on the tracking behaviors of CANNs, namely, the maximum tracking speed to moving stimuli, and the reaction time to sudden changes in external stimuli, both are testable by experiments. 2 The Intrinsic Dynamics of CANNs We consider a one-dimensional continuous stimulus being encoded by an ensemble of neurons. The stimulus may represent, for example, the moving direction, the orientation, or a general continuous feature of an external object. Let U(x, t) be the synaptic input at time t to the neurons with preferred stimulus of real-valued x. We will consider stimuli and responses with correlation length a much less than the range of x, so that the range can be effectively taken to be (−∞, ∞). The firing rate r(x, t) of these neurons increases with the synaptic input, but saturates in the presence of a global activity-dependent inhibition. A solvable model that captures these features is given by r(x, t) = U(x, t)2 1 + kρ R dx′U(x′, t)2 , (1) where ρ is the neural density, and k is a small positive constant controlling the strength of global inhibition. The dynamics of the synaptic input U(x, t) is determined by the external input Iext(x, t), the network input from other neurons, and its own relaxation. It is given by τ dU(x, t) dt = Iext(x, t) + ρ Z dx′J(x, x′)r(x′, t) −U(x, t), (2) where τ is the time constant, which is typically of the order 1 ms, and J(x, x′) is the neural interaction from x′ to x. The key characteristic of CANNs is the translational invariance of their neural interactions. In our solvable model, we choose Gaussian interactions with a range a, namely, J(x, x′) = exp[−(x −x′)2/(2a2)]J/ √ 2πa2. (3) CANN models with other neural interactions and inhibition mechanisms have been studied [2, 3, 4, 7, 9]. However, our model has the advantage of permitting a systematic perturbative improvement. Nevertheless, the final conclusions of our model are qualitatively applicable to general cases (to be further discussed at the end of the paper). We first consider the intrinsic dynamics of the CANN model in the absence of external stimuli. For 0 < k < kc ≡ρJ2/(8 √ 2πa), the network holds a continuous family of stationary states, which are ˜U(x|z) = U0 exp · −(x −z)2 4a2 ¸ , (4) where U0 = [1 + (1 −k/kc)1/2]J/(4√πak). These stationary states are translationally invariant among themselves and have the Gaussian bumped shape peaked at arbitrary positions z. The stability of the Gaussian bumps can be studied by considering the dynamics of fluctuations. Consider the network state U(x, t) = ˜U(x|z) + δU(x, t). Then we obtain τ d dtδU(x, t) = Z dx′F(x, x′)δU(x′, t) −δU(x, t), (5) 2 -2 -1 0 1 2 -1 -0.5 0 0.5 1Width -2 -1 0 1 2 -1 -0.5 0 0.5 1Skew -2 -1 0 1 2 -1 -0.5 0 0.5 1 Height -2 -1 0 1 2 -0.5 -0.25 0 0.25 0.5 Position v0 v1 v2 v3 Figure 1: The first four basis functions of the quantum harmonic oscillators, which represent four distortion modes of the network dynamics, namely, changes in the height, position, width and skewness of a bump state. where the interaction kernel is given by F(x, x′) = ρ R dx′′J(x, x′′)∂r(x′′)/∂U(x′). 2.1 The motion modes To compute the eigenfunctions and eigenvalues of the kernel F(x, x′), we choose the wave functions of the quantum harmonic oscillators as the basis, namely, vn(x|z) = exp(−ξ2/2)Hn(ξ) p (2π)1/2an!2n , (6) where ξ ≡(x −a)/( √ 2a) and Hn(ξ) is the nth order Hermite polynomial function. Indeed, the ground state of the quantum harmonic oscillator corresponds to the Gaussian bump, and the first, second, and third excited states correspond to fluctuations in the peak position, width, and skewness of the bump respectively (see Fig. 1). The eigenvalues of the kernel F are calculated to be λ0 = 1 −(1 −k/kc)1/2; λn = 1/2n−1, for n ≥1. (7) The eigenfunctions of F can also be analytically calculated, which turn out to be either the basis functions vn(x|z) or a linear combination of them. Here we only list the first four of them, which are u0(x|z) = v0(x|z), u1(x|z) = v1(x|z), u2(x|z) = 1/( √ 2D0)v0(x|z) + (1 −2 p 1 −k/kc)/D0v2(x|z), with D0 = [(1 −2 p 1 −k/kc)2 + 1/2]1/2 and u3(x|z) = p 1/7v1(x, z) + p 6/7v3(x, z). The eigenfunctions of F correspond to the various distortion modes of the bump. Since λ1 = 1 and all other eigenvalues are less than 1, the stationary state is neutrally stable in one component, and stable in all other components. The first two eigenfunctions are particularly important. (1) The eigenfunction for the eigenvalue λ0 is u0(x|z), and represents a distortion of the amplitude of the bump. As we shall see, amplitude changes of the bump affect its tracking performance. (2) Central to the tracking capability of CANNs, the eigenfunction for the eigenvalue 1 is u1(x|z) and is neutrally stable. We note that u1(x|z) ∝∂v0(x|z)/∂z, corresponding to the shift of the bump position among the stationary states. This neutral stability is the consequence of the translational invariance of the network. It implies that when there are external inputs, however small, the bump will move continuously. This is a unique property associated with the special structure of a CANN, not shared by other attractor models. Other eigenfunctions correspond to distortions of the shape of the bump, for example, the eigenfunction u3(x|z) corresponds to a skewed distortion of the bump. 2.2 The energy landscape It is instructive to consider the energy landscape in the state space of a CANN. Since F(x, x′) is not symmetric, a Lyapunov function cannot be derived for Eq. (5). Nevertheless, for each peak position z, one can define an effective energy function E|z = P n(1 −λn)bn|2 z/2, where bn|z is the overlap 3 -2 0 2 x 0 0.5 1 1.5 2 U(x) Figure 2: The canyon formed by the stationary states of a CANN projected onto the subspace formed by b1|0, the position shift, and b0|0, the height distortion. Motion along the canyon corresponds to the displacement of the bump (inset). between U(x) −˜U(x|z) and the nth eigenfunction of F centered at z. Then the dynamics in Eq. (5) can be locally described by the gradient descent of E|z in the space of bn|z. Since the set of points bn|z = 0 for n ̸= 1 traces out a line with E|z = 0 in the state space when z varies, one can envisage a canyon surrounding the line and facilitating the local gradient descent dynamics, as shown in Fig. 2. A small force along the tangent of the canyon can move the network state easily. This illustrates how the landscape of the state space of a CANN is shaped by the network structure, leading to the neutral stability of the system, and how this neutral stability shapes the network dynamics. 3 The Tracking Behaviors We now consider the network dynamics in the presence of a weak external stimulus. Suppose the neural response at time t is peaked at z(t). Since the dynamics is primarily dominated by the translational motion of the bump, with secondary distortions in shape, we may develop a time-dependent perturbation analysis using {vn(x|z(t))} as the basis, and consider perturbations in increasing orders of n. This is done by considering solutions of the form U(x, t) = ˜U(x|z(t)) + ∞ X n=0 an(t)vn(x|z(t)). (8) Furthermore, since the Gaussian bump is the steady-state solution of the dynamical equation in the absence of external stimuli, the neuronal interaction term in Eq. (2) can be linearized for weak stimuli. Making use of the orthonormality and completeness of {vn(x|z(t))}, we obtain from Eq. (2) expressions for dan/dt at each order n of perturbation, which are à d dt + 1 −λn τ ! an = In τ − " U0 q (2π)1/2aδn1 + √nan−1 − √ n + 1an+1 # 1 2a dz dt + 1 τ ∞ X r=1 r (n + 2r)! n! (−1)r 2n+3r−1r!an+2r, (9) where In(t) is the projection of the external input Iext(x, t) on the nth eigenfunction. Determining z(t) by the center of mass of U(x, t), we obtain the self-consistent condition dz dt = 2a τ à I1 + P∞ n=3,odd p n!!/(n −1)!!In + a1 U0 p (2π)1/2a + P∞ n=0,even p (n −1)!!/n!!an ! . (10) Eqs.(9) and (10) are the master equations of the perturbation method. We can approximate the network dynamics up to an arbitary accuracy depending on the choice of the order of perturbation. In practice, low order perturbations already yield very accurate results. 3.1 Tracking a moving stimulus Consider the external stimulus consisting of a Gaussian bump, namely, Iext(x, t) = αU0 exp[−(x− z0)2/4a2]. Perturbation up to the order n = 1 yields a1(t) = 0, [d/dt + (1 −λ0)/τ]a0 = 4 0 50 100 150 200 250 t 0 1 2 3 4 s (a) 0 0.01 0.02 0.03 0.04 v 0 0.2 0.4 0.6 0.8 1 s vmax (b) Figure 3: (a) The time dependence of the separation s starting from different initial values. Symbols: simulations with N = 200 and v = 0.025. Lines: n = 5 perturbation. Dashed lines: s1 (bottom) and s2 (top). (b) The dependence of the terminal separation s on the stimulus speed v. Symbols: simulations with N = 200. Dashed line: n = 1 perturbation. Parameters: α = 0.05, a = 0.5, τ = 1, k = 0.5, ρ = N/(2π), J = √ 2πa2. αU0 p (2π)1/2a exp[−(z0 −z)2/8a2]/τ, and dz dt = α τ (z0 −z) exp · −(z0 −z)2 8a2 ¸ R(t)−1, (11) where R(t) = 1 + α R t −∞(dt′/τ) exp[−(1 −λ0)(t −t′)/τ −(z0 −z(t′))2/8a2], representing the ratio of the bump height relative to that in the absence of the external stimulus (α = 0). Hence, the dynamics is driven by a pull of the bump position towards the stimulus position z0. The factor R(t) > 1 implies that the increase in amplitude of the bump slows down its response. The tracking performance of a CANN is a key property that is believed to have wide applications in neural systems. Suppose the stimulus is moving at a constant velocity v. The dynamical equation becomes identical to Eq. (11), with z0 = vt. Denoting the lag of the bump behind the stimulus by s = z0 −z we have, after the transients, ds dt = v −g(s); g(s) ≡αse−s2/8a2 τ " 1 + αe−s2/8a2 1 −λ0 #−1 . (12) The value of s is determined by two competing factors: the first term represents the movement of the stimulus, which tends to enlarge the separation, and the second term represents the collective effects of the neuronal recurrent interactions, which tends to reduce the lag. Tracking is maintained when these two factors match each other, i.e., v = g(s); otherwise, s diverges. The function g(s) is concave, and has the maximum value of gmax = 2αa/(τ√e) at s = 2a. This means that if v > gmax, the network is unable to track the stimulus. Thus, gmax defines the maximum trackable speed of a moving stimulus. Notably, gmax increases with the strength of the external signal and the range of neuronal recurrent interactions. This is reasonable since it is the neuronal interactions that induce the movement of the bump. gmax decreases with the time constant of the network, as this reflects the responsiveness of the network to external inputs. On the other hand, for v < gmax, there is a stable and unstable fixed point of Eq. (12), respectively denoted by s1 and s2. When the initial distance is less than s2, it will converge to s1. Otherwise, the tracking of the stimulus will be lost. Figs. 3(a) and (b) show that the analytical results of Eq. (12) well agree with the simulation results. 3.2 Tracking an abrupt change of the stimulus Suppose the network has reached a steady state with an external stimulus stationary at t < 0, and the stimulus position jumps from 0 to z0 suddenly at t = 0. This is a typical scenario in experiments studying mental rotation behaviors. We first consider the case that the jump size z0 is small compared with the range a of neuronal interactions. In the limit of weak stimulus, the dynamics is described by Eq. (11) with R(t) = 1. We are interested in estimating the reaction time T, which is 5 the time taken by the bump to move to a small distance θ from the stimulus position. The reaction time increases logarithmically with the jump size, namely, T ≈(τ/α) ln(|z0|/θ). 0 0.5 1 1.5 2 2.5 3 z0 0 100 200 300 400 T Simulation "n=1" perturbation "n=2" perturbation "n=3" perturbation "n=4" perturbation "n=5" perturbation (a) -2 0 2 x 0 0.5 1 1.5 2 U(x) (b) Figure 4: (a) The dependence of the reaction time T on the new stimulus position z0. Parameters: as in Fig.3. (b) Profiles of the bump between the old and new positions at z0 = π/2 in the simulation. When the strength α of the external stimulus is larger, improvement using a perturbation analysis up to n = 1 is required when the jump size z0 is large. This amounts to taking into account the change of the bump height during its movement from the old to new position. The result is identical to Eq. (11), with R(t) replaced by R(t) = 1 + α 1 −λ0 exp · −(1 −λ0) τ t ¸ + α Z t 0 dt′ τ exp · −(1 −λ0) τ (t −t′) −(z0 −z(t′))2 8a2 ¸ . (13) Indeed, R(t) represents the change in height during the movement of the bump. Contributions from the second and third terms show that it is highest at the initial and final positions respectively, and lowest at some point in between, agreeing with simulation results shown in Fig. 4(b). Fig. 4(a) shows that the n = 1 perturbation overcomes the insufficiency of the logarithmic estimate, and has an excellent agreement with simulation results for z0 up to the order of 2a. We also compute the reaction time up to the n = 5 perturbation, and the agreement with simulations remains excellent even when z0 goes beyond 2a. This implies that beyond the range of neuronal interaction, tracking is influenced by the distortion of the width and the skewed shape of the bump. 4 The Two-Dimensional Case We can straightforwardly extend the above analysis to two-dimensional (2D) CANNs. Consider a neural ensemble encoding a 2D continuous stimulus x = (x1, x2), and the network dynamics satisfies Eqs. (1-3) with x and x′ being replaced by x and x′, respectively. We can check that the network holds a continuous family of stationary states given by ˜U(x|z) = U0 exp · −(x −z)2 4a2 ¸ , (14) where z is a free parameter indicating the position of the network state in a 2D manifold, and (x −z)2 = (x1 −z1)2 + (x2 −z2)2 the Euclidean distance between x and z. By applying the stability analysis as in Sec. 2, we obtain the distortion modes of the bump dynamics, which are expressed as the product of the motion modes in the 1D case, i.e., um,n(x|z) = um(x1|z1)un(x2|z2), for m, n = 0, 1, 2, . . . (15) The eigenvalues for these motion modes are calculated to be λ0,0 = λ0, λm,0 = λm, for m ̸= 0, λ0,n = λn, for n ̸= 0, and λm,n = λmλn, for m ̸= 0 and n ̸= 0. The mode u1,0(x|z) corresponds to the position shift of the bump in the direction x1 and u0,1(x|z) the position shift in the direction x2. A linear combination of them, c1u1,0(x|z) + c2u0,1(x|z), corresponds to the position shift of the bump in the direction (c1, c2). We see that the eigenvalues 6 for these motion modes are 1, implying that the network is neutrally stable in the 2D manifold. The eigenvalues for all other motion modes are less than 1. Figure 5 illustrates the tracking of a 2D stimulus, and the comparison of simulation results on the reaction time with the perturbative approach. The n = 1 perturbation already has an excellent agreement over a wide range of stimulus positions. -3 -2 -1 0 1 2 3 -3-2-1 0 1 2 3 0 0.2 0.4 0.6 0.8 1 1.2 U(x,y) (a) x y 0 0.5 1 1.5 2 2.5 3 |z0 - z(0)| 0 100 200 300 400 T Simulation Theory (b) Figure 5: (a) The tracking process of the network; (b) The reaction time vs. the jump size. The simulation result is compared with the theoretical prediction. Parameters: N = 40 × 40, k = 0.5, a = 0.5, τ = 1, J = √ 2πa2, ρ = N/(2π)2 and α = 0.05. 5 Conclusions and Discussions To conclude, we have systematically investigated how the neutral stability of a CANN facilitates the tracking performance of the network, a capability which is believed to have wide applications in brain functions. Two interesting behaviors are observed, namely, the maximum trackable speed for a moving stimulus and the reaction time for catching up an abrupt change of a stimulus, logarithmic for small changes and increasing rapidly beyond the neuronal range. These two properties are associated with the unique dynamics of a CANN. They are testable in practice and can serve as general clues for checking the existence of a CANN in neural systems. In order to solve the dynamics which is otherwise extremely complicated for a large recurrent network, we have developed a perturbative analysis to simplify the dynamics of a CANN. Geometrically, it is equivalent to projecting the network state on its dominant directions of the state space. This method works efficiently and may be widely used in the study of CANNs. The special structure of a CANN may have other applications in brain functions, for instance, the highly structured state space of a CANN may provide a neural basis for encoding the topological relationship of objects in a feature space, as suggested by recent psychophysical experiments [15, 16]. It is likely that the distance between two memory states in a CANN defines the perceptual similarity between the two objects. Interestingly to note that the perceptual similarity measured by the psychometric functions of human subjects in a categorization task has a similar logarithimic nature as that of reaction times in a CANN [17]. To study these issues theoretically and justify the experimental findings, it is important for us to have analytic solutions of the state space and the dynamical behaviors of CANNs. We expect the analytical solution developed here will serve as a valuable mathematical tool. The tracking dynamics of a CANN has also been studied by other authors. In particular, Zhang proposed a mechanism of using asymmetrical recurrent interactions to drive the bump, so that the shape distortion is minimized [4]. Xie et al. further proposed a double ring network model to achieve these asymmetrical interactions in the head-direction system [8]. It is not clear how this mechanism can be generated in other neural systems. For instance, in the visual and hippocampal systems, it is often assumed that the bump movement is directly driven by external inputs (see, e.g., [5, 19, 20]), and the distortion of the bump is inevitable (indeed the bump distortions in [19, 20] are associated with visual perception). The contribution of this study is on that we quantify how the distortion of the bump shape affects the network tracking performance, and obtain a new finding on the maximum trackable speed of the network. 7 Finally, we would like to remark on the generality of the results in this work and their relationships to other studies in the literature. To pursue an analytical solution, we have used a divisive normalization to represent the inhibition effect. This is different from the Mexican-hat type of recurrent interactions used by many authors. For the latter, it is often difficult to get a closed-form of the network stationary state. Amari used a Heaviside function to simplify the neural response, and obtained the boxshaped network stationary state [2]. However, since the Heaviside function is not differentiable, it is difficult to describe the tracking dynamics in the Amari model. Truncated sinusoidal functions have been used, but it is difficult to use them to describe general distortions of the bumps [3]. Here, by using divisive normalization and the Gaussian-shaped recurrent interactions, we solve the network stationary states and the tracking dynamics analytically. One may be concerned about the feasibility of the divisive normalization. First, we argue that neural systems can have resources to implement this mechanism [7, 18]. Let us consider, for instance, a neural network, in which all excitatory neurons are connected to a pool of inhibitory neurons. Those inhibitory neurons have a time constant much shorter than that of excitatory neurons, and they inhibit the activities of excitatory neurons in a uniform shunting way, thus achieving the effect of divisive normalization. Second, and more importantly, the main conclusions of our work are qualitatively indpendent of the choice of the model. This is because our calculation is based on the fact that the dynamics of a CANN is dominated by the motion mode of position shift of the network state, and this property is due to the translational invariance of the neuronal recurrent interactions, rather than the inhibition mechanism. We have formally proved that for a CANN model, once the recurrent interactions are translationally invariant, the interaction kernel has a unit eigenvalue with respect to the position shift mode irrespective of the inhibition mechanism (to be reported elsewhere). This work is partially supported by the Research Grant Council of Hong Kong (Grant No. HKUST 603606 and HKUST 603607), BBSRC (BB/E017436/1) and the Royal Society. References [1] P. Dayan and L. Abbott, Theoretical Neuroscience: Computational and Mathematical Modelling of Neural Systems, (MIT Press, Cambridge MA, 2001). [2] S. Amari, Biological Cybernetics 27, 77 (1977). [3] R. Ben-Yishai, R. Lev Bar-Or and H. Sompolinsky, Proc. Natl. Acad. Sci. USA, 92 3844 (1995). [4] K.-C. Zhang, J. Neurosicence 16, 2112 (1996). [5] A. Samsonovich and B. L. McNaughton, J. Neurosci. 17, 5900 (1997). [6] B. Ermentrout, Reports on Progress in Physics 61, 353 (1998). [7] S. Deneve, P. Latham and A. Pouget, Nature Neuroscience, 2, 740 (1999). [8] X. Xie, R. H. R. Hahnloser and S. Seung, Phys. Rev. E 66, 041902 (2002). [9] A. Renart, P. Song and X. Wang, Neuron 38, 473 (2003). [10] C. Brody, R. Romo and A. Kepecs, Current Opinion in Neurobiology, 13, 204-211 (2003) [11] S. Wu and S. Amari, Neural Computation 17, 2215 (2005) [12] B. Blumenfeld, S. Preminger, D. Sagi and M. Tsodyks, Neuron 52, 383 (2006). [13] C. Chow and S. Coombes, SIAM J. Appl. Dyn. Sys. 5, 552-574, 2006. [14] J. Hopfield, Proc. Natl. Acad. Sci. USA, 79 2554 (1982). [15] J. Jastorff, Z. Kourtzi and M. Giese, J. Vision 6, 791 (2006). [16] A. B. A. Graf, F. A. Wichmann, H. H. B¨ulthoff, and B. Sch¨olkopf, Neural Computation 18, 143 (2006). [17] J. Zhang, J. Mathematical Psychology 48, 409 (2004) [18] D. Heeger, J. Neurophysiology 70, 1885 (1993). [19] M. Berry II, I. Brivanlou, T. Jordon and M. Meister, Nature 398, 334 (1999). [20] Y. Fu, Y. Shen and Y. Dan, J. Neuroscience 21, 1 (2001). 8
2008
173
3,424
Gaussian-process factor analysis for low-dimensional single-trial analysis of neural population activity Byron M. Yu1,2,4, John P. Cunningham1, Gopal Santhanam1, Stephen I. Ryu1,3, Krishna V. Shenoy1,2 1Department of Electrical Engineering, 2Neurosciences Program, 3Department of Neurosurgery, Stanford University, Stanford, CA 94305 {byronyu,jcunnin,gopals,seoulman,shenoy}@stanford.edu Maneesh Sahani4 4Gatsby Computational Neuroscience Unit, UCL London, WC1N 3AR, UK maneesh@gatsby.ucl.ac.uk Abstract We consider the problem of extracting smooth, low-dimensional neural trajectories that summarize the activity recorded simultaneously from tens to hundreds of neurons on individual experimental trials. Current methods for extracting neural trajectories involve a two-stage process: the data are first “denoised” by smoothing over time, then a static dimensionality reduction technique is applied. We first describe extensions of the two-stage methods that allow the degree of smoothing to be chosen in a principled way, and account for spiking variability that may vary both across neurons and across time. We then present a novel method for extracting neural trajectories, Gaussian-process factor analysis (GPFA), which unifies the smoothing and dimensionality reduction operations in a common probabilistic framework. We applied these methods to the activity of 61 neurons recorded simultaneously in macaque premotor and motor cortices during reach planning and execution. By adopting a goodness-of-fit metric that measures how well the activity of each neuron can be predicted by all other recorded neurons, we found that GPFA provided a better characterization of the population activity than the two-stage methods. 1 Introduction Neural responses are typically studied by averaging noisy spiking activity across multiple experimental trials to obtain firing rates that vary smoothly over time. However, particularly in cognitive tasks (such as motor planning or decision making) where the neural responses are more a reflection of internal processing rather than external stimulus drive, the timecourse of the neural responses may differ on nominally identical trials. In such settings, it is critical that the neural data not be averaged across trials, but instead be analyzed on a trial-by-trial basis [1, 2, 3, 4]. Single-trial analyses can leverage the simultaneous monitoring of large populations of neurons in vivo, currently ranging from tens to hundreds in awake, behaving animals. The approach adopted by recent studies is to consider each neuron being recorded as a noisy sensor reflecting the timeevolution of an underlying neural process [3, 5, 6, 7, 8, 9, 10]. The goal is to uncover this neural process by extracting a smooth, low-dimensional neural trajectory from the noisy, high-dimensional recorded activity on a single-trial basis. The neural trajectory provides a compact representation of 1 the high-dimensional recorded activity as it evolves over time, thereby facilitating data visualization and studies of neural dynamics under different experimental conditions. A common method to extract neural trajectories is to first estimate a smooth firing rate profile for each neuron on a single trial (e.g., by convolving each spike train with a Gaussian kernel), then apply a static dimensionality reduction technique (e.g., principal components analysis, PCA) [8, 11]. Smooth firing rate profiles may also be obtained by averaging across a small number of trials (if the neural timecourses are believed to be similar on different trials) [6, 7, 9, 10], or by applying more advanced statistical methods for estimating firing rate profiles from single spike trains [12, 13]. Numerous linear and non-linear dimensionality reduction techniques exist, but to our knowledge only PCA [8, 9, 11] and locally linear embedding (LLE) [6, 7, 10, 14] have been applied in this context to neural data. While this two-stage method of performing smoothing then dimensionality reduction has provided informative low-dimensional views of neural population activity, there are several aspects that can be improved. (i) For kernel smoothing, the degree of smoothness is often chosen in an ad hoc way. We would instead like to learn the appropriate degree of smoothness from the data. Because the operations of kernel smoothing, PCA, and LLE are all non-probabilistic, standard likelihood techniques for model selection are not applicable. Even if a probabilistic dimensionality reduction algorithm is used, the likelihoods would not be comparable because different smoothing kernels yield different smoothed data. (ii) The same kernel width is typically used for all spike trains, which implicitly assumes that the neural population activity evolves with a single timescale. We would instead like to allow for the possibility that the system operates under multiple timescales. (iii) PCA and LLE have no explicit noise model and, therefore, have difficulty distinguishing between spiking noise (whose variance may vary both across neurons and across time) and changes in the underlying lowdimensional neural state. (iv) Because the smoothing and dimensionality reduction are performed sequentially, there is no way for the dimensionality reduction algorithm to influence the degree or form of smoothing used. This is relevant both to the identification of the low-dimensional space, as well as to the extraction of single-trial neural trajectories. We first briefly describe relatively straightforward extensions of the two-stage methods that can help to address issues (i) and (iii) above. For (i), we adopt a goodness-of-fit metric that measures how well the activity of each neuron can be predicted by the activity of all other recorded neurons, based on data not used for model fitting. This metric can be used to compare different smoothing kernels and allows for the degree of smoothness to be chosen in a principled way. In Section 6, we will use this as a common metric by which different methods for extracting neural trajectories are compared. For (iii), we can apply the square-root transform to stabilize the spiking noise variance and factor analysis (FA) [15] to explicitly model possibly different independent noise variances for different neurons. These extensions are detailed in Sections 2 and 3. Next, we introduce Gaussian-process factor analysis (GPFA), which unifies the smoothing and dimensionality reduction operations in a common probabilistic framework. GPFA takes steps toward addressing all of the issues (i)–(iv) described above, and is shown in Section 6 to provide a better characterization of the recorded population activity than the two-stage methods. Because GPFA performs the smoothing and dimensionality reduction operations simultaneously rather than sequentially, the degree of smoothness and the relationship between the low-dimensional neural trajectory and the high-dimensional recorded activity can be jointly optimized. Different dimensions in the low-dimensional space (within which the neural state evolves) can have different timescales, whose optimal values can be found automatically by fitting the GPFA model to the recorded activity. As in FA, GPFA specifies an explicit noise model that allows different neurons to have different independent noise variances. The time series model involves Gaussian processes (GP), which only require the specification of the correlation structure of the neural state over time. A critical assumption when attempting to extract a low-dimensional neural trajectory is that the recorded activity evolves within a low-dimensional manifold. Previous studies have typically assumed that the neural trajectories lie in a three-dimensional space for ease of visualization. In this work, we will investigate whether this low-dimensional assumption is justified in the context of motor preparation and execution and, if so, attempt to identify the appropriate dimensionality. Sections 2 and 3 detail GPFA and the goodness-of-fit metric, respectively. Section 4 relates GPFA to dynamical systems approaches. After describing the experimental setup in Section 5, we apply the 2 developed methods to neural activity recorded in premotor and motor cortices during reach planning and execution in Section 6. 2 Gaussian-process factor analysis The motivation for GPFA can be traced back to the use of PCA for extracting informative lowdimensional views of high-dimensional neural data. Consider spike counts taken in non-overlapping time bins. PCA (or its probabilistic form, PPCA [15]) attempts to find the directions in the highdimensional data with greatest variance. This is problematic for neural data for two reasons. First, because neurons with higher mean counts are known to exhibit higher count variances, the directions found by PCA tend to be dominated by the most active neurons. Second, PCA assumes that the spiking noise variance is time independent; however, neurons are known to change their firing rates, and therefore noise variances, over time. A possible solution is to replace the Gaussian likelihood model of PPCA with a point-process [5] or Poisson [3] likelihood model. Here, we consider a simpler approach that preserves computational tractability. The square-root transform is known to both stabilize the variance of Poisson counts and allow Poisson counts to be more closely modeled by a Gaussian distribution, especially at low Poisson means [16]. Thus, the two issues above can be largely resolved by applying PCA/PPCA to square-rooted spike counts, rather than raw spike counts. However, the spiking noise can deviate from a Poisson distribution [17], in which case the noise variance is not entirely stabilized. As will be shown in Section 6, the square-rooted counts can be better characterized by further replacing PCA/PPCA with FA [15], which allows different neurons to have different independent noise variances. In this work, we extend FA for use with time series data. PCA, PPCA, and FA are all static dimensionality reduction techniques. In other words, none of them take into account time labels when applied to time series data; the time series data are simply treated as a collection of data points. GPFA is an extension of FA that can leverage the time label information to provide more powerful dimensionality reduction. The GPFA model is simply a set of factor analyzers (one per timepoint, each with identical parameters) that are linked together in the low-dimensional state space by a Gaussian process (GP) [18] prior. Introducing the GP allows for the specification of a correlation structure across the low-dimensional states at different timepoints. For example, if the system underlying the time series data is believed to evolve smoothly over time, we can specify that the system’s state should be more similar between nearby timepoints than between faraway timepoints. Extracting a smooth, low-dimensional neural trajectory can therefore be viewed as a compromise between the low-dimensional projection of each data point found by FA and the desire to string them together using a smooth function over time. The GPFA model can also be obtained by letting time indices play the role of inputs in the semiparametric latent factor model [19]. The following is a mathematical description of GPFA. Let y:,t ∈Rq×1 be the high-dimensional vector of square-rooted spike counts recorded at timepoint t ∈{1, . . . , T}, where q is the number of neurons being recorded simultaneously. We seek to extract a corresponding low-dimensional latent neural state x:,t ∈Rp×1 at each timepoint, where p is the dimensionality of the state space (p < q). For notational convenience, we group the neural states from all timepoints into a neural trajectory denoted by the matrix X = [x:,1, . . . , x:,T ] ∈Rp×T . Similarly, the observations can be grouped into a matrix Y = [y:,1, . . . , y:,T ] ∈Rq×T . We define a linear-Gaussian relationship between the observations y:,t and neural states x:,t y:,t | x:,t ∼N (Cx:,t + d, R) , (1) where C ∈Rq×p, d ∈Rq×1, and R ∈Rq×q are model parameters to be learned. As in FA, we constrain the covariance matrix R to be diagonal, where the diagonal elements are the independent noise variances of each neuron. In general, different neurons can have different independent noise variances. Although a Gaussian is not strictly a distribution on square-rooted counts, its use in (1) preserves computational tractability. The neural states x:,t at different timepoints are related through Gaussian processes, which embody the notion that the neural trajectories should be smooth. We define a separate GP for each dimension of the state space indexed by i ∈{1, . . . , p} xi,: ∼N (0, Ki) , (2) 3 where xi,: ∈R1×T is the ith row of X and Ki ∈RT ×T is the covariance matrix for the ith GP [20]. The form of the GP covariance can be chosen to provide different smoothing properties on the neural trajectories. In this work, we chose the commonly-used squared exponential (SE) covariance function Ki(t1, t2) = σ2 f,i · exp  −(t1 −t2)2 2 · τ 2 i  + σ2 n,i · δt1,t2, (3) where Ki(t1, t2) denotes the (t1, t2)th entry of Ki and t1, t2 ∈{1, . . . , T}. The SE covariance is defined by its signal variance σ2 f,i ∈R+, characteristic timescale τi ∈R+, and noise variance σ2 n,i ∈R+. Due to redundancy in the scale of X and C, we fix the scale of X and allow C to be learned unconstrained, without loss of generality. By direct analogy to FA, we defined the prior distribution of the neural state x:,t at each timepoint t to be N (0, I) by setting σ2 f,i = 1 −σ2 n,i, where 0 < σ2 n,i ≤1. Furthermore, because we seek to extract smooth neural trajectories, we set σ2 n,i to a small value (10−3). Thus, the timescale τi is the only (hyper)parameter of the SE covariance that is learned. The SE is an example of a stationary covariance; other stationary and non-stationary GP covariances [18] can be applied in a seamless way. The parameters of the GPFA model can be learned in a straightforward way using the expectationmaximization (EM) algorithm. In the E-step, the Gaussian posterior distribution P(X | Y ) can be computed exactly because the x:,t and y:,t across all timepoints are jointly Gaussian, by definition. In the M-step, the parameters updates for C, d, and R can be expressed in closed form. The characteristic timescales τi can be updated using any gradient optimization technique. Note that the degree of smoothness (defined by the timescales) and the relationship between the low-dimensional neural trajectory and the high-dimensional recorded activity (defined by C) are jointly optimized. Furthermore, a different timescale is learned for each state dimension indexed by i. For the results shown in Section 6, the parameters C, d, and R were initialized using FA, and the τi were initialized to 100 ms. Although the learned timescales were initialization-dependent, their distributions were similar for different initializations. In particular, most learned timescales were less than 150 ms, but there were usually one or two larger timescales around 300 and 500 ms. Once the GPFA model is learned, we can apply a post-processing step to orthonormalize the columns of C. Applying the singular value decomposition, Cx:,t can be rewritten as UC (DCV ′ Cx:,t), where the columns of UC ∈Rq×p are orthonormal and ˜x:,t = DCV ′ Cx:,t ∈Rp×1 is referred to as the orthonormalized neural state at timepoint t. While each dimension of x:,t possesses a single characteristic timescale, each dimension of ˜x:,t represents a mixture of timescales defined by the columns of VC. An advantage of considering ˜x:,t rather than x:,t is that the elements of ˜x:,t (and the corresponding columns of UC) are ordered by the amount of data covariance explained. In contrast, the elements of x:,t (and the corresponding columns of C) have no particular order. Especially when the number of state dimensions p is large, the ordering facilitates the identification and visualization of the dimensions of the orthonormalized neural trajectory that are most important for explaining the recorded activity. Because the columns of UC are orthonormal, one can readily picture how the low-dimensional trajectory relates to the high-dimensional space of recorded activity, in much the same spirit as for PCA. This orthonormalization procedure is also applicable to PPCA and FA. In fact, it is through this orthonormalization procedure that the principal directions found by PPCA are equated to those found by PCA. 3 Leave-neuron-out prediction error We would like to directly compare GPFA to the two-stage methods described in Section 1. Neither the classic approach of comparing cross-validated likelihoods nor the Bayesian approach of comparing marginal likelihoods is applicable here, for the same reason that they cannot be used to select the appropriate degree of smoothness in the two-stage methods. Namely, when the data are altered by different pre-smoothing operations (or the lack thereof in the case of GPFA), the likelihoods are no longer comparable. Instead, we adopted the goodness-of-fit metric mentioned in Section 1, whereby a prediction error is computed based on trials not used for model fitting. The idea is to leave out one neuron at a time and ask how well each method is able to predict the activity of that neuron, given the activity of all other recorded neurons. For GPFA, the model prediction for neuron j is ˆyj,: = E [yj,: | Y−j,:], where yj,: is the jth row of Y and Y−j,: ∈R(q−1)×T represents all but 4 the jth row of Y . The model prediction can be computed analytically because all variables in Y are jointly Gaussian, by definition. Model predictions using PPCA and FA are analogous, but each timepoint is considered individually. The prediction error is defined as the sum-of-squared errors between the model prediction and the observed square-rooted spike count across all neurons and timepoints. One way to compute the GPFA model prediction is via the low-dimensional state space. One can first estimate the neural trajectory using all but the jth neuron P (X | Y−j,:), then map this estimate back out into the space of recorded activity for the jth neuron using (1) to obtain ˆyj,:. Equivalently, one can convert P (X | Y−j,:) into its orthonormalized form before mapping it out into the space of recorded activity using the jth row of UC. Because the orthonormalized dimensions are ordered, we can evaluate the prediction error using only the top ˜p orthonormalized dimensions of ˜x:,t, where ˜p ∈{1, . . . , p}. This reduced GPFA model can make use of a larger number p of timescales than its effective dimensionality ˜p. 4 Linear and non-linear dynamical systems Another way to extract neural trajectories is by defining a parametric dynamical model that describes how the low-dimensional neural state evolves over time. A first-order linear auto-regressive (AR) model [5] captures linear Markovian dynamics. Such a model can be expressed as a Gaussian process, since the state variables are jointly Gaussian. This can be shown by defining a separate first-order AR model for each state dimension indexed by i ∈{1, . . . , p} xi,t+1 | xi,t ∼N  aixi,t, σ2 i  . (4) Given enough time (t →∞) and |ai| < 1, the model will settle into a stationary state that is equivalent to (2) with Ki(t1, t2) = σ2 i 1 −a2 i a|t1−t2| i , (5) as in [21]. Different covariance structures Ki can be obtained by going from a first-order to an nth-order AR model. One drawback of this approach is that it is usually not easy to construct an nth-order AR model with a specified covariance structure. In contrast, the GP approach described in Section 2 requires only the specification of the covariance structure, thus allowing different smoothing properties to be applied in a seamless way. AR models are generally less computationally demanding than those based on GP, but this advantage shrinks as the order of the AR model grows. Another difference is that (5) does not contain an independent noise term σ2 n,i · δt1,t2 as in (3). The innovations noise σ2 i in (4) is involved in setting the smoothness of the time series, as shown in (5). Thus, (4) would need to be augmented to explicitly capture departures from the AR model. One may also consider defining a non-linear dynamical model [3], which typically has a richer set of dynamical behaviors than linear models. The identification of the model parameters provides insight into the dynamical rules governing the time-evolution of the system under study. However, especially in exploratory data analyses, it may be unclear what form this model should take. Even if an appropriate non-linear model can be identified, learning such a model can be unstable and slow due to approximations required [3]. In contrast, learning the GPFA model is stable and approximationfree, as described in Section 2. The use of GPFA can be viewed as a practical way of going beyond a first-order linear AR model without having to commit to a particular non-linear system, while retaining computational tractability. 5 Behavioral task and neural recordings The details of the neural recordings and behavioral task can be found elsewhere [22]. Briefly, a rhesus macaque performed delayed center-out reaches to visual targets presented on a fronto-parallel screen. On a given trial, the peripheral reach target was presented at one of 14 possible locations – two distances (60 and 100 mm) and seven directions (0, 45, 90, 135, 180, 225, 315°). Delay periods were randomly chosen between 200 and 700 ms. Neural activity was recorded using a 96-electrode array (Cyberkinetics, Foxborough, MA) in dorsal premotor and motor cortices. Only those units (61 single and multi-units, experiment G20040123) with robust delay period activity were included in our analyses. 5 5 10 15 2.95 3 3.05 State dimensionality, p Prediction error × 104 100 ms 50 ms 25 ms 100 ms 50 ms 25 ms Figure 1: Prediction errors of two-stage methods (PPCA: red, FA: green), first-order AR model (blue), GPFA (dashed black), and reduced GPFA (solid black), computed using 4fold cross-validation. Labels at right are standard deviations of Gaussian kernels (referred to as kernel widths) for the twostage methods. For reduced GPFA, the horizontal axis corresponds to ˜p rather than p, where the prediction error is computed using only the top ˜p orthonormalized dimensions of a GPFA model fit with p = 15. Star indicates minimum of solid black curve. Analyses in this figure are based on 56 trials for the reach target at distance 60 mm and direction 135°. 6 Results We considered neural data for one reach target at a time, ranging from 200 ms before reach target onset to movement end. This period comprised the 200 ms pre-target time, the randomly chosen delay period (200–700 ms), the monkey’s reaction time (mean±s.d.: 293±48 ms), and the duration of the monkey’s reach (269±40 ms). Spike counts were taken in non-overlapping 20 ms bins, then square-rooted. For the two-stage methods, these square-rooted counts were smoothed over time using a Gaussian kernel. We also considered smoothing spike trains directly, which yielded qualitatively similar results for the two-stage methods. Using the goodness-of-fit metric described in Section 3, we can find the appropriate degree of smoothness for the two-stage methods. Fig. 1 shows the prediction error for PPCA (red) and FA (green) for different kernel widths and state dimensionalities. There are two primary findings. First, FA yielded lower prediction error than PPCA across a range of kernel widths and state dimensionalities. The reason is that FA allows different neurons to have different independent noise variances. Second, for these data, the optimal smoothing kernel width (s.d. of Gaussian kernel) is approximately 40 ms for both FA and PPCA. This was found using a denser sweep of the kernel width than shown in Fig. 1. It is tempting to try to relate this optimal smoothing kernel width (40 ms) to the timescales τi learned by GPFA, since the SE covariance has the same shape as the Gaussian smoothing kernel. However, nearly all of the timescales learned by GPFA are greater than 40 ms. This apparent mismatch can be understood by considering the equivalent kernel of the SE covariance [23], which takes on a sinclike shape whose main lobe is generally far narrower than a Gaussian kernel with the same width parameter. It is therefore reasonable that the timescales learned by GPFA are larger than the optimal smoothing kernel width. The same goodness-of-fit metric can be used to compare the two-stage methods, parametric dynamical models, and GPFA. The parametric dynamical model considered in this work is a first-order AR model described by (2) and (5), coupled with the linear-Gaussian observation model (1). Note that a separate stationary, one-dimensional first-order AR model is defined for each of the p latent dimensions. As shown in Fig. 1, the first-order AR model (blue) yielded lower prediction error than the two-stage methods (PPCA: red, FA: green). Furthermore, GPFA (dashed black) performed as well or better than the two-stage methods and the first-order AR model, regardless of the state dimensionality or kernel width used. As described in Section 3, the prediction error can also be computed for a reduced GPFA model (solid black) using only the top ˜p orthonormalized dimensions, in this case based on a GPFA model fit with p = 15 state dimensions. By definition, the dashed and solid black lines coincide at ˜p = 15. The solid black curve reaches its minimum at ˜p = 10 (referred to as p∗). Thus, removing the lowest five orthonormalized dimensions decreased the GPFA prediction error. Furthermore, this prediction error was lower than when fitting the GPFA model directly with p = 10 (dashed black). These latter findings can be understood by examining the orthonormalized neural trajectories extracted by GPFA shown in Fig. 2. The traces plotted are the orthonormalized form of E[X | Y ]. The panels are arranged in decreasing order of data covariance explained. The top orthonormalized dimensions indicate fluctuations in the recorded population activity shortly after target onset (red 6 -2 -1 0 1 2 ˜x1,: ˜x2,: ˜x3,: ˜x4,: ˜x5,: -2 -1 0 1 2 ˜x6,: ˜x7,: ˜x8,: ˜x9,: ˜x10,: - 2 -1 0 1 2 ˜x11,: 400 ms ˜x12,: ˜x13,: ˜x14,: ˜x15,: Figure 2: Orthonormalized neural trajectories for GPFA with p = 15. Each panel corresponds to one of the 15 dimensions of the orthonormalized neural state, which is plotted versus time. The orthonormalized neural trajectory for one trial comprises one black trace from each panel. Dots indicate time of reach target onset (red), go cue (green), and movement onset (blue). Due to differing trial lengths, the traces on the left/right half of each panel are aligned on target/movement onset for clarity. However, the GPFA model was fit using entire trials with no gaps. Note that the polarity of these traces is arbitrary, as long as it is consistent with the polarity of UC. Each trajectory corresponds to planning and executing a reach to the target at distance 60 mm and direction 135°. For clarity, only 10 trials with delay periods longer than 400 ms are plotted. dots) and again after the go cue (green dots). Furthermore, the neural trajectories around the time of the arm movement are well-aligned on movement onset. These observations are consistent with previous analyses of the same dataset [22], as well as other studies of neural activity collected during similar tasks in the same cortical areas. Whereas the top 10 orthonormalized dimensions (upper and middle rows) show repeatable temporal structure across trials, the bottom five dimensions (lower row) appear to be largely capturing noise. These “noise dimensions” could be limiting GPFA’s predictive power. This is confirmed by Fig. 1: when the bottom five orthonormalized dimensions were removed, the GPFA prediction error decreased. It still remains to be explained why the GPFA prediction error using only the top 10 orthonormalized dimensions is lower than that obtained by directly fitting a GPFA model with p = 10. Each panel in Fig. 2 represents a mixture of 15 characteristic timescales. Thus, the top 10 orthonormalized dimensions can make use of up to 15 timescales. However, a GPFA model fit with p = 10 can have at most 10 timescales. By fitting a GPFA model with a large number of state dimensions p (each with its own timescale) and taking only the top ˜p = p∗orthonormalized dimensions, we can obtain neural trajectories whose effective dimensionality is smaller than the number of timescales at play. Based on the solid black line in Fig. 1 and Fig. 2, we consider the effective dimensionality of the recorded population activity to be p∗= 10. In other words, the linear subspace within which the recorded activity evolved during reach planning and execution for this particular target was 10dimensional. Across the 14 reach targets, the effective dimensionality ranged from 8 to 12. All major trends seen in Fig. 1 were preserved across all reach targets. 7 Conclusion GPFA offers a flexible and intuitive framework for extracting neural trajectories, whose learning algorithm is stable, approximation-free, and simple to implement. Because only the GP covariance structure needs to be specified, GPFA is particularly attractive for exploratory data analyses, where the rules governing the dynamics of the system under study are unknown. Based on the trajectories obtained by GPFA, one can then attempt to define an appropriate dynamical model that describes how the neural state evolves over time. 7 Compared with two-stage methods, the choice of GP covariance allows for more explicit specification of the smoothing properties of the low-dimensional trajectories. This is important when investigating (possibly subtle) properties of the system dynamics. For example, one may wish to ask whether the system exhibits second-order dynamics by examining the extracted trajectories. In this case, it is critical that second-order effects not be built-in by the smoothness assumptions used to extract the trajectories. With GPFA, it is possible to select a triangular GP covariance that assumes smoothness in position, but not in velocity. In contrast, it is unclear how to choose the shape of the smoothing kernel to achieve this in the two-stage methods. In future work, we would like to couple the covariance structure of the one-dimensional GPs, which would allow for a richer description of the multi-dimensional neural state x:,t evolving over time. We also plan to apply non-stationary GP kernels, since the neural data collected during a behavioral task are usually non-stationary. In addition, we would like to extend GPFA by allowing for the discovery of non-linear manifolds and applying point-process likelihood models. Acknowledgments This work was supported by NIH-NINDS-CRCNS 5-R01-NS054283-03, NSF, NDSEGF, Gatsby, SGF, CDRF, BWF, ONR, Sloan, and Whitaker. We would like to thank Dr. Mark Churchland, Melissa Howard, Sandra Eisensee, and Drew Haven. References [1] K. L. Briggman, H. D. I. Abarbanel, and W. B. Kristan Jr. Science, 307(5711):896–901, Feb. 2005. [2] K. L. Briggman, H. D. I. Abarbanel, and W. B. Kristan Jr. Curr Opin Neurobiol, 16(2):135–144, 2006. [3] B. M. Yu, A. Afshar, G. Santhanam, S. I. Ryu, K. V. Shenoy, and M. Sahani. In Y. Weiss, B. Scholkopf, and J. Platt, eds., Adv Neural Info Processing Sys 18, pp. 1545–1552. MIT Press, 2006. [4] M. M. Churchland, B. M. Yu, M. Sahani, and K. V. Shenoy. Curr Opin Neurobiol, 17(5):609–618, 2007. [5] A. C. Smith and E. N. Brown. Neural Comput, 15(5):965–991, 2003. [6] M. Stopfer, V. Jayaraman, and G. Laurent. Neuron, 39:991–1004, Sept. 2003. [7] S. L. Brown, J. Joseph, and M. Stopfer. Nat Neurosci, 8(11):1568–1576, Nov. 2005. [8] R. Levi, R. Varona, Y. I. Arshavsky, M. I. Rabinovich, and A. I. Selverston. J Neurosci, 25(42):9807– 9815, Oct. 2005. [9] O. Mazor and G. Laurent. Neuron, 48:661–673, Nov. 2005. [10] B. M. Broome, V. Jayaraman, and G. Laurent. Neuron, 51:467–482, Aug. 2006. [11] M. A. L. Nicolelis, L. A. Baccala, R. C. S. Lin, and J. K. Chapin. Science, 268(5215):1353–1358, 1995. [12] I. DiMatteo, C. R. Genovese, and R. E. Kass. Biometrika, 88(4):1055–1071, 2001. [13] J. P. Cunningham, B. M. Yu, K. V. Shenoy, and M. Sahani. In J. Platt, D. Koller, Y. Singer, and S. Roweis, eds., Adv Neural Info Processing Sys 20. MIT Press, 2008. [14] S. T. Roweis and L. K. Saul. Science, 290(5500):2323–2326, Dec. 2000. [15] S. Roweis and Z. Ghahramani. Neural Comput, 11(2):305–345, 1999. [16] N. A. Thacker and P. A. Bromiley. The effects of a square root transform on a Poisson distributed quantity. Technical Report 2001-010, University of Manchester, 2001. [17] D. J. Tolhurst, J. A. Movshon, and A. F. Dean. Vision Res, 23(8):775–785, 1983. [18] C. E. Rasmussen and C. K. I. Williams. Gaussian processes for machine learning. MIT Press, 2006. [19] Y. W. Teh, M. Seeger, and M. I. Jordan. In R. G. Cowell and Z. Ghahramani, eds., Proceedings of the Tenth International Workshop on Artificial Intelligence and Statistics (AISTATS). Society for Artificial Intelligence and Statistics, 2005. [20] N. D. Lawrence and A. J. Moore. In Z. Ghahramani, ed., Proceedings of the 24th Annual International Conference on Machine Learning (ICML 2007), pp. 481–488. Omnipress, 2007. [21] R. E. Turner and M. Sahani. Neural Comput, 19(4):1022–1038, 2007. [22] M. M. Churchland, B. M. Yu, S. I. Ryu, G. Santhanam, and K. V. Shenoy. J Neurosci, 26(14):3697–3712, Apr. 2006. [23] P. Sollich and C. K. I. Williams. In L. K. Saul, Y. Weiss, and L. Bottou, eds., Advances in Neural Information Processing Systems 17, pp. 1313–1320. MIT Press, 2005. 8
2008
174
3,425
Kernel Measures of Independence for non-iid Data Xinhua Zhang NICTA and Australian National University Canberra, Australia xinhua.zhang@anu.edu.au Le Song∗ School of Computer Science Carnegie Mellon University, Pittsburgh, USA lesong@cs.cmu.edu Arthur Gretton MPI T¨ubingen for Biological Cybernetics T¨ubingen, Germany arthur@tuebingen.mpg.de Alex Smola∗ Yahoo! Research Santa Clara, CA, United States alex@smola.org Abstract Many machine learning algorithms can be formulated in the framework of statistical independence such as the Hilbert Schmidt Independence Criterion. In this paper, we extend this criterion to deal with structured and interdependent observations. This is achieved by modeling the structures using undirected graphical models and comparing the Hilbert space embeddings of distributions. We apply this new criterion to independent component analysis and sequence clustering. 1 Introduction Statistical dependence measures have been proposed as a unifying framework to address many machine learning problems. For instance, clustering can be viewed as a problem where one strives to maximize the dependence between the observations and a discrete set of labels [14]. Conversely, if labels are given, feature selection can be achieved by finding a subset of features in the observations which maximize the dependence between labels and features [15]. Similarly in supervised dimensionality reduction [13], one looks for a low dimensional embedding which retains additional side information such as class labels. Likewise, blind source separation (BSS) tries to unmix independent sources, which requires a contrast function quantifying the dependence of the unmixed signals. The use of mutual information is well established in this context, as it is theoretically well justified. Unfortunately, it typically involves density estimation or at least a nontrivial optimization procedure [11]. This problem can be averted by using the Hilbert Schmidt Independence Criterion (HSIC). The latter enjoys concentration of measure properties and it can be computed efficiently on any domain where a Reproducing Kernel Hilbert Space (RKHS) can be defined. However, the application of HSIC is limited to independent and identically distributed (iid) data, a property that many problems do not share (e.g., BSS on audio data). For instance many random variables have a pronounced temporal or spatial structure. A simple motivating example is given in Figure 1a. Assume that the observations xt are drawn iid from a uniform distribution on {0, 1} and yt is determined by an XOR operation via yt = xt ⊗xt−1. Algorithms which treat the observation pairs {(xt, yt)}∞ t=1 as iid will consider the random variables x, y as independent. However, it is trivial to detect the XOR dependence by using the information that xi and yi are, in fact, sequences. In view of its importance, temporal correlation has been exploited in the independence test for blind source separation. For instance, [9] used this insight to reject nontrivial nonseparability of nonlinear mixtures, and [18] exploited multiple time-lagged second-order correlations to decorrelate over time. These methods work well in practice. But they are rather ad hoc and appear very different from standard criteria. In this paper, we propose a framework which extends HSIC to structured noniid data. Our new approach is built upon the connection between exponential family models and ∗This work was partially done when the author was with the Statistical Machine Learning Group of NICTA. yt–1 xt–1 xt+1 zt yt yt+1 xt (a) XOR sequence yt–1 xt–1 xt+1 yt+1 yt xt zt (b) iid yt–1 xt–1 yt xt yt+1 xt+1 zt (c) First order sequential xst yst (d) 2-Dim mesh Figure 1: From left to right: (a) Graphical model representing the XOR sequence, (b) a graphical model representing iid observations, (c) a graphical model for first order sequential data, and (d) a graphical model for dependency on a two dimensional mesh. the marginal polytope in an RKHS. This is doubly attractive since distributions can be uniquely identified by the expectation operator in the RKHS and moreover, for distributions with conditional independence properties the expectation operator decomposes according to the clique structure of the underlying undirected graphical model [2]. 2 The Problem Denote by X and Y domains from which we will be drawing observations Z := {(x1, y1), . . . , (xm, ym)} according to some distribution p(x, y) on Z := X × Y. Note that the domains X and Y are fully general and we will discuss a number of different structural assumptions on them in Section 3 which allow us to recover existing and propose new measures of dependence. For instance x and y may represent sequences or a mesh for which we wish to establish dependence. To assess whether x and y are independent we briefly review the notion of Hilbert Space embeddings of distributions [6]. Subsequently we discuss properties of the expectation operator in the case of conditionally independent random variables which will lead to a template for a dependence measure. Hilbert Space Embedding of Distribution Let H be a RKHS on Z with kernel v : Z × Z 7→R. Moreover, let P be the space of all distributions over Z, and let p ∈P. The expectation operator in H and its corresponding empirical average can be defined as in [6] µ[p] := Ez∼p(z) [v(z, ·)] such that Ez∼p(z)[f(z)] = ⟨µ[p], f⟩ (1) µ[Z] := 1 m m X i=1 v((xi, yi), ·) such that 1 m m X i=1 f(xi, yi) = ⟨µ[Z], f⟩. (2) The map µ : P 7→H characterizes a distribution by an element in the RKHS. The following theorem shows that the map is injective [16] for a large class of kernels such as Gaussian and Laplacian RBF. Theorem 1 If Ez∼p [v(z, z)] < ∞and H is dense in the space of bounded continuous functions C0(Z) in the L∞norm then the map µ is injective. 2.1 Exponential Families We are interested in the properties of µ[p] in the case where p satisfies the conditional independence relations specified by an undirected graphical model. In [2], it is shown that for this case the sufficient statistics decompose along the maximal cliques of the conditional independence graph. More formally, denote by C the set of maximal cliques of the graph G and let zc be the restriction of z ∈Z to the variables on clique c ∈C. Moreover, let vc be universal kernels in the sense of [17] acting on the restrictions of Z on clique c ∈C. In this case, [2] showed that v(z, z′) = X c∈C vc(zc, z′ c) (3) can be used to describe all probability distributions with the above mentioned conditional independence relations using an exponential family model with v as its kernel. Since for exponential families expectations of the sufficient statistics yield injections, we have the following result: Corollary 2 On the class of probability distributions satisfying conditional independence properties according to a graph G with maximal clique set C and with full support on their domain, the operator µ[p] = X c∈C µc[pc] = X c∈C Ezc [vc(zc, ·)] (4) is injective if the kernels vc are all universal. The same decomposition holds for the empirical counterpart µ[Z]. The condition of full support arises from the conditions of the Hammersley-Clifford Theorem [4, 8]: without it, not all conditionally independent random variables can be represented as the product of potential functions. Corollary 2 implies that we will be able to perform all subsequent operations on structured domains simply by dealing with mean operators on the corresponding maximal cliques. 2.2 Hilbert Schmidt Independence Criterion Theorem 1 implies that we can quantify the difference between two distributions p and q by simply computing the square distance between their RKHS embeddings, i.e., ∥µ[p] −µ[q]∥2 H. Similarly, we can quantify the strength of dependence between random variables x and y by simply measuring the square distance between the RKHS embeddings of the joint distribution p(x, y) and the product of the marginals p(x) · p(y) via I(x, y) := ∥µ[p(x, y)] −µ[p(x)p(y)]∥2 H . (5) Moreover, Corollary 2 implies that for an exponential family consistent with the conditional independence graph G we may decompose I(x, y) further into I(x, y) = X c∈C ∥µc[pc(xc, yc)] −µc[pc(xc)pc(yc)]∥2 Hc = X c∈C  E(xcyc)(x′ cy′ c) + Excycx′ cy′ c −2E(xcyc)x′ cy′ c [vc((xc, yc), (x′ c, y′ c))] (6) where bracketed random variables in the subscripts are drawn from their joint distributions and unbracketed ones are from their respective marginals, e.g., E(xcyc)x′ cy′ c := E(xcyc)Ex′ cEy′ c. Obviously the challenge is to find good empirical estimates of (6). In its simplest form we may replace each of the expectations by sums over samples, that is, by replacing E(x,y)[f(x, y)] ←1 m m X i=1 f(xi, yi) and E(x)(y)[f(x, y)] ← 1 m2 m X i,j=1 f(xi, yj). (7) 3 Estimates for Special Structures To illustrate the versatility of our approach we apply our model to a number of graphical models ranging from independent random variables to meshes proceeding according to the following recipe: 1. Define a conditional independence graph. 2. Identify the maximal cliques. 3. Choose suitable joint kernels on the maximal cliques. 4. Exploit stationarity (if existent) in I(x, y) in (6). 5. Derive the corresponding empirical estimators for each clique, and hence for all of I(x, y). 3.1 Independent and Identically Distributed Data As the simplest case, we first consider the graphical model in Figure 1b, where {(xt, yt)}T t=1 are iid random variables. Correspondingly the maximal cliques are {(xt, yt)}T t=1. We choose the joint kernel on the cliques to be vt((xt, yt), (x′ t, y′ t)) := k(xt, x′ t)l(yt, y′ t) hence v((x, y), (x′, y′)) = XT t=1 k(xt, x′ t)l(yt, y′ t). (8) The representation for vt implies that we are taking an outer product between the Hilbert Spaces on xt and yt induced by kernels k and l respectively. If the pairs of random variables (xt, yt) are not identically distributed, all that is left is to use (8) to obtain an empirical estimate via (7). We may improve the estimate considerably if we are able to assume that all pairs (xt, yt) are drawn from the same distribution p(xt, yt). Consequently all coordinates of the mean map are identical and we can use all the data to estimate just one of the discrepancies ∥µc[pc(xc, yc)] −µc[pc(xc)pc(yc)]∥2. The latter expression is identical to the standard HSIC criterion and we obtain the biased estimate ˆI(x, y) = 1 T tr HKHL where Kst := k(xs, xt), Lst := l(ys, yt) and Hst := δst −1 T . (9) 3.2 Sequence Data A more interesting application beyond iid data is sequences with a Markovian dependence as depicted in Figure 1c. Here the maximal cliques are the sets {(xt, xt+1, yt, yt+1)}T −1 t=1 . More generally, for longer range dependency of order τ ∈N, the maximal cliques will involve the random variables (xt, . . . , xt+τ, yt, . . . , yt+τ) =: (xt,τ, yt,τ). We assume homogeneity and stationarity of the random variables: that is, all cliques share the same sufficient statistics (feature map) and their expected value is identical. In this case the kernel v0((xt,τ, yt,τ), (x′ t,τ, y′ t,τ)) := k(xt,τ, x′ t,τ)l(yt,τ, y′ t,τ) can be used to measure discrepancy between the random variables. Stationarity means that µc[pc(xc, yc)] and µc[pc(xc)pc(yc)] are the same for all cliques c, hence I(x, y) is a multiple of the difference for a single clique. Using the same argument as in the iid case, we can obtain a biased estimate of the measure of dependence by using Kij = k(xi,τ, xj,τ) and Lij = l(yi,τ, yj,τ) instead of the definitions of K and L in (9). This works well in experiments. In order to obtain an unbiased estimate we need some more work. Recall the unbiased estimate of I(x, y) is a fourth order U-statistic [6]. Theorem 3 An unbiased empirical estimator for ∥µ[p(x, y)] −µ[p(x)p(y)]∥2 is ˆI(x, y) := (m−4)! m! X (i,j,q,r) h(xi, yi, . . . , xr, yr), (10) where the sum is over all terms such that i, j, q, r are mutually different, and h(x1, y1, . . . , x4, y4) := 1 4! (1,2,3,4) X (t,u,v,w) k(xt, xu)l(xt, xu) + k(xt, xu)l(xv, xw) −2k(xt, xu)l(xt, xv), and the latter sum denotes all ordered quadruples (t, u, v, w) drawn from (1, 2, 3, 4). The theorem implies that in expectation h takes on the value of the dependence measure. To establish that this also holds for dependent random variables we use a result from [1] which establishes convergence for stationary mixing sequences under mild regularity conditions, namely whenever the kernel of the U-statistic h is bounded and the process generating the observations is absolutely regular. See also [5, Section 4]. Theorem 4 Whenever I(x, y) > 0, that is, whenever the random variables are dependent, the estimate ˆI(x, y) is asymptotically normal with √m(ˆI(x, y) −I(x, y)) d−→N(0, 4σ2) (11) where the variance is given by σ2 =Var [h3(x1, y1)]2 + 2 ∞ X t=1 Cov(h3(x1, y1), h3(xt, yt)) (12) and h3(x1, y1) :=E(x2,y2,x3,y3,x4,y4)[h(x1, y1, . . . , x4, y4)] (13) This follows from [5, Theorem 7], again under mild regularity conditions (note that [5] state their results for U-statistics of second order, and claim the results hold for higher orders). The proof is tedious but does not require additional techniques and is therefore omitted. 3.3 TD-SEP as a special case So far we did not discuss the freedom of choosing different kernels. In general, an RBF kernel will lead to an effective criterion for measuring the dependence between random variables, especially in time-series applications. However, we could also choose linear kernels for k and l, for instance, to obtain computational savings. For a specific choice of cliques and kernels, we can recover the work of [18] as a special case of our framework. In [18], for two centered scalar time series x and y, the contrast function is chosen as the sum of same-time and time-lagged cross-covariance E[xtyt]+E[xtyt+τ]. Using our framework, two types of cliques, (xt, yt) and (xt, yt+τ), are considered in the corresponding graphical model. Furthermore, we use a joint kernel of the form ⟨xs, xt⟩⟨ys, yt⟩+ ⟨xs, xt⟩⟨ys+τ, yt+τ⟩, (14) which leads to the estimator of structured HSIC: I(x, y) = 1 T (tr HKHL + tr HKHLτ). Here Lτ denotes the linear covariance matrix for the time lagged y signals. For scalar time series, basic algebra shows that tr HKHL and tr HKHLτ are the estimators of E[xtyt] and E[xtyt+τ] respectively (up to a multiplicative constant). Further generalization can incorporate several time lagged cross-covariances into the contrast function. For instance, TD-SEP [18] uses a range of time lags from 1 to τ. That said, by using a nonlinear kernel we are able to obtain better contrast functions, as we will show in our experiments. 3.4 Grid Structured Data Structured HSIC can go beyond sequence data and be applied to more general dependence structures such as 2-D grids for images. Figure 1d shows the corresponding graphical model. Here each node of the graphical model is indexed by two subscripts, i for row and j for column. In the simplest case, the maximal cliques are C = {(xij, xi+1,j, xi,j+1, xi+1,j+1, yij, yi+1,j, yi,j+1, yi+1,j+1)}ij. In other words, we are using a cross-shaped stencil to connect vertices. Provided that the kernel v can also be decomposed into the product of k and l, then a biased estimate of the independence measure can be again formulated as tr HKHL up to a multiplicative constant. The statistical analysis of U-statistics for stationary Markov random fields is highly nontrivial. We are not aware of results equivalent to those discussed in Section 3.2. 4 Experiments Having a dependence measure for structured spaces is useful for a range of applications. Analogous to iid HSIC, structured HSIC can be applied to non-iid data in applications such as independent component analysis [12], independence test [6], feature selection [15], clustering [14], and dimensionality reduction [13]. The fact that structured HSIC can take into account the interdependency between observations provides us with a principled generalization of these algorithms to, e.g., time series analysis. In this paper, we will focus on two examples: independent component analysis, where we wish to minimize the dependence, and time series segmentation, where we wish to maximize the dependence instead. Two simple illustrative experiments on independence test for XOR binary sequence and Gaussian process can be found in the longer version of this paper. 4.1 Independent Component Analysis In independent component analysis (ICA), we observe a time series of vectors u that corresponds to a linear mixture u = As of n mutually independent sources s (each entry in the source vector here is a random process, and depends on its past values; examples include music and EEG time series). Based on the series of observations t, we wish to recover the sources using only the independence assumption on s. Note that sources can only be recovered up to scaling and permutation. The core of ICA is a contrast function that measures the independence of the estimated sources. An ICA algorithm searches over the space of mixing matrix A such that this contrast function is minimized. Thus, we propose to use structured HSIC as the contrast function for ICA. By incorporating time lagged variables in the cliques, we expect that structured HSIC can better deal with the non-iid nature of time series. In this respect, we generalize the TD-SEP algorithm [18], which implements this idea using a linear kernel on the signal. Thus, we address the question of whether correlations between higher order moments, as encoded using non-linear kernels, can improve the performance of TDSEP on real data. Table 1: Median performance of ICA on music using HSIC, TDSEP, and structured HSIC. In the top row, the number n of sources and m of samples are given. In the second row, the number of time lags τ used by TDSEP and structured HSIC are given: thus the observation vectors x, xt−1, . . . , xt−τ were compared. The remaining rows contain the median Amari divergence (multiplied by 100) for the three methods tested. The original HSIC method does not take into account time dependence (τ = 0), and returns a single performance number. Results are in all cases averaged over 136 repetitions: for two sources, this represents all possible pairings, whereas for larger n the sources are chosen at random without replacement. Method n = 2, m = 5000 n = 3, m = 10000 n = 4, m = 10000 1 2 3 1 2 3 1 2 3 HSIC 1.51 1.70 2.68 TDSEP 1.54 1.62 1.74 1.84 1.72 1.54 2.90 2.08 1.91 Structured HSIC 1.48 1.62 1.64 1.65 1.58 1.56 2.65 2.12 1.83 Data Following the settings of [7, Section 5.5], we unmixed various musical sources, combined using a randomly generated orthogonal matrix A (since optimization over the orthogonal part of a general mixing matrix is the more difficult step in ICA). We considered mixtures of two to four sources, drawn at random without replacement from 17 possibilities. We used the sum of pairwise dependencies as the overall contrast function when more than two sources were present. Methods We compared structured HSIC to TD-SEP and iid HSIC. While iid HSIC does not take the temporal dependence in the signal into account, it has been shown to perform very well for iid data [12]. Following [7], we employed a Laplace kernel, k(x, x′) = exp(−λ∥x −x′∥) with λ = 3 for both structured and iid HSIC. For both structured and iid HSIC, we used gradient descent over the orthogonal group with a Golden search, and low rank Cholesky decompositions of the Gram matrices to reduce computational cost, as in [3]. Results We chose the Amari divergence as the index for comparing performance of the various ICA methods. This is a divergence measure between the estimated and true unmixing matrices, which is invariant to the output ordering and scaling ambiguities. A smaller Amari divergence indicates better performance. Results are shown in Table 1. Overall, contrast functions that take time delayed information into account perform best, although the best time lag is different when the number of sources varies. 4.2 Time Series Clustering and Segmentation We can also extend clustering to time series and sequences using structured HSIC. This is carried out in a similar way to the iid case. One can formulate clustering as generating the labels y from a finite discrete set, such that their dependence on x is maximized [14]: maximizey tr HKHL subject to constraints on y. (15) Here K and L are the kernel matrices for x and the generated y respectively. More specifically, assuming Lst := δ(ys, yt) for discrete labels y, we recover clustering. Relaxing discrete labels to yt ∈R with bounded norm ∥y∥2 and setting Lst := ysyt, we obtain Principal Component Analysis. This reasoning for iid data carries over to sequences by introducing additional dependence structure through the kernels: Kst := k(xs,τ, xt,τ) and Lst := l(ys,τ, yt,τ). In general, the interacting label sequences make the optimization in (15) intractable. However, for a class of kernels l an efficient decomposition can be found by applying a reverse convolution on k: assume that l is given by l(ys,τ, yt,τ) = Xτ u,v=0 ¯l(ys+u, yt+v)Muv, (16) where M ∈R(τ+1)×(τ+1) with M ⪰0, and ¯l is a base kernel between individual time points. A common choice is ¯l(ys, yt) = δ(ys, yt). In this case we can rewrite tr HKHL by applying the summation over M to HKH, i.e., T X s,t=1 [HKH]ij τ X u,v=0 ¯l(ys+u, yt+v)Muv = T +τ X s,t=1 τ X u,v=0 s−u,t−v∈[1,T ] Muv[HKH]s−u,t−v | {z } := ¯ Kst ¯l(ys, yt) (17) Table 2: Segmentation errors by various methods on the four studied time series. Method Swimming I Swimming II Swimming II BCI structured HSIC 99.0 118.5 108.6 111.5 spectral clustering 125 212.3 143.9 162 HMM 153.2 120 150 168 This means that we may apply the matrix M to HKH and thereby we are able to decouple the dependency within y. Denote the convolution by ¯K = [HKH] ⋆M. Consequently using ¯K we can directly apply (15) to times series and sequence data. In practice, approximate algorithms such as incomplete Cholesky decomposition are needed to efficiently compute ¯K. Datasets We study two datasets in this experiment. The first dataset is collected by the Australian Institute of Sports (AIS) from a 3-channel orientation sensor attached to a swimmer. The three time series we used in our experiment have the following configurations: T = 23000 time steps with 4 laps; T = 47000 time steps with 16 laps; and T = 67000 time steps with 20 laps. The task is to automatically find the starting and finishing time of each lap based on the sensor signals. We treated this problem as a segmentation problem. Since the dataset contains 4 different style of swimming, we used 6 as the number of clusters (there are 2 additional clusters for starting and finishing a lap). The second dataset is a brain-computer interface data (data IVb of Berlin BCI group1). It contains EEG signals collected when a subject was performing three types of cued imagination. Furthermore, the relaxation period between two imagination is also recorded in the EEG. Including the relaxation period, the dataset consists of T = 10000 time points with 16 different segments. The task is to automatically detect the start and end of an imagination. We used 4 clusters for this problem. Methods We compared three algorithms: structured HSIC for clustering, spectral clustering [10], and HMM. For structured HSIC, we used the maximal cliques of (xt, yt−50,100), where y is the discrete label sequence to be generated. The kernel l on y took the form of equation (16), with M ∈ R101×101 and Muv := exp(−(u −v)2). The kernel k on x was Gaussian RBF: exp(−∥x −x′∥2). As a baseline, we used a spectral clustering with the same kernel k on x, and a first order HMM with 6 hidden states and diagonal Gaussian observation model2. Further details regarding preprocessing of the above two datasets (which is common to all algorithms subsequently compared), parameters of algorithms and protocols of experiments, are available in the longer version of this paper. Results To evaluate the segmentation quality, the boundaries found by various methods were compared to the ground truth. First, each detected boundary was matched to a true boundary, and then the discrepancy between them was counted into the error. The overall error was this sum divided by the number of boundaries. Figure 2d gives an example on how to compute this error. According to Table 2, in all of the four time series we studied, segmentation using structured HSIC leads to lower error compared with spectral clustering and HMM. For instance, structured HSIC reduces nearly 1/3 of the segmentation error in the BCI dataset. To provide a visual feel of the improvement, we plot the true boundaries together with the segmentation results in Figure 2a, 2b,2c. Clearly, segment boundaries produced by structured HSIC fit better with the ground truth. 5 Conclusion In this paper, we extended the Hilbert Schmidt Independence Criterion from iid data to structured and non-iid data. Our approach is based on RKHS embeddings of distributions, and utilizes the efficient factorizations provided by the exponential family associated with undirected graphical models. Encouraging experimental results were demonstrated on independence test, ICA, and segmentation for time series. Further work will be done in the direction of applying structured HSIC to PCA and feature selection on structured data. Acknowledgements NICTA is funded by the Australian Governments Backing Australia’s Ability and the Centre of Excellence programs. This work is also supported by the IST Program of the European Community, under the FP7 Network of Excellence, ICT-216886-NOE. 1http://ida.first.fraunhofer.de/projects/bci/competition-iii/desc-IVb.html 2http://www.torch.ch 0 2000 4000 6000 8000 10000 0 1 2 3 4 Structured HSIC Ground Truth (a) 0 2000 4000 6000 8000 10000 0 1 2 3 4 Spectral Clustering Ground Truth (b) 0 2000 4000 6000 8000 10000 0 0.5 1 1.5 2 HMM Ground Truth (c) (d) Figure 2: Segmentation results produced by (a) structured HSIC, (b) spectral clustering and (c) HMM. (d) An example for counting the segmentation error. Red line denotes the ground truth and blue line is the segmentation results. The error introduced for segment R1 to R′ 1 is a + b, while that for segment R2 to R′ 2 is c + d. The overall error in this example is then (a + b + c + d)/4. References [1] Aaronson, J., Burton, R., Dehling, H., Gilat, D., Hill, T., & Weiss, B. (1996). Strong laws for L and U-statistics. Transactions of the American Mathematical Society, 348, 2845–2865. [2] Altun, Y., Smola, A. J., & Hofmann, T. (2004). Exponential families for conditional random fields. In UAI. [3] Bach, F. R., & Jordan, M. I. (2002). Kernel independent component analysis. JMLR, 3, 1–48. [4] Besag, J. (1974). Spatial interaction and the statistical analysis of lattice systems (with discussion). J. Roy. Stat. Soc. B, 36(B), 192–326. [5] Borovkova, S., Burton, R., & Dehling, H. (2001). Limit theorems for functionals of mixing processes with applications to dimension estimation. Transactions of the American Mathematical Society, 353(11), 4261–4318. [6] Gretton, A., Fukumizu, K., Teo, C.-H., Song, L., Sch¨olkopf, B., & Smola, A. (2008). A kernel statistical test of independence. Tech. Rep. 168, MPI for Biological Cybernetics. [7] Gretton, A., Herbrich, R., Smola, A., Bousquet, O., & Sch¨olkopf, B. (2005). Kernel methods for measuring independence. JMLR, 6, 2075–2129. [8] Hammersley, J. M., & Clifford, P. E. (1971). Markov fields on finite graphs and lattices. Unpublished manuscript. [9] Hosseni, S., & Jutten, C. (2003). On the separability of nonlinear mixtures of temporally correlated sources. IEEE Signal Processing Letters, 10(2), 43–46. [10] Ng, A., Jordan, M., & Weiss, Y. (2002). On spectral clustering: Analysis and an algorithm. In NIPS. [11] Nguyen, X., Wainwright, M. J., & Jordan, M. I. (2008). Estimating divergence functionals and the likelihood ratio by penalized convex risk minimization. In NIPS. [12] Shen, H., Jegelka, S., & Gretton, A. (submitted). Fast kernel-based independent component analysis. IEEE Transactions on Signal Processing. [13] Song, L., Smola, A., Borgwardt, K., & Gretton, A. (2007). Colored maximum variance unfolding. In NIPS. [14] Song, L., Smola, A., Gretton, A., & Borgwardt, K. (2007). A dependence maximization view of clustering. In Proc. Intl. Conf. Machine Learning. [15] Song, L., Smola, A., Gretton, A., Borgwardt, K., & Bedo, J. (2007). Supervised feature selection via dependence estimation. In ICML. [16] Sriperumbudur, B., Gretton, A., Fukumizu, K., Lanckriet, G., & Sch¨olkopf, B. (2008). Injective hilbert space embeddings of probability measures. In COLT. [17] Steinwart, I. (2002). The influence of the kernel on the consistency of support vector machines. JMLR, 2. [18] Ziehe, A., & M¨uller, K.-R. (1998). TDSEP – an efficient algorithm for blind separation using time structure. In ICANN.
2008
175
3,426
Regularized Policy Iteration Amir-massoud Farahmand1, Mohammad Ghavamzadeh2, Csaba Szepesv´ari1, Shie Mannor3 ∗ 1Department of Computing Science, University of Alberta, Edmonton, Alberta, Canada 2INRIA Lille - Nord Europe, Team SequeL, France 3Department of ECE, McGill University, Canada - Department of EE, Technion, Israel Abstract In this paper we consider approximate policy-iteration-based reinforcement learning algorithms. In order to implement a flexible function approximation scheme we propose the use of non-parametric methods with regularization, providing a convenient way to control the complexity of the function approximator. We propose two novel regularized policy iteration algorithms by adding L2-regularization to two widely-used policy evaluation methods: Bellman residual minimization (BRM) and least-squares temporal difference learning (LSTD). We derive efficient implementation for our algorithms when the approximate value-functions belong to a reproducing kernel Hilbert space. We also provide finite-sample performance bounds for our algorithms and show that they are able to achieve optimal rates of convergence under the studied conditions. 1 Introduction A key idea in reinforcement learning (RL) is to learn an action-value function which can then be used to derive a good control policy [15]. When the state space is large or infinite, value-function approximation techniques are necessary, and their quality has a major impact on the quality of the learned policy. Existing techniques include linear function approximation (see, e.g., Chapter 8 of [15]), kernel regression [12], regression tree methods [5], and neural networks (e.g., [13]). The user of these techniques often has to make non-trivial design decisions such as what features to use in the linear function approximator, when to stop growing trees, how many trees to grow, what kernel bandwidth to use, or what neural network architecture to employ. Of course, the best answers to these questions depend on the characteristics of the problem in hand. Hence, ideally, these questions should be answered in an automated way, based on the training data. A highly desirable requirement for any learning system is to adapt to the actual difficulty of the learning problem. If the problem is easier (than some other problem), the method should deliver better solution(s) with the same amount of data. In the supervised learning literature, such procedures are called adaptive [7]. There are many factors that can make a problem easier, such as when only a few of the inputs are relevant, when the input data lies on a low-dimensional submanifold of the input space, when special noise conditions are met, when the expansion of the target function is sparse in a basis, or when the target function is highly smooth. These are called the regularities of the problem. An adaptive procedure is built in two steps: 1) designing flexible methods with a few tunable parameters that are able to deliver “optimal” performance for any targeted regularity, provided that their parameters are chosen properly, and 2) tuning the parameters automatically (automatic model-selection). Smoothness is one of the most important regularities: In regression when the target function has smoothness of order p the optimal rate of convergence of the squared L2-error is n−2p/(2p+d), ∗Csaba Szepesv´ari is on leave from MTA SZTAKI. This research was funded in part by the National Science and Engineering Research Council (NSERC), iCore and the Alberta Ingenuity Fund. We acknowledge the insightful comments by the reviewers. where n is the number of data points and d is the dimension of the input space [7]. Hence, the rate of convergence is higher for larger p’s. Methods that achieve the optimal rate are more desirable, at least in the limit for large n, and seem to perform well in practice. However, only a few methods in the regression literature are known to achieve the optimal rates. In fact, it is known that tree methods with averaging in the leaves, linear methods with piecewise constant basis functions, and kernel estimates do not achieve the optimal rate, while neural networks and regularized least-squares estimators do [7]. An advantage of using a regularized least-squares estimator compared to neural networks is that these estimators do not get stuck in local minima and therefore their training is more reliable. In this paper we study how to add L2-regularization to value function approximation in RL. The problem setting is to find a good policy in a batch or active learning scenario for infinite-horizon expected total discounted reward Markovian decision problems with continuous state and finite action spaces. We propose two novel policy evaluation algorithms by adding L2-regularization to two widely-used policy evaluation methods in RL: Bellman residual minimization (BRM) [16; 3] and least-squares temporal difference learning (LSTD) [4]. We show how our algorithms can be implemented efficiently when the value-function approximator belongs to a reproducing kernel Hilbert space. We also prove finite-sample performance bounds for our algorithms. In particular, we show that they are able to achieve a rate that is as good as the corresponding regression rate when the value functions belong to a known smoothness class. We further show that this rate of convergence carries through to the performance of a policy found by running policy iteration with our regularized policy evaluation methods. The results indicate that from the point of view of convergence rates RL is not harder than regression estimation, answering an open question of Antos et al. [2]. Due to space limitations, we do not present the proofs of our theorems in the paper; they can be found, along with some empirical results using our algorithms, in [6]. To our best knowledge this is the first work that addresses finite-sample performance of a regularized RL algorithm. While regularization in RL has not been thoroughly explored, there has been a few works that used regularization. Xu et al. [17] used sparsification in LSTD. Although sparsification does achieve some form of regularization, to the best of our knowledge the effect of sparsification on generalization error is not well-understood. Note that sparsification is fundamentally different from our approach. In our method the empirical error and the penalties jointly determine the solution, while in sparsification first a subset of points is selected independently of the empirical error, which are then used to obtain a solution. Comparing the efficiency of these methods requires further research, but the two methods can be combined, as was done in our experiments. Jung and Polani [9] explored adding regularization to BRM, but this solution is restricted to deterministic problems. The main contribution of that work was the development of fast incremental algorithms using sparsification techniques. L1 penalties have been considered by [11], who were similarly concerned with incremental implementations and computational efficiency. 2 Preliminaries As we shall work with continuous spaces, we first introduce a few concepts from analysis. This is followed by an introduction to Markovian Decision Processes (MDPs) and the associated concepts and notation. For a measurable space with domain S, we let M(S) and B(S; L) denote the set of probability measures over S and the space of bounded measurable functions with domain S and bound 0 < L < ∞, respectively. For a measure ν ∈M(S), and a measurable function f : S →R, we define the L2(ν)-norm of f, ∥f∥ν, and its empirical counterpart ∥f∥ν,n as follows: ∥f∥2 ν = Z |f(s)|2ν(ds) , ∥f∥2 ν,n def= 1 n n X t=1 f 2(st) , st ∼ν. (1) If {st} is ergodic, ∥f∥2 ν,n converges to ∥f∥2 ν as n →∞. A finite-action discounted MDP is a tuple (X, A, P, S, γ), where X is the state space, A = {a1, a2, . . . , aM} is the finite set of M actions, P : X × A →M(X) is the transition probability kernel with P(·|x, a) defining the next-state distribution upon taking action a in state x, S(·|x, a) gives the corresponding distribution of immediate rewards, and γ ∈(0, 1) is a discount factor. We make the following assumptions on MDP: Assumption A1 (MDP Regularity) The set of states X is a compact subspace of the d-dimensional Euclidean space and the expected immediate rewards r(x, a) = R rS(dr|x, a) are bounded by Rmax. We denote by π : X →M(A) a stationary Markov policy. A policy is deterministic if it is a mapping from states to actions π : X →A. The value and the action-value functions of a policy π, denoted respectively by V π and Qπ, are defined as the expected sum of discounted rewards that are encountered when the policy π is executed: V π(x) = Eπ " ∞ X t=0 γtRt X0 = x # , Qπ(x, a) = Eπ " ∞ X t=0 γtRt X0 = x, A0 = a # . Here Rt denotes the reward received at time step t; Rt ∼S(·|Xt, At), Xt evolves according to Xt+1 ∼P(·|Xt, At), and At is sampled from the policy At ∼π(·|Xt). It is easy to see that for any policy π, the functions V π and Qπ are bounded by Vmax = Qmax = Rmax/(1−γ). The action-value function of a policy is the unique fixed-point of the Bellman operator T π : B(X ×A) →B(X ×A) defined by (T πQ)(x, a) = r(x, a) + γ Z Q(y, π(y))P(dy|x, a). Given an MDP, the goal is to find a policy that attains the best possible values, V ∗(x) = supπ V π(x), ∀x ∈X. Function V ∗is called the optimal value function. Similarly the optimal action-value function is defined as Q∗(x, a) = supπ Qπ(x, a), ∀x ∈X, ∀a ∈A. We say that a deterministic policy π is greedy w.r.t. an action-value function Q and write π = ˆπ(·; Q), if, π(x) ∈argmaxa∈A Q(x, a), ∀x ∈X, ∀a ∈A. Greedy policies are important because any greedy policy w.r.t. Q∗is optimal. Hence, knowing Q∗is sufficient for behaving optimally. In this paper we shall deal with a variant of the policy iteration algorithm [8]. In the basic version of policy iteration an optimal policy is found by computing a series of policies, each being greedy w.r.t. the action-value function of the previous one. Throughout the paper we denote by FM ⊂{ f : X × A →R } some subset of real-valued functions over the state-action space X × A, and use it as the set of admissible functions in the optimization problems of our algorithms. We will treat f ∈FM as f ≡(f1, . . . , fM), fj(x) = f(x, aj), j = 1, . . . , M. For ν ∈M(X), we extend ∥·∥ν and ∥·∥ν,n defined in Eq. (1) to FM by ∥f∥2 ν = 1 M PM j=1 ∥fj∥2 ν , and ∥f∥2 ν,n = 1 nM n X t=1 M X j=1 I{At=at}f 2 j (Xt) = 1 nM n X t=1 f 2(Xt, At), (2) where I{·} is the indicator function: for an event E, I{E} = 1 if and only if E holds and I{E} = 0, otherwise. 3 Approximate Policy Evaluation The ability to evaluate a given policy is the core requirement to run policy iteration. Loosely speaking, in policy evaluation the goal is to find a “close enough” approximation V (or Q) of the value (or action-value) function of a fixed target policy π, V π (or Qπ). There are several interpretations to the term “close enough” in this context and it does not necessarily refer to a minimization of some norm. If Qπ (or noisy estimates of it) is available at a number of points (Xt, At), one can form a training set of examples of the form {(Xt, At), Qt}1≤t≤n, where Qt is an estimate of Qπ(Xt, At) and then use a supervised learning algorithm to infer a function Q that is meant to approximate Qπ. Unfortunately, in the context of control, the target function, Qπ, is not known in advance and its high quality samples are often very expensive to obtain if this option is available at all. Most often these values have to be inferred from the observed system dynamics, where the observations do not necessarily come from following the target policy π. This is referred to as the off-policy learning problem in the RL literature. The difficulty arising is similar to the problem when training and test distributions differ in supervised learning. Many policy evaluation techniques have been developed in RL. Here we concentrate on the ones that are directly related to our proposed algorithms. 3.1 Bellman Residual Minimization The idea of Bellman residual minimization (BRM) goes back at least to the work of Schweitzer and Seidmann [14]. It was used later in the RL community by Williams and Baird [16] and Baird [3]. The basic idea of BRM comes from writing the fixed-point equation for the Bellman operator in the form Qπ −T πQπ = 0. When Qπ is replaced by some other function Q, the left-hand side becomes non-zero. The resulting quantity, Q −T πQ, is called the Bellman residual of Q. If the magnitude of the Bellman residual, ∥Q −T πQ∥, is small, then Q can be expected to be a good approximation of Qπ. For an analysis using supremum norms see, e.g., [16]. It seems, however, more natural to use a weighted L2-norm to measure the magnitude of the Bellman residual as it leads to an optimization problem with favorable characteristics and enables an easy connection to regression function estimation [7]. Hence, we define the loss function LBRM(Q; π) = ∥Q −T πQ∥2 ν , where ν is the stationary distribution of states in the input data. Using Eq. (2) with samples (Xt, At) and by replacing (T πQ)(Xt, At) with its sample-based approximation ( ˆT πQ)(Xt, At) = Rt + γQ(Xt+1, π(Xt+1)), the empirical counterpart of LBRM(Q; π) can be written as ˆLBRM(Q; π, n) = 1 nM n X t=1 h Q(Xt, At) −  Rt + γQ Xt+1, π(Xt+1) i2 . (3) However, as it is well-known (e.g., see [15],[10]), in general, ˆLBRM is not an unbiased estimate of LBRM; E h ˆLBRM(Q; π, n) i ̸= LBRM(Q; π). The reason is that stochastic transitions may lead to a non-vanishing variance term in Eq. (3). A common suggestion to deal with this problem is to use uncorrelated or “double” samples in ˆLBRM. According to this proposal, for each state-action pair in the sample, at least two next states should be generated (e.g., see [15]). This is neither realistic nor sample-efficient unless a generative model of the environment is available or the state transitions are deterministic. Antos et al. [2] recently proposed a de-biasing procedure for this problem. We will refer to it as modified BRM in this paper. The idea is to cancel the unwanted variance by introducing an auxiliary function h and a new loss function LBRM(Q, h; π) = LBRM(Q; π) −∥h −T πQ∥2 ν , and approximating the action-value function Qπ by solving ˆQBRM = argmin Q∈FM sup h∈FM LBRM(Q, h; π), (4) where the supremum comes from the negative sign of ∥h −T πQ∥2 ν. They showed that optimizing the new loss function still makes sense and the empirical version of this loss is unbiased. Solving Eq. (4) requires solving the following nested optimization problems: h∗ Q = argmin h∈FM h −ˆT πQ 2 ν , ˆQBRM = argmin Q∈FM h Q −ˆT πQ 2 ν − h∗ Q −ˆT πQ 2 ν i . (5) Of course in practice, T πQ is replaced by its sample-based approximation ˆT πQ. 3.2 Least-Squares Temporal Difference Learning Least-squares temporal difference learning (LSTD) was first proposed by Bradtke and Barto [4], and later was extended to control by Lagoudakis and Parr [10]. They called the resulting algorithm least-squares policy iteration (LSPI), which is an approximate policy iteration algorithm based on LSTD. Unlike BRM that minimizes the distance of Q and T πQ, LSTD minimizes the distance of Q and ΠT πQ, the back-projection of the image of Q under the Bellman operator, T πQ, onto the space of admissible functions FM (see Figure 1). Formally, this means that LSTD minimizes the loss function LLST D(Q; π) = ∥Q −ΠT πQ∥2 ν. It can also be seen as finding a good approximation for the fixed-point of operator ΠT π. The projection operator Π : B(X × A) →B(X × A) is defined by Πf = argminh∈FM ∥h −f∥2 ν. In order to make this minimization problem computationally feasible, it is usually assumed that FM is a linear subspace of B(X × A). The LSTD solution can therefore be written as the solution of the following nested optimization problems: h∗ Q = argmin h∈FM ∥h −T πQ∥2 ν , ˆQLST D = argmin Q∈FM Q −h∗ Q 2 ν , (6) where the first equation finds the projection of T πQ onto FM, and the second one minimizes the distance of Q and the projection. FM Q T πQ ΠT πQ minimized by BRM minimized by LSTD Figure 1: This figure shows the loss functions minimized by BRM, modified BRM, and LSTD methods. The function space FM is represented by the plane. The Bellman operator, T π, maps an action-value function Q ∈FM to a function T πQ. The vector connecting T πQ and its back-projection to FM, ΠT πQ, is orthogonal to the function space FM. The BRM loss function is the squared Bellman error, the distance of Q and T πQ. In order to obtain the modified BRM loss, the squared distance of T πQ and ΠT πQ is subtracted from the squared Bellman error. LSTD aims at a function Q that has minimum distance to ΠT πQ. Antos et al. [2] showed that when F M is linear, the solution of modified BRM (Eq. 4 or 5) coincides with the LSTD solution (Eq. 6). A quick explanation for this is: the first equations in (5) and (6) are the same, the projected vector h∗ Q −T πQ has to be perpendicular to F M, as a result ‚‚Q −h∗ Q ‚‚2 = ∥Q −T πQ∥2 − ‚‚h∗ Q −T πQ ‚‚2 (Pythagorean theorem), and therefore the second equations in (5) and (6) have the same solution. 4 Regularized Policy Iteration Algorithms In this section, we introduce two regularized policy iteration algorithms. These algorithms are instances of the generic policy-iteration method, whose pseudo-code is shown in Table 1. By assumption, the training sample Di used at the ith (1 ≤i ≤N) iteration of the algorithm is a finite trajectory FittedPolicyQ(N,Q(−1),PEval) // N: number of iterations // Q(−1): Initial action-value function // PEval: Fitting procedure for i = 0 to N −1 do πi(·) ←ˆπ(·; Q(i−1)) // the greedy policy w.r.t. Q(i−1) // Generate training sample Di Q(i) ←PEval(πi, Di) end for return Q(N−1) or πN(·) = ˆπ(·; Q(N−1)) Table 1: The pseudo-code of policy-iteration algorithm {(Xt, At, Rt)}1≤t≤n generated by a policy π, thus, At = π(Xt) and Rt ∼S(·|Xt, At). Examples of such policy π are πi plus some exploration or some stochastic stationary policy πb. The actionvalue function Q(−1) is used to initialize the first policy. Alternatively, one may start with an arbitrary initial policy. The procedure PEval takes a policy πi (here the greedy policy w.r.t. the current action-value function Q(i−1)) along with training sample Di, and returns an approximation to the action-value function of policy πi. There are many possibilities to design PEval. In this paper, we propose two approaches, one based on regularized (modified) BRM (REG-BRM), and one based on regularized LSTD (REG-LSTD). In REG-BRM, the next iteration is computed by solving the following nested optimization problems: h∗(·; Q) = argmin h∈FM h ‚‚‚h −ˆT πiQ ‚‚‚ 2 n+λh,nJ(h) i , Q(i) = argmin Q∈FM h ‚‚‚Q −ˆT πiQ ‚‚‚ 2 n− ‚‚‚h∗(·; Q) −ˆT πiQ ‚‚‚ 2 n+λQ,nJ(Q) i , (7) where ( ˆT πiQ)(Zt) = Rt + γQ(Z′ t) represents the empirical Bellman operator, Zt = (Xt, At) and Z′ t = Xt+1, πi(Xt+1)  represent state-action pairs, J(h) and J(Q) are penalty functions (e.g., norms), and λh,n, λQ,n > 0 are regularization coefficients. In REG-LSTD, the next iteration is computed by solving the following nested optimization problems: h∗(·; Q) = argmin h∈FM h ‚‚‚h −ˆT πiQ ‚‚‚ 2 n + λh,nJ(h) i , Q(i) = argmin Q∈FM h ∥Q −h∗(·; Q)∥2 n + λQ,nJ(Q) i . (8) It is important to note that unlike the non-regularized case described in Sections 3.1 and 3.2, REGBRM and REG-LSTD do not have the same solution. This is because, although the first equations in (7) and (8) are the same, the projected vector h∗(·; Q) −ˆT πiQ is not necessarily perpendicular to the admissible function space FM. This is due to the regularization term λh,nJ(h). As a result, the Pythagorean theorem does not hold: ∥Q −h∗(·; Q)∥2 ̸= ‚‚‚Q −ˆT πiQ ‚‚‚ 2 − ‚‚‚h∗(·; Q) −ˆT πiQ ‚‚‚ 2 , and therefore the objective functions of the second equations in (7) and (8) are not equal and they do not have the same solution. We now present algorithmic solutions for REG-BRM and REG-LSTD problems described above. We can obtain Q(i) by solving the regularization problems of Eqs. (7) and (8) in a reproducing kernel Hilbert space (RKHS) defined by a Mercer kernel K. In this case, we let the regularization terms J(h) and J(Q) be the RKHS norms of h and Q, ∥h∥2 H and ∥Q∥2 H, respectively. Using the Representer theorem, we can then obtain the following closed-form solutions for REG-BRM and REG-LSTD. This is not immediate, because the solutions of these procedures are defined with nested optimization problems. Theorem 1. The optimizer Q ∈H of Eqs. (7) and (8) can be written as Q(·) = P2n i=1 ˜αik( ˜Zi, ·), where ˜Zi = Zi if i ≤n and ˜Zi = Z′ i−n, otherwise. The coefficient vector ˜α = (˜α1, . . . , ˜α2n)⊤can be obtained by REG-BRM: ˜α = (CKQ + λQ,nI)−1(D⊤+ γC⊤ 2 B⊤B)r, REG-LSTD: ˜α = (F ⊤F KQ + λQ,nI)−1F ⊤Er, where r = (R1, . . . , Rn)⊤, C = D⊤D−γ2(BC2)⊤(BC2), B = Kh(Kh+λh,nI)−1−I, D = C1 −γC2, F = C1 −γEC2, E = Kh(Kh + λh,nI)−1, and Kh ∈Rn×n, C1, C2 ∈Rn×2n, and KQ ∈R2n×2n are defined by [Kh]ij = k(Zi, Zj), [C1KQ]ij = k(Zi, ˜Zj), [C2KQ]ij = k(Z′ i, ˜Zj), and [KQ]ij = k( ˜Zi, ˜Zj). 5 Theoretical Analysis of the Algorithms In this section, we analyze the statistical properties of the policy iteration algorithms based on REGBRM and REG-LSTD. We provide finite-sample convergence results for the error between QπN , the action-value function of policy πN, the policy resulted after N iterations of the algorithms, and Q∗, the optimal action-value function. Due to space limitations, we only report assumptions and main results here (Refer to [6] for more details). We make the following assumptions in our analysis, some of which are only technical: Assumption A2 (1) At every iteration, samples are generated i.i.d. using a fixed distribution over states ν and a fixed stochastic policy πb, i.e., {(Zt, Rt, Z′ t)}n t=1 are i.i.d. samples, where Zt = (Xt, At), Z′ t = X′ t, π(X′ t)  , Xt ∼ν ∈M(X), At ∼πb(·|Xt), X′ t ∼P(·|Xt, At), and π is the policy being evaluated. We further assume that πb selects all actions with non-zero probability. (2) The function space F used in the optimization problems (7) and (8) is a Sobolev space Wk(Rd) with 2k > d. We denote by Jk(Q) the norm of Q in this Sobolev space. (3) The selected function space FM contains the true action-value function, i.e., Qπ ∈FM. (4) For every function Q ∈FM with bounded norm J(Q), its image under the Bellman operator, T πQ, is in the same space, and we have J(T πQ) ≤BJ(Q), for some positive and finite B, which is independent of Q. (5) We assume FM ⊂B(X × A; Qmax), for Qmax > 0. (1) indicates that the training sample should be generated by an i.i.d. process. This assumption is used mainly for simplifying the proofs and can be extended to the case where the training sample is a single trajectory generated by a fixed policy with appropriate mixing conditions as was done in [2]. (2) Using Sobolev space allows us to explicitly show the effect of smoothness k on the convergence rate of our algorithms and to make comparison with the regression learning settings. Note that Sobolev spaces are large: In fact, Sobolev spaces are more flexible than H¨older spaces (a generalization of Lipschitz spaces to higher order smoothness) in that in these spaces the norm measures the average smoothness of the functions as opposed to measuring their worst-case smoothness. Thus, functions that are smooth most over the place except for some parts that have a small measure will have small Sobolev-space norms, i.e., they will be looked as “simple”, while they would be viewed as “complex” functions in H¨older spaces. Actually, our results extend to other RKHS spaces that have well-behaved metric entropy capacity, i.e., log N(ε, F) ≤Aε−α for some 0 < α < 2 and some finite positive A. In (3), we assume that the considered function space is large enough to include the true action-value function. This is a standard assumption when studying the rate of convergence in supervised learning [7]. (4) constrains the growth rate of the complexity of the norm of Q under Bellman updates. We believe that this is a reasonable assumption that will hold in most practical situations. Finally, (5) is about the uniform boundedness of the functions in the selected function space. If the solutions of our optimization problems are not bounded, they must be truncated, and thus, truncation arguments must be used in the analysis. Truncation does not change the final result, so we do not address it to avoid unnecessary clutter. We now first derive an upper bound on the policy evaluation error in Theorem 2. We then show how the policy evaluation error propagates through the iterations of policy iteration in Lemma 3. Finally, we state our main result in Theorem 4, which follows directly from the first two results. Theorem 2 (Policy Evaluation Error). Let Assumptions A1 and A2 hold. Choosing λQ,n = c1 ` log(n) nJ2 k(Qπ) ´ 2k 2k+d and λh,n = Θ(λQ,n), for any policy π, the following holds with probability at least 1 −δ, for c1, c2, c3, c4 > 0. ‚‚‚ ˆQ −T π ˆQ ‚‚‚ 2 ν ≤c2 ` J2 k(Qπ) ´ d 2k+d „log(n) n « 2k 2k+d + c3 log(n) + c4 log( 1 δ ) n . Theorem 2 shows how the number of samples and the difficulty of the problem as characterized by J2 k(Qπ) influence the policy evaluation error. With a large number of samples, we expect || ˆQ − T π ˆQ||2 ν to be small with high probability, where π is the policy being evaluated and ˆQ is its estimated action-value function using REG-BRM or REG-LSTD. Let ˆQ(i) and εi = ˆQ(i) −T πi ˆQ(i), i = 0, . . . , N −1 denote the estimated action-value function and the Bellman residual at the ith iteration of our algorithms. Theorem 2 indicates that at each iteration i, the optimization procedure finds a function ˆQ(i) such that ∥εi∥2 ν is small with high probability. Lemma 3, which was stated as Lemma 12 in [2], bounds the final error after N iterations as a function of the intermediate errors. Note that no assumption is made on how the sequence ˆQ(i) is generated in this lemma. In Lemma 3 and Theorem 4, ρ ∈M(X) is a measure used to evaluate the performance of the algorithms, and Cρ,ν and Cν are the concentrability coefficients defined in [2]. Lemma 3 (Error Propagation). Let p ≥1 be a real and N be a positive integer. Then, for any sequence of functions {Q(i)} ⊂B(X × A; Qmax), 0 ≤i < N, and εi as defined above, the following inequalities hold: ∥Q∗−QπN ∥p,ρ ≤ 2γ (1 −γ)2 “ C1/p ρ,ν max 0≤i<N ∥εi∥p,ν + γN/p Rmax ” , ∥Q∗−QπN ∥∞≤ 2γ (1 −γ)2 “ C1/p ν max 0≤i<N ∥εi∥p,ν + γN/p Rmax ” . Theorem 4 (Convergence Result). Let Assumptions A1 and A2 hold, λh,n and λQ,n use the same schedules as in Theorem 2, and the number of samples n be large enough. The error between the optimal action-value function, Q∗, and the action-value function of the policy resulted after N iterations of the policy iteration algorithm based on REG-BRM or REG-LSTD, ˆQπN , is ∥Q∗−QπN ∥ρ ≤ 2γ (1 −γ)2 2 4c × C1/2 ρ,ν 0 @ „log(n) n « k 2k+d + log( N δ ) n ! 1 2 1 A + γN/2Rmax 3 5 , ∥Q∗−QπN ∥∞≤ 2γ (1 −γ)2 2 4c × C1/2 ν 0 @ „log(n) n « k 2k+d + log( N δ ) n ! 1 2 1 A + γN/2Rmax 3 5 , with probability at least 1 −δ for some c > 0. Theorem 4 shows the effect of number of samples n, degree of smoothness k, number of iterations N, and concentrability coefficients on the quality of the policy induced by the estimated actionvalue function. Three important observations are: 1) the main term in the rate of convergence is O(log(n)n− k 2k+d ), which is an optimal rate for regression up to a logarithmic factor and hence it is an optimal rate value-function estimation, 2) the effect of smoothness k is evident: for two problems with different degrees of smoothness, learning the smoother one is easier – an intuitive, but previously not rigorously proven result in the RL literature, and 3) increasing the number of iterations N increases the error of the second term, but its effect is only logarithmic. 6 Conclusions and Future Work In this paper we showed how L2-regularization can be added to two widely-used policy evaluation methods in RL: Bellman residual minimization (BRM) and least-squares temporal difference learning (LSTD), and developed two regularized policy evaluation algorithms REG-BRM and REGLSTD. We then showed how these algorithms can be implemented efficiently when the valuefunction approximation belongs to a reproducing kernel Hilbert space (RKHS). We also proved finite-sample performance bounds for REG-BRM and REG-LSTD, and the regularized policy iteration algorithms built on top of them. Our theoretical results indicate that our methods are able to achieve the optimal rate of convergence under the studied conditions. One of the remaining problems is how to find the regularization parameters: λh,n and λQ,n. Using cross-validation may lead to a completely self-tuning process. Another issue is the type of regularization. Here we used L2-regularization, however, the idea can be extended naturally to L1regularization in the style of Lasso, opening up the possibility of procedures that can handle a high number of irrelevant features. Although the i.i.d. sampling assumption is technical, extending our analysis to the case when samples are correlated requires generalizing quite a few results in supervised learning. However, we believe that this can be done without problem following the work of [2]. Extending the results to continuous-action MDPs is another major challenge. Here the interesting question is if it is possible to achieve better rates than the one currently available in the literature, which scales quite unfavorably with the dimension of the action space [1]. References [1] A. Antos, R. Munos, and Cs. Szepesv´ari. Fitted Q-iteration in continuous action-space MDPs. In Advances in Neural Information Processing Systems 20 (NIPS-2007), pages 9–16, 2008. [2] A. Antos, Cs. Szepesv´ari, and R. Munos. Learning near-optimal policies with Bellman-residual minimization based fitted policy iteration and a single sample path. Machine Learning, 71:89–129, 2008. [3] L.C. Baird. Residual algorithms: Reinforcement learning with function approximation. In Proceedings of the Twelfth International Conference on Machine Learning, pages 30–37, 1995. [4] S.J. Bradtke and A.G. Barto. Linear least-squares algorithms for temporal difference learning. Machine Learning, 22:33–57, 1996. [5] D. Ernst, P. Geurts, and L. Wehenkel. Tree-based batch mode reinforcement learning. JMLR, 6:503–556, 2005. [6] A. M. Farahmand, M. Ghavamzadeh, Cs. Szepesv´ari, and S. Mannor. L2-regularized policy iteration. 2009. (under preparation). [7] L. Gy¨orfi, M. Kohler, A. Krzy˙zak, and H. Walk. A distribution-free theory of nonparametric regression. Springer-Verlag, New York, 2002. [8] R.A. Howard. Dynamic Programming and Markov Processes. The MIT Press, Cambridge, MA, 1960. [9] T. Jung and D. Polani. Least squares SVM for least squares TD learning. In ECAI, pages 499–503, 2006. [10] M. Lagoudakis and R. Parr. Least-squares policy iteration. JMLR, 4:1107–1149, 2003. [11] M. Loth, M. Davy, and P. Preux. Sparse temporal difference learning using LASSO. In IEEE International Symposium on Approximate Dynamic Programming and Reinforcement Learning, 2007. [12] D. Ormoneit and S. Sen. Kernel-based reinforcement learning. Machine Learning, 49:161–178, 2002. [13] M. Riedmiller. Neural fitted Q iteration – first experiences with a data efficient neural reinforcement learning method. In 16th European Conference on Machine Learning, pages 317–328, 2005. [14] P. J. Schweitzer and A. Seidmann. Generalized polynomial approximations in Markovian decision processes. Journal of Mathematical Analysis and Applications, 110:568–582, 1985. [15] R.S. Sutton and A.G. Barto. Reinforcement Learning: An Introduction. Bradford Book. MIT Press, 1998. [16] R. J. Williams and L.C. Baird. Tight performance bounds on greedy policies based on imperfect value functions. In Proceedings of the Tenth Yale Workshop on Adaptive and Learning Systems, 1994. [17] X. Xu, D. Hu, and X. Lu. Kernel-based least squares policy iteration for reinforcement learning. IEEE Trans. on Neural Networks, 18:973–992, 2007.
2008
176
3,427
Dimensionality Reduction for Data in Multiple Feature Representations Yen-Yu Lin1,2 Tyng-Luh Liu1 Chiou-Shann Fuh2 1Institute of Information Science, Academia Sinica, Taipei, Taiwan {yylin, liutyng}@iis.sinica.edu.tw 2Department of CSIE, National Taiwan University, Taipei, Taiwan fuh@csie.ntu.edu.tw Abstract In solving complex visual learning tasks, adopting multiple descriptors to more precisely characterize the data has been a feasible way for improving performance. These representations are typically high dimensional and assume diverse forms. Thus finding a way to transform them into a unified space of lower dimension generally facilitates the underlying tasks, such as object recognition or clustering. We describe an approach that incorporates multiple kernel learning with dimensionality reduction (MKL-DR). While the proposed framework is flexible in simultaneously tackling data in various feature representations, the formulation itself is general in that it is established upon graph embedding. It follows that any dimensionality reduction techniques explainable by graph embedding can be generalized by our method to consider data in multiple feature representations. 1 Introduction The fact that most visual learning problems deal with high dimensional data has made dimensionality reduction an inherent part of the current research. Besides having the potential for a more efficient approach, working with a new space of lower dimension often can gain the advantage of better analyzing the intrinsic structures in the data for various applications, e.g., [3, 7]. However, despite the great applicability, the existing dimensionality reduction methods suffer from two main restrictions. First, many of them, especially the linear ones, require data to be represented in the form of feature vectors. The limitation may eventually reduce the effectiveness of the overall algorithms when the data of interest could be more precisely characterized in other forms, such as bag-of-features [1, 11] or high order tensors [19]. Second, there seems to be lacking a systematic way of integrating multiple image features for dimensionality reduction. When addressing applications that no single descriptor can appropriately depict the whole dataset, this shortcoming becomes even more evident. Alas, it is usually the case for addressing complex visual learning tasks [4]. Aiming to relax the two above-mentioned restrictions, we introduce an approach called MKL-DR that incorporates multiple kernel learning (MKL) into the training process of dimensionality reduction (DR) algorithms. Our approach is inspired by the work of Kim et al. [8], in which learning an optimal kernel over a given convex set of kernels is coupled with kernel Fisher discriminant analysis (KFDA), but their method only considers binary-class data. Without the restriction, MKL-DR manifests its flexibility in two aspects. First, it works with multiple base kernels, each of which is created based on a specific kind of visual feature, and combines these features in the domain of kernel matrices. Second, the formulation is illustrated with the framework of graph embedding [19], which presents a unified view for a large family of DR methods. Therefore the proposed MKL-DR is ready to generalize any DR methods if they are expressible by graph embedding. Note that these DR methods include supervised, semisupervised and unsupervised ones. 2 Related work This section describes some of the key concepts used in the establishment of the proposed approach, including graph embedding and multiple kernel learning. 2.1 Graph embedding Many dimensionality reduction methods focus on modeling the pairwise relationships among data, and utilize graph-based structures. In particular, the framework of graph embedding [19] provides a unified formulation for a set of DR algorithms. Let Ω= {xi ∈Rd}N i=1 be the dataset. A DR scheme accounted for by graph embedding involves a complete graph G whose vertices are over Ω. An affinity matrix W = [wij] ∈RN×N is used to record the edge weights that characterize the similarity relationships between training sample pairs. Then the optimal linear embedding v∗∈Rd can be obtained by solving v∗= arg min v⊤XDX⊤v=1, or v⊤XL′X⊤v=1 v⊤XLX⊤v, (1) where X = [x1 x2 · · · xN] is the data matrix, and L = diag(W · 1) −W is the graph Laplacian of G. Depending on the property of a problem, one of the two constraints in (1) will be used in the optimization. If the first constraint is chosen, a diagonal matrix D = [dij] ∈RN×N is included for scale normalization. Otherwise another complete graph G′ over Ωis required for the second constraint, where L′ and W ′ = [w′ ij] ∈RN×N are respectively the graph Laplacian and affinity matrix of G′. The meaning of (1) can be better understood with the following equivalent problem: min v PN i,j=1 ||v⊤xi −v⊤xj||2wij (2) subject to PN i=1 ||v⊤xi||2dii = 1, or (3) PN i,j=1 ||v⊤xi −v⊤xj||2w′ ij = 1. (4) The constrained optimization problem (2) implies that pairwise distances or distances to the origin of projected data (in the form of v⊤x) are modeled by one or two graphs in the framework. By specifying W and D (or W and W ′), Yan et al. [19] show that a set of dimensionality reduction methods, such as PCA, LPP [7], LDA, and MFA [19] can be expressed by (1). 2.2 Multiple kernel learning MKL refers to the process of learning a kernel machine with multiple kernel functions or kernel matrices. Recent research efforts on MKL, e.g., [9, 14, 16] have shown that learning SVMs with multiple kernels not only increases the accuracy but also enhances the interpretability of the resulting classifier. Our MKL formulation is to find an optimal way to linearly combine the given kernels. Suppose we have a set of base kernel functions {km}M m=1 (or base kernel matrices {Km}M m=1). An ensemble kernel function k (or an ensemble kernel matrix K) is then defined by k(xi, xj) = PM m=1 βmkm(xi, xj), βm ≥0 , (5) K = PM m=1 βmKm, βm ≥0 . (6) Consequently, the learned model from binary-class data {(xi, yi ∈±1)} will be of the form: f(x) = PN i=1 αiyik(xi, x) + b = PN i=1 αiyi PM m=1 βmkm(xi, x) + b. (7) Optimizing both the coefficients {αi}N i=1 and {βm}M m=1 is one particular form of the MKL problems. Our approach leverages such an MKL optimization to yield more flexible dimensionality reduction schemes for data in different feature representations. 3 The MKL-DR framework To establish the proposed method, we first discuss the construction of a set of base kernels from multiple features, and then explain how to integrate these kernels for dimensionality reduction. Finally, we design an optimization procedure to learn the projection for dimensionality reduction. 3.1 Kernel as a unified feature representation Consider a dataset Ωof N samples, and M kinds of descriptors to characterize each sample. Let Ω= {xi}N i=1, xi = {xi,m ∈Xm}M m=1, and dm : Xm × Xm →0 ∪R+ be the distance function for data representation under the mth descriptor. The domains resulting from distinct descriptors, e.g. feature vectors, histograms, or bags of features, are in general different. To eliminate these varieties in representation, we represent data under each descriptor as a kernel matrix. There are several ways to accomplish this goal, such as using RBF kernel for data in the form of vector, or pyramid match kernel [6] for data in the form of bag-of-features. We may also convert pairwise distances between data samples to a kernel matrix [18, 20]. By coupling each representation and its corresponding distance function, we obtain a set of M dissimilarity-based kernel matrices {Km}M m=1 with Km(i, j) = km(xi, xj) = exp −d2 m(xi,m, xj,m)/σ2 m  (8) where σm is a positive constant. As several well-designed descriptors and their associated distance functions have been introduced over the years, the use of dissimilarity-based kernel is convenient in solving visual learning tasks. Nonetheless, care must be taken in that the resulting Km is not guaranteed to be positive semidefinite. Zhang et al. [20] have suggested a solution to resolve this issue. It follows from (5) and (6) that determining a set of optimal ensemble coefficients {β1, β2, . . . , βM} can be interpreted as finding appropriate weights for best fusing the M feature representations. 3.2 The MKL-DR algorithm Instead of designing a specific dimensionality reduction algorithm, we choose to describe MKL-DR upon graph embedding. This way we can derive a general framework: If a dimensionality reduction scheme is explained by graph embedding, then it will also be extendible by MKL-DR to handle data in multiple feature representations. In graph embedding (2), there are two possible types of constraints. For the ease of presentation, we discuss how to develop MKL-DR subject to constraint (4). However, the derivation can be analogously applied when using constraint (3). It has been shown that a set of linear dimensionality reduction methods can be kernelized to nonlinear ones via kernel trick. The procedure of kernelization in MKL-DR is mostly accomplished in a similar way, but with the key difference in using multiple kernels {Km}M m=1. Suppose the ensemble kernel K in MKL-DR is generated by linearly combining the base kernels {Km}M m=1 as in (6). Let φ : X →F denote the feature mapping induced by K. Through φ, the training data can be implicitly mapped to a high dimensional Hilbert space, i.e., xi 7→φ(xi), for i = 1, 2, ..., N. (9) By assuming the optimal projection v lies in the span of training data in the feature space, we have v = PN n=1 αnφ(xn). (10) To show that the underlying algorithm can be reformulated in the form of inner product and accomplished in the new feature space F, we observe that plugging into (2) each mapped sample φ(xi) and projection v would appear exclusively in the form of vT φ(xi). Hence, it suffices to show that in MKL-DR, vT φ(xi) can be evaluated via the kernel trick: vT φ(xi) = PN n=1 PM m=1 αnβmkm(xn, xi) = αT K(i)β where (11) α =   α1 ... αN  ∈RN, β =   β1 ... βM  ∈RM, K(i) =   K1(1, i) · · · KM(1, i) ... ... ... K1(N, i) · · · KM(N, i)  ∈RN×M. With (2) and (11), we define the constrained optimization problem for 1-D MKL-DR as follows: min α,β PN i,j=1 ||αT K(i)β −αT K(j)β||2wij (12) subject to PN i,j=1 ||αT K(i)β −αT K(j)β||2w′ ij = 1, (13) βm ≥0, m = 1, 2, ..., M. (14) The additional constraints in (14) are included to ensure the the resulting kernel K in MKL-DR is a non-negative combination of base kernels. We leave the details of how to solve (12) until the next section, where using MKL-DR for finding a multi-dimensional projection V is considered. xi,1 xi,M X1 XM φ1 φm φM φ1(xi) φM(xi) F1 FM F β1 βm βM φ(xi) V V T φ(xi) = AT K(i)β RP Figure 1: Four kinds of spaces in MKL-DR: the input space of each feature representation, the RKHS induced by each base kernel, the RKHS by the ensemble kernel, and the projected space. 3.3 Optimization Observe from (11) that the one-dimensional projection v of MKL-DR is specified by a sample coefficient vector α and a kernel weight vector β. The two vectors respectively account for the relative importance among the samples and the base kernels. To generalize the formulation to uncover a multi-dimensional projection, we consider a set of P sample coefficient vectors, denoted by A = [α1 α2 · · · αP ]. (15) With A and β, each 1-D projection vi is determined by a specific sample coefficient vector αi and the (shared) kernel weight vector β. The resulting projection V = [v1 v2 · · · vP ] will map samples to a P-dimensional space. Analogous to the 1-D case, a projected sample xi can be written as V ⊤φ(xi) = A⊤K(i)β ∈RP . (16) The optimization problem (12) can now be extended to accommodate multi-dimensional projection: min A,β PN i,j=1 ||A⊤K(i)β −A⊤K(j)β||2wij (17) subject to PN i,j=1 ||A⊤K(i)β −A⊤K(j)β||2w′ ij = 1, βm ≥0, m = 1, 2, ..., M. In Figure 1, we give an illustration of the four kinds of spaces related to MKL-DR, including the input space of each feature representation, the RKHS induced by each base kernel and the ensemble kernel, and the projected Euclidean space. Since direct optimization to (17) is difficult, we instead adopt an iterative, two-step strategy to alternately optimize A and β. At each iteration, one of A and β is optimized while the other is fixed, and then the roles of A and β are switched. Iterations are repeated until convergence or a maximum number of iterations is reached. On optimizing A: By fixing β, the optimization problem (17) is reduced to min A trace(A⊤Sβ W A) subject to trace(A⊤Sβ W ′A) = 1 (18) where Sβ W = PN i,j=1 wij(K(i) −K(j))ββ⊤(K(i) −K(j))⊤, (19) Sβ W ′ = PN i,j=1 w′ ij(K(i) −K(j))ββ⊤(K(i) −K(j))⊤. (20) The problem (18) is a trace ratio problem, i.e., minA trace(A⊤Sβ W A)/trace(A⊤Sβ W ′A). A closedform solution can be obtained by transforming (18) into the corresponding ratio trace problem, i.e., minA trace[(A⊤Sβ W ′A)−1(A⊤Sβ W A)]. Consequently, the columns of the optimal A∗= [α1 α2 · · · αP ] are the eigenvectors corresponding to the first P smallest eigenvalues in Sβ W α = λSβ W ′α. (21) Algorithm 1: MKL-DR Input : A DR method specified by two affinity matrices W and W ′ (cf. (2)); Various visual features expressed by base kernels {Km}M m=1 (cf. (8)); Output: Sample coefficient vectors A = [α1 α2 · · · αP ]; Kernel weight vector β; Make an initial guess for A or β; for t ←1, 2, . . ., T do 1. Compute Sβ W in (19) and Sβ W ′ in (20); 2. A is optimized by solving the generalized eigenvalue problem (21); 3. Compute SA W in (23) and SA W ′ in (24); 4. β is optimized by solving optimization problem (25) via semidefinite programming; return A and β; On optimizing β: By fixing A, the optimization problem (17) becomes min β β⊤SA W β subject to β⊤SA W ′β = 1 and β ≥0 (22) where SA W = PN i,j=1 wij(K(i) −K(j))⊤AA⊤(K(i) −K(j)), (23) SA W ′ = PN i,j=1 w′ ij(K(i) −K(j))⊤AA⊤(K(i) −K(j)). (24) The additional constraints β ≥0 cause that the optimization to (22) can no longer be formulated as a generalized eigenvalue problem. Indeed it now becomes a nonconvex quadratically constrained quadratic programming (QCQP) problem, and is known to be very difficult to solve. We instead consider solving its convex relaxation by adding an auxiliary variable B of size M × M: min β,B trace(SA W B) (25) subject to trace(SA W ′B) = 1, (26) eT mβ ≥0, m = 1, 2, ..., M, (27)  1 βT β B  ⪰0, (28) where em in (27) is a column vector whose elements are 0 except that its mth element is 1, and the constraint in (28) means that the square matrix is positive semidefinite. The optimization problem (25) is an SDP relaxation of the nonconvex QCQP problem (22), and can be efficiently solved by semidefinite programming (SDP). One can verify the equivalence between the two optimization problems (22) and (25) by replacing the constraint (28) with B = ββT . In view of that the constraint B = ββT is nonconvex, it is relaxed to B ⪰ββT . Applying the Schur complement lemma, B ⪰ββT can be equivalently expressed by the constraint in (28). (Refer to [17] for further details.) Note that the numbers of constraints and variables in (25) are respectively linear and quadratic to M, the number of the adopted descriptors. In practice the value of M is often small. (M = 7 in our experiments.) Thus like most of the other DR methods, the computational bottleneck of our approach is still in solving the generalized eigenvalue problems. Listed in Algorithm 1, the procedure of MKL-DR requires an initial guess to either A or β in the alternating optimization. We have tried two possibilities: 1) β is initialized by setting all of its elements as 1 to equally weight each base kernel; 2) A is initialized by assuming AA⊤= I. In our empirical testing, the second initialization strategy gives more stable performances, and is thus adopted in the experiments. Pertaining to the convergence of the optimization procedure, since SDP relaxation has been used, the values of objective function are not guaranteed to monotonically decrease throughout the iterations. Still, the optimization procedures rapidly converge after only a few iterations in all our experiments. Novel sample embedding. Given a testing sample z, it is projected to the learned space of lower dimension by z 7→AT K(z)β, where K(z) ∈RN×M and K(z)(n, m) = km(xn, z). (29) 4 Experimental results To evaluate the effectiveness of MKL-DR, we test the technique with the supervised visual learning task of object category recognition. In the application, two (base) DR methods and a set of descriptors are properly chosen to serve as the input to MKL-DR. 4.1 Dataset The Caltech-101 image dataset [4] consists of 101 object categories and one additional class of background images. The total number of categories is 102, and each category contains roughly 40 to 800 images. Although each target object often appears in the central region of an image, the large class number and substantial intraclass variations still make the dataset very challenging. Still, the dataset provides a good test bed to demonstrate the advantage of using multiple image descriptors for complex recognition tasks. Since the images in the dataset are not of the same size, we resize them to around 60,000 pixels, without changing their aspect ratio. To implement MKL-DR for recognition, we need to select some proper graph-based DR method to be generalized and a set of image descriptors, and then derive (in our case) a pair of affinity matrices and a set of base kernels. The details are described as follows. 4.2 Image descriptors For the Caltech-101 dataset, we consider seven kinds of image descriptors that result in the seven base kernels (denoted below in bold and in abbreviation): GB-1/GB-2: From a given image, we randomly sample 300 edge pixels, and apply geometric blur descriptor [1] to them. With these image features, we adopt the distance function, as is suggested in equation (2) of the work by Zhang et al. [20], to obtain the two dissimilarity-based kernels, each of which is constructed with a specific descriptor radius. SIFT-Dist: The base kernel is analogously constructed as in GB-2, except now the SIFT descriptor [11] is used to extract features. SIFT-Grid: We apply SIFT with three different scales to an evenly sampled grid of each image, and use k-means clustering to generate visual words from the resulting local features of all images. Each image can then be represented by a histogram over the visual words. The χ2 distance is used to derive this base kernel via (8). C2-SWP/C2-ML: Biologically inspired features are also considered here. Specifically, both the C2 features derived by Serre et al. [15] and by Mutch and Lowe [13] have been chosen. For each of the two kinds of C2 features, an RBF kernel is respectively constructed. PHOG: We adopt the PHOG descriptor [2] to capture image features, and limit the pyramid level up to 2. Together with χ2 distance, the base kernel is established. 4.3 Dimensionality reduction methods We consider two supervised DR schemes, namely, linear discriminant analysis (LDA) and local discriminant embedding (LDE) [3], and show how MKL-DR can generalize them. Both LDA and LDE perform discriminant learning on a fully labeled dataset Ω= {(xi, yi)}N i=1, but make different assumptions about data distribution: LDA assumes data of each class can be modeled by a Gaussian, while LDE assumes they spread as a submanifold. Each of the two methods can be specified by a pair of affinity matrices to fit the formulation of graph embedding (2), and the resulting MKL dimensionality reduction schemes are respectively termed as MKL-LDA and MKL-LDE. Affinity matrices for LDA: The two affinity matrices W = [wij] and W ′ = [w′ ij] are defined as wij = 1/nyi, if yi = yj, 0, otherwise, and w′ ij = 1 N , (30) where nyi is the number of data points with label yi. See [19] for the derivation. Table 1: Recognition rates (mean ± std %) for Caltech-101 dataset number of classes number of classes kernel(s) method 102 101 method 102 101 GB-1 57.3 ± 2.5 57.7 ± 0.7 57.1 ± 1.4 57.7 ± 0.8 GB-2 60.0 ± 1.5 60.6 ± 1.5 60.9 ± 1.4 61.3 ± 2.1 SIFT-Dist 53.0 ± 1.4 53.2 ± 0.8 54.2 ± 0.5 54.6 ± 1.5 SIFT-Grid 48.8 ± 1.9 49.6 ± 0.7 49.5 ± 1.3 50.1 ± 0.3 C2-SWP 30.3 ± 1.2 30.7 ± 1.5 31.1 ± 1.5 31.3 ± 0.7 C2-ML 46.0 ± 0.6 46.8 ± 0.9 45.8 ± 0.2 46.7 ± 1.5 PHOG KFD 41.8 ± 0.6 42.1 ± 1.3 KLDE 42.2 ± 0.6 42.6 ± 1.3 KFD-Voting 68.4 ± 1.5 68.9 ± 0.3 KLDE-Voting 68.4 ± 1.4 68.7 ± 0.8 KFD-SAMME 71.2 ± 1.4 72.1 ± 0.7 KLDE-SAMME 71.1 ± 1.9 71.3 ± 1.2 All MKL-LDA 74.6 ± 2.2 75.3 ± 1.7 MKL-LDE 75.3 ± 1.5 75.5 ± 1.7 Affinity matrices for LDE: In LDE, not only the data labels but also the neighborhood relationships are simultaneously considered to construct the affinity matrices W = [wij] and W ′ = [w′ ij]: wij = 1, if yi = yj ∧[i ∈Nk(j) ∨j ∈Nk(i)], 0, otherwise, (31) w′ ij = 1, if yi ̸= yj ∧[i ∈Nk′(j) ∨j ∈Nk′(i)], 0, otherwise. (32) where i ∈Nk(j) means that sample xi is one of the k nearest neighbors for sample xj. The definitions of the affinity matrices are faithful to those in LDE [3]. However, since there are now multiple image descriptors, we need to construct an affinity matrix for data under each descriptor, and average the resulting affinity matrices from all the descriptors. 4.4 Quantitative results Our experiment setting follows the one described by Zhang et al. [20]. From each of the 102 classes, we randomly pick 30 images where 15 of them are included for training and the other 15 images are used for testing. To avoid a biased implementation, we redo the whole process of learning by switching the roles of training and testing data. In addition, we also carry out the experiments without using the data from the the background class, since such setting is adopted in some of the related works, e.g., [5]. Via MKL-DR, the data are projected to the learned space, and the recognition task is accomplished there by enforcing the nearest-neighbor rule. Coupling the seven base kernels with the affinity matrices of LDA and LDE, we can respectively derive MKL-LDA and MKL-LDE using Algorithm 1. Their effectiveness is investigated by comparing with KFD (kernel Fisher discriminant) [12] and KLDE (kernel LDE) [3]. Since KFD considers only one base kernel at a time, we implement two strategies to take account of the classification outcomes from the seven resulting KFD classifiers. The first is named as KFD-Voting. It is constructed based on the voting result of the seven KFD classifiers. If there is any ambiguity in the voting result, the next nearest neighbor in each KFD classifier will be considered, and the process is continued until a decision on the class label can be made. The second is termed as KFD-SAMME. By viewing each KFD classifier as a multi-class weak learner, we boost them by SAMME [21], which is a multi-class generalization of AdaBoost. Analogously, we also have KLDE-Voting and KLDE-SAMME. We report the mean recognition rates and the standard deviation in Table 1. First of all, MKL-LDA achieves a considerable performance gain of 14.6% over the best recognition rate by the seven KFD classifiers. On the other hand, while KFD-Voting and KFD-SAMME try to combine the separately trained KFD classifiers, MKL-LDA jointly integrates the seven kernels into the learning process. The quantitative results show that MKL-LDA can make the most of fusing various feature descriptors, and improves the recognition rates from 68.4% and 71.2% to 74.6%. Similar improvements can also be observed for MKL-LDE. The recognition rates 74.6% in MKL-LDA and 75.3% in MKL-LDE are favorably comparable to those by most of the existing approaches. In [6], Grauman and Darrell report a 50% recognition rate based on the pyramid matching kernel over data in bag-of-features representation. By combing shape and spatial information, SVM-KNN of Zhang et al. [20] achieves 59.05%. In Frome et al. [5], the accuracy rate derived by learning the local distances, one for each training sample, is 60.3%. Our related work [10] that performs adaptive feature fusing via locally combining kernel matrices has a recognition rate 59.8%. Multiple kernel learning is also used in Varma and Ray [18], and it can yield a top recognition rate of 87.82% by integrating visual cues like shape and color. 5 Conclusions and discussions The proposed MKL-DR technique is useful as it has the advantage of learning a unified space of low dimension for data in multiple feature representations. Our approach is general and applicable to most of the graph-based DR methods, and improves their performance. Such flexibilities allow one to make use of more prior knowledge for effectively analyzing a given dataset, including choosing a proper set of visual features to better characterize the data, and adopting a graph-based DR method to appropriately model the relationship among the data points. On the other hand, via integrating with a suitable DR scheme, MKL-DR can extend the multiple kernel learning framework to address not just the supervised learning problems but also the unsupervised and the semisupervised ones. Acknowledgements. This work is supported in part by grants 95-2221-E-001-031-MY3 and 972221-E-001-019-MY3. References [1] A. Berg, T. Berg, and J. Malik. Shape matching and object recognition using low distortion correspondences. In CVPR, 2005. [2] A. Bosch, A. Zisserman, and X. Mu˜noz. Image classification using random forests and ferns. In ICCV, 2007. [3] H.-T. Chen, H.-W. Chang, and T.-L. Liu. Local discriminant embedding and its variants. In CVPR, 2005. [4] 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 CVPR Workshop on Generative-Model Based Vision, 2004. [5] A. Frome, Y. Singer, and J. Malik. Image retrieval and classification using local distance functions. In NIPS, 2006. [6] K. Grauman and T. Darrell. The pyramid match kernel: Efficient learning with sets of features. JMLR, 2007. [7] X. He and P. Niyogi. Locality preserving projections. In NIPS, 2003. [8] S.-J. Kim, A. Magnani, and S. Boyd. Optimal kernel selection in kernel fisher discriminant analysis. In ICML, 2006. [9] G. Lanckriet, N. Cristianini, P. Bartlett, L. Ghaoui, and M. Jordan. Learning the kernel matrix with semidefinite programming. JMLR, 2004. [10] Y.-Y. Lin, T.-L. Liu, and C.-S. Fuh. Local ensemble kernel learning for object category recognition. In CVPR, 2007. [11] D. Lowe. Distinctive image features from scale-invariant keypoints. IJCV, 2004. [12] S. Mika, G. R¨atsch, J. Weston, B. Sch¨olkopf, and K.-R. M¨uller. Fisher discriminant analysis with kernels. In Neural Networks for Signal Processing, 1999. [13] J. Mutch and D. Lowe. Multiclass object recognition with sparse, localized features. In CVPR, 2006. [14] A. Rakotomamonjy, F. Bach, S. Canu, and Y. Grandvalet. More efficiency in multiple kernel learning. In ICML, 2007. [15] T. Serre, L. Wolf, and T. Poggio. Object recognition with features inspired by visual cortex. In CVPR, 2005. [16] S. Sonnenburg, G. R¨atsch, C. Sch¨afer, and B. Sch¨olkopf. Large scale multiple kernel learning. JMLR, 2006. [17] L. Vandenberghe and S. Boyd. Semidefinite programming. SIAM Review, 1996. [18] M. Varma and D. Ray. Learning the discriminative power-invariance trade-off. In ICCV, 2007. [19] S. Yan, D. Xu, B. Zhang, H. Zhang, Q. Yang, and S. Lin. Graph embedding and extensions: A general framework for dimensionality reduction. PAMI, 2007. [20] H. Zhang, A. Berg, M. Maire, and J. Malik. Svm-knn: Discriminative nearest neighbor classification for visual category recognition. In CVPR, 2006. [21] J. Zhu, S. Rosset, H. Zou, and T. Hastie. Multi-class adaboost. Technical report, Dept. of Statistics, University of Michigan, 2005.
2008
177
3,428
Continuously-adaptive discretization for message-passing algorithms Kannan Achan Microsoft Research Silicon Valley Mountain View, California, USA Michael Isard Microsoft Research Silicon Valley Mountain View, California, USA John MacCormick Dickinson College Carlisle, Pennsylvania, USA Abstract Continuously-Adaptive Discretization for Message-Passing (CAD-MP) is a new message-passing algorithm for approximate inference. Most message-passing algorithms approximate continuous probability distributions using either: a family of continuous distributions such as the exponential family; a particle-set of discrete samples; or a fixed, uniform discretization. In contrast, CAD-MP uses a discretization that is (i) non-uniform, and (ii) adaptive to the structure of the marginal distributions. Non-uniformity allows CAD-MP to localize interesting features (such as sharp peaks) in the marginal belief distributions with time complexity that scales logarithmically with precision, as opposed to uniform discretization which scales at best linearly. We give a principled method for altering the non-uniform discretization according to information-based measures. CAD-MP is shown in experiments to estimate marginal beliefs much more precisely than competing approaches for the same computational expense. 1 Introduction Message passing algorithms such as Belief Propagation (BP) [1] exploit factorization to perform inference. Exact inference is only possible when the distribution to be inferred can be represented by a tree and the model is either linear-Gaussian or fully discrete [2, 3]. One attraction of BP is that algorithms developed for tree-structured models can be applied analogously [4] to models with loops, such as Markov Random Fields. There is at present no general-purpose approximate algorithm that is suitable for all problems, so the choice of algorithm is governed by the form of the model. Much of the literature concentrates on problems from statistics or control where point measurements are made (e.g. of an animal population or a chemical plant temperature), and where the state evolution is non-linear or the process noise is non-Gaussian [5, 6]. Some problems, notably those from computer vision, have more complex observation distributions that naturally occur as piecewise-constant functions on a grid (i.e. images), and so it is common to discretize the underlying continuous model to match the structure of the observations [7, 8]. As the dimensionality of the state-space increases, a na¨ıve uniform discretization rapidly becomes intractable [8]. When models are complex functions of the observations, sampling methods such as non-parametric belief propagation (NBP) [9, 10], have been successful. Distributions of interest can often be represented by a factor graph [11]. “Message passing” is a class of algorithms for approximating these distributions, in which messages are iteratively updated between factors and variables. When a given message is to be updated, all other messages in the graph are fixed and treated as though they were exact. The algorithm proceeds by picking, from 1 a family of approximate functions, the message that minimizes a divergence to the local “exact” message. In some forms of the approach [12] this minimization takes place over approximate belief distributions rather than approximate messages. A general recipe for producing message passing algorithms, summarized by Minka [13], is as follows: (i) pick a family of approximating distributions; (ii) pick a divergence measure to minimize; (iii) construct an optimization algorithm to perform this minimization within the approximating family. This paper makes contributions in all three steps of this recipe, resulting in a new algorithm termed Continuously-Adaptive Discretization for Message-Passing (CAD-MP). For step (i), we advocate an approximating family that has received little attention in recent years: piecewise-constant probability densities with a bounded number of piecewise-constant regions. Although others have used this family in the past [14], it has not to our knowledge been employed in a modern message-passing framework. We believe piecewise-constant probability densities are very well suited to some problem domains, and this constitutes the chief contribution of the paper. For step (ii), we have chosen for our initial investigation the “inclusive” KL-divergence [13]—a standard choice which leads to the well known Belief Propagation message update equations. We show that for a special class of piecewise-constant probability densities (the so-called naturally-weighted densities), the minimal divergence is achieved by a distribution of minimum entropy, leading to an intuitive and easily-implemented algorithm. For step (iii), we employ a greedy optimization by traversing axis-aligned binary-split kd-trees (explained in Section 3). The contribution here is an efficient algorithm called “informed splitting” for performing the necessary optimization in practice. As we show in Section 4, CAD-MP computes much more accurate approximations than competing approaches for a given computational budget. 2 Discretizing a factor graph Let us consider what it means to discretize an inference problem represented by a factor graph with factors fi and continuous variables xα taking values in some subset of RN. One constructs a nonuniform discretization of the factor graph by partitioning the state space of each variable xα into K regions Hk α for k = 1, . . . , K. This discretization induces a discrete approximation f ′ i of the factors, which are now regarded as functions of discrete variables x′ α taking integer values in the set {1, 2, . . . , K}: f ′ i(k, l, . . .) = Z xα∈Hk α,xβ∈Hl β,... fi(xα, xβ, . . .), (1) for k, l, . . . = 1, . . . , K. A slight variant of BP [4] could then be used to infer the marginals on x′ α according to the update equations for messages m and beliefs b: mα,i(k) = Y f ′ j∼x′ α\f ′ i mj,α(k) (2) mi,α(k) = 1 |Hkα| X x′|x′ α=k f ′ i(x′) Y x′ β∼f ′ i\x′ α mβ,i(x′ β) (3) bα(k) = |Hk α| Y f ′ j∼x′ α mi,α(k), (4) where a ∼b\c means “all neighbors a of b except c”, x′ is an assignment of values to all variables, and |Hk α| = R Hk α 1. Thus, given a factor graph of continuous variables and a particular choice of discretization {Hk α}, one gets a piecewise-constant approximation to the marginals by first discretizing the variables according to (1), then using BP according to (2)–(4). The error in the approximation to the true marginals arises from (3) when f ′ i(x) is not constant over x in the given partition. Consider the task of selecting between discretizations of a continuous probability distribution p(x) over some subset U of Euclidean space. A discretization of p consists in partitioning U into K disjoint subsets V1, . . . , VK and assigning a weight wk to each Vk, with P k wk = 1. The corresponding discretized probability distribution q(x) assigns density wk/|Vk| to Vk. We are interested in finding a discretization for which the KL divergence KL(p||q) is as small as possible. The optimal choice of the wk for any fixed partitioning V1, . . . , VK is to take wk = R x∈Vk p(x) [14]; we call 2 0.61 0.01 0.29 0.09 PPPPP q (a) H 0.29 (b) 0.14 H−− 0.02 H+− 0.11 H−+ 0.01 H++   : XXXXXXXXXXXXXX z (c) 0.25 H1− 0.03 H1+ (d) 0.16 H2− 0.12 H2+ (e) H 0.28 (f) Figure 1: Expanding a hypercube in two dimensions. Hypercube H (b), a subset of the full state space (a), is first “expanded” into the sub-cubes {H−−, H+−, H−+, H++} (c) by splitting along each possible dimension. These sub-cubes are then re-combined to form two possible split candidates {H1−, H1+} (d) and {H2−, H2+} (e). Informed belief values are computed for the re-combined hypercubes, including a new estimate for ˆb(H) (f), by summing the beliefs in the finer-scale partitioning. The new estimates are more accurate since the error introduced by the discretization decreases as the partitions become smaller. these the natural weights for p(x), given the Vk. There is a simple relationship between the quality of a naturally-weighted discretization and its entropy H(·): Theorem 1. Among any collection of naturally-weighted discretizations of p(x), the minimum KL divergence to p(x) is achieved by a discretization of minimal entropy. Proof. For a naturally-weighted discretization q, KL(p||q) = −PK k=1 wk log wk |Vk| + R U p log p = H(q) −H(p). H(p) is constant, so KL(p||q) is minimized by minimizing H(q). □ Suppose we are given a discretization {Hk α} and have computed messages and beliefs for every node using (2)–(4). The messages have not necessarily reached a fixed point, but we nevertheless have some current estimate for them. For any arbitrary hypercube H at xα (not necessarily in its current discretization) we can define the informed belief, denoted ˆb(H), to be the belief H would receive if all other nodes and their incoming messages were left unaltered. To compute the informed belief, one first computes new discrete factor function values involving H using integrals like (1). These values are fed into (2), (3) to produce “informed” messages mi,α(H) arriving at xα from each neighbor fi. Finally, the informed messages are fed into (4) to obtain the informed belief ˆb(H). 3 Continuously-adaptive discretization The core of the CAD-MP algorithm is the procedure for passing a message to a variable xα. Given fixed approximations at every other node, any discretization of α induces an approximate belief distribution qα(xα). The task of the algorithm is to select the best discretization, and as Theorem 1 shows, a good strategy for this selection is to look for a naturally-weighted discretization that minimizes the entropy of qα. We achieve this using a new algorithm called “informed splitting” which is described next. CAD-MP employs an axis-aligned binary-split kd-tree [15] to represent the discrete partitioning of a D-dimensional continuous state space at each variable (the same representation was used in [14] where it was called a Binary Split Partitioning). For our purposes, a kd-tree is a binary tree in which each vertex is assigned a subset—actually a hypercube—of the state space. The root is assigned the whole space, and any internal vertex splits its hypercube equally between its two children using an axis-aligned plane. The subsets assigned to all leaves partition the state space into hypercubes. We build the kd-tree greedily by recursively splitting leaf vertices: at each step we must choose a hypercube Hk α in the current partitioning to split, and a dimension d to split it. According to Theorem 1, we should choose k and d to minimize the entropy of the resulting discretization— provided that this discretization has “natural” weights. In practice, the natural weights are estimated using informed beliefs; we nevertheless proceed as though they were exact and choose the k- and 3 d-values leading to lowest entropy. A subroutine of the algorithm involves “expanding” a hypercube into sub-cubes as illustrated in the two-dimensional case in Figure 1. The expansion procedure generalizes to D dimensions by first expanding to 2D subcubes and then re-combining these into 2D candidate splits. Note that for all d ∈{1, . . . , D} ˆb(H) ≡ˆb(Hd−) + ˆb(Hd−). (5) Once we have expanded each hypercube in the current partitioning and thereby computed values for ˆb(Hk α), ˆb(Hk,d− α ) and ˆb(Hk,d+ α ) for all k and d, we choose k and d to minimize the “split entropy” γα(k, d) = − X i̸=k ˆb(Hi α) log ˆb(Hi α) |Hiα| −ˆb(Hk,d− α ) log ˆb(Hk,d− α ) |Hk,d− α | −ˆb(Hk,d+ α ) log ˆb(Hk,d+ α ) |Hk,d+ α | . (6) Note that from (5) we can perform this minimization without normalizing the ˆb(·). We can now describe the CAD-MP algorithm using informed splitting, which re-partitions a variable of the factor graph by producing a new kd-tree whose leaves are the hypercubes in the new partitioning: 1. Initialize the root vertex of the kd-tree with its associated hypercube being the whole state space, with belief 1. Add this root to a leaf set L and “expand” it as shown in Figure 1. 2. While the number of leaves |L| is less than the desired number of partitions in the discretized model: (a) Pick the leaf H and split dimension d that minimize the split-entropy (6). (b) Create two new vertices H−and H+ by splitting H along dimension d, and “expand” these new vertices. (c) Remove H from L, and add H−and H+ to L. All variables in the factor graph are initialized with the trivial discretization (a single partition). Variables can be visited according to any standard message-passing schedule, where a “visit” consists of repartitioning according to the above algorithm. A simple example showing the evolution of the belief at one variable is shown in Figure 2. If the variable being repartitioned has T neighbors and we require a partitioning of K hypercubes, then a straightforward implementation of this algorithm requires the computation of 2K × 2D × KT message components. Roughly speaking, then, informed splitting pays a factor of 2D+1 over BP which must compute K2T message components. But CAD-MP trades this for an exponential factor in K since it can home in on interesting areas of the state space using binary search, so if BP requires K partitions for a given level of accuracy, CAD-MP (empirically) achieves the same accuracy with only O(log K) partitions. Note that in special cases, including some low-level vision applications [16], classical BP can be performed in O(KT) time and space; however this is still prohibitive for large K. 4 Experiments We would like to compare our candidate algorithms against the marginal belief distributions that would be computed by exact inference, however no exact inference algorithm is known for our models. Instead, for each experiment we construct a fine-scale uniform discretization Df of the model and input data, and compute the marginal belief distributions p(xα; Df) at each variable xα using the standard forward-backward BP algorithm. Given a candidate approximation C we can then compare the marginals p(xα; C) under that approximation to the fine-scale discretization by computing the KL-divergence KL(p(xα; Df)||p(xα; C)) at each variable. In results below, we report the mean of this divergence across all variables in the graph, and refer to it in the text as µ(C). While a “fine-enough” uniform discretization will tend to the true marginals, we do not a priori know how fine that is. We therefore construct a sequence of coarser uniform discretizations Di c of the same model and data, and compute µ(Di c) for each of them. If µ(Di c) is converging rapidly enough to zero, as is the case in the experiments below, we have confidence that the fine-scale discretization is a good approximation to the exact marginals. 4 Observation (local factor) (a) (b) (c) Figure 2: Evolution of discretization at a single variable. The left image is the local (singlevariable) factor at the first node in a simple chain MRF whose nodes have 2-D state spaces. The next three images, from left to right, show the evolution of the informed belief. Initially (a) the partitioning is informed simply by the local factor, but after messages have been passed once along the chain and back (b), the posterior marginal estimate has shifted and the discretization has adapted accordingly. Subsequent iterations over the chain (c) do not substantially alter the estimated marginal belief. For this toy example only 16 partitions are used, and the normalized log of the belief is displayed to make the structure of the distribution more apparent. We compare our adaptive discretization algorithm against non-parametric belief propagation (NBP) [9, 10] which represents the marginal distribution at a variable by a particle set. We generate some importance samples directly from the observation distribution, both to initialize the algorithm and to “re-seed” the particle set when it gets lost. Particle sets typically do not approximate the tails of a distribution well, leading to zeros in the approximate marginals and divergences that tend to infinity. We therefore regularize all divergence computations as follows: KL∗(p||q) = X k p∗ k log(p∗ k q∗ k ), p∗ k = ϵ + R Hk p(x) P n(ϵ + R Hn p(x)), q∗ k = ϵ + R xk q(x) P n(ϵ + R Hn q(x)) (7) where {Hk} are the partitions in the fine-scale discretization Df. All experiments use ϵ = 10−4 which was found empirically to show good results for NBP. We begin with a set of experiments over ten randomly generated input sequences of a onedimensional target moving through structured clutter of similar-looking distractors. One of the sequences is shown in Figure 3a, where time goes from bottom to top. The measurement at a timestep consists in 240 “pixels” (piecewise-constant regions of uniform width) generated by simulating a small one-dimensional target in clutter, with additive Gaussian shot-noise. There are stationary clutter distractors, and also periodic “forkings” where a moving clutter distractor emerges from the target and proceeds for a few time-steps before disappearing. Each sequence contains 256 timesteps, and the “exact” marginals (Figure 3b) are computed using standard discrete BP with 15360 states per time-step. The modes of the marginals generated by all the experiments are similar to those in Figure 3b, except for one run of NBP shown in Figure 3c that failed entirely to find the mode (red line) due to an unlucky random seed. However, the distributions differ in fine structure, where CAD-MP approximates the tails of the distribution much better than NBP. Figure 4a shows the divergences µ(·) for the various discrete algorithms: both uniform discretization at various degrees of coarseness, and adaptive discretization using CAD-MP with varying numbers of partitions. Each data point shows the mean divergence µ(·) for one of the ten simulated onedimensional datasets. As the number of adaptive partitions increases, the variance of µ(·) across trials increases, but the divergence stays small. Higher divergences in CAD-MP trials correspond to a mis-estimation of the tails of the marginal belief at a few time-steps. The straight line on the log/log plot for the uniform discretizations gives us confidence that the fine-scale discretization is a close approximation to the exact beliefs. The adaptive discretization provides a very faithful approximation to this “exact” distribution with vastly fewer partitions. Figure 4b shows the divergences for the same ten one-dimensional trial sequences when the marginals are computed using NBP with varying numbers of particles. The NBP algorithm was run five times on each of the ten simulated one-dimensional datasets with different random seeds each time, and the particle-set sizes were chosen to approximately match the computation time of the CAD-MP algorithm. The NBP algorithm does worse absolutely (the divergences are much larger even after regularization, indicating that areas of high belief are sometimes mis-estimated), and also 5 (a): Observations (b): “Exact” beliefs (c): an NBP “failure” (d) (e) (f) (g) Exact beliefs (d) are represented more faithfully by CAD-MP (e), (f) than NBP (g) Figure 3: One of the one-dimensional test sequences. The region of the white rectangle in (b) is expanded in (d)–(g), with beliefs now plotted on log intensity scale to expand their dynamic range. CAD-MP using only 16 partitions per time-step (e) already produces a faithful approximation to the exact belief (d), and increasing to 128 partitions (f) fills in more details. The NBP algorithm using 800 particles (g) does not approximate the tails of the distribution well.                                                      !" # $ # % &  ' ( ) * ) + ) *+ + + ) + )) + ) )) , . / 0 1 2 3 4 5 5 3 6 2 . 7 8 9 : ; < = > ? @ A B > C D E F = G H II J K L M N O P QR S II J K L M N O P QR T II J K L M N O P QR U II J K L M N O P QR (a): 1D test—discrete algorithms (b): 1D test—NBP V W VV V X V W VV X V W V X V W X X X V X VV X VVV X VV V V X VV VVV Y Z [ \ ] ^ Y _ ` Z a a _ b Z Y [ Z c d Z e fg hij k l m n j o p o p k e q r s t u v wx y z y { | t } ~  €    €          ‚ ƒ „ … † ‡ ˆ ‰ Š ƒ ‹ ‹ ‰ Œ ƒ ˆ „ ƒ  Ž ƒ   ‘ ’ “ ” • – — ˜ ” ™ š › œ “  ž ŸŸ   ¡ ¢ £ ¤ ¥ ¦ §¨ © ŸŸ   ¡ ¢ £ ¤ ¥ ¦ §¨ ª ŸŸ   ¡ ¢ £ ¤ ¥ ¦ §¨ « ¬ Ÿ Ÿ   ¡ ¢ £ ¤ ¥ ¦ § ¨ ­ ž Ÿ Ÿ   ¡ ¢ £ ¤ ¥ ¦ § ¨ (c): 2D test—discrete algorithms (d): 2D test—NBP Figure 4: Adaptive discretization achieves the same accuracy as uniform discretization using many fewer partitions, but non-parametric belief propagation is less effective. See Section 4 for details. 6 varies greatly across different trial sequences, and when re-run with different random seeds on the same trial sequence. Note also that the µ(·) are bi-modal—values of µ(·) above around 0.5 signify runs on which NBP incorrectly located the mode of the marginal belief distribution at some or all time-steps, as in Figure 3c. We performed a similar set of experiments using a simulated two-dimensional data-set. This time the input data is a 64 × 64 image grid, and the “exact” fine-scale discretization is at a resolution of 512 × 512 giving 262144 discrete states in total. Figures 4c and 4d show that adaptive discretization still greatly outperforms NBP for an equivalent computational cost. Again there is a straight-line trend in the log/log plots for both CAD-MP and uniform discretization, though as in the one-dimensional case the variance of the divergences increases with more partitions. NBP again performs less accurately, and frequently fails to find the high-weight regions of the belief at all at some time-steps, even with 3200 particles. Adaptive discretization seems to correct some of the well-known limitations of particle-based methods. The discrete distribution is able to represent probability mass well into the tails of the distribution, which leads to a more faithful approximation to the exact beliefs. This also prevents the catastrophic failure case for NBP shown in Figure 3c, where the mode of the distribution is lost entirely because no particles were placed nearby. Moreover, CAD-MP’s computational complexity scales linearly with the number of incoming messages at a factor. NBP has to resort to heuristics to sample from the product of incoming messages once the number of messages is greater than two. 5 Related work The work most closely related to CAD-MP is the 1997 algorithm of Kozlov and Koller [14]. We refer to this algorithm as “KK97”; its main differences to CAD-MP are: (i) KK97 is described in a junction tree setting and computes the marginal posterior of just the root node, whereas CAD-MP computes beliefs everywhere in the graph; (ii) KK97 discretizes messages (on junction tree edges) rather than variables (in a factor graph), so multiplying incoming messages together requires the substantial additional complexity of merging disparate discretizations, compared to CAD-MP in which the incoming messages share the same discretization. Difference (i) is the more serious, since it renders KK97 inapplicable to the type of early-vision problem we are motivated by, where the marginal at every variable must be estimated. Coarse-to-fine techniques can speed up the convergence of loopy BP [16] but this does not address the discrete state-space explosion. One can also prune the state space based on local evidence [17, 18]. However, this approach is unsuitable when the data function has high entropy; moreover, it is very difficult to bring a state back into the model once it has been pruned. Another interesting approach is to retain the uniform discretization, but enforce sparsity on messages to reduce computational cost. This was done in both [19] (in which messages are approximated using a using a mixture of delta functions, which in practice results in retaining the K largest message components) and [20] (which uses an additional uniform distribution in the approximating distribution to ensure non-zero weights for all states in the discretization). However, these approaches appear to suffer when multiplying messages with disjoint peaks whose tails have been truncated to enforce sparsity: such peaks are unable to fuse their evidence correctly. Also, [20] is not directly applicable when the state-space is multi-dimensional. Expectation Propagation [5] is a highly effective algorithm for inference in continuous-valued networks, but is not valid for densities that are multimodal mixtures. 6 Discussion We have demonstrated that our new algorithm, CAD-MP, performs accurate approximate inference with complex, multi-modal observation distributions and corresponding multi-modal posterior distributions. It substantially outperforms the two standard methods for inference in this setting: uniform-discretization and non-parametric belief propagation. While we only report results here on simulated data, we have successfully used the method on low-level vision problems and are preparing a companion publication to describe these results. We believe CAD-MP and variants on it may be applicable to other domains where complex distributions must be estimated in spaces of low to 7 moderate dimension. The main challenge in applying the technique to an arbitrary factor graph is the tractability of the definite integrals (1). This paper describes a particular set of engineering choices motivated by our problem domain. We use kd-trees to describe partitionings: other data structures could certainly be used. Also, we employ a greedy heuristic to select a partitioning with low entropy rather than exhaustively computing a minimimum entropy over some family of discretizations. We have experimented with a Metropolis algorithm to augment this greedy search: a Metropolis move consists in “collapsing” some sub-tree of the current partitioning and then re-expanding using a randomized form of the minimum-entropy criterion. We have also tried tree-search heuristics that do not need the O(2D) “expansion” step, and thus may be more effective when D is large. The choices reported here seem to give the best accuracy on our problems for a given computational budget, however many others are possible and we hope this work will serve as a starting point for a renewed interest in adaptive discretization in a variety of inference settings. References [1] J. Pearl. Probabilistic Reasoning in Intelligent Systems: Networks of Plausible Inference. Morgan Kaufmann, 1988. [2] P. Dagum and M. Luby. Approximating probabilistic inference in bayesian belief networks is NP-hard. Artificial Intelligence, 60(1):141–153, 1993. [3] Robert G. Cowell, A. Philip Dawid, Steffen L. Lauritzen, and David J. Spiegelhalter. Probabilistic Networks and Expert Systems. Springer, 1999. [4] Jonathan S. Yedidia, William T. Freeman, and Yair Weiss. Generalized belief propagation. In NIPS, pages 689–695, 2000. [5] T. Minka. Expectation propagation for approximate bayesian inference. In Proc. UAI, pages 362–369, 2001. [6] G. Kitagawa. The two-filter formula for smoothing and an implementation of the gaussian-sum smoother. Ann. Inst. Statist. Math., 46(4):605–623, 1994. [7] P.F. Felzenszwalb and D.P. Huttenlocher. Efficient belief propagation for early vision. In Proc. CVPR, 2004. [8] M. Isard and J. MacCormick. Dense motion and disparity estimation via loop belief propagation. In ACCV, pages 32–41, 2006. [9] E. Sudderth, A. Ihler, W. Freeman, and A. Willsky. Nonparametric belief propagation. In Proc. CVPR, volume 1, pages 605–612, 2003. [10] M. Isard. Pampas: Real-valued graphical models for computer vision. In Proc. CVPR, volume 1, pages 613–620, 2003. [11] F.R. Kschischang, B.J. Frey, and H.A. Loeliger. Factor graphs and the sum-product algorithm. IEEE Transactions on Information Theory, 47(2):498–519, 2001. [12] O. Zoeter and H. Heskes. Deterministic approximate inference techniques for conditionally gaussian state space models. Statistics and Computing, 16(3):279–292, 2006. [13] T. Minka. Divergence measures and message passing. Technical Report MSR-TR-2005-173, Microsoft Research, 2005. [14] Alexander V. Kozlov and Daphne Koller. Nonuniform dynamic discretization in hybrid networks. In Proc. UAI, pages 314–325, 1997. [15] Jon Louis Bentley. Multidimensional binary search trees used for associative searching. Commun. ACM, 18(9):509–517, 1975. [16] P.F. Felzenszwalb and D.P. Huttenlocher. Pictorial structures for object recognition. Int. J. Computer Vision, 61(1):55–79, 2005. [17] J. Coughlan and S. Ferreira. Finding deformable shapes using loopy belief propagation. In Proc. ECCV, pages 453–468, 2002. [18] J. Coughlan and H. Shen. Shape matching with belief propagation: Using dynamic quantization to accommodate occlusion and clutter. In Proc. Workshop on Generative-Model Based Vision, 2004. [19] C. Pal, C. Sutton, and A. McCallum. Sparse forward-backward using minimum divergence beams for fast training of conditional random fields. In International Conference on Acoustics, Speech, and Signal Processing, 2006. [20] J. Lasserre, A. Kannan, and J. Winn. Hybrid learning of large jigsaws. In Proc. CVPR, 2007. 8
2008
178
3,429
On Computational Power and the Order-Chaos Phase Transition in Reservoir Computing Benjamin Schrauwen Electronics and Information Systems Department Ghent University B-9000 Ghent, Belgium benjamin.schrauwen@ugent.be Lars B¨using, Robert Legenstein Institute for Theoretical Computer Science Graz University of Technology A-8010 Graz, Austria {lars,legi}@igi.tugraz.at Abstract Randomly connected recurrent neural circuits have proven to be very powerful models for online computations when a trained memoryless readout function is appended. Such Reservoir Computing (RC) systems are commonly used in two flavors: with analog or binary (spiking) neurons in the recurrent circuits. Previous work showed a fundamental difference between these two incarnations of the RC idea. The performance of a RC system built from binary neurons seems to depend strongly on the network connectivity structure. In networks of analog neurons such dependency has not been observed. In this article we investigate this apparent dichotomy in terms of the in-degree of the circuit nodes. Our analyses based amongst others on the Lyapunov exponent reveal that the phase transition between ordered and chaotic network behavior of binary circuits qualitatively differs from the one in analog circuits. This explains the observed decreased computational performance of binary circuits of high node in-degree. Furthermore, a novel mean-field predictor for computational performance is introduced and shown to accurately predict the numerically obtained results. 1 Introduction In 2001, Jaeger [1] and Maass [2] independently introduced the idea of using a fixed, randomly connected recurrent neural network of simple units as a set of basis filters (operating at the edge-ofstability where the system has fading memory). A memoryless readout is then trained on these basis filters in order to approximate a given time-invariant target operator with fading memory [2]. Jaeger used analog sigmoidal neurons as network units and named the model Echo State Network (ESN). Maass termed the idea Liquid State Machine (LSM) and most of the related literature focuses on networks of spiking neurons or threshold units. Both ESNs and LSMs are special implementations of a concept now generally termed Reservoir Computing (RC) which subsumes the idea of using general dynamical systems (e.g. a network of interacting optical amplifiers [3]) – the so-called reservoirs – in conjunction with trained memoryless readout functions as computational devices. These RC systems have already been used in a broad range of applications (often outperforming other state-ofthe-art methods) such as chaotic time-series prediction [4], single digit speech recognition [5], and robot control [6]. Although ESNs and LSMs are based on very similar ideas (and in applications it seems possible to switch between both approaches without loss of performance [7]) an apparent dichotomy exists in the influence of the reservoir’s topological structure on its computational performance. The performance of an ESN using analog, rate-based neurons, is e.g. largely independent of the sparsity of the 1 network [8] or the exact network topology such as small-world or scale-free connectivity graphs1. For LSMs, which consist of spiking or binary units, the opposite effect has been observed. For the latter systems, the influence of introducing e.g. small-world or biologically measured lamina-specific cortical interconnection statistics [9] clearly leads to an increase in performance. In the results of [10] it can be observed (although not specifically stated there) that for networks of threshold units with a simple connectivity topology of fixed in-degree per neuron, an increase in performance can be found for decreasing in-degree. None of these effects can be reproduced using ESNs. In order to systematically study this fundamental difference between binary (spiking) LSMs and analog ESNs, we close the gap between them by introducing in Sec. 2 a class of models termed quantized ESNs. The reservoir of a quantized ESN is defined as a network of discrete units, where the number of admissible states of a single unit is controlled by a parameter called quantization level. LSMs and ESNs can be interpreted as the two limiting cases of quantized ESNs for low and high quantization level respectively. We numerically study the influence of the network topology in terms of the in-degree of the network units on the computational performance of quantized ESNs for different quantization levels. This generalizes and systemizes previous results obtained for binary LSMs and analog ESNs. In Sec. 3 the empirical results are analyzed by studying the Lyapunov exponent of quantized ESNs, which exhibits a clear relation to the computational performance [11]. It is shown that for ESNs with low quantization level, the chaos-order phase transition is significantly more gradual when the networks are sparsely connected. It is exactly in this transition regime that the computational power of a Reservoir Computing system is found to be optimal [11]. This effect disappears for ESNs with high quantization level. A clear explanation of the influence of the in-degree on the computational performance can be found by investigating the rank measure presented in [11]. This measure characterizes the computational capabilities of a network as a trade-off between the so-called kernel quality and the generalization ability. We show that for highly connected reservoirs with a low quantization level the region of an efficient trade-off implying high performance is narrow. For sparser networks this region is shown to broaden. Consistently for high quantization levels the region is found to be independent of the interconnection degree. In Sec. 4 we present a novel mean-field predictor for computational power which is able to reproduce the influence of the topology on the quantized ESN model. It is related to the predictor introduced in [10], but it can be calculated for all quantization levels, and can be determined with a significantly reduced computation time. The novel theoretical measure matches the experimental and rank measure findings closely. 2 Online Computations with Quantized ESNs We consider networks of N neurons with the state variable x(t) = (x1(t), . . . , xN(t)) ∈[−1, +1]N in discrete time t ∈Z. All units have an in-degree of K, i.e. every unit i receives input from K other randomly chosen units with independently identically distributed (iid.) weights drawn from a normal distribution N(0, σ2) with zero mean and standard deviation (STD) σ. The network state is updated according to: xi(t + 1) = (ψm ◦g)   N X j=1 wijxj(t) + u(t)  , where g = tanh is the usual hyperbolic tangent nonlinearity and u denotes the input common to all units. At every time step t, the input u(t) is drawn uniformly from {−1, 1}. The function ψm(·) is called quantization function for m bits as it maps from (−1, 1) to its discrete range Sm of cardinality 2m: ψm : (−1, 1) →Sm, ψm(x) := 2⌊2m−1(x + 1)⌋+ 1 2m −1. Here ⌊x⌋denotes the integer part of x. Due to ψm the variables xi(t) are discrete (“quantized”) and assume values in Sm = {(2k+1)/2m−1|k = 0, . . . , 2m−1} ⊂(−1, 1). The network defined above 1Shown by results of unpublished experiments which have also been reported by the lab of Jaeger through personal communication. 2 A m = 1 B m = 3 C m = 6 Figure 1: The performance pexp(C, PAR5) for three different quantization levels m = 1, 3, 6 is plotted as a function of the network in-degree K and the weight STD σ. The networks size is N = 150, the results have been averaged over 10 circuits C, initial conditions and randomly drawn input time series of length 104 time steps. The dashed line represents the numerically determined critical line. was utilized for online computations on the input stream u(·). We consider in this article tasks where the binary target output at time t depends solely on the n input bits u(t−τ −1), . . . , u(t−τ −n) for a given delay parameter τ ≥0, i.e., it is given by fT (u(t −τ −1), . . . , u(t −τ −n)) for a function fT ∈{f|f : {−1, 1}n →{−1, 1}}. In order to approximate the target output, a linear classifier of the form sign(PN i=1 αixi(t)+b) is applied to the instantaneous network state x(t). The coefficients αi and the bias b were trained via a one-shot pseudo-inverse regression method [1]. The RC system consisting of the network and the linear classifier is called a quantized ESN of quantization level m in the remainder of this paper. We assessed the computational capabilities of a given network based on the numerically determined performance on an example task, which was chosen to be the τ-delayed parity function of n bits PARn,τ, i.e. the desired output at time t is PARn,τ(u, t) = Qn i=1 u(t−τ −i) for a delay τ ≥0 and n ≥1. A separate readout classifier is trained for each combination of n and τ, all using the same reservoir. We define pexp quantifying the performance of a given circuit C on the PARn task as: pexp(C, PARn) := ∞ X τ=0 κ(C, PARn,τ), (1) where κ(C, PARn,τ) denotes the performance of circuit C on the PARn,τ task measured in terms of Cohen’s kappa coefficient2. The performance results for PARn can be considered representative for the general computational capabilities of a circuit C as qualitatively very similar results were obtained for the ANDn task of n bits and random Boolean functions of n bit (results not shown). In Fig. 1 the performance pexp(C, PAR5) is shown averaged over 10 circuits C for three different quantization levels m = 1, 3, 6. pexp(C, PAR5) is plotted as a function of the network in-degree K and the logarithm3 of the weight STD σ. Qualitatively very similar results were obtained for different network graphs with e.g. Poisson or scale-free distributed in-degree with average K (results not shown). A numerical approximation of the critical line, i.e. the order-chaos phase transition, is also shown (dashed line), which was determined by the root of an estimation of the Lyapunov coefficient4. The critical line predicts the zone of optimal performance well for m = 1, but is less accurate for ESNs with m = 3, 6. One can see that for ESNs with low quantization levels (m = 1, 3), networks with a small in-degree K reach a significantly better peak performance than those with 2κ is defined as (c −cl)/(1 −cl) where c is the fraction of correct trials and cl is the chance level. The sum in eq. (1) was truncated at τ = 8, as the performance was negligible for higher delays τ > 8 for the network size N = 150. 3All logarithms are taken to the basis 10, i.e. log = log10 if not stated otherwise. 4The Lyapunov coefficient λ was determined in the following way. After 20 initial simulation steps the smallest admissible (for m) state difference δ0(m) = 21−m was introduced in a single network unit and the resulting state difference δ after one time step was measured averaged over 105 trials with randomly generated networks, initial states and input streams. The initial states of all neurons were iid. uniformly over Sm. λ was then determined by λ = ln(δ/δ0(m)). 3 −0.1 0 0.1 −1 0 1 log(σ)−log(σ0) λ quantization m=1bit A −0.1 0 0.1 −1 0 1 log(σ)−log(σ0) λ quantization m=6bit B K=3 K=12 K=24 Figure 2: Phase transitions in binary networks (m = 1) differ from phase transition in high resolution networks (m = 6). An empirical estimate λ of the Lyapunov exponent is plotted as a function of the STD of weights σ for in-degrees K = 3 (solid), K = 12 (dashed), and K = 24 (gray line). In order to facilitate comparison, the plot for each K is centered around log(σ0) where σ0 is the STD of weights for which λ is zero (i.e., σ0 is the estimated critical σ value for that K). The transition sharpens with increasing K for binary reservoirs (A), whereas it is virtually independent of K for high resolution reservoirs (B). high in-degree. The effect disappears for a high quantization level (m = 6). This phenomenon is consistent with the observation that network connectivity structure is in general an important issue if the reservoir is composed of binary or spiking neurons but less important if analog neurons are employed. Note that for m = 3, 6 we see a bifurcation in the zones of optimal performance which is not observed for the limiting cases of ESNs and LSMs. 3 Phase Transitions in Binary and High Resolution Networks Where does the difference between binary and high resolution reservoirs shown in Fig. 1 originate from? It was often hypothesized that high computational power in recurrent networks is located in a parameter regime near the critical line, i.e., near the phase transition between ordered and chaotic behavior (see, e.g., [12] for a review; compare also the performance with the critical line in Fig. 1). Starting from this hypothesis, we investigated whether the network dynamics of binary networks near this transition differs qualitatively from the one of high resolution networks. We estimated the network properties by empirically measuring the Lyapunov exponent λ with the same procedure as in the estimation of the critical line in Fig. 1 (see text above). However, we did not only determine the critical line (i.e., the parameter values where the estimated Lyapunov exponent crosses zero), but also considered its values nearby. For a given in-degree K, λ can then be plotted as a function of the STD of weights σ (centered at the critical value σ0 of the STD for that K). This was done for binary (Fig. 2A) and high resolution networks (Fig. 2B) and for K = 3, 12, and 24. Interestingly, the dependence of λ on the STD σ near the critical line is qualitatively quite different between the two types of networks. For binary networks the transition becomes much sharper with increasing K which is not the case for high resolution networks. How can this sharp transition explain the reduced computational performance of binary ESNs with high in-degree K? The tasks considered in this article require some limited amount of memory which has to be provided by the reservoir. Hence, the network dynamics has to be located in a regime where memory about recent inputs is available and past input bits do not interfere with that memory. Intuitively, an effect of the sharper phase transition could be stated in the following way. For low σ (i.e., in the ordered regime), the memory needed for the task is not provided by the reservoir. As we increase σ, the memory capacity increases, but older memories interfere with recent ones, making it hard or even impossible to extract the relevant information. This intuition is confirmed by an analysis which was introduced in [11] and which we applied to our setup. We estimated two measures of the reservoir, the so called “kernelquality” and the “generalization rank”, both being the rank of a matrix consisting of certain state vectors of the reservoir. To evaluate the kernel-quality of the reservoir, we randomly drew N = 150 input streams u1(·), . . . , uN(·) and computed the rank of the N × N matrix whose columns were 4 −2 −1 0 1 5 10 15 20 K m=1bit A 0 20 40 −2 −1 0 1 0 50 100 150 Rank K=3 B −2 −1 0 1 0 50 100 150 K=24 C −2 −1 0 1 5 10 15 20 log(σ) K m=6bit D 10 20 30 40 50 −2 −1 0 1 0 50 100 150 log(σ) Rank K=3 E −2 −1 0 1 0 50 100 150 log(σ) K=24 F generaliz. kernel diff. Figure 3: Kernel-quality and generalization rank of quantized ESNs of size N = 150. Upper plots are for binary reservoirs (m = 1bit), lower plots for high resolution reservoirs (m = 6 bit). A) The difference between the kernel-quality and the generalization rank as a function of the log STD of weights and the in-degree K. B) The kernel-quality (solid), the generalization rank (dashed) and the difference between both (gray line) for K = 3 as a function of log(σ). C) Same as panel B, but for an in-degree of K = 24. In comparison to panel B, the transition of both measures is much steeper. D,E,F) Same as panels A, B, and C respectively, but for a high resolution reservoir. All plotted values are means over 100 independent runs with randomly drawn networks, initial states, and input streams. the circuit states resulting from these input streams.5 Intuitively, this rank measures how well the reservoir represents different input streams. The generalization rank is related to the ability of the reservoir-readout system to generalize from the training data to test data. The generalization rank is evaluated as follows. We randomly drew N input streams ˜u1(·), . . . , ˜uN(·) such that the last three input bits in all these input streams were identical.6 The generalization rank is then given by the rank of the N × N matrix whose columns are the circuit states resulting from these input streams. Intuitively, the generalization rank with this input distribution measures how strongly the reservoir state at time t is sensitive to inputs older than three time steps. The rank measures calculated here will thus have predictive power for computations which require memory of the last three time steps (see [11] for a theoretical justification of the measures). In general, a high kernel-quality and a low generalization rank (corresponding to a high ability of the network to generalize) are desirable. Fig. 3A and D show the difference between the two measures as a function of log(σ) and the indegree K for binary networks and high resolution networks respectively. The plots show that the peak value of this difference is decreasing with K in binary networks, whereas it is independent of K in high resolution reservoirs, reproducing the observations in the plots for the computational performance. A closer look for the binary circuit at K = 3 and K = 24 is given in Figs. 3B and 3C. When comparing these plots, one sees that the transition of both measures is much steeper for K = 24 than for K = 3 which leads to a smaller difference between the measures. We interpret this finding in the following way. For K = 24, the reservoir increases its separation power very fast as log(σ) increases. However the separation of past input differences increases likewise and thus early input differences cannot be distinguished from late ones. This reduces the computational power of binary ESN with large K on such tasks. In comparison, the corresponding plots for high resolution reservoirs (Figs. 3E and 3F) show that the transition shifts to lower weight STDs σ for larger K, but apart from this fact the transitions are virtually identical for low and high K values. Comparing 5The initial states of all neurons were iid. uniformly over Sm. The rank of the matrix was estimated by singular value decomposition on the network states after 15 time steps of simulation. 6First, we drew each of the last three bits ˜u(13), . . . , ˜u(15) independently from a uniform distribution over {−1, 1}. For each input stream ˜ui(1), . . . , ˜ui(15) we drew ˜ui(1), . . . , ˜ui(12) independently from a uniform distribution over {−1, 1} and set ˜ui(t) = ˜u(t) for t = 13, . . . , 15. 5 A m = 1 B m = 3 C m = 6 Figure 4: Mean-field predictor p∞for computational power for different quantization levels m as a function of the STD σ of the weights and in-degree K. A) m = 1. B) m = 3. C) m = 6. Compare this result to the numerically determined performance pexp plotted in Fig. 1. Fig. 3D with Fig. 1C, one sees that the rank measure does not accurately predict the whole region of good performance for high resolution reservoirs. It also does not predict the observed bifurcation in the zones of optimal performance, a phenomenon that is reproduced by the mean-field predictor introduced in the following section. 4 Mean-Field Predictor for Computational Performance The question why and to what degree certain non-autonomous dynamical systems are useful devices for online computations has been addressed theoretically amongst others in [10]. There, the computational performance of networks of randomly connected threshold gates was linked to their separation property (for a formal definition see [2]): It was shown that only networks which exhibit sufficiently different network states for different instances of the input stream, i.e. networks that separate the input, can compute complex functions of the input stream. Furthermore, the authors introduced an accurate predictor for the computational capabilities for the considered type of networks based on the separation capability which was quantified via a simple mean-field approximation of the Hamming distance between different network states. Here we aim at extending this approach to a larger class of networks, the class of quantized ESNs introduced above. However a severe problem arises when directly applying the mean-field theory developed in [10] to quantized ESNs with a quantization level m > 1: Calculation of the important quantities becomes computationally infeasible as the state space of a network grows exponentially with m. Therefore we introduce a modified mean-field predictor which can be efficiently computed and which still has all desirable properties of the one introduced in [10]. Suppose the target output of the network at time t is a function fT ∈ F = {f|f : {−1, 1}n →{−1, 1}} of the n bits u(t −τ −1), . . . , u(t −τ −n) of the input stream u(·) with delay τ as described in Sec. 2. In order to exhibit good performance on an arbitrary fT ∈F, pairs of inputs that differ in at least one of the n bits have to be mapped by the network to different states at time t. Only then, the linear classifier is able to assign the inputs to different function values. In order to quantify this so-called separation property of a given network, we introduce the normalized distance d(k): It measures the average distance between two networks states x1(t) = (x1 1(t), . . . , x1 N(t)) and x2(t) = (x2 1(t), . . . , x2 N(t)) arising from applying to the same network two input streams u1(·) and u2(·) which only differ in the single bit at time t −k, i.e. u2(t −k) = −u1(t −k). Formally we define7: d(k) = 1 N x1(t) −x2(t) 1 . The average ⟨.⟩is taken over all inputs u1(·), u2(·) from the ensemble defined above, all initial conditions of the network and all circuits C. However, a good separation of the n bits, i.e. d(k) ≫ 0, τ < k ≤n + τ, is a necessary but not a sufficient condition for the ability of the network to calculate the target function. Beyond this, it is desired that the network “forgets” all (for the 7For vectors x = (x1, x2, . . .) ∈RN we use the Manhattan norm ∥x∥1 := PN i=1 |xi| 6 A m = 1 m = 1 B m = 6 m = 6 Figure 5: Contributions d(2) (dotted) and d(∞) (solid gray) to the mean-field predictor p∞(dashed line) for different quantization levels m ∈{1, 6} and different in-degrees K ∈{3, 24} as a function of STD σ of the weights. The plots show slices of the 2d plots Fig. 4A and C for constant K. A) For m = 1 it can be seen that the region in log(σ)-space with high d(2) and low d(∞) is significantly larger for K = 3 than for K = 24. B) For m = 6 this region is roughly independent of K except a shift. target function) irrelevant bits u(t −k), k > n + τ of the input sufficiently fast, i.e. d(k) ≈0 for k > n + τ. We use the limit d(∞) = limk→∞d(k) to quantify this irrelevant separation which signifies sensitivity to initial conditions (making the reservoir not time invariant). Hence, we propose the quantity p∞as a heuristic predictor for computational power: p∞= max {d(2) −d(∞), 0} . As the first contribution to p∞we chose d(2) as it reflects the ability of a network to perform a combination of two mechanisms: In order to exhibit a high value for d(2) the network has to separate the inputs at the time step t −2 and to sustain the resulting state distance via its recurrent dynamics in the next time step t −1. We therefore consider d(2) to be a measure for input separation on short time-scales relevant for the target function. p∞is calculated using a mean-field model similar to the one presented in [10] which itself is rooted in the annealed approximation (AA) introduced in [13]. In the AA one assumes that the circuit connectivity and the corresponding weights are drawn iid. at every time step. Although being a drastic simplification, the AA has been shown to yield good results in the large system size limit N →∞. The main advantage of p∞over the the predictor defined in [10] (the NM-separation) is that the calculation of p∞only involves taking the average over one input stream (as the u2(·) is a function of u1(·)) compared to taking the average over two independent inputs needed for the NM-separation, resulting in a significantly reduced computation time. In Fig. 4 the predictor p∞is plotted as a function of the STD σ of the weight distribution and the in-degree K for three different values of the quantization level m ∈{1, 3, 6}. When comparing these results with the actual network performance pexp(PAR) on the PAR-task plotted in Fig. 1 one can see that p∞serves as a reliable predictor for pexp of a network for sufficiently small m. For larger values of m the predictor p∞starts to deviate from the true performance. The dominant effect of the quantization level m on the performance discussed in Sec. 2 is well reproduced by p∞: For m = 1 the in-degree K has a considerable impact, i.e. for large K maximum performance drops significantly. For m > 2 however, for larger values of K there also exists a region in the parameter space exhibiting maximum performance. The interplay between the two contributions d(2) and d(∞) of p∞delivers insight into the dependence of pexp on the network parameters. A high value of d(2) corresponds to a good separation of inputs on short time scales relevant for the target task, a property that is found predominantly in networks that are not strongly input driven. A small value of d(∞) guarantees that inputs on which the target function assumes the same value are mapped to nearby network states and thus a linear readout is able to assign them to the same class irrespectively of their irrelevant remote history. For m = 1, as can be seen in Fig. 5 the region in log(σ) space where both conditions for good performance are present decreases for growing K. In contrast, for m > 2 a reverse effect is observed: for increasing K the parameter range for σ fulfilling the two opposing conditions for good performance grows moderately resulting in a large region of high p∞for high in-degree K. This observation is in close analogy to the behavior of the rank measure discussed in Sec. 3. Also note that p∞predicts the novel bifurcation effect also observed in Fig. 1. 7 5 Discussion By interpolating between the ESN and LSM approaches to RC, this work provides new insights into the question of what properties of a dynamical system lead to improved computational performance: Performance is optimal at the order-chaos phase transition, and the broader this transition regime, the better will the performance of the system be. We have confirmed this hypothesis by several analyses, including a new theoretical mean-field predictor that can be computed very efficiently.The importance of a gradual order-chaos phase transition could explain why ESNs are more often used for applications than LSMs. Although they can have very similar performance on a given task [7], it is significantly harder to create a LSM which operates at the edge-of-chaos: the excitation and inhibition in the network need to be finely balanced because there tends to be a very abrupt transition from an ordered to a epileptic state. For ESNs however, there is a broad parameter range in which they perform well. It should be noted that the effect of quantization cannot just be emulated by additive or multiplicative iid. or correlated Gaussian noise on the output of analog neurons. The noise degrades performance homogeneously and the differences in the influence of the in-degree observed for varying quantization levels cannot be reproduced. The finding that binary reservoirs have superior performance for low in-degree stands in stark contrast to the fact that cortical neurons have very high in-degrees of over 104. This raises the interesting question which properties and mechanisms of cortical circuits not accounted for in this article contribute to their computational power. In view of the results presented in this article, such mechanisms should tend to soften the phase transition between order and chaos. Acknowledgments Written under partial support by the FWO Flanders project # G.0088.09, the Photonics@be Interuniversity Attraction Poles program (IAP 6/10), the Austrian Science Fund FWF projects # P17229N04, # S9102-N13 and projects # FP6-015879 (FACETS), # FP7-216593 (SECO) of the EU. References [1] H. Jaeger. The “echo state” approach to analyzing and training recurrent neural networks. GMD Report 148, German National Research Center for Information Technology, 2001. [2] W. Maass, T. Natschl¨ager, and H. Markram. Real-time computing without stable states: A new framework for neural computation based on perturbations. Neural Computation, 14(11):2531–2560, 2002. [3] Kristof Vandoorne, Wouter Dierckx, Benjamin Schrauwen, David Verstraeten, Roel Baets, Peter Bienstman, and Jan Van Campenhout. Toward optical signal processing using photonic reservoir computing. Optics Express, 16(15):11182–11192, 8 2008. [4] H. Jaeger and H. Haas. Harnessing nonlinearity: predicting chaotic systems and saving energy in wireless communication. Science, 304:78–80, 2004. [5] D. Verstraeten, B. Schrauwen, D. Stroobandt, and J. Van Campenhout. Isolated word recognition with the liquid state machine: a case study. Information Processing Letters, 95(6):521–528, 2005. [6] P. Joshi and W. Maass. Movement generation with circuits of spiking neurons. Neural Computation, 17(8):1715–1738, 2005. [7] D. Verstraeten, B. Schrauwen, M. D’Haene, and D. Stroobandt. A unifying comparison of Reservoir Computing methods. Neural Networks, 20:391–403, 2007. [8] H. Jaeger. Echo state networks. Scholarpedia, 2(9):2330, 2007. [9] S. H¨ausler and W. Maass. A statistical analysis of information processing properties of lamina-specific cortical microcircuit models. Cerebral Cortex, 17(1):149–162, 2007. [10] N. Bertschinger and T. Natschl¨ager. Real-time computation at the edge of chaos in recurrent neural networks. Neural Computation, 16(7):1413–1436, 2004. [11] R. Legenstein and W. Maass. Edge of chaos and prediction of computational performance for neural microcircuit models. Neural Networks, pages 323–334, 2007. [12] R. Legenstein and W. Maass. What makes a dynamical system computationally powerful? In S. Haykin, J. C. Principe, T.J. Sejnowski, and J.G. McWhirter, editors, New Directions in Statistical Signal Processing: From Systems to Brain, pages 127–154. MIT Press, 2007. [13] B. Derrida and Pomeau Y. Random networks of automata: A simple annealed approximation. Europhysics Letters, 1(2):45–49, 1986. 8
2008
179
3,430
Hebbian Learning of Bayes Optimal Decisions Bernhard Nessler∗, Michael Pfeiffer∗, and Wolfgang Maass Institute for Theoretical Computer Science Graz University of Technology A-8010 Graz, Austria {nessler,pfeiffer,maass}@igi.tugraz.at Abstract Uncertainty is omnipresent when we perceive or interact with our environment, and the Bayesian framework provides computational methods for dealing with it. Mathematical models for Bayesian decision making typically require datastructures that are hard to implement in neural networks. This article shows that even the simplest and experimentally best supported type of synaptic plasticity, Hebbian learning, in combination with a sparse, redundant neural code, can in principle learn to infer optimal Bayesian decisions. We present a concrete Hebbian learning rule operating on log-probability ratios. Modulated by reward-signals, this Hebbian plasticity rule also provides a new perspective for understanding how Bayesian inference could support fast reinforcement learning in the brain. In particular we show that recent experimental results by Yang and Shadlen [1] on reinforcement learning of probabilistic inference in primates can be modeled in this way. 1 Introduction Evolution is likely to favor those biological organisms which are able to maximize the chance of achieving correct decisions in response to multiple unreliable sources of evidence. Hence one may argue that probabilistic inference, rather than logical inference, is the ”mathematics of the mind”, and that this perspective may help us to understand the principles of computation and learning in the brain [2]. Bayesian inference, or equivalently inference in Bayesian networks [3] is the most commonly considered framework for probabilistic inference, and a mathematical theory for learning in Bayesian networks has been developed. Various attempts to relate these theoretically optimal models to experimentally supported models for computation and plasticity in networks of neurons in the brain have been made. [2] models Bayesian inference through an approximate implementation of the Belief Propagation algorithm (see [3]) in a network of spiking neurons. For reduced classes of probability distributions, [4] proposed a method for spiking network models to learn Bayesian inference with an online approximation to an EM algorithm. The approach of [5] interprets the weight wji of a synaptic connection between neurons representing the random variables xi and xj as log p(xi,xj) p(xi)·p(xj), and presents algorithms for learning these weights. Neural correlates of variables that are important for decision making under uncertainty had been presented e.g. in the recent experimental study by Yang and Shadlen [1]. In their study they found that firing rates of neurons in area LIP of macaque monkeys reflect the log-likelihood ratio (or logodd) of the outcome of a binary decision, given visual evidence. The learning of such log-odds for Bayesian decision making can be reduced to learning weights for a linear classifier, given an appropriate but fixed transformation from the input to possibly nonlinear features [6]. We show ∗Both authors contributed equally to this work. 1 that the optimal weights for the linear decision function are actually log-odds themselves, and the definition of the features determines the assumptions of the learner about statistical dependencies among inputs. In this work we show that simple Hebbian learning [7] is sufficient to implement learning of Bayes optimal decisions for arbitrarily complex probability distributions. We present and analyze a concrete learning rule, which we call the Bayesian Hebb rule, and show that it provably converges towards correct log-odds. In combination with appropriate preprocessing networks this implements learning of different probabilistic decision making processes like e.g. Naive Bayesian classification. Finally we show that a reward-modulated version of this Hebbian learning rule can solve simple reinforcement learning tasks, and also provides a model for the experimental results of [1]. 2 A Hebbian rule for learning log-odds We consider the model of a linear threshold neuron with output y0, where y0 = 1 means that the neuron is firing and y0 = 0 means non-firing. The neuron’s current decision ˆy0 whether to fire or not is given by a linear decision function ˆy0 = sign(w0 · constant + Pn i=1 wiyi), where the yi are the current firing states of all presynaptic neurons and wi are the weights of the corresponding synapses. We propose the following learning rule, which we call the Bayesian Hebb rule: ∆wi = (η (1 + e−wi), if y0 = 1 and yi = 1 −η (1 + ewi), if y0 = 0 and yi = 1 0, if yi = 0. (1) This learning rule is purely local, i.e. it depends only on the binary firing state of the pre- and postsynaptic neuron yi and y0, the current weight wi and a learning rate η. Under the assumption of a stationary joint probability distribution of the pre- and postsynaptic firing states y0, y1, . . . , yn the Bayesian Hebb rule learns log-probability ratios of the postsynaptic firing state y0, conditioned on a corresponding presynaptic firing state yi. We consider in this article the use of the rule in a supervised, teacher forced mode (see Section 3), and also in a reinforcement learning mode (see Section 4). We will prove that the rule converges globally to the target weight value w∗ i , given by w∗ i = log p(y0 = 1|yi = 1) p(y0 = 0|yi = 1) . (2) We first show that the expected update E[∆wi] under (1) vanishes at the target value w∗ i : E[∆w∗ i ] = 0 ⇔p(y0=1, yi=1)η(1 + e−w∗ i ) −p(y0=0, yi=1)η(1 + ew∗ i ) = 0 ⇔ 1 + ew∗ i 1 + e−w∗ i = p(y0=1, yi=1) p(y0=0, yi=1) ⇔ w∗ i = log p(y0=1|yi=1) p(y0=0|yi=1) . (3) Since the above is a chain of equivalence transformations, this proves that w∗ i is the only equilibrium value of the rule. The weight vector w∗is thus a global point-attractor with regard to expected weight changes of the Bayesian Hebb rule (1) in the n-dimensional weight-space Rn. Furthermore we show, using the result from (3), that the expected weight change at any current value of wi points in the direction of w∗ i . Consider some arbitrary intermediate weight value wi = w∗ i +2ǫ: E[∆wi]|w∗ i +2ǫ = E[∆wi]|w∗ i +2ǫ −E[∆wi]|w∗ i ∝ p(y0=1, yi=1)e−w∗ i (e−2ǫ −1) −p(y0=0, yi=1)ew∗ i (e2ǫ −1) = (p(y0=0, yi=1)e−ǫ + p(y0=1, yi=1)eǫ)(e−ǫ −eǫ) . (4) The first factor in (4) is always non-negative, hence ǫ < 0 implies E[∆wi] > 0, and ǫ > 0 implies E[∆wi] < 0. The Bayesian Hebb rule is therefore always expected to perform updates in the right direction, and the initial weight values or perturbations of the weights decay exponentially fast. 2 Already after having seen a finite set of examples ⟨y0, . . . , yn⟩∈{0, 1}n+1, the Bayesian Hebb rule closely approximates the optimal weight vector ˆw that can be inferred from the data. A traditional frequentist’s approach would use counters ai = #[y0=1 ∧yi=1] and bi = #[y0=0 ∧yi=1] to estimate every w∗ i by ˆwi = log ai bi . (5) A Bayesian approach would model p(y0|yi) with an (initially flat) Beta-distribution, and use the counters ai and bi to update this belief [3], leading to the same MAP estimate ˆwi. Consequently, in both approaches a new example with y0 = 1 and yi = 1 leads to the update ˆwnew i = log ai + 1 bi = log ai bi  1 + 1 ai  = ˆwi + log(1 + 1 Ni (1 + e−ˆ wi)) , (6) where Ni := ai + bi is the number of previously processed examples with yi = 1, thus 1 ai = 1 Ni (1 + bi ai ). Analogously, a new example with y0 = 0 and yi = 1 gives rise to the update ˆwnew i = log ai bi + 1 = log ai bi 1 1 + 1 bi ! = ˆwi −log(1 + 1 Ni (1 + e ˆ wi)). (7) Furthermore, ˆwnew i = ˆwi for a new example with yi = 0. Using the approximation log(1 + α) ≈α the update rules (6) and (7) yield the Bayesian Hebb rule (1) with an adaptive learning rate ηi = 1 Ni for each synapse. In fact, a result of Robbins-Monro (see [8] for a review) implies that the updating of weight estimates ˆwi according to (6) and (7) converges to the target values w∗ i not only for the particular choice η(Ni) i = 1 Ni , but for any sequence η(Ni) i that satisfies P∞ Ni=1 η(Ni) i = ∞and P∞ Ni=1(η(Ni) i )2 < ∞. More than that the Supermartingale Convergence Theorem (see [8]) guarantees convergence in distribution even for a sufficiently small constant learning rate. Learning rate adaptation One can see from the above considerations that the Bayesian Hebb rule with a constant learning rate η converges globally to the desired log-odds. A too small constant learning rate, however, tends to slow down the initial convergence of the weight vector, and a too large constant learning rate produces larger fluctuations once the steady state is reached. (6) and (7) suggest a decaying learning rate η(Ni) i = 1 Ni , where Ni is the number of preceding examples with yi = 1. We will present a learning rate adaptation mechanism that avoids biologically implausible counters, and is robust enough to deal even with non-stationary distributions. Since the Bayesian Hebb rule and the Bayesian approach of updating Beta-distributions for conditional probabilities are closely related, it is reasonable to expect that the distribution of weights wi over longer time periods with a non-vanishing learning rate will resemble a Beta(ai, bi)-distribution transformed to the log-odd domain. The parameters ai and bi in this case are not exact counters anymore but correspond to virtual sample sizes, depending on the current learning rate. We formalize this statistical model of wi by σ(wi) = 1 1 + e−wi ∼Beta(ai, bi) ⇐⇒wi ∼Γ(ai + bi) Γ(ai)Γ(bi)σ(wi)aiσ(−wi)bi, In practice this model turned out to capture quite well the actually observed quasi-stationary distribution of wi. In [9] we show analytically that E[wi] ≈log ai bi and Var[wi] ≈ 1 ai + 1 bi . A learning rate adaptation mechanism at the synapse that keeps track of the observed mean and variance of the synaptic weight can therefore recover estimates of the virtual sample sizes ai and bi. The following mechanism, which we call variance tracking implements this by computing running averages of the weights and the squares of weights in ¯wi and ¯qi: ηnew i ← ¯qi−¯ w2 i 1+cosh ¯ wi ¯wnew i ← (1 −ηi) ¯wi + ηi wi ¯qnew i ← (1 −ηi) ¯qi + ηi w2 i . (8) 3 In practice this mechanism decays like 1 Ni under stationary conditions, but is also able to handle changing input distributions. It was used in all presented experiments for the Bayesian Hebb rule. 3 Hebbian learning of Bayesian decisions We now show how the Bayesian Hebb rule can be used to learn Bayes optimal decisions. The first application is the Naive Bayesian classifier, where a binary target variable x0 should be inferred from a vector of multinomial variables x = ⟨x1, . . . , xm⟩, under the assumption that the xi’s are conditionally independent given x0, thus p(x0, x) = p(x0) Qm 1 p(xk|x0). Using basic rules of probability theory the posterior probability ratio for x0 = 1 and x0 = 0 can be derived: p(x0=1|x) p(x0=0|x) = p(x0=1) p(x0=0) m Y k=1 p(xk|x0=1) p(xk|x0=0) = p(x0=1) p(x0=0) (1−m) m Y k=1 p(x0=1|xk) p(x0=0|xk) = (9) = p(x0=1) p(x0=0) (1−m) m Y k=1 mk Y j=1 p(x0=1|xk=j) p(x0=0|xk=j) I(xk=j) , where mk is the number of different possible values of the input variable xk, and the indicator function I is defined as I(true) = 1 and I(false) = 0. Let the m input variables x1, . . . , xm be represented through the binary firing states y1, . . . , yn ∈ {0, 1} of the n presynaptic neurons in a population coding manner. More precisely, let each input variable xk ∈{1, . . . , mk} be represented by mk neurons, where each neuron fires only for one of the mk possible values of xk. Formally we define the simple preprocessing (SP) yT =  φ(x1)T, . . . , φ(xm)T with φ(xk)T = [I(xk = 1), . . . , I(xk = mk)] . (10) The binary target variable x0 is represented directly by the binary state y0 of the postsynaptic neuron. Substituting the state variables y0, y1, . . . , yn in (9) and taking the logarithm leads to log p(y0 = 1|y) p(y0 = 0|y) = (1 −m) log p(y0 = 1) p(y0 = 0) + n X i=1 yi log p(yi = 1|y0 = 1) p(yi = 1|y0 = 0) . Hence the optimal decision under the Naive Bayes assumption is ˆy0 = sign((1 −m)w∗ 0 + n X i=1 w∗ i yi) . The optimal weights w∗ 0 and w∗ i w∗ 0 = log p(y0 = 1) p(y0 = 0) and w∗ i = log p(y0 = 1|yi = 1) p(y0 = 0|yi = 1) for i = 1, . . . , n. are obviously log-odds which can be learned by the Bayesian Hebb rule (the bias weight w0 is simply learned as an unconditional log-odd). 3.1 Learning Bayesian decisions for arbitrary distributions We now address the more general case, where conditional independence of the input variables x1, . . . , xm cannot be assumed. In this case the dependency structure of the underlying distribution is given in terms of an arbitrary Bayesian network BN for discrete variables (see e.g. Figure 1 A). Without loss of generality we choose a numbering scheme of the nodes of the BN such that the node to be learned is x0 and its direct children are x1, . . . , xm′. This implies that the BN can be described by m + 1 (possibly empty) parent sets defined by Pk = {i | a directed edge xi →xk exists in BN and i ≥1} . The joint probability distribution on the variables x0, . . . , xm in BN can then be factored and evaluated for x0 = 1 and x0 = 0 in order to obtain the probability ratio p(x0 = 1, x) p(x0 = 0, x) = p(x0 = 1|x) p(x0 = 0|x) = p(x0 = 1|xP0) p(x0 = 0|xP0) m′ Y k=1 p(xk|xPk, x0 = 1) p(xk|xPk, x0 = 0) m Y k=m′+1 p(xk|xPk) p(xk|xPk) . 4 A B Figure 1: A) An example Bayesian network with general connectivity. B) Population coding applied to the Bayesian network shown in panel A. For each combination of values of the variables {xk, xPk} of a factor there is exactly one neuron (indicated by a black circle) associated with the factor that outputs the value 1. In addition OR’s of these values are computed (black squares). We refer to the resulting preprocessing circuit as generalized preprocessing (GP). Obviously, the last term cancels out, and by applying Bayes’ rule and taking the logarithm the target log-odd can be expressed as a sum of conditional log-odds only: log p(x0=1|x) p(x0=0|x) = log p(x0=1|xP0) p(x0=0|xP0) + m′ X k=1  log p(x0=1|xk, xPk) p(x0=0|xk, xPk) −log p(x0=1|xPk) p(x0=0|xPk)  . (11) We now develop a suitable sparse encoding of of x1, . . . , xm into binary variables y1, . . . , yn (with n ≫m) such that the decision function (11) can be written as a weighted sum, and the weights correspond to conditional log-odds of yi’s. Figure 1 B illustrates such a sparse code: One binary variable is created for every possible value assignment to a variable and all its parents, and one additional binary variable is created for every possible value assignment to the parent nodes only. Formally, the previously introduced population coding operator φ is generalized such that φ(xi1, xi2, . . . , xil) creates a vector of length Ql j=1 mij that equals zero in all entries except for one 1-entry which identifies by its position in the vector the present assignment of the input variables xi1, . . . , xil. The concatenation of all these population coded groups is collected in the vector y of length n yT =  φ(xP0)T, φ(x1, xP1)T, −φ(xP1)T, . . . , φ(xm, xPm)T, −φ(xPm)T . (12) The negated vector parts in (12) correspond to the negative coefficients in the sum in (11). Inserting the sparse coding (12) into (11) allows writing the Bayes optimal decision function (11) as a pure sum of log-odds of the target variable: ˆx0 = ˆy0 = sign( n X i=1 w∗ i yi), with w∗ i = log p(y0=1|yi̸=0) p(y0=0|yi̸=0) . Every synaptic weight wi can be learned efficiently by the Bayesian Hebb rule (1) with the formal modification that the update is not only triggered by yi=1 but in general whenever yi̸=0 (which obviously does not change the behavior of the learning process). A neuron that learns with the Bayesian Hebb rule on inputs that are generated by the generalized preprocessing (GP) defined in (12) therefore approximates the Bayes optimal decision function (11), and converges quite fast to the best performance that any probabilistic inference could possibly achieve (see Figure 2B). 4 The Bayesian Hebb rule in reinforcement learning We show in this section that a reward-modulated version of the Bayesian Hebb rule enables a learning agent to solve simple reinforcement learning tasks. We consider the standard operant conditioning scenario, where the learner receives at each trial an input x = ⟨x1, . . . , xm⟩, chooses an action α out of a set of possible actions A, and receives a binary reward signal r ∈{0, 1} with probability p(r|x, a). The learner’s goal is to learn (as fast as possible) a policy π(x, a) so that action selection according to this policy maximizes the average reward. In contrast to the previous 5 learning tasks, the learner has to explore different actions for the same input to learn the rewardprobabilities for all possible actions. The agent might for example choose actions stochastically with π(x, a = α) = p(r = 1|x, a = α), which corresponds to the matching behavior phenomenon often observed in biology [10]. This policy was used during training in our computer experiments. The goal is to infer the probability of binary reward, so it suffices to learn the log-odds log p(r=1|x,a) p(r=0|x,a) for every action, and choose the action that is most likely to yield reward (e.g. by a Winner-Take-All structure). If the reward probability for an action a = α is defined by some Bayesian network BN, one can rewrite this log-odd as log p(r = 1|x, a = α) p(r = 0|x, a = α) = log p(r = 1|a = α) p(r = 0|a = α) + m X k=1 log p(xk|xPk, r = 1, a = α) p(xk|xPk, r = 0, a = α). (13) In order to use the Bayesian Hebb rule, the input vector x is preprocessed to obtain a binary vector y. Both a simple population code such as (10), or generalized preprocessing as in (12) and Figure 1B can be used, depending on the assumed dependency structure. The reward log-odd (13) for the preprocessed input vector y can then be written as a linear sum log p(r = 1|y, a = α) p(r = 0|y, a = α) = w∗ α,0 + n X i=1 w∗ α,i yi , where the optimal weights are w∗ α,0 = log p(r=1|a=α) p(r=0|a=α) and w∗ α,i = log p(r=1|yi̸=0,a=α) p(r=0|yi̸=0,a=α). These logodds can be learned for each possible action α with a reward-modulated version of the Bayesian Hebb rule (1): ∆wα,i = ( η · (1 + e−wα,i), if r = 1, yi ̸= 0, a = α −η · (1 + ewα,i), if r = 0, yi ̸= 0, a = α 0, otherwise (14) The attractive theoretical properties of the Bayesian Hebb rule for the prediction case apply also to the case of reinforcement learning. The weights corresponding to the optimal policy are the only equilibria under the reward-modulated Bayesian Hebb rule, and are also global attractors in weight space, independently of the exploration policy (see [9]). 5 Experimental Results 5.1 Results for prediction tasks We have tested the Bayesian Hebb rule on 400 different prediction tasks, each of them defined by a general (non-Naive) Bayesian network of 7 binary variables. The networks were randomly generated by the algorithm of [11]. From each network we sampled 2000 training and 5000 test examples, and measured the percentage of correct predictions after every update step. The performance of the predictor was compared to the Bayes optimal predictor, and to online logistic regression, which fits a linear model by gradient descent on the cross-entropy error function. This non-Hebbian learning approach is in general the best performing online learning approach for linear discriminators [3]. Figure 2A shows that the Bayesian Hebb rule with the simple preprocessing (10) generalizes better from a few training examples, but is outperformed by logistic regression in the long run, since the Naive Bayes assumption is not met. With the generalized preprocessing (12), the Bayesian Hebb rule learns fast and converges to the Bayes optimum (see Figure 2B). In Figure 2C we show that the Bayesian Hebb rule is robust to noisy updates - a condition very likely to occur in biological systems. We modified the weight update ∆wi such that it was uniformly distributed in the interval ∆wi ± γ%. Even such imprecise implementations of the Bayesian Hebb rule perform very well. Similar results can be obtained if the exp-function in (1) is replaced by a low-order Taylor approximation. 5.2 Results for action selection tasks The reward-modulated version (14), of the Bayesian Hebb rule was tested on 250 random action selection tasks with m = 6 binary input attributes, and 4 possible actions. For every action a 6 A B C 0 200 400 600 800 1000 0.7 0.75 0.8 0.85 0.9 0.95 1 # Training Examples Correctness Bayesian Hebb SP Log. Regression η=0.2 Naive Bayes Bayes Optimum 0 200 400 600 800 1000 0.7 0.75 0.8 0.85 0.9 0.95 1 # Training Examples Correctness Bayesian Hebb GP Bayesian Hebb SP Bayes Optimum 0 200 400 600 800 1000 0.7 0.75 0.8 0.85 0.9 0.95 1 # Training Examples Correctness Without Noise 50% Noise 100% Noise 150% Noise Figure 2: Performance comparison for prediction tasks. A) The Bayesian Hebb rule with simple preprocessing (SP) learns as fast as Naive Bayes, and faster than logistic regression (with optimized constant learning rate). B) The Bayesian Hebb rule with generalized preprocessing (GP) learns fast and converges to the Bayes optimal prediction performance. C) Even a very imprecise implementation of the Bayesian Hebb rule (noisy updates, uniformly distributed in ∆wi ± γ%) yields almost the same learning performance. random Bayesian network [11] was drawn to model the input and reward distributions (see [9] for details). The agent received stochastic binary rewards for every chosen action, updated the weights wα,i according to (14), and measured the average reward on 500 independent test trials. In Figure 3A we compare the reward-modulated Bayesian Hebb rule with simple population coding (10) (Bayesian Hebb SP), and generalized preprocessing (12) (Bayesian Hebb GP), to the standard learning model for simple conditioning tasks, the non-Hebbian Rescorla-Wagner rule [12]. The reward-modulated Bayesian Hebb rule learns as fast as the Rescorla-Wagner rule, and achieves in combination with generalized preprocessing a higher performance level. The widely used tabular Q-learning algorithm, in comparison is slower than the other algorithms, since it does not generalize, but it converges to the optimal policy in the long run. 5.3 A model for the experiment of Yang and Shadlen In the experiment by Yang and Shadlen [1], a monkey had to choose between gazing towards a red target R or a green target G. The probability that a reward was received at either choice depended on four visual input stimuli that had been shown at the beginning of the trial. Every stimulus was one shape out of a set of ten possibilities and had an associated weight, which had been defined by the experimenter. The sum of the four weights yielded the log-odd of obtaining a reward at the red target, and a reward for each trial was assigned accordingly to one of the targets. The monkey thus had to combine the evidence from four visual stimuli to optimize its action selection behavior. In the model of the task it is sufficient to learn weights only for the action a = R, and select this action whenever the log-odd using the current weights is positive, and G otherwise. A simple population code as in (10) encoded the 4-dimensional visual stimulus into a 40-dimensional binary vector y. In our experiments, the reward-modulated Bayesian Hebb rule learns this task as fast and with similar quality as the non-Hebbian Rescorla-Wagner rule. Furthermore Figures 3B and 3C show that it produces after learning similar behavior as that reported for two monkeys in [1]. 6 Discussion We have shown that the simplest and experimentally best supported local learning mechanism, Hebbian learning, is sufficient to learn Bayes optimal decisions. We have introduced and analyzed the Bayesian Hebb rule, a training method for synaptic weights, which converges fast and robustly to optimal log-probability ratios, without requiring any communication between plasticity mechanisms for different synapses. We have shown how the same plasticity mechanism can learn Bayes optimal decisions under different statistical independence assumptions, if it is provided with an appropriately preprocessed input. We have demonstrated on a variety of prediction tasks that the Bayesian Hebb rule learns very fast, and with an appropriate sparse preprocessing mechanism for groups of statistically dependent features its performance converges to the Bayes optimum. Our approach therefore suggests that sparse, redundant codes of input features may simplify synaptic learning processes in spite of strong statistical dependencies. Finally we have shown that Hebbian learning also suffices 7 A B C 0 400 800 1200 1600 2000 0.4 0.5 0.6 0.7 0.8 Trials Average Reward Bayesian Hebb SP Bayesian Hebb GP Rescorla−Wagner Q−Learning Optimal Selector −4 −2 0 2 4 0 20 40 60 80 100 Evidence for red (logLR) Percentage of red choices −4 −2 0 2 4 0 20 40 60 80 100 Evidence for red (logLR) Percentage of red choices Figure 3: A) On 250 4-action conditioning tasks with stochastic rewards, the reward-modulated Bayesian Hebb rule with simple preprocessing (SP) learns similarly as the Rescorla-Wagner rule, and substantially faster than Q-learning. With generalized preprocessing (GP), the rule converges to the optimal action-selection policy. B, C) Action selection policies learned by the reward-modulated Bayesian Hebb rule in the task by Yang and Shadlen [1] after 100 (B), and 1000 (C) trials are qualitatively similar to the policies adopted by monkeys H and J in [1] after learning. for simple instances of reinforcement learning. The Bayesian Hebb rule, modulated by a signal related to rewards, enables fast learning of optimal action selection. Experimental results of [1] on reinforcement learning of probabilistic inference in primates can be partially modeled in this way with regard to resulting behaviors. An attractive feature of the Bayesian Hebb rule is its ability to deal with the addition or removal of input features through the creation or deletion of synaptic connections, since no relearning of weights is required for the other synapses. In contrast to discriminative neural learning rules, our approach is generative, which according to [13] leads to faster generalization. Therefore the learning rule may be viewed as a potential building block for models of the brain as a self-organizing and fast adapting probabilistic inference machine. Acknowledgments We would like to thank Martin Bachler, Sophie Deneve, Rodney Douglas, Konrad Koerding, Rajesh Rao, and especially Dan Roth for inspiring discussions. Written under partial support by the Austrian Science Fund FWF, project # P17229-N04, project # S9102-N04, and project # FP6-015879 (FACETS) as well as # FP7-216593 (SECO) of the European Union. References [1] T. Yang and M. N. Shadlen. Probabilistic reasoning by neurons. Nature, 447:1075–1080, 2007. [2] R. P. N. Rao. Neural models of Bayesian belief propagation. In K. Doya, S. Ishii, A. Pouget, and R. P. N. Rao, editors, Bayesian Brain., pages 239–267. MIT-Press, 2007. [3] C. M. Bishop. Pattern Recognition and Machine Learning. Springer (New York), 2006. [4] S. Deneve. Bayesian spiking neurons I, II. Neural Computation, 20(1):91–145, 2008. [5] A. Sandberg, A. Lansner, K. M. Petersson, and ¨O. Ekeberg. A Bayesian attractor network with incremental learning. Network: Computation in Neural Systems, 13:179–194, 2002. [6] D. Roth. Learning in natural language. In Proc. of IJCAI, pages 898–904, 1999. [7] D. O. Hebb. The Organization of Behavior. Wiley, New York, 1949. [8] D. P. Bertsekas and J.N. Tsitsiklis. Neuro-Dynamic Programming. Athena Scientific, 1996. [9] B. Nessler, M. Pfeiffer, and W. Maass. Journal version. in preparation, 2009. [10] L. P. Sugrue, G. S. Corrado, and W. T. Newsome. Matching behavior and the representation of value in the parietal cortex. Science, 304:1782–1787, 2004. [11] J. S. Ide and F. G. Cozman. Random generation of Bayesian networks. In Proceedings of the 16th Brazilian Symposium on Artificial Intelligence, pages 366–375, 2002. [12] R. A. Rescorla and A. R. Wagner. Classical conditioning II. In A. H. Black and W. F. Prokasy, editors, A theory of Pavlovian conditioning, pages 64–99. 1972. [13] A. Y. Ng and M. I. Jordan. On discriminative vs. generative classifiers. NIPS, 14:841–848, 2002. 8
2008
18
3,431
Mind the Duality Gap: Logarithmic regret algorithms for online optimization Sham M. Kakade Toyota Technological Institute at Chicago sham@tti-c.org Shai Shalev-Shwartz Toyota Technological Institute at Chicago shai@tti-c.org Abstract We describe a primal-dual framework for the design and analysis of online strongly convex optimization algorithms. Our framework yields the tightest known logarithmic regret bounds for Follow-The-Leader and for the gradient descent algorithm proposed in Hazan et al. [2006]. We then show that one can interpolate between these two extreme cases. In particular, we derive a new algorithm that shares the computational simplicity of gradient descent but achieves lower regret in many practical situations. Finally, we further extend our framework for generalized strongly convex functions. 1 Introduction In recent years, online regret minimizing algorithms have become widely used and empirically successful algorithms for many machine learning problems. Notable examples include efficient learning algorithms for structured prediction and ranking problems [Collins, 2002, Crammer et al., 2006]. Most of these empirically successful algorithms are based on algorithms which are tailored to general convex functions, whose regret is O( √ T). Rather recently, there is a growing body of work providing online algorithms for strongly convex loss functions, with regret guarantees that are only O(log T). These algorithms have potential to be highly applicable since many machine learning optimization problems are in fact strongly convex — either with strongly convex loss functions (e.g. log loss, square loss) or, indirectly, via strongly convex regularizers (e.g. L2 or KL based regularization). Note that in this later case, the loss function itself may only be just convex but a strongly convex regularizer effectively makes this a strongly convex optimization problem (e.g. the SVM optimization problem uses the hinge loss with L2 regularization). The aim of this paper is to provide a template for deriving a wider class of regret-minimizing algorithms for online strongly convex programming. Online convex optimization takes place in a sequence of consecutive rounds. At each round, the learner predicts a vector wt ∈S ⊂Rn, and the environment responds with a convex loss function, ℓt : S →R. The goal of the learner is to minimize the difference between his cumulative loss and the cumulative loss of the optimal fixed vector, !T t=1 ℓt(wt)−minw∈S !T t=1 ℓt(w). This is termed ‘regret’ since it measures how ‘sorry’ the learner is, in retrospect, not to have predicted the optimal vector. Roughly speaking, the family of regret minimizing algorithms (for general convex functions) can be seen as varying on two axes, the ‘style’ and the ‘aggressiveness’ of the update. In addition to online algorithms’ relative simplicity, the empirical successes are also due to having these two knobs to tune for the problem at hand (which determine the nature of the regret bound). By style, we mean updates which favor either rotational invariance (such as gradient descent like update rules) or sparsity (like the multiplicative updates). Of course there is a much richer family here, including the Lp updates. By the aggressiveness of the update, we mean how much the algorithm moves its decision to be consistent with most recent loss functions. For example, the preceptron algorithm makes no update 1 when there is no error. In contrast, there is a family of algorithms which more aggressively update the loss when there is a margin mistake. These algorithms are shown to have improved performance (see for example the experimental study in Shalev-Shwartz and Singer [2007b]). While historically much of the analysis of these algorithms have been done on a case by case basis, in retrospect, the proof techniques have become somewhat boilerplate, which has lead to growing body of work to unify these analyses (see Cesa-Bianchi and Lugosi [2006] for review). Perhaps the most unified view of these algorithms is the ‘primal-dual’ framework of Shalev-Shwartz and Singer [2006], Shalev-Shwartz [2007], for which the gamut of these algorithms can be largely viewed as special cases. Two aspects are central in providing this unification. First, the framework works with a complexity function, which determines the style of algorithm and the nature of the regret guarantee (If this function is the L2 norm, then one obtains gradient like updates, and if this function is the KLdistance, then one obtains multiplicative updates). Second, the algorithm maintains both “primal” and “dual” variables. Here, the the primal objective function is !T t=1 ℓt(w) (where ℓt is the loss function provided at round t), and one can construct a dual objective function Dt(·), which only depends on the loss functions ℓ1, ℓ2, . . .ℓt−1. The algorithm works by incrementally increasing the dual objective value (in an online manner), which can be done since each Dt is only a function of the previous loss functions. By weak duality, this can be seen as decreasing the duality gap. The level of aggressiveness is seen to be how fast the algorithm is attempting to increase the dual objective value. This paper focuses on extending the duality framework for online convex programming to the case of strongly convex functions. This analysis provides a more unified and intuitive view of the extant algorithms for online strongly convex programming. An important observation we make is that any σ-strongly convex loss function can be rewritten as ℓi(w) = f(w) + gi(w), where f is a fixed σstrongly convex function (i.e. f does not depend on i), and gi is a convex function. Therefore, after t online rounds, the amount of intrinsic strong convexity we have in the primal objective !t i=1 ℓt(w) is at least σ t. In particular, this explains the learning rate of 1 σ t proposed in the gradient descent algorithm of Hazan et al. [2006]. Indeed, we show that our framework includes the gradient descent algorithm of Hazan et al. [2006] as an important special case, in which the aggressiveness level is minimal. At the most aggressive end, our framework yields the Follow-The-Leader algorithm. Furthermore, the template algorithm serves as a vehicle for deriving new algorithms (which enjoy logarithmic regret guarantees). The remainder of the paper is outlined as follows. We first provide background on convex duality. As a warmup, in Section 3, we present an intuitive primal-dual analysis of Follow-The-Leader (FTL), when f is the Euclidean norm. This naturally leads to a more general primal-dual algorithm (for which FTL is a special case), which we present in Section 4. Next, we further generalize our algorithmic framework to include strongly convex complexity functions f with respect to arbitrary norms ∥·∥. We note that the introduction of a complexity function was already provided in ShalevShwartz and Singer [2007a], but the analysis is rather specialized and does not have a knob which can tune the aggressiveness of the algorithm. Finally, in Sec. 6 we conclude with a side-by-side comparison of our algorithmic framework for strongly convex functions and the framework for (non-strongly) convex functions given in Shalev-Shwartz [2007]. 2 Mathematical Background We denote scalars with lower case letters (e.g. w and λ), and vectors with bold face letters (e.g. w and λ). The inner product between vectors x and w is denoted by ⟨x, w⟩. To simplify our notation, given a sequence of vectors λ1, . . . , λt or a sequence of scalars σ1, . . . ,σ t we use the shorthand λ1:t = t " i=1 λi and σ1:t = t " i=1 σi . Sets are designated by upper case letters (e.g. S). The set of non-negative real numbers is denoted by R+. For any k ≥1, the set of integers {1, . . . , k} is denoted by [k]. A norm of a vector x is denoted by ∥x∥. The dual norm is defined as ∥λ∥⋆= sup{⟨x, λ⟩: ∥x∥≤1}. For example, the Euclidean norm, ∥x∥2 = (⟨x, x⟩)1/2 is dual to itself and the L1 norm, ∥x∥1 = ! i |xi|, is dual to the L∞norm, ∥x∥∞= maxi |xi|. 2 FOR t = 1, 2, . . . , T: Define wt = − 1 σ1:(t−1) λt 1:(t−1) Receive a function ℓt(w) = σt 2 ∥w∥2 + gt(w) and suffer loss ℓt(wt) Update λt+1 1 , . . . , λt+1 t s.t. the following holds (λt+1 1 , . . . , λt+1 t ) ∈argmax λ1,...,λt Dt+1(λ1, . . . , λt) Figure 1: A primal-dual view of Follow-the-Leader. Here the algorithm’s decision wt is the best decision with respect to the previous losses. This presentation exposes the implicit role of the dual variables. Slightly abusing notation, λ1:0 = 0, so that w1 = 0. See text. We next recall a few definitions from convex analysis. A function f is σ-strongly convex if f(αu + (1 −α)v) ≤αf(u) + (1 −α)f(v) −σ 2 α (1 −α) ∥u −v∥2 2 . In Sec. 5 we generalize the above definition to arbitrary norms. If a function f is σ-strongly convex then the function g(w) = f(w) −σ 2 ∥w∥2 is convex. The Fenchel conjugate of a function f : S →R is defined as f ⋆(θ) = sup w∈S ⟨w, θ⟩−f(w) . If f is closed and convex, then the Fenchel conjugate of f ⋆is f itself (a function is closed if for all α > 0 the level set {w : f(w) ≤α} is a closed set). It is straightforward to verify that the function f(w) is conjugate to itself. The definition of f ⋆also implies that for c > 0 we have (c f)⋆(θ) = c f ⋆(θ/c). A vector λ is a sub-gradient of a function f at w if for all w′ ∈S, we have that f(w′) −f(w) ≥ ⟨w′ −w, λ⟩. The differential set of f at w, denoted ∂f(w), is the set of all sub-gradients of f at w. If f is differentiable at w, then ∂f(w) consists of a single vector which amounts to the gradient of f at w and is denoted by ∇f(w). The Fenchel-Young inequality states that for any w and θ we have that f(w) + f ⋆(θ) ≥⟨w, θ⟩. Sub-gradients play an important role in the definition of the Fenchel conjugate. In particular, the following lemma, whose proof can be found in Borwein and Lewis [2006], states that if λ ∈∂f(w) then the Fenchel-Young inequality holds with equality. Lemma 1 Let f be a closed and convex function and let ∂f(w′) be its differential set at w′. Then, for all λ′ ∈∂f(w′), we have f(w′) + f ⋆(λ′) = # λ′, w′$ . We make use of the following variant of Fenchel duality (see the appendix for more details): max λ1,...,λT −f ⋆(− T " t=1 λt) − T " t=1 g⋆ t (λt) ≤min w f(w) + T " t=1 gt(w) . (1) 3 Warmup: A Primal-Dual View of Follow-The-Leader In this section, we provide a dual analysis for the FTL algorithm. The dual view of FTL will help us to derive a family of logarithmic regret algorithms for online convex optimization with strongly convex functions. Recall that FTL algorithm is defined as follows: wt = argmin w t−1 " i=1 ℓi(w) . (2) For each i ∈[t −1] define gi(w) = ℓi(w) −σi 2 ∥w∥2, where σi is the largest scalar such that gi is still a convex function. The assumption that ℓi is σ-strongly convex guarantees that σi ≥σ. We can 3 therefore rewrite the objective function on the right-hand side of Eq. (2) as Pt(w) = σ1:(t−1) 2 ∥w∥2 + t−1 " i=1 gi(w) , (3) (recall that σ1:(t−1) = !t−1 i=1 σi). The Fenchel dual optimization problem (see Sec. 2) is to maximize the following dual objective function Dt(λ1, . . . , λt−1) = − 1 2 σ1:(t−1) ∥λ1:(t−1)∥2 − t−1 " i=1 g⋆ i (λi) . (4) Let (λt 1, . . . , λt t−1) be the maximizer of Dt. The relation between the optimal dual variables and the optimal primal vector is given by (see again Sec. 2) wt = − 1 σ1:(t−1) λt 1:(t−1) . (5) Throughout this section we assume that strong duality holds (i.e. Eq. (1) holds with equality). See the appendix for sufficient conditions. In particular, under this assumption, we have that the above setting for wt is in fact a minimizer of the primal objective, since (λt 1, . . . , λt t−1) maximizes the dual objective (see the appendix). The primal-dual view of Follow-the-Leader is presented in Figure 1. Denote ∆t = Dt+1(λt+1 1 , . . . , λt+1 t ) −Dt(λt 1, . . . , λt t−1) . (6) To analyze the FTL algorithm, we first note that (by strong duality) T " t=1 ∆t = DT +1(λT +1 1 , . . . , λT +1 T ) = min w PT +1(w) = min w T " t=1 ℓt(w) . (7) Second, the fact that (λt+1 1 , . . . , λt+1 t ) is the maximizer of Dt+1 implies that for any λ we have ∆t ≥Dt+1(λt 1, . . . , λt t−1, λ) −Dt(λt 1, . . . , λt t−1) . (8) The following central lemma shows that there exists λ such that the right-hand side of the above is sufficiently large. Lemma 2 Let (λ1, . . . , λt−1) be an arbitrary sequence of vectors. Denote w = − 1 σ1:(t−1) λ1:(t−1), let v ∈∂ℓt(w), and let λ = v −σtw. Then, λ ∈∂gt(w) and Dt+1(λ1, . . . , λt−1, λ) −Dt(λ1, . . . , λt−1) = ℓt(w) −∥v∥2 2 σ1:t . Proof We prove the lemma for the case t > 1. The case t = 1 can be proved similarly. Since ℓt(w) = σt 2 ∥w∥2 + gt(w) and v ∈∂ℓt(w) we have that λ ∈∂gt(w). Denote ¯∆t = Dt+1(λ1, . . . , λt−1, λ) −Dt(λ1, . . . , λt−1). Simple algebraic manipulations yield ¯∆t = − 1 2σ1:t %%λ1:(t−1) + λ %%2 + 1 2σ1:(t−1) %%λ1:(t−1) %%2 −g⋆ t (λ) = ∥λ1:(t−1)∥2 2 & 1 σ1:(t−1) − 1 σ1:t ' + ⟨w, λ⟩σ1:(t−1) σ1:t −∥λ∥2 2σ1:t −g⋆ t (λ) = σt∥w∥2 2 & 1 −σt σ1:t ' + ⟨w, λ⟩σ1:(t−1) σ1:t −∥λ∥2 2σ1:t −g⋆ t (λ) = σt ∥w∥2 2 + ⟨w, λ⟩−g⋆ t (λ) ( )* + A − &σ2 t ∥w∥2 2σ1:t + σt ⟨w, λ⟩ σ1:t + ∥λ∥2 2σ1:t ' ( )* + B Since λ ∈∂gt(w), Lemma 1 thus implies that ⟨w, λ⟩−g⋆ t (λ) = gt(w). Therefore, A = ℓt(w). Next, we note that B = ∥σtw+λ∥2 2σ1:t . We have thus shown that ¯∆t = ℓt(w) −∥σtw+λ∥2 2σ1:t . Plugging the definition of λ into the above we conclude our proof. Combining Lemma 2 with Eq. (7) and Eq. (8) we obtain the following: 4 FOR t = 1, 2, . . . , T: Define wt = − 1 σ1:(t−1) λt 1:(t−1) Receive a function ℓt(w) = σt 2 ∥w∥2 + gt(w) and suffer loss ℓt(wt) Update λt+1 1 , . . . , λt+1 t s.t. the following holds ∃λt ∈∂gt(wt), s.t. Dt+1(λt+1 1 , . . . , λt+1 t ) ≥Dt+1(λt 1, . . . , λt t−1, λt) Figure 2: A primal-dual algorithmic framework for online convex optimization. Again, w1 = 0. Corollary 1 Let ℓ1, . . . ,ℓT be a sequence of functions such that for all t ∈[T], ℓt is σt-strongly convex. Assume that the FTL algorithm runs on this sequence and for each t ∈[T], let vt be in ∂ℓt(wt). Then, T " t=1 ℓt(wt) −min w T " t=1 ℓt(w) ≤1 2 T " t=1 ∥vt∥2 σ1:t (9) Furthermore, let L = maxt ∥vt∥and assume that for all t ∈[T], σt ≥σ. Then, the regret is bounded by L2 2σ (log(T) + 1). If we are dealing with the square loss ℓt(w) = ∥w −µt∥2 2 (where nature chooses µt), then it is straightforward to see that Eq. (8) holds with equality, and this leads to the previous regret bound holding with equality. This equality is the underlying reason that the FTL strategy is a minimax strategy (See Abernethy et al. [2008] for a proof of this claim). 4 A Primal-Dual Algorithm for Online Strongly Convex Optimization In the previous section, we provided a dual analysis for FTL. Here, we extend the analysis and derive a more general algorithmic framework for online optimization. We start by examining the analysis of the FTL algorithm. We first make the important observation that Lemma 2 is not specific to the FTL algorithm and in fact holds for any configuration of dual variables. Consider an arbitrary sequence of dual variables: (λ2 1), (λ3 1, λ3 2), . . . , (λT +1 1 , . . . , λT +1 T ) and denote ∆t as in Eq. (6). Using weak duality, we can replace the equality in Eq. (7) with the following inequality that holds for any sequence of dual variables: T " t=1 ∆t = DT +1(λT +1 1 , . . . , λT +1 T ) ≤min w PT +1(w) = min w T " t=1 ℓt(w) . (10) A summary of the algorithmic framework is given in Fig. 2. The following theorem, a direct corollary of the previous equation and Lemma 2, shows that all instances of the framework achieve logarithmic regret. Theorem 1 Let ℓ1, . . . ,ℓT be a sequence of functions such that for all t ∈[T], ℓt is σt-strongly convex. Then, any algorithm that can be derived from Fig. 2 satisfies T " t=1 ℓt(wt) −min w T " t=1 ℓt(w) ≤1 2 T " t=1 ∥vt∥2 σ1:t (11) where vt ∈∂ℓt(wt). Proof Let ∆t be as defined in Eq. (6). The last condition in the algorithm implies that ∆t ≥Dt+1(λt 1, . . . , λt t−1, vt −σtwt) −Dt(λt 1, . . . , λt t−1) . The proof follows directly by combining the above with Eq. (10) and Lemma 2. We conclude this section by deriving several algorithms from the framework. 5 Example 1 (Follow-The-Leader) As we have shown in Sec. 3, the FTL algorithm (Fig. 1) is equivalent to optimizing the dual variables at each online round. This update clearly satisfies the condition in Fig. 2 and is therefore a special case. Example 2 (Gradient-Descent) Following Hazan et al. [2006], Bartlett et al. [2007] suggested the following update rule for differentiable strongly convex function wt+1 = wt − 1 σ1:t ∇ℓt(wt) . (12) Using a simple inductive argument, it is possible to show that the above update rule is equivalent to the following update rule of the dual variables (λt+1 1 , . . . , λt+1 t ) = (λt 1, . . . , λt t−1, ∇ℓt(wt) −σtwt) . (13) Clearly, this update rule satisfies the condition in Fig. 2. Therefore our framework encompasses this algorithm as a special case. Example 3 (Online Coordinate-Dual-Ascent) The FTL and the Gradient-Descent updates are two extreme cases of our algorithmic framework. The former makes the largest possible increase of the dual while the latter makes the smallest possible increase that still satisfies the sufficient dual increase requirement. Intuitively, the FTL method should have smaller regret as it consumes more of its potential earlier in the optimization process. However, its computational complexity is large as it requires a full blown optimization procedure at each online round. A possible compromise is to fully optimize the dual objective but only with respect to a small number of dual variables. In the extreme case, we optimize only with respect to the last dual variable. Formally, we let λt+1 i = ,λt i if i < t argmax λt Dt+1(λt 1, . . . , λt t−1, λt) if i = t Clearly, the above update satisfies the requirement in Fig. 2 and therefore enjoys a logarithmic regret bound. The computational complexity of performing this update is often small as we optimize over a single dual vector. Occasionally, it is possible to obtain a closed-form solution of the optimization problem and in these cases the computational complexity of the coordinate-dual-ascent update is identical to that of the gradient-descent method. 5 Generalized strongly convex functions In this section, we extend our algorithmic framework to deal with generalized strongly convex functions. We first need the following generalized definition of strong convexity. Definition 1 A continuous function f is σ-strongly convex over a convex set S with respect to a norm ∥·∥if S is contained in the domain of f and for all v, u ∈S and α ∈[0, 1] we have f(α v + (1 −α) u) ≤α f(v) + (1 −α) f(u) −σ 2 α (1 −α) ∥v −u∥2 . (14) It is straightforward to show that the function f(w) = 1 2∥w∥2 2 is strongly convex with respect to the Euclidean norm. Less trivial examples are given below. Example 4 The function f(w) = !n i=1 wi log(wi/ 1 n) is strongly convex over the probability simplex, S = {w ∈Rn + : ∥w∥1 = 1}, with respect to the L1 norm. Its conjugate function is f ⋆(θ) = log( 1 n !n i=1 exp(θi)). Example 5 For q ∈(1, 2), the function f(w) = 1 2(q−1)∥w∥2 q is strongly convex over S = Rn with respect to the Lq norm. Its conjugate function is f ⋆(θ) = 1 2(p−1)∥θ∥2 p, where p = (1 −1/q)−1. For proofs, see for example Shalev-Shwartz [2007]. In the appendix, we list several important properties of strongly convex functions. In particular, the Fenchel conjugate of a strongly convex function is differentiable. 6 INPUT: A strongly convex function f FOR t = 1, 2, . . . , T: 1) Define wt = ∇f ⋆ „ − λt 1:(t−1) √ t « 2) Receive a function ℓt 3) Suffer loss ℓt(wt) 4) Update λt+1 1 , . . . , λt+1 t s.t. there exists λt ∈∂lt(wt) with Dt+1(λt+1 1 , . . . , λt+1 t ) ≥ Dt+1(λt 1, . . . , λt t−1, λt) INPUT: A σ-strongly convex function f FOR t = 1, 2, . . . , T: 1) Define wt = ∇f ⋆ „ − λt 1:(t−1) σ1:t « 2) Receive a function ℓt = σf + gt 3) Suffer loss ℓt(wt) 4) Update λt+1 1 , . . . , λt+1 t s.t. there exists λt ∈∂gt(wt) with Dt+1(λt+1 1 , . . . , λt+1 t ) ≥ Dt+1(λt 1, . . . , λt t−1, λt) Figure 3: Primal-dual template algorithms for general online convex optimization (left) and online strongly convex optimization (right). Here a1:t = Pt i=1 ai, and for notational convenient, we implicitly assume that a1:0 = 0. See text for description. Consider the case where for all t, ℓt can be written as σtf + gt where f is 1-strongly convex with respect to some norm ∥·∥and gt is a convex function. We also make the simplifying assumption that σt is known to the forecaster before he defines wt. For each round t, we now define the primal objective to be Pt(w) = σ1:(t−1)f(w) + t−1 " i=1 gi(w) . (15) The dual objective is (see again Sec. 2) Dt(λ1, . . . , λt−1) = −σ1:(t−1)f ⋆− λ1:(t−1) σ1:(t−1) . − t−1 " i=1 g⋆ i (λi) . (16) An algorithmic framework for online optimization in the presence of general strongly convex functions is given on the right-hand side of Fig. 3. The following theorem provides a logarithmic regret bound for the algorithmic framework given on the right-hand side of Fig. 3. Theorem 2 Let ℓ1, . . . ,ℓT be a sequence of functions such that for all t ∈[T], ℓt = σtf + gt for f being strongly convex w.r.t. a norm ∥·∥and gt is a convex function. Then, any algorithm that can be derived from Fig. 3 (right) satisfies T " t=1 ℓt(wt) −min w T " t=1 ℓt(w) ≤1 2 T " t=1 ∥vt∥2 ⋆ σ1:t , (17) where vt ∈∂gt(wt) and ∥·∥⋆is the norm dual to ∥·∥. The proof of the theorem is given in Sec. B 6 Summary In this paper, we extended the primal-dual algorithmic framework for general convex functions from Shalev-Shwartz and Singer [2006], Shalev-Shwartz [2007] to strongly convex functions. The template algorithms are outlined in Fig. 3. The left algorithm is the primal-dual algorithm for general convex functions from Shalev-Shwartz and Singer [2006], Shalev-Shwartz [2007]. Here, f is the complexity function, (λt 1, . . . , λt t) are the dual variables at time t, and Dt(·) is the dual objective 7 function at time t (which is a lower bound on primal value). The function ∇f ⋆is the gradient of the conjugate function of f, which can be viewed as a projection of the dual variables back into the primal space. At the least aggressive extreme, in order to obtain √ T regret, it is sufficient to set λi t (for all i) to be a subgradient of the loss ∂ℓt(wt). We then recover an online ‘mirror descent’ algorithm [Beck and Teboulle, 2003, Grove et al., 2001, Kivinen and Warmuth, 1997], which specializes to gradient descent when f is the squared 2-norm or the exponentiated gradient descent algorithm when f is the relative entropy. At the most aggressive extreme, where Dt is maximized at each round, we have ‘Follow the Regularized Leader’, which is wt = arg minw !t−1 i=1 ℓi(w) + √ t f(w). Intermediate algorithms can also be devised such as the ‘passive-aggressive’ algorithms [Crammer et al., 2006, Shalev-Shwartz, 2007]. The right algorithm in Figure 3 is our new contribution for strongly convex functions. Any σstrongly convex loss function can be decomposed into ℓt = σf + gt, where gt is convex. The algorithm for strongly convex functions is different in two ways. First, the effective learning rate is now 1 σ1:t rather than 1 √ t (see Step 1 in both algorithms). Second, more subtly, the condition on the dual variables (in Step 4) is only determined by the subgradient of gt, rather than the subgradient of ℓt. At the most aggressive end of the spectrum, where Dt is maximized at each round, we have the ‘Follow the Leader’ (FTL) algorithm: wt = arg minw !t−1 i=1 ℓi(w). At the least aggressive end, we have the gradient descent algorithm of Hazan et al. [2006] (which uses learning rate 1 σ1:t ). Furthermore, we provide algorithms which lie in between these two extremes — it is these algorithms which have the potential for most practical impact. Empirical observations suggest that algorithms which most aggressively close the duality gap tend to perform most favorably [Crammer et al., 2006, Shalev-Shwartz and Singer, 2007b]. However, at the FTL extreme, this is often computationally prohibitive to implement (as one must solve a full blown optimization problem at each round). Our template algorithm suggests a natural compromise, which is to optimize the dual objective but only with respect to a small number of dual variables (say the most current dual variable) — we coin this algorithm online coordinate-dual-ascent. In fact, it is sometimes possible to obtain a closed-form solution of this optimization problem, so that the computational complexity of the coordinate-dual-ascent update is identical to that of a vanilla gradient-descent method. This variant update still enjoys a logarithmic regret bound. References J. Abernethy, P. Bartlett, A. Rakhlin, and A. Tewari. Optimal strategies and minimax lower bounds for online convex games. In Proceedings of the Nineteenth Annual Conference on Computational Learning Theory, 2008. P. L. Bartlett, E. Hazan, and A. Rakhlin. Adaptive online gradient descent. In Advances in Neural Information Processing Systems 21, 2007. A. Beck and M. Teboulle. Mirror descent and nonlinear projected subgradient methods for convex optimization. Operations Research Letters, 31:167–175, 2003. J. Borwein and A. Lewis. Convex Analysis and Nonlinear Optimization. Springer, 2006. S. Boyd and L. Vandenberghe. Convex Optimization. Cambridge University Press, 2004. N. Cesa-Bianchi and G. Lugosi. Prediction, learning, and games. Cambridge University Press, 2006. M. Collins. Discriminative training methods for hidden Markov models: Theory and experiments with perceptron algorithms. In Conference on Empirical Methods in Natural Language Processing, 2002. K. Crammer, O. Dekel, J. Keshet, S. Shalev-Shwartz, and Y. Singer. Online passive aggressive algorithms. Journal of Machine Learning Research, 7:551–585, Mar 2006. A. J. Grove, N. Littlestone, and D. Schuurmans. General convergence results for linear discriminant updates. Machine Learning, 43(3):173–210, 2001. E. Hazan, A. Kalai, S. Kale, and A. Agarwal. Logarithmic regret algorithms for online convex optimization. In Proceedings of the Nineteenth Annual Conference on Computational Learning Theory, 2006. J. Kivinen and M. Warmuth. Exponentiated gradient versus gradient descent for linear predictors. Information and Computation, 132(1):1–64, January 1997. S. Shalev-Shwartz. Online Learning: Theory, Algorithms, and Applications. PhD thesis, The Hebrew University, 2007. S. Shalev-Shwartz and Y. Singer. Convex repeated games and Fenchel duality. In Advances in Neural Information Processing Systems 20, 2006. S. Shalev-Shwartz and Y. Singer. Logarithmic regret algorithms for strictly convex repeated games. Technical report, The Hebrew University, 2007a. Available at http://www.cs.huji.ac.il/∼shais. S. Shalev-Shwartz and Y. Singer. A unified algorithmic approach for efficient online label ranking. In aistat07, 2007b. 8
2008
180
3,432
Hierarchical Semi-Markov Conditional Random Fields for Recursive Sequential Data Tran The Truyen †, Dinh Q. Phung †, Hung H. Bui ‡∗, and Svetha Venkatesh † †Department of Computing, Curtin University of Technology GPO Box U1987 Perth, WA 6845, Australia thetruyen.tran@postgrad.curtin.edu.au {D.Phung,S.Venkatesh}@curtin.edu.au ‡Artificial Intelligence Center, SRI International 333 Ravenswood Ave, Menlo Park, CA 94025, USA bui@ai.sri.com Abstract Inspired by the hierarchical hidden Markov models (HHMM), we present the hierarchical semi-Markov conditional random field (HSCRF), a generalisation of embedded undirected Markov chains to model complex hierarchical, nested Markov processes. It is parameterised in a discriminative framework and has polynomial time algorithms for learning and inference. Importantly, we develop efficient algorithms for learning and constrained inference in a partially-supervised setting, which is important issue in practice where labels can only be obtained sparsely. We demonstrate the HSCRF in two applications: (i) recognising human activities of daily living (ADLs) from indoor surveillance cameras, and (ii) noun-phrase chunking. We show that the HSCRF is capable of learning rich hierarchical models with reasonable accuracy in both fully and partially observed data cases. 1 Introduction Modelling hierarchical aspects in complex stochastic processes is an important research issue in many application domains ranging from computer vision, text information extraction, computational linguistics to bioinformatics. For example, in a syntactic parsing task known as noun-phrase chunking, noun-phrases (NPs) and part-of-speech tags (POS) are two layers of semantics associated with words in the sentence. Previous approach first tags the POS and then feeds these tags as input to the chunker. The POS tagger takes no information of the NPs. This may not be optimal, as a noun-phrase is often very informative to infer the POS tags belonging to the phrase. Thus, it is more desirable to jointly model and infer both the NPs and the POS tags at the same time. Many graphical models have been proposed to address this challenge, typically extending the flat hidden Markov models (e.g., hierarchical HMM (HHMM) [2], DBN [6]). These models are, however, generative in that they are forced to consider the modelling of the joint distribution Pr(x, z) for both the observation z and the label x. An attractive alternative is to model the distribution Pr(x|z) directly, avoiding the modelling of z. This line of research has recently attracted much interest, and one of the significant results was the introduction of the conditional random field (CRF) [4]. Work in CRFs was originally limited to flat structures for efficient inference, and subsequently extended to ∗Hung Bui is supported by the Defense Advanced Research Projects Agency (DARPA) under Contract No. FA8750-07-D-0185/0004. Any opinions, findings and conclusions or recommendations expressed in this material are those of the authors and do not necessarily reflect the views of DARPA, or the Air Force Research Laboratory (AFRL). hierarchical structures, such as the dynamic CRFs (DCRF) [10], and hierarchical CRFs [5]. These models assume predefined structures, therefore, they are not flexible to adapt to many real-world datasets. For example, in the noun-phrase chunking problem, no prior hierarchical structures are known. Rather, if such a structure exists, it can only be discovered after the model has been successfully built and learned. In addition, most discriminative structured models are trained in a completely supervised fashion using fully labelled data, and limited research has been devoted to dealing with the partially labelled data (e.g. [3, 12]). In several domains, it is possible to obtain some labels with minimal effort. Such information can be used either for training or for decoding. We term the process of learning with partial labels partial-supervision, and the process of inference with partial labels constrained inference. Both processes require the construction of appropriate constrained inference algorithms. We are motivated by the HHMM [2], a directed, generative model parameterised as a standard Bayesian network. To address the above issues, we propose the Hierarchical Semi-Markov Conditional Random Field (HSCRF), which is a recursive, undirected graphical model that generalises the undirected Markov chains and allows hierarchical decomposition. The HSCRF is parameterised as a standard log-linear model, and thus can naturally incorporate discriminative modelling. For example, the noun-phrase chunking problem can be modeled as a two level HSCRF, where the top level represents the NP process, the bottom level the POS process. The two processes are conditioned on the sequence of words in the sentence. Each NP generally spans one or more words, each of which has a POS tag. Rich contextual information such as starting and ending of the phrase, the phrase length, and the distribution of words falling inside the phrase can be effectively encoded. At the same time, like the HHMM, exact inference in the HSCRFs can be performed in polynomial time in a manner similar to the Asymmetric Inside-Outside algorithm (AIO) [1]. We demonstrate the effectiveness of HSCRFs in two applications: (i) segmenting and labelling activities of daily living (ADLs) in an indoor environment and (ii) jointly modelling noun-phrases and part-of-speeches in shallow parsing. Our experimental results in the first application show that the HSCRFs are capable of learning rich, hierarchical activities with good accuracy and exhibit better performance when compared to DCRFs and flat-CRFs. Results for the partially observable case also demonstrate that significant reduction of training labels still results in models that perform reasonably well. We also show that observing a small amount of labels can significantly increase the accuracy during decoding. In noun-phrase chunking, the HSCRFs can achieve higher accuracy than standard CRF-based techniques and the recent DCRFs. Our contributions from this paper are thus: i) the introduction of the novel and Hierarchical Semi-Markov Conditional Random Field to model nested Markovian processes in a discriminative framework, ii) the development of an efficient generalised Asymmetric Inside-Outside (AIO) algorithm for partially supervised learning and constrained inference, and iii) the applications of the proposed HSCRFs in human activities recognition, and in shallow parsing of natural language. Due to space constraint, in this paper we present only main ideas and empirical evaluations. Complete details and extensions can be found in the technical report [11]. The next section introduces necessary notations and provides a model description for the HSCRF, followed by the discussion on learning and inference for fully and partially data cases in section 3 and 4 respectively. Applications for recognition of activities and natural language parsing are presented in section 5. Finally, discussions on the implications of the HSCRF and conclusions are given in section 6. 2 Model Definition and Parameterisation 2.1 The Hierarchical Semi-Markov Conditional Random Fields Consider a hierarchically nested Markov process with D levels where, by convention, the top level is the dummy root level that generates all subsequent Markov chains. Then, as in the generative process of the hierarchical HMMs [2], the parent state embeds a child Markov chain whose states may in turn contain grand-child Markov chains. The relation among these nested Markov chains is defined via the model topology, which is a state hierarchy of depth D. It specifies a set of states Sd at each level d, i.e., Sd = {1...|Sd|}, where |Sd| is the number of states at level d and 1 ≤d ≤D. For each state sd ∈Sd where d ̸= D, the model also defines a set of children associated with it at the next level ch(sd) ⊂Sd+1, and thus conversely, each child sd+1 is associated with a set of parental states at the upper level pa(sd+1) ⊂Sd. Unlike the original HHMMs proposed in [2] where tree structure is explicitly enforced on the state hierarchy, the HSCRFs allow arbitrary sharing of children among parental states as addressed in [1]. This way of topology generalization implies less number of sub-states required when D is large, and thus lead to fewer parameters and possibly less training data and time complexity [1]. To provide an intuition, the temporal evolution can be informally described as follows. Start with the root node at the top level, as soon as a new state is created at level d ̸= D, it initialises a child state at level d + 1. The initialisation continues downward until reaching the bottom level1. This child process at level d + 1 continues its execution recursively until it terminates, and when it does, the control of execution returns to its parent at the upper level d. At this point, the parent makes a decision either to transits to a new state at the same level or returns the control to the grand-parent at the upper level d −1. The key intuition for this hierarchical nesting process is that the lifespan of a child process is a subsegment in the lifespan of its parent. To be more precise, consider the case which a parent process sd i:j at level d starts a new state2 at time i and persists until time j. At time i, the parent initialises a child state sd+1 i which continues until it ends at time k < j, at which the child state transits to a new child state sd+1 k+1. The child process exits at time j, at which the control from the child level is returned to the parent sd i:j. Upon receiving the control, the parent state sd i:j may transit to a new parent state sd j+1:l, or ends at j and returns the control to the grand-parent at level d −1. d = 1 d = 2 e2 2 x2 2 d = D 1 2 T −1 T xj xi−1 ej−1 = 0 xi xj−1 ej = 1 ei = 0 ei−1 = 1 xd+1 i xd i ed i−1 = 1 xd+1 i xd i ed i = 1 ed i = 1 xd i xd−1 i+1 xd i+1 ed−1 i = 0 Figure 1: Graphical presentation for HSCRFs (leftmost). Graph structures for state-persistence (middle-top), initialisation and ending (middle-bottom), and state-transition (rightmost). The HSCRF, which is a multi-level temporal graphical model of length T with D levels, can be described formally as follows (Fig. 1). It starts from the root level indexed as 1, runs for T time slices and at each time slice a hierarchy of D states are generated. At each level d and time index i, there is a node representing a state variable xd i ∈Sd = {1, 2, ..., |Sd|}. Associated with each xd i is an ending indicator ed i which can be either 1 or 0 to signify whether the state xd i terminates or continues its execution to the next time slice. The nesting nature of the HSCRFs is formally realised by imposing the specific constraints on the value assignment of ending indicators: • The root state persists during the course of evolution, i.e., e1 1:T −1 = 0, e1 T = 1, and all states end at the last time-slice, i.e., e1:D T = 1. • When a state finishes, all of its descendants must also finish, i.e., ed i = 1 implies ed+1:D i = 1; and when a state persists, all of its ancestors must also persist, i.e., ed i = 0 implies e1:d−1 i = 0. • When a state transits, its parent must remain unchanged, i.e., ed i = 1, ed−1 i = 0, and states at the bottom level terminates at every single slice, i.e., eD i = 1 for all i ∈[1, T]. Thus, specific value assignments of ending indicators provide contexts that realise the evolution of the model states in both hierarchical (vertical) and temporal (horizontal) directions. Each context at 1In HHMMs, the bottom level is also called production level, in which the states emit observational symbols. In HSCRFs, this generative process is not assumed. 2Our notation sd i:j is to denote the set of variables from time i to j at level d, i.e., sd i:j = {sd i , sd i+1, . . . , sd j}. a level and associated state variables form a contextual clique, and here we identify four contextual clique types (cf. Fig. 1): • State-persistence : This corresponds to the life time of a state at a given level Specifically, given a context be c = (ed i−1:j = (1, 0, .., 0, 1)), then σpersist,d i:j = (xd i:j, c), is a contextual clique that specifies the life span [i, j] of any state s = xd i:j. • State-transition : This corresponds to a state at level d ∈[2, D] at time i transiting to a new state. Specifically, given a context c = (ed−1 i = 0, ed i = 1) then σtransit,d i = (xd−1 i+1 , xd i:i+1, c) is a contextual clique that specifies the transition of xd i to xd i+1 at time i under the same parent xd−1 i+1 . • State-initialisation : This corresponds to a state at level d ∈[1, D −1] initialising a new child state at level d + 1 at time i. Specifically, given a context c = (ed i−1 = 1), then σinit,d i = (xd i , xd+1 i , c) is a contextual clique that specifies the initialisation at time i from the parent xd i to the first child xd+1 i . • State-exiting : This corresponds to a state at level d ∈[1, D−1] to end at time i Specifically, given a context c = (ed i = 1), then σexit,d i = (xd i , xd+1 i , c) is a contextual clique that specifies the ending of xd i at time i with the last child xd+1 i . In the HSCRF, we are interested in the conditional setting, in which the entire state and ending variables (x1:D 1:T , e1:D 1:T ) are conditioned on an observational sequence z. For example, in computational linguistics, the observation is often the sequence of words, and the state variables might be the part-of-speech tags and the phrases. To capture the correlation between variables and such conditioning, we define a non-negative potential function φ(σ, z) over each contextual clique σ. Figure 2 shows the notations for potentials that correspond to the four contextual clique types we have identified above. Details of potential specification are described in the Section 2.2. State persistence potential Rd,s,z i:j = φ(σpersist,d i:j , z) where s = xd i:j. State transition potential Ad,s,z u,v,i = φ(σtransit,d i , z) where s = xd−1 i+1 and u = xd i , v = xd i+1. State initialization potential πd,s,z u,i = φ(σinit,d i , z) where s = xd i , u = xd+1 i . State ending potential Ed,s,z u,i = φ(σexit,d i , z) where s = xd i , u = xd+1 i . Figure 2: Shorthands for contextual clique potentials. Let V = (x1:D 1:T , e1:D 1:T ) denote the set of all variables and let τ d = {ik}m k=1 denote the set of all time indices where ed ik = 1. A configuration ζ of the model is a complete assignment of all the states and ending indicators (x1:D 1:i , e1:D 1:T ) which satisfies the set of hierarchical constraints described earlier in this section. The joint potential defined for each configuration is the product of all contextual clique potentials over all ending time indexes i ∈[1, T] and all semantic levels d ∈[1, D]: Φ(ζ, z) = Y d     Y (ik,ik+1)∈τ d Rd,s,z ik+1:ik+1  Y ik∈τ d,ik /∈τ d−1 Ad,s,z u,v,ik  Y ik∈τ d πd,s,z u,ik+1  Y ik∈τ d Ed,s,z u,ik    The conditional distribution is given as: Pr(ζ|z) = 1 Z(z)Φ(ζ, z) (1) where Z(z) = P ζ Φ(ζ, z) is the partition function for normalisation. 2.2 Log-linear Parameterisation In our HSCRF setting, there is a feature vector f d σ(σ, z) associated with each type of contextual clique σ, in that φ(σd, z) = exp  θd σ • f d σ(σ, z) . where a•b denotes the inner product of two vectors a and b. Thus, the features are active only in the context in which the corresponding contextual cliques appear. For the state-persistence contextual clique, the features incorporate state-duration, start time i and end time j of the state. Other feature types incorporate the time index in which the features are triggered. In what follows, we omit z for clarity, and implicitly use it as part of the partition function Z and the potential Φ(.). 3 Unconstrained Inference and Fully Supervised Learning Typical inference tasks in the HSCRF include computing the partition function, MAP assignment and feature expectations. The key insight is the context-specific independence, which is due to hierarchical constraints described in Section 2.1. Let us call the set of variable assignments Πd,s i:j = (xd i:j = s, ed:D i−1 = 1, ed:D j = 1, ed i:j−1 = 0) the symmetric Markov blanket. Given Πd,s i:j , the set of variables inside the blanket is independent of those outside it. A similar relation holds with respect to the asymmetric Markov blanket, which includes the set of variable assignments Γd,s i:j (u) = (xd i:j = s, xd+1 j = u, ed:D i−1 = 1, ed+1:D j = 1, ed i:j−1 = 0). Figure 3 depicts an asymmetric Markov blanket (the covering arrowed line) containing a smaller asymmetric blanket (the left arrowed line) and a symmetric blanket (the double-arrowed line). Denote by ∆d,s i:j the sum of products of all clique d level d level +1 Figure 3: Decomposition with respect to symmetric/asymmetric Markov blankets. potentials falling inside the symmetric Markov blanket Πd,s i:j . The sum is taken over all possible value assignments of the set of variables inside Πd,s i:j . In the same manner, let αd,s i:j (u) be the sum of products of all clique potentials falling inside the asymmetric Markov blanket Γd,s i:j (u). Let ˆ∆d,s i:j be a shorthand for ∆d,s i:j Rd,s i:j . Using the context-specific independence described above and the decomposition depicted Figure 3, the following recursions arise: ∆d,s i:j = X u∈Sd+1 αd,s i:j (u)Ed,s u,j; αd,s i:j (u) = j X k=i+1 X v∈Sd+1 αd,s i:k−1(v) ˆ∆d+1,u k:j Ad+1,s v,u,k−1 + ˆ∆d+1,u i:j πd+1,s u,i (2) As the symmetric Markov blanket Π1,s 1:T and the set x1 1:T = s covers every state variable, the partition function can be computed as Z = P s∈S1 ˆ∆1,s 1:T . MAP assignment is essentially the max-product problem, which can be solved by turning all summations in (2) into corresponding maximisations. Parameter estimation in HSCRFs, as in other log-linear models, requires the computation of feature expectations as a part of the log-likelihood gradient (e.g. see [4]). The gradient is then fed into any black-box standard numerical optimisation algorithms. As the feature expectations are rather involved, we intend to omit the details. Rather, we include here as an example the expectation of the state-persistence features X i∈[1,T ] X j∈[i,T ] E[f d,s σpersist(i, j)δ(Πd,s i:j ∈ζ)] = 1 Z X i∈[1,T ] X j∈[i,T ] ∆d,s i:j Λd,s i:j Rd,s i:j f d,s σpersist(i, j) where f d,s σpersist(i, j) is the state-persistence feature vector for the state s = xd i:j starting at i and ending at j; Λd,s i:j is the sum of products of all clique potentials falling outside the symmetric Markov blanket Πd,s i:j ; and δ(Πd,s i:j ∈ζ) is the indicator function that the Markov blanket Πd,s i:j is part of the random configuration ζ. 4 Constrained Inference and Partially Supervised Learning It may happen that the training data is not completely labelled, possibly due to lack of labelling resources [12]. In this case, the learning algorithm should be robust enough to handle missing labels. On the other hand, during inference, we may partially obtain high quality labels from external sources [3]. This requires the inference algorithm to be responsive to the available labels which may help to improve the performance. In general, when we make observations, we observe some states and some ending indicators. Let ˜V = {˜x, ˜e} be the set of observed state and end variables respectively. The procedures to compute the auxiliary variables such as ∆d,s i:j and αd,s i:j (u) must be modified to address constraints arisen from these observations. For example, computing ∆d,s i:j assumes Πd,s i:j , which implies the constraint to the state s at level d starting at i and persisting till terminating at j. Then, if any observations (e.g., there is an ˜xd k ̸= s for k ∈[i, j]) are made causing this constraint invalid, ∆d,s i:j will be zero. Therefore, in general, the computation of each auxiliary variable is multiplied by an identity function that enforces the consistency between the observations and the required constraints associated with the computation of that variable. As an example, we consider the computation of ∆d,s i:j . The sum ∆d,s i:j is only consistent if all of the following conditions are satisfied: (a) if there are observed states at level d within the interval [i, j] they must be s, (b) if there is any observed ending indicator ˜ed i−1, then ˜ed i−1 = 1, (c) if the ending indicator ˜ed k is observed for some k ∈[i, j −1], then ˜ed k = 0, and (d) if the ending indicator ˜ed j is observed, then ˜ed j = 1. These conditions are captured by using the following identity function I[∆d,s i:j ] = δ(˜xd k∈[i,j] = s)δ(˜ed i−1 = 1)δ(˜ed k∈[i:j−1] = 0)δ(˜ed j = 1) (3) When observations are made, the first equation in (2) is thus replaced by ∆d,s i:j = I[∆d,s i:j ]  X u∈Sd+1 αd,s i:j (u)Ed,s u,j  (4) 5 Applications We describe two applications of the proposed hierarchical semi-Markov CRFs in this section: activity recognition in Secion 5.1 and shallow parsing in Section 5.2. 5.1 Recognising Indoor Activities In this experiment, we evaluate the HSCRFs with a relatively small dataset from the domain of indoor video surveillance. The task is to recognise trajectories and activities, which a person performs in a kitchen, from his noisy locations extracted from video. The data, originally described in [7], has 45 training and 45 test sequences, each of which corresponds to one of 3 the persistent activities: (1) preparing short-meal, (2) having snack and (3) preparing normal-meal. The persistent activities share some of the 12 sub-trajectories. Each sub-trajectory is a sub-sequence of discrete locations. Thus naturally, the data has a state hierarchy of depth 3: the dummy root for each location sequence, the persistent activities, and the sub-trajectories. The input observations to the model are simply sequences of discrete locations. At each level d and time t we count an error if the predicted state is not the same as the ground-truth. First, we examine the fully observed case where the HSCRF is compared against the DCRF [10] at both data levels, and against the Sequential CRF (SCRF) [4] at the bottom level. Table 1 (the left half) shows that (a) both the multilevel models significantly outperform the flat model and (b) the HSCRF outperforms the DCRF. Alg. d = 2 d = 3 Alg. d = 2 d = 3 HSCRF 100 93.9 PO-HSCRF 80.2 90.4 DCRF 96.5 89.7 PO-SCRF 83.5 SCRF 82.6 Table 1: Accuracy (%) for fully observed data (left), and partially observed (PO) data (right). Next, we consider partially-supervised learning in which about 50% of start/end times of a state and state labels are observed at the second level. All ending indicators are known at the bottom level. The results are reported in Table 1 (the right half). As can be seen, although only 50% of the state labels and state start/end times are observed, the model learned is still performing well with accuracy of 80.2% and 90.4% at levels 2 and 3, respectively. We next consider the issue of partially observing labels during decoding and test the effect using degraded learned models. Such degraded models (emulating noisy training data or lack of training time) are extracted from the 10th iteration of the fully observed data case. The labels are provided at random times. Figure 4a shows the decoding accuracy as a function of available state labels. It is interesting to observe that a moderate amount of observed labels (e.g. 20−40%) causes the accuracy rate to go up considerably. 5.2 POS Tagging and Noun-Phrase Chunking In this experiment, we apply the HSCRF to the task of noun-phrase chunking. The data is from the CoNLL-2000 shared task 3, in which 8926 English sentences from the Wall Street Journal corpus are used for training and 2012 sentences are for testing. Each word in a pre-processed sentence is labelled by two labels: the part-of-speech (POS) and the noun-phrase (NP). There are 48 POS labels and 3 NP labels (B-NP for beginning of a noun-phrase, I-NP for inside a noun-phrase or O for others). Each noun-phrase generally has more than one words. To reduce the computational burden, we reduce the POS tag-set to 5 groups: noun, verb, adjective, adverb and others. Since in our HSCRFs we do not have to explicitly indicate which node is the beginning of a segment, the NP label set can be reduced further into NP for noun-phrase, and O for anything else. 0 10 20 30 40 50 60 70 80 90 50 60 70 80 90 100 110 portion of available labels average F1−score (%) activities sub−trajectories 10 3 80 82 84 86 88 90 92 number of training sentences F1−score SCRF HSCRF+POS HSCRF DCRF+POS DCRF Semi−CRF (a) (b) Figure 4: (a) Decoding accuracy of indoor activities as a function of available information on label/start/end time . (b) Performance of various models on Conll2000 noun phrase chunking. HSCRF+POS and DCRF+POS mean HSCRF and DCRF with POS given at test time, respectively. We build an HSCRF topology of 3 levels, where the root is just a dummy node, the second level has 2 NP states, and the bottom level has 5 POS states. For comparison, we implement a DCRF, a SCRF, and a semi-Markov CRF (Semi-CRF) [8]. The DCRF has grid structure of depth 2, one for modelling the NP process and another for the POS process. Since the state spaces are relatively small, we are able to run exact inference in the DCRF by collapsing both the NP and POS state spaces to a combined state space of size 3 × 5 = 15. The SCRF and Semi-CRF model only the NP process, taking the POS tags and words as input. We extract raw features from the text in the way similar to that in [10]. The features for SCRF and the Semi-CRF also include the POS tags. Words with less than 3 occurrences are not used. This reduces the vocabulary and the feature size significantly. We also make use of bi-grams with similar selection criteria. Furthermore, we use the contextual window of 5 instead of 7 as in [10]. This setting gives rise to about 32K raw features. The model feature is factorised as f(xc, z) = I(xc)gc(z), where I(xc) is a binary function on the assignment of the clique variables xc, and gc(z) are the raw features. Although both the HSCRF and the Semi-CRF are capable of modelling arbitrary segment durations, we use a simple exponential distribution (i.e. weighted features activated at each time step are added 3http://www.cnts.ua.ac.be/conll2000/chunking/ up) since it can be processed sequentially and thus is very efficient. For learning, we use a simple online stochastic gradient ascent method. At test time, since the SCRF and the Semi-CRF are able to use the POS tags as input, it is not fair for the DCRF and HSCRF to predict those labels during inference. Instead, we also give the POS tags to the DCRF and HSCRF and perform constrained inference to predict only the NP labels. This boosts the performance of the two multi-level models significantly. Let us look at the difference between the flat setting of SCRF and Semi-CRF and the the multilevel setting of DCRF and HSCRF. Let x = (xnp, xpos). Essentially, we are about to model the distribution Pr(x|z) = Pr(xnp|xpos, z) Pr(xpos|z) in the multi-level models while we ignore the Pr(xpos|z) in the flat models. During test time of the multi-level models, we predict only the xnp by finding the maximiser of Pr(xnp|xpos, z). The Pr(xpos|z) seems to be a waste because we do not make use of it at test time. However, Pr(xpos|z) does give extra information about the joint distribution Pr(x|z), that is, modelling the POS process may help to get smoother estimate of the NP distribution. The performance of these models is depicted in Figure 4b and we are interested in only the prediction of the noun-phrases since this data has POS tags. Without POS tags given at test time, both the HSCRF and the DCRF perform worse than the SCRF. This is not surprising because the POS tags are always given in the case of SCRF. However, with POS tags, the HSCRF consistently works better than all other models. 6 Discussion and Conclusions The HSCRFs presented here are not a standard graphical model since the clique structures are not predefined. The potentials are defined on-the-fly depending on the assignments of the ending indicators. Although the model topology is identical to that of shared structure HHMMs [1], the unrolled temporal representation is an undirected graph, and the model distribution is formulated in a discriminative way. Furthermore, the state persistence potentials capture duration information that is not available in the DBN representation of the HHMMs in [6]. Thus, the segmental nature of the HSCRF thus incorporates the recent semi-Markov CRF [8] as a special case [11]. Our HSCRF is related to the conditional probabilistic context-free grammar (C-PCFG) [9] in the same way that the HHMM is to the PCFG. However, the context-free grammar does not limit the depth of semantic hierarchy, thus making unnecessarily difficult to map many hierarchical problems into its form. Secondly, it lacks a graphical model representation, and thus does not enjoy the rich set of approximate inference techniques available in graphical models. References [1] H. H. Bui, D. Q. Phung, and S. Venkatesh. Hierarchical hidden Markov models with general state hierarchy. In AAAI, pages 324–329, San Jose, CA, Jul 2004. [2] S. Fine, Y. Singer, and N. Tishby. The hierarchical hidden Markov model: Analysis and applications. Machine Learning, 32(1):41–62, 1998. [3] T. Kristjannson, A. Culotta, P. Viola, and A. McCallum. Interactive information extraction with constrained conditional random fields. In AAAI, pages 412–418, San Jose, CA, 2004. [4] J. Lafferty, A. McCallum, and F. Pereira. Conditional random fields: Probabilistic models for segmenting and labeling sequence data. In ICML, pages 282–289, 2001. [5] L. Liao, D. Fox, and H. Kautz. Hierarchical conditional random fields for GPS-based activity recognition. In Proceedings of the International Symposium of Robotis Research (ISRR). Springer Verlag, 2005. [6] K. Murphy. Dynamic Bayesian Networks: Representation, Inference and Learning. PhD thesis, Computer Science Division, University of California, Berkeley, Jul 2002. [7] N. Nguyen, D. Phung, S. Venkatesh, and H. H. Bui. Learning and detecting activities from movement trajectories using the hierarchical hidden Markov models. In CVPR, volume 2, pages 955–960, Jun 2005. [8] S. Sarawagi and W. W. Cohen. Semi-Markov conditional random fields for information extraction. In NIPS. 2004. [9] C. Sutton. Conditional probabilistic context-free grammars. Master’s thesis, Uni. of Massachusetts, 2004. [10] C. Sutton, A. McCallum, and K. Rohanimanesh. Dynamic conditional random fields: Factorized probabilistic models for labeling and segmenting sequence data. JMLR, 8:693–723, Mar 2007. [11] T. T. Truyen, D. Q. Phung, H. H. Bui, and S. Venkatesh. Hierarchical semi-Markov conditional random fields for recursive sequential data. Technical report, Curtin University of Technology, http://www.computing.edu.au/˜trantt2/pubs/hcrf.pdf, 2008. [12] J. Verbeek and B. Triggs. Scene segmentation with CRFs learned from partially labeled images. In Advances in Neural Information Processing Systems 20, pages 1553–1560. MIT Press, 2008.
2008
181
3,433
A spatially varying two-sample recombinant coalescent, with applications to HIV escape response Alexander Braunstein Statistics Department University of Pennsylvania Wharton School Philadelphia, PA 19104 braunsf@wharton.upenn.edu Zhi Wei Computer Science Department New Jersey Institute of Technology Newark, NJ 07102 zhiwei@njit.edu Shane T. Jensen Statistics Department University of Pennsylvania Wharton School Philadelphia, PA 19104 stjensen@wharton.upenn.edu Jon D. McAuliffe Statistics Department University of Pennsylvania Wharton School Philadelphia, PA 19104 mcjon@wharton.upenn.edu Abstract Statistical evolutionary models provide an important mechanism for describing and understanding the escape response of a viral population under a particular therapy. We present a new hierarchical model that incorporates spatially varying mutation and recombination rates at the nucleotide level. It also maintains separate parameters for treatment and control groups, which allows us to estimate treatment effects explicitly. We use the model to investigate the sequence evolution of HIV populations exposed to a recently developed antisense gene therapy, as well as a more conventional drug therapy. The detection of biologically relevant and plausible signals in both therapy studies demonstrates the effectiveness of the method. 1 Introduction The human immunodeficiency virus (HIV) has one of the highest levels of genetic variability yet observed in nature. This variability stems from its unusual population dynamics: a high growth rate (∼10 billion new viral particles, or virions, per patient per day) combined with a replication cycle that involves frequent nucleotide mutations as well as recombination between different HIV genomes that have infected the same cell. The rapid evolution of HIV and other viruses gives rise to a so-called escape response when infected cells are subjected to therapy. Widespread availability of genome sequencing technology has had a profound effect on the study of viral escape response. Increasingly, virologists are gathering twosample data sets of viral genome sequences: a control sample contains genomes from a set of virions gathered before therapy, and a treatment sample consists of genomes from the post-therapeutic viral population. HIV treatment samples gathered just days after the start of therapy can exhibit a significant escape response. Up to now, statistical analyses of two-sample viral sequence data sets have been mainly rudimentary. As a representative example, [7] presents tabulated counts of mutation occurrences (relative to a reference wild-type sequence) in the control group and the treatment group, without attempting any statistical inference. 1 In this paper we develop a model which allows for a detailed quantification of the escape response present in a two-sample data set. The model incorporates mutation and recombination rate parameters which vary positionally along the viral genome, and which differ between the treatment and control samples. We present a reversible-jump MCMC procedure for approximate posterior inference of these parameters. The resulting posterior distribution suggests specific regions of the genome where the treatment sample’s evolutionary dynamics differ from the control’s: this is the putative escape response. Thus, the model permits an analysis that can point the way to improvements of current therapies and to the development of new therapeutic strategies for HIV and other viruses. In the remainder of the paper, we first provide the details of our statistical model and inference procedure. Then we illustrate the use of the model in two applications. The first study consists of a control sample of viral sequences obtained from HIV-infected individuals before a drug treatment, and a corresponding post-treatment sample [9]. The second study set is an in vitro investigation of a new gene therapy for HIV; it contains a control sample of untreated virions and a treatment sample of virions challenged with the therapy [7]. 2 Methods We begin by briefly describing the standard statistical genetics framework for populations evolving under mutation and recombination. Then we present a new Bayesian hierarchical model for two groups of sequences, each group sampled from one of two related populations. We derive an MCMC procedure for approximate posterior inference in the model; this procedure is implemented in the program PICOMAP. Our approach involves modifications and generalizations of the OMEGAMAP method [12], as we explain. In what follows, each “individual” in a population is a sequence of L nucleotides (plus a gap symbol, used when sequences have insertions or deletions relative to each other). The positions along a sequence are called sites. An alignment is a matrix in which rows are sequences, columns are sites, and the (i, j)th entry is individual i’s nucleotide at site j. 2.1 The coalescent with recombination The genome sequences in the control sample were drawn at random from a large population of sequences at a fixed point in time. We approximate the evolution of this population using the WrightFisher evolutionary model with recombination [3]. Similarly, the treatment sample sequences are viewed as randomly drawn from a Wright-Fisher recombining population, but governed by different evolutionary parameters. In the basic Wright-Fisher model without recombination, a fixed-size population evolves in discrete, nonoverlapping generations. Each sequence in the gth generation is determined by randomly choosing a sequence from the (g −1)th generation, mutating it at one position with probability u, and leaving it unchanged with probability 1 −u. Typically, many individuals in each generation share a parent from the previous generation. A key insight in statistical population genetics, due to Kingman [5], is the following. If we have a small sample from a large Wright-Fisher population at a fixed time, and we want to do calculations involving the probability distribution over the sample’s unknown ancestral history, it is highly uneconomical to “work forwards” from older generations – most individuals will not be part of the sample’s genealogy. Instead, we should follow the lineages of the sampled individuals backwards in time as they repeatedly coalesce at common ancestors, forming a tree rooted at the most recent common ancestor (MRCA) of the sample. Kingman showed that the continuous-time limit of the Wright-Fisher model induces a simple distribution, called the coalescent process, on the topology and branch lengths of the resulting tree. Mutation events in the coalescent can be viewed as a separate point process marking locations on the branches of a given coalescent tree. This point process is independent of the tree-generating coalescent process. Recombination, however, substantially complicates matters. The Wright-Fisher dynamics are extended to model recombination as follows. Choose one “paternal” and one “maternal” sequence from generation (g −1). With probability r, their child sequence in generation g is a recombinant: a juncture between two adjacent sites is chosen uniformly at random, and the child is formed by joining the paternal sequence to the left of the juncture with the maternal sequence to the right. With probability (1 −r), the child is a copy of just one of the two parents, possibly mutated as above. 2 Now look backwards in time at the ancestors of a sample: we find both coalescence events, where two sequences merge into a common ancestor, and recombination events, where a single sequence splits into the two parent sequences that formed it. Thus the genealogy is not a tree but a graph, the ancestral recombination graph (ARG). The continuous-time limit of the Wright-Fisher model with recombination induces a distribution over ARGs called the recombinant coalescent [4, 2]. In fact, the ARG is the union of L coalescent trees. A single site is never split by recombination, so we can follow that site in the sample backwards in time through coalescence events to its MRCA. But recombination causes the sample to have a possibly different ancestral tree (and different MRCA) at each site. The higher the rate of recombination (corresponding to the parameter r), the more often the tree changes along the alignment. For this reason, methods that estimate a fixed, global phylogeny are badly biased in samples from highly recombinant populations, like viruses [10]. The Wright-Fisher assumptions appear quite stylized. But experience has shown that the coalescent and the recombinant coalescent can give reasonable results when applied to samples from populations not matching the Wright-Fisher model, such as populations of increasing size [3]. 2.2 A two-sample hierarchical recombinant coalescent We now present the components of our new hierarchical model for a control sample and a treatment sample of nucleotide sequences drawn from two recombining populations. To our knowledge, this is the first fully specified probabilistic model for such data. There are four parameter vectors of primary interest in the model: a control-population mutation rate µC which varies along the sequence, a corresponding spatially varying treatment-population vector µT, and analogous recombination rate parameter vectors ρC and ρT. (The µ and ρ here correspond to the u and r mentioned above.) The prior distribution on µC and µT takes the following hierarchical form: (Bµ, Sµ) | qµ ∼Blocks(qµ) , (1) log µi | µ0, σ2 µ0 ∼N(log µ0, σ2 µ0), i = 1, . . . , Bµ, (2) (log µC i , log µT i ) | µi, σ2 µ iid∼N(log µi, σ2 µ), i = i, . . . , Bµ . (3) This prior is designed to give µC and µT a block structure: the Blocks distribution divides the L sequence positions into Bµ adjacent subsequences, with the index of each subsequence’s rightmost site given by Sµ = (S1 µ, . . . , SBµ µ ), 1 ≤S1 µ < · · · ≤SBµ µ ≤L. Under the Blocks distribution, (Bµ −1) is a Bin(L −1, qµ) random variable, and given Bµ, the indexes Sµ are a simple random sample without replacement from {1, . . . , L}. The sites in the ith block all mutate at the same rate µC i (in the control population) or µT i (in the treatment population). We lose no generality in sharing the same block structure between the populations: two separate block structures can be replaced with a single block structure formed from the union of their Sµ’s. To generate the per-population mutation rates within a block, we first draw a lognormally distributed variable µi, which then furnishes the mean for the independent lognormal variables µC i and µT i . The triples (µi, µC i , µT i ) are mutually independent across blocks i = 1, . . . , Bµ. The recombination rate parameters (ρC, ρT) are independent of (µC, µT) and have the same form of prior distribution (1)–(3), mutatis mutandis. In our empirical analyses, we set the hyperparameters qµ and qρ to get prior means of 20 to 50 blocks; results were not sensitive to these settings. We put simple parametric distributions on the hyperparameters µ0, σ2 µ0, σ2 µ, and their ρ analogs, and included them in the sampling procedure. The remaining component of the model is the likelihood of the two observed samples. Let HC be the alignment of control-sample sequences and HT the treatment-sample sequence alignment. Conditional on all parameters, HC and HT are independent. Focus for a moment on HC. Since we wish to view it as a sample from a Wright-Fisher recombining population, its likelihood corresponds to the probability, under the coalescent-with-recombination distribution, of the set of all ARGs that could have generated HC. However, using the nucleotide mutation model described below, even Monte Carlo approximation of this probability is computationally intractable [12]. So instead we approximate the true likelihood with a distribution called the “product of approximate conditionals,” or PAC [6]. PAC orders the K sequences in HC arbitrarily, then approximates their probability as the product of probabilities from K hidden Markov models. The kth HMM evaluates 3 the probability that sequence k was produced by mutating and recombining sequences 1 through k −1. We thus obtain the final components of our hierarchical model: HC | µC, ρC, η ∼PAC(µC, ρC, η) , (4) HT | µT, ρT, η ∼PAC(µT, ρT, η) . (5) In order to apply PAC, we must specify a nucleotide substitution model, that is, the probability that a nucleotide i mutates to a nucleotide j over evolutionary distance t. In the above, η parametrizes this model. For our analyses, we employed the well-known Felsenstein substitution model, augmented with a fifth symbol to represent gaps [8]. For simplicity, we constructed fixed empirical estimates of the Felsenstein parameters η, in a standard way. To incorporate the extended Felsenstein model in PAC, it is necessary to integrate evolutionary distance out of the substitution process p(j | i, 2t), using the exponential distribution induced by the coalescent on the evolutionary distance 2t between pairs of sampled individuals. It can be shown that the required quantity is p(j | i) = Z p(j | i, 2t)p(t) dt =  1 − k k + 2β  πj +  k k + 2(α1[i ̸= gap] + β)  1[i = j] +  k k + 2β − k k + 2(α + β)   πj πi + πj  1[(i, j) ∈{(A, G), (C, T)}] . (6) Here k is the number of sampled individuals, and πi, πj, α, and β are Felsenstein model parameters (the last two depending on the mutation rate at the site in question). 1[·] is the indicator function of the predicate in brackets. The blocking prior (1) and the use of PAC with spatially varying parameters are ideas drawn from OMEGAMAP [12]. But our approach differs in two significant respects. First, OMEGAMAP models codons (the protein sequence encoded by nucleotides), not the nucleotides themselves. This is sometimes unsuitable. For example, in one of our empirical analyses, the treatment population receives RNA antisense gene therapy. The target of this therapy is the primary HIV genome sequence itself, not its protein products. So we would expect the escape response to manifest at the nucleotide level, in the targeted region of the genome. Our model can capture this. Second, we perform simultaneous hierarchical inference about the control and treatment sample, which encourages the parameter estimates to differ between the samples only where strongly justified by the data. Using a one-sample tool like OMEGAMAP on each sample in isolation would tend to increase the number of artifactual differences between corresponding parameters in each sample. 2.3 Inference The posterior distribution of the parameters in our model cannot be calculated analytically. We therefore employ a reversible-jump Metropolis-within-Gibbs sampling strategy to construct an approximate posterior. In such an approach, sets of parameters are iteratively sampled from their posterior conditional distributions, given the current values of all other parameters. Because the Blocks prior generates mutation and recombination parameters with piecewise-constant profiles along the sequence, we call our sampler implementation PICOMAP. The sampler uses Metropolis-Hastings updates for the numerical values of parameters, and reversible-jump updates [1] to explore the blocking structures (Bµ, Sµ) and (Bρ, Sρ). The block updates consider extending a block to the left or right, merging two adjacent blocks, and splitting a block. They are similar to the updates (B2)-(B4) of [12], so we omit the details. To illustrate one of the parameter updates within a block, let (µC i , µT i ) be the current values of the control and treatment mutation rates in block i. We sample proposal values log ˜µC i ∼N(log µC i , τ 2) , (7) log ˜µT i ∼N(log µT i , τ 2) , (8) 4 Figure 1: Posterior estimate of the effect of enfuvirtide drug therapy on mutation rates. Blue line is posterior mean, Black lines are 95% highest-posterior-density (HPD) intervals. where τ 2 is a manually configured tuning parameter for the proposal distribution. These proposals are accepted with probability p(HC | ˜µC i , θ) p(HT | ˜µT i , θ) p(HC | µC i , θ) p(HT | µT i , θ) · p(˜µC i , ˜µT i | µi) p(µC i , µT i | µi) , (9) where p(˜µC i , ˜µT i | µi) p(µC i , µT i | µi) = µT i µC i ˜µT i ˜µC i exp {−((log ˜µT i −log µi)2 + (log ˜µC i −log µi)2)/2σ2} exp {−((log µT i −log µi)2 + (log µC i −log µi)2)/2σ2} . (10) Here θ denotes the current values of all other model parameters. Notice that symmetry in the proposal distribution causes that part of the MH acceptance ratio to cancel. The PICOMAP sampler involves a number of other update formulas, which we do not describe here due to space constraints. 3 Results In this section, we apply the PICOMAP methodology to HIV sequence data from two different studies. In the first study, several HIV-infected patients were exposed to a drug-based therapy. In the second study, the HIV virus was exposed in vitro to a novel antisense gene therapy. In both cases, our analysis extracts biologically relevant features of the evolutionary response of HIV to these therapeutic challenges. For each study we ran at least 8 chains to monitor convergence of the sampler. The chains converged without exception and were thinned accordingly, then combined for analysis. In the interest of brevity, we include only plots of the posterior treatment-effect estimates for both mutation and recombination rates. 3.1 Drug therapy study In this study, five patients had blood samples taken both before and after treatment with the drug enfuvirtide, also known as Fuzeon or T-20 [11]. Sequences of the Envelope (Env) region of the HIV genome were generated from each of these blood samples. Pooling across these patients, we have 28 pre-exposure Env sequences which we label as the control sample, and 29 post-exposure Env sequences which we label as the treatment sample. We quantify the treatment effect of exposure 5 Figure 2: Posterior estimate of the effect of enfuvirtide drug therapy on recombination rates. Blue line is posterior mean, Black lines are 95% HPD intervals. to the drug by calculating the posterior mean and 95% highest-posterior-density (HPD) intervals of the difference in recombination rates ρT −ρC and mutation rates µT −µC at each position of the genomic sequence. The very existence in the patient of a post-exposure HIV population indicates the evolution of sequence changes that have conferred resistance to the action of the drug enfuvirtide. In fact, resistance-conferring mutations are known a priori to occur at nucleotide locations 1639-1668 in the Env sequence. Figure 1 shows the posterior estimate of the treatment effect on mutation rates over the length of the Env sequence. From nucleotide positions 1590-1700, the entire 95% HPD interval of the mutation rate treatment effect is above zero, which suggests our model is able to detect elevated levels of mutation in the resistance-conferring region, among individuals in the treatment sample. Another preliminary observation from this study was that both the pre-exposure and post-exposure sequences are mixtures of several different HIV subtypes. Subtype identity is specified by the V3 loop subsequence of the Env sequence, which corresponds to nucleotide positions 887-995. Since it is unlikely that resistance-conferring mutations developed independently in each subtype, we suspect that the resistance-conferring mutations were passed to the different subtypes via recombination. Recombination is the primary means by which drug resistance is transferred in vivo between strains of HIV, so recombination at these locations involving drug resistant strains would allow successful transfer of the resistance-conferring mutations between types of HIV. Figure 2 shows the spatial posterior estimate of the treatment effect on recombination. We see two areas of increased recombination, one from nucleotide positions 1020-1170 and another from nucleotide positions 1900-2200. As an interesting side note, we see a marked decrease in mutation and recombination in the V3 loop that determines sequence specificity. 3.2 Antisense gene therapy study In the VIRxSYS antisense gene therapy study, we have two populations of wild type HIV in vitro. The samples consist of 19 Env sequences from a control HIV population that was allowed to evolve neutrally in cell culture, along with 48 Env sequences sampled from an HIV population evolving in cell cultures that were transfected with the VIRxSYS antisense vector [7]. The antisense gene therapy vector targets nucleotide positions 1325 - 2249. Unlike drug therapy treatments, whose effect can be nullified by just one or two well placed mutations, a relatively large number of mutations are required to escape the effects of antisense gene therapy. We again quantify the treatment effect of exposure to the antisense vector by calculating the posterior mean and 95% HPD interval of the 6 Figure 3: Posterior estimate of the effect of VIRxSYS antisense gene therapy on mutation rates. Blue line is posterior mean, Black lines are 95% HPD intervals. difference in recombination rates ρT −ρC and mutation rates µT −µC at each position of the Env sequence. Figures 3 and 4 show the posterior estimate of the treatment’s effect on mutation and recombination, respectively. The most striking feature of the plots is the area of significantly elevated mutation in the treatment sequences. The leftmost region of the highest plateau corresponds to nucleotide position 1325, the 5’ boundary of the antisense target region. This area of heightened mutation overlaps with the target region for around 425 nucleotides in the 3’ direction. We see fewer differences in the recombination rate, suggesting that mutation is the primary mechanism of evolutionary response to the antisense vector. In fact, we estimate lower recombination rates in the target region of the treatment sequences relative to the control sequences. 4 Discussion We have introduced a hierarchical model for the estimation of evolutionary escape response in a population exposed to therapeutic challenge. The escape response is quantified by mutation and recombination rate parameters. Our method allows for spatial heterogeneity in these mutation and recombination rates. It estimates differences between treatment and control sample parameters, with parameter values encouraged to be similar between the two populations except where the data suggests otherwise. We applied our procedure to sequence data from two different HIV therapy studies, detecting evolutionary responses in both studies that are of biological interest and may be relevant to the design of future HIV treatments. Although virological problems motivated the creation of our model, it applies more generally to twosample data sets of nucleic acid sequences drawn from any population. The model is particularly relevant for populations in which the recombination rate is a substantial fraction of the mutation rate, since simpler models which ignore recombination can produce seriously misleading results. Acknowledgements This research was supported by a grant from the University of Pennsylvania Center for AIDS Research. Thanks to Neelanjana Ray, Jessamina Harrison, Robert Doms, Matthew Stephens and Gwen Binder for helpful discussions. 7 Figure 4: Posterior estimate of the effect of VIRxSYS antisense gene therapy on recombination rates. Blue line is posterior mean, Black lines are 95% HPD intervals. References [1] P. J. Green. Reversible jump Markov chain Monte Carlo computation and Bayesian model determination. Biometrika, 82:711–731, 1995. [2] R. C. Griffiths and P. Marjoram. An ancestral recombination graph. In Progress in Population Genetics and Human Evolution, pages 257–270. Springer Verlag, 1997. [3] J. Hein, M. Schierup, and C. Wiuf. Gene Genealogies, Variation and Evolution: A Primer in Coalescent Theory. Oxford University Press, 2005. [4] R. R. Hudson. Properties of a neutral allele model with intragenic recombination. Theoretical Population Biology, 23:183–201, 1983. [5] J. F. C. Kingman. The coalescent. Stochastic Processes and Their Applications, 13:235–248, 1982. [6] N. Li and M. Stephens. Modeling linkage disequilibrium and identifying recombination hotspots using single-nucleotide polymorphism data. Genetics, 165:2213–2233, December 2003. [7] X. Lu, Q. Yu, G. Binder, Z. Chen, T. Slepushkina, J. Rossi, and B. Dropulic. Antisensemediated inhibition of human immunodeficiency virus (HIV) replication by use of an HIV type 1-based vector results in severely attenuated mutants incapable of developing resistance. Journal of Virology, 78:7079–7088, 2004. [8] G. McGuire, M. Denham, and D. Balding. Models of sequence evolution for DNA sequences containing gaps. Molecular Biology and Evolution, 18(4):481–490, 2001. [9] N. Ray, J. Harrison, L. Blackburn, J. Martin, S. Deeks, and R. Doms. Clinical resistance to enfuvirtide does not affect susceptibility of human immunodeficiency virus type 1 to other classes of entry inhibitors. Journal of Virology, 81:3240–3250, 2007. [10] M. H. Schierup and J. Hein. Consequences of recombination on traditional phylogenetic analysis. Genetics, 156:879–891, 2000. [11] C. Wild, T. Greenwell, and T. Matthews. A synthetic peptide from HIV-1 gp41 is a potent inhibitor of virus mediated cell-cell fusion. AIDS Research and Human Retroviruses, 9:1051– 1053, 1993. [12] D. Wilson and G. McVean. Estimating diversifying selection and functional constraint in the presence of recombination. Genetics, 172:1411–1425, 2006. 8
2008
182
3,434
Measures of Clustering Quality: A Working Set of Axioms for Clustering Margareta Ackerman and Shai Ben-David School of Computer Science University of Waterloo, Canada Abstract Aiming towards the development of a general clustering theory, we discuss abstract axiomatization for clustering. In this respect, we follow up on the work of Kleinberg, ([1]) that showed an impossibility result for such axiomatization. We argue that an impossibility result is not an inherent feature of clustering, but rather, to a large extent, it is an artifact of the specific formalism used in [1]. As opposed to previous work focusing on clustering functions, we propose to address clustering quality measures as the object to be axiomatized. We show that principles like those formulated in Kleinberg’s axioms can be readily expressed in the latter framework without leading to inconsistency. A clustering-quality measure (CQM) is a function that, given a data set and its partition into clusters, returns a non-negative real number representing how strong or conclusive the clustering is. We analyze what clustering-quality measures should look like and introduce a set of requirements (axioms) for such measures. Our axioms capture the principles expressed by Kleinberg’s axioms while retaining consistency. We propose several natural clustering quality measures, all satisfying the proposed axioms. In addition, we analyze the computational complexity of evaluating the quality of a given clustering and show that, for the proposed CQMs, it can be computed in polynomial time. 1 Introduction In his highly influential paper, [1], Kleinberg advocates the development of a theory of clustering that will be “independent of any particular algorithm, objective function, or generative data model.” As a step in that direction, Kleinberg sets up a set of “axioms” aimed to define what a clustering function is. Kleinberg suggests three axioms, each sounding plausible, and shows that these seemingly natural axioms lead to a contradiction - there exists no function that satisfies all three requirements. Kleinberg’s result is often interpreted as stating the impossibility of defining what clustering is, or even of developing a general theory of clustering. We disagree with this view. In this paper we show that the impossibility result is, to a large extent, due to the specific formalism used by Kleinberg rather than being an inherent feature of clustering. Rather than attempting to define what a clustering function is, and demonstrating a failed attempt, as [1] does, we turn our attention to the closely related issue of evaluating the quality of a given data clustering. In this paper we develop a formalism and a consistent axiomatization of that latter notion. As it turns out, the clustering-quality framework is richer and more flexible than that of clustering functions. In particular, it allows the postulation of axioms that capture the features that Kleinberg’s axioms aim to express, without leading to a contradiction. 1 A clustering-quality measure is a function that maps pairs of the form (dataset, clustering) to some ordered set (say, the set of non-negative real numbers), so that these values reflect how ‘good’ or ‘cogent’ that clustering is. Measures for the quality of a clusterings are of interest not only as a vehicle for axiomatizing clustering. The need to measure the quality of a given data clustering arises naturally in many clustering issues. The aim of clustering is to uncover meaningful groups in data. However, not any arbitrary partitioning of a given data set reflects such a structure. Upon obtaining a clustering, usually via some algorithm, a user needs to determine whether this clustering is sufficiently meaningful to rely upon for further data mining analysis or practical applications. Clustering-quality measures (CQMs) aim to answer that need by quantifying how good is any specific clustering. Clustering-quality measures may also be used to help in clustering model-selection by comparing different clusterings over the same data set (e.g., comparing the results of a given clustering paradigm over different choices of clustering parameters, such as the number of clusters). When posed with the problem of finding a clustering-quality measure, a first attempt may be to invoke the loss (or objective) function used by a clustering algorithm, such as k-means or k-median, as a clustering-quality measure. However, such measures have some shortcomings for the purpose at hand. Namely, these measures are usually not scale-invariant, and they cannot be used to compare the quality of clusterings obtained by different algorithms aiming to minimize different clustering costs (e.g., k-means with different values of k). See Section 6 for more details. Clustering quality has been previously discussed in the applied statistics literature, where a variety of techniques for evaluating ‘cluster validity’ were proposed. Many of these methods, such as the external criteria discussed in [2], are based on assuming some predetermined data generative model, and as such do not answer our quest for a general theory of clustering. In this work, we are concerned with quality measures regardless of any specific generative model, for examples, see the internal criteria surveyed in [2]. We formulate a theoretical basis for clustering-quality evaluations. We propose a set of requirements (‘axioms’) of clustering-quality measures. We demonstrate the relevance and consistency of these axioms by showing that several natural notions satisfy these requirements. In particular, we introduce quality-measures that reflect the underlying intuition of center-based and linkage-based clustering. These notions all satisfy our axioms, and, given a data clustering, their value on that clustering can be computed in polynomial time. Paper outline: we begin by presenting Kleinberg’s axioms for clustering functions and discuss their failure. In Section 4.3 we show how these axioms can be translated into axioms pertaining clustering quality measures, and prove that the resulting set of axioms is consistent. In Section 4, we discuss desired properties of an axiomatization and propose an accordingly revised set of axioms. Next, in Section 5 we present several clustering-quality measures, and claim that they all satisfy our axioms. Finally, in Section 5.3, we show that the quality of a clustering can be computed in polynomial time with respect to our proposed clustering-quality measures. 2 Definitions and Notation Let X be some domain set (usually finite). A function d : X × X →R is a distance function over X if d(xi, xi) ≥0 for all xi ∈X, for any xi, xj ∈X, d(xi, xj) > 0 if and only if xi ̸= xj, and d(xi, xj) = d(xj, xi) otherwise. Note that we do not require the triangle inequality. A k-clustering of X is a k-partition, C = {C1, C2, . . . , Ck}. That is, Ci ∩Cj = ∅for i ̸= j and ∪k i=1Ci = X. A clustering of X is a k-clustering of X for some k ≥1. A clustering is trivial if each of its clusters contains just one point, or if it consists of just one cluster. For x, y ∈X and clustering C of X, we write x ∼C y whenever x and y are in the same cluster of clustering C and x ̸∼C y, otherwise. A clustering function for some domain set X is a function that takes a distance function d over X, and outputs a clustering of X. 2 A clustering-quality measure (CQM) is a function that is given a clustering C over (X, d) (where d is a distance function over X) and returns a non-negative real number, as well as satisfies some additional requirements. In this work we explore the question of what these requirements should be. 3 Kleinberg’s Axioms Kleinberg, [1], proposes the following three axioms for clustering functions. These axioms are intended to capture the meaning of clustering by determining which functions (from a domain set endowed with a distance function) are worthy of being considered clustering functions and which are not. Kleinberg shows that the set is inconsistent - there exist no functions that satisfies all three axioms. The first two axioms require invariance of the clustering that f defines under some changes of the input distance function. Function Scale Invariance: Scale invariance requires that the output of a clustering function be invariant to uniform scaling of the input. A function f is scale-invariant if for every distance function d and positive λ, f(d) = f(λd) (where λd is defined by setting, for every pair of domain points x, y, λd(x, y) = λ · d(x, y)). Function Consistency: Consistency requires that if within-cluster distances are decreased, and between-cluster distances are increased, then the output of a clustering function does not change. Formally, • Given a clustering C over (X, d), a distance function d′ is a C-consistent variant of d, if d′(x, y) ≤d(x, y) for all x ∼C y, and d′(x, y) ≥d(x, y) for all x ̸∼C y. • A function f is consistent if f(d) = f(d′) whenever d′ is an f(d)-consistent variant of d. Function Richness: Richness requires that by modifying the distance function, any partition of the underlying data set can be obtained. A function f is rich if for each partitioning, C, of X, there exists a distance function d over X so that f(d) = C. Theorem 1 (Kleinberg, [1]) There exists no clustering function that simultaneously satisfies scale invariance, consistency and richness. Discussion: The intuition behind these axioms is rather clear. Let us consider, for example, the Consistency requirement. It seems reasonable that by pulling closer points that are in the same cluster and pushing further apart points in different clusters, our confidence in the given clustering will only rise. However, while this intuition can be readily formulated in terms of clustering quality (namely, “changes as these should not decrease the quality of a clustering”), the formulation through clustering functions says more. It actually requires that such changes to the underlying distance function should not create any new contenders for the best-clustering of the data. For example, consider Figure 1, where we illustrate a good 6-clustering. On the right hand-side, we show a consistent change of this 6-clustering. Notice that the resulting data has a 3-clustering that is reasonably better than the original 6-clustering. While one may argue that the quality of the original 6-clustering has not decreased as a result of the distance changes, the quality of the 3-clustering has improved beyond that of the 6-clustering. This illustrates a significant weakness of the consistency axiom for clustering functions. The implicit requirement that the original clustering remains the best clustering following a consistent change is at the heart of Kleinberg’s impossibility result. As we shall see below, once we relax that extra requirement the axioms are no longer unsatisfiable. 4 Axioms of Clustering-Quality Measures In this section we change the primitive that is being defined by the axioms from clustering functions to clustering-quality measures (CQM). We reformulate the above three axioms in terms of CQMs 3 Figure 1: A consistent change of a 6-clustering. and show that this revised formulation is not only consistent, but is also satisfied by a number of natural clustering quality measures. In addition, we extend the set of axioms by adding another axiom (of clustering-quality measures) that is required to rule out some measures that should not be counted as CQMs. 4.1 Clustering-Quality Measure Analogues to Kleinberg’s Axioms The translation of the Scale Invariance axiom to the CQM terminology is straightforward: Definition 1 (Scale Invariance) A quality measure m satisfies scale invariance if for every clustering C of (X, d), and every positive λ, m(C, X, d) = m(C, X, λd). The translation of the Consistency axiom is the place where the resulting CQM formulation is indeed weaker than the original axiom for functions. While it clearly captures the intuition that consistent changes to d should not hurt the quality of a given partition, it allows the possibility that, as a result of such a change, some partitions will improve more than others1. Definition 2 (Consistency) A quality measure m satisfies consistency if for every clustering C over (X, d), whenever d′ is a C consistent variant of d, then m(C, X, d′) ≥m(C, X, d). Definition 3 (Richness) A quality measure m satisfies richness if for each non-trivial clustering C of X, there exists a distance function d over X such that C = Argmax{m(C, X, d)}. Theorem 2 Consistency, scale invariance, and richness for clustering-quality measures form a consistent set of requirements. Proof: To show that scale-invariance, consistency, and richness form a consistent set of axioms, we present a clustering quality measure that satisfies the three axioms. This measure captures a quality that is intuitive for center-based clusterings. In Section 5, we introduce more quality measures that capture the goal of other types of clusterings. All of these CQM’s satisfy the above three axioms. For each point in the data set, consider the ratio of the distance from the point to its closest center to the distance from the point to its second closest center. Intuitively, the smaller this ratio is, the better the clustering (points are ‘more confident’ about their cluster membership). We use the average of this ratio as a quality measure. Definition 4 (Relative Point Margin) The K-Relative Point Margin of x ∈X is K-RMX,d(x) = d(x,cx) d(x,cx′), where cx ∈K is the closest center to x, cx′ ∈K is a second closest center to x, and K ⊆X. 1The following formalization assumes that larger values of m indicate better clustering quality. For some quality measures, smaller values indicate better clustering quality - in which case we reverse the direction of inequalities for consistency and use Argmin instead of Argmax for richness. 4 A set K is a representative set of a clustering C if it consists of exactly one point from each cluster of C. Definition 5 (Representative Set) A set K is a representative set of clustering C = {C1, C2, . . . , Ck} if |K| = k and for all i, K ∩Ci ̸= ∅. Definition 6 (Relative Margin) The Relative Margin of a clustering C over (X, d) is RMX,d(C) = min K is a representative set of C avgx∈X\KK-RMX,d(x). Smaller values of Relative Margin indicate better clustering quality. Lemma 1 Relative Margin is scale-invariant. proof: Let C be a clustering of (X, d). Let d′ be a distance function so that d′(x, y) = αd(x, y) for all x, y ∈X and some α ∈R+. Then for any points x, y, z ∈X, d(x,y) d(x,z) = d′(x,y) d′(x,z). Note also that scaling does not change the centers selected by Relative Margin. Therefore, RMX,d′(C) = RMX,d(C). Lemma 2 Relative Margin is consistent. proof: Let C be a clustering of distance function (X, d). Let d′ be a C consistent variant of d. Then for x ∼C y, d′(x, y) ≤d(x, y) and for x ̸∼C y, d′(x, y) ≥d(x, y). Therefore, RMX,d′(C) ≤ RMX,d(C). Lemma 3 Relative Margin is rich. proof: Given a non-trivial clustering C over a data set X, consider the distance function d where d(x, y) = 1 for all x ∼C y, and d(x, y) = 10 for all x ̸∼C y. Then C = Argmin{m(C, X, d)}. It follows that scale-invariance, consistency, and richness are consistent axioms. 4.2 Soundness and Completeness of Axioms What should a set of “axioms for clustering” satisfy? Usually, when a set of axioms is proposed for some semantic notion (or a class of objects, say clustering functions), the aim is to have both soundness and completeness. Soundness means that every element of the described class satisfies all axioms (so, in particular, soundness implies consistency of the axioms), and completeness means that every property shared by all objects of the class is implied by the axioms. Intuitively, ignoring logic subtleties, a set of axioms is complete for a class of objects if any element outside that class fails at least one of these axioms. In our context, there is a major difficulty - there exist no semantic definition of what clustering is. We wish to use the axioms as a definition of clustering functions, but then what is the meaning of soundness and completeness? We have to settle for less. While we do not have a clear definition of what is clustering and what is not, we do have some examples of functions that should be considered clustering functions, and we can come up with some examples of partitionings that are clearly not worthy of being called “clustering”. We replace soundness by the requirement that all of our axioms are satisfied by all these examples of common clustering functions (relaxed soundness), and we want that partitioning functions that are clearly not clusterings fail at least one of our axioms (relaxed completeness). In this respect, the axioms of [1] badly fail (the relaxed version of) soundness. For each of these axioms there are natural clustering functions that fail to satisfy it (this is implied by Kleinberg’s demonstration that any pair of axioms is satisfied by a natural clustering, while the three together never hold). We argue that our scale invariance, consistency, and richness, are sound for the class of CQMs. However, they do not make a complete set of axioms, even in our relaxed sense. There are functions that should not be considered “reasonable clustering quality measures” and yet they satisfy these three axioms. One type of “non-clustering-functions” are functions that make cluster membership decisions based on the identity of domain points. For example, the function that returns 5 the Relative Margin of a data set whenever some specific pair of data points belong to the same cluster, and twice the Relative Margin of the data set otherwise. We overcome this problem by introducing a new axiom. 4.3 Isomorphism Invariance This axiom resembles the permutation invariance objective function axiom by Puzicha et al. [3], modeling the requirement that clustering should be indifferent to the individual identity of clustered elements. This axiom of clustering-quality measures does not have a corresponding Kleinberg axiom. Definition 7 (Clustering Isomorphism) Two clusterings C and C′ over the same domain, (X, d), are isomorphic, denoted C ≈d C′, if there exists a distance-preserving isomorphism φ : X →X, such that for all x, y ∈X, x ∼C y if and only if φ(x) ∼C′ φ(y). Definition 8 (Isomorphism Invariance) A quality measure m is isomorphism -invariant if for all clusterings C, C′ over (X, d) where C ≈d C′, m(C, X, d) = m(C′, X, d). Theorem 3 The set of axioms consisting of Isomorphism Invariance, Scale Invariance, Consistency, and Richness, (all in their CQM formulation) is a consistent set of axioms. Proof: Just note that the Relative Margin quality measure satisfies all four axioms. As mentioned in the above discussion, to have a satisfactory axiom system, for any notion, one needs to require more than just consistency. To be worthy of being labeled ‘axioms’, the requirements we propose should be satisfied by any reasonable notion of CQM. Of course, since we cannot define what CQMs are “reasonable”, we cannot turn this into a formal statement. What we can do, however, is demonstrate that a variety of natural CQMs do satisfy all our axioms. This is done in the next section. 5 Examples of Clustering Quality Measures In a survey of validity measures, Milligan [2] discusses examples of quality measures that satisfy our axioms (namely, scale-invariance, consistency, richness, and perturbation invariance). We have verified that the best performing internal criteria examined in [2], satisfy all our axioms. In this section, we introduce two novel QCMs; a measure that reflects the underlying intuition of linkage-based clustering, and a measure for center-based clustering. In addition to satisfying the axioms, given a clustering, these measures can computed in polynomial time. 5.1 Weakest Link In linkage-based clustering, whenever a pair of points share the same cluster they are connected via a tight chain of points in that cluster. The weakest link quality measure focuses on the longest link in such a chain. Definition 9 (Weakest Link Between Points) C-WLX,d(x, y) = min x1,x2,...,xℓ∈Ci(max(d(x, x1), d(x1, x2), . . . , d(xℓ, y))), where C is a clustering over (X, d) and Ci is a cluster in C. The weakest link of C is the maximal value of C-WLX,d(x, y) over all pairs of points belonging to the same cluster, divided by the shortest between-cluster distance. Definition 10 (Weakest Link of C) The Weakest Link of a clustering C over (X, d) is WL(C) = maxx∼Cy C-WLX,d(x, y) minx̸∼Cy d(x, y) . The range of values of weakest link is (0, ∞). 6 5.2 Additive Margin In Section 4.3, we introduced Relative Margin, a quality measure for center-based clustering. We now introduce another quality measure for center-based clustering. Instead of looking at ratios, Additive Margin evaluates differences. Definition 11 (Additive Point Margin) The K-Additive Point Margin of x is K-AMX,d(x) = d(x, cx′) −d(x, cx), where cx ∈K is the closest center to x, cx′ ∈K is a second closest center to x, and K ⊆X. The Additive Margin of a clustering is the average Additive Point Margin, divided by the average within-cluster distance. The normalization is necessary for scale invariance. Definition 12 (Additive Margin) The Additive Margin of a center-based clustering C over (X, d) is AMX,d(C) = min K is a representative set of C 1 |X| P x∈X K-AMX,d(x) 1 |{{x,y}⊆X|x∼Cy}| P x∼Cy d(x, y). Unlike Relative Margin, Additive Margin gives higher values to better clusterings. 5.3 Computational complexity For a clustering-quality measure to be useful, it is important to be able to quickly compute the quality of a clustering using that measure. The quality of a clustering using the measures presented in this paper can be computed in polynomial time in terms of n (the number of points in the data set). Using relative or Additive Margin, it takes O(nk+1) operations to compute the clustering quality of a data set, which is exponential in k. If a set of centers is given, the Relative Margin can be computed in O(nk) operations and the Additive Margin can be computed in O(n2) operations. The weakest link of a clustering can be computed in O(n3) operations. 5.4 Variants of quality measures Given a clustering-quality measure, we can construct new quality measures with different characteristics by applying the quality measure on a subset of clusters. It suffices to consider a quality measure m that is defined for clusterings consisting of 2 clusters. Given such measure, we can create new quality measures. For example, mmin(C, X, d) = min S⊆C,|S|=2 m(S, X, d), measures the worst quality of a pair of clusters in C. Alternately, we can define, mmax(C, X, d) and mavg(C, X, d), which evaluate the best or average quality of a pair of clusters in C. A nice feature of these variations is that if m satisfies the four axioms of clustering-quality measures then so do mmin, mmax, and mavg. More generally, if m is defined for clusterings on an arbitrary number of clusters, we can define a quality measure as a function of m over larger clusterings. For example, mmax subset(C, X, d) = maxS⊆C,|S|≥2 m(S, X, d). Many such variations, which apply existing clustering-quality measures on subsets of clusters, satisfy the axioms of clustering-quality measures whenever the original quality measure satisfies the axioms. 6 Dependence on Number of Clusters The clustering-quality measures discussed in this paper up to now are independent of the number of clusters, which enables the comparison of clusterings with a different number of clusters. In this section we discuss an alternative type of clustering quality evaluation, that depends on the number of clusters. Such quality measures arise naturally from common loss functions (or, objective functions) that drive clustering algorithm, such as k-means or k-median. 7 These common loss functions fail to satisfy two of our axioms, scale-invariance and richness. One can easily overcome the dependence on scaling by normalization. As we will show, the resulting normalized loss functions make a different type of clustering-quality measures from the measures we previously discussed, due to their dependence on the number of clusters. A natural remedy to the failure of scale invariance is to normalize a loss function by dividing it by the variance of the data, or alternatively, by the loss of the 1-clustering of the data. Definition 13 (L-normalization) The L-normalization of a clustering C over (X, d) is L-normalize(C, X, d) = L(Call, X, d) L(C, X, d) . where Call denotes the 1-clustering of X. Common loss functions, even after normalization, usually have a bias towards either more refined or towards more coarse clusterings – they assign lower cost (that is, higher quality) to more refined (respectively, coarse) clusterings. This prevents using them as a meaningful tool for comparing the quality of clusterings with different number of clusters. We formalize this feature of common clustering loss functions through the notion of refinement preference: Definition 14 (Refinement and coarsening) For a pair of clusterings C, C′ of the same domain, we say C′ is a refinement of C (or, equivalently, that C is a coarsening of C′) if for every cluster Ci of C, Ci is a union of clusters of C′. Definition 15 (Refinement/Coarsening Preference) A measure m is refinement-preferring if for every clustering C of (X, d) if it has a non-trivial refinement, then there exists such a refinement C′ of C for which m(C′, X, d) > m(C, X, d). Coarsening-preferring measures are defined analogously. Note that both refinement preferring and coarsening preferring measures fail to satisfy the Richness axiom. It seems that there is a divide between two types of evaluations for clusterings; those that satisfy richness, and those that satisfy either refinement or coarsening preference. To evaluate the quality of a clustering using a refinement (and coarsening) preferring measure, it is essential to fix the number of clusters. Since the correct number of clusters is often unknown, measures that are independent of the number of clusters apply in a more general setting. 7 Conclusions We have investigated the possibility of providing a general axiomatic basis for clustering. Our starting point was the impossibility result of Kleinberg. We argue that a natural way to overcome these negative conclusions is by changing the primitive used to formulate the axioms from clustering functions to clustering quality measures (CQMs). We demonstrate the merits of the latter framework by providing a set of axioms for CQMs that captures the essence of all of Kleinberg’s axioms while maintaining consistency. We propose several CQMs that satisfy our proposed set of axioms. We hope that this work, and our demonstration of a way to overcome the “impossibility result” will stimulate further research towards a general theory of clustering. References [1] Jon Kleinberg. “An Impossibility Theorem for Clustering.” Advances in Neural Information Processing Systems (NIPS) 15, 2002. [2] Glen W. Milligan. “A Monte-Carlo study of 30 internal criterion measures for cluster-analysis.” Psychometrica 46, 187-195, 1981. [3] J. Puzicha, T. Hofmann, and J. Buhmann. “Theory of Proximity Based Clustering: Structure Detection by Optimization,” Pattern Recognition, 33(2000). 8
2008
183
3,435
Structure Learning in Human Sequential Decision-Making Daniel Acu˜na Dept. of Computer Science and Eng. University of Minnesota–Twin Cities acuna002@umn.edu Paul Schrater Dept. of Psychology and Computer Science and Eng. University of Minnesota–Twin Cities schrater@umn.edu Abstract We use graphical models and structure learning to explore how people learn policies in sequential decision making tasks. Studies of sequential decision-making in humans frequently find suboptimal performance relative to an ideal actor that knows the graph model that generates reward in the environment. We argue that the learning problem humans face also involves learning the graph structure for reward generation in the environment. We formulate the structure learning problem using mixtures of reward models, and solve the optimal action selection problem using Bayesian Reinforcement Learning. We show that structure learning in one and two armed bandit problems produces many of the qualitative behaviors deemed suboptimal in previous studies. Our argument is supported by the results of experiments that demonstrate humans rapidly learn and exploit new reward structure. 1 Introduction Humans daily perform sequential decision-making under uncertainty to choose products, services, careers, and jobs; and to mate and survive as species. One of the central problems in sequential decision making with uncertainty is balancing exploration and exploitation in the search for good policies. Using model-based (Bayesian) Reinforcement learning [1], it is possible to solve this problem optimally by finding policies that maximize the expected discounted future reward [2]. However, solutions are notoriously hard to compute, and it is unclear whether optimal models are appropriate for human decision-making. For tasks simple enough to allow comparison between human behavior and normative theory, like the multi-armed bandit problem, human choices appear suboptimal. In particular, earlier studies suggested human choices reflect inaccurate Bayesian updating with suboptimalities in exploration [3, 4, 5, 6]. Moreover, in one-armed bandit tasks where exploration is not necessary, people frequently converge to probability matching [7, 8, 9, 10], rather than the better option, even when subjects are aware which option is best [11]. However, failures against normative prediction may reflect optimal decion-making, but for a task that differs from the experimenter’s intention. For example, people may assume the environment is potentially dynamically varying. When this assumption is built into normative predictions, these models account much better for human choices in one-armed bandit problems [12], and potentially multi-armed problems [13]. In this paper, we investigate another possibility, that humans may be learning the structure of the task by forming beliefs over a space of canonical causal models of reward-action contingencies. Most human performance assessments view the subject’s task as parameter estimation (e.g. reward probabilities) within a known model (a fixed causal graph structure) that encodes the relations between environmental states, rewards and actions created by the experimenter. However despite instruction, it is reasonable that subjects may be uncertain about the model, and instead try to learn it. To illustrate structure learning in a simple task, suppose you are alone in a casino with many rooms. In one room you find two slot machines. It is typically assumed you know the machines are 1 independent and give rewards either 0 (failure) or 1 (success) with unknown probabilities that must be estimated. The structure learning viewpoint allows for more possibilities: Are they independent, or are are they rigged to covary? Do they have the same probability? Does reward accrue when the machine is not played for a while? We believe answers to these questions form a natural set of causal hypotheses about how reward/action contingencies may occur in natural environments. In this work, we assess the effect of uncertainty between two critical reward structures in terms of the need to explore. The first structure is a one-arm bandit problem in which exploration is not necessary (reward generation is coupled across arms); greedy action is optimal [14]. And the other structure is a two-arm bandit problem in which exploration is necessary (reward generation is independent at each arm); each action needs to balance the exploration/exploitation tradeoff [15]. We illustrate how structure learning affects action selection and the value of information gathering in a simple sequential choice task resembling a Multi-armed Bandit (MAB), but with uncertainty between the two previous models of reward coupling. We develop a normative model of learning and action for this class of problems, illustrate the effect of model uncertainty on action selection, and show evidence that people perform structure learning. 2 Bayesian Reinforcement Learning: Structure Learning The language of graphical models provides a useful framework for describing the possible structure of rewards in the environment. Consider an environment with several distinct reward sites that can be sampled, but the way models generate these rewards is unknown. In particular, rewards at each site may be independent, or there may be a latent cause which accounts for the presence of rewards at both sites. Even if independent, if the reward sites are homogeneous, then they may have the same probability. Uncertainty about which reward model is correct naturally produces a mixture as the appropriate learning model. This structure learning model is a special case of Bayesian Reinforcement Learning (BRL), where the states of the environment are the reward sites and the transitions between states are determined by the action of sampling a reward site. Uncertainty about reward dynamics and contingencies can be modeled by including within the belief state not only reward probabilities, but also the possibility of independent or coupled rewards. Then, the optimal balance of exploration and exploitation in BRL results in action selection that seeks to maximize (1) expected rewards (2) information about rewards dynamics, and (3) information about task structure. Given that tasks tested in this research involve mixtures of Multi-Armed Bandit (MAB) problems, we borrow MAB language to call a reward site, an arm, and sample a choice or pull. However, the mixture models we describe are not MAB problems. MAB problems require the dynamics of one site (arm) remain frozen until visited again, which is not true in general for our mixture model. Let γ (0 < γ < 1) be a discounting factor such that a possibly stochastic reward x obtained t time steps in the future means γtx today. Optimality requires an action selection policy that maximizes the expectation over the total discounted future reward Eb  x+γx+γ2x+...  , where b is the belief over environment dynamics. Let xa be a reward acquired from arm a. After observing reward xa, we compute a belief state posterior bxa ≡p(b|xa) ∝p(xa|b)p(b). Let f(xa|b) ≡ R db p(xa|b)p(b) be the predicted probability of reward xa given belief b. Let r(b,a) ≡∑xa f(xa | b) be the expected reward of sampling arm a at state b. The value of a state can be found using the Bellman equation [2], V(b) = max a ( r(b,a)+γ∑ xa f(xa | b)V(bxa) ) . (1) The optimal action can be recovered by choosing arm a = argmax a′ ( r(b,a′)+γ∑ xa f(xa′ | b)V(bxa′) ) . (2) The belief over dynamics is effectively a probability distribution over possible Markov Decision Processes that would explain observables. As such, the optimal policy can be described as a mapping from belief states to actions. In principle, the optimal solution can be found by solving Bellman optimality equations but generally there are countably or uncountably infinitely many states and solutions need approximations. 2 N M Θ1 x1 Θ2 x2 (a) 2-arm bandit with no coupling N M Θ3 x3 x1 x2 (b) 1-arm, reward coupling N M Θ1 x1 Θ2 x2 c Θ3 x3 (c) Mixture of generative models Figure 1: Different graphical models for generation of rewards at two known sites in the environment. The agent faces M bandit tasks each comprising a random number of N choices (a) Reward sites are independent. (b) Rewards are dependent within a bandit task (c) Mixture of generative models used by the learning model. The causes of reward may be independent or coupled. The node c acts as a “XOR” switch between coupled and independent reward. In Figure 1, we show the two reward structures considered on this paper. Figure 1(a) illustrates a structure where arms are independent and (b) coupled. When independent, rewards xa at arm a are samples from a unknown distribution p(xa|θa). When coupled, rewards xa depends on a “hidden” state of reward x3 sampled from p(x3|θ3). In this case, the rewards x1 and x2 are coupled and depends on x3. If we were certain which of the two models were right, the action selection problem has known solution for both cases, presented below. Independent Rewards. Learning and acting in an environment like the one described in Figure 1(a) is known as the Multi-Armed Bandit (MAB) problem. The MAB problem is a special case of BRL because we can partition the belief b into a disjoint set of beliefs about each arm {ba}. Because beliefs about non-sampled arms remain frozen until sampled again and sampling one arm doesn’t affect the belief about any other, independent learning and action selection for each arm is possible. Let λa be the reward of a deterministic arm in V(ba) = max{λa/(1−γ),r(ba,a)+γ ∑f(xa|ba)V(bxa)} such that both terms inside the maximization are equal. Gittins [16] proved that it is optimal to choose the arm a with the highest such reward λa (called the Gittins Index). This allows speedup of computation by transforming a many-arm bandit problem to many 2-arm bandit problems. In our task, the belief about a binary reward may be represented by a Beta Distribution with sufficient statistics parameters α,β (both > 0) such that xa ∼p(xa|θa) = θ xa a (1 −θa)1−xa, where θa ∼p(θa;αa,βa) ∝θ αa−1 a (1 −θa)βa−1.Thus, the expected reward r(αa,βa,a) and predicted probability of reward f(xa = 1|αa,βa) are αa(αa + βa)−1. The belief state transition is bxa = ⟨αa +xa,βa +1−xa⟩. Therefore, the Gittins index may be found by solving the Bellman equations using dynamic programming V(αa,βa) = max  λa(1−γ)−1 , (αa +βa)−1 [αa +γ (αa +αaV(αa +1,βa)+βaV(αa,βa +1))] to a sufficiently large horizon. In experiments, we use γ = 0.98, for which a horizon of H = 1000 suffices. Coupled Rewards. Learning and acting in coupled environments (Figure 1b) is trivial because there is no need to maximize information in acting [14]. The belief state is represented by a Beta distribution with sufficient statistics α3,β3 (> 0). Therefore, the optimal action is to choose the arm a with highest expected reward r(α3,β3,a) = ( α3 α3+β3 a = 1 β3 α3+β3 a = 2 The belief state transitions are b1 = ⟨α3 +x1,β3 +1−x1⟩and b2 = ⟨α3 +1−x2,β3 +x2⟩. 3 3 Learning and acting with model uncertainty In this section, we consider the case where there is uncerainty about the reward model. The agent’s belief is captured by a graphical model for a family of reward structures that may or may not be coupled. We show that learning can be accurate and that action selection is relatively efficient. We restrict ourselves to the following scenario. The agent is presented with a block of M bandit tasks, each with initially unknown Bernoulli reward probabilities and coupling. Each task involves N discrete choices, where N is sampled from a Geometric distribution (1−γ)γN. Figure 1(c) shows the mixture of two possible reward models shown in figure 1(a) and (b). Node c switches the mixture between the two possible reward models and encodes part of the belief state of the process. Notice that c is acting as a “XOR” gate between the two generative models. Given that it is unknown, the probability distribution p(c = 0) is the mixed proportion for independent reward structure and p(c = 1) is the mixed proportion for coupled reward structure. We put a prior on the state c using the distribution p(c;φ) = φ c(1−φ)1−c, with parameter φ. The posterior is p(θ1,θ2,θ3,c|s1, f1,s2, f2) = ∝ ( (1−φ)×  θ α1−1+s1 1 (1−θ1)β1−1+f1θ α2−1+s2 2 (1−θ2)β2−1+f2θ α3−1 3 (1−θ3)β3−1 c = 0 (φ)×(θ α1−1 1 (1−θ1)β1−1θ α2−1 2 (1−θ2)β2−1θ α3−1+s1+f2 3 (1−θ3)β3−1+s2+f1 c = 1 (3) where sa and fa is the number of successes and failures observed in arm a. It is clear that the posterior (3) is a mixture of the beliefs on parameters θj, for 1 ≤j ≤3. With mixed proportion φ, successes of arm 1 and failures of arm 2 are attributed to successes on the shared “hidden” arm 3, whereas failures of arm 1 and successes of arm 2 are attributed to failures of arm 3. On the other hand, the usual Beta-Bernoulli learning of independent arms happens with mixed proportion 1−φ. At the beginning of each bandit task, we assume the agent “resets” its belief about arms (si = fi = 0), but the posterior over p(c) is carried over and used as the prior on the next bandit task. Let Beta(α,β) be the Beta function. The marginal posterior on c is as follows p(c|s1, f1,s2, f2) ∝ ( (1−φ) Beta(α1+s1,β1+f1)Beta(α2+s2,β2+f2) Beta(α1,β1)Beta(α2,β2) c = 0 φ Beta(α3+s1+f2,β3+f1+s2) Beta(α3,β3) c = 1 The belief state b of this process may be completely represented by ⟨s1, f1,s2, f2;φ,α1,β1,α2,β2,α3,β3⟩. The predicted probability of reward x1 and x2 are: f(x1|s1, f1,s2, f2) = ( (1−φ) α1+s1 α1+s1+β1+f1 +φ α3+s1+f2 α3+s1+f2+β3+s2+f1 x1 = 1 (1−φ) β1+f1 α1+s1+β1+f1 +φ β3+s2+f1 α3+s1+f2+β3+s2+f1 x1 = 0 (4) and similarly f(x2|s1, f1,s2, f2) = ( (1−φ) α2+s2 α2+s2+β2+f2 +φ β3+s2+f1 α3+s1+f2+β3+s2+f1 x2 = 1 (1−φ) β2+f2 α2+s2+β2+f2 +φ α3+s1+f2 α3+s1+f2+β3+s2+f1 x2 = 0 (5) Let us drop prior parameters αj,βj, 1 ≤j ≤3, and φ from b. The action selection involves solving the following Bellman equations V(s1, f1,s2, f2) = max a=1,2 r(b,1)+γ [f(x1 = 0|b)V(s1, f1 +1,s2, f2)+ f(x1 = 1|b)V(s1 +1, f1,s2, f2)] a = 1 r(b,2)+γ [f(x2 = 0|b)V(s1, f1,s2, f2 +1)+ f(x2 = 1|b)V(s1, f1,s2 +1, f2)] a = 2 (6) 4 p(θ1) 0 50 100 150 0 0.5 1 p(θ2) 0 50 100 150 0 0.5 1 p(θ3) 0 50 100 150 0 0.5 1 0 50 100 150 200 0 0.5 1 p(c) (a) Learning in coupled environment p(θ1) 0 50 100 150 0 0.5 1 p(θ2) 0 50 100 150 0 0.5 1 p(θ3) 0 50 100 150 0 0.5 1 0 50 100 150 200 0 0.5 1 p(c) (b) Learning in independent enviroment Figure 2: Learning example. A block of four bandit tasks of 50 trials each for each environment. Marginal beliefs on reward probabilities and coupling are shown as functions of time. The brightness indicates the relative probability mass. The coupling belief distribution starts uniform with φ = 0.5 and is not reset within a block. The priors p(θi;αi,βi) are reset at the beginning of each task with αi,βi = 1 (1 ≤i ≤3) . Note that how well the reward probabilities sum to one forms critical evidence for or against coupling. To obtain (6) using dynamic programing for a horizon H, there will be a total of (1/24)(1+H)(2+ H)(3 + H)(4 + H) computations which represent different occurrences of si, fi out of 4H possible histories of rewards. This dramatic reduction allows us to be relatively accurate in our approximation to the optimal value of an action. 4 Simulation Results In Figure 2, we perform simulations of learning on blocks of four bandit tasks, each comprising 50 trials. In one simulation, (a) rewards are coupled and the other (b) independent. Note that the model learns quickly on both cases, but it is slower when task is truly coupled because fewer cases support this hypothesis (when compared to the independent hypothesis). The importance of the belief on the coupling parameter is that it has a decisive influence on exploratory behavior. Coupling between the two arms corresponds to the case where one arm is a winner and the other is a loser by experimenter design. When playing coupled arms, evidence that an arm is “good” (e.g. > 0.5) necessarily entails the other is “bad”, and hence eliminates the need for exploratory behavior - the optimal choice is to “stick with the winner”, and switch when the probability estimate suggests dips below 0.5. An agent learning a coupling parameter while sampling arms can manifest a range of exploratory behaviors that depend critically on both the recent reward history and the current state of the belief about c, illustrated in figure 3. The top row shows the value of both arms as a function of coupling belief p(c) after different amounts of evidence for the success of arm 2. The plots show that optimal actions stick with the winner when belief in coupling is high, even for small amounts of data. Thus belief in coupling produces underexploration compared to a model assuming independence, and generates behavior similar to a “win stay, lose switch” heuristic early in learning. However, overexploration can also occur when the expected values of both arms are similar. Figure 3 (lower left) shows that uncertainty about c provides an exploratory bonus to the lower probability arm which incentivizes switching, and hence overexploration. In fact, when the difference in probability between arms is small, action selection can fail to converge to the better option. Figure 3 (to the right) shows that p(c) together with the probability of the better arm determine the transition between exploration vs. exploitation. These results show that optimal action selection with model uncertainty can generate several kinds of behavior typically labeled suboptimal in multi-armed bandit experiments. Next we provide evidence that people are capable of learning and exploiting coupling–evidence that structure learning may play a role in apparent failures of humans to behave optimally in multi-armed bandit tasks. 5 10 −0.3 10 −0.2 10 −0.1 10 −1 10 0 Expected value of θ2 Critical value of p(c) 0.04 0.7 0.75 0.8 f2=1 V(1-γ) 0.24 0.65 0.7 0.75 f 2=2 0.5 0.6 0.65 0.7 f 2=3 0.6 0.65 0.7 f2=4 0.6 0.65 0.7 f2=5 0.6 0.65 f 2=6 0 0.5 1 0.1 0.2 0.3 p(c) Bonus 0 0.5 1 0.1 0.2 p(c) 0 0.5 1 0.06 0.08 0.1 0.12 0.14 p(c) 0 0.5 1 0.05 0.1 0.15 p(c) 0 0.5 1 0.05 0.1 0.15 p(c) 0 0.5 1 0.05 0.1 0.15 0.2 p(c) Figure 3: Value of arms as a function of coupling. The priors are uniform (αj = βj = 1, 1 ≤j ≤3), the evidence for arm 1 remains fixed for all cases (s1 = 1, f1 = 0), and successes of arm 2 remains fixed as well (s2 = 5). Failures for arm 2 ( f2) vary from 1 to 6 . Upper left: Belief that arms are coupled (p(c)) versus reward per unit time (V(1 −γ), where V is the value) of arm 1 (dashed line) and arm 2 (solid line). In all cases, an independent model would choose arm 1 to pull. Vertical line shows the critical coupling belief value where the structure learning model switches to exploitative behavior. Lower left: Exploratory bonus (V(1−γ)−r, where r is the expected reward) for each arm. Right panel: Critical coupling belief values for exploitative behavior vs. the expected probability of reward of arm 2. Individual points correspond to different information states (successes and failures on both arms). 5 Human Experiments Each of 16 subjects ran on 32 bandit tasks, a block of 16 in a independent environment and a block of 16 coupled. Within blocks, the presentation order was randomized, and the order of the coupled environment was randomized accross subjects. On average each task required 48 pulls. For independent environment, the subjects made 1194 choices across the 16 tasks, and 925 for the coupled environment. Each arm is shown in the screen as a slot machine. Subjects pull a machine by pressing a key in the keyboard. When pulled, an animation of the lever is shown, 200 msec later the reward appears in the machine’s screen, and a sound mimicking dropping coins lasts proportionally to the amount gathered. We provide several cues, some redundant, to help subjects keep track of previous rewards. At the top, the machine shows the number of pulls, total reward, and average reward per pull so far. Instead of binary rewards 0 and 1, the task presented 0 and 100. The machine’s screen changes the color according to the average reward, from red (zero points), through yellow (fifty points), and green (one hundred points). The machine’s total reward is shown as a pile of coins underneath it. The total score, total pulls, and rankings within a game were presented. 6 Results We analyze how task uncertainty affects decisions by comparing human behavior to that of the optimal model and models that assume a structure. For each agent, be human or not, we compute the (empirical) probability that it selects the oracle-best action versus the optimal belief that a block of tasks is coupled. The idea behind this measure is to show how the belief on task structure changes the behavior and which of the models better captures human behavior. We run 1000 agents for each of the models with task uncertainty (optimal model), assumed coupled reward task (coupled model), and assumed independent reward task (independent model) under the same conditions that subjects faced on both the blocks of coupled and independent tasks. And for each of the decisons of these models and the 33904 decisions performed by the 16 subjects, we compute the optimal belief on coupling according to our model and bin the proportion of times the agent chooses the (oracle) best arm according to this belief. The results are summarized in Figure 4. The independent model tends to perform equally well on both coupled and independent reward tasks. The coupled model tends to perform well only in the coupled task and worse in the independent tasks. As expected, the optimal model has better overall performance, but does not perform better than models with fixed task structure—in their respective tasks—because it pays the price of learning early in the block. The optimal model behaves like a mixture between the coupled and independent model. Human behavior is much better captured by the optimal model (Figure 6 0 0.25 0.5 0.75 1 0.78 0.8 0.82 0.84 0.86 0.88 0.9 0.92 0.94 0.96 Coupling belief p(c=1|D) Prob. of choosing best arm Human Optimal model Coupled model Independent model Figure 4: Effect of coupling on behavior. For each of the decisions of subjects and simulated models under the same conditions, we compute the optimal belief on coupling according to the model proposed in this paper and bin the proportion of times an agent chooses the (oracle) best arm according to this belief. This plot represents the empirical probability that an agent would pick the best arm at a given belief on coupling. 4). This is evidence that human behavior shares the characteristics of the optimal model, namely, it contains task uncertainty and exploit the knowledge of the task structure to maximize its gains. The gap in performance that exists between the optimal model and humans may be explained by memory limitations or more complicated task structures being entertained by subjects. Because the subjects are not told the coupling state of the environment and the arms appear as separate options we conclude that people are capable of learning and exploiting task structure. Together these results suggest that structure learning may play a significant role in explaining differences between human behavior and previous normative predictions. 7 Conclusions and future directions We have provided evidence that structure learning may be an important missing piece in evaluating human sequential decision making. The idea of modeling sequential decision making under uncertainty as a structure learning problem is a natural extension of previous work on structure learning in Bayesian models of cognition [17, 18] and animal learning [19] to sequential decision making problems under uncertainty. It also extends previous work on Bayesian approaches to modeling sequential decision making in the multi-armed bandit [20] by adding structure learning. It is important to note that we have intentionally focused on reward structure, ignoring issues involving dependencies across trials. Clearly reward structure learning must be integrated with learning about temporal dependencies [21]. Although we focused on learning coupling between arms, there are other kinds of reward structure learning that may account for a broad variety of human decision making performance. In particular, allowing dependence between the probability of reward at a site and previous actions can produce large changes in decision making behavior. For instance, in a “foraging” model where reward is collected from a site and probabilistically replenished, optimal strategies will produce choice sequences that alternate between reward sites. Thus uncertainty about the independence of reward on previous actions can produce a continuum of behavior, from maximization to probability matching. Note that structure learning explanations for probability matching is significantly different than explanations based on reinforcing previously successful actions (the “law of effect”) [22]. Instead of explaining behavior in terms of the idiosynchracies of a learning rule, structure learning constitutes a fully rational response to uncertainty about the causal structure of rewards in the environment. We intend to test the predictive power of a range of structure learning ideas on experimental data we are currently collecting. Our hope is that, by expanding the range of normative hypotheses for human decisionmaking, we can begin to develop more principled accounts of human sequential decision-making behavior. 7 Acknowledgements The work was supported by NIH NPCS 1R90 DK71500-04, NIPS 2008 Travel Award, CONICYTFIC-World Bank 05-DOCFIC-BANCO-01, ONR MURI N 00014-07-1-0937, and NIH EY02857. References [1] Pascal Poupart, Nikos Vlassis, Jesse Hoey, and Kevin Regan. An analytic solution to discrete bayesian reinforcement learning. In 23rd International Conference on Machine Learning, Pittsburgh, Penn, 2006. [2] Richard Ernest Bellman. Dynamic programming. Princeton University Press, Princeton, 1957. [3] Noah Gans, George Knox, and Rachel Croson. Simple models of discrete choice and their performance in bandit experiments. Manufacturing and Service Operations Management, 9(4):383–408, 2007. [4] C.M. Anderson. Behavioral Models of Strategies in Multi-Armed Bandit Problems. PhD thesis, Pasadena, CA., 2001. [5] Jeffrey Banks, David Porter, and Mark Olson. An experimental analysis of the bandit problem. Economic Theory, 10(1):55–77, 1997. [6] R. J. Meyer and Y. Shi. Sequential choice under ambiguity: Intuitive solutions to the armedbandit problem. Management Science, 41:817–83, 1995. [7] N Vulkan. An economist’s perspective on probability matching. Journal of Economic Surveys, 14:101–118, 2000. [8] Yvonne Brackbill and Anthony Bravos. Supplementary report: The utility of correctly predicting infrequent events. Journal of Experimental Psychology, 64(6):648–649, 1962. [9] W Edwards. Probability learning in 1000 trials. Journal of Experimental Psychology, 62:385– 394, 1961. [10] W Edwards. Reward probability, amount, and information as determiners of sequential twoalternative decisions. J Exp Psychol, 52(3):177–88, 1956. [11] E. Fantino and A Esfandiari. Probability matching: Encouraging optimal responding in humans. Canadian Journal of Experimental Psychology, 56:58 – 63, 2002. [12] Timothy E J Behrens, Mark W Woolrich, Mark E Walton, and Matthew F S Rushworth. Learning the value of information in an uncertain world. Nat Neurosci, 10(9):1214–1221, 2007. [13] N. D. Daw, J. P. O’Doherty, P. Dayan, B. Seymour, and R. J. Dolan. Cortical substrates for exploratory decisions in humans. Nature, 441(7095):876–879, 2006. [14] JS Banks and RK Sundaram. A class of bandit problems yielding myopic optimal strategies. Journal of Applied Probability, 29(3):625–632, 1992. [15] John Gittins and You-Gan Wang. The learning component of dynamic allocation indices. The Annals of Statistics, 20(2):1626–1636, 1992. [16] J. C. Gittins and D. M. Jones. A dynamic allocation index for the sequential design of experiments. Progress in Statistics, pages 241–266, 1974. [17] Joshua B. Tenenbaum, Thomas L. Griffiths, and Charles Kemp. Theory-based bayesian models of inductive learning and reasoning. Trends in Cognitive Sciences, 10(7):309–318, 2006. [18] Joshua B. Tenenbaum and Thomas L. Griffiths. Structure learning in human causal induction. NIPS 13, pages 59–65, 2000. [19] A. C. Courville, N. D. Daw, G. J. Gordon, and D. S. Touretzky. Model uncertainty in classical conditioning. Advances in Neural Information Processing Systems, (16):977–986, 2004. [20] Daniel Acuna and Paul Schrater. Bayesian modeling of human sequential decision-making on the multi-armed bandit problem. In CogSci, 2008. [21] Michael D. Lee. A hierarchical bayesian model of human decision-making on an optimal stopping problem. Cognitive Science: A Multidisciplinary Journal, 30:1 – 26, 2006. [22] Ido Erev and Alvin E. Roth. Predicting how people play games: Reinforcement learning in experimental games with unique, mixed strategy equilibria. The American Economic Review, 88(4):848–881, 1998. 8
2008
184
3,436
Effects of Stimulus Type and of Error-Correcting Code Design on BCI Speller Performance Jeremy Hill1 Jason Farquhar2 Suzanne Martens1 Felix Bießmann1,3 Bernhard Sch¨olkopf1 1Max Planck Institute for Biological Cybernetics {firstname.lastname}@tuebingen.mpg.de 2NICI, Radboud University, Nijmegen, The Netherlands J.Farquhar@nici.ru.nl 3Dept of Computer Science, TU Berlin, Germany Abstract From an information-theoretic perspective, a noisy transmission system such as a visual Brain-Computer Interface (BCI) speller could benefit from the use of errorcorrecting codes. However, optimizing the code solely according to the maximal minimum-Hamming-distance criterion tends to lead to an overall increase in target frequency of target stimuli, and hence a significantly reduced average target-to-target interval (TTI), leading to difficulties in classifying the individual event-related potentials (ERPs) due to overlap and refractory effects. Clearly any change to the stimulus setup must also respect the possible psychophysiological consequences. Here we report new EEG data from experiments in which we explore stimulus types and codebooks in a within-subject design, finding an interaction between the two factors. Our data demonstrate that the traditional, rowcolumn code has particular spatial properties that lead to better performance than one would expect from its TTIs and Hamming-distances alone, but nonetheless error-correcting codes can improve performance provided the right stimulus type is used. 1 Introduction The Farwell-Donchin speller [4], also known as the “P300 speller,” is a Brain-Computer Interface which enables users to spell words provided that they can see sufficiently well. This BCI determines the intent of the user by recording and classifying his electroencephalogram (EEG) in response to controlled stimulus presentations. Figure 1 shows a general P300 speller scheme. The stimuli are intensifications of a number of letters which are organized in a grid and displayed on a screen. In a standard setup, the rows and columns of the grid flash in a random order. The intensification of the row or column containing the letter that the user wants to communicate is a target in a stimulus sequence and induces a different brain response than the intensification of the other rows and columns (the non-targets). In particular, targets and non-targets are expected to elicit certain event-related potential (ERP) components, such as the so-called P300, to different extents. By classifying the epochs (i.e. the EEG segments following each stimulus event) into targets and non-targets, the target row and column can be predicted, resulting in the identification of the letter of interest. The classification process in the speller can be considered a noisy communication channel where the sequence of EEG epochs is a modulated version of a bit string denoting the user’s desired letter. 1 Figure 1: Schematic of the visual speller system, illustrating the relationship between the spatial pattern of flashes and one possible codebook for letter transmission (flash rows then columns). These bit strings or codewords form the rows of a binary codebook C, a matrix in which a 1 at position (i, j) means the letter corresponding to row i flashed at time-step j, and a 0 indicates that it did not. The standard row-column code, in which exactly one row or exactly one column flashes at any one time, will be denoted RC. It is illustrated in figure 1. A classifier decodes the transmitted information into an output bit string. In practice, the poor signal-to-noise ratio of the ERPs hampers accurate classification of the epochs, so the output bit string may differ from the transmitted bit string (decoding error). Also, the transmitted string may differ from the corresponding row in the codebook due to modulation error, for example if the user lost his attention and missed a stimulus event. Coding theory tells us that we can detect and correct transmission and decoding errors by adding redundancy to the transmitted bit string. The Hamming distance d is the number of bit positions that differ between two rows in a codebook. The minimum Hamming distance dmin of all pairs of codewords is related to the error correcting abilities of the code by e = (dmin −1)/2, where e is the maximum number of errors that a code can guarantee to correct [9]. In general, we find the mean Hamming distance within a given codebook to be a rough predictor of that codebook’s performance. In the standard approach, redundancy is added by repeating the flashing of all rows and columns R times. This leads to d = 4R between two letters not in the same row or column and dmin = 2R between two letters in the same row or column. The RC code is a poor code in terms of minimum Hamming distance: to encode 36 different letters in 12 bits, dmin = 4 is possible, and the achievable dmin increases supra-linearly with the total code length L (for example, dmin = 10 is possible in L = 24 bits, the time taken for R = 2 repeats of the RC code). However, the codes with a larger dmin are characterized by an increased weight compared to the RC code, i.e. the number of 1’s per bitstring is larger. As target stimulus events occur more frequently overall, the expected target-to-target interval (TTI) decreases. One cannot approach codebook optimization, therefore, without asking what effect this might have on the signals we are trying to measure and classify, namely the ERPs in response to the stimulus events. The speller was originally derived from an “oddball” paradigm, in which subjects are presented with a repetitive sequence of events, some of which are targets requiring a different response from the (more frequent) non-targets. The targets are expected to evoke a larger P300 than the non-targets. It was generally accepted that the amplitude of the target P300 decreases when the percentage of targets increases [3, 11]. However, more recently, it was suggested that the observed tendency of the P300 amplitude (as measured by averaging over many targets) to decrease with increased target probability may in fact be attributed to greater prevalence of shorter target-to-target intervals (TTI) [6] rather than an overall effect of target frequency per se. In a different type of paradigm using only targets, it was shown that at TTIs smaller than about 1 second, the P300 amplitude is significantly decreased due to refractory effects [15]. Typical stimulus onset asynchronies (SOAs) in the oddball paradigm are in the order of seconds since the P300 component shows up somewhere between 200 and 800 msec[12]. In spellers, small SOAs of about 100 msec are often used [8, 13] in order to 2 achieve high information transfer rates. Consequently, one can expect a significant ERP overlap into the epoch following a target epoch, and since row flashes are often randomly mixed in with column flashes, different targets may experience very different TTIs. For a 6 × 6 grid, the TTI ranges from 1×SOA to 20×SOA, so targets may suffer to varying degrees from any refractory and overlap effects. In order to quantify the detrimental effects of short TTI we examined data from the two subjects in dataset IIa+b from the BCI Competition III[2]. Following the classification procedures described in section 3.3, we estimated classification performance on the individual epochs of both data sets by 10fold cross-validation within each subject’s data set. Binary (target versus non-target) classification results were separated according to the time since the previous target (TPT)—for the targets this distance measure is equivalent to the TTI. The left panel of fig 4 shows the average classification error as a function of TPT (averaged across both subjects—both subjects show the same qualitative effect). Evidently, the target epochs with a TPT< 0.5 sec display a classification accuracy that approximates chance performance. Consequently, the target epochs with TPT< 0.5 sec, constituting about 20% of all target epochs in a RC code, do not appear to be useful for transmission [10]. Clearly, there is a potential conflict between information-theoretic factors, which favour increasing the minimum Hamming distance and hence the overall proportion of target stimuli, and the detrimental psychophysiological effects of doing so. In [7] we explored this trade-off to see whether an optimal compromise could be found. We initially built a generative model of the BCI system, using the competition data illustrated in figure 4, and then used this model to guide the generation and selection of speller code books. The results were not unequivocally successful: though we were able to show effects of both TTIs and of the Hamming distances in our codebooks, our optimized codebook performed no better than the row-column code for the standard flash stimulus. However, our series of experiments involved another kind of stimulus, and the effect of our codebook manipulation was found to interact with the kind of stimulus used. The purpose of the current paper is two-fold: 1. to present new data which ilustrate the stimulus/codebook interaction more clearly, and demonstrate the advantage to be gained by the correct choice of stimulus together with an error-correcting code. 2. to present evidence for another effect, which we had not previously considered in modelling our subjects’ responses, which may explain why row-column codes perform better than expected: specifically, the spatial contiguity of rows and columns. 2 Decoding Framework 2.1 Probabilistic Approach to Classification and Decoding We assume an N-letter alphabet Γ and an N-letter by L-bit codebook C. The basic demodulation and decoding procedure consists of finding the letter ˆT among the possible letters t ∈Γ showing the largest probability Pr (t|X) of being the target letter T, given C and the measured brain signals X = [x1, . . . , xL], i.e., ˆT = argmax t∈Γ Pr (t|X) = argmax t∈Γ Pr (X|t) Pr (t) Pr (X) , (1) where the second equality follows from Bayes’ rule. A simple approach to decoding is to treat the individual binary epochs, with binary labels c = (Ct1 . . . CtL), as independent. This allows us to factor Pr (X|t) into per-epoch probabilities Pr (xj|c) for epoch indices j = 1 . . . L, to give Pr (t|X) = Pr (t) Pr (X) L Y j=1 Pr (xj|c) = Pr (t) Pr (X) L Y j=1 Pr (Ctj|xj) Pr (xj) Pr (Ctj) = ft(X) , (2) where the second equality again follows from Bayes’ rule. This form of Bayesian decoding [5] forms the basis for our decoding scheme. We train a probabilistic discriminative classifier, in particular a linear logistic regression (LR) classifier [1, pp82-85], to 3 estimate Pr (Ctj|xj) = pj in (2). As a result, we can obtain estimates of the probability Pr (t|X) that a particular letter t corresponds to the user-selected codeword. Note that for decoding purposes the terms Pr (X) and Pr (xj) can be ignored as they are independent of t. Furthermore, the product Q j Pr (Ctj) depends only on the positive-class prior of the binary classifier, Pr (+). In fact, it is easy to show that during decoding this term cancels out the effect of the binary prior, which may therefore be set arbitrarily without affecting the decisions made by our decoder. The simplest thing to do is to train classifiers with Pr (+) = 0.5, in which case the denominator term is constant for all t. 2.1.1 Codebook Optimization We used a simple model of subjects’ responses in each epoch in order to estimate the probability of making a prediction error with the above decoding method. We used it to compute the codebook loss, which is the sum of error probabilities, weighted by the probability of transmission of each letter. This loss function was then minimized in order to obtain an optimized codebook. Note that this approach is not a direct attempt to tackle the tendency for the performance of the binary target-vs-nontarget classifier to deteriorate when TTI is short (although this would surely be a promising alternative strategy). Instead, we take a “normal” classifier, as susceptible to short-TTI effects as classifiers in any other study, but try to estimate the negative impact of such effects, and then find the best trade-off between avoiding short TTIs on the one hand, and having large Hamming distances on the other hand. Since our optimization did not result in a decisive gain in performance, we do not wish to emphasize the details of the optimization methods here. However, for further details see the supplementary material, or our tech report [7]. For the purposes of the current paper it is the properties of the resulting codebooks that are important, rather than the precise criterion according to which they are considered theoretically optimal. The codebooks themselves are described in section 3.1 and given in full in the supplementary material. 3 EEG Experiments We implemented a Farwell/Donchin-style speller, using a 6 × 6 grid of alphanumeric characters, presented via an LCD monitor on a desk in a quiet office. Subjects each performed a single 3-hour session during which their EEG signals were measured using a QuickAmp system (BrainProducts GmbH) in combination with an Electro-Cap. The equipment was set up to measure 58 channels of EEG, one horizontal EOG at the left eye, one bipolar vertical EOG signal, and a synchronization signal from a light sensor attached to the display, all sampled at 250 Hz. We present results from 6 healthy subjects in their 20s and 30s (5 male, 1 female). Two factors were compared in a fully within-subject design: codebook and stimulus. These are described in the next two subsections. 3.1 Codebook Comparison In total, we explored 5 different stimulus codes: 1. RCmix: the 12-bit row-column code, with the 12 bits randomly permuted in time (row events mixed up randomly between column events) as in the competition data [2]. 2. RCsep: the 12-bit row-column code, where the 6 rows are intensified in random order, and then the 6 columns in random order. 3. RC∗: this code was generated by taking code RCsep and randomizing the assignment between codewords and letters. Thus, the TTI and Hamming-distance content of the codebook remained identical to RCsep, but the spatial contiguity of the stimulus events was broken: that is to say, it was no longer a coherent row or column that flashed during any one epoch, but rather a collection of 6 apparently randomly scattered letters. However, if a subject were to have “tunnel vision” and be unable to see any letters other than the target, this would be exactly equivalent to RCsep. As we shall see, for the purposes of the speller, our subjects do not have tunnel vision. 4 code L dmin E(d) E(TTI) E(#11) Pr (1) L RCmix ×2 24 4 6.9 5.4 0.4 0.17 0.60 RCsep ×2 24 4 6.9 6.0 0.1 0.17 0.56 RC∗×2 24 4 6.9 6.0 0.1 0.17 0.56 D10 24 10 11.5 2.5 3.1 0.38 0.54 D8opt 24 8 10.7 3.1 0.0 0.32 0.44 Table 1: Summary statistics for the 24-bit versions of the 5 codebooks used. E(#11) means the average number of consecutive target letters per codeword, and Pr (1) the proportion of targets. L is our estimated probability of an error, according to the model (see supplementary material or [7]). 4. D10: a 24-bit code with the largest minimum Hamming distance we could achieve (dmin = 10). To make it, our heuristic for codeword selection was to pick the codeword with the largest minimum distance between it and all previously selected codewords. A large number of candidate codebooks were generated this way, and the criteria for scoring a completed codebook were (first) dmin and (second, to select among a large number of dmin = 10 candidates) the lowest number of consecutive targets. 5. D8opt: a 24-bit code optimized according to our model. The heuristic for greedy codeword selection was the mean pairwise codebook loss w.r.t. previously selected codebook entries, and the final scoring criterion was our overall codebook loss function. 3.2 Stimulus Comparison Two stimulus conditions were compared. In both conditions, stimulus events were repeated with a stimulus onset asynchrony (SOA) of 167 msec, which as close as our hardware could come to recreating the 175-msec SOA of competition III dataset II. Flashes: grey letters presented on a black background were flashed in a conventional manner, being intensified to white for 33 msec (two video frames). An example is illustrated in the inset of the left panel of figure 2. Flips: each letter was superimposed on a small grey rectangle whose initial orientation was either horizontal or vertical (randomly determined for each letter). Instead of the letter flashing, the rectangle flipped its orientation instantaneously by 90◦. An example is illustrated in the inset of the right panel of figure 2. Our previous experiments had led us to conclude that many subjects perform significantly better with this stimulus, and find it more pleasant, than the flash. As we shall see, our results from this stimulus condition support this finding, and indicate a potentially useful interaction between stimulus type and codebook design. 3.3 Experimental Procedure The experiment was divided into blocks, each block containing 20 trials with short (2–4 second) rest pauses between trials. Each trial began with a red box which indicated to the subject which letter (randomly chosen on each trial) they should attend to—this cue came on for a second, and was removed 1 second before the start of the stimulus sequence. Subjects were instructed to count the stimulus events at the target location, and not to blink, move or swallow during the sequence. The sequence consisted of L = 72 stimulus events, their spatio-temporal arrangement being determined by one of the five code conditions. The 12-bit RC codes were repeated six times in order to make the length up to L = 72 (re-randomizing the row and column order on each repetition) and the 24-bit optimized codes were repeated three times (reassigning the codewords between repetitions to ensure maximal gap between targets at the end of one repetition and the beginning of the next) likewise to ensure a total code length of 72 bits. Each of the 5 code conditions occurred 4 times per block, the order of their occurrence being randomized. For a given block, the stimulus condition was held constant, but the stimulus type was alternated between blocks. In total, each subject performed 16 blocks. Thus, in each of the 10 stimulus × code conditions, there were a total of 32 letter presentations or 2304 stimulus events. 5 3.3.1 Online Verification Subjects did not receive feedback at the end of each trial. However, at the end of the experiment, we gave the subject the opportunity to perform free-spelling in order to validate the system’s performance: we asked each subject whether they would prefer to spell with flips or flashes, and loaded a classifier trained on all data from their preferred stimulus type into the system. Using the 72-bit codebooks, all subjects were able to spell 5-15 letters with online performance ranging from 90 to 100%. Our data analysis below is restricted to leave-one-letter-out offline performance, excluding the free-spelled letters. 3.4 Data Analysis The 60-channel data, sampled at 250 Hz, were band-pass filtered between 0.1 and 8 Hz using a FIR filter. The data were then cut into 600-msec (150-sample) epochs time-locked to the stimulus events, and these were downsampled to 25 Hz. The data were then whitened in 60-dimensional sensor space (by applying a symmetric spatial filtering matrix equal to the matrix-square-root of the data covariance matrix, computed across all training trials and time-samples). Finally a linear LR classifier was applied [1, pp82-85]. The classifier’s regularization hyperparameter C was found by 10-fold cross-validation within the training set.. Offline letter classification performance was assessed by a leave-one-letter-out procedure: for a given code condition, each of the 32 letters was considered in turn, and a probabilistic prediction was made of its binary epoch labels using the above procedure trained only on epochs from the other 31 letters. These probabilities were combined using the decoding scheme described in section 2.1 and a prediction was made of the transmitted letter. We varied the number of consecutive epochs of the test letter that the decoder was allowed to use, from the minimum (12 or 24) up to the maximum 72. For each epoch of the left-out letter, we also recorded whether the binary classifier correctly classified the epoch as a target or non-target. 4 Results and Discussion Estimates of 36-class letter prediction performance are shown in figures 2 (averaged across subjects, as a function of codeword length) and 3 (for each individual subject, presenting only the results for 24-bit codewords). The performance of the binary classifier on individual epochs is shown in figure 4. 12 24 36 48 60 72 40 50 60 70 80 90 100 % letters correct length of code (epochs) flashes 12 24 36 48 60 72 40 50 60 70 80 90 100 % letters correct length of code (epochs) flips D8opt D10 RCsep RCmix RC* D8opt D10 RCsep RCmix RC* 0 16.67 33.33 50 msec 0 16.67 33.33 50 msec Figure 2: Offline (leave-one-letter-out) 36-class prediction performance as a function of codeword length (i.e. the number of consecutive epochs of the left-out letter that were used to make a prediction). Performance values (and standard-error bar heights) are averaged across the 6 subjects. Our results indicated the following effects: 1. Using the Donchin flash stimulus, the deleterious effects of short TTIs were clear to see: D10 performed far worse than the other codes despite its larger Hamming distances. In both stimulus conditions, the averaged plots of figure 2 indicate that RCmix may also be 6 RC* RCmix RCsep D10 D8opt 40 50 60 70 80 90 100 subject 1 % letters correct codebook RC* RCmix RCsep D10 D8opt 40 50 60 70 80 90 100 subject 2 % letters correct codebook RC* RCmix RCsep D10 D8opt 40 50 60 70 80 90 100 subject 3 % letters correct codebook RC* RCmix RCsep D10 D8opt 40 50 60 70 80 90 100 subject 4 % letters correct codebook RC* RCmix RCsep D10 D8opt 40 50 60 70 80 90 100 subject 6 % letters correct codebook RC* RCmix RCsep D10 D8opt 40 50 60 70 80 90 100 subject 5 % letters correct codebook flashes flips Figure 3: Offline (leave-one-letter-out) 36-class prediction performance when decoding codewords of length 24, for each of the subjects in each of the code conditions. 1 2 3 4 5 6+ avg 45 50 55 60 65 70 75 80 85 90 95 100 epochs since previous target competition III subjs IIa and IIb % epochs classified correctly (binary problem) 1 2 3 4 5 6+ avg 45 50 55 60 65 70 75 80 85 90 95 100 epochs since previous target our 6 subjects, flashes % epochs classified correctly (binary problem) 1 2 3 4 5 6+ avg 45 50 55 60 65 70 75 80 85 90 95 100 epochs since previous target our 6 subjects, flips % epochs classified correctly (binary problem) targets non−targets targets non−targets targets non−targets Figure 4: Illustration of effect of TPT on epoch classification performance, (left) in the data from competition III dataset II; (middle) in our experiments, averaged across all subjects and code conditions for blocks in which the flash stimulus was used; (right) in our experiments, averaged across the same subjects and code conditions, but for blocks in which the flip stimulus was used. The rightmost column of each plot shows average classification accuracy across all epochs (remember that short TTIs are relatively uncommon overall, and therefore downweighted in the average). performing slightly less well than RCsep, which has longer TTIs. However, the latter effect is not as large or as consistent across subjects as it was in our preliminary study [7]. 2. Using the Donchin flash stimulus, our optimized code D8opt performs about as well as traditional RC codes, but does not outperform them. 3. Generally, performance using the flip stimulus is better than with the flash stimulus. 4. Using the flip stimulus, both D8opt and D10 perform better than the RC codes, and they perform roughly equally as well as each other. We interpret this interaction between stimulus type and code type as an indication that the flip stimulus may generate rather different psychophysiological responses from the flash (perhaps stronger primary visual evokedpotentials, in addition to the P300) of a kind which is less susceptible to short TTI (the 7 curves in the right panel of figure 4 being flatter than those in the middle panel). A comparative analysis of the spatial locations of discriminative sources in the two stimulus conditions is beyond the scope of the current short report. 5. Despite having identical TTIs and Hamming distances, RC∗performs consistently worse than RCsep, in both stimulus conditions. In summary, we have obtained empirical support for the idea that TTI (finding #1), Hamming distance (finding #4) and stimulus type (finding #3) can all be manipulated to improve performance. However, our initial attempt to find an optimal solution by balancing these effects was not successful (finding #2). In the flash stimulus condition, the row-column codes performed better than expected, matching the performance of our optimized code. In the flip stimulus condition, TTI effects were greatly reduced, making either D8opt or D10 suitable despite the short TTIs of the latter. It seems very likely that the unexpectedly high performance of RCsep and RCmix can be at least partly explained by the idea that they have particular spatial properties that enhance their performance beyond what Hamming distances and TTIs alone would predict. This hypothesis is corroborated by finding #5. Models of such spatial effects should clearly be taken into account in future optimization approaches. Overall, best performance was obtained with the flip stimulus, using either of the two errorcorrecting codes, D8opt or D10: this consistently outperforms the traditional row-column flash design and shows that error-correcting code design has an important role to play in BCI speller development. As a final note, one should remember that a language model can be used to improve performance in speller systems. In this case, the codebook optimization problem becomes more complicated than the simplified setting we examined, because the prior Pr (t) in (2) is no longer flat. The nature of the best codes, according to our optimization criterion, might change considerably: for example, a small subset of codewords, representing the most probable letters, might be chosen to be particularly sparse and/or to have a particularly large Hamming distance between them and between the rest of the codebook, while within the rest of the codebook these two criteria might be considered relatively unimportant. Ideally, the language model would be adaptive (for example, supplying a predictive prior for each letter based on the previous three) which might mean that the codewords should be reassigned optimally after each letter. However, such considerations must remain beyond the scope of our study until we can either overcome the TTI-independent performance differences between codes (perhaps, as our results suggest, by careful stimulus design), or until we can model the source of these differences well enough to account for them in our optimization criterion. References [1] Bishop CM (1995) Neural Networks for Pattern Recognition. Clarendon Press, Oxford. [2] Blankertz B, et al. (2006) IEEE Trans. Neural Systems & Rehab. Eng. 14(2): 153–159 [3] Donchin E, Coles MGH (1988) Behavioural and Brain Sciences 11: 357–374 [4] Farwell LA, Donchin E (1988) Electroencephalography and Clinical Neurophysiology 70: 510–523 [5] Gestel T, et al. (2002) Neural Processing Letters, 15: 45–48 [6] Gonsalvez CL, Polich J (2002) Psychophysiology 39(3): 388–96 [7] Hill NJ, et al (2008) Technical Report #166, Max Planck Institute for Biological Cybernetics. [8] Krusienski DJ, et al. (2006) Journal of Neural Engineering 3(4): 299–305 [9] MacKay D (2005) Information Theory, Inference, and Learning Algorithms. Cambridge Univ. Press [10] Martens SMM, Hill NJ, Farquhar J, Sch¨olkopf B. (2007) Impact of Target-to-Target Interval on Classification Performance in the P300 Speller. Applied Neuroscience Conference, Nijmegen, The Netherlands. [11] Pritchard WS (1981) Psychological Bulletin 89: 506–540 [12] Rugg MD, Coles MGH (2002) Electrophysiology of mind. Oxford Psychology Series 25 [13] Serby H, Yom-Tov E, Inbar GF (2005) IEEE Trans. Neural Systems & Rehab. Eng. 13(1):89-98 [14] Wolpaw JR, et al. (2002) Clinical Neurophysiology 113: 767–791 [15] Woods DL, Hillyard SA, Courchesne E, Galambos R. (1980) Science, New Series 207(4431): 655–657. 8
2008
185
3,437
Supervised Dictionary Learning Julien Mairal INRIA-Willow project julien.mairal@inria.fr Francis Bach INRIA-Willow project francis.bach@inria.fr Jean Ponce Ecole Normale Sup´erieure jean.ponce@ens.fr Guillermo Sapiro University of Minnesota guille@ece.umn.edu Andrew Zisserman University of Oxford az@robots.ox.ac.uk Abstract It is now well established that sparse signal models are well suited for restoration tasks and can be effectively learned from audio, image, and video data. Recent research has been aimed at learning discriminative sparse models instead of purely reconstructive ones. This paper proposes a new step in that direction, with a novel sparse representation for signals belonging to different classes in terms of a shared dictionary and discriminative class models. The linear version of the proposed model admits a simple probabilistic interpretation, while its most general variant admits an interpretation in terms of kernels. An optimization framework for learning all the components of the proposed model is presented, along with experimental results on standard handwritten digit and texture classification tasks. 1 Introduction Sparse and overcomplete image models were first introduced in [1] for modeling the spatial receptive fields of simple cells in the human visual system. The linear decomposition of a signal using a few atoms of a learned dictionary, instead of predefined ones–such as wavelets–has recently led to state-of-the-art results for numerous low-level image processing tasks such as denoising [2], showing that sparse models are well adapted to natural images. Unlike principal component analysis decompositions, these models are in general overcomplete, with a number of basis elements greater than the dimension of the data. Recent research has shown that sparsity helps to capture higher-order correlation in data. In [3, 4], sparse decompositions are used with predefined dictionaries for face and signal recognition. In [5], dictionaries are learned for a reconstruction task, and the corresponding sparse models are used as features in an SVM. In [6], a discriminative method is introduced for various classification tasks, learning one dictionary per class; the classification process itself is based on the corresponding reconstruction error, and does not exploit the actual decomposition coefficients. In [7], a generative model for documents is learned at the same time as the parameters of a deep network structure. In [8], multi-task learning is performed by learning features and tasks are selected using a sparsity criterion. The framework we present in this paper extends these approaches by learning simultaneously a single shared dictionary as well as models for different signal classes in a mixed generative and discriminative formulation (see also [9], where a different discriminative term is added to the classical reconstructive one). Similar joint generative/discriminative frameworks have started to appear in probabilistic approaches to learning, e.g., [10, 11, 12, 13, 14], and in neural networks [15], but not, to the best of our knowledge, in the sparse dictionary learning framework. Section 2 presents a formulation for learning a dictionary tuned for a classification task, which we call supervised dictionary learning, and Section 3 its interpretation in term of probability and kernel frameworks. The optimization procedure is detailed in Section 4, and experimental results are presented in Section 5. 2 Supervised dictionary learning We present in this section the core of the proposed model. In classical sparse coding tasks, one considers a signal x in Rn and a fixed dictionary D = [d1, . . . , dk] in Rn×k (allowing k > n, making the dictionary overcomplete). In this setting, sparse coding with an ℓ1 regularization1 amounts to computing R⋆(x, D) = min α∈Rk ||x −Dα||2 2 + λ1||α||1. (1) It is well known in the statistics, optimization, and compressed sensing communities that the ℓ1 penalty yields a sparse solution, very few non-zero coefficients in α, although there is no explicit analytic link between the value of λ1 and the effective sparsity that this model yields. Other sparsity penalties using the ℓ0 regularization2 can be used as well. Since it uses a proper norm, the ℓ1 formulation of sparse coding is a convex problem, which makes the optimization tractable with algorithms such as those introduced in [16, 17], and has proven in practice to be more stable than its ℓ0 counterpart, in the sense that the resulting decompositions are less sensitive to small perturbations of the input signal x. Note that sparse coding with an ℓ0 penalty is an NP-hard problem and is often approximated using greedy algorithms. In this paper, we consider a setting, where the signal may belong to any of p different classes. We first consider the case of p = 2 classes and later discuss the multiclass extension. We consider a training set of m labeled signals (xi)m i=1 in Rn, associated with binary labels (yi ∈{−1, +1})m i=1. Our goal is to learn jointly a single dictionary D adapted to the classification task and a function f which should be positive for any signal in class +1 and negative otherwise. We consider in this paper two different models to use the sparse code α for the classification task: (i) linear in α: f(x, α, θ) = wT α + b, where θ = {w ∈Rk, b ∈R} parametrizes the model. (ii) bilinear in x and α: f(x, α, θ) = xT Wα + b, where θ = {W ∈Rn×k, b ∈R}. In this case, the model is bilinear and f acts on both x and its sparse code α. The number of parameters in (ii) is greater than in (i), which allows for richer models. Note that one can interpret W as a linear filter encoding the input signal x into a model for the coefficients α, which has a role similar to the encoder in [18] but for a discriminative task. A classical approach to obtain α for (i) or (ii) is to first adapt D to the data, solving min D,α m X i=1 ||xi −Dαi||2 2 + λ1||αi||1, (2) Note also that since the reconstruction errors ||xi −Dαi||2 2 are invariant to scaling simultaneously D by a scalar and αi by its inverse, we need to constrain the ℓ2 norm of the columns of D. Such a constraint is classical in sparse coding [2]. This reconstructive approach (dubbed REC in this paper) provides sparse codes αi for each signal xi, which can be used a posteriori in a regular classifier such as logistic regression, which would require to solve min θ m X i=1 C yif(xi, αi, θ)  + λ2||θ||2 2, (3) where C is the logistic loss function (C(x) = log(1 + e−x)), which enjoys properties similar to that of the hinge loss from the SVM literature, while being differentiable, and λ2 is a regularization parameter, which prevents overfitting. This is the approach chosen in [5] (with SVMs). However, our goal is to learn jointly D and the model parameters θ. To that effect, we propose the formulation min D,θ,α  m X i=1 C yif(xi, αi, θ)  + λ0||xi −Dαi||2 2 + λ1||αi||1  + λ2||θ||2 2, (4) where λ0 controls the importance of the reconstruction term, and the loss for a pair (xi, yi) is S⋆(xi, D, θ, yi) = min α S(α, xi, D, θ, yi), where S(α, xi, D, θ, yi) = C yif(xi, αi, θ)  + λ0||xi −Dαi||2 2 + λ1||αi||1. (5) In this setting, the classification procedure of a new signal x with an unknown label y, given a learned dictionary D and parameters θ, involves supervised sparse coding: min y∈{−1;+1} S⋆(x, D, θ, y), (6) The learning procedure of Eq. (4) minimizes the sum of the costs for the pairs (xi, yi)m i=1 and corresponds to a generative model. We will refer later to this model as SDL-G (supervised dictionary 1The ℓ1 norm of a vector x of size n is defined as ||x||1 = Pn i=1 |x[i]|. 2The ℓ0 pseudo-norm of a vector x is the number of nonzeros coefficients of x. Note that it is not a norm. w D xi αi yi i = 1, . . . , m Figure 1: Graphical model for the proposed generative/discriminative learning framework. learning, generative). Note the explicit incorporation of the reconstructive and discriminative component into sparse coding, in addition to the classical reconstructive term (see [9] for a different classification component). However, since the classification procedure from Eq. (6) compares the different costs S⋆(x, D, θ, y) of a given signal for each class y = −1, +1, a more discriminative approach is to not only make the costs S⋆(xi, D, θ, yi) small, as in (4), but also make the value of S⋆(xi, D, θ, −yi) greater than S⋆(xi, D, θ, yi), which is the purpose of the logistic loss function C. This leads to: min D,θ  m X i=1 C(S⋆(xi, D, θ, −yi) −S⋆(xi, D, θ, yi))  + λ2||θ||2 2. (7) As detailed below, this problem is more difficult to solve than (4), and therefore we adopt instead a mixed formulation between the minimization of the generative Eq. (4) and its discriminative version (7), (see also [13])—that is,  m X i=1 µC(S⋆(xi, D, θ, −yi) −S⋆(xi, D, θ, yi)) + (1 −µ)S⋆(xi, D, θ, yi)  + λ2||θ||2 2, (8) where µ controls the trade-off between the reconstruction from Eq. (4) and the discrimination from Eq. (7). This is the proposed generative/discriminative model for sparse signal representation and classification from learned dictionary D and model θ. We will refer to this mixed model as SDL-D, (supervised dictionary learning, discriminative). Note also that, again, we constrain the norm of the columns of D to be less than or equal to one. All of these formulations admit a straightforward multiclass extension, using softmax discriminative cost functions Ci(x1, ..., xp) = log(Pp j=1 exj−xi), which are multiclass versions of the logistic function, and learning one model θi per class. Other possible approaches such as one-vs-all or one-vs-one are of course possible, and the question of choosing the best approach among these possibilities is still open. Compared with earlier work using one dictionary per class [6], our model has the advantage of letting multiple classes share some features, and uses the coefficients α of the sparse representations as part of the classification procedure, thereby following the works from [3, 4, 5], but with learned representations optimized for the classification task similar to [9, 10]. Before presenting the optimization procedure, we provide below two interpretations of the linear and bilinear versions of our formulation in terms of a probabilistic graphical model and a kernel. 3 Interpreting the model 3.1 A probabilistic interpretation of the linear model Let us first construct a graphical model which gives a probabilistic interpretation to the training and classification criteria given above when using a linear model with zero bias (no constant term) on the coefficients—that is, f(x, α, θ) = wT α. It consists of the following components (Figure 1): • The matrices D and the vector w are parameters of the problem, with a Gaussian prior on w, p(w) ∝e−λ2||w||2 2, and a constraint on the columns of D–that is, ||dj||2 2 = 1 for all j. All the dj’s are considered independent of each other. • The coefficients αi are latent variables with a Laplace prior, p(αi) ∝e−λ1||αi||1. • The signals xi are generated according to a Gaussian probability distribution conditioned on D and αi, p(xi|αi, D) ∝e−λ0||xi−Dαi||2 2. All the xi’s are considered independent from each other. • The labels yi are generated according to a probability distribution conditioned on w and αi, and given by p(yi = ǫ|αi, W) = e−ǫwT αi/ e−WT αi + eWT αi . Given D and w, all the triplets (αi, xi, yi) are independent. What is commonly called “generative training” in the literature (e.g., [12, 13]), amounts to finding the maximum likelihood estimates for D and w according to the joint distribution p({xi, yi}m i=1, D, W), where the xi’s and the yi’s are the training signals and their labels respectively. It can easily be shown (details omitted due to space limitations) that there is an equivalence between this generative training and our formulation in Eq. (4) under MAP approximations.3 Although joint generative modeling of x and y through a shared representation has shown great promise [10], we show in this paper that a more discriminative approach is desirable. “Discriminative training” is slightly different and amounts to maximizing p({yi}m i=1, D, w|{xi}m i=1) with respect to D and w: Given some input data, one finds the best parameters that will predict the labels of the data. The same kind of MAP approximation relates this discriminative training formulation to the discriminative model of Eq. (7) (again, details omitted due to space limitations). The mixed approach from Eq. (8) is a classical trade-off between generative and discriminative (e.g., [12, 13]), where generative components are often added to discriminative frameworks to add robustness, e.g., to noise and occlusions (see examples of this for the model in [9]). 3.2 A kernel interpretation of the bilinear model Our bilinear model with f(x, α, θ) = xT Wα + b does not admit a straightforward probabilistic interpretation. On the other hand, it can easily be interpreted in terms of kernels: Given two signals x1 and x2, with coefficients α1 and α2, using the kernel K(x1, x2) = αT 1 α2xT 1 x2 in a logistic regression classifier amounts to finding a decision function of the same form as f. It is a product of two linear kernels, one on the α’s and one on the input signals x. Interestingly, Raina et al. [5] learn a dictionary adapted to reconstruction on a training set, then train an SVM a posteriori on the decomposition coefficients α. They derive and use a Fisher kernel, which can be written as K′(x1, x2) = αT 1 α2rT 1 r2 in this setting, where the r’s are the residuals of the decompositions. In simple experiments, which are not reported in this paper, we have observed that the kernel K, where the signals x replace the residuals r, generally yields a level of performance similar to K′ and often actually does better when the number of training samples is small or the data are noisy. 4 Optimization procedure Classical dictionary learning techniques (e.g., [1, 5, 19]), address the problem of learning a reconstructive dictionary D in Rn×k well adapted to a training set, which is presented in Eq. (3). It can be seen as an optimization problem with respect to the dictionary D and the coefficients α. Altough not jointly convex in (D, α), it is convex with respect to each unknown when the other one is fixed. This is why block coordinate descent on D and α performs reasonably well [1, 5, 19], although not necessarily providing the global optimum. Training when µ = 0 (generative case), i.e., from Eq. (4), enjoys similar properties and can be addressed with the same optimization procedure. Equation (4) can be rewritten as: min D,θ,α  m X i=1 S(xj, αj, D, θ, yi)  + λ2||θ||2 2, s.t. ∀j = 1, . . . , k, ||dj||2 ≤1. (9) Block coordinate descent consists therefore of iterating between supervised sparse coding, where D and θ are fixed and one optimizes with respect to the α’s and supervised dictionary update, where the coefficients αi’s are fixed, but D and θ are updated. Details on how to solve these two problems are given in sections 4.1 and 4.2. The discriminative version SDL-D from Eq. (7) is more problematic. To reach a local minimum for this difficult non-convex optimization problem, we have chosen a continuation method, starting from the generative case and ending with the discriminative one as in [6]. The algorithm is presented in Figure 2, and details on the hyperparameters’ settings are given in Section 5. 4.1 Supervised sparse coding The supervised sparse coding problem from Eq. (6) (D and θ are fixed in this step) amounts to minimizing a convex function under an ℓ1 penalty. The fixed-point continuation method (FPC) from 3We are also investigating how to properly estimate D by marginalizing over α instead of maximizing with respect to α. Input: n (signal dimensions); (xi, yi)m i=1 (training signals); k (size of the dictionary); λ0, λ1, λ2 (parameters); 0 ≤µ1 ≤µ2 ≤. . . ≤µm ≤1 (increasing sequence). Output: D ∈Rn×k (dictionary); θ (parameters). Initialization: Set D to a random Gaussian matrix with normalized columns. Set θ to zero. Loop: For µ = µ1, . . . , µm, Loop: Repeat until convergence (or a fixed number of iterations), • Supervised sparse coding: Solve, for all i = 1, . . . , m,  α⋆ i,−= arg minα S(α, xi, D, θ, −1) α⋆ i,+ = arg minα S(α, xi, D, θ, +1) . (10) • Dictionary and parameters update: Solve min D,θ  m X i=1 µC (S(α⋆ i,−, xi, D, θ, −yi) −S(α⋆ i,+, xj, D, θ, yi))  + (1 −µ)S(α⋆ i,yi, xi, D, θ, yi) + λ2||θ||2 2  s.t. ∀j, ||dj||2 ≤1. (11) Figure 2: SDL: Supervised dictionary learning algorithm. [17] achieves good results in terms of convergence speed for this class of problems. For our specific problem, denoting by g the convex function to minimize, this method only requires ∇g and a bound on the spectral norm of its Hessian Hg. Since the we have chosen models g which are both linear in α, there exists, for each supervised sparse coding problem, a vector a in Rk and a scalar c in R such that ( g(α) = C(aT α + c) + λ0||x −Dα||2 2, ∇g(α) = ∇C(aT α + c)a −2λ0DT (x −Dα), and it can be shown that, if ||U||2 denotes the spectral norm of a matrix U (which is the magnitude of its largest eigenvalue), then we can obtain the following bound, ||Hg(α)||2 ≤|HC(aT α+c)|||a||2 2+ 2λ0||DT D||2. 4.2 Dictionary update The problem of updating D and θ in Eq. (11) is not convex in general (except when µ is close to 0), but a local minimum can be obtained using projected gradient descent (as in the general literature on dictionary learning, this local minimum has experimentally been found to be good enough in terms of classification performance). ). Denoting E(D, θ) the function we want to minimize in Eq. (11), we just need the partial derivatives of E with respect to D and the parameters θ. When considering the linear model for the α’s, f(x, α, θ) = wT α + b, and θ = {w ∈Rk, b ∈R}, we obtain                          ∂E ∂D = −2λ0 m X i=1 X z={−1,+1} ωi,z(xi −Dα⋆ i,z)α⋆T i,z  , ∂E ∂w = m X i=1 X z={−1,+1} ωi,zz∇C(wT α⋆ i,z + b)α⋆ i,z, ∂E ∂b = m X i=1 X z={−1,+1} ωi,zz∇C(wT α⋆ i,z + b), (12) where ωi,z = −µz∇C S(α⋆ i,−, xi, D, θ, −yi) −S(α⋆ i,+, xi, D, θ, yi)  + (1 −µ)1z=yi. Partial derivatives when using our model with multiple classes or with the bilinear models f(x, α, θ) = xT Wα + b are not presented in this paper due to space limitations. 5 Experimental validation We compare in this section the reconstructive approach, dubbed REC, which consists of learning a reconstructive dictionary D as in [5] and then learning the parameters θ a posteriori; SDL with generative training (dubbed SDL-G); and SDL with discriminative learning (dubbed SDL-D). We also compare the performance of the linear (L) and bilinear (BL) models. REC L SDL-G L SDL-D L REC BL k-NN, ℓ2 SVM-Gauss MNIST 4.33 3.56 1.05 3.41 5.0 1.4 USPS 6.83 6.67 3.54 4.38 5.2 4.2 Table 1: Error rates on the MNIST and USPS datasets in percents for the REC, SDL-G L and SDL-D L approaches, compared with k-nearest neighbor and SVM with a Gaussian kernel [20]. Before presenting experimental results, let us briefly discuss the choice of the five model parameters λ0, λ1, λ2, µ and k (size of the dictionary). Tuning all of them using cross-validation is cumbersome and unnecessary since some simple choices can be made, some of which can be made sequentially. We define first the sparsity parameter κ = λ1 λ0 , which dictates how sparse the decompositions are. When the input data points have unit ℓ2 norm, choosing κ = 0.15 was empirically found to be a good choice. For reconstructive tasks, a typical value often used in the literature (e.g., [19]) is k = 256 for m = 100 000 signals. Nevertheless, for discriminative tasks, increasing the number of parameters is likely to lead to overfitting, and smaller values like k = 64 or k = 32 are preferred. The scalar λ2 is a regularization parameter for preventing the model to overfit the input data. As in logistic regression or support vector machines, this parameter is crucial when the number of training samples is small. Performing cross validation with the fast method REC quickly provides a reasonable value for this parameter, which can be used afterward for SDL-G or SDL-D. Once κ, k and λ2 are chosen, let us see how to find λ0, which plays the important role of controlling the trade-off between reconstruction and discrimination. First, we perform cross-validation for a few iterations with µ = 0 to find a good value for SDL-G. Then, a scale factor making the costs S⋆discriminative for µ > 0 can be chosen during the optimization process: Given a set of computed costs S⋆, one can compute a scale factor γ⋆such that γ⋆= arg minγ Pm i=1 C({γ(S⋆(xi, D, θ, −yi) − S⋆(xi, D, θ, yi)). We therefore propose the following strategy, which has proven to be effective in our experiments: Starting from small values for λ0 and a fixed κ, we apply the algorithm in Figure 2, and after a supervised sparse coding step, we compute the best scale factor γ⋆, and replace λ0 and λ1 by γ⋆λ0 and γλ1. Typically, applying this procedure during the first 10 iterations has proven to lead to reasonable values for these parameters. Since we are following a continuation path from µ = 0 to µ = 1, the optimal value of µ is found along the path by measuring the classification performance of the model on a validation set during the optimization. 5.1 Digits recognition In this section, we present experiments on the popular MNIST [20] and USPS handwritten digit datasets. MNIST is composed of 70 000 28×28 images, 60 000 for training, 10 000 for testing, each of them containing one handwritten digit. USPS is composed of 7291 training images and 2007 test images of size 16 × 16. As is often done in classification, we have chosen to learn pairwise binary classifiers, one for each pair of digits. Although our framework extends to a multiclass formulation, pairwise binary classifiers have resulted in slightly better performance in practice. Five-fold cross validation is performed to find the best pair (k, κ). The tested values for k are {24, 32, 48, 64, 96}, and for κ, {0.13, 0.14, 0.15, 0.16, 0.17}. We keep the three best pairs of parameters and use them to train three sets of pairwise classifiers. For a given image x, the test procedure consists of selecting the class which receives the most votes from the pairwise classifiers. All the other parameters are obtained using the procedure explained above. Classification results are presented on Table 1 using the linear model. We see that for the linear model L, SDL-D L performs the best. REC BL offers a larger feature space and performs better than REC L, but we have observed no gain by using SDL-G BL or SDL-D BL instead of REC BL (this results are not reported in this table). Since the linear model is already performing very well, one side effect of using BL instead of L is to increase the number of free parameters and thus to cause overfitting. Note that our method is competitive since the best error rates published on these datasets (without any modification of the training set) are 0.60% [18] for MNIST and 2.4% [21] for USPS, using methods tailored to these tasks, whereas ours is generic and has not been tuned for the handwritten digit classification domain. The purpose of our second experiment is not to measure the raw performance of our algorithm, but to answer the question “are the obtained dictionaries D discriminative per se?”. To do so, we have trained on the USPS dataset 10 binary classifiers, one per digit in a one vs all fashion on the training set. For a given value of µ, we obtain 10 dictionaries D and 10 sets of parameters θ, learned by the SDL-D L model. To evaluate the discriminative power of the dictionaries D, we discard the learned parameters θ and use the dictionaries as if they had been learned in a reconstructive REC model: For each dictionary, (a) REC, MNIST (b) SDL-D, MNIST 0 0.5 1.0 1.5 2.0 2.5 0 0.2 0.4 0.6 0.8 1.0 Figure 3: On the left, a reconstructive and a discriminative dictionary. On the right, average error rate in percents obtained by our dictionaries learned in a discriminative framework (SDL-D L) for various values of µ, when used at test time in a reconstructive framework (REC-L). m REC L SDL-G L SDL-D L REC BL SDL-G BL SDL-D BL Gain 300 48.84 47.34 44.84 26.34 26.34 26.34 0% 1 500 46.8 46.3 42 22.7 22.3 22.3 2% 3 000 45.17 45.1 40.6 21.99 21.22 21.22 4% 6 000 45.71 43.68 39.77 19.77 18.75 18.61 6% 15 000 47.54 46.15 38.99 18.2 17.26 15.48 15% 30 000 47.28 45.1 38.3 18.99 16.84 14.26 25% Table 2: Error rates for the texture classification task using various methods and sizes m of the training set. The last column indicates the gain between the error rate of REC BL and SDL-D BL. we decompose each image from the training set by solving the simple sparse reconstruction problem from Eq. (1) instead of using supervised sparse coding. This provides us with some coefficients α, which we use as features in a linear SVM. Repeating the sparse decomposition procedure on the test set permits us to evaluate the performance of these learned linear SVMs. We plot the average error rate of these classifiers on Figure 3 for each value of µ. We see that using the dictionaries obtained with discrimative learning (µ > 0, SDL-D L) dramatically improves the performance of the basic linear classifier learned a posteriori on the α’s, showing that our learned dictionaries are discriminative per se. Figure 3 also shows a dictionary adapted to the reconstruction of the MNIST dataset and a discriminative one, adapted to “9 vs all”. 5.2 Texture classification In the digit recognition task, our bilinear framework did not perform better than the linear one L. We believe that one of the main reasons is due to the simplicity of the task, where a linear model is rich enough. The purpose of our next experiment is to answer the question “When is BL worth using?”. We have chosen to consider two texture images from the Brodatz dataset, presented in Figure 4, and to build two classes, composed of 12×12 patches taken from these two textures. We have compared the classification performance of all our methods, including BL, for a dictionary of size k = 64 and κ = 0.15. The training set was composed of patches from the left half of each texture and the test sets of patches from the right half, so that there is no overlap between them in the training and test set. Error rates are reported in Table 2 for varying sizes of the training set. This experiment shows that in some cases, the linear model performs very poorly where BL does better. Discrimination helps especially when the size of the training set is large. Note that we did not perform any crossvalidation to optimize the parameters k and κ for this experiment. Dictionaries obtained with REC and SDL-D BL are presented in Figure 4. Note that though they are visually quite similar, they lead to very different performances. 6 Conclusion we have introduced in this paper a discriminative approach to supervised dictionary learning that effectively exploits the corresponding sparse signal decompositions in image classification tasks, and have proposed an effective method for learning a shared dictionary and multiple (linear or bilinear) models. Future work will be devoted to adapting the proposed framework to shift-invariant models that are standard in image processing tasks, but not readily generalized to the sparse dictionary learning setting. We are also investigating extensions to unsupervised and semi-supervised learning and applications to natural image classification. (a) Texture 1 (b) Texture 2 (c) REC (d) SDL-D BL Figure 4: Left: test textures. Right: reconstructive and discriminative dictionaries Acknowledgments This paper was supported in part by ANR under grant MGA. Guillermo Sapiro would like to thank Fernando Rodriguez for insights into the learning of discriminatory sparsity patterns. His work is partially supported by NSF, NGA, ONR, ARO, and DARPA. References [1] B. A. Olshausen and D. J. Field. Sparse coding with an overcomplete basis set: A strategy employed by v1? Vision Research, 37, 1997. [2] M. Elad and M. Aharon. Image denoising via sparse and redundant representations over learned dictionaries. IEEE Trans. IP, 54(12), 2006. [3] K. Huang and S. Aviyente. Sparse representation for signal classification. In NIPS, 2006. [4] J. Wright, A. Y. Yang, A. Ganesh, S. Sastry, and Y. Ma. Robust face recognition via sparse representation. In PAMI, 2008. to appear. [5] R. Raina, A. Battle, H. Lee, B. Packer, and A. Y. Ng. Self-taught learning: transfer learning from unlabeled data. In ICML, 2007. [6] J. Mairal, F. Bach, J. Ponce, G. Sapiro, and A. Zisserman. Learning discriminative dictionaries for local image analysis. In CVPR, 2008. [7] M. Ranzato and M. Szummer. Semi-supervised learning of compact document representations with deep networks. In ICML, 2008. [8] A. Argyriou and T. Evgeniou and M. Pontil Multi-Task Feature Learning. In NIPS, 2006. [9] F. Rodriguez and G. Sapiro. Sparse representations for image classification: Learning discriminative and reconstructive non-parametric dictionaries. IMA Preprint 2213, 2007. [10] D. Blei and J. McAuliffe. Supervised topic models. In NIPS, 2007. [11] A. Holub and P. Perona. A discriminative framework for modeling object classes. In CVPR, 2005. [12] J.A. Lasserre, C.M. Bishop, and T.P. Minka. Principled hybrids of generative and discriminative models. In CVPR, 2006. [13] R. Raina, Y. Shen, A. Y. Ng, and A. McCallum. Classification with hybrid generative/discriminative models. In NIPS, 2004. [14] R. R. Salakhutdinov and G. E. Hinton. Learning a non-linear embedding by preserving class neighbourhood structure. In AI and Statistics, 2007. [15] H. Larochelle, and Y. Bengio. Classification using discriminative restricted boltzmann machines. in ICML, 2008. [16] B. Efron, T. Hastie, I. Johnstone, and R. Tibshirani. Least angle regression. Ann. Stat., 32(2), 2004. [17] E. T. Hale, W. Yin, and Y. Zhang. A fixed-point continuation method for l1-regularized minimization with applications to compressed sensing. CAAM Tech Report TR07-07, 2007. [18] M. Ranzato, C. Poultney, S. Chopra, and Y. LeCun. Efficient learning of sparse representations with an energy-based model. In NIPS, 2006. [19] M. Aharon, M. Elad, and A. M. Bruckstein. The K-SVD: An algorithm for designing of overcomplete dictionaries for sparse representations. IEEE Trans. SP, 54(11), 2006. [20] Y. LeCun, L. Bottou, Y. Bengio, and P. Haffner. Gradient-based learning applied to document recognition. Proc. of the IEEE, 86(11), 1998. [21] B. Haasdonk and D. Keysers. Tangent distant kernels for support vector machines. In ICPR, 2002.
2008
186
3,438
Natural Image Denoising with Convolutional Networks Viren Jain1 1Brain & Cognitive Sciences Massachusetts Institute of Technology H. Sebastian Seung1,2 2Howard Hughes Medical Institute Massachusetts Institute of Technology Abstract We present an approach to low-level vision that combines two main ideas: the use of convolutional networks as an image processing architecture and an unsupervised learning procedure that synthesizes training samples from specific noise models. We demonstrate this approach on the challenging problem of natural image denoising. Using a test set with a hundred natural images, we find that convolutional networks provide comparable and in some cases superior performance to state of the art wavelet and Markov random field (MRF) methods. Moreover, we find that a convolutional network offers similar performance in the blind denoising setting as compared to other techniques in the non-blind setting. We also show how convolutional networks are mathematically related to MRF approaches by presenting a mean field theory for an MRF specially designed for image denoising. Although these approaches are related, convolutional networks avoid computational difficulties in MRF approaches that arise from probabilistic learning and inference. This makes it possible to learn image processing architectures that have a high degree of representational power (we train models with over 15,000 parameters), but whose computational expense is significantly less than that associated with inference in MRF approaches with even hundreds of parameters. 1 Background Low-level image processing tasks include edge detection, interpolation, and deconvolution. These tasks are useful both in themselves, and as a front-end for high-level visual tasks like object recognition. This paper focuses on the task of denoising, defined as the recovery of an underlying image from an observation that has been subjected to Gaussian noise. One approach to image denoising is to transform an image from pixel intensities into another representation where statistical regularities are more easily captured. For example, the Gaussian scale mixture (GSM) model introduced by Portilla and colleagues is based on a multiscale wavelet decomposition that provides an effective description of local image statistics [1, 2]. Another approach is to try and capture statistical regularities of pixel intensities directly using Markov random fields (MRFs) to define a prior over the image space. Initial work used handdesigned settings of the parameters, but recently there has been increasing success in learning the parameters of such models from databases of natural images [3, 4, 5, 6, 7, 8]. Prior models can be used for tasks such as image denoising by augmenting the prior with a noise model. Alternatively, an MRF can be used to model the probability distribution of the clean image conditioned on the noisy image. This conditional random field (CRF) approach is said to be discriminative, in contrast to the generative MRF approach. Several researchers have shown that the CRF approach can outperform generative learning on various image restoration and labeling tasks [9, 10]. CRFs have recently been applied to the problem of image denoising as well [5]. 1 The present work is most closely related to the CRF approach. Indeed, certain special cases of convolutional networks can be seen as performing maximum likelihood inference on a CRF [11]. The advantage of the convolutional network approach is that it avoids a general difficulty with applying MRF-based methods to image analysis: the computational expense associated with both parameter estimation and inference in probabilistic models. For example, naive methods of learning MRFbased models involve calculation of the partition function, a normalization factor that is generally intractable for realistic models and image dimensions. As a result, a great deal of research has been devoted to approximate MRF learning and inference techniques that meliorate computational difficulties, generally at the cost of either representational power or theoretical guarantees [12, 13]. Convolutional networks largely avoid these difficulties by posing the computational task within the statistical framework of regression rather than density estimation. Regression is a more tractable computation and therefore permits models with greater representational power than methods based on density estimation. This claim will be argued for with empirical results on the denoising problem, as well as mathematical connections between MRF and convolutional network approaches. 2 Convolutional Networks Convolutional networks have been extensively applied to visual object recognition using architectures that accept an image as input and, through alternating layers of convolution and subsampling, produce one or more output values that are thresholded to yield binary predictions regarding object identity [14, 15]. In contrast, we study networks that accept an image as input and produce an entire image as output. Previous work has used such architectures to produce images with binary targets in image restoration problems for specialized microscopy data [11, 16]. Here we show that similar architectures can also be used to produce images with the analog fluctuations found in the intensity distributions of natural images. Network Dynamics and Architecture A convolutional network is an alternating sequence of linear filtering and nonlinear transformation operations. The input and output layers include one or more images, while intermediate layers contain “hidden" units with images called feature maps that are the internal computations of the algorithm. The activity of feature map a in layer k is given by Ik,a = f X b wk,ab ⊗Ik−1,b −θk,a ! (1) where Ik−1,b are feature maps that provide input to Ik,a, and ⊗denotes the convolution operation. The function f is the sigmoid f(x) = 1/ (1 + e−x) and θk,a is a bias parameter. We restrict our experiments to monochrome images and hence the networks contain a single image in the input layer. It is straightforward to extend this approach to color images by assuming an input layer with multiple images (e.g., RGB color channels). For numerical reasons, it is preferable to use input and target values in the range of 0 to 1, and hence the 8-bit integer intensity values of the dataset (values from 0 to 255) were normalized to lie between 0 and 1. We also explicitly encode the border of the image by padding an area surrounding the image with values of −1. Learning to Denoise Parameter learning can be performed with a modification of the backpropagation algorithm for feedfoward neural networks that takes into account the weight-sharing structure of convolutional networks [14]. However, several issues have to be addressed in order to learn the architecture in Figure 1 for the task of natural image denoising. Firstly, the image denoising task must be formulated as a learning problem in order to train the convolutional network. Since we assume access to a database of only clean, noiseless images, we implicitly specify the desired image processing task by integrating a noise process into the training procedure. In particular, we assume a noise process n(x) that operates on an image xi drawn from a distribution of natural images X. If we consider the entire convolutional network to be some function 2 input image I1,24 I1,2 I1,1 . . . I2,24 I2,2 I2,1 . . . I3,24 I3,2 I3,1 . . . I4,24 I4,2 I4,1 . . . output image Architecture of CN1 and CN2 Figure 1: Architecture of convolutional network used for denoising. The network has 4 hidden layers and 24 feature maps in each hidden layer. In layers 2, 3, and 4, each feature map is connected to 8 randomly chosen feature maps in the previous layer. Each arrow represents a single convolution associated with a 5 × 5 filter, and hence this network has 15,697 free parameters and requires 624 convolutions to process its forward pass. Fφ with free parameters φ, then the parameter estimation problem is to minimize the reconstruction error of the images subject to the noise process: minφ P i(xi −Fφ(n(xi)))2). Secondly, it is inefficient to use batch learning in this context. The training sets used in the experiments have millions of pixels, and it is not practical to perform both a forward and backward pass on the entire training set when gradient learning requires many tens of thousands of updates to converge to a reasonable solution. Stochastic online gradient learning is a more efficient learning procedure that can be adapted to this problem. Typically, this procedure selects a small number of independent examples from the training set and averages together their gradients to perform a single update. We compute a gradient update from 6 × 6 patches randomly sampled from six different images in the training set. Using a localized image patch violates the independence assumption in stochastic online learning, but combining the gradient from six separate images yields a 6 × 6 × 6 cube that in practice is a sufficient approximation of the gradient to be effective. Larger patches (we tried 8×8 and 10×10) reduce correlations in the training sample but do not improve accuracy. This scheme is especially efficient because most of the computation for a local patch is shared. We found that training time is minimized and generalization accuracy is maximized by incrementally learning each layer of weights. Greedy, layer-wise training strategies have recently been explored in the context of unsupervised initialization of multi-layer networks, which are usually fine tuned for some discriminative task with a different cost function [17, 18, 19]. We maintain the same cost function throughout. This procedure starts by training a network with a single hidden layer. After thirty epochs, the weights from the first hidden layer are copied to a new network with two hidden layers; the weights connecting the hidden layer to the output layer are discarded. The two hidden layer network is optimized for another thirty epochs, and the procedure is repeated for N layers. Finally, when learning networks with two or more hidden layers it was important to use a very small learning rate for the final layer (0.001) and a larger learning rate (0.1) in all other layers. Implementation Convolutional network inference and learning can be implemented in just a few lines of MATLAB code using multi-dimensional convolution and cross-correlation routines. This also makes the approach especially easy to optimize using parallel computing or GPU computing strategies. 3 Experiments We derive training and test sets for our experiments from natural images in the Berkeley segmentation database, which has been previously used to study denoising [20, 4]. We restrict our experiments to the case of monochrome images; color images in the Berkeley dataset are converted to grayscale by averaging the color channels. The test set consists of 100 images, 77 with dimensions 321 × 481 and 23 with dimensions 481 × 321. Quantitative comparisons are performed using the Peak Signal 3 25 50 100 19 20 21 22 23 24 25 26 27 28 29 30 31 Denoising Performance Comparison Noise σ Average PSNR of Denoised Images FoE BLS−GSM 1 BLS−GSM 2 CN1 CN2 CNBlind Figure 2: Denoising results as measured by peak signal to noise ratio (PSNR) for 3 different noise levels. In each case, results are the average denoised PSNR of the hundred images in the test set. CN1 and CNBlind are learned using the same forty image training set as the Field of Experts model (FoE). CN2 is learned using a training set with an additional sixty images. BLS-GSM1 and BLS-GSM2 are two different parameter settings of the algorithm in [1]. All methods except CNBlind assume a known noise distribution. to Noise Ratio (PSNR): 20 log10(255/σe), where σe is the standard deviation of the error. PSNR has been widely used to evaluate denoising performance [1, 4, 2, 5, 6, 7]. Denoising with known noise conditions In this task it is assumed that images have been subjected to Gaussian noise of known variance. We use this noise model during the training process and learn a five-layer network for each noise level. Both the Bayes Least Squares-Gaussian Scale Mixture (BLS-GSM) and Field of Experts (FoE) method also optimize the denoising process based on a specified noise level. We learn two sets of networks for this task that differ in their training set. In one set of networks, which we refer to as CN1, the training set is the same subset of the Berkeley database used to learn the FoE model [4]. In another set of networks, called CN2, this training set is augmented by an additional sixty images from the Berkeley database. The architecture of these networks is shown in Fig. 1. Quantitative results from both networks under three different noise levels are shown in Fig. 2, along with results from the FoE and BLS-GSM method (BLS-GSM 1 is the same settings used in [1] while BLS-GSM 2 is the default settings in the code provided by the authors). For the FoE results, the number of iterations and magnitude of the step size are optimized for each noise level using a grid search on the training set. A visual comparison of these results is shown in Fig. 3. We find that the convolutional network has the highest average PSNR using either training set, although by a margin that is within statistical insignificance when standard error is computed from the distribution of PSNR values of the entire image. However, we believe this is a conservative estimate of the standard error, which is much smaller when measured on a pixel or patch-wise basis. Blind denoising In this task it is assumed that images have been subjected to Gaussian noise of unknown variance. Denoising in this context is a more difficult problem than in the non-blind situation. We train a single six-layer network network we refer to as CNBlind by randomly varying the amount of noise added to each example in the training process, in the range of σ = [0, 100] . During inference, the noise level is unknown and only the image is provided as input. We use the same training set as the FoE model and CN1. The architecture is the same as that shown in Fig. 1 except with 5 hidden layers instead of 4. Results for 3 noise levels are shown in Fig. 2. We find that a convolutional network trained for blind denoising performs well even compared to the other methods under non-blind conditions. In Fig. 4, we show filters that were learned for this network. 4 CLEAN NOISY PSNR=14.96 CN2 PSNR=24.25 BLS-GSM PSNR=23.78 FoE PSNR=23.02 CLEAN CN2 FoE BLS-GSM Figure 3: Denoising results on an image from the test set. The noisy image was generated by adding Gaussian noise with σ = 50 to the clean image. Non-blind denoising results for the BLS-GSM, FoE, and convolutional network methods are shown. The lower left panel shows results for the outlined region in the upper left panel. The zoomed in region shows that in some areas CN2 output has less severe artifacts than the wavelet-based results and is sharper than the FoE results. CN1 results (PSNR=24.12) are visually similar to those of CN2. 4 Relationship between MRF and Convolutional Network Approaches In the introduction, we claim that convolutional networks have similar or even greater representational power compared to MRFs. To support this claim, we will show that special cases of convolutional networks correspond to mean field inference for an MRF. This does not rigorously prove that convolutional networks have representational power greater than or equal to MRFs, since mean field inference is an approximation. However, it is plausible that this is the case. Previous work has pointed out that the Field of Experts MRF can be interpreted as a convolutional network (see [21]) and that MRFs with an Ising-like prior can be related to convolutional networks (see [11]). Here, we analyze a different MRF that is specially designed for image denoising and show that it is closely related to the convolutional network in Figure 1. In particular, we consider an MRF that defines a distribution over analog “visible” variables v and binary “hidden” variables h: P(v, h) = 1 Z exp −1 2σ2 X i v2 i + 1 σ2 X ia ha i (wa ⊗v)i + 1 2 X iab ha i (wab ⊗hb)i ! (2) where vi and hi correspond to the ith pixel location in the image, Z is the partition function, and σ is the known standard deviation of the Gaussian noise. Note that by symmetry we have wab i−j = wba j−i, 5 Layer 1 Layer 2 Figure 4: Filters learned for the first 2 hidden layers of network CNBlind. The second hidden layer has 192 filters (24 feature maps × 8 filters per map). The first layer has recognizable structure in the filters, including both derivative filters as well as high frequency filters similar to those learned by the FoE model [4, 6]. and we assume waa 0 = 0 so there is no self interaction in the model (if this were not the case, one could always transfer this to a term that is linear in ha i , which would lead to an additional bias term in the mean field approximation). Hence, P(v,h) constitutes an undirected graphical model which can be conceptualized as having separate layers for the visible and hidden variables. There are no intralayer interactions in the visible layer and convolutional structure (instead of full connectivity) in the intralayer interactions between hidden variables and interlayer interactions between the visible and hidden layer. From the definition of P(v,h) it follows that the conditional distribution, P(v| h)  exp    1 2 2  i  vi   a (wa  ha)i  2  (3) is Gaussian with mean vi =  a(wa ha)i. This is also equal to the conditional expectation E [v| h]. We can use this model for denoising by fixing the visible variables to the noisy image, computing the most likely hidden variables h by MAP inference, and regarding the conditional expectation of P(v| h ) as the denoised image. To do inference we would like to calculate maxh P (h| v), but this is difficult because of the partition function. However, we can consider the mean field approximation, ha i = f  1  2 (wa  v)i +  b (wab  hb)i  (4) which can be solved by regarding the equation as a dynamics and iterating it. If we compare this to Eq. 1, we find that this is equivalent to a convolutional network in which each hidden layer has the same weights and each feature map directly receives input from the image. These results suggest that certain convolutional networks can be interpreted as performing approximate inference on MRF models designed for denoising. In practice, the convolutional network architectures we train are not exactly related to such MRF models because the weights of each hidden layer are not constrained to be the same, nor is the image an input to any feature map except those in the first layer. An interesting question for future research is how these additional architectural constraints would affect performance of the convolutional network approach. Finally, although the special case of non-blind Gaussian denoising allows for direct integration of the noise model into the MRF equations, our empirical results on blind denoising suggest that the convolutional network approach is adaptable to more general and complex noise models when specified implicitly through the learning cost function. 5 Discussion Prior versus learned structure Before learning, the convolutional network has little structure specialized to natural images. In contrast, the GSM model uses a multi-scale wavelet representation that is known for its suitability in 6 representing natural image statistics. Moreover, inference in the FoE model uses a procedure similar to non-linear diffusion methods, which have been previously used for natural image processing without learning. The architecture of the FoE MRF is so well chosen that even random settings of the free parameters can provide impressive performance [21]. Random parameter settings of the convolutional networks do not produce any clearly useful computation. If the parameters of CN2 are randomized in just the last layer, denoising performance for the image in Fig. 3 drops from PSNR=24.25 to 14.87. Random parameters in all layers yields even worse results. This is consistent with the idea that nothing in CN2’s representation is specialized to natural images before training, other than the localized receptive field structure of convolutions. Our approach instead relies on a gradient learning algorithm to tune thousands of parameters using examples of natural images. One might assume this approach would require vastly more training data than other methods with more prior structure. However, we obtain good generalization performance using the same training set as that used to learn the Field of Experts model, which has many fewer degrees of freedom. The disadvantage of this approach is that it produces an architecture whose performance is more difficult to understand due to its numerous free parameters. The advantage of this approach is that it may lead to more accurate performance, and can be applied to novel forms of imagery that have very different statistics than natural images or any previously studied dataset (an example of this is the specialized image restoration problem studied in [11]). Network architecture and using more image context The amount of image context the convolutional network uses to produce an output value for a specific image location is determined by the number of layers in the network and size of filter in each layer. For example, the 5 and 6-layer networks explored here respectively use a 20×20 and 24×24 image patch. This is a relatively small amount of context compared to that used by the FoE and BLSGSM models, both of which permit correlations to extend over the entire image. It is surprising that despite this major difference, the convolutional network approach still provides good performance. One explanation could be that the scale of objects in the chosen image dataset may allow for most relevant information to be captured in a relatively small field of view. Nonetheless, it is of interest for denoising as well as other applications to increase the amount of context used by the network. A simple strategy is to further increase the number of layers; however, this becomes computationally intensive and may be an inefficient way to exploit the multi-scale properties of natural images. Adding additional machinery in the network architecture may work better. Integrating the operations of sub-sampling and super-sampling would allow a network to process the image at multiple scales, while still being entirely amenable to gradient learning. Computational efficiency With many free parameters, convolutional networks may seem like a computationally expensive image processing architecture. On the contrary, the 5-layer CN1 and CN2 architecture (Fig. 1) requires only 624 image convolutions to process an image. In comparison, the FoE model performs inference by means of a dynamic process that can require several thousand iterations. One-thousand iterations of these dynamics requires 48,000 convolutions (for an FoE model with 24 filters). We also report wall-clock speed by denoising a 512 × 512 pixel image on a 2.16Ghz Intel Core 2 processor. Averaged over 10 trials, CN1/CN2 requires 38.86 ± 0.1 sec., 1,000 iterations of the FoE requires 1664.35 ± 30.23 sec. (using code from the authors of [4]), the BLS-GSM model with parameter settings “1” requires 51.86 ± 0.12 sec., and parameter setting “2” requires 26.51 ± 0.15 sec. (using code from the authors of [1]). All implementations are in MATLAB. It is true, however, that training the convolutional network architecture requires substantial computation. As gradient learning can require many thousands of updates to converge, training the denoising networks required a parallel implementation that utilized a dozen processors for a week. While this is a significant amount of computation, it can be performed off-line. Learning more complex image transformations and generalized image attractors models In this work we have explored an image processing task which can be easily formulated as a learning problem by synthesizing training examples from abundantly available noiseless natural images. Can 7 this approach be extended to tasks in which the noise model has a more variable or complex form? Our results on blind denoising, in which the amount of noise may vary from little to severe, provides some evidence that it can. Preliminary experiments on image inpainting are also encouraging. That said, a major virtue of the image prior approach is the ability to easily reuse a single image model in novel situations by simply augmenting the prior with the appropriate observation model. This is possible because the image prior and the observation model are decoupled. Yet explicit probabilistic modeling is computationally difficult and makes learning even simple models challenging. Convolutional networks forgo probabilistic modeling and, as developed here, focus on specific image to image transformations as a regression problem. It will be interesting to combine the two approaches to learn models that are “unnormalized priors” in the sense of energy-based image attractors; regression can then be used as a tool for unsupervised learning by capturing dependencies between variables within the same distribution [22]. Acknowledgements: we are grateful to Ted Adelson, Ce Liu, Srinivas Turaga, and Yair Weiss for helpful discussions. We also thank the authors of [1] and [4] for making code available. References [1] J. Portilla, V. Strela, M.J. Wainwright, E.P. Simoncelli. Image denoising using scale mixtures of Gaussians in the wavelet domain. IEEE Trans. Image Proc., 2003. [2] S. Lyu, E.P. Simoncelli. Statistical modeling of images with fields of Gaussian scale mixtures. NIPS* 2006. [3] S. Geman, D. Geman. Stochastic relaxation, Gibbs distributions and the Bayesian restoration of images. Pattern Analysis and Machine Intelligence, 1984. [4] S. Roth, M.J. Black. Fields of Experts: a framework for learning image priors. CVPR 2005. [5] M.F. Tappen, C. Liu, E.H. Adelson, W.T. Freeman. Learning Gaussian Conditional Random Fields for Low-Level Vision. CVPR 2007. [6] Y. Weiss, W.T. Freeman. What makes a good model of natural images? CVPR 2007. [7] P. Gehler, M. Welling. Product of "edge-perts". NIPS* 2005. [8] S.C. Zhu, Y. Wu, D. Mumford. Filters, Random Fields and Maximum Entropy (FRAME): Towards a Unified Theory for Texture Modeling. International Journal of Computer Vision, 1998. [9] S. Kumar, M. Hebert. Discriminative fields for modeling spatial dependencies in natural images. NIPS* 2004. [10] X. He, R Zemel, M.C. Perpinan. Multiscale conditional random fields for image labeling. CVPR 2004. [11] V. Jain, J.F. Murray, F. Roth, S. Turaga, V. Zhigulin, K.L. Briggman, M.N. Helmstaedter, W. Denk, H.S. Seung. Supervised Learning of Image Restoration with Convolutional Networks. ICCV 2007. [12] S. Parise, M. Welling. Learning in markov random fields: An empirical study. Joint Stat. Meeting, 2005. [13] R. Szeliski, R. Zabih, D. Scharstein, O. Veksler, V. Kolmogorov, A. Agarwala, M. Tappen, C. Rother. A comparative study of energy minimization methods for markov random fields. ECCV 2006. [14] Y. LeCun, B. Boser, J.S. Denker, D. Henderson, R.E. Howard, W. Hubbard, L.D. Jackel. Backpropagation Applied to Handwritten Zip Code Recognition. Neural Computation, 1989. [15] Y. LeCun, F.J. Huang, L. Bottou. Learning methods for generic object recognition with invariance to pose and lighting. CVPR 2004. [16] F. Ning, D. Delhomme, Y. LeCun, F. Piano, L. Bottou, P.E. Barbano. Toward Automatic Phenotyping of Developing Embryos From Videos. IEEE Trans. Image Proc., 2005. [17] G. Hinton, R. Salakhutdinov. Reducing the dimensionality of data with neural networks. Science, 2006. [18] M. Ranzato, YL Boureau, Y. LeCun. Sparse feature learning for deep belief networks. NIPS* 2007. [19] Y. Bengio, P. Lamblin, D. Popovici, H. Larochelle. Greedy Layer-Wise Training of Deep Networks. NIPS* 2006. [20] D. Martin, C. Fowlkes, D. Tal, J. Malik. A database of human segmented natural images and its application to evaluating segmentation algorithms and measuring ecological statistics. ICCV 2001. [21] S. Roth. High-order markov random fields for low-level vision. PhD Thesis, Brown Univ., 2007. [22] H.S. Seung. Learning continuous attractors in recurrent networks. NIPS* 1997. 8
2008
187
3,439
Optimal Response Initiation: Why Recent Experience Matters Matt Jones Dept. of Psychology & Institute of Cognitive Science University of Colorado mcj@colorado.edu Michael C. Mozer Dept. of Computer Science & Institute of Cognitive Science University of Colorado mozer@colorado.edu Sachiko Kinoshita MACCS & Dept. of Psychology Macquarie University skinoshi@maccs.mq.edu.au Abstract In most cognitive and motor tasks, speed-accuracy tradeoffs are observed: Individuals can respond slowly and accurately, or quickly yet be prone to errors. Control mechanisms governing the initiation of behavioral responses are sensitive not only to task instructions and the stimulus being processed, but also to the recent stimulus history. When stimuli can be characterized on an easy-hard dimension (e.g., word frequency in a naming task), items preceded by easy trials are responded to more quickly, and with more errors, than items preceded by hard trials. We propose a rationally motivated mathematical model of this sequential adaptation of control, based on a diffusion model of the decision process in which difficulty corresponds to the drift rate for the correct response. The model assumes that responding is based on the posterior distribution over which response is correct, conditioned on the accumulated evidence. We derive this posterior as a function of the drift rate, and show that higher estimates of the drift rate lead to (normatively) faster responding. Trial-by-trial tracking of difficulty thus leads to sequential effects in speed and accuracy. Simulations show the model explains a variety of phenomena in human speeded decision making. We argue this passive statistical mechanism provides a more elegant and parsimonious account than extant theories based on elaborate control structures. 1 Introduction Consider the task of naming the sum of two numbers, e.g., 14+8. Given sufficient time, individuals will presumably produce the correct answer. However, under speed pressure, mistakes occur. In most cognitive and motor tasks, speed-accuracy tradeoffs are observed: Individuals can respond accurately but slowly, or quickly but be prone to errors. Speed-accuracy tradeoffs are due to the fact that evidence supporting the correct response accumulates gradually over time (Rabbitt & Vyas, 1970; Gold & Shadlen, 2002). Responses initiated earlier in time will be based on lower-quality information, and hence less likely to be correct. On what basis do motor systems make the decision to initiate a response? Recent theories have cast response initiation in terms of optimality (Bogacz et al., 2006), where optimality might be defined as maximizing reward per unit time, or minimizing a linear combination of latency and error rate. Although optimality might be defined in various ways, all definitions require an estimate of the probability that each candidate response will be correct. We argue that this estimate in turn requires knowledge of the task difficulty, or specifically, the rate at which evidence supporting the correct response accumulates over time. If a task is performed repeatedly, task difficulty can be estimated over a series of trials, suggesting that optimal decision processes should show sequential effects, in which performance on one trial depends on the difficulty of recent trials. We describe an experimental paradigm that offers behavioral evidence of sequential effects in response initiation. 1 0 50 100 0 0.2 0.4 0.6 0.8 1 time P(R*|X) 0 50 100 −2 0 2 4 time evidence 0 50 100 0 0.2 0.4 0.6 0.8 1 time P(R* | X) ^ Figure 1: An illustration of the MDM. Left panel: evidence accumulation for a 20-AFC task as a function of time, with µR∗= .04, µi̸=R∗= 0, σ = .15. Middle panel: the posterior over responses, P(R∗|X), with a = .04 and b = 0, based on the diffusion trace in the left panel. Right panel: the posterior over responses, P( ˆR∗|X), assuming ˆa = .07 and ˆb = .02 for the same diffusion trace. We summarize key phenomena from this paradigm, and show that these phenomena are predicted by a model of response initiation. Our work achieves two goals: (1) offering a better understanding of and a computational characterization of control processes involved in response initiation, and (2) offering a rational basis for sequential effects in simple stimulus-response tasks. 2 Models of Decision Making Neurophysiological and psychological data (e.g., Gold & Shadlen, 2002; Ratcliff, Cherian, & Segraves, 2003) have provided converging evidence for a theory of cortical decision making, known as the diffusion decision model or DDM (see recent review by Ratcliff & McKoon, 2007). The DDM is formulated for two-alternative forced choice (2AFC) decisions. A noisy neural integrator accumulates evidence over time; positive evidence supports one response, negative evidence the other. The model’s dynamics are represented by a differential equation, dx = µdt + w, where x is the accumulated evidence over time t, µ is the relative rate of evidence supporting one response over the other (positive or negative, depending on the balance of evidence), and w is white noise, w ∼N(0, σ2dt). The variables µ and σ are called the drift and diffusion rates. A response is initiated when the accumulated evidence reaches a positive or negative threshold, i.e., x > θ+ or x < θ−. The DDM implements the optimal decision strategy under various criteria of optimality (Bogacz et al., 2006). Tasks involving n alternative responses (nAFC) can be modeled by generalizing the DDM to have one integrator per possible response (Bogacz & Gurney, 2007; Vickers, 1970). We refer to this generalized class of models as multiresponse diffusion models or MDM. Consider one example of an nAFC task: naming the color of a visually presented color patch. The visual system produces a trickle of evidence for the correct or target response, R∗. This evidence supports the target response via a positive drift rate, µR∗, whereas the drift rates of the other possible color names, {µi | i ̸= R∗}, are zero. (We assume no similarity among the stimuli, e.g., an aqua patch provides no evidence for the response ’blue’, although our model could be extended in this way.) The left panel of Figure 1 illustrates typical dynamics of the MDM. The abcissa represents processing time relative to the onset of the color patch, and each curve represents one integrator (color name). 2.1 A Decision Rule for the Multiresponse Diffusion Model Although the DDM decision rule is optimal, no unique optimal decision rule exists for the multipleresponse case (Bogacz & Gurney, 2007; Dragelin et al, 1999). Rules based on an evidence criterion—analogous to the DDM decision rule—turn out to be inadequate. Instead, candidate rules are based on the posterior probability that a particular response is correct given the observed evidence up to the current time, P(R∗= r|X). In our notation, R∗is the random variable denoting the target response, r is a candidate response among the n alternatives, and X = {xi(jτ) | i = 1...n, j = 0... T τ } is a collection of discrete samples of the multivariate diffusion process observed up to the current time T. The simulations reported here use a decision rule that initiates responding when the accuracy of the response is above a threshold, θ: If ∃r such that P(R∗= r|X) ≥θ, then initiate response r. (1) 2 This rule has been shown to minimize decision latency in the limit of θ →1 (Dragelin et al., 1999). However, our model’s predictions are not tied to this particular rule. We emphasize that any sensible rule requires estimation of P(R∗= r|X), and we focus on how the phenomena explained by our model derive from the properties of this posterior distribution. Baum and Veeravalli (1994; see also Bogacz & Gurney, 2007) derive P(R∗= r|X) for the case where all nontargets have the same drift rate, µnontgt, the target has drift rate µtgt, and µnontgt, µtgt, and σ are known. (We introduce the µtgt and µnontgt notation to refer to these drift rates even in the absence of information about R∗.) We extend the Baum and Veeravalli result to the case where µtgt is an unknown random variable that must be estimated by the observer. The diffusion rate of a random walk, σ2, can be determined with arbitrary precision from a single observed trajectory, but the drift rate cannot (see Supplementary Material – available at http://matt.colorado.edu/papers.htm). Therefore, estimating statistics of µtgt is critical to achieving optimal performance. Given a sequence of discrete observations from a diffusion process, x = {x(jτ) | j = 0... T τ }, we can use the independence of increments to a diffusion process with known drift and diffusion rates, x(t2) −x(t1) ∼N (t2 −t1)µ, (t2 −t1)σ2 , to calculate the likelihood of x: P(x|µ, σ) ∝exp  (∆x(T)µ −µ2T/2)/σ2 , (2) where ∆x(T) = x(T) −x(0) is a sufficient statistic for estimating µ. Consider the case where the drift rate of the target is a random variable, µtgt ∼N(a, b2), and the drift rate of all nontargets, µnontgt, is zero. Using Equation 2 and integrating out µtgt, the posterior over response alternatives can be determined (see Supplementary Material): P(R∗= r|X, a, b) ∝exp b2∆xr(T)2 + 2aσ2∆xr(T) 2σ2(σ2 + Tb2)  . (3) The middle panel of Figure 1 shows P(R∗|X, a, b), as a function of processing time for the diffusion trace in the left panel, when the true drift rate is known (a = µtgt and b = 0). 2.2 Estimating Drift To recap, we have argued that optimal response initiation in nAFC tasks requires calculation of the posterior response distribution, which in turn depends on assumptions about the drift rate of the target response. We proposed a decision rule based on a probabilisitic framework (Equations 1 and 3) that permits uncertainty in the drift rate, but requires a characterization of the prior distribution of this variable. We assume that the parameters of this distribution, a and b, are unknown. Consequently, the observer cannot compute P(R∗|X), but must use an approximation, P( ˆR∗|X), based on estimates ˆa and ˆb. When µtgt is not representative of the assumed distribution N(ˆa,ˆb2), performance of the model will be impaired, as illustrated by a comparison of the center and right panels of Figure 1. In the center panel, µtgt = .04 is known; in the right panel, µtgt is not representative of the assumed distribution. The consequence of this mismatch is that—for the criterion indicated by the dashed horizontal line—the model chooses the wrong response. We turn now to the estimation of the model’s drift distribution parameters, ˆa and ˆb. Consider a sequence of trials, k = 1...K, in which the same decision task is performed with different stimuli, and the drift rate of the target response on trial k is µ(k). Following each trial, the drift rate can also be estimated: ˆµtgt(k) = ∆xR∗(Tk)/Tk, where Tk is the time taken to respond on trial k. If the task environment changes slowly, the drift rates over trials will be autocorrelated, and the drift distribution parameters on trial k can be estimated from past trial history, {ˆµtgt(1)...ˆµtgt(k − 1)}. The weighting of past history should be based on the strength of the autocorrelation. Using maximum likelihood estimation of a and b with an exponential weighting on past history, one obtains ˆa(k) = v1(k)/v0(k), and ˆb(k) = [v2(k)/v0(k) −ˆa(k)2]0.5, (4) where k is an index over trials, and the {vi(k)} are moment statistics of the drift disribution, updated following each trial using an exponential weighting constant, λ ∈[0, 1]: vi(k) = λvi(k −1) + ˆµtgt(k −1)i. (5) This update rule is an efficient approximation to full hierarchical Bayesian inference of a and b. When combined with Equations 1 and 3 it determines the model’s response on the current trial. 3 3 The Blocking Effect The optimal decision framework we have proposed naturally leads to the prediction that performance on the current trial is influenced by drift rates observed on recent trials. Because drift rates determine the signal-to-noise ratio of the diffusion process, they reflect the difficulty of the task at hand. Thus, the framework predicts that an optimal decision maker should show sequential effects based on recent trial difficulty. We now turn to behavioral data consistent with this prediction. In any behavioral task, some items are intrinsically easier than others, e.g., 10+3 is easier than 5+8, whether due to practice or the number of cognitive operations required to determine the sum. By definition, individuals have faster response times (RTs) and lower error rates to easy items. However, the RTs and error rates are modulated by the composition of a trial block. Consider an experimental paradigm consisting of three blocks: just easy items (pure easy), just hard items (pure hard), and a mixture of both in random order (mixed). When presented in a mixed block, easy items slow down relative to a pure block and hard items speed up. This phenomenon, known as the blocking effect (not to be confused with blocking in associative learning), suggests that the response-initiation processes use information not only from the current stimulus, but also from the stimulus environment in which it is operating. Table 1 shows a typical blocking result for a word-reading task, where word frequency is used to manipulate difficulty. We summarize the central, robust phenomena of the blocking-effect literature (e.g., Kiger & Glass, 1981; Lupker, Brown & Columbo, 1997; Lupker, Kinoshita, Coltheart, & Taylor, 2000; Taylor & Lupker, 2001). P1. Blocking effects occur across diverse paradigms, including naming, arithmetic verification and calculation, target search, and lexical decision. They are obtained when stimulus or response characteristics alternate from trial to trial. Thus, the blocking effect is not associated with a specific stimulus or response pathway, but rather is a general phenomenon of response initiation. P2. A signature of the effect concerns the relative magnitudes of easy-item slowdown and hard-item speedup. Typically, slowdown and speedup are of equal magnitude. Significantly more speedup than slowdown is never observed. However, in some paradigms (e.g., lexical decision, priming) significantly more slowdown than speedup can be observed. P3. The RT difference bewteen easy and hard items does not fully disappear in mixed blocks. Thus, RT depends on both the stimulus type and the composition of the block. P4. Speed-accuracy tradeoffs are observed: A drop in error rate accompanies easy-item slowdown, and a rise in error rate accompanies hard-item speedup. P5. The effects of stimulus history are local, i.e., the variability in RT on trial k due to trial k −l decreases rapidly with l. Dependencies for l > 2 are not statistically reliable (Taylor & Lupker, 2001), although the experiments may not have had sufficient power to detect weak dependencies. P6. Overt responses are necessary for obtaining blocking effects, but overt errors are not. 4 Explanations for the Blocking Effect The blocking effect demonstrates that the response time depends not only on information accruing from the current stimulus, but also on recent stimuli in the trial history. Therefore, any explanation of the blocking effect must specify the manner by which response initiation processes are sensitive to the composition of a block. Various mechanisms of control adaptation have been proposed. Domain-specific mechanisms. Many of the proposed mechanisms are domain-specific. For example, Rastle and Coltheart (1999) describe a model with two routes to naming, one lexical and one nonlexical, and posit that the composition of a block affects the emphasis that is placed on the output of one route versus the other. Because of the ubiquity of blocking effects across tasks, domain-specific Table 1: RTs and Error Rates for Blocking study of Lupker, Brown, & Columbo (1997, Expt. 3) Pure Block Mixed Block Difference Easy 488 ms (3.6%) 513 ms (1.8%) +25 ms (-1.8%) Hard 583 ms (12.0%) 559 ms (12.2%) -24 ms (+0.2%) 4 accounts are not compelling. Parsimony is achieved only if the adaptation mechanism is localized to a stage of response initiation common across stimulus-response tasks. Rate of convergence. Kello and Plaut (2003) have proposed that control processes adjust a gain parameter on units in a dynamical connectionist model. Increasing the gain results in more rapid convergence, but also a higher error rate. Simulations of this model have explained the basic blocking effect, but not the complete set of phenomena we listed previously. Of greater concern is the fact that the model predicts the time taken to utter the response (when the response mode is verbal) decreases with increased speed pressure, which does not appear to be true (Damian, 2003). Evidence criterion. A candidate mechanism with intuitive appeal is the trial-to-trial adjustment of an evidence criterion in the MDM, such that the easier the previous trials are, the lower the criterion is set. This strategy results in the lowest criterion in a pure-easy block, intermediate in a mixed block, and highest in a pure-hard block. Because a higher criterion produces slower RTs and lower error rates, this leads to slowdown of easy items and speedup of hard items in a mixed block. Nonetheless, there are four reasons for being skeptical about an account of the blocking effect based on adjustment of an evidence criterion. (1) From a purely computational perspective, the optimality—or even the behavioral robustness—of an MDM with an evidence criterion has not been established. (2) Taylor and Lupker (2001) illustrate that adaptation of an evidence criterion can—at least in some models— yield incorrect predictions concerning the blocking effect. (3) Strayer and Kramer (1994) attempted to model the blocking effect for a 2AFC task using an adaptive response criterion in the DDM. Their account fit data, but had a critical shortcoming: They needed to allow different criteria for easy and hard items in a mixed block, which makes no sense because the trial type was not known in advance, and setting differential criteria depends on knowing the trial type. (4) On logical grounds, the relative importance of speed versus accuracy should be determined by task instructions and payoffs. Item difficulty is an independent and unrelated factor. Consistent with this logical argument is the finding that manipulating instructions to emphasize speed versus accuracy does not produce the same pattern of effects as altering the composition of a block (Dorfman & Glanzer, 1988). 5 Our Account: Sequential Estimation of Task Difficulty Having argued that existing accounts of the blocking effect are inadequate, we return to our analysis of nAFC tasks, and show that it provides a parsimonious account of blocking effects. Our account is premised on the assumption that response initiation processes are in some sense optimal. Regardless of the specific optimality criterion, optimal response initiation requires an estimate of accuracy, specifically, the probability that a response will be correct conditioned on the evidence accumulated thus far, P(R∗= r|X). As we argue above, estimation of this probability requires knowledge of the difficulty (drift) of the correct response, and recent trial history can provide this information. The response posterior, P(R∗= r|X), under our generative model of the task environment (Equation 3) predicts a blocking effect. To see this clearly, consider the special case where uncertainty in µtgt is negligible, i.e., b →0, which simplifies Equation 3 to P(R∗= r|X) ∝exp  a∆xr(T)/σ2 . This expression is a Gibbs distribution with temperature σ2/a. As the temperature is lowered, the entropy drops, and the probabilities become more extreme. Thus, larger values of a lead to faster responses, because the greater expected signal-to-noise ratio makes evidence more reliable. How does this fact relate to the blocking effect? Easy items have, by definition, a higher mean drift than hard items; therefore, the estimated drift in the easy condition will be greater than in the hard condition, E[ˆaE] > E[ˆaH]. Any learning rule for ˆa based on recent history will yield an estimated drift in the mixed condition between those of the easy and hard conditions, i.e., E[ˆaE] > E[ˆaM] > E[ˆaH]. With response times related to ˆa, an easy item will slow down in the mixed condition relative to the pure, and a hard item will speed up. Although we could fit behavioral data (e.g., Table 1) quantitatively, such fits add no support for the model beyond a qualitative fit. The reason lies in the mapping of model decision times to human response latencies. An affine transform must be allowed, scaling time in the model to real-world time, and also allowing for a fixed-duration stage of perceptual processing. A blocking effect of any magnitude in the model could therefore be transformed to fit any pattern of data that had the right qualitative features. We thus focus on qualitative performance of the model. 5 Figure 2: Simulation of the blocking paradigm with random parameter settings. (a) Scatterplot of hard speedup vs. easy slowdown, where coloring of a cell reflects the log(frequency) with which a given simulation outcome is obtained. (b) Histogram of percentage reduction in the difference between easy and hard RTs as a result of intermixing. (c) Scatterplot of change in error rate between pure and mixed conditions for easy and hard items. The model has four internal parameters: σ (diffusion rate), λ (history decay), θ (accuracy criterion), and n (number of response alternatives). In addition, to simulate the blocking effect, we must specify the true drift distributions for easy and hard items, i.e., aE, bE, aH, and bH. (We might also allow for nonzero drift rates for some or all of the distractor responses.) To explore the robustness of the model, we performed 1200 replications of a blocking simulation, each with randomly drawn values for the eight free parameters. Parameters were drawn as follows: σ ∼U(.05, .25), λ ∼ 1 −1/(1 + U(1, 20) (these values are uniform in the half-life of the exponential memory decay), n ∼⌊U(2, 100)⌋, θ ∼U(.95, .995), aH ∼U(.01, .05), aE ∼aH + U(.002, .02), bH ∼(aE − aH)/U(3, 10), and bE = bH. Each replication involved simulating three conditions: pure easy, pure hard, and mixed. The pure conditions were run for 5000 trials and the mixed condition for 10000 trials. Each condition began with an additional 25 practice trials which were discarded from our analysis but were useful to eliminate the effects of initialization of ˆa and ˆb. The model parameters were not adapted following error trials. For each replication and each condition, the median response time (RT) and mean error rate were computed. We discarded from our analysis simulations in which the error rates were grossly unlike those obtained in experimental studies, specifically, where the mean error rate in any condition was above 20%, and where the error rates for easy and hard items differed by more than a factor of 10. Figure 2a shows a scatterplot comparing the speedup of hard items (from pure to mixed conditions) to the slowdown of easy items. Units are in simulation time steps. The dashed diagonal line indicates speedup comparable in magnitude to slowdown. Much of the scatter is due to sampling noise in the median RTs. The model obtains a remarkably symmetric effect: 41% of replications yield speedup > slowdown, 40% yield slowdown > speedup, and the remaining 19% yield exactly equal sized effects. The slope of the regression line through the origin is 0.97. Thus, the model shows a key signature of the behavioral data—symmetric blocking effects (Phenomenon P2). Figure 2b shows a histogram of the percentage reduction in the difference between easy and hard RTs as a result of intermixing. This percentage is 100 if easy RTs slow down and hard RTs speed up to become equal; the percentage is 0 if there is no slowdown of easy RTs or speedup of hard RTs. The simulation runs show a 10–30% reduction as a result of the blocking manipulation. This percentage is unaffected by the affine transformation required to convert simulation RTs to human RTs, and is thus directly comparable. Behavioral studies (e.g., Table 1) typically show 20–60% effects. Thus, the model—with random parameter settings—tends to underpredict human results. Nonetheless, the model shows the key property that easy RTs are still faster than hard RTs in the mixed condition (Phenomenon P3). Figure 2c shows a scatterplot of the change in error rate for easy items (from pure to mixed conditions) versus change in error rate for hard items. Consistent with the behavioral data (Phenomenon P4), a speed-accuracy trade off is observed: When easy items slow down in the mixed versus pure conditions, error rates drop; when hard items speed up, error rates rise. This trade off is expected, because block composition affects only the stopping point of the model and not the model dynamics. Thus, any speedup should yield a higher error rate, and vice versa. Interestingly, the accuracy 6 Figure 3: Human (black) and simulation (white) RTs for easy and hard items in a mixed block, conditional on the 0, 1, and 2 previous items (Taylor & Lupker, 2001). Last letter in the trial sequence indicates the current trial and trial order is left to right. E H EE HE EH HH EEE HEE EHE HHE EEH HEH EHH HHH 540 560 580 600 620 Trial Sequence Response Time human simulation criterion is fixed across conditions in the model; the differences in error rates arise because of a mismatch between the parameters a and b used to generate trials, and the parameters ˆa and ˆb estimated from the trial sequence. Thus, although the criterion does not change across conditions, and the criterion is expressed in terms of accuracy (Equation 1), the block composition nonetheless affects the speed-accuracy trade off. Although the blocking effect is typically characterized by comparing performance of an item type across blocks, sequential effects within a block have also been examined. Taylor and Lupker (2001, Experiment 1) instructed participants to name high-frequency words (easy items) and nonwords (hard items). Focusing on the mixed block, Taylor and Lupker analyzed RTs conditional on the context—the 0, 1, and 2 preceding items. The black bars in Figure 3 show the RTs conditional on the context. Trial k is most influenced by trial k −1, but trial k −2 modulates RTs as well. This decreasing influence of previous trials (Phenomenon P5) is well characterized by the model via the exponential-decay parameter, λ (Equation 5). To model the Taylor and Lupker data, we ran a simulation with generic parameters which were not tuned to the data: aE = .05, aH = .04, bE = bH = .002, σ = .15, θ = .99, λ = .5, and n = 5. We then scaled simulation RTs to human RTs with an affine transform whose two free parameters were fit to the data. The result, shown by the white bars in Figure 3, captures the important properties of the data. We have addressed all of the key phenomena of the blocking effect except two. Phenomenon P1 concerns the fact that the effect occurs across a variety of tasks and difficulty manipulations. The ubiquity of the effect is completely consistent with our focus on general mechanisms of response initiation. The model does not make any claims about the specific domain or the cause of variation in drift rates. Phenomenon P6 states that overt responses are required to obtain the blocking effect. Although the model cannot lay claims to distinctions between overt and covert responses, it does require that a drift estimate, ˆµtgt, be obtained on each trial in order to adjust ˆa and ˆb, which leads to blocking effects. In turn, ˆµtgt is determined at the point in the diffusion process when a response would be initiated. Thus, the model claims that selecting a response on trial k is key to influencing performance on trial k + 1. 6 Conclusions We have argued that optimal response initiation in speeded choice tasks requires advance knowledge about the difficulty of the current decision. Difficulty corresponds to the expected rate of evidence accumulation for the target response relative to distractors. When difficulty is high, the signal-tonoise ratio of the evidence-accumulation process is low, and a rational observer will wait for more evidence before initiating a response. Our model assumes that difficulty in the current task environment is estimated from the difficulty of recent trials, under an assumption of temporal autocorrelation. This is consistent with the empirically observed blocking effect, whereby responses are slower to easy items and faster to hard items when those items are interleaved, compared to when item types are presented in separate blocks. According to our model, mixed blocks induce estimates of local difficulty that are intermediate between those in pure easy and pure hard blocks. The resultant overestimation of difficulty for easy items leads to increased decision times, while an opposite effect occurs for hard items. We formalize these ideas in a multiresponse diffusion model of decision making. Evidence for each response accrues in a random walk, with positive drift rate µtgt for the correct response and zero drift for distractors. Analytical derivations show that conversion of evidence to a posterior distribution 7 over responses depends on µtgt, which acts as an inverse temperature in a Gibbs distribution. When this parameter is uncertain, with a prior estimated from recent context, error in the estimate leads to systematic bias in the response time. Underestimation of the drift rate, as with easy trials in a mixed block, leads to damping of the computed posterior and response slowdown. Overestimation, as with hard trials in a mixed block, leads to exaggeration of the posterior and response speedup. The model successfully explains the full range of phenomena associated with the blocking effect, including the effects on both RTs and errors, the patterns of slowdown of easy items and speedup of hard items, and the detailed sequential effects of recent trials. Moreover, the model is robust to parameter settings, as our random-replication simulation shows. The model is robust in other respects as well: Its qualitative behavior does not depend on the number of response alternatives (we have tried up to 1000), the decision rule (we have also tried a criterion based on the posterior ratio between the most and next most probable responses), the estimation algorithm for ˆa and ˆb (we have also tried a Kalman filter), and violations of assumptions of the generative model (e.g., nonzero drift rates for some of the distractors, reflecting the similarity structure of perceptual representations). The tradeoff between speed and accuracy in decision making is a paradigmatic problem of cognitive control. Theories in cognitive science often hand the problem of control to a homunculus. When control processes are specified, they generally involve explicit, active, and sophisticated mechanisms (e.g., conflict detection; A.D. Jones et al., 2002). Our model achieves sequential adaptation of control via a statistical mechanism that is passive and in a sense dumb; it essentially reestimates the statistical structure of the environment by updating an expectation of task difficulty. Our belief is that many aspects of cognitive control can be explained away by such passive statistical mechanisms, eventually eliminating the homunculus from cognitive science. Acknowledgments This research was supported by NSF grants BCS-0339103, BCS-720375, SBE-0518699, and SBE-0542013, and ARC Discovery Grant DP0556805. We thank the students in CSCI7222/CSCI4830/PSYC7782 for interesting discussions that led to this work. References Baum, C. W., & Veeravalli, V. (1994). A sequential procedure for multi-hypothesis testing. IEEE Trans. Inf. Theory, 40, 1994–2007. Bogacz, R, Brown, E, Moehlis, J, Holmes, P & Cohen JD (2006). The physics of optimal decision making: A formal analysis of models of performance in two-alternative forced choice tasks. Psych. Rev., 113, 700–765. Bogacz, R. & Gurney, K. (2007). The basal ganglia and cortex implement optimal decision making between alternative actions. Neural Computation, 19, 442-477. Damian, M. F. (2003). Articulatory duration in single word speech production. JEP: LMC, 29, 416–431. Dorfman, D., & Glanzer, M. (1988). List composition effects in lexical decision and recognition memory. J. Mem. & Lang., 27, 633–648. Gold, J.I., & Shadlen, M.N. (2002). Banburismus and the brain: Decoding the relationship between sensory stimuli, decisions and reward. Neuron, 36, 299–308. Jones, A. D., Cho, R. Y., Nystrom, L. E., Cohen, J. D., & Braver, T. S. (2002). A computational model of anterior cingulate function in speeded response tasks: Effects of frequency, sequence, and conflict. Cogn., Aff., & Beh. Neuro., 2, 300–317. Kello, C. T. & Plaut, D. C. (2003). Strategic control over rate of processing in word reading: A computational investigation. J. Mem. & Lang., 48, 207–232. Kiger, J. I., & Glass, A. L. (1981). Context effects in sentence verification. JEP:HPP, 7, 688–700. Lupker, S. J., Brown, P., & Colombo, L. (1997). Strategic control in a naming task: Changing routes or changing deadlines? JEP:LMC, 23, 570–590. Rabbitt, PMA, & Vyas, SM (1970). An elementary preliminary taxonomy for some errors in laboratory choice RT tasks. Acta Psych., 33, 56-76. Rastle, K., & Coltheart, M. (1999). Serial and strategic effects in reading aloud. JEP:HPP, 25, 482–503. Ratcliff, R., & McKoon, G. (2007). The diffusion decision model: Theory and data for two-choice decision tasks. Neural Computation, 20, 873–922. Ratcliff, R., Cherian, A., & Segraves, M. (2003) A comparison of macaque behavior and superior colliculus neuronal activity to predictions from models of two-choice decisions. J. Neurophys., 90, 1392–1407. Taylor, T. E., & Lupker, S. J. (2001). Sequential effects in naming: A time-criterion account. Journal of Experimental Psychology: Learning, Memory, and Cognition, 27, 117–138. 8
2008
188
3,440
Bayesian Experimental Design of Magnetic Resonance Imaging Sequences Matthias W. Seeger, Hannes Nickisch, Rolf Pohmann and Bernhard Sch¨olkopf Max Planck Institute for Biological Cybernetics Spemannstraße 38 72012 T¨ubingen, Germany {seeger,hn,rolf.pohmann,bs}@tuebingen.mpg.de Abstract We show how improved sequences for magnetic resonance imaging can be found through optimization of Bayesian design scores. Combining approximate Bayesian inference and natural image statistics with high-performance numerical computation, we propose the first Bayesian experimental design framework for this problem of high relevance to clinical and brain research. Our solution requires large-scale approximate inference for dense, non-Gaussian models. We propose a novel scalable variational inference algorithm, and show how powerful methods of numerical mathematics can be modified to compute primitives in our framework. Our approach is evaluated on raw data from a 3T MR scanner. 1 Introduction Magnetic resonance imaging (MRI) [7, 2] is a key diagnostic technique in healthcare nowadays, and of central importance for experimental research of the brain. Without applying any harmful ionizing radiation, this technique stands out by its amazing versatility: by combining different types of radiofrequency irradiation and rapidly switched spatially varying magnetic fields (called gradients) superimposing the homogeneous main field, a large variety of different parameters can be recorded, ranging from basic anatomy to imaging blood flow, brain function or metabolite distribution. For this large spectrum of applications, a huge number of sequences has been developed that describe the temporal flow of the measurement, ranging from a relatively low number of multi-purpose techniques like FLASH [5], RARE [6], or EPI [9], to specialized methods for visualizing bones or perfusion. To select the optimum sequence for a given problem, and to tune its parameters, is a difficult task even for experts, and even more challenging is the design of new, customized sequences to address a particular question, making sequence development an entire field of research [1]. The main drawbacks of MRI are high initial and running costs, since a very strong homogeneous magnetic field has to be maintained, moreover long scanning times due to weak signals and limits to gradient amplitude. With this in mind, by far the majority of scientific work on improving MRI is motivated by obtaining diagnostically useful images in less time. Beyond reduced costs, faster imaging also leads to higher temporal resolution in dynamic sequences for functional MRI (fMRI), less annoyance to patients, and fewer artifacts due to patient motion. In this paper, we employ Bayesian experimental design to optimize MRI sequences. Image reconstruction from MRI raw data is viewed as a problem of inference from incomplete observations. In contrast, current reconstruction techniques are non-iterative. For most sequences used in hospitals today, reconstruction is done by a single fast Fourier transform (FFT). However, natural and MR images show stable low-level statistical properties,1 which allows them to be reconstructed from 1These come from the presence of edges and smooth areas, which on a low level define image structure, and which are not present in Gaussian data (noise). 1 fewer observations. In our work, a non-Gaussian prior distribution represents low-level spectral and local natural image statistics. A similar idea is known as compressed sensing (CS), which has been applied to MRI [8]. A different and more difficult problem is to improve the sequence itself. In our Bayesian method, a posterior distribution over images is maintained, which is essential for judging the quality of the sequence: the latter can be modified so as to decrease uncertainty in regions or along directions of interest, where uncertainty is quantified by the posterior. Importantly, this is done without the need to run many MRI experiments in random a priori data collections. It has been proposed to design sequences by blindly randomizing aspects thereof [8], based on CS theoretical results. Beyond being hard to achieve on a scanner, our results indicate that random measurements do not work well for real MR images. Similar negative findings for a variety of natural images are given in [12]. Our proposal requires efficient Bayesian inference for MR images of realistic resolution. We present a novel scalable variational approximate inference algorithm inspired by [16]. The problem is reduced to numerical mathematics primitives, and further to matrix-vector multiplications (MVM) with large, structured matrices, which are computed by efficient signal processing code. Most previous algorithms [3, 14, 11] iterate over single non-Gaussian potentials, which renders them of no use for our problem here.2 Our solutions for primitives required here should be useful for other machine learning applications as well. Finally, we are not aware of Bayesian or classical experimental design methods for dense non-Gaussian models, scaling comparably to ours. The framework of [11] is similar, but could not be applied to the scale of interest here. Our model and experimental design framework are described in Section 2, a novel scalable approximate inference algorithm is developed in Section 3, and our framework is evaluated on a large-scale realistic setup with scanner raw data in Section 4. 2 Sparse Linear Model. Experimental Design Denote the desired MR image by u ∈Rn, where n is the number of pixels. Under ideal conditions, the raw data y ∈Rm from the scanner is a linear map3 of u, motivating the likelihood y = Xu + ε, ε ∼N(0, σ2I). Here, each row of X is a single Fourier filter, determined by the sequence. In the context of this paper, the problem of experimental design is how to choose X within a space of technically feasible sequences, so that u can be best recovered given y. As motivated in Section 1, we need to specify a prior P(u) which represents low-level statistics of (MR) images, distinctly super-Gaussian distributions — a Gaussian prior would not be a sensible choice. We use the one proposed in [12]. The posterior has the form P(u|y) ∝N(y|Xu, σ2I) q Y j=1 e−˜τj|sj|, s = Bu, ˜τj = τj/σ, (1) the prior being a product of Laplacians on linear projections sj of u, among them the image gradient and wavelet coefficients. The Laplace distribution encourages sparsity of s. Further details are given in [12]. MVMs with B cost O(q) with q ≈3n. MAP estimation for the same model was used in [8]. Bayesian inference for (1) is analytically not tractable, and an efficient deterministic approximation is discussed in Section 3. In the variant of Bayesian sequential experimental design used here, an extension of X by X∗∈Rd,n is scored by the entropy difference ∆(X∗) := H[P(u|y)] −EP (y∗|y) [H[P(u|y, y∗)]] , (2) where P(u|y, y∗) is the posterior after including (X∗, y∗). This criterion measures the decrease in uncertainty about u, averaged over the posterior P(y∗|y). Our approach is sequential: a sequence is combined from parts, each extension being chosen by maximizing the entropy difference over a 2The model we use has q = 196096 potentials and n = 65536 latent variables. Any algorithm that iterates over single potentials, has to solve at least q linear systems of size n, while our method often converges after solving less than 50 of these. 3Phase contributions in u are discussed in Section 4. 2 candidate set {X∗}. After each extension, a new scanner measurement is obtained for the single extended sequence only. Our Bayesian predictive approach allows us to score many candidates (X∗, y∗) without performing costly MR measurements for them. The sequential restriction makes sense for several reasons. First, MR sequences naturally decompose in a sequential fashion: they describe a discontinuous path of several smooth trajectories (see Section 4). Also, a non-sequential approach would never make use of any real measurements, relying much more on the correctness of the model. Finally, the computational complexity of optimizing over complete sequences is staggering. Our sequential approach seems also better suited for dynamic MRI applications. 3 Scalable Approximate Inference In this section, we propose a novel scalable algorithm for the variational inference approximation proposed in [3]. We make use of ideas presented in [16]. First, e−˜τj|sj| = maxπj>0 e−πjs2 j/(2σ2)e−(τ 2 j /2)π−1 j , using Legendre duality (the Laplace site is log-convex in s2 j) [3]. Let π = (πj) and Π = diag π. To simplify the derivation, assume that BT ΠB is invertible,4 and let Q(u) ∝exp(−uT BT ΠBu/(2σ2)), Q(y, u) := P(y|u)Q(u). The joint distribution is Gaussian, and Q(u|y) = N(u|h, σ2Σ), Σ−1 = A := XT X + BT ΠB, h = ΣXT y. (3) We have that P(y) ≥e−1 2 (τ 2)T (π−1)|BT ΠB/(2πσ2)|−1/2 R P(y|u)Q(u) du, and Z P(y|u)Q(u) du = |2πσ2Σ|1/2 max u Q(u|y)Q(y) = |2πσ2Σ|1/2 max u P(y|u)Q(u), where the maximum is attained at u = h. Therefore, P(y) ≥C1(σ2)e−φ(π)/2 with φ(π) := log |A| + (τ 2)T (π−1) + min u σ−2∥y −Xu∥2 + σ−2sT Πs, s = Bu, and the bound is tightened by minimizing φ(π). Now, g(π) := log |A| is concave, so we can use another Legendre duality, g(π) = minz⪰0 zT π −g∗(z), to obtain an upper bound φz(π) = minu φz(u, π) ≥φ(π). In the outer loop steps of our algorithm, we need to find the minimizer z ∈Rq +; the inner loop consists of minimizing the upper bound w.r.t. π for fixed z. Introducing γ := π−1, we find that (u, γ) 7→φz(u, γ−1) is jointly convex, which follows just as in [16], and because zT (γ−1) is convex (all zj ≥0). Minimizing over γ gives the convex problem min u σ−2∥y −Xu∥2 + 2 q X j=1 τj√pj, pj := zj + σ−2s2 j, s = Bu, (4) which is of standard form and can be solved very efficiently by the iteratively reweighted least squares (IRLS) algorithm, a special case of Newton-Raphson. In every iteration, we have to solve (XT X + BT (diag e)B)d = r, where r, e are simple functions of u. We use the linear conjugate gradients (LCG) algorithm [4], requiring a MVM with X, XT , B, and BT per iteration. The line search along the Newton direction d can be done in O(q), no further MVMs are required. In our experiments, IRLS converged rapidly. At convergence, π′ j = τj(p′ j)−1/2, p′ = p′(u′). For updating z →z′ given π, note that πT z′ −g(π) = g∗(z′) = min˜π ˜πT z′ −g(˜π), so that 0 = ∇ππT z′ −g(π) = z′ −∇πg(π), and z′ = diag−1 BA−1BT  = σ−2(VarQ[sj | y]). (5) z′ cannot be computed by a few LCG runs. Since A has no sparse graphical structure, we cannot use belief propagation either. However, the Lanczos algorithm can be used to estimate z′ [10]. This algorithm is also essential for scoring many candidates in each design step of our method (see Section 3.1). Our algorithm iterates between updates of z (outer loop steps) and inner loop convex optimization of (u, π). We show in [13] that minπ φ(π) is a convex problem, whenever all model sites are log-concave (as is the case for Laplacians), a finding which is novel to the best of our knowledge. 4The end result is valid for singular BT ΠB, by a continuity argument. 3 Once converged to the global optimum of φ(π), the posterior is approximated by Q(·|y) of (3), whose mean is given by u. The main idea is to decouple φ(π) by upper bounding the critical term log |A|. If the z updates are done exactly, the algorithm is globally convergent [16]. Our algorithm is inspired by [16], where a different problem is addressed. Their method produces very sparse solutions of Xu ≈y, while our focus is on close approximate inference, especially w.r.t. the posterior covariance matrix. It was found in [12] that aggressive sparsification, notwithstanding being computationally convenient, hurts experimental design (and even reconstruction) for natural images. Their update of z requires (5) as well, but can be done more cheaply, since most πj = +∞, and A can be replaced by a much smaller matrix. Finally, note that MAP estimation [8] is solving (4) once for z = 0, so can be seen as special case of our method. 3.1 Lanczos Algorithm. Efficient Design The Lanczos algorithm [4] is typically used to find extremal eigenvectors of large, positive definite matrices A. Requiring an MVM with A in each iteration, it produces QT AQ = T ∈Rk,k after k iterations, where QT Q = I, T tridiagonal. Lanczos estimates of expressions linear in Σ = A−1 are obtained by plugging in the low-rank approximation QT −1QT ≈Σ [10]. In our case, z(k) := diag−1(BQT −1QT BT ) →z′, L(k) := log |T| →g(π). We also use Lanczos to compute entropy difference scores, approximating (2) by using Q(u|y) instead of P(u|y), and Q′(u|y) ∝Q(u|y)P(y∗|u) instead of P(u|y, y∗), with π′ = π. The expectation over P(y∗|y) need not be done then, and ∆(X∗) ≈−log |A| + log A + XT ∗X∗ = log I + X∗ΣXT ∗ . For nc candidates of d rows, computing scores would need d · nc LCG runs, which is not feasible. Using the Lanczos approximation of Σ, we need k MVMs with X∗for each candidate, then nc Cholesky decompositions of min{k, d} × min{k, d} matrices. Both computations can readily be parallelized, as is done in our implementation. Note that we can compute ∂∆(X∗)/∂α for X∗= X∗(α), if ∂X∗/∂α is known, so that gradient-based score optimization can be used. The basic recurrence of the Lanczos method is treacherously simple. The loss of orthogonality in Q has to be countered, thus typical Lanczos codes are intricate. Q has to be maintained in memory. The matrices A we encounter here, have an almost linearly decaying spectrum, so standard Lanczos codes, designed for geometrically decaying spectra, have to be modified. Our A have no close low rank approximations, and eigenvalues from both ends of the spectrum converge rapidly in Lanczos. Therefore, our estimate z(k) is not very close to the true z′ even for quite large k. However, z(k) ⪯z′, since zk−1,j ≤zk,j for all j. Since the sparsity penalty on sj in (4) is stronger for smaller zj, underestimations from the Lanczos algorithm entail more sparsity (although still zk,j > 0). In practice, a smaller k often leads to somewhat better results, besides running much faster. While the global convergence proof for our algorithm hinges on exact updates of z, which cannot be done to the best of our knowledge, the empirical success of Section 4 may be due to this observation, noting that natural image statistics are typically more super-Gaussian than the Laplacian. In conclusion, approximate inference requires the computation of marginal variances, which for general models cannot be approximated closely with generic techniques. In the context of sparse linear models, it seems to be sufficient to estimate the dominating covariance eigendirections, for which the Lanczos algorithm with a moderate number of steps can be used. More generally, the Lanczos method is a powerful tool for approximate inference in Gaussian models, an insight which does not seem to be widely known in machine learning. 4 Experiments We start with some MRI terminology. An MR scanner acquires Fourier coefficients Y (k) at spatial frequencies5 k (the 2d Fourier domain is called k-space), along smooth trajectories k(t) determined by magnetic field gradients g(t). The control flow is called sequence. Its cost is determined by how long it takes to obtain a complete image, depending on the number of trajectories and their shapes. Gradient amplitude and slew rate constraints enforce smooth trajectories. In Cartesian sampling, trajectories are parallel equispaced lines in k-space, so the FFT can be used for image reconstruction. Spiral sampling offers a better coverage of k-space for given gradient power, leading to faster 5Both k and spatial locations r are seen as ∈R2 or ∈C. 4 acquisition. It is often used for dynamic studies, such as cardiac imaging and fMRI. A trajectory k(t) leads to data y = Xku, where Xk = [e−i2πrT j k(tℓ)]ℓj. We use gridding interpolation6 with a Kaiser-Bessel kernel [1, ch. 13.2] to approximate the multiplication with Xk, which would be too expensive otherwise. As for other reconstruction methods, most of our running time is spent in the gridding (MVMs with X, XT , and X∗). r−space: U(r) 1 n n 1 k−space: Y(k) −1/2 0 1/2 1/2 0 −1/2 0 2 4 6 −50 0 50 gradients: g(t) gx in [mT/m] 0 2 4 6 −50 0 50 t in [ms] gy in [mT/m] Figure 1: MR signal acquisition: r-space and k-space representation of the signal on a rectangular grid as well as the trajectory obtained by means of magnetic field gradients For our experiments, we acquired data on an equispaced grid.7 In theory, the image u is real-valued; in reality, due to resonance frequency offsets, magnetic field inhomogeneities, and eddy currents [1, ch. 13.4], the reconstruction contains a phase ϕ(r). It is common practice to discard ϕ after reconstruction. Short of modelling a complex-valued u, we correct for low-frequency phase contributions by a cheap pre-measurement.8 Note that |utrue|, against which reconstructions are judged below, is not altered by this correction. From the corrected raw data, we simulate all further measurements under different sequences using gridding interpolation. While no noise is added to these measurements, there remain significant highfrequency erroneous phase contributions in utrue. Interleaved outgoing Archimedian spirals employ trajectories k(t) ∝θ(t)ei2π[θ(t)+θ0], θ(0) = 0, where the gradient g(t) ∝dk/dt grows to maximum strength at the slew rate, then stays there [1, ch. 17.6]. Sampling along an interleave respects the Nyquist limit. The number of revolutions Nr and interleaves Nshot determine the radial spacing. The scan time is proportional to Nshot. In our setup, Nr = 8, resulting in 3216 complex samples per interleave. For equispaced offset angles θ0, the Nyquist spiral (respecting the limit radially) has Nshot = 16. Our goal is to design spiral sequences with smaller Nshot, reducing scan time by a factor 16/Nshot. We use the sequential method described in Section 2, where {X∗∈Rn×d} is a set of potential interleaves, d = 6432. The image resolution is 256 × 256, so n = 65536. Since utrue is approximately real-valued, measurements at k and −k are quite redundant, which is why we restrict9 ourselves to offset angles θ0 ∈[0, π). We score candidates (π/256)[0 : 255] in each round, comparing to equispaced placements jπ/Nshot, and to drawing θ0 uniformly at random. For the former, favoured by MRI practitioners right now, the maximum k-space distance between samples is minimized, while the latter is aligned with compressed sensing recommendations [8]. For a given sequence, we consider different image reconstructions: the posterior mode (convex MAP estimation) [8], linear least squares (LS; linear conjugate gradients), and zero filling with density compensation (ZFDC; based on Voronoi diagram) [1, ch. 13.2.4]. The latter requires a single MVM with XT only, and is most commonly used in practice. We selected the τ scale parameters (there are two of them, as in [12]) optimally for the Nyquist spiral Xnyq, and set σ2 to the variance of Xnyq(utrue −|utrue|). We worked on two slices (8,12) and used 750 Lanczos iterations in our method.10 We report L2 distances between reconstruction and true image |utrue|. Results are given in Table 3, and some reconstructions (slice 8) are shown in Figure 2. 6NFFT: http://www-user.tu-chemnitz.de/˜potts/nfft/ 7Field of view (FOV) 260mm (256 × 256 voxels, 1mm2), 16 brain slices with a turbo-spin sequence, 23 echoes per excitation. Train of 120◦refocusing pulses, each phase encoded differently. Slices are 4mm thick. 8We sample the center of k-space on a p × p Cartesian grid, obtaining a low-resolution reconstruction by FFT, whose phase ˜ϕ we use to correct the raw data. We tried p ∈{16, 32, 64} (larger p means better correction), results below are for p = 32 only. While reconstruction errors generally decrease somewhat with larger p, the relative differences between all settings below are insensitive to p. 9Dropping this restriction disfavours equispaced {θ0} setups with even Nshot. 10This seems small, given that n = 65536. We also tried 1250 iterations, which needed more memory, ran almost twice as long, and gave slightly worse results (see end of Section 3.1). 5 (a) Slice8 (b) MAP−op, Nshot=7, E=3.95 (c) MAP−eq, Nshot=7, E=4.40 (d) MAP−rd, Nshot=7, E=12.08 (e) MAP−eq, Nshot=8, E=2.84 (f) ZFDC−eq, Nshot=8, E=6.20 Figure 2: Reconstruction results. Differences to true image (a; scale [0, 1]) in (b-f), scale [−0.1, 0.1]. Nshot img MAPop MAPrd MAPeq LSop LSrd LSeq ZFDCop ZFDCrd ZFDCeq 5 8 12.99 16.01 ± 2.49 14.18 17.2319.97 ± 1.3316.80 25.13 38.04 ± 6.14 23.51 6 8 8.31 12.46 ± 2.46 10.06 12.6716.24 ± 1.1313.19 18.79 33.29 ± 4.71 18.16 7 8 3.95 11.81 ± 2.71 4.40 7.80 13.71 ± 2.25 7.80 14.55 33.67 ± 5.90 12.73 8 8 2.94 6.86 ± 2.00 2.84 3.77 7.43 ± 2.48 3.31 13.08 26.96 ± 4.47 6.20 5 12 8.01 10.17 ± 1.63 9.32 12.7714.95 ± 1.0812.01 20.58 28.88 ± 4.25 19.74 6 12 4.94 7.74 ± 1.75 5.21 9.77 11.89 ± 0.95 9.77 16.33 25.47 ± 3.15 15.36 7 12 2.84 7.46 ± 1.80 3.18 6.40 9.95 ± 1.73 6.18 12.34 26.02 ± 3.44 10.62 8 12 2.20 4.60 ± 1.26 2.09 3.32 5.33 ± 1.73 2.27 10.07 21.47 ± 3.67 4.28 slices 2,4,6,10,12,14 from design of slice 8 Nshot MAPop MAPeq LSop LSeq 5 9.01 ± 1.3 10.67 ± 2.1 14.70 ± 1.6 14.57 ± 2.1 6 5.43 ± 1.1 6.51 ± 2.1 10.80 ± 1.5 10.95 ± 1.8 7 3.00 ± 0.5 3.27 ± 0.8 7.08 ± 1.1 6.45 ± 1.4 8 2.42 ± 0.3 2.34 ± 0.3 3.16 ± 0.6 2.70 ± 0.6 img MAPeq, Nshot = 16, (Nyq) LSeq, Nshot = 16, (Nyq) 8 2.75 3.31 12 1.96 2.27 Figure 3: Results for spiral interleaves on slices 8, 12 (table left). Reconstruction: MAP (posterior mode [8]), LS (least squares), ZFDC (zero filling, density compensation). Offset angles θ0 ∈[0, π): op (optimized; our method), rd (uniformly random; avg. 10 runs), eq (equispaced). Nshot: Number of interleaves. Table upper right: Avg. errors for slices 2,4,6,10,14, measured with sequences optimized on slice 8. Table lower right: Results for Nyquist spiral eq[Nshot = 16]. The standard reconstruction method ZFDC is improved upon strongly by LS (both are linear, but LS is iterative), which in turn is improved upon significantly by MAP. This is true even for the Nyquist spiral (Nshot = 16). While the strongest errors of ZFDC lie outside the “effective field of view” (roughly circular for spiral), panel f of Figure 2 shows that ZFDC errors contain important structures all over the image. Modern implementations of LS and MAP are more expensive than ZFDC by moderate constant factors. Results such as ours, together with the availability of affordable highperformance digital computation, strongly motivate the transition away from direct signal processing reconstruction algorithms to modern iterative statistical estimators. Note that ZFDC (and, to a lesser extent, LS) copes best with equispaced designs, while MAP works best with optimized angles. This is because the optimized designs leave larger gaps in k-space (see Figure 4). Nonlinear estimators can interpolate across such gaps to some extent, using image sparsity priors. Methods like ZFDC merely interpolate locally in k-space, uninformed about image statistics, so that violations of the Nyquist limit anywhere necessarily translate into errors. It is clearly evident that drawing the spiral offset angles at random does not work well, even if MAP reconstruction is used as in [8]. The ratio MAPrd/MAPop in L2 error is 1.23, 1.45, 2.99, 2.33 in Table 3, upper left. While both MAPop and MAPeq essentially attain Nyquist performance with Nshot = 8, MAPrd does not decrease to that level even with Nshot = 16 (not shown). Our 6 results strongly suggest that randomizing MR sequences is not a useful design principle.11 Similar shortcomings of randomly drawn designs were reported in [12], in a more idealized setup. Reasons why CS theory as yet fails to guide measurement design for real images, are reviewed there, see also [15]. Beyond the rather bad average performance of random designs, the large variance across trials in Table 3 means that in practice, a randomized sequence scan is much like a gamble. The outcome of our Bayesian optimized design is stable, in that sequences found in several repetitions gave almost identical reconstruction performance. −0.03 0 0.03 −0.03 0 0.03 Slice 8, Nshot=8 −0.03 0 0.03 −0.03 0 0.03 Slice 12, Nshot=8 Figure 4: Spirals found by our algorithm. The ordering is color-coded: dark spirals selected first. The closest competitors in Table 3 are MAPop and MAPeq. Since utrue is close to real, both attain close to Nyquist performance up from Nshot = 8. In the true undersampling regime Nshot ∈{5, 6, 7}, MAPop improves significantly12 upon MAPeq. Comparing panels b,c of Figure 2, the artifact across the lower right leads to distortions in the mouth area. Undersampling artifacts are generally amplified by regular sampling, which is avoided in the optimized designs. Breaking up such regular designs seems to be the major role of randomization in CS theory, but our results show that much is lost in the process. We see that approximate Bayesian experimental design is useful to optimize measurement architectures for subsequent MAP reconstruction. To our knowledge, no similar design optimization method based purely on MAP estimation has been proposed (ours needs approximate inference), rendering the beneficial interplay between our framework and subsequent MAP estimation all the more interesting. The computational primitives required for MAP estimation and our method are the same. Our implementation requires about 5 hours on a single standard desktop machine to optimize 11 angles sequentially, 256 candidates per extension, with n and d as above. The score computations dominate the running time, but can readily be parallelized. It is neither feasible nor desirable on most current MR scanners to optimize the sequence during the measurement, so an important question is whether sequences optimized on some slices work better in general as well (for the same contrast and similar objects). We tested transferability by measuring five other slices not seen by the optimization method. The results (Table 3, upper right) indicate that the main improvements are not specific to the object the sequence was optimized for.13 Two spirals found by our method are shown in Figure 4 (2 of 8 interleaves, Nshot = 8). The spacing is not equidistant, and as noted above, only nonlinear MAP estimation can successfully interpolate across resulting larger k-space gaps. On the other hand, the spacing is more regular than is typically achieved by random sampling. 5 Discussion We have presented the first scalable Bayesian experimental design framework for automatically optimizing MRI sequences, a problem of high impact on clinical diagnostics and brain research. The high demands on image resolution and processing time which come with this application are met in principle by our novel variational inference algorithm, reducing computations to signal processing 11Images exhibit a decay in power as function of spatial frequence (distance to k-space origin), and the most evident failure of uniform random sampling is the ignorance of this fact [15]. While this point is noted in [8], the variable-density weighting suggested there is built in to all designs compared here. Any spiral interleave samples more closely around the origin. In fact, the sampling density as a function of spatial frequency |k(t)| does not depend on the offset angles θ0. 12In another set of experiments (not shown), we compared optimization, randomization, and equispacing of θ0 ∈[0, 2π), in disregard of the approximate real-valuedness of utrue. In this setting, equispacing performs poorly (worse than randomization). 13However, it is important that the object exhibits realistic natural image statistics. Artificial phantoms of extremely simple structure, often used in MR sequence design, are not suitable in that respect. Real MR images are much more complicated than simple phantoms, even in low level statistics, and results obtained on phantoms only should not be given overly high attendance. 7 primitives such as FFT and gridding. We demonstrated the power of our approach in a study with spiral sequences, using raw data from a 3T MR scanner. The sequences found by our method lead to reconstructions of high quality, even though they are faster than traditionally used Nyquist setups by a factor up to two. They improve strongly on sequences obtained by blind randomization. Moreover, across all designs, nonlinear Bayesian MAP estimation was found to be essential for reconstructions from undersamplings, and our design optimization framework is especially useful for subsequent MAP reconstruction. Our results strongly suggest that modifications to standard sequences can be found which produce similar images at lower cost. Namely, with so many handles to turn in sequence design nowadays, this is a high-dimensional optimization problem dealing with signals (images) of high complexity, and human experts can greatly benefit from goal-directed machine exploration. Randomizing parameters of a sequence, as suggested by compressed sensing theory, helps to break wasteful symmetries in regular standard sequences. As our results show, many of the advantages of regular sequences are lost by randomization though. The optimization of Bayesian information leads to irregular sequences as well, improving on regular, and especially on randomized designs. Our insights should be especially valuable in MR applications where a high temporal resolution is essential (such as fMRI studies), so that dense spatial sampling is not even an option. An extension to 3d volume reconstruction, making use of non-Gaussian hidden Markov models, is work in progress. Finally, our framework seems also promising for real-time imaging [1, ch. 11.4], where the scanner allows for on-line adaptations of the sequence depending on measurement feedback. It could be used to help an operator homing in on regions of interest, or could even run without human intervention. We intend to test our proposal directly on an MR scanner, using the sequential setup described in Section 2. This will come with new problems not addressed in Section 4, such as phase or image errors that depend on the sequence employed14 (which could be accounted for by a more elaborate noise model). In our experiments in Section 4, the choice of different offset angles is cost-neutral, but when a larger set of candidates is used, respective costs have to be quantified in terms of real scan time, error-proneness, heating due to rapid gradient switching, and other factors. Acknowledgments We thank Stefan Kunis for help and support with NFFT. References [1] M.A. Bernstein, K.F. King, and X.J. Zhou. Handbook of MRI Pulse Sequences. Elsevier Academic Press, 1st edition, 2004. [2] A. Garroway, P. Grannell, and P. Mansfield. Image formation in NMR by a selective irradiative pulse. J. Phys. C: Solid State Phys., 7:L457–L462, 1974. [3] M. Girolami. A variational method for learning sparse and overcomplete representations. N. Comp., 13:2517–2532, 2001. [4] G. Golub and C. Van Loan. Matrix Computations. Johns Hopkins University Press, 3rd edition, 1996. [5] A. Haase, J. Frahm, D. Matthaei, W. H¨anicke, and K. Merboldt. FLASH imaging: Rapid NMR imaging using low flip-angle pulses. J. Magn. Reson., 67:258–266, 1986. [6] J. Hennig, A. Nauerth, and H. Friedburg. RARE imaging: A fast imaging method for clinical MR. Magn. Reson. Med., 3(6):823–833, 1986. [7] P. Lauterbur. Image formation by induced local interactions: Examples employing nuclear magnetic resonance. Nature, 242:190–191, 1973. [8] M. Lustig, D. Donoho, and J. Pauly. Sparse MRI: The application of compressed sensing for rapid MR imaging. Magn. Reson. Med., 85(6):1182–1195, 2007. [9] P. Mansfield. Multi-planar image formation using NMR spin-echoes. J. Phys. C, 10:L50–L58, 1977. [10] M. Schneider and A. Willsky. Krylov subspace estimation. SIAM J. Comp., 22(5):1840–1864, 2001. [11] M. Seeger. Bayesian inference and optimal design for the sparse linear model. JMLR, 9:759–813, 2008. [12] M. Seeger and H. Nickisch. Compressed sensing and Bayesian experimental design. In ICML 25, 2008. [13] M. Seeger and H. Nickisch. Large scale variational inference and experimental design for sparse generalized linear models. Technical Report TR-175, Max Planck Institute for Biological Cybernetics, T¨ubingen, Germany, September 2008. [14] M. Tipping and A. Faul. Fast marginal likelihood maximisation for sparse Bayesian models. In AI and Statistics 9, 2003. [15] Y. Weiss, H. Chang, and W. Freeman. Learning compressed sensing. Snowbird Learning Workshop, Allerton, CA, 2007. [16] D. Wipf and S. Nagarajan. A new view of automatic relevance determination. In NIPS 20, 2008. 14Some common problems with spirals are discussed in [1, ch. 17.6.3], together with remedies. 8
2008
189
3,441
An Empirical Analysis of Domain Adaptation Algorithms for Genomic Sequence Analysis Gabriele Schweikert1 Max Planck Institutes Spemannstr. 35-39, 72070 T¨ubingen, Germany Gabriele.Schweikert@tue.mpg.de Christian Widmer1 Friedrich Miescher Laboratory Spemannstr. 39, 72070 T¨ubingen, Germany ZBIT, T¨ubingen University Sand 14, 72076 T¨ubingen, Germany Christian.Widmer@tue.mpg.de Bernhard Sch¨olkopf Max Planck Institute for biol. Cybernetics Spemannstr. 38, 72070 T¨ubingen, Germany Bernhard.Schoelkopf@tue.mpg.de Gunnar R¨atsch Friedrich Miescher Laboratory Spemannstr. 39, 72070 T¨ubingen, Germany Gunnar.Raetsch@tue.mpg.de Abstract We study the problem of domain transfer for a supervised classification task in mRNA splicing. We consider a number of recent domain transfer methods from machine learning, including some that are novel, and evaluate them on genomic sequence data from model organisms of varying evolutionary distance. We find that in cases where the organisms are not closely related, the use of domain adaptation methods can help improve classification performance. 1 Introduction Ten years ago, an eight-year lasting collaborative effort resulted in the first completely sequenced genome of a multi-cellular organism, the free-living nematode Caenorhabditis elegans. Today, a decade after the accomplishment of this landmark, 23 eukaryotic genomes have been completed and more than 400 are underway. The genomic sequence builds the basis for a large body of research on understanding the biochemical processes in these organisms. Typically, the more closely related the organisms are, the more similar the biochemical processes. It is the hope of biological research that by analyzing a wide spectrum of model organisms, one can approach an understanding of the full biological complexity. For some organisms, certain biochemical experiments can be performed more readily than for others, facilitating the analysis of particular processes. This understanding can then be transferred to other organisms, for instance by verifying or refining models of the processes—at a fraction of the original cost. This is but one example of a situation where transfer of knowledge across domains is fruitful. In machine learning, the above information transfer is called domain adaptation, where one aims to use data or a model of a well-analyzed source domain to obtain or refine a model for a less analyzed target domain. For supervised classification, this corresponds to the case where there are ample labeled examples (xi, yi), i = 1, . . . , m for the source domain, but only few such examples (xi, yi), i = m + 1, . . . , m + n for the target domain (n ≪m). The examples are assumed to be drawn independently from the joint probability distributions PS(X, Y ) and PT (X, Y ), respectively. The distributions PS(X, Y ) = PS(Y |X) · PS(X) and PT (X, Y ) = PT (Y |X) · PT (X) can differ in several ways: (1) In the classical covariate shift case, it is assumed that only the distributions of the input features P(X) varies between the two domains: PS(X) ̸= PT (X). The conditional, however, remains 1These authors contributed equally. invariant, PS(Y |X) = PT (Y |X). For a given feature vector x the label y is thus independent of the domain from which the example stems. An example thereof would be if a function of some biological material is conserved between two organisms, but its composition has changed (e.g. a part of a chromosome has been duplicated). (2) In a more difficult scenario the conditionals differ between domains, PS(Y |X) ̸= PT (Y |X), while P(X) may or may not vary. This is the more common case in biology. Here, two organisms may have evolved from a common ancestor and a certain biological function may have changed due to evolutionary pressures. The evolutionary distance may be a good indicator for how well the function is conserved. If this distance is small, we have reason to believe that the conditionals may not be completely different, and knowledge of one of them should then provide us with some information also about the other one. While such knowledge transfer is crucial for biology, and performed by biologists on a daily basis, surprisingly little work has been done to exploit it using machine learning methods on biological databases. The present paper attempts to fill this gap by studying a realistic biological domain transfer problem, taking into account several of the relevant dimensions in a common experimental framework: • methods — over the last years, the field of machine learning has seen a strong increase in interest in the domain adaptation problem, reflected for instance by a recent NIPS workshop • domain distance — ranging from close organisms, where simply combining training sets does the job, to distant organisms where more sophisticated methods can potentially show their strengths • data set sizes — whether or not it is worth transferring knowledge from a distant organism is expected to depend on the amount of data available for the target system With the above in mind, we selected the problem of mRNA splicing (see Figure A1 in the Appendix for more details) to assay the above dimensions of domain adaptation on a task which is relevant to modern biology. The paper is organized as follows: In Section 2, we will describe the experimental design including the datasets, the underlying classification model, and the model selection and evaluation procedure. In Section 3 we will briefly review a number of known algorithms for domain adaptation, and propose certain variations. In Section 4 we show the results of our comparison with a brief discussion. 2 Experimental Design 2.1 A Family of Classification Problems We consider the task of identifying so-called acceptor splice sites within a large set of potential splice sites based on a sequence window around a site. The idea is to consider the recognition of splice sites in different organisms: In all cases, we used the very well studied model organism C. elegans as the source domain. As target organisms we chose two additional nematodes, namely, the close relative C. remanei, which diverged from C. elegans 100 million years ago [10], and the more distantly related P. pacificus, a lineage which has diverged from C. elegans more than 200 million years ago [7]. As a third target organism we used D. melanogaster, which is separated from C. elegans by 990 million years [11]. Finally, we consider the plant A. thaliana, which has diverged from the other organisms more than 1,600 million years ago. It is assumed that a larger evolutionary distance will likely also have led to an accumulation of functional differences in the molecular splicing machinery. We therefore expect that the differences of classification functions for recognizing splice sites in these organisms will increase with increasing evolutionary distance. 2.2 The Classification Model It has been demonstrated that Support Vector Machines (SVMs) [1] are well suited for the task of splice site predictions across a wide range of organisms [9]. In this work, the so-called Weighted Degree kernel has been used to measure the similarity between two example sequences x and x′ of fixed length L by counting co-occurring substrings in both sequences at the same position: kwd ℓ(x, x′) = 1 L L−l+1 X l=1 ℓ X d=1 βdI  x[l:l+d] = x′ [l:l+d]  (1) where x[l:l+d] is the substring of length d of x at position l and βd = 2 ℓ−d+1 ℓ2+ℓis the weighting of the substring lengths. In our previous study we have used sequences of length L = 140 and substrings of length ℓ= 22 for splice site detection [9]. With the four-letter DNA sequence alphabet {A, C, G, T} this leads to a very high dimensional feature space (> 1013 dimensions). Moreover, to archive the best classification performance, a large number of training examples is very helpful ([9] used up to 10 million examples). For the designed experimental comparison we had to run all algorithms many times for different training set sizes, organisms and model parameters. We chose the source and target training set as large as possible–in our case at most 100,000 examples per domain. Moreover, not for all algorithms we had efficient implementations available that can make use of kernels. Hence, in order to perform this study and to obtain comparable results, we had to restrict ourselves to a case were we can explicitly work in the feature space, if necessary (i.e. ℓnot much larger than two). We chose ℓ= 1. Note, that this choice does not limit the generality of this study, as there is no strong reason, why efficient implementations that employ kernels could not be developed for all methods. The development of large scale methods, however, was not the main focus of this study. Note that the above choices required an equivalent of about 1500 days of computing time on state-ofthe-art CPU cores. We therefore refrained from including more methods, examples or dimensions. 2.3 Splits and Model Selection In the first set of experiments we randomly selected a source dataset of 100,000 examples from C. elegans, while data sets of sizes 2,500, 6,500, 16,000, 40,000 and 100,000 were selected for each target organism. Subsequently we performed a second set of experiments where we combined several sources. For our comparison we used 25,000 labeled examples from each of four remaining organisms to predict on a target organism. We ensured that the positives to negatives ratio is at 1/100 for all datasets. Two thirds of each target set were used for training, while one third was used for evaluation in the course of hyper-parameter tuning.1 Additionally, test sets of 60,000 examples were set aside for each target organism. All experiments were repeated three times with different training splits (source and target), except the last one which always used the full data set. Reported will be the average area under the precision-recall-curve (auPRC) and its standard deviation, which is considered a sensible measure for imbalanced classification problems. The data and additional information will be made available for download on a supplementary website.2 3 Methods for Domain Adaptation Regarding the distributional view that was presented in Section 1, the problem of splice site prediction can be affected by both evils simultaneously, namely PS(X) ̸= PT (X) and PS(Y |X) ̸= PT (Y |X), which is also the most realistic scenario in the case of modeling most biological processes. In this paper, we will therefore drop the classical covariate shift assumption, and allow for different predictive functions PS(Y |X) ̸= PT (Y |X). 3.1 Baseline Methods (SVMS and SVMT ) As baseline methods for the comparison we consider two methods: (a) training on the source data only (SVMS) and (b) training on the target data only (SVMT ). For SVMS we use the source data for training however we tune the hyper-parameter on the available target data. For SVMT we use the available target data for training (67%) and model selection (33%). The resulting functions are fS(x) = ⟨Φ(x), wS⟩+ bS and fT (x) = ⟨Φ(x), wT ⟩+ bT . 1Details on the hyper-parameter settings and tuning are shown in Table A2 in the appendix. 2http://www.fml.mpg.de/raetsch/projects/genomedomainadaptation 3.2 Convex Combination (SVMS+SVMT ) The most straightforward idea for domain adaptation is to reuse the two optimal functions fT and fS as generated by the base line methods SVMS and SVMT and combine them in a convex manner: F(x) = αfT (x) + (1 −α)fS(x). Here, α ∈[0, 1] is the convex combination parameter that is tuned on the evaluation set (33%) of the target domain. A great benefit of this approach is its efficiency. 3.3 Weighted Combination (SVMS+T ) Another simple idea is to train the method on the union of source and target data. The relative importance of each domain is integrated into the loss term of the SVM and can be adjusted by setting domain-dependent cost parameters CS and CT for the m and n training examples from the source and target domain, respectively: min w,ξ 1 2∥w∥2 + CS m X i=1 ξi + CT m+n X i=m+1 ξi (2) s.t. yi(⟨w, Φ(xi)⟩+ b) ≥1 −ξi ∀i ∈[1, m + n] ξi ≥0 ∀i ∈[1, m + n] This method has two model parameters and requires training on the union of the training sets. Since the computation time of most classification methods increases super-linearly and full model selection may require to train many parameter combinations, this approach is computationally quite demanding. 3.4 Dual-task Learning (SVMS,T ) One way of extending the weighted combination approach is a variant of multi-task learning [2]. The idea is to solve the source and target classification problems simultaneously and couple the two solutions via a regularization term. This idea can be realized by the following optimization problem: min wS,wT ,ξ 1 2∥wS −wT ∥2 + C m+n X i=1 ξi (3) s.t. yi(⟨wS, Φ(xi)⟩+ b) ≥1 −ξi ∀i ∈1, . . . , m yi(⟨wT , Φ(xi)⟩+ b) ≥1 −ξi ∀i ∈m + 1, . . . , m + n ξi ≥0 ∀i ∈1, . . . , m + n Please note that now wS and wT are optimized. The above optimization problem can be solved using a standard QP-solver. In a preliminary experiment we used the optimization package CPLEX to solve this problem, which took too long as the number of variables is relatively large. Hence, we decided to approximate the soft-margin loss using the logistic loss l(f(x), y) = log(1+exp(−yf(x))) and to use a conjugate gradient method3 to minimize the resulting objective function in terms of wS and wT . 3.5 Kernel Mean Matching (SVMS→T ) Kernel methods map the data into a reproducing kernel Hilbert space (RKHS) by means of a mapping Φ : X →H related to a positive definite kernel via k(x, x′) = ⟨Φ(x), Φ(x′)⟩. Depending on the choice of kernel, the space of H may be spanned by a large number of higher order features of the data. In such cases, higher order statistics for a set of input points can be computed in H by simply taking the mean (i.e., the first order statistics). In fact, it turns out that for a certain class of kernels, the mapping µ : (x1, . . . , xn) 7→1 n n X i=1 Φ(xi) 3We used Carl Rasmussen’s minimize function. is injective [5] — in other words, given knowledge of (only) the mean (the right hand side), we can completely reconstruct the set of points. For a characterization of this class of kernels, see for instance [4]. It is often not necessary to retain all information (indeed, it may be useful to specify which information we want to retain and which one we want to disregard, see [8]). Generally speaking, the higher dimensional H, the more information is contained in the mean. In [6] it was proposed that one could use this for covariate shift adaptation, moving the mean of a source distribution (over the inputs only) towards the mean of a target distribution by re-weighting the source training points. We have applied this to our problem, but found that a variant of this approach performed better. In this variant, we do not re-weight the source points, but rather we translate each point towards the mean of the target inputs: ˆΦ(xj) = Φ(xj) −α 1 m m X i=1 Φ(xi) −1 n m+n X i=m+1 Φ(xi) ! ∀j = 1, . . . , m. This also leads to a modified source input distribution which is statistically more similar to the target distribution and which can thus be used to improve performance when training the target task. Unlike [6], we do have a certain amount of labels also for the target distribution. We make use of them by performing the shift separately for each class y ∈{±1}: ˆΦ(xj) = Φ(xj) −α 1 my m X i=1 [[yi = y]]Φ(xi) −1 ny m+n X i=m+1 [[yi = y]]Φ(xi) ! for all j = m + 1, . . . , m + n with yj = y, where my and ny are the number of source and target examples with label y, respectively. The shifted examples can now be used in different ways to obtain a final classifier. We decided to use the weighted combination with CS = CT for comparison. 3.6 Feature Augmentation (SVMS×T ) In [3] a method was proposed that augments the features of source and target examples in a domainspecific way: ˆΦ(x) = (Φ(x), Φ(x), 0)⊤ for i = 1, . . . , m ˆΦ(x) = (Φ(x), 0, Φ(x))⊤ for i = m + 1, . . . , m + n. The intuition behind this idea is that there exist one set of parameters that models the properties common to both sets and two additional sets of parameters that model the specifics of the two domains. It can easily be seen that the kernel for the augmented feature space can be computed as: kAUG(xi, xi) =  2⟨Φ(xi), Φ(xj)⟩ if [[i ≤m]] = [[j ≤m]] ⟨Φ(xi), Φ(xj)⟩ otherwise This means that the “similarity” between two examples is two times as high, if the examples were drawn from the same domain, as if they were drawn from different domains. Instead of the factor 2, we used a hyper-parameter B in the following. 3.7 Combination of Several Sources Most of the above algorithms can be extended in one way or another to integrate several source domains. In this work we consider only three possible algorithms: (a) convex combinations of several domains, (b) KMM on several domains and (c) an extension of the dual-task learning approach to multi-task learning. We briefly describe these methods below: Multiple Convex Combinations (M-SVMS+SVMT ) The most general version would be to optimize all convex combination coefficients independently. If done in a grid-search-like manner, it becomes prohibitive for more than say three source domains. In principle, one can optimize these coefficients also by solving a linear program. In preliminary experiments we tried both approaches and they typically did not lead to better results than the following combination: F(x) = αfT (x) + (1 −α) 1 |S| X S∈S fS(x), where S is the set of all considered source domains. We therefore only considered this way of combining the predictions. Multiple KMM (M-SVMS→T ) Here, we shift the source examples of each domain independently towards the target examples, but by the same relative distance (α). Then we train one classifier on the shifted source examples as well as the target examples. Multi-task Learning (M-SVMS,T ) We consider the following version of multi-task learning: min {wD}D∈D,ξ 1 2 X D1∈D X D2∈D γD1,D2∥wD1 −wD2∥2 + X i ξi (4) s.t. yi(⟨wDj, Φ(xi)⟩+ b) ≥1 −ξi (5) ξi ≥0 for all examples (xi, yi) in domain Dj ∈D, where D is the set of all considered domains. γ is a set of regularization parameters, which we parametrized by two parameters CS and CT in the following way: γD1,D2 = CS if D1 and D2 are source domains and CT otherwise. 4 Experimental Results We considered two different settings for the comparison. For the first experiment we assume that there is one source domain with enough data that should be used to improve the performance in the target domain. In the second setting we analyze whether one can benefit from several source domains. 4.1 Single Source Domain Due to space constraints, we restrict ourselves to presenting a summary of our results with a focus on best and worst performing methods. The detailed results are given in Figure A2 in the appendix, where we show the median auPRC of the methods SVMT , SVMS, SVMS→T , SVMS+T , SVMS+SVMT , SVMS×T and SVMS,T for the considered tasks. The summary is given in Figure 1, where we illustrate which method performed best (green), similarly well (within a confidence interval of σ/√n) as the best (light green), considerably worse than the best (yellow), not significantly better than the worst (light red) or worst (red). From these results we can make the following observations: 1. Independent of the task, if there is very little target data available, the training on source data performs much better than training on the target data. Conversely, if there is much target data available then training on it easily outperforms training the source data. 2. For a larger evolutionary distance of the target organisms to source organism C. elegans, a relatively small number of target training examples for the SVMT approach is sufficient to achieve similar performance to the SVMS approach, which is always trained on 100,000 examples. We call the number of target examples with equal source and target performance the break-even point. For instance, for the closely related organism C. remanei one needs nearly as many target data as source data to achieve the same performance. For the most distantly related organism A. thaliana, less than 10% target data is sufficient to outperform the source model. 3. In almost all cases, the performance of domain adaption algorithms is considerably higher than source (SVMS) and target only (SVMT ). This is most pronounced near the break-even point, e.g. 3% improvement for C. remanei and 14% for D. melanogaster. 4. Among the domain adaptation algorithms, the dual-task learning approach (SVMS,T ) performed most often best (12/20 cases). Second most often best (5/20) performed the convex combination approach (SVMS+SVMT ). From our observations we can conclude that the simple convex combination approach works surprisingly well. It is only outperformed by the dual-task learning algorithm which performs consistently well for all organisms and target training set sizes.
2008
19
3,442
Temporal Dynamics of Cognitive Control Jeremy R. Reynolds Department of Psychology University of Denver Denver, CO 80208 jeremy.reynolds@psy.du.edu Michael C. Mozer Department of Computer Science and Institute of Cognitive Science University of Colorado Boulder, CO 80309 mozer@colorado.edu Abstract Cognitive control refers to the flexible deployment of memory and attention in response to task demands and current goals. Control is often studied experimentally by presenting sequences of stimuli, some demanding a response, and others modulating the stimulus-response mapping. In these tasks, participants must maintain information about the current stimulus-response mapping in working memory. Prominent theories of cognitive control use recurrent neural nets to implement working memory, and optimize memory utilization via reinforcement learning. We present a novel perspective on cognitive control in which working memory representations are intrinsically probabilistic, and control operations that maintain and update working memory are dynamically determined via probabilistic inference. We show that our model provides a parsimonious account of behavioral and neuroimaging data, and suggest that it offers an elegant conceptualization of control in which behavior can be cast as optimal, subject to limitations on learning and the rate of information processing. Moreover, our model provides insight into how task instructions can be directly translated into appropriate behavior and then efficiently refined with subsequent task experience. 1 Introduction Cognitive control can be characterized as the ability to guide behavior according to current goals and plans. Control often involves overriding default or overlearned behaviors. Classic examples of experimental tasks requiring this ability include Stroop, Wisconsin card sorting, and task switching (for a review, see [1]). Although these paradigms vary in superficial features, they share the key underlying property that successful performance involves updating and maintaining a task set. The task set holds the information required for successful performance, e.g., the stimulus-response mapping, or the dimension along which stimuli are to be classified or reported. For example, in Wisconsin card sorting, participants are asked to classify cards with varying numbers of instances of a colored symbol. The classification might be based on color, symbol, or numerosity; instructions require participants to identify the current dimension through trial and error, and perform the appropriate classification until the dimension switches after some unspecified number of trials. Thus, it requires participants to maintain a task set—the classification dimension—in working memory (WM). Likewise, in the Stroop task, stimuli are color names presented in various ink colors, and the task set specifies whether the color is to be named or the word is to be read. To understand cognitive control, we need to characterize the brain’s policy for updating, maintaining, and utilizing task set. Moreover, we need to develop theories of how task instructions are translated into a policy, and how this policy is refined with subsequent experience performing a task. 1 1.1 Current Computational Theories of Control From a purely computational perspective, control is not a great challenge. Every computer program modulates its execution based on internal state variables. The earliest psychological theories of control had this flavor: Higher cognitive function was conceived of as a logical symbol system whose variables could be arbitrarily bound [2], allowing for instructions to be used appropriately—and perfectly—to update representations that support task performance. For example, in the Wisconsin card sorting task, the control instruction—the classification dimension—would be bound to a variable, and responses would be produced by rules of the form, “If the current dimension is D and the stimulus is X, respond Y”. Behavioral data indicate that this naive computational perspective is unlikely to be how control is implemented in the brain. Consider the following phenomena: • When participants are asked to switch tasks, performance on the first trial following a switch is inefficient, although performance on subsequent trials is efficient, suggesting that loading a new task set depends on actually performing the new task [3]. This finding is observed even for very simple tasks, and even when the switches are regular, highly predictable, and well practiced. • Switch costs are asymmetric, such that switching from an easy task to a difficult task is easier than vice-versa [4]. • Some task sets are more difficult to implement than others. For example, in the Stroop task, reading the word is quick and accurate, but naming the ink color is not [5]. • The difficulty of a particular task depends not only on the characteristics of the task itself, but also on context in which participants might be called upon to perform [6]. To account for phenomena such as these, theories of control have in recent years focused on how control can be implemented in cortical neural networks. In the prevailing neural-network-based theory, task set is represented in an activity-based memory system, i.e., a population of neurons whose recurrent activity maintains the representation over time. This active memory, posited to reside in prefrontal cortex (PFC), serves to bias ongoing processing in posterior cortical regions to achieve flexibility and arbitrary, task-dependent stimulus-response mappings (for review, see [1]). For example, in the Stroop task, instructions to report the ink color might bias the neural population representing colors—i.e., increase their baseline activity prior to stimulus onset—such that when stimulus information arrives, it will reach threshold more rapidly, and will beat out the neural population that represents word orthography in triggering response systems [7]. In this framework, a control policy must specify the updating and maintenance task set, which involves when to gate new representations into WM and the strength of the recurrent connection that maintains the memory. Further, the policy must specify which WM populations bias which posterior representations, and the degree to which biasing is required. Some modelers have simply specified the policy by hand [8], whereas most pretrain the model to perform a task—in a manner meant to reflect long-term learning prior to experimental testing [7, 9, 10]. These models provide an account for a range of neurophysiological and behavioral data. However, they might be criticized on a number of grounds. First, like their symbolic predecessors, the neural network models must often be crippled arbitrarily to explain data; for example, by limiting the strength of recurrent memory connections, the models obtain task set decay and can explain error data. Second, the models require a stage of training which is far more akin to how a monkey learns to perform a task than to how people follow task instructions. The reinforcement-learning based models require a long stage of trial-and-error learning before the appropriate control policy emerges. Whereas monkeys are often trained for months prior to testing, a notable characteristic of humans is that they can perform a task adequately on the first trial from task instructions [11]. 2 Control as Inference Our work aims to provide an alternative, principled conceptualization of cognitive control. Our goal is to develop an elegant theoretical framework with few free parameters that can easily be applied to a wide range of experimental tasks. With strong computational and algorithmic constraints, our framework has few degrees of freedom, and consequently, makes strong, experimentally verifiable 2 predictions. Additionally, as a more abstract framework than the neural net theories, one aim is to provide insight as to how task instructions can be used directly and immediately to control behavior. A fundamental departure of our approach from previous approaches is to consider WM as inherently probabilistic. That is, instead of proposing that task set is stored in an all-or-none fashion, we wish to allow for task set—as well as all cortical representations—to be treated as random variables. This notion is motivated by computational neuroscience models showing how population codes can be used to compute under uncertainty [12]. Given inherently probabilistic representations, it is natural to treat the problems of task set updating, maintenance and utilization as probabilistic inference. To provide an intuition about our approach, consider this scenario. I will walk around my house and tell you what objects I see. Your job is to guess what I’ll report next. Suppose I report the following sequence: REFRIGERATOR, STOVE, SINK, TOILET, SHOWER, DRESSER. To guess what I’m likely to see next, you need to infer what room I am in. Even though the room is a latent variable, it can be inferred from the sequence of observations. At some points in the sequence, the room can be determined with great confidence (e.g., after seeing TOILET and SHOWER). At other times, the room is ambiguous (e.g., following SINK), and only weak inferences can be drawn. By analogy, our approach to cognitive control treats task set as a latent variable that must be inferred from observations. The observations consist of stimulus-response-feedback triples.Sometimes the observations will strongly constrain the task set, as in the Stroop task when the word GREEN is shown in color red, and the correct response is red, or when an explicit instruction is given to report the ink color; but other times the observations provide little constraint, as when the word RED is shown in color red, and the correct response is red. One inference problem is therefore to determine task set from the stimulus-response sequence. A second, distinct inference problem is to determine the correct response on the current trial from the current stimulus and the trial history. Thus, in our approach, control and response selection are cast as inference under uncertainty. In this paper, we flesh out a model based on this approach. We use the model to account for behavioral data from two experiments. Each experiment involves a complex task environment in which experimental participants are required to switch among eight tasks that have different degrees of overlap and inconsistency with one another. Having constrained the model by fitting behavioral data, we then show that the model can explain neuroimaging data. Moreover, the model provides a different interpretation to these data than has been suggested previously. Beyond accounting for data, the model provides an elegant theoretical framework in which control and response selection can be cast as optimal, subject to limitations on the processing architecture. 3 Methods Our model addresses data from two experiments conducted by Koechlin, Ody, and Kouneiher [6]. In each experiment, participants are shown blocks of 12 trials, preceded by a cue that indicates which of the eight tasks is to be performed with the stimuli in that block. The task specifies a stimulusresponse mapping. The stimuli in Experiments 1 and 2 are colored squares and colored letters, respectively. Examples of the sequence of cues and stimuli for the two experiments is shown in Figure 1A. In both experiments, there are two potential responses. The stimulus-response mappings for Experiment 1 are shown in the eight numbered boxes of Figure 1C. (The layout of the boxes will be explained shortly.) Consider task 3 in the upper left corner of the Figure. The notation indicates that task 3 requires a left response to the green square, a right response to a red square, and no response (hereafter, no-go) to a white square. Task 4 is identical to task 3, and the duplication is included because the tasks are described as distinct to participants and each is associated with a unique task cue. The duplication makes the stimulus-response mapping twice as likely, because the eight tasks have uniform priors. Task 1 (lower left corner of the figure) requires a left response for a green square and no-go for a white square. There are no red stimuli in the task 1 blocks, and the green→left mapping is depicted twice to indicate that the probability of a green square appearing in the block is twice that of a white square. We now explain the 3 × 2 arrangement of cells in Figure 1C. First the rows. The four tasks in the lower row allow for only one possible response (not counting no-go as a response), whereas the four tasks in the upper row demand that a choice be made between two possible responses. 3 P1 P2 P1 P2 3 4 P1 P1 P2 P2 1 2 P1 P2 P1 P2 7 8 P1 P1 P2 P2 5 6 X X X X X X X X X X X X X X X X X X X X X X X X X: {A,E,I,O,a,e,i,o,C,G,K,P,c,g,k,p} P1: vowel/consonant; P2: Upper/lower case discrimination tasks A B C L R L R 3 4 L L R R 1 2 L R L R 7 8 L L R R 5 6 L: left response; R: right response time C3 C7 C3 C5 O k G c e l E p K a C i g P D E Figure 1: (A) Examples of stimulus sequences from Exp. 1 and 2 (top and bottom arrows, respectively) of [6]. (B) Eight tasks in Exp. 2, adapted from [6]. (C) Eight tasks in Exp. 1. (D) Response times from participants in Exp. 1 and 2 (white and black points, respectively). The data points correspond to the filled grey cells of (B) and (C), and appear in homologous locations. X-axis of graph corresponds to columns of the 3×2 array of cells in (B) and (C); squares and circles correspond to top and bottom row of each 3×2 array. (E) Simulation results from the model. Thus, the two rows differ in terms of the demands placed on response selection. The three columns differ in the importance of the task identity. In the leftmost column, task identity does not matter, because each mapping (e.g., green→left) is consistent irrespective of the task identity. In contrast, tasks utilizing yellow, blue, and cyan stimuli involve varied mappings. For example, yellow maps to left in two tasks, to right in one task, and to no-go in one task. The tasks in the middle column are somewhat less dependent on task identity, because the stimulus-response mappings called for have the highest prior. Thus, the three columns represent a continuum along which the importance of task identity varies, from being completely irrelevant (left column) to being critical for correct performance (right column). Empty cells within the grid are conceptually possible, but were omitted from the experiment. Experiment 2 has the same structure as Experiment 1 (Figure 1B), with an extra level of complexity. Rather than mapping a color to a response, the color determines which property of the stimulus is to be used to select a response. For example, task 3 of Figure 1B demands that a green letter stimulus (denoted as X here) be classified as a vowel or consonant (property P1), whereas a red letter stimulus be classified as upper or lower case (property P2). Thus, Experiment 2 places additional demands of stimulus classification and selection of the appropriate stimulus dimension. Participants in each experiment received extensive practice on the eight tasks before being tested. Testing involved presenting each task following each other task, for a total of 64 test blocks. 3.1 A Probabilistic Generative Model of Control Tasks Following the style of many probabilistic models in cognitive science, we have designed a generative model of the domain, and then invert the model to perform recognition via Bayesian inference. In our case, the generative model is of the control task, i.e., the model produces sequences of stimulusresponse pairs such that the actual trial sequence would be generated with high probability. Instead of learning this model from data, though, we assume that task instructions are ’programmed’ into the model. Our generative model of control tasks is sketched in Figure 2A as a dynamical Bayes net. Vertical slices of the model represent the trial sequence, with the subscript denoting the trial index. First we explain the nodes and dependencies and then describe the conditional probability distributions (CPDs). The B node represents the task associated with the current block of trials. (We use the term ’block’ as shorthand notation for this task.) The block on trial k has 8 possible values in the experiments we 4 T T T Bk-1 Bk Bk+1 Ck-1 Sk-1 Rk-1 Ck Sk Rk Ck+1 Sk+1 Rk+1 Figure 2: Dynamical Bayes net depiction of our generative model of control tasks, showing the trial-to-trial structure of the model. model, and its value depends on the block on trial k  1. The block determines the category of the stimulus, C, which in turn determines the stimulus identity, S. The categories relevant to the present experiments are: color label, block cue (the cue that identifies the task in the next block), upper/lower case for letters, and consonant/vowel for letters. The stimuli correspond to instantiations of these categories, e.g., the letter Q which is an instance of an upper case consonant. Finally, the R node denotes the response, which depends both on the current stimulus category and the current block. This description of the model is approximate for two reasons. First, we decompose the category and stimulus representations into shape and color dimensions, expanding C into Ccolor and Cshape, and S into Scolor and Sshape. (When we refer to C or S without the superscript, it will denote both the shape and color components.) Second, we wish to model the temporal dynamics of a single trial, in order to explain response latencies. Although one could model the temporal dynamics as part of the dynamical Bayes net architecture, we adopted a simpler and nearly equivalent approach, which is to explicitly represent time, T, within a trial, and to assume that in the generative model, stimulus information accumulates exponentially over time. With normalization of probabilities, this formulation is identical to a naive Bayes model with conditionally independent stimulus observations at each time step. With these two modifications, the slices of the network (indicated by the dashed rectangle in Figure 2A) are as depicted in Figure 2B. To this point, we’ve designed a generic model of any experimental paradigm involving contextdependent stimulus-response mappings. The context is provided by the block B, which is essentially a memory that can be sustained over trials. To characterize a specific experiment, we must specify the CPDs in the architecture. These distributions can be entirely determined by the experiment description (embodied in Figure 1B,C). We toss in one twist to the model, which is to incorporate four parameters into the CPDs that permit us to specify aspects of the human cognitive architecture, as follows: , the degree of task knowledge (0: no knowledge; 1: perfect knowledge);  , the persistence of the block memory (0: memory decays completely from one trial to the next; 1: memory is perfect); and  shape and  color, the rate of transmission of shape and color information between stimulus and category representations. Given these parameters and the experiment description, we can define the CPDs in the model: • P(Bk = b | Bk 1 = b) =  b ,b  + (1   )/NB, where  .,. is the Kronecker delta and NB is the number of distinct block (task) identities. This distribution is a mixture of a uniform distribution (no memory of block) and an identity mapping (perfect memory). • P(Cz k| Bk) = P  (Cz k| Bk) + (1  )/NCz, where z  { color,shape} and NCz is the number of distinct category values along dimension z, and P  (.| .) is the probability distribution defined by the experiment and task (see Figure 2B,C). The mixture parameter, , interpolates between a uniform distribution (no knowledge of task) and a distribution that represents complete task knowledge. • P(Rk| Bk,Ck) = P  (Rk| Bk,Ck) + (1  )/NR, where NR is the number of response alternatives (including no-go). • P(Sz k = s| Cz k = c,T = t)  (1 +  zM z(s,c))t, where z  { color,shape} and M z(s,c) is a membership function that has value 1 if s is an instance of category c along dimension z, or 0 otherwise. By this CPD, the normalized probability for stimulus s grows exponentially to 5 premotor cortex HUMAN ! MR SIgnal Exp. 1 Exp. 2 R node MODEL Entropy posterior lateral PFC Single Dual Exp. 1 Exp. 2 Cshape node anterior lateral PFC B node Importance of Task Identity Figure 3: (top row) human neuroimaging data from three brain regions [6], (bottom row) entropy read out from three nodes of the model. Full explanation in the text. asymptote as a function of time t if s belongs to category c, and drops exponentially toward zero if s does not belong to c. This formulation encodes the experiment description—as represented by the P ∗(.) probabilities—in the model’s CPDs, with smoothing via ϵ to represent less-than-perfect knowledge of the experiment description. We would like to read out from the model a response on some trial k, given the stimulus on trial k, Sk, and a history of past stimulus-response pairs, Hk = {S1...Sk−1, R1...Rk−1}. (In the experiments, subjects are well practiced and make few errors. Therefore, we assume the R’s are correct or corrected responses.) The response we wish to read out consists of a choice and the number of time steps required to make the choice. To simulate processing time within a trial, we search over T. Larger T correspond to more time for evidence to propagate in the model, which leads to lower entropy distributions over the hidden variables Ck and Rk. The model initiates a response when one value of Rk passes a threshold θ, i.e., when [maxr P(Rk = r|Sk, T, Hk)] > θ. This yields the response time (RT) t∗= min n t | h max r P(Rk = r|Sk, T = t, Hk) i > θ o (1) and the response r∗= argmaxr P(Rk = r|Sk, T = t∗, Hk). 4 Simulation Results We simulated the model on a trial sequence like that in the human study. We obtained mean RTs and error rates from the model in the four experimental conditions of the two experiments (see the filled cells of Figure 1B,C). The model’s five parameters—ϵ, λ, γshape, γcolor, and θ—were optimized to obtain the maximum correlation between the mean RTs obtained from the simulation (Equation 1) and the human data (Figure 1D). This optimization resulted in a correlation between human and simulation RTs of 0.99 (compare Figure 1D and E), produced by parameter values ϵ = 0.87, λ = 0.79, γshape= 0.34, γcolor= 0.88, and θ = 0.63. To express simulation time in units of milliseconds— the measure of time collected in the human data—we allowed an affine transform, which includes two free parameters: an offset constant indicating the time required for early perceptual and late motor processes, which are not embodied in the model, and a scale constant to convert units of simulation time to milliseconds. With these two transformation parameters, the model had a total of seven parameters. The astute reader will note that there are only eight data points to fit, and one should therefore not be impressed by a close match between simulation and data. However, our goal is to constrain model parameters with this fit, and then explore emergent properties of the resulting fully constrained model. One indication of model robustness is how well the model generalizes to sequences of trials other than the one on which it was optimized. Across 11 additional generalization runs, the correlation between model and empirical data remained high with low variability (¯ρ = 0.97, σρ = 0.004). Another indication of the robustness of the result is to determine how sensitive the model is to the choice of parameters. If randomly selected parameters yield large correlations, then the model architecture itself is responsible for the good fit, not the particular choice of parameters. To perform this test, we excluded parameters ranges in which the model failed to respond reliably (i.e., 6 the model never attained the response criterion of Equation 1), or in which the model produced no RT variation across conditions. These requirements led to parameter ranges of: 0.8 ≤ϵ ≤0.98; 0.1 ≤γcolor, γshape ≤1.5; 0.6 ≤λ ≤0.98; 0.65 ≤θ ≤0.85. All randomly selected combinations of parameters in these ranges led to correlation values greater than 0.9, demonstrating that the qualitative fit between model and behavioral results was insensitive to parameter selection, and that the structure of the model is largely responsible for the fit obtained. Koechlin, Ody, and Kouneiher [6] collected not only behavioral data, but also neuroimaging data that identified brain regions involved in control, and how these brain regions modulated their activation across experimental manipulations. There were three manipulations in the experiments: (1) the demand on response selection (varied along rows of Figure 1C), (2) the importance of task identity (varied along the three columns of both Figure 1B and 1C), and (3) the demand of stimulus classification and selection of stimulus dimensions (varied along rows of Figure 1B). The top row of Figure 3 shows effects of these experimental manipulations on the fMRI BOLD response of three different brain regions. The remarkable result obtained in our simulations is that we identified three components of the model that produced signatures analogous to those of the fMRI BOLD response in three cortical areas. We hypothesized that neural (fMRI) activity in the brain might be related to the entropy of nodes in the model, on account of the fact that when entropy is high, many possibilities must be simultaneously represented, which may lead to greater BOLD signal. Because fMRI techniques introduce significant blurring in time, any measure in the model corresponding to the fMRI signal would need to be integrated over the time of a trial. We therefore computed the mean entropy of each model node over time T = 1...t∗within a trial. We then averaged the entropy measure across trials within a condition, precisely as we did the RTs. To compare these entropy measures to the imaging data, the value corresponding to the bottom left cell of each experiment array (see Figure 1B and 1C) was subtracted from all of the conditions of that particular experiment. This subtraction was performed because the nature of the MRI signal is relative, and these two cells form the baseline conditions within the empirical observations. After performing this normalization, the values for R and Cshape were then collapsed across the columns in panels B and C of Figure 1, resulting in a bar for each row within each panel. Additionally, the values for B were then collapsed across the rows of each panel, resulting in a value for each column. The model entropy results are shown in the bottom row of Figure 3, and comparison with the top row reveals an exact correspondence. We emphasize that these results are obtained with the model which was fully constrained by fitting the RT data. Thus, these results are emergent properties of the model. Based on functional neuroanatomy, the correspondence between model components and brain regions is quite natural. Starting with the left column of Figure 3, uncertainty in the model’s response corresponds to activity in premotor cortex. This activity is greater when the block calls for two distinct responses than when it calls for one. In the middle column of Figure 3, the uncertainty of shape categorization corresponds to activity in posterior lateral prefrontal cortex. This region is thought to be involved in the selection of task-relevant information, which is consistent with the nature of the current conditions that produce increases. In the right column of Figure 3, the uncertainty of the task identity (block) in the model corresponds to activity in anterior lateral PFC, a brain region near areas known to be involved in WM maintenance. Interestingly, the lower the entropy the higher the neural activity, in contrast to the other two regions. There is a natural explanation for this inversion, though: entropy is high in the block node when the block representation matters the least, i.e., when the stimulus-response mapping does not depend on knowing the task identity. Thus, higher entropy of the block node actually connotes less information to be maintained due to the functional equivalence among classes. 5 Discussion We proposed a theoretical framework for understanding cognitive control which provides a parsimonious account of behavioral and neuroimaging data from two large experiments. These experiments are sufficiently broad that they subsume several other experimental paradigms (e.g., Stroop, task switching). Koechlin et al. [6] explain their findings in terms of a descriptive model that involves a complex hierarchy of control processes within prefrontal cortex. The explanation for the neuroimaging data that emerges from our model is arguable simpler and more intuitive. 7 0 10 20 30 40 50 60 70 80 90 100 0 0.5 1 Trial Number p(Bk) 1 2 3 4 5 6 7 8 Figure 4: Task (block) representation over a sequence of trials that involves all eight task types. The key insight that underlies our model is the notion that cortical representations are intrinsically probabilistic. This notion is not too surprising to theorists in computational neuroscience, but it leads to a perspective that is novel within the field of control: that the all-or-none updating of WM can be replaced with a probabilistic notion of updating, and the view that WM holds competing hypotheses in parallel. Framing WM in probabilistic terms also offers a principled explanation for why WM should decay. The parameter λ controls a tradeoff between the ability to hold information over time and the ability to update when new relevant information arrives. In contrast, many neural network models have two distinct parameters that control these aspects of memory. Another novelty of our approach is the notion of that control results from dynamical inference processes, instead of being conceived of as resulting from long-term policy learning. Inference plays a critical role on the WM (task identity) representation: WM is maintained not solely from internal processes (e.g., the recurrent connections in a neural net), but is continually influenced by the ongoing stream of stimuli via inference. The stimulus stream sometimes supports the WM representation and sometimes disrupts it. Figure 4 shows the trial-to-trial dynamics of the WM in our model. Note that depending on the task, the memory looks quite different. When the stimulus-response pairs are ambiguous as to the task, the representation becomes less certain. Fortunately for the model’s performance, this is exactly the circumstance in which remembering the task identity is least critical. Figure 4 also points to a promising future direction for the model. The stream of trials clearly shows strong sequential effects. We are currently pursuing opportunities to examine the model’s predictions regarding performance on the first trial in a block versus subsequent trials. The model shows an effect observed in the task switching literature: initial trial performance is poor, but control rapidly tunes to the task and subsequent trials are more efficient and roughly comparable. Our model seems to have surprisingly strong predictive power. This power comes about from the fact that the model expresses a form of bounded rationality: the model encodes the structure of the task, subject to limitations on memory, learning, and the rate of perceptual processing. Exploiting this bounded rationalityleads to strong constraints, few free parameters, and the ability to extend the model to new tasks without introducing additional free parameters. References [1] E. K. Miller and J. D. Cohen. An integrative theory of prefrontal cortex function. Annual Review of Neuroscience, 24:167–202, 2001. [2] A. Newell and H. A. Simon. Human Problem Solving. Prentice-Hall, Englewood Cliffs, NJ, 1972. [3] Robert D. Rogers and Stephen Monsell. Costs of a predictable switch between simple cognitive tasks. Journal of Experimental Psychology: General, 124:207– 231, 1995. [4] Nick Yeung and Stephen Monsell. Switching between tasks of unequal familiarity: the role of stimulus-attribute and response-set selection. J Exp Psychol Hum Percept Perform, 29(2):455–469, 2003. [5] C. M. MacLeod. Half a century of research on the Stroop effect: An integrative review. Psychological Bulletin, 109:163–203, 1991. [6] E. Koechlin, C. Ody, and F. Kouneiher. Neuroscience: The architecture of cognitive control in the human prefrontal cortex. Science, 424:1181–1184, 2003. [7] J. D. Cohen, K. Dunbar, and J. L. McClelland. On the control of automatic processes: A parallel distributed processing model of the Stroop effect. Psychological Review, 97(3):332–361, 1990. [8] S. J. Gilbert and T. Shallice. Task switching: A pdp model. Cognitive Psychology, 44:297–337, 2002. [9] N. P. Rougier, D. Noelle, T. S. Braver, J. D. Cohen, and R. C. O’Reilly. Prefrontal cortex and the flexibility of cognitive control: Rules without symbols. Proceedings of the National Academy of Sciences, 102(20):7338–7343, 2005. [10] M. J. Frank and R. C. O’Reilly. A mechanistic account of striatal dopamine function in human cognition: Psychopharmacological studies with cabergoline and haloperidol. Behavioral Neuroscience, 120:497–517, 2006. [11] Stephen Monsell. Control of mental processes. In V. Bruce, editor, Unsolved mysteries of the mind: Tutorial essays in cognition, pages 93–148. Psychology press, Hove, UK, 1996. [12] R S Zemel, P Dayan, and A Pouget. Probabilistic interpretation of population codes. Neural Comput, 10(2):403–430, 1998. 8
2008
190
3,443
Overlaying classifiers: a practical approach for optimal ranking St´ephan Cl´emenc¸on Telecom Paristech (TSI) - LTCI UMR Institut Telecom/CNRS 5141 stephan.clemencon@telecom-paristech.fr Nicolas Vayatis ENS Cachan & UniverSud - CMLA UMR CNRS 8536 vayatis@cmla.ens-cachan.fr Abstract ROC curves are one of the most widely used displays to evaluate performance of scoring functions. In the paper, we propose a statistical method for directly optimizing the ROC curve. The target is known to be the regression function up to an increasing transformation and this boils down to recovering the level sets of the latter. We propose to use classifiers obtained by empirical risk minimization of a weighted classification error and then to construct a scoring rule by overlaying these classifiers. We show the consistency and rate of convergence to the optimal ROC curve of this procedure in terms of supremum norm and also, as a byproduct of the analysis, we derive an empirical estimate of the optimal ROC curve. 1 Introduction In applications such as medical diagnosis, credit risk screening or information retrieval, one aims at ordering instances under binary label information. The problem of ranking binary classification data is known in the machine learning literature as the bipartite ranking problem ([FISS03], [AGH+05], [CLV08]). A natural approach is to find a real-valued scoring function which mimics the order induced by the regression function. A classical performance measure for scoring functions is the Receiver Operating Characteristic (ROC) curve which plots the rate of true positive against false positive ([vT68], [Ega75]). The ROC curve offers a graphical display which permits to judge rapidly how a scoring rule discriminates the two populations (positive against negative). A scoring rule whose ROC curve is close to the diagonal line does not discriminate at all, while the one lying above all others is the best possible choice. From a statistical learning perspective, risk minimization (or performance maximization) strategies for bipartite ranking have been based mostly on a popular summary of the ROC curve known as the Area Under a ROC Curve (AUC - see [CLV08], [FISS03], [AGH+05]) which corresponds to the L1-metric on the space of ROC curves. In the present paper, we propose a statistical methodology to estimate the optimal ROC curve in a stronger sense than the AUC sense, namely in the sense of the supremum norm. In the same time, we will explain how to build a nearly optimal scoring function. Our approach is based on a simple observation: optimal scoring functions can be represented from the collection of level sets of the regression function. Hence, the bipartite ranking problem may be viewed as a ’continuum’ of classification problems with asymmetric costs where the targets are the level sets. In a nonparametric setup, regression or density level sets can be estimated with plug-in methods ([Cav97], [RV06], [AA07], [WN07], ...). Here, we take a different approach based on a weighted empirical risk minimization principle. We provide rates of convergence with which an optimal point of the ROC curve can be recovered according to this principle. We also develop a practical ranking method based on a discretization of the original problem. From the resulting classifiers and their related empirical errors, we show how 1 to build a linear-by-part estimate of the optimal ROC curve and a quasi-optimal piecewise constant scoring function. Rate bounds in terms of the supremum norm on ROC curves for these procedures are also established. The rest of the paper is organized as follows: in Section 2, we present the problem and give some properties of ROC curves, in Section 3, we provide a statistical result for the weighted empirical risk minimization, and in Section 4, we develop the main results of the paper which describe the statistical performance of a scoring rule based on overlaying classifiers as well as the rate of convergence of the empirical estimate of the optimal ROC curve. 2 Bipartite ranking, scoring rules and ROC curves Setup. We study the ranking problem for classification data with binary labels. The data are assumed to be generated as i.i.d. copies of a random pair (X, Y ) ∈X × {−1, +1} where X is a random descriptor living in the measurable space X and Y represents its binary label (relevant vs. irrelevant, healthy vs. sick, ...). We denote by P = (µ, η) the distribution of (X, Y ), where µ is the marginal distribution of X and η is the regression function (up to an affine transformation): η(x) = P{Y = 1 | X = x}, x ∈X. We will also denote by p = P{Y = 1} the proportion of positive labels. In the sequel, we assume that the distribution µ is absolutely continuous with respect to Lebesgue measure. Optimal scoring rules. We consider the approach where the ordering can be derived by the means of a scoring function s : X →R: one expects that the higher the value s(X) is, the more likely the event ”Y = +1” should be observed. The following definition sets the goal of learning methods in the setup of bipartite ranking. Definition 1 (Optimal scoring functions) The class of optimal scoring functions is given by the set S∗= { s∗= T ◦η | T : [0, 1] →R strictly increasing }. Interestingly, it is possible to make the connection between an arbitrary (bounded) optimal scoring function s∗∈S∗and the distribution P (through the regression function η) completely explicit. Proposition 1 (Optimal scoring functions representation, [CV08]) A bounded scoring function s∗is optimal if and only if there exist a nonnegative integrable function w and a continuous random variable V in (0, 1) such that: ∀x ∈X , s∗(x) = inf X s∗+ E (w(V ) · I{η(x) > V }) . A crucial consequence of the last proposition is that solving the bipartite ranking problem amounts to recovering the collection {x ∈X | η(x) > u}u∈(0,1) of level sets of the regression function η. Hence, the bipartite ranking problem can be seen as a collection of overlaid classification problems. This view was first introduced in [CV07] and the present paper is devoted to the description of a statistical method implementing this idea. ROC curves. We now recall the concept of ROC curve and explain why it is a natural choice of performance measure for the ranking problem with classification data. We consider here only true ROC curves which correspond to the situation where the underlying distribution is known. First, we need to introduce some notations. For a given scoring rule s, the conditional cdfs of the random variable s(X) are denoted by Gs and Hs. We also set, for all z ∈R: ¯Gs(z) = 1 −Gs(z) = P {s(X) > z | Y = +1} , ¯Hs(z) = 1 −Hs(z) = P {s(X) > z | Y = −1} . to be the residual conditional cdfs of the random variable s(X). When s = η, we shall denote the previous functions by G∗, H∗, ¯G∗, ¯H∗respectively. We introduce the notation Q(Z, α) to denote the quantile of order 1 −α for the distribution of a random variable Z conditioned on the event Y = −1. In particular, the following quantile will be of interest: Q∗(α) = Q(η(X), α) = ¯H∗−1(α) , 2 where we have used here the notion of generalized inverse F −1 of a c`adl`ag function F: F −1(z) = inf{t ∈R | F(t) ≥z}. We now turn to the definition of the ROC curve. Definition 2 (True ROC curve) The ROC curve of a scoring function s is the parametric curve: z 7→ ¯Hs(z), ¯Gs(z)  for thresholds z ∈R. It can also be defined as the plot of the function: ROC(s, · ) : α ∈[0, 1] 7→¯Gs ◦¯H−1 s (α) = ¯Gs (Q(s(X), α)) . By convention, points of the curve corresponding to possible jumps (due to possible degenerate points of Hs or Gs) are connected by line segments, so that the ROC curve is always continuous. For s = η, we take the notation ROC∗(α) = ROC(η, α). The residual cdf ¯Gs is also called the true positive rate while ¯Hs is the false positive rate, so that the ROC curve is the plot of the true positive rate against the false positive rate. Note that, as a functional criterion, the ROC curve induces a partial order over the space of all scoring functions. Some scoring function might provide a better ranking on some part of the observation space and a worst one on some other. A natural step to take is to consider local properties of the ROC curve in order to focus on best instances but this is not straightforward as explained in [CV07]. We expect optimal scoring functions to be those for which the ROC curve dominates all the others for all α ∈(0, 1). The next proposition highlights the fact that the ROC curve is relevant when evaluating performance in the bipartite ranking problem. Proposition 2 The class S∗of optimal scoring functions provides the best possible ranking with respect to the ROC curve. Indeed, for any scoring function s, we have: ∀α ∈(0, 1) , ROC∗(α) ≥ROC(s, α) , and ∀s∗∈S∗, ∀α ∈(0, 1) , ROC(s∗, α) = ROC∗(α). The following result will be needed later. Proposition 3 We assume that the optimal ROC curve is differentiable. Then, we have, for any α such that Q∗(α) < 1: d dαROC∗(α) = 1 −p p · Q∗(α) 1 −Q∗(α) . For proofs of the previous propositions and more details on true ROC curves, we refer to [CV08]. 3 Recovering a point on the optimal ROC curve We consider here the problem of recovering a single point of the optimal ROC curve from a sample of i.i.d. copies {(Xi, Yi)}i=1,...,n of (X, Y ). This amounts to recovering a single level set of the regression function η but we aim at controlling the error in terms of rates of false positive and true positive. For any measurable set C ⊂X, we set the following notations: α(C) = P(X ∈C | Y = −1) and β(C) = P(X ∈C | Y = +1) . We also define the weighted classification error: Lω(C) = 2p(1 −ω) (1 −β(C)) + 2(1 −p)ω α(C) , with ω ∈(0, 1) being the asymmetry factor. Proposition 4 The optimal set for this error measure is C∗ ω = {x : η(x) > ω}. We have indeed, for all C ⊂X: Lω(C∗ ω) ≤Lω(C) . Also the optimal error is given by: Lω(C∗ ω) = 2E min{ω(1 −η(X)), (1 −ω)η(X)} . The excess risk for an arbitrary set C can be written: Lω(C) −Lω(C∗ ω) = 2E (| η(X) −ω | I{X ∈C∆C∗ ω}) , where ∆stands for the symmetric difference between sets. 3 The empirical counterpart of the weighted classification error can be defined as: ˆLω(C) = 2ω n n X i=1 I{Yi = −1, Xi ∈C} + 2(1 −ω) n n X i=1 I{Yi = +1, Xi /∈C} . This leads to consider the weighted empirical risk minimizer over a class C of candidate sets: ˆCω = arg min C∈C ˆLω(C). The next result provides rates of of convergence of the weighted empirical risk minimizer ˆCω to the best set in the class in terms of the two types of error α and β. Theorem 1 Let ω ∈(0, 1). Assume that C is of finite VC dimension V and contains C∗ ω. Suppose also that both G∗and H∗are twice continuously differentiable with strictly positive first derivatives and that ROC∗has a bounded second derivative. Then, for all δ > 0, there exist constants c(V ) independent of ω such that, with probability at least 1 −δ: |α( ˆCω) −α(C∗ ω)| ≤ c(V ) p p(1 −ω) · log(1/δ) n  1 3 . The same result also holds for the excess risk of ˆCω in terms of the rate β of true positive with a factor term of p (1 −p)ω in the denominator instead . It is noteworthy that, while convergence in terms of classification error is expected to be of the order of n−1/2, its two components corresponding to the rate of false positive and true positive present slower rates. 4 Nearly optimal scoring rule based on overlaying classifiers Main result. We now propose to collect the classifiers studied in the previous section in order to build a scoring function for the bipartite ranking problem. From Proposition 1, we can focus on optimal scoring rules of the form: s∗(x) = Z I{x ∈C∗ ω} ν(dω), (1) where the integral is taken w.r.t. any positive measure ν with same support as the distribution of η(X). Consider a fixed partition ω0 = 0 < ω1 ≤. . . ≤ωK ≤1 = ωK+1 of the interval (0, 1). We can then construct an estimator of s∗by overlaying a finite collection of (estimated) density level sets ˆCω1, . . . , ˆCωK: ˆs(x) = K X i=1 I{x ∈ˆCωi}, which may be seen as an empirical version of a discrete version of the target s∗. In order to consider the performance of such an estimator, we need to compare the ROC curve of ˆs to the optimal ROC curve. However, if the sequence { ˆCωi}i=1,...,K is not decreasing, the computation of the ROC curve as a function of the errors of the overlaying classifiers becomes complicated. The main result of the paper is the next theorem which is proved for a modified sequence which yields to a different estimator. We introduce: { ˜Cωi}1≤i≤K defined by: ˜Cω1 = ˆCω1 and ˜Cωi+1 = ˜Cωi ∪ˆCωi+1 for all i ∈{1, . . . , K −1} . The corresponding scoring function is then given by: ˜sK(x) = K X i=1 I{x ∈˜Cωi} . (2) 4 Hence, the ROC curve of ˜sK is simply the broken line that connects the knots (α( ˜Cωi), β( ˜Cωi)), 0 ≤i ≤K + 1. The next result offers a rate bound in the ROC space, equipped with a sup-norm. Up to our knowledge, this is the first result on the generalization ability of decision rules in such a functional space. Theorem 2 Under the same assumptions as in Theorem 1 and with the previous notations, we set K = Kn ∼n1/8. Fix ϵ > 0. Then, there exists a constant c such that, with probability at least 1 −δ, we have: sup α∈[ϵ,1−ϵ] |ROC∗(α) −ROC(˜sK, α)| ≤c log(1/δ) ϵn1/4 . Remark 1 (PERFORMANCE OF CLASSIFIERS AND ROC CURVES.) In the present paper, we have adopted a scoring approach to ROC analysis which is somehow related to the evaluation of the performance of classifiers in ROC space. Using combinations of such classifiers to improve performance in terms of ROC curves has also been pointed out in [BDH06] and [BCT07]. Remark 2 (PLUG-IN ESTIMATOR OF THE REGRESSION FUNCTION.) Note that taking ν = λ the Lebesgue measure over [0, 1] in the expression of s∗leads to the regression function η(x) = R I{x ∈C∗ ω} dω. An estimator for the regression function could be the following: ˆηK(x) = PK+1 i=1 (ωi −ωi−1)I{x ∈˜Cωi}. Remark 3 (ADAPTIVITY OF THE PARTITION.) A natural extension of the approach would be to consider a flexible partition (ωi)i which could possibly be adaptively chosen depending on the local regularity of the ROC curve. For now, it is not clear how to extend the method of the paper to take into account adaptive partitions, however we have investigated such partitions corresponding to different approximation schemes of the optimal ROC curve elsewhere ([CV08]), but the rates of convergence obtained in the present paper are faster. Optimal ROC curve approximation and estimation. We now provide some insights on the previous result. The key for the proof of Theorem 2 is the idea of a piecewise linear approximation of the optimal ROC curve. We introduce some notations. Let ω0 = 0 < ω1 < . . . < ωK < ωK+1 = 1 be a given partition of [0, 1] such that maxi∈{0,...,K}{ωi+1 −ωi} ≤δ. Set: ∀i ∈{0, . . . , K + 1}, α∗ i = α(C∗ ωi) and β∗ i = β(C∗ ωi). The broken line that connects the knots {(α∗ i , β∗ i ); 0 ≤i ≤K + 1} provides a piecewise linear (concave) approximation/interpolation of the optimal ROC curve ROC∗. In the spirit of the finite element method (FEM, see [dB01] for instance), we introduce the ”hat functions” defined by: ∀i ∈{1, . . . , K −1}, φ∗ i ( · ) = φ( · ; (α∗ i−1, α∗ i )) −φ( · ; (α∗ i , α∗ i+1)), with the notation φ(α, (α1, α2)) = (α −α1)/(α2 −α1) · I{α ∈[α1, α2]} for all α1 < α2. We also set φ∗ K( · ) = φ( · ; (α∗ K, 1)) for notational convenience. The piecewise linear approximation of ROC∗may then be written as: ] ROC ∗(α) = K X i=1 β∗ i φ∗ i (α) . In order to obtain an empirical estimator of ] ROC ∗(α), we propose: i) to find an estimate ˆCωi of the true level set C∗ ωi based on the training sample {(Xi, Yi)}i=1,...,n as in Section 3, ii) to compute the corresponding errors ˆαi and ˆβi using a test sample {(X′ i, Y ′ i )}i=1,...,n. Hence we define: ˆαi(C) = 1 n− n X i=1 I{X′ i ∈C, Y ′ i = −1} and ˆβi(C) = 1 n+ n X i=1 I{X′ i ∈C, Y ′ i = +1}, with n+ = Pn i=1 I{Y ′ i = +1} = n −n−. We set ˆαi = ˆαi( ˆCωi) and ˆβi = ˆβi( ˆCωi). We propose the following estimator of ] ROC ∗(α): \ ROC∗(α) = K X i=1 ˆβi ˆφi(α), 5 where ˆφK(α) = φ(.; (ˆαK, 1)) and ˆφi(α) = φ(.; (ˆαi−1, ˆαi)) −φ(.; (ˆαi, ˆαi+1)) for 1 ≤i < K. Hence, [ ROC is the broken line connecting the empirical knots {(ˆαi, ˆβi); 0 ≤i ≤K + 1}. The next result takes the form of a deviation bound for the estimation of the optimal ROC curve. It quantifies the order of magnitude of a confidence band in supremum norm around an empirical estimate based on the previous approximation scheme with empirical counterparts. Theorem 3 Under the same assumptions as in Theorem 1 and with the previous notations, set K = Kn ∼n1/6. Fix ϵ > 0. Then, there exists a constant c such that, with probability at least 1 −δ, sup α∈[ϵ,1−ϵ] | \ ROC∗(α) −ROC∗(α)| ≤cϵ−1 log(n/δ) n 1/3 . 5 Conclusion We have provided a strategy based on overlaid classifiers to build a nearly-optimal scoring function. Statistical guarantees are provided in terms of rates of convergence for a functional criterion which is the ROC space equipped with a supremum norm. This is the first theoretical result of this nature. To conclude, we point out that ROC analysis raises important and novel issues for statistical learning and we hope that the present contribution gives a flavor of possible research directions. Appendix - Proof section Proof of Theorem 1. The idea of the proof is to relate the excess risk in terms of α-error to the excess risk in terms of weighted classification error. First we re-parameterize the weighted classification error. Set C(α) = {x ∈X | η(x) > Q∗(α)} and: ℓω(α) = Lω(C(α)) = 2(1 −p)ω α + 2p(1 −ω)(1 −ROC∗(α)) Since ROC∗is assumed to be differentiable and using Proposition 3, it is easy to check that the value α∗= α(C∗ ω) minimizes ℓω(α). Denote by ℓ∗ ω = ℓω(α∗). It follows from a Taylor expansion of ℓω(α) around α∗at the second order that there exists α0 ∈[0, 1] such that: ℓω(α) = ℓ∗ ω −p(1 −ω) d2 dα2 ROC∗(α0) (α −α∗)2 Using also the fact that ROC∗dominates any other curve of the ROC space, we have: ∀C ⊂X measurable, β(C) ≤ROC∗(α(C)). Also, by assumption, there exists m such that: ∀α ∈[0, 1], d2 dα2 ROC∗(α) ≥−m. Hence, since ℓω(α( ˆCω)) = Lω( ˆCω), we have:  α( ˆCω) −α(C∗ ω) 2 ≤ 1 mp(1 −ω)  Lω( ˆCω) −Lω(C∗ ω)  . We have obtained the desired inequality. It remains to get the rate of convergence for the weighted empirical risk. Now set: F ∗= pG∗+ (1 −p)H∗. We observe that: ∀t > 0, P(|η(X) −ω| ≤t) = F ∗(ω + t) −F ∗(ω −t) ≤2t supu(F ∗)′(u). We have thus shown that the distribution satisfies a modified Tsybakov’s margin condition [Tsy04], for all ω ∈[0, 1], of the form: P(|η(X) −ω| ≤t) ≤D t γ 1−γ . with γ = 1/2 and D = 2 supu(F ∗)′(u). Adapting slightly the argument used in [Tsy04], [BBL05], we have that, under the modified margin condition, there exists a constant c such that, with probability 1 −δ: Lω( ˆCω) −L∗ ω(C∗ ω) ≤c log(1/δ) n  1 2−γ . Proof of Theorem 2. We note ˜αi = α( ˜Cωi), ˜βi = β( ˜Cωi) and also ˜φi( · ) = φ( · ; (˜αi−1, ˜αi)) − φ( · ; (˜αi, ˜αi+1)). We then have ROC(˜sK, α) = PK i=1 ˜βi ˜φi(α) and we can use the following 6 decomposition, for any α ∈[0, 1]: ROC∗(α) −ROC(˜sK, α) = ROC∗(α) − K X i=1 ROC∗(˜αi)˜φi(α) ! + K X i=1 (ROC∗(˜αi) −˜βi)˜φi(α) . It is well-known folklore in linear approximation theory ([dB01]) that if ˜sK is a piecewise constant scoring function whose ROC curve interpolates the points {(˜αi, ROC∗(˜αi))}i=0,...,K of the optimal ROC curve, then we can bound the first term (which is positive), ∀α ∈[0, 1], by: −1 8 inf α∈[0,1] d2 dα2 ROC∗(α) · max 0≤i≤K(˜αi+1 −˜αi)2 . Now, to control the second term, we upper bound the following quantity: |ROC∗(˜αi) −˜βi| ≤sup α∈[0,1] d dαROC∗(α) · |˜αi −α∗ i | + |β∗ i −˜βi| We further bound: |˜αi −α∗ i | ≤|˜αi −αi| + |αi −α∗ i | where αi = α( ˆCi). In order to deal with the first term, the next lemma will be needed: Lemma 1 We have, for all k ∈{1, . . . , K}: α( ˜Ck) = α( ˆCk) + (k −1)OP(n−1/4) . where the notation OP(1) is used for a r.v. which is bounded in probability. From the lemma, it follows that: max1≤i≤K |˜αi −αi| = OP(Kn−1/4). We can then use Theorem 1 with δ replaced by δ/K to get that max1≤i≤K |αi −α∗ i | = OP((n−1 log K)1/3). The same inequalities hold with the β’s. It remains to control the quantity ˜αi+1 −˜αi. We have: | ˜αi+1 −˜αi |≤max 1≤k≤K | α( ˆCk) −α( ˆCk−1) | +K OP(n−1/4) . We have that: max 1≤k≤K | α( ˆCk) −α( ˆCk−1) |≤2 max 1≤k≤K | α( ˆCk) −α(C∗ k) | + max 1≤k≤K | α(C∗ k) −α(C∗ k−1) | As before, we have that the first term is of the order (log K/n)1/3 and since the second derivative of the optimal ROC curve is bounded, the second term is of the order K−1. Eventually, we choose K in order to optimize the quantity: K−2 + (log K/n)2/3 + K2n−1/2 + Kn−1/4 + (log K/n)1/3. As only the first and the third term matter, this leads to the choice of K = Kn ∼n1/8. Proof of Lemma 1. We have that α( ˜C2) = α( ˆC2) + α( ˆC1 \ ˆC2). Therefore, since C∗ 1 ⊂C∗ 2 and observing that α( ˆC1 \ ˆC2) = α((( ˆC1 \ C∗ 1) ∪( ˆC1 ∩C∗ 1)) \ (( ˆC2 \ C∗ 2) ∪( ˆC2 ∩C∗ 2)) , it suffices to use the additivity of the probability measure α(.) to get: α( ˜C2) = α( ˆC2)+OP(n−1/4). Eventually, errors are stacked and we obtain the result. Proof of Theorem 3. We use the following decomposition, for any fixed α ∈(0, 1): \ ROC∗(α)−ROC∗(α) = \ ROC∗(α) − K X i=1 ROC∗(ˆαi)ˆφi(α) ! + K X i=1 ROC∗(ˆαi)ˆφi(α) −ROC∗(α) ! . Therefore, we have by a triangular inequality: ∀α ∈[0, 1], \ ROC∗(α) − K X i=1 ROC∗(ˆαi)ˆφi(α) ≤max 1≤i≤K |ˆβi −βi| + |βi −β∗ i | + |ROC∗(α∗ i ) −ROC∗(ˆαi)| . 7 And, by the finite increments theorem, we have: |ROC∗(α∗ i ) −ROC∗(ˆαi)| ≤ sup α∈[0,1] d dαROC∗(α) ! (|α∗ i −αi| + |αi −ˆαi|) . For the other term, we use the same result on approximation as in the proof of Theorem 2: K X i=1 ROC∗(ˆαi)ˆφi(α) −ROC∗(α) ≤−1 8 inf α∈[0,1] d2 dα2 ROC∗(α) · max 0≤i≤K(ˆαi+1 −ˆαi)2 max 0≤i≤K(ˆαi+1 −ˆαi) ≤max 0≤i≤K(α∗ i+1 −α∗ i ) + 2 max 1≤i≤K |α∗ i −αi| + 2 max 1≤i≤K |ˆαi −αi| . We recall that: max1≤i≤K |ˆαi −αi|. = OP(Kn−1/2). Moreover, max0≤i≤K{α∗ i+1 −α∗ i } is of the order of K−1. And with probability at least 1 −δ, we have that max1≤i≤K |α∗ i −αi| is bounded as in Theorem 1, except that δ is replaced by δ/K in the bound. Eventually, we get the generalization bound: K−2 + (log K/n)1/3, which is optimal for a number of knots: K ∼n1/6. References [AA07] J.-Y. Audibert and A.Tsybakov. Fast learning rates for plug-in classifiers. Annals of statistics, 35(2):608–633, 2007. [AGH+05] S. Agarwal, T. Graepel, R. Herbrich, S. Har-Peled, and D. Roth. Generalization bounds for the area under the ROC curve. J. Mach. Learn. Res., 6:393–425, 2005. [BBL05] S. Boucheron, O. Bousquet, and G. Lugosi. Theory of Classification: A Survey of Some Recent Advances. ESAIM: Probability and Statistics, 9:323–375, 2005. [BCT07] M. Barreno, A.A. Cardenas, and J.D. Tygar. Optimal ROC curve for a combination of classifiers. In NIPS’07, 2007. [BDH06] F.R. Bach, D.Heckerman, and Eric Horvitz. Considering cost asymmetry in learning classifiers. Journal of Machine Learning Research, 7:1713–1741, 2006. [Cav97] L. Cavalier. Nonparametric estimation of regression level sets. Statistics, 29:131–160, 1997. [CLV08] S. Cl´emenc¸on, G. Lugosi, and N. Vayatis. Ranking and empirical risk minimization of U-statistics. The Annals of Statistics, 36(2):844–874, 2008. [CV07] S. Cl´emenc¸on and N. Vayatis. Ranking the best instances. Journal of Machine Learning Research, 8:2671–2699, 2007. [CV08] S. Cl´emenc¸on and N. Vayatis. Tree-structured ranking rules and approximation of the optimal ROC curve. Technical Report hal-00268068, HAL, 2008. [dB01] C. de Boor. A practical guide to splines. Springer, 2001. [Ega75] J.P. Egan. Signal Detection Theory and ROC Analysis. Academic Press, 1975. [FISS03] Y. Freund, R. D. Iyer, R. E. Schapire, and Y. Singer. An efficient boosting algorithm for combining preferences. Journal of Machine Learning Research, 4:933–969, 2003. [RV06] P. Rigollet and R. Vert. Fast rates for plug-in estimators of density level sets. Technical Report arXiv:math/0611473v2, arXiv:math/0611473v2, 2006. [Tsy04] A. Tsybakov. Optimal aggregation of classifiers in statistical learning. Annals of Statistics, 32(1):135–166, 2004. [vT68] H.L. van Trees. Detection, Estimation, and Modulation Theory, Part I. Wiley, 1968. [WN07] R. Willett and R. Nowak. Minimax optimal level set estimation. IEEE Transactions on Image Processing, 16(12):2965–2979, 2007. 8
2008
191
3,444
Model selection and velocity estimation using novel priors for motion patterns Shuang Wu Department of Statistics UCLA, Los Angeles, CA 90095 shuangw@stat.ucla.edu Hongjing Lu Department of Psychology UCLA, Los Angeles, CA 90095 hongjing@ucla.edu Alan Yuille Department of Statistics UCLA Los Angeles, CA 90095 yuille@stat.ucla.edu Abstract Psychophysical experiments show that humans are better at perceiving rotation and expansion than translation. These findings are inconsistent with standard models of motion integration which predict best performance for translation [6]. To explain this discrepancy, our theory formulates motion perception at two levels of inference: we first perform model selection between the competing models (e.g. translation, rotation, and expansion) and then estimate the velocity using the selected model. We define novel prior models for smooth rotation and expansion using techniques similar to those in the slow-and-smooth model [17] (e.g. Green functions of differential operators). The theory gives good agreement with the trends observed in human experiments. 1 Introduction As an observer moves through the environment, the retinal image changes over time to create multiple complex motion flows, including translational, circular and radial motion. Human observers are able to process different motion patterns and infer ego motion and global structure of the world. However, the inherent ambiguity of local motion signals requires the visual system to employ an efficient integration strategy to combine many local measurements in order to perceive global motion. Psychophysical experiments have identified a variety of phenomena, such as motion capture and motion cooperativity [11], which appear to be consequences of such integration. A number of computational Bayesian models have been proposed to explain these effects based on prior assumptions about motion. In particular, it has been shown that a slow-and-smooth prior, and related models, can qualitatively account for a range of experimental results [17, 15, 16] and can quantitatively account for others [7, 12]. However, the integration strategy modeled by the slow-and-smooth prior may not generalize to more complex motion types, such as circular and radial motion, which are critically important for estimating ego motion. In this paper we are concerned with two questions. (1) What integration priors should be used for a particular motion input? (2) How can local motion measurements be combined with the proper priors to estimate motion flow? Within the framework of Bayesian inference, the answers to these two questions are respectively based on model selection and parameter estimation. In the field of motion perception, most work has focused on the second question, using parameter estimation to estimate motion flow. However, Stocker and Simoncelli [13] recently proposed a conditioned Bayesian model in which strong biases in precise motion direction estimates arise as a consequence of a preceding decision about a particular hypothesis (left vs. right motion). The goal of this paper is to provide a computational explanation for both of the above questions using Bayesian inference. To address the first question, we develop new prior models for smooth rotation and expansion motion. To address the second, we propose that the human visual system has available multiple models of motion integration appropriate for different motion patterns. The visual system decides the best integration strategy based upon the perceived motion information, and this choice in turn affects the estimation of motion flow. In this paper, we first present a computational theory in section (3) that includes three different integration strategies, all derived within the same framework. We test this theory in sections (4,5) by comparing its predictions with human performance in psychophysical experiments, in which subjects were asked to discriminate motion direction in translational, rotational, and expanding stimuli. We employ two commonly used stimuli, random dot patterns and moving gratings, to show that the model can apply to a variety of inputs. 2 Background There is an enormous literature on visual motion phenomena and there is only room to summarize the work most relevant to this paper. Our computational model relates most closely to work [17, 15, 7] that formulates motion perception as Bayesian inference with a prior probability biasing towards slow-and-smooth motion. But psychophysical [4, 8, 1, 6], physiological [14, 3] and fMRI data [9] suggests that humans are sensitive to a variety of motion patterns including translation, rotation, and expansion. In particular, Lee et al [6] demonstrated that human performance on discrimination tasks for translation, rotation, and expansion motion was inconsistent with the predictions of the slow-andsmooth theory (our simulations independently verify this result). Instead, we propose that human motion perception is performed at two levels of inference: (i) model selection, and (ii) estimating the velocity with the selected model. The concept of model selection has been described in the literature, see [5], but has only recently been applied to model motion phenomena [13]. Our new motion models for rotation and expansion are formulated very similarly to the original slow-andsmooth model [17] and similar mathematical analysis [2] is used to obtain the forms of the solutions in terms of Greens functions of the differential operators used in the priors. 3 Model Formulation 3.1 Bayesian Framework We formulate motion perception as a problem of Bayesian inference with two parts. The first part selects a model that best explains the observed motion pattern. The second part estimates motion properties using the selected model. The velocity field {⃗v} is estimated from velocity measurements {⃗u} at discrete positions {⃗ri, i = 1, . . . N} by maximizing p({⃗v}|{⃗u}, M) = p({⃗u}|{⃗v})p({⃗v}|M) p({⃗u}|M) , (1) The prior p({⃗v}|M) = exp(−E({⃗v}|M)/T), (2) differs for different models M and is discussed in section 3.2. The likelihood function p({⃗u}|{⃗v}) = exp(−E({⃗u}|{⃗v})/T) (3) depends on the measurement process and is discussed in section 3.3. The best model that explains measurement {⃗u} is chosen by maximizing the model evidence p({⃗u}|M) = Z p({⃗u}|{⃗v})p({⃗v}|M)d{⃗v} (4) which is equivalent to maximizing the posterior probability of the model M (assuming uniform prior on the models): M ∗= arg max M P(M|{⃗u}) = arg max M P({⃗u}|M)P(M) P({⃗u}) = arg max M P({⃗u}|M). (5) 3.2 The Priors We define three priors corresponding to the three different types of motion – translation, rotation, and expansion. For each motion type, we encourage slowness and smoothness. The prior for translation is very similar to the slow-and-smooth prior [17] except we drop the higher-order derivative terms and introduce an extra parameter (to ensure that all three models have similar degrees of freedom). We define the priors by their energy functions E({⃗v}|M), see equation (2). We label the models by M ∈{t, r, e}, where t, r, e denote translation, rotation, and expansion respectively. (We note that the prior for expansion will also account for contraction). 1. slow-and-smooth-translation: E({⃗v}|M = t) = Z λ(|⃗v|2 + µ|∇⃗v|2 + η|∇2⃗v|2)d⃗r (6) 2. slow-and-smooth-rotation: E({⃗v}|M = r) = Z λ{|⃗v|2 + µ[(∂vx ∂x )2 + (∂vy ∂y )2 + (∂vx ∂y + ∂vy ∂x )2] + η|∇2⃗v|2}d⃗r (7) 3. slow-and-smooth-expansion: E({⃗v}|M = e) = Z λ{|⃗v|2 + µ[(∂vx ∂y )2 + (∂vy ∂x )2 + (∂vx ∂x −∂vy ∂y )2] + η|∇2⃗v|2}d⃗r (8) These models are motivated as follows. The |⃗v|2 and |∇2⃗v|2 bias towards slowness and smoothness and are common to all models. The first derivative term gives the differences among the models. The translation model prefers constant translation motion with ⃗v constant, since ∇⃗v = 0 for this type of motion. The rotation model prefers rigid rotation and expansion, respectively, of ideal form {vx = −ω(y −y0), vy = ω(x −x0)}, {vx = e(x −x0), vy = e(y −y0) (9) where (x0, y0) are the (unknown) centers, ω is the angular speed and e is the expansion rate. These forms of motion are preferred by the two models since, for the first type of motion (rotation) we have { ∂vx ∂y + ∂vy ∂x = 0, ∂vx ∂x = ∂vy ∂y = 0} (independent of (x0, y0) and ω). Similarly, the second type of motion is preferred by the expansion (or contraction) model since { ∂vx ∂x −∂vy ∂y = 0, ∂vx ∂y = ∂vy ∂x = 0} (again independent of (x0, y0) and e). The translation model is similar to the first three terms of the slow-and-smooth energy function [17] but with a restriction on the set of parameters. Formally λ(|⃗v|2 + σ2 2 |∇⃗v|2 + σ4 8 |∇2⃗v|2)d⃗r ≈λ P∞ m=0 σ2m m!2m |Dm⃗v|2d⃗r. Our computer simulations showed that the translation model performs similar to the slow-and-smooth model. 3.3 The Likelihood Functions The likelihood function differs for the two classes of stimuli we examined: (i) For the moving dot stimuli, as used in [4], there is enough information to estimate the local velocity ⃗u; (ii) For the gratings stimuli [10], there is only enough information to estimate one component of the velocity field. For the dot stimuli, the energy term in the likelihood function is set to be E({⃗u|⃗v}) = N X i=1 |⃗v(⃗ri) −⃗u(⃗ri)|2 (10) For the gratings stimuli, see 2, the likelihood function uses the energy function En({⃗u}|{⃗v}) = N X i=1 |⃗v(⃗ri) · ˆ⃗u(⃗ri) −|⃗u(⃗ri)||2 (11) where ˆ⃗u(⃗ri) is the unit vector in the direction of ⃗u(⃗ri) and normally it is the direction of local image gradient. 3.4 MAP estimator of velocities The MAP estimate of the velocities for each model is obtained by solving ⃗v∗= arg max ⃗v p({⃗v}|{⃗u}, M) = arg min ⃗v {E({⃗u|⃗v}) + E({⃗v}|M)} (12) For the slow-and-smooth model [17], it was shown using regularization analysis [2] that this solution can be expressed in terms of a linear combination of the Green function G of the differential operator which imposes the slow-and-smoothness constraint (the precise form of this constraint was chosen so that G was a Gaussian). We can obtain similar results for the three types of models M ∈{t, r, e} we have introduced in this paper. The main difference is that the models require two vector valued Green functions ⃗GM 1 = (GM 1x, GM 1y) and ⃗GM 2 = (GM 2x, GM 2y), with the constraint that GM 1x = GM 2y and GM 2x = GM 1y. These vector-valued Green functions are required to perform the coupling between the different velocity component required for rotation and expansion, see figure (1). For the translation model there is no coupling required and so GM 2x = GM 1y = 0. Figure 1: The vector-valued Green function ⃗G = (G1, G2). Top panel, left-to-right: GM=t 1x , GM=r 1x , GM=e 1x for the translation, rotation and expansion models. Bottom panel: left-to right: GM=t 2x , GM=r 2x , GM=e 2x for translation, rotation, and expansion models. Observe that the GM 1x are similar for all models, GM=t 2x vanishes for the translation model (i.e. no coupling between velocity components), and GM=r 2x and GM=e 2x both have two peaks which correspond to the two directions of rotation and expansion. Recall that GM 1y = GM 2x and GM 2y = GM 1x. The estimated velocity for the M model is of the form: ⃗v(⃗r) = N X i=1 [αi ⃗GM 1 (⃗r −⃗ri) + βi ⃗GM 2 (⃗r −⃗ri)], (13) For the dot stimuli, the {α}, {β} are obtained by solving the linear equations: N X j=1 [αj ⃗GM 1 (⃗ri −⃗rj) + βj ⃗GM 2 (⃗ri −⃗rj)] + αi⃗e1 + βi⃗e2 = ⃗u(ri), i = 1, . . . N, (14) where ⃗e1,⃗e2 denote the (orthogonal) coordinate axes. If we express the {α}, {β} as two N-dim vectors A and B, the {ux} and {uy} as vectors U = (Ux, Uy)T , and define N × N matrices gM 1x, gM 2x, gM 1y, gM 2y to have components GM 1x(⃗ri −⃗rj), GM 2x(⃗ri −⃗rj), GM 1y(⃗ri −⃗rj), GM 2y(⃗ri −⃗rj) respectively, then we can express these linear equations as:  gM 1x + I gM 2x gM 1y gM 2y + I   A B  =  Ux Uy  (15) Similarly for the gratings stimuli,  ˜gM 1x + I ˜gM 2x ˜gM 1y ˜gM 2y + I   A B  =  Ux Uy  (16) in which ˜gM 1x is the matrix with components ˜GM 1x(⃗ri −⃗rj) = [⃗GM 1 (⃗ri −⃗rj) · ˆ⃗u(ri)]ˆ⃗ux(ri), and similarly for ˜gM 1y, ˜gM 2x and ˜gM 2y. 3.5 Model Selection We re-express model evidence p({⃗u}|M) in terms of (A, B): p({⃗u}|M) = Z p({⃗u}|A, B, M)p(A, B)dAdB (17) We introduce new notation in the form of 2N × 2N matrices: gM =  gM 1x gM 2x gM 1y gM 2y  , similarly for ˜gM. The model evidence for the dot stimuli can be computed analytically (exploiting properties of multidimensional Gaussians) to obtain: p({⃗u}|M) = 1 (πT)Np det(gM + I) exp[−1 T (U T U −U T gM gM + I U)] (18) Similarly, for the gratings stimuli we obtain: p({⃗u}|M) = 1 (πT)N p det(gM) q det(˜Σ) exp[−1 T (U T U −U T ˜gM ˜Σ−1(˜gM)T U)] (19) where ˜Σ = (˜gM)T ˜gM + gM. 4 Results on random dot motion We first investigate motion perception with the moving dots stimuli used by Freeman and Harris [4], as shown in figure (2). The stimuli consist of 128 moving dots in a random spatial pattern. All the dots have the same speed in all three motion patterns, including translation, rotation and expansion. Our simulations first select the correct model for each stimulus and then estimate the speed threshold of detection for each type of motion. The parameter values used are λ = 0.001, µ = 12.5, η = 78.125 and T = 0.0054. −3 −2 −1 0 1 2 3 −2.5 −2 −1.5 −1 −0.5 0 0.5 1 1.5 2 2.5 −2.5 −2 −1.5 −1 −0.5 0 0.5 1 1.5 2 2.5 −2.5 −2 −1.5 −1 −0.5 0 0.5 1 1.5 2 2.5 −3 −2 −1 0 1 2 3 −3 −2 −1 0 1 2 3 Figure 2: Moving random dot stimuli. Left panel: translation; middle panel: rotation; right panel: expansion. 4.1 Model selection Model selection results are shown in figure (3). As speed increases in the range of 0.05 to 0.1, model evidence decreases for all models. This is due to slowness term in all model priors. Nevertheless the correct model is always selected over the entire range of speed, and for all 3 type of motion stimuli. 0.05 0.06 0.07 0.08 0.09 0.1 482.75 482.8 482.85 482.9 speed log(P(u)) rotation model expansion model translation model 0.05 0.06 0.07 0.08 0.09 0.1 477 478 479 480 481 482 speed log(P(u)) rotation model expansion model translation model 0.05 0.06 0.07 0.08 0.09 0.1 477 478 479 480 481 482 speed log(P(u)) rotation model expansion model translation model Figure 3: Model selection results with random dot motion. Plots the log probability of the model as a function of speed for each type of stimuli. left: translation stimuli; middle: rotation stimuli; right: expansion stimuli. Green curves with cross are from translation model. Red curves with circles are from rotation model. Blue curves with squares are from expansion model. 4.2 Speed threshold of Detection As reported in [4], humans have lower speed threshold in detecting rotation/expansion than translation motion. The experiment is formulated as a model selection task with an additional “static” motion prior. The “static” motion prior is modeled as a translation prior with µ = 0 and λ significantly large to emphasize slowness. In the simulation, λ = 0.3 for this “static” model, while λ = 0.001 for all other models. At low speed, the “static” model is favored due to its stronger bias towards slowness, as stimulus speed increases, it loses its advantage to other models. The speed thresholds of detection for different motion patterns can be seen from the model evidence plots in figure (4), and they are lower for rotation/expansion than translation. The threshold values are about 0.05 for rotation and expansion and 0.1 for translation. This is consistent with experimental result in [4]. 0.1 0.102 0.104 0.106 0.108 0.11 478 480 482 484 486 488 Speed log(P(u)) rotation model expansion model translation model static model 0.0502 0.0504 0.0506 0.0508 480.2 480.4 480.6 480.8 481 481.2 481.4 481.6 Speed log(P(u)) rotation model expansion model translation model static model 0.0502 0.0504 0.0506 0.0508 480 480.5 481 481.5 Speed log(P(u)) rotation model expansion model translation model static model translation rotation expansion 0 0.02 0.04 0.06 0.08 0.1 0.12 Speed threshold Figure 4: Speed threshold of detection. Upper left panel: model evidence plot for translation stimuli. Upper right panel: model evidence plot for rotation stimuli. Lower left panel: model eviddence plot for expansion stimuli. Lower right panel: bar graph of speed thresholds. 5 Results on randomly oriented gratings 5.1 Stimuli When randomly oriented grating elements drift behind apertures, the perceived direction of motion is heavily biased by the orientation of the gratings, as well as by the shape and contrast of the apertures. Recently, Nishida and his colleagues developed a novel global motion stimulus consisting of a number of gratings elements, each with randomly assigned orientation [10]. A coherent motion is perceived when the drifting velocities of all elements are consistent with a given velocity. Examples of the stimuli used in these psychophysical experiments are shown in left side of figure (6). The stimuli consisted of 728 gratings (drifting sine-wave gratings windowed by stationary Gaussians). The orientations of the gratings were randomly assigned, and their drifting velocities were determined by a specified global motion flow pattern. The motions of signal grating elements were consistent with global motion, but the motions of noise grating elements were randomized. The task was to identify the global motion direction as one of two alternatives: left/right for translation, clockwise/counterclockwise for rotation, and inward/outward for expansion. Motion sensitivity was measured by the coherence threshold, defined as the proportion of signal elements that yielded a performance level of 75% correct. Similar stimuli with 328 gratings were generated to test our computational models. The input for the models is the velocity component perpendicular to the assigned orientation for each grating, as illustrated in the upper two panels of figure (5). −15 −10 −5 0 5 10 15 −15 −10 −5 0 5 10 15 −15 −10 −5 0 5 10 15 −15 −10 −5 0 5 10 15 −15 −10 −5 0 5 10 15 −15 −10 −5 0 5 10 15 −15 −10 −5 0 5 10 15 −15 −10 −5 0 5 10 15 Figure 5: Randomly-oriented grating stimuli and estimated motion flow. Upper left panel: rotation stimulus (with 75% coherence ratio). Upper right panel: expansion stimulus (with 75% coherence ratio). Lower left panel: motion flow estimated from stimulus in first panel with rotation model. Lower right panel: motion flow estimated from stimulus in second panel with expansion model. 5.2 Result The results of psychophysical experiments (middle panel of figure 6) showed worse performance for perceiving translation than rotation/expansion motion [6]. Clearly, as shown in the third panel of the same figure, the model performs best for rotation and expansion, and is worst for translation. This finding agrees with human performance in psychophysical experiments. 6 Conclusion Humans motion sensitivities depend on the motion patterns (translation/rotation/expansion). We propose a computational model in which different prior motions compete to fit the data by levels translation rotation expansion 0 0.1 0.2 0.3 0.4 0.5 Human Coherence Ratio Threshold translation rotation expansion 0 0.05 0.1 0.15 0.2 0.25 Model Coherence Ratio Threshold Figure 6: Stimulus and results. Left panel: illustration of grating stimulus. Blue arrows indicate the drifting velocity of each grating. Middle panel: human coherence thresholds for different motion stimuli. Right panel: Model prediction of coherence thresholds which are consistent with human trends. of inference. This analysis involves formulating two new prior models for rotation and expansion model and deriving their properties. This competitive prior approach gives good fits to the empirical data and accounts for the dominant trends reported in [4, 6]. Our current work aims to extend these findings to a range of different motions (e.g. affine motion) and to use increasingly naturalistic appearance/intensity models. It is also important to determine if motion patterns to which humans are sensitive correspond to those appearing regularly in natural motion sequences. References [1] J.F. Barraza and N.M. Grzywacz. Measurement of angular velocity in the perception of rotation. Vision Research, 42.2002. [2] J. Duchon. Lecture Notes in Math. 571, (eds Schempp, W. and Zeller, K.) 85-100. Springer-Verlag, Berlin, 1979. [3] C. J. Duffy, and R. H. Wurtz. Sensitivity of MST neurons to optic flow stimuli. I. A continuum of response selectivity to large field stimuli. Journal of Neurophysiology. 65, 1329-1345. 1991. [4] T. Freeman, and M. Harris. Human sensitivity to expanding and rotating motion: effect of complementary masking and directional structure. Vision research, 32, 1992. [5] D. Knill and W. Richards (Eds). Perception as Bayesian Inference. Cambridge University Press, 1996. [6] A. Lee, A. Yuille, and H. Lu. Superior perception of circular/radial than translational motion cannot be explained by generic priors. VSS 2008. [7] H. Lu and A.L. Yuille. Ideal Observers for Detecting Motion: Correspondence Noise. NIPS 2005. [8] M. C. Morrone, D. C. Burr, and L. Vaina. Two stages of visual processing for radial and circular motion. Nature, 376, 507-509. 1995. [9] M. Morrone, M. Tosetti, D. Montanaro, A. Fiorentini, G. Cioni, and D. C. Burr. A cortical area that responds specifically to optic flow revealed by fMRI. Nature Neuroscience, 3, 1322 -1328. 2000. [10] S. Nishida, K. Amano, M. Edwards, and D.R. Badcock. Global motion with multiple Gabors - A tool to investigate motion integration across orientation and space. VSS 2006. [11] R. Sekuler, S.N.J. Watamaniuk and R. Blake. Perception of Visual Motion. In Steven’s Handbook of Experimental Psychology. Third edition. H. Pashler, series editor. S. Yantis, volume editor. J. Wiley Publishers. New York. 2002. [12] A.A. Stocker and E.P. Simoncelli. Noise characteristics and prior expectations in human visual speed perception Nature Neuroscience, vol. 9(4), pp. 578–585, Apr 2006. [13] A.A. Stocker, and E. Simoncelli. A Bayesian model of conditioned perception. Proceedings of Neural Information Processing Systems. 2007. [14] K. Tanaka, Y. Fukada, and H. Saito. Underlying mechanisms of the response specificity of expansion/contraction and rotation cells in the dorsal part of the MST area of the macaque monkey. Journal of Neurophysiology. 62, 642-656. 1989. [15] Y. Weiss, and E.H. Adelson. Slow and smooth: A Bayesian theory for the combination of local motion signals in human vision Technical Report 1624. Massachusetts Institute of Technology. 1998. [16] Y. Weiss, E.P. Simoncelli, and E.H. Adelson. Motion illusions as optimal percepts. Nature Neuroscience, 5, 598-604. 2002. [17] A.L. Yuille and N.M. Grzywacz. A computational theory for the perception of coherent visual motion. Nature, 333,71-74. 1988.
2008
192
3,445
Estimation of Information Theoretic Measures for Continuous Random Variables Fernando P´erez-Cruz Princeton University, Electrical Engineering Department B-311 Engineering Quadrangle, 08544 Princeton (NJ) fp@princeton.edu Abstract We analyze the estimation of information theoretic measures of continuous random variables such as: differential entropy, mutual information or KullbackLeibler divergence. The objective of this paper is two-fold. First, we prove that the information theoretic measure estimates using the k-nearest-neighbor density estimation with fixed k converge almost surely, even though the k-nearest-neighbor density estimation with fixed k does not converge to its true measure. Second, we show that the information theoretic measure estimates do not converge for k growing linearly with the number of samples. Nevertheless, these nonconvergent estimates can be used for solving the two-sample problem and assessing if two random variables are independent. We show that the two-sample and independence tests based on these nonconvergent estimates compare favorably with the maximum mean discrepancy test and the Hilbert Schmidt independence criterion. 1 Introduction Kullback-Leibler divergence, mutual information and differential entropy are central to information theory [5]. The divergence [17] measures the ‘distance’ between two density distributions while mutual information measures the information one random variable contains about a related random variable [23]. In machine learning, statistics and neuroscience the information theoretic measures also play a leading role. For instance, the divergence is the error exponent in large deviation theory [5] and the divergence can be directly applied to solving the two-sample problem [1]. Mutual information is extensively used to assess whether two random variables are independent [2] and has been proposed to solve the all-relevant feature selection problem [8, 24]. Information-theoretic analysis of neural data is unavoidable given the questions neurophysiologists are interested in1. There are other relevant applications in different research areas in which divergence estimation is used to measure the difference between two density functions, such as multimedia [19] and text [13] classification, among others. The estimation of information theoretic quantities can be traced back to the late fifties [7], when Dobrushin estimated the differential entropy for one-dimensional random variables. The review paper by Beirlant et al. [4] analyzes the different contributions of nonparametric differential entropy estimation for continuous random variables. The estimation of the divergence and mutual information for continuous random variables has been addressed by many different authors [25, 6, 26, 18, 20, 16], see also the references therein. Most of these approaches are based on estimating the densities first. For example, in [25], the authors propose to estimate the densities based on data-dependent histograms with a fixed number of samples from q(x) in each bin. The authors of [6] compute relative frequencies on data-driven partitions achieving local independence for estimating mutual information. Also, in [20, 21], the authors compute the divergence using a variational approach, in which 1See [22] for a detailed discussion on mutual information estimation in neuroscience. 1 convergence is proven ensuring that the estimate for p(x)/q(x) or log p(x)/q(x) converges to the true measure ratio or its log ratio. There are only a handful of approaches that use k-nearest-neighbors (k-nn) density estimation [26, 18, 16] for estimating the divergence and mutual information for finite k. Although finite k-nn density estimation does not converge to the true measure, the authors are able to prove mean-square consistency of their divergence estimators imposing some regularity constraint over the densities. These proofs are based on the results reported in [15] for estimating the differential entropy with k-nn density estimation. The results in this paper are two-fold. First, we prove almost sure convergence of our divergence estimate based on k-nn density estimation with finite k. Our result is based on describing the statistics of p(x)/bp(x) as a waiting time distribution independent of p(x). We can readily apply this result to the estimation of the differential entropy and mutual information. Second, we show that for k linearly growing with the number of samples, our estimates do not converge nor present known statistics. But they can be reliably used for solving the two-sample problem or assessing if two random variables are independent. We show that for this choice of k, the estimates of the divergence or mutual information perform, respectively, as well as the maximum mean discrepancy (MMD) test in [9] and the Hilbert Schmidt independence criterion (HSIC) proposed in [10]. The rest of the paper is organized as follows. We prove in Section 2 the almost sure convergence of the divergence estimate based on k-nn density estimation with fixed k. We extend this result for differential entropy and mutual information in Section 3. In Section 4 we present some examples to illustrate the convergence of our estimates and to show how can they be used to assess the independence of related random variables. Section 5 concludes the paper with some final remarks. 2 Estimation of the Kullback-Leibler Divergence If the densities P and Q exist with respect to a Lebesgue measure, the Kullback-Leibler divergence is given by: D(P||Q) = Z Rd p(x) log p(x) q(x)dx ≥0. (1) This divergence is finite whenever P is absolutely continuous with respect to Q and it is zero only if P = Q. The idea of using k-nn density estimation to estimate the divergence was put forward in [26, 18], where they prove mean-square consistency of their estimator for finite k. In this paper, we prove the almost sure convergence of this divergence estimator, using waiting-times distributions without needing to impose additional conditions over the density models. Given a set with n i.i.d. samples from p(x), X = {xi}n i=1, and m i.i.d. samples from q(x), X ′ = {x′ j}m j=1, we estimate D(P||Q) from a k-nn density estimate of p(x) and q(x) as follows: bDk(P||Q) = 1 n n X i=1 log bpk(xi) bqk(xi) = d n n X i=1 log sk(xi) kk(xi) + log m n −1 (2) where bpk(xi) = k (n −1) Γ(d/2 + 1) πd/2 1 rk(xi)d (3) bqk(xi) = k m Γ(d/2 + 1) πd/2 1 sk(xi)d (4) rk(xi) and sk(xi) are, respectively, the Euclidean distances to the k-nn of xi in X\xi and X ′, and πd/2/Γ(d/2 + 1) is the volume of the unit-ball in Rd. Before proving (2) converges almost surely to D(P||Q), let us show an intermediate necessary result. Lemma 1. Given n i.i.d. samples, X = {xi}n i=1, from an absolutely continuous probability distribution P, the limiting distribution of p(x)/bp1(x) is exponentially distributed with unit mean for any x in the support of p(x). 2 Proof. Let’s initially assume p(x) is a d-dimensional uniform distribution with a given support. The set Sx,R = {xi| ∥xi −x∥2 ≤R, xi ∈X} contains all the samples from X inside the ball centered in x of radius R. The radius R has to be small enough for the ball centered in x to be contained within the support of p(x). The samples in {∥xi −x∥d 2| xi ∈Sx,R} are consequently uniformly distributed between 0 and Rd. Thereby, the limiting distribution of r1(x)d = minxj∈Sx,R(∥xj −x∥d 2) is exponentially distributed, as it measures the waiting time between the origin and the first event of a uniformly-spaced sample (see Theorem 2.4 in [3]). Since p(x)nπd/2/Γ(d/2 + 1) is the mean number of samples per unit ball centered in x, p(x)/bp1(x) is distributed as a unit-mean exponential distribution as n tends to infinity. For non-uniform absolutely-continuous P, P(r1(x) > ε) →0 as n →∞for any x in the support of p(x) and any ε > 0. Therefore, as n tends to infinity p(arg minxj∈Sx,R(∥xj −x∥d 2)) →p(x) and the limiting distribution of p(x)/bp1(x) is a unit-mean exponential distribution. Corolary 1. Given n i.i.d. samples, X = {xi}n i=1, from an absolutely continuous probability distribution P, the limiting distribution of p(x)/bpk(x) is a unit-mean 1/k-variance gamma distribution for any x in the support of p(x). Proof. In the previous proof, instead of measuring the waiting time to the first event, we compute the waiting time to the kth event of a uniformly-spaced sample. This waiting-time limiting distribution is a unit-mean and 1/k-variance Erlang (gamma) distribution [14]. Corolary 2. Given n i.i.d. samples, X = {xi}n i=1, from an absolutely continuous probability distribution P, then bpk(x) P→p(x) for any x in the support of p(x), if k →∞and k/n →0, as n →∞. Proof. The k-nn in X tends to x as k/n →0 and n →∞. Thereby the limiting distribution of p(x)/bpk(x) is a unit-mean 1/k-variance gamma distribution. As k →∞the variance of the gamma distribution goes to zero and consequently bpk(x) converges to p(x). The second corollary is the widely known result that k-nn density estimation converges to the true measure if k →∞and k/n →0. We have just include it in the paper for clarity and completeness. If k grows linearly with n, the k-nn sample in X does not converge to x, which precludes p(x)/bpk(x) to present known statistics. For this growth on k, the divergence estimate does not converge to D(P||Q). Now we can prove the almost surely convergence to (1) of the estimate in (2) based on the k-nn density estimation. Theorem 1. Let P and Q be absolutely continuous probability measures and let P be absolutely continuous with respect to Q. Let X = {xi}n i=1 and X ′ = {x′ i}m i=1 be i.i.d. samples, respectively, from P and Q, then bDk(P||Q) a.s. −→ D(P||Q) (5) Proof. We can rearrange bDk(P||Q) in (2) as follows: bDk(P||Q) = 1 n n X i=1 log bpk(xi) bqk(xi) = 1 n n X i=1 log p(xi) q(xi) −1 n n X i=1 log p(xi) bpk(xi) + 1 n n X i=1 log q(xi) bqk(xi) (6) The first term is the empirical estimate of (1) and, by the law of large numbers [11], it converges almost surely to its mean, D(P||Q). The limiting distributions of p(xi)/bpk(xi) and q(xi)/bqk(xi) are unit-mean 1/k-variance gamma distributions, independent of i, p(x) and q(x) (see Corollary 1). In the large sample limit: 1 n n X i=1 log p(xi) bpk(xi) a.s. −→ kk (k −1)! Z ∞ 0 log(z)zk−1e−kzdz (7) by the law of large numbers [11]. 3 Finally, the sum of almost surely convergent terms also converges almost surely [11], which completes our proof. The k-nn based divergence estimator is biased, because the convergence rate of p(xi)/bpk(xi) and q(xi)/bqk(xi) to the unit-mean 1/k-variance gamma distribution depends on the density models and we should not expect them to be identical. If p(x) = q(x), the divergence is zero and our estimate is unbiased for any k (even if k/n does not tend to zero), since the statistics of the second and third term in (6) are identical and they cancel each other out for any n (their expected mean is the same). We use the Monte Carlo based test described in [9] with our divergence estimator to solve the two-sample problem and decide if the samples from X and X ′ actually came from the same distribution. 3 Differential Entropy and Mutual Information Estimation The results obtained for the divergence can be readily applied to estimate the differential entropy of a random variable or the mutual information between two correlated random variables. The differential entropy for an absolutely continuous random variable P is given by: h(x) = − Z p(x) log p(x)dx (8) We can estimate the differential entropy given a set with n i.i.d. samples from P, X = {xi}n i=1, using k-nn density estimation as follows: bhk(x) = −1 n X i=1 log bpk(xi) (9) where bpk(xi) is given by (3). Theorem 2. Let P be an absolutely continuous probability measure and let X = {xi}n i=1 be i.i.d. samples from P, then bhk(x) a.s. −→ h(x) + γk (10) where γk = − kk (k −1)! Z ∞ 0 log(z)zk−1e−kzdz (11) and γ1 ∼=0.5772 and it is known as the Euler-Mascheroni constant [12]. Proof. We can rearrange bhk(x) in (9) as follows: bhk(x) = −1 n n X i=1 log bpk(xi) = −1 n n X i=1 log p(xi) + 1 n n X i=1 log p(xi) bpk(xi) (12) The first term is the empirical estimate of (9) and, by the law of large numbers [11], it converges almost surely to its mean, h(x). The limiting distributions of p(xi)/bpk(xi) is a unit-mean 1/k-variance gamma distribution, independent of i and p(x) (see Corollary 1). In the large sample limit: 1 n n X i=1 log p(xi) bpk(xi) a.s. −→ kk (k −1)! Z ∞ 0 log(z)zk−1e−kzdz = −γk (13) by the law of large numbers [11]. Finally, the sum of almost surely convergent terms also converges almost surely [11], which completes our proof. Now, we can use the expansion of the conditional differential entropy, mutual information and conditional mutual information to prove the convergence of their estimates based on k-nn density estimation to their values. 4 • Conditional differential entropy: h(y|x) = − Z p(x, y) log p(y, x) p(x) dxdy (14) bh(y|x) = −1 n n X i=1 log p(yi, xi) p(xi) a.s. −→ h(y|x) (15) • Mutual Information: I(x; y) = − Z p(x, y) log p(y, x) p(x)p(y)dxdy (16) bI(x; |y) = 1 n n X i=1 log p(yi, xi) p(xi)p(yi) a.s. −→ I(x; y) + γk (17) • Conditional Mutual Information: I(x; y|z) = Z p(x, y, z) log p(y, x, z)p(z) p(x, z)p(y, z)dxdydz (18) bI(x; y|z) = 1 n n X i=1 log p(yi, xi, zi)p(zi) p(xi, zi)p(yi, zi) a.s. −→ I(x; y|z) (19) 4 Experiments We have carried out two sets of experiments. In the first one, we show the convergence of the divergence to their limiting value as the number of samples tends to infinity and we compare the divergence estimation to the MMD test in [9] for MNIST dataset. In the second experiment, we compute if two random variables are independent and compare the obtained results to the HSIC proposed in [10]. We first compare the divergence between a uniform distribution between 0 and 1 in d-dimension and a zero-mean Gaussian distribution with identity covariance matrix. We plot the divergence estimates for d = 1 and d = 5 in Figure 1 as a function of n, for k = 1, k = √n and k = n/2 with m = n. 10 2 10 3 10 4 0.9 0.95 1 1.05 1.1 1.15 n KLD d=1 k=0.5n k=n0.5 k=1 KLD (a) 10 2 10 3 10 4 4.7 4.8 4.9 5 5.1 5.2 5.3 5.4 5.5 n KLD d=5 k=0.5n k=n0.5 k=1 KLD (b) Figure 1: We plot the divergence for d = 1 in (a) and d = 5 in (b). The solid line with ’⋆’ represents the divergence estimate for k = 1, the solid line with ’∗’ represents the divergence estimate for k = √n, the solid line with ’◦’ represents the divergence estimate for k = n/2 and the dasheddotted line represents the divergence. The dashed-lines represent ±3 standard deviation for each divergence estimate. We have not added symbols to them to avoid cluttering the images further and from the plots it should be clear which confidence interval is assigned to what estimate. As expected, the divergence estimate for k = n/2 does not converge to the true divergence as the limiting distributions of p(x)/bpk(x) and q(x)/bqk(x) are unknown and they depend on p(x) and 5 q(x), respectively. Nevertheless, this estimate converges faster to its limiting value and its variance is much smaller than that provided by the estimates of the divergence with k = √n or k = 1. This may indicate that using k = n/2 might be a better option for solving the two-sample problem than actually trying to estimate the true divergence, as theorized in [9]. Both divergence estimates for k = 1 and k = √n converge to the true divergence as the number of samples tends to infinity. The convergence of the divergence estimate for k = 1 is significantly faster than that with k = √n, because p(x)/bp1(x) converges much faster to its limiting distribution than p(x)/bp√n(x). p(x)/bp1(x) converges faster because the nearest neighbor to x is much closer than the √n-nearest-neighbor and we need that the k-nn to be close enough to x for p(x)/bpk(x) to be close to its limiting distribution. As d grows the divergence estimates need many more samples to converge and even for small dimensions the number of samples can be enormously large. Nevertheless, we can still use this divergence estimate to assess whether two sets of samples come from the same distribution, because the divergence estimate for p(x) = q(x) is unbiased for any k. In Figure 2(a) we plot the divergence estimate between the three’s and two’s handwritten digits in the MNIST dataset (http://yann.lecun.com/exdb/mnist/) in a 784 dimensional space. In Figure 2(a) we plot the divergence estimator for bD1(3, 2) (solid line) and bD1(3, 3) (dashed line) mean values for 100 experiments together with their 90% confidence interval. For comparison purposes we plot the MMD test from [9], in which a kernel method was proposed for solving the two-sample problem. We use the code available in http://www.kyb.mpg.de/bs/people/arthur/mmd.htm and use its bootstrap estimate for our comparisons. For n = 5 the error rate for the test using k = 1 is 1%, for k = √n is 7% and for k = n/2 is 43% and for the MMD test is 34%. For n ≥10 all tests reported zero error rate. It seems than the k = 1 test is more powerful than the MMD test in this case, at least for small n. But we can see that the confidence interval for the MMD test decreases faster than the test based on the divergence estimate with k = 1 and we should expect better performance for larger n, similar to the divergence estimate with k = n/2. 10 1 10 2 −200 −100 0 100 200 300 400 500 n D(3||3) D(3||2) Divergence (a) 10 1 10 2 −0.2 −0.15 −0.1 −0.05 0 0.05 0.1 0.15 0.2 0.25 0.3 n MMD(3||3) MMD(3||2) Maximum Mean Discrepancy (b) Figure 2: In (a) we plot bD1(3||2) (solid), bD1(3||3) (dashed) and their 90% confidence interval (dotted). In (b) we repeat the same plots using the MMD test from [9]. In the second example we compute the mutual information between y1 and y2, which are given by:  y1 y2  =  cos(θ) sin(θ) −sin(θ) cos(θ)   x1 x2  (20) where x1 and x2 are independent and uniformly distributed between 0 and 1, and θ ∈[0, π/4]. If θ is zero, y1 and y2 are independent. Otherwise they are not independent, but still uncorrelated for any θ. We carry out a test for describing if y1 and y2 are independent. The test is identical to the one described in [10] and we use the Mote Carlo resampling technique proposed in that paper with a 95% confidence interval and 1000 repetitions. In Figure 3 we report the acceptance of the null hypothesis (y1 and y2 are independent) as a function of θ for n = 100 in (a) and as a function of n for θ = π/8 in (b). We compute the mutual information with k = 1, k = √n and k = n/2 for our test, and compare it to the HSIC in [10]. 6 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 θ Acept H0 n=100 k=0.5n HSIC k=n0.5 k=1 (a) 10 2 10 3 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 n Acept H0 θ=π/8 k=0.5n HSIC k=n0.5 k=1 (b) Figure 3: We plot the acceptance of the null hypothesis (y1 and y2 are independent) for a 95% confidence interval in (a) as a function of θ and in (b) as a function on (n). The solid line uses the mutual information estimate with k = n/2 and the dash-dotted line uses the HSIC. The dashed and dotted lines, respectively, use the mutual information estimate with k = √n and k = 1. The HSIC test and the mutual information estimate based test with k = n/2 perform equally well at predicting whether y1 and y2 are independent, while the test based on the mutual information estimates with k = 1 and k = √n clearly underperforms. This example shows that if our goal is to predict whether two random variables are independent we are better off using HSIC or a nonconvergent estimate of the mutual information rather than trying to compute the mutual information as accurately as possible. Furthermore, in our test, the computational complexity of computing HSIC for n = 5000 is over 10 times more computationally costly (running time) than computing the mutual information for k = n/22. As we saw in the case of the divergence estimate in Figure 1, mutual information is more accurately estimated when k = 1, but at the cost of a higher variance. If our objective is to estimate the mutual information (or the divergence), we should use a small value of k, ideally k = 1. However, if we are interested in assessing whether two random variables are independent, it is better to use k = n/2, because the variance of the estimate is much lower, even though it does not converge to the mutual information (or the divergence). 5 Conclusions We have proved that the estimates of the differential entropy, mutual information and divergence based on k-nn density estimation for finite k converge almost surely, even though the density estimate does not converge. The previous literature could only prove mean-squared consistency and it required imposing some constraints over the density models. The proof in this paper relies on describing the limiting distribution of p(x)/bpk(x). This limiting distribution can be easily described using waiting-times distributions, such as the exponential or the Erlang distributions. We have shown, experimentally, that fixing k = 1 achieves the fastest convergence rate, at the expense of a higher variance for our estimator. The divergence, mutual information and differential entropy estimates using k = 1 are much better than the estimates using k = √n, even though for k = √n we can prove that bpk(x) converges to p(x) while for finite k this convergences does not occur. Finally, if we are interested in solving the two-sample problem or assessing if two random variables are independent, it is best to fix k to a fraction of n (we have used k = n/2 in our experiments), although in this case the estimates do not converge to the true value. Nevertheless, their variances are significantly lower, which allows our tests to perform better. The tests with k = n/2 perform as well as the MMD test for solving the two sample problem and the HSIC for assessing independence. 2For computing HSIC test we use A. Gretton code in http://www.kyb.mpg.de/bs/people/arthur/indep.htm and for finding the k-nn we use the sort function in Matlab. 7 Acknowledgment Fernando Prez-Cruz is supported by Marie Curie Fellowship 040883-AI-COM. This work was partially funded by Spanish government (Ministerio de Educaci´on y Ciencia TEC2006-13514-C0201/TCM. References [1] N. Anderson, P. Hall, and D. Titterington. Two-sample test statistics for measuring discrepancies between two multivariate probability density functions using kernel-based density estimates. Journal of Multivariate Analysis, 50(1):41–54, 7 1994. [2] F. R. Bach and M. I. Jordan. Kernel independent component analysis. JMLR, 3:1–48, 2004. [3] K. Balakrishnan and A. P. Basu. The Exponential Distribution: Theory, Methods and Applications. Gordon and Breach Publishers, Amsterdam, Netherlands, 1996. [4] J. Beirlant, E. Dudewicz, L. Gyorfi, and E. van der Meulen. Nonparametric entropy estimation: An overview. nternational Journal of the Mathematical Statistics Sciences, pages 17–39, 1997. [5] T. M. Cover and J. A. Thomas. Elements of Information Theory. Wiley, New York, USA, 1991. [6] G. A. Darbellay and I. Vajda. Estimation of the information by an adaptive partitioning of the observation space. IEEE Trans. Information Theory, 45(4):1315–1321, 5 1999. [7] R. L. Dobrushin. A simplified method for experimental estimate of the entropy of a stationary sequence. Theory of Probability and its Applications, (4):428–430, 1958. [8] F. Fleuret. Fast binary feature selection with conditional mutual information. JMLR, 5:1531–1555, 2004. [9] A. Gretton, K. M. Borgwardt, M. Rasch, B. Sch¨olkopf, and A. Smola. A kernel method for the twosample-problem. In B. Sch¨olkopf, J. Platt, and T. Hofmann, editors, Advances in Neural Information Processing Systems 19, Cambridge, MA, 2007. MIT Press. [10] A. Gretton, K. Fukumizu, C. H. Teo, L. Song, B. Sch¨olkopf, and A. Smola. A kernel statistical test of independence. In J.C. Platt, D. Koller, Y. Singer, and S. Roweis, editors, Advances in Neural Information Processing Systems 20, Cambridge, MA, 2008. MIT Press. [11] G.R. Grimmett and D.R. Stirzaker. Probability and Random Processes. Oxford University Press, Oxford, UK, 3 edition, 2001. [12] Julian Havil. Gamma: Exploring Euler’s Constant. Princeton University Press, New York, USA, 2003. [13] S. Mallela I. S. Dhillon and R. Kumar. A divisive information-theoretic feature clustering algorithm for text classification. JMLR, 3:1265–1287, 3 2003. [14] Leonard Kleinrock. Queueing Systems. Volume 1: Theory. Wiley, New York, USA, 1975. [15] L. F. Kozachenko and N. N. Leonenko. Sample estimate of the entropy of a random vector. Problems Inform. Transmission, 23(2):95–101, 4 1987. [16] A. Kraskov, H. St¨ogbauer, and P. Grassberger. Estimating mutual information. Physical Review E, 69(6):1–16, 6 2004. [17] S. Kullback and R. A. Leibler. On information and sufficiency. Ann. Math. Stats., 22(1):79–86, 3 1951. [18] N. N. Leonenko, L. Pronzato, and V. Savani. A class of renyi information estimators for multidimensional densities. Annals of Statistics, 2007. Submitted. [19] P. J. Moreno, P. P. Ho, and N. Vasconcelos. A kullback-leibler divergence based kernel for svm classification in multimedia applications. Technical Report HPL-2004-4, HP Laboratories, 2004. [20] X. Nguyen, M. J. Wainwright, and M. I. Jordan. Nonparametric estimation of the likelihood ratio and divergence functionals. In IEEE Int. Symp. Information Theory, Nice, France, 6 2007. [21] X. Nguyen, M. J. Wainwright, and M. I. Jordan. Estimating divergence functionals and the likelihood ratio by penalized convex risk minimization. In J.C. Platt, D. Koller, Y. Singer, and S. Roweis, editors, Advances in Neural Information Processing Systems 20, Cambridge, MA, 2008. MIT Press. [22] L. Paninski. Estimation of entropy and mutual information. Neural Compt, 15(6):1191–1253, 6 2003. [23] C. E. Shannon. A mathematical theory of communication. Bell System Tech. J., pages 379–423, 1948. [24] K. Torkkola. Feature extraction by non parametric mutual information maximization. JMLR, 3:1415– 1438, 2003. [25] Q. Wang, S. Kulkarni, and S. Verd´u. Divergence estimation of continuous distributions based on datadependent partitions. IEEE Trans. Information Theory, 51(9):3064–3074, 9 2005. [26] Q. Wang, S. Kulkarni, and S. Verd´u. A nearest-neighbor approach to estimating divergence between continuous random vectors. In IEEE Int. Symp. Information Theory, Seattle, USA, 7 2006. 8
2008
193
3,446
On the Reliability of Clustering Stability in the Large Sample Regime - Supplementary Material Ohad Shamir† and Naftali Tishby†‡ † School of Computer Science and Engineering ‡ Interdisciplinary Center for Neural Computation The Hebrew University Jerusalem 91904, Israel {ohadsh,tishby}@cs.huji.ac.il A Exact Formulation of the Sufficient Conditions In this section, we give a mathematically rigorous formulation of the sufficient conditions discussed in the main paper. For that we will need some additional notation. First of all, it will be convenient to define a scaled version of our distance measure dD(Ak(S1), Ak(S2)) between clusterings. Formally, define the random variable dm D(Ak(S1), Ak(S2)) := √mdD(Ak(S1), Ak(S2)) = √m Pr x∼D  argmax i fˆθ,i(x) ̸= argmax i fˆθ ′,i(x)  , where θ, θ′ ∈Θ are the solutions returned by Ak(S1), Ak(S2), and S1, S2 are random samples, each of size m, drawn i.i.d from the underlying distribution D. The scaling by the square root of the sample size will allow us to analyze the non-trivial asymptotic behavior of these distance measures, which without scaling simply converge to zero in probability as m →∞. For some ǫ > 0 and a set S ⊆Rn, let Bǫ(S) be the ǫ-neighborhood of S, namely Bǫ(S) :=  x ∈X : inf y∈S ∥x −y∥2 ≤ǫ  . In this paper, when we talk about neighborhoods in general, we will always assume they are uniform (namely, contain an ǫ-neighborhood for some positive ǫ). We will also need to define the following variant of dm D(Ak(S1), Ak(S2)), where we restrict ourselves to the mass in some subset of Rn. Formally, we define the restricted distance between two clusterings, with respect to a set B ∈Rn, as dm D(Ak(S1), Ak(S2), B) := √m Pr x∼D argmax i fˆθ,i(x) ̸= argmax i fˆθ ′,i(x) ∧x ∈B  . (1) In particular, dm D(Ak(S1), Ak(S2), Br/√m(∪i,jFθ0,i,j)) refers to the mass which switches clusters, and is also inside an r/√m-neighborhood of the limit cluster boundaries (where the boundaries are defined with respect to fθ0(·)). Once again, when S1, S2 are random samples, we can think of it as a random variable with respect to drawing and clustering S1, S2. Conditions. The following conditions shall be assumed to hold: 1. Consistency Condition: ˆθ converges in probability (over drawing and clustering a sample of size m, m →∞) to some θ0 ∈Θ. Furthermore, the association of clusters to indices {1, . . . , k} is constant in some neighborhood of θ0. 2. Central Limit Condition: √m(ˆθ −θ0) converges in distribution to a multivariate zero mean Gaussian random variable Z. 1 3. Regularity Conditions: (a) fθ(x) is Sufficiently Smooth: For any θ in some neighborhood of θ0, and any x in some neighborhood of the cluster boundaries ∪i,jFθ0,i,j, fθ(x) is twice continuously differentiable with respect to θ, with a non-zero first derivative and uniformly bounded second derivative for any x. Both fθ0(x) and (∂/∂θ)fθ0(x) are twice differentiable with respect to any x ∈X, with a uniformly bounded second derivative. (b) Limit Cluster Boundaries are Reasonably Nice: For any two clusters i, j, Fθ0,i,j is either empty, or a compact, non-self-intersecting, orientable n−1 dimensional hypersurface in Rn with finite positive volume, a boundary (edge), and with a neighborhood contained in X in which the underlying density function p(·) is continuous. Moreover, the gradient ∇(fθ0,i(·) −fθ0,j(·)) has positive magnitude everywhere on Fθ0,i,j. (c) Intersections of Cluster Boundaries are Relatively Negligible: For any two distinct non-empty cluster boundaries Fθ0,i,j, Fθ0,i′,j′, we have that 1 ǫ Z Bǫ(Fθ0,i,j∪Fθ0,i′,j′)∩Bδ(Fθ0,i,j)∩Bδ(Fθ0,i′,j′) 1dx , 1 ǫ Z Bǫ(∂Fθ0,i,j) 1dx converge to 0 as ǫ, δ →0 (in any manner), where ∂Fθ0,i is the edge of Fθ0,i,j. (d) Minimal Parametric Stability: It holds for some δ > 0 that Pr ` dm D(Ak(S1), Ak(S2)) ̸= dm D(Ak(S1), Ak(S2), Br/√m (∪i,jFθ0,i,j)) ´ = O(r−3−δ) + o(1), where o(1) →0 as m →∞. Namely, the mass of D which switches between clusters is with high probability inside thin strips around the limit cluster boundaries, and this high probability increases at least polynomially as the width of the strips increase (see below for a further discussion of this). The regularity assumptions are relatively mild, and can usually be inferred based on the consistency and central limit conditions, as well as the the specific clustering framework that we are considering. For example, condition 3c and the assumptions on Fθ0,i,j in condition 3b are fulfilled in a clustering framework where the clusters are separated by hyperplanes. As to condition 3d, suppose our clustering framework is such that the cluster boundaries depend on ˆθ in a smooth manner. Then the asymptotic normality of ˆθ, with variance O(1/m), and the compactness of X, will generally imply that the cluster boundaries obtained from clustering a sample are contained with high probability inside strips of width O(1/√m) around the limit cluster boundaries. More specifically, the asymptotic probability of this happening for strips of width r/√m will be exponentially high in r, due to the asymptotic normality of ˆθ. As a result, the mass which switches between clusters, when we compare two independent clusterings, will be in those strips with probability exponentially high in r. Therefore, condition 3d will hold by a large margin, since only polynomially high probability is required there. B Proofs - General Remarks The proofs will use the additional notation and the sufficient conditions, as presented in Sec. A. Throughout the proofs, we will sometimes use the stochastic order notation Op(·) and op(·) (cf. [8]), defined as follows. Let {Xm} and {Ym} be sequences of random vectors, defined on the same probability space. We write Xm = Op(Ym) to mean that for each ǫ > 0 there exists a real number M such that Pr(∥Xm∥≥M∥Ym∥) < ǫ if m is large enough. We write Xm = op(Ym) to mean that Pr(∥Xm∥≥ǫ∥Ym∥) →0 for each ǫ > 0. Notice that {Ym} may also be non-random. For example, Xm = op(1) means that Xm →0 in probability. When we write for example Xm = Ym + op(1), we mean that Xm −Ym = op(1). C Proof of Proposition 1 By condition 3a, fθ(x) has a first order Taylor expansion with respect to any ˆθ close enough to θ0, with a remainder term uniformly bounded for any x: fˆθ(x) = fθ0(x) +  ∂ ∂θ fθ0(x) ⊤ (ˆθ −θ0) + o(∥ˆθ −θ0∥). (2) 2 By the asymptotic normality assumption, √m∥ˆθ −θ0∥= Op(1), hence ∥ˆθ −θ0∥= Op(1/√m). Therefore, we get from Eq. (2) that √m fˆθ(x) −fθ0(x)  =  ∂ ∂θ fθ0(x) ⊤ (√m(ˆθ −θ0)) + op(1), (3) where the remainder term op(1) does not depend on x. By regularity condition 3a and compactness of X, (∂/∂θ)fθ0(·) is a uniformly bounded vector-valued function from X to the Euclidean space in which Θ resides. As a result, the mapping ˆθ 7→((∂/∂θ)fθ0(·))⊤ˆθ is a mapping from Θ, with the metric induced by the Euclidean space in which it resides, to the space of all uniformly bounded Rk-valued functions on X. We can turn the latter space into a metric space by equipping it with the obvious extension of the supremum norm (namely, for any two functions f(·), g(·), ∥f −g∥:= supx∈X ∥f(x)−g(x)∥∞, where ∥·∥∞is the infinity norm in Euclidean space). With this norm, the mapping above is a continuous mapping between two metric spaces. We also know that √m(ˆθ−θ0) converges in distribution to a multivariate Gaussian random variable Z. By the continuous mapping theorem [8] and Eq. (3), this implies that √m(fˆθ(·)−fθ0(·)) converges in distribution to a Gaussian process G(·), where G(·) :=  ∂ ∂θ fθ0(·) ⊤ Z. (4) D Proof of Thm. 1 D.1 A High Level Description of the Proof The full proof of Thm. 1 is rather long and technical, mostly due to the many technical subtleties that need to be taken care of. Since these might obscure the main ideas, we present here separately a general overview of the proof, without the finer details. The purpose of the stability estimator ˆηk m,q, scaled by √m, boils down to trying to assess the ”expected” value of the random variable dm D(Ak(S1), Ak(S2)): we estimate q instantiations of dm D(Ak(S1), Ak(S2)), and take their average. Our goal is to show that this average, taking m →∞, is likely to be close to the value \ instab(Ak, D) as defined in the theorem. The most straightforward way to go about it is to prove that \ instab(Ak, D) actually equals limm→∞Edm D(Ak(S1), Ak(S2)), and then use some large deviation bound to prove that √m ˆηk m,q is indeed close to it with high probability, if q is large enough. Unfortunately, computing limm→∞Edm D(Ak(S1), Ak(S2)) is problematic. The reason is that the convergence tools at our disposal deals with convergence in distribution of random variables, but convergence in distribution does not necessarily imply convergence of expectations. In other words, we can try and analyze the asymptotic distribution of dm D(Ak(S1), Ak(S2)), but the expected value of this asymptotic distribution is not necessarily the same as limm→∞Edm D(Ak(S1), Ak(S2)). As a result, we will have to take a more indirect route. Here is the basic idea: instead of analyzing the asymptotic expectation of dm D(Ak(S1), Ak(S2)), we analyze the asymptotic expectation of a different random variable, dm D(Ak(S1), Ak(S2), B), which was formally defined in Eq. (1). Informally, recall that dm D(Ak(S1), Ak(S2)) is the mass of the underlying distribution D which switches between clusters, when we draw and cluster two independent samples of size m. Then dm D(Ak(S1), Ak(S2), B) measures the subset of this mass, which lies inside some B ⊆Rn. In particular, following the notation of Sec. A, we will pick B to be dm D(Ak(S1), Ak(S2), Br/√m(∪i,jFθ0,i,j)) for some r > 0. In words, this constitutes strips of width r/√m around the limit cluster boundaries. Writing the above expression for B as Br/√m, we have that if r be large enough, then dm D(Ak(S1), Ak(S2), Br/√m) is equal to dm D(Ak(S1), Ak(S2)) with very high probability over drawing and clustering a pair of samples, for any large enough sample size m. Basically, this is because the fluctuations of the cluster boundaries, based on drawing and clustering a random sample of size m, cannot be too large, and therefore the mass which switches clusters is concentrated around the limit cluster boundaries, if m is large enough. The advantage of the ’surrogate’ random variable dm D(Ak(S1), Ak(S2), Br/√m) is that it is bounded for any finite r, unlike dm D(Ak(S1), Ak(S2)). With bounded random variables, convergence in distribution does imply convergence of expectations, and as a result we are able to calculate limm→∞Edm D(Ak(S1), Ak(S2), Br/√m) explicitly. This will turn out to be very close to 3 \ instab(Ak, D) as it appears in the theorem (in fact, we can make it arbitrarily close to \ instab(Ak, D) by making r large enough). Using the fact that dm D(Ak(S1), Ak(S2), Br/√m) and dm D(Ak(S1), Ak(S2)) are equal with very high probability, we show that conditioned on a highly probable event, √m ˆηk m,q is an unbiased estimator of dm D(Ak(S1), Ak(S2), Br/√m), based on q instantiations, for any sample size m. As a result, using large deviation bounds, we get that √m ˆηk m,q is close to dm D(Ak(S1), Ak(S2), Br/√m), with a high probability which does not depend on m. Therefore, as m →∞, √m ˆηk m,q will be close to limm→∞Edm D(Ak(S1), Ak(S2), Br/√m) with high probability. By picking r to scale appropriately with q, our theorem follows. For convenience, the proof is divided into two parts: in Subsec. D.2, we calculate limm→∞Edm D(Ak(S1), Ak(S2), Br/√m) explicitly, while Subsec. D.3 executes the general plan outlined above to prove our theorem. A few more words are in order about the calculation of limm→∞Edm D(Ak(S1), Ak(S2), Br/√m) in Subsec. D.2, since it is rather long and involved in itself. Our goal is to perform this calculation without going through an intermediate step of explicitly characterizing the distribution of dm D(Ak(S1), Ak(S2), Br/√m). This is because the distribution might be highly dependent on the specific clustering framework, and thus it is unsuitable for the level of generality which we aim at (in other words, we do not wish to assume a specific clustering framework). The idea is as follows: recall that dm D(Ak(S1), Ak(S2), Br/√m) is the mass of the underlying distribution D, inside strips of width r/√m around the limit cluster boundaries, which switches clusters when we draw and cluster two independent samples of size m. For any x ∈X, let Ax be the event that x switched clusters. Then we can write dm D(Ak(S1), Ak(S2), Br/√m), by Fubini’s theorem, as: Edm D(Ak(S1), Ak(S2), Br/√m) = √mE Z Br/√m 1(Ax)p(x)dx = Z Br/√m √m Pr(Ax)p(x)dx. (5) The heart of the proof is Lemma D.5, which considers what happens to the integral above inside a single strip near one of the limit cluster boundaries Fθ0,i,j. The main body of the proof then shows how the result of Lemma D.5 can be combined to give the asymptotic value of Eq. (5) when we take the integral over all of Br/√m. The bottom line is that we can simply sum the contributions from each strip, because the intersection of these different strips is asymptotically negligible. All the other lemmas in Subsec. D.2 develop technical results needed for our proof. Finally, let us describe the proof of Lemma D.5 in a bit more detail. It starts with an expression equivalent to the one in Eq. (5), and transforms it to an expression composed of a constant value, and a remainder term which converges to 0 as m →∞. The development can be divided into a number of steps. The first step is rewriting everything using the asymptotic Gaussian distribution of the cluster association function fˆθ(x) for each x, plus remainder terms (Eq. (13)). Since we are integrating over x, special care is given to show that the convergence to the asymptotic distribution is uniform for all x in the domain of integration. The second step is to rewrite the integral (which is over a strip around the cluster boundary) as a double integral along the cluster boundary itself, and along a normal segment at any point on the cluster boundary (Eq. (14)). Since the strips become arbitrarily small as m →∞, the third step consists of rewriting everything in terms of a Taylor expansion around each point on the cluster boundary (Eq. (16), Eq. (17) and Eq. (18)). The fourth and final step is a change of variables, and after a few more manipulations we get the required result. D.2 Part 1: Auxiliary Result As described in the previous subsection, we will need an auxiliary result (Proposition D.1 below), characterizing the asymptotic expected value of dm D(Ak(S1), Ak(S2), Br/√m(∪i,jFθ0,i,j)). Proposition D.1. Let r > 0. Assuming the set of conditions from Sec. A holds, limm→∞Edm D(Ak(S1), Ak(S2), Br/√m(∪i,jFθ0,i,j)) is equal to 2  1 √π −h(r)  X 1≤i<j≤k Z Fθ0,i,j p(x) p Var(Gi(x) −Gj(x)) ∥∇(fθ0,i(x) −fθ0,j(x))∥dx, where h(r) = O(exp(−r2)). 4 To prove this result, we will need several technical lemmas. Lemma D.1. Let S be a hypersurface in Rn which fulfill the regularity conditions 3b and 3c for any Fθ0,i,j, and let g(·) be a continuous real function on X. Then for any ǫ > 0, 1 ǫ Z Bǫ(S) g(x)dx = 1 ǫ Z S Z ǫ −ǫ g(x + ynx)dydx + o(1), (6) where nx is a unit normal vector to S at x, and o(1) →0 as ǫ →0. Proof. Let B′ ǫ(S) be a strip around S, composed of all points which are on some normal to S and close enough to S: B′ ǫ(S) := {y ∈Rn : ∃x ∈S, ∃y ∈[−ǫ, ǫ], y = x + ynx}. Since S is orientable, then for small enough ǫ > 0, B′ ǫ(S) is diffeomorphic to S × [−ǫ, ǫ]. In particular, the map φ : S × [−ǫ, ǫ] 7→B′ ǫ(S), defined by φ(x, y) = x + ynx will be a diffeomorphism. Let Dφ(x, y) be the Jacobian of φ at the point (x, y) ∈S × [−ǫ, ǫ]. Note that Dφ(x, 0) = 1 for every x ∈S. We now wish to claim that as ǫ →0, 1 ǫ Z Bǫ(S) g(x)dx = 1 ǫ Z B′ ǫ(S) g(x)dx + o(1). (7) To see this, we begin by noting that B′ ǫ(S) ⊆Bǫ(S). Moreover, any point in Bǫ(S) \ B′ ǫ(S) has the property that its projection to the closest point in S is not a normal to S, and thus must be ǫ-close to the edge of S. As a result of regularity condition 3c for S, and the fact that g(·) is continuous and hence uniformly bounded in the volume of integration, we get that the integration of g(·) over Bǫ \ B′ ǫ is asymptotically negligible (as ǫ →0), and hence Eq. (7) is justified. By the change of variables theorem from multivariate calculus, followed by Fubini’s theorem, and using the fact that Dφ is continuous and equals 1 on S × {0}, 1 ǫ Z B′ǫ(S) g(x)dx = 1 ǫ Z S×[−ǫ,ǫ] g(x + ynx)Dφ(x, y)dxdy = 1 ǫ Z ǫ −ǫ Z S g(x + ynx)Dφ(x, y)dx  dy = 1 ǫ Z ǫ −ǫ Z S g(x + ynx)dx  dy + o(1), where o(1) →0 as ǫ →0. Combining this with Eq. (7) yields the required result. Lemma D.2. Let (gm : X 7→R)∞ m=1 be a sequence of integrable functions, such that gm(x) →0 uniformly for all x as m →∞. Then for any i, j ∈{1, . . . , k}, i ̸= j, Z Br/√m(Fθ0,i,j) √mgm(x)p(x)dx →0 as m →∞ Proof. By the assumptions on (gm(·))∞ m=1, there exists a sequence of positive constants (bm)∞ m=1, converging to 0, such that Z Br/√m(Fθ0,i,j) √mgm(x)p(x)dx ≤bm Z Br/√m(Fθ0,i,j) √mp(x)dx. 5 For large enough m, p(x) is bounded and continuous in the volume of integration. Applying Lemma D.1 with ǫ = r/√m, we have that as m →∞, bm √m Z Br/√m(Fθ0,i,j) p(x)dx = bm √m Z Fθ0,i,j Z r/√m −r/√m p(x + ynx)dydx + o(1) ≤bm √m C √m + o(1) = bmC + o(1) for some constant C dependant on r and the upper bound on p(·). Since bm converge to 0, we have that the expression in the lemma converges to 0 as well. Lemma D.3. Let (Xm) and (Ym) be a sequence of real random variables, such that Xm, Ym are defined on the same probability space, and Xm −Ym converges to 0 in probability. Assume that Ym converges in distribution to a continuous random variable Y . Then | Pr(Xm ≤c) −Pr(Ym ≤c)| converges to 0 uniformly for all c ∈R. Proof. We will use the following standard fact (see for example section 7.2 of [4]): for any two real random variables A, B, any c ∈R and any ǫ > 0, it holds that Pr(A ≤c) ≤Pr(B ≤c + ǫ) + Pr(|A −B| > ǫ). From this inequality, it follows that for any c ∈R and any ǫ > 0, | Pr(Xm ≤c) −Pr(Ym ≤c)| ≤  Pr(Ym ≤c + ǫ) −Pr(Ym ≤c)  +  Pr(Ym ≤c) −Pr(Ym ≤c −ǫ)  + Pr(|Xm −Ym| ≥ǫ). (8) We claim that the r.h.s of Eq. (8) converges to 0 uniformly for all c, from which the lemma follows. To see this, we begin by noticing that Pr(|Xm −Ym| ≥ǫ) converges to 0 for any ǫ by definition of convergence in probability. Next, Pr(Ym ≤c′) converges to Pr(Y ≤c′) uniformly for all c′ ∈R, since Y is continuous (see section 1 of [6]). Moreover, since Y is a continuous random variable, we have that its distribution function is uniformly continuous, hence Pr(Y ≤c + ǫ) −Pr(Y ≤c) and Pr(Y ≤c) −Pr(Y ≤c −ǫ) converges to 0 as ǫ →0, uniformly for all c. Therefore, by letting m →∞, and ǫ →0 at an appropriate rate compared to m, we have that the l.h.s of Eq. (8) converges to 0 uniformly for all c. Lemma D.4. Pr( a, √m(fˆθ(x) −fθ0(x)) < b) converges to Pr(⟨a, G(x)⟩< b) uniformly for any x ∈X, any a ̸= 0 in some bounded subset of Rk, and any b ∈R. Proof. By Eq. (3), √m fˆθ(x) −fθ0(x)  =  ∂ ∂θ fθ0(x) ⊤ (√m(ˆθ −θ0)) + op(1). Where the remainder term does not depend on x. Thus, for any a in a bounded subset of Rk, a, √m fˆθ(x) −fθ0(x)  = * a  ∂ ∂θ fθ0(x) ⊤ , √m(ˆθ −θ0) + + op(1), (9) Where the convergence in probability is uniform for all bounded a and x ∈X. We now need to use a result which tells us when is a convergence in distribution uniform. Using thm. 4.2 in [6], we have that if a sequence of random vectors (Xm)∞ m=1 in Euclidean space converge to a random variable X in distribution, then Pr(⟨y, Xm⟩< b) converges to Pr(⟨y, X⟩< b) uniformly for any vector y and b ∈R. We note that a stronger result (Thm. 6 in [2]) apparently allows us to extend this to cases where Xm and X reside in some infinite dimensional, separable Hilbert space (for example, if Θ is a subset of an infinite dimensional reproducing kernel Hilbert space in kernel clustering). Therefore, recalling that √m(ˆθ −θ0) converges in distribution to a random normal vector Z, we have that uniformly for all x, a, b, 6 Pr * a  ∂ ∂θ fθ0(x) ⊤ , √m(ˆθ −θ0) + < b ! = Pr * a  ∂ ∂θ fθ0(x) ⊤ , Z + < b ! + o(1) = Pr (⟨a, G(x)⟩< b) + o(1) (10) Here we think of a((∂/∂θ)fθ0(x))⊤as the vector y to which we apply the theorem. By regularity condition 3a, and assuming a ̸= 0, we have that a((∂/∂θ)fθ0(x))⊤, Z is a continuous real random variable for any x, unless Z = 0 in which case the lemma is trivial. Therefore, the conditions of Lemma D.3 apply: the two sides of Eq. (9) give us two sequences of random variables which converge in probability to each other, and by Eq. (10) we have convergence in distribution of one of the sequences to a fixed continuous random variable. Therefore, using Lemma D.3, we have that Pr a, √m fˆθ(x) −fθ0(x)  < b  = Pr * a  ∂ ∂θ fθ0(x) ⊤ , √m(ˆθ −θ0) + < b ! + o(1), (11) where the convergence is uniform for any bounded a ̸= 0, b and x ∈X. Combining Eq. (10) and Eq. (11) gives us the required result. Lemma D.5. Fix some two clusters i, j. Assuming the expression below is integrable, we have that 2 Z Br/√m(Fθ0,i,j) √m Pr(fˆθ,i(x) −fˆθ,j(x) < 0) Pr(fˆθ,i(x) −fˆθ,j > 0)p(x)dx = 2  1 √π −h(r)  Z Fθ0,i,j p(x) p Var(Gi(x) −Gj(x)) ∥∇(fθ0,i(x) −fθ0,j(x))∥dx + o(1) where o(1) →0 as m →∞and h(r) = O(exp(−r2)). Proof. Define a ∈Rk as ai = 1, aj = −1, and 0 for any other entry. Applying Lemma D.4, with a as above, we have that uniformly for all x in some small enough neighborhood around Fθ0,i,j: Pr(fˆθ,i(x) −fˆθ,j(x) < 0) = Pr √m(fˆθ,i(x) −fθ0,i(x)) −√m(fˆθ,j(x) −fθ0,j(x)) < √m(fθ0,j(x) −fθ0,i(x))  = Pr(Gi(x) −Gj(x) < √m(fθ0,j(x) −fθ0,i(x))) + o(1). where o(1) converges uniformly to 0 as m →∞. Since Gi(x)−Gj(x) has a zero mean normal distribution, we can rewrite the above (if Var(Gi(x)− Gj(x)) > 0) as Pr Gi(x) −Gj(x) p Var(Gi(x) −Gj(x)) < √m(fθ0,j(x) −fθ0,i(x)) p Var(Gi(x) −Gj(x)) ! + o(1) = Φ √m(fθ0,j(x) −fθ0,i(x)) p Var(Gi(x) −Gj(x)) ! + o(1), (12) where Φ(·) is the cumulative standard normal distribution function. Notice that by some abuse of notation, the expression is also valid in the case where Var(Gi(x) −Gj(x)) = 0. In that case, Gi(x) −Gj(x) is equal to 0 with probability 1, and thus Pr(Gi(x) −Gj(x) < √m(fθ0,j(x) − fθ0,i(x))) is 1 if fθ0,j(x) −fθ0,i(x)) ≥0 and 0 if fθ0,j(x) −fθ0,i(x)) < 0. This is equal to Eq. (12) if we are willing to assume that Φ(∞) = 1, Φ(0/0) = 1, Φ(−∞) = 0. 7 Therefore, we can rewrite the l.h.s of the equation in the lemma statement as 2 Z Br/√m(Fθ0,i,j) √mΦ √m(fθ0,i(x) −fθ0,j(x)) p Var(Gi(x) −Gj(x)) ! 1 −Φ √m(fθ0,i(x) −fθ0,j(x)) p Var(Gi(x) −Gj(x)) !! + √mo(1)p(x)dx. The integration of the remainder term can be rewritten as o(1) by Lemma D.2, and we get that the expression can be rewritten as: 2 Z Br/√m(Fθ0,i,j) √mΦ √m(fθ0,i(x) −fθ0,j(x)) p Var(Gi(x) −Gj(x)) ! 1 −Φ √m(fθ0,i(x) −fθ0,j(x)) p Var(Gi(x) −Gj(x)) !! p(x)dx + o(1). (13) One can verify that the expression inside the integral is a continuous function of x, by the regularity conditions and the expression for G(·) as proven in Sec. C (namely Eq. (4)). We can therefore apply Lemma D.1, and again take all the remainder terms outside of the integral by Lemma D.2, to get that the above can be rewritten as 2 Z Fθ0,i,j Z r/√m −r/√m √mΦ √m(fθ0,i(x + ynx) −fθ0,j(x + ynx)) p Var(Gi(x + ynx) −Gj(x + ynx)) ! 1 −Φ √m(fθ0,i(x + ynx) −fθ0,j(x + ynx)) p Var(Gi(x + ynx) −Gj(x + ynx)) !! p(x)dydx + o(1), (14) where nx is a unit normal to Fθ0,i,j at x. Inspecting Eq. (14), we see that y ranges over an arbitrarily small domain as m →∞. This suggests that we can rewrite the above using Taylor expansions, which is what we shall do next. Let us assume for a minute that Var(Gi(x) −Gj(x)) > 0 for some point x ∈Fθ0,i,j. One can verify that by the regularity conditions and the expression for G(·) in Eq. (4), the expression fθ0,i(·) −fθ0,j(·) p Var(Gi(·) −Gj(·)) (15) is twice differentiable, with a uniformly bounded second derivative. Therefore, we can rewrite the expression in Eq. (15) as its first-order Taylor expansion around each x ∈Fθ0,i,j, plus a remainder term which is uniform for all x: fθ0,i(x + ynx) −fθ0,j(x + ynx) p Var(Gi(x + ynx) −Gj(x + ynx)) = fθ0,i(x) −fθ0,j(x) p Var(Gi(x) −Gj(x)) + ∇ fθ0,i(x) −fθ0,j(x) p Var(Gi(x) −Gj(x)) ! ynx + O(y2). Since fθ0,i(x) −fθ0,j(x) = 0 for any x ∈Fθ0,i,j, the expression reduces after a simple calculation to ∇(fθ0,i(x) −fθ0,j(x)) p Var(Gi(x) −Gj(x)) ynx + O(y2). Notice that ∇(fθ0,i(x) −fθ0,j(x)) (the gradient of fθ0,i(x) −fθ0,j(x)) has the same direction as nx (the normal to the cluster boundary). Therefore, the expression above can be rewritten, up to a sign, as y ∇(fθ0,i(x) −fθ0,j(x)) p Var(Gi(x) −Gj(x)) + O(y2). 8 As a result, denoting s(x) := ∇(fθ0,i(x) −fθ0,j(x))/ p Var(Gi(x) −Gj(x)), we have that Φ √m(fθ0,i(x + ynx) −fθ0,j(x + ynx)) p Var(Gi(x + ynx) −Gj(x + ynx)) ! 1 −Φ √m(fθ0,i(x + ynx) −fθ0,j(x + ynx)) p Var(Gi(x + ynx) −Gj(x + ynx)) !! (16) = Φ √m ∥s(x)∥y + O(y2)  1 −Φ √m ∥s(x)∥y + O(y2) ! = Φ √m ∥s(x)∥y  1 −Φ √m ∥s(x)∥y ! + O(√my2). (17) In the preceding development, we have assumed that Var(Gi(x) −Gj(x)) > 0. However, notice that the expressions in Eq. (16) and Eq. (17), without the remainder term, are both equal (to zero) even if Var(Gi(x) −Gj(x)) = 0 (with our previous abuse of notation that Φ(−∞) = 0, Φ(∞) = 1). Moreover, since y takes values in [−r/√m, r/√m], the remainder term O(√my2) is at most O(√mr/m) = O(r/√m), so it can be rewritten as o(1) which converges to 0 as m →∞. In conclusion, and again using Lemma D.2 to take the remainder terms outside of the integral, we can rewrite Eq. (14) as 2 Z Fθ0,i,j Z r/√m −r/√m √mΦ √m∥s(x)∥y)  1 −Φ √m∥s(x)∥y)  p(x)dydx + o(1). (18) We now perform a change of variables, letting zx = √m∥s(x)∥y in the inner integral, and get 2 Z Fθ0,i,j Z r∥s(x)∥ −r∥s(x)∥ 1 ∥s(x)∥Φ (zx) (1 −Φ (zx)) p(x)dzxdx + o(1), which is equal by the mean value theorem to 2 Z Fθ0,i,j p(x) ∥s(x)∥dx ! Z r∥s(x0)∥ −r∥s(x0)∥ Φ (zx0) (1 −Φ (zx0)) dzx0 ! + o(1) (19) for some x0 ∈Fθ0,i,j. By regularity condition 3b, it can be verified that ∥s(x)∥is positive or infinite for any x ∈Fθ0,i,j. As a result, as r →∞, we have that Z r∥s(x0)∥ −r∥s(x0)∥ Φ (zx0) (1 −Φ (zx0)) dzx0 −→ Z ∞ −∞ Φ(zx0)(1 −Φ(zx0))dzx0 = 1 √π . and the convergence to 1/√π is at a rate of O(exp(−r2)). Combining this with Eq. (19) gives us the required result. Proof of Proposition D.1. We can now turn to prove Proposition D.1 itself. For any x ∈X, let Ax be the event (over drawing and clustering a sample pair) that x switched clusters. For any Fθ0,i,j and sample size m, define F m θ0,i,j to be the subset of Fθ0,i,j, which is at a distance of at least m−1/4 from any other cluster boundary (with respect to θ0). Formally, F m θ0,i,j :=  x ∈Fθ0,i,j : ∀({i′, j′} ̸= {i, j}, Fθ0,i′,j′ ̸= ∅) , inf y∈Fθ0,i′,j′ ∥x −y∥≥m−1/4  . 9 Letting S1, S2 be two independent samples of size m, we have by Fubini’s theorem that Edm D(Ak(S1), Ak(S2), Br/√m(∪i,jFθ0,i,j)) = √mES1,S2 Z Br/√m(∪i,jFθ0,i,j) 1(Ax)p(x)dx = Z Br/√m(∪i,jFθ0,i,j) √m Pr(Ax)p(x)dx = Z Br/√m(∪i,jF m θ0,i,j) √m Pr(Ax)p(x)dx + Z Br/√m(∪i,jFθ0,i,j\F m θ0,i,j) √m Pr(Ax)p(x)dx. As to the first integral, notice that each point in F m θ0,i,j is separated from any point in any other F m θ0,i′,j′ by a distance of at least 2m−1/4. Therefore, for large enough m, Br/√m(F m θ0,i,j) are disjoint for each i, j, and we can rewrite the above as: X 1≤i<j≤k Z Br/√m(F m θ0,i,j) √m Pr(Ax)p(x)dx + Z Br/√m(∪i,jFθ0,i,j\F m θ0,i,j) √m Pr(Ax)p(x)dx. As to the second integral, notice that the integration is over points which are at a distance of at most r/√m from some Fθ0,i,j, and also at a distance of at most m−1/4 from some other Fθ0,i′,j′. By regularity condition 3c, and the fact that m−1/4 →0, it follows that this integral converges to 0 as m →∞, and we can rewrite the above as: X 1≤i<j≤k Z Br/√m(F m θ0,i,j) √m Pr(Ax)p(x)dx + o(1) (20) If there were only two clusters i, j, then Pr(Ax) = 2 Pr(fˆθ,i(x) −fˆθ,j(x) < 0) Pr(fˆθ,i(x) −fˆθ,j > 0). This is simply by definition of Ax: the probability that under one clustering, based on a random sample, x is more associated with cluster i, and that under a second clustering, based on another independent random sample, x is more associated with cluster j. In general, we will have more than two clusters. However, notice that any point x in Br/√m(F m θ0,i,j) (for some i, j) is much closer to Fθ0,i,j than to any other cluster boundary. This is because its distance to Fθ0,i,j is on the order of 1/√m, while its distance to any other boundary is on the order of m−1/4. Therefore, if x does switch clusters, then it is highly likely to switch between cluster i and cluster j. Formally, by regularity condition 3d (which ensure that the cluster boundaries experience at most O(1/√m) fluctuations), we have that uniformly for any x, Pr(Ax) = 2 Pr(fˆθ,i(x) −fˆθ,j(x) < 0) Pr(fˆθ,i(x) −fˆθ,j > 0) + o(1), where o(1) converges to 0 as m →∞. Substituting this back to Eq. (20), using Lemma D.2 to take the remainder term outside the integral, and using the regularity condition 3c in the reverse direction to transform integrals over F m θ0,i,j back into Fθ0,i,j with asymptotically negligible remainder terms, we get that the quantity we are interested in can be written as X 1≤i<j≤k 2 Z Br/√m(Fθ0,i,j) √m Pr(fˆθ,i(x) −fˆθ,j(x) < 0) Pr(fˆθ,i(x) −fˆθ,j > 0)p(x)dx + o(1). Now we can apply Lemma D.5 to each summand, and get the required result. D.3 Part 2: Proof of Thm. 1 For notational convenience, we will denote dm D(r) := dm D(Ak(S1), Ak(S2), Br/√m(∪i,jFθ0,i,j)) 10 whenever the omitted terms are obvious from context. If \ instab(Ak, D) = 0, the proof of the theorem is straightforward. In this special case, by definition of \ instab(Ak, D) in Thm. 1 and Proposition D.1, we have that dm D(r) converges in probability to 0 for any r. By regularity condition 3d, for any fixed q, 1 q Pq i=1 dm D(Ak(S1 i ), Ak(S2 i )) converges in probability to 0 (because dm D(Ak(S1 i ), Ak(S2 i )) = dm D(Ak(S1 i ), Ak(S2 i ), Br/√m(∪i,jFθ0,i,j)) with arbitrarily high probability as r increases). Therefore, √m ˆηk m,q, which is a plug-in estimator of the expected value of 1 q Pq i=1 dm D(Ak(S1 i ), Ak(S2 i )), converges in probability to 0 for any fixed q as m →∞, and the theorem follows for this special case. Therefore, we will assume from now on that \ instab(Ak, D) > 0. We need the following variant of Hoeffding’s bound, adapted to conditional probabilities. Lemma D.6. Fix some r > 0. Let X1, . . . , Xq be real, nonnegative, independent and identically distributed random variables, such that Pr(X1 ∈[0, r]) > 0. For any Xi, let Yi be a random variable on the same probability space, such that Pr(Yi = Xi|Xi ∈[0, r]) = 1. Then for any ν > 0, Pr 1 q q X i=1 Xi −E[Y1|X1 ∈[0, r]] ≥ν ∀i, Xi ∈[0, r] ! ≤2 exp  −2qν2 r2  . Proof. Define an auxiliary set of random variables Z1, . . . , Zq, such that Pr(Zi ≤a) = Pr(Xi ≤ a|Xi ∈[0, r]) for any i, a. In words, Xi and Zi have the same distribution conditioned on the event Xi ∈[0, r]. Also, we have that Yi has the same distribution conditioned on Xi ∈[0, r]. Therefore, E[Y1|X1 ∈[0, r]] = E[X1|X1 ∈[0, r]], and as a result E[Y1|X1 ∈[0, r]] = E[Z1]. Therefore, the probability in the lemma above can be written as Pr 1 q q X i=1 Zi −E[Zi] ≥ν ! , where Zi are bounded in [0, r] with probability 1. Applying the regular Hoeffding’s bound gives us the required result. We now turn to the proof of the theorem. Let Am r be the event that for all subsample pairs {S1 i , S2 i }, dm D(Ak(S1 i ), Ak(S2 i ), Br/√m(∪i,jFθ0,i,j)) = dm D(Ak(S1 i ), Ak(S2 i )). Namely, this is the event that for all subsample pairs, the mass which switches clusters when we compare the two resulting clusterings is always in an r/√m-neighborhood of the limit cluster boundaries. Since p(·) is bounded, we have that dm D(r) is deterministically bounded by O(r), with implicit constants depending only on D and θ0. Using the law of total expectation, this implies that E[dm D(r)] −E[dm D(r)|Am r ] = Pr(Am r )E[dm D(r)|Am r ] + (1 −Pr(Am r ))E[dm D(r)|¬Am r ] −E[dm D(r)|Am r ] =  1 −Pr(Am r )  E[dm D(r)|¬Am r ] −E[dm D(r)|Am r ]  ≤(1 −Pr(Am r ))O(r). (21) For any two events A, B, we have by the law of total probability that Pr(A) = Pr(B) Pr(A|B) + Pr(Bc) Pr(A|Bc). From this it follows that Pr(A) ≤Pr(B) + Pr(A|Bc). As a result, for any 11 ǫ > 0, Pr  √m ˆηk m,q −\ instab(Ak, D) > ǫ  ≤Pr 1 q q X i=1 dm D(Ak(S1 i ), Ak(S2 i )) −\ instab(Ak, D) > ǫ 2 ! + Pr h √m ˆηk m,q −\ instab(Ak, D) > ǫ i " 1 q q X i=1 dm D(Ak(S1 i ), Ak(S2 i )) −\ instab(Ak, D) ≤ǫ 2 #! . (22) We will assume w.l.o.g that ǫ/2 < \ instab(Ak, D). Otherwise, we can upper bound Pr  √m ˆηk m,q −\ instab(Ak, D) > ǫ  in the equation above by replacing ǫ with some smaller quantity ǫ′ for which ǫ′/2 < \ instab(Ak, D,). We start by analyzing the conditional probability, forming the second summand in Eq. (22). Recall that ˆηk m,q, after clustering the q subsample pairs {S1 i , S2 i }q i=1, uses an additional i.i.d sample S3 of size m to empirically estimate P q dm D(Ak(S1 i ), Ak(S2 i ))/√mq ∈[0, 1]. This is achieved by calculating the average percentage of instances in S3 which switches between clusterings. Thus, conditioned on the event appearing in the second summand of Eq. (22), ˆηk m,q is simply an empirical average of m i.i.d random variables in [0, 1], whose expected value, denoted as v, is a strictly positive number in the range of (\ instab(Ak, D) ± ǫ/2)/√m. Thus, the second summand of Eq. (22) refers to an event where this empirical average is at a distance of at least ǫ/(2√m) from its expected value. We can therefore apply a large deviation result to bound this probability. Since the expectation itself is a (generally decreasing) function of the sample size m, we will need something a bit stronger than the regular Hoeffding’s bound. Using a relative entropy version of Hoeffding’s bound [5], we have that the second summand in Eq. (22) is upper bounded by: exp  −mDkl v + ǫ/2 √m v √m  + exp  −mDkl  max  0, v −ǫ/2 √m  v √m  , (23) where Dkl[p||q] := −p log(p/q)−(1−p) log((1−p)/(1−q)) for any q ∈(0, 1) and any p ∈[0, 1]. Using the fact that Dkl[p||q] ≥(p−q)2/2 max{p, q}, we get that Eq. (23) can be upper bounded by a quantity which converges to 0 as m →∞. As a result, the second summand in Eq. (22) converges to 0 as m →∞. As to the first summand in Eq. (22), using the triangle inequality and switching sides allows us to upper bound it by: Pr 1 q q X i=1 dm D(Ak(S1 i ), Ak(S2 i )) −E[dm D(r)|Am r ] ≥ǫ 2 − E[dm D(r)|Am r ] −E[dm D(r)] − Edm D(r) −\ instab(Ak, D)  (24) By the definition of \ instab(Ak, D) as appearing in Thm. 1 , and Proposition D.1, lim m→∞Edm D(r) −\ instab(Ak, D) = O(h(r)) = O(exp(−r2)). (25) Using Eq. (25) and Eq. (21), we can upper bound Eq. (24) by Pr 1 q q X i=1 dm D(Ak(S1 i ), Ak(S2 i )) −E[dm D(r)|Am r ] ≥ǫ 2 −(1 −Pr(Am r ))O(r) −O(exp(−r2)) −o(1)  , (26) 12 where o(1) →0 as m →∞. Moreover, by using the law of total probability and Lemma D.6, we have that for any ν > 0, Pr 1 q q X i=1 dm D(Ak(S1 i ), Ak(S2 i )) −E[dm D(r)|Am r ] > ν ! ≤(1 −Pr(Am r )) ∗1 + Pr(Am r ) Pr 1 q q X i=1 dm D(Ak(S1 i ), Ak(S2 i )) −E[dm D(r)|Am r ] > ν Am r ! ≤(1 −Pr(Am r )) + 2 Pr(Am r ) exp  −2qν2 r2  . (27) Lemma D.6 can be applied because dm D(Ak(S1 i ), Ak(S2 i )) = dm D(r) for any i, if Am r occurs. If m, r are such that ǫ 2 −(1 −Pr(Am r ))O(r) −O(exp(−r2)) −o(1) > 0, (28) we can substitute this expression instead of ν in Eq. (27), and get that Eq. (26) is upper bounded by (1 −Pr(Am r )) + 2 Pr(Am r ) exp −2q ǫ 2 −(1 −Pr(Am r ))O(r) −O(exp(−r2))) −o(1) 2 r2 ! . (29) Let gm(r) := Pr S1,S2∼Dm(dm D(r) ̸= dm D(Ak(S1), Ak(S2))) , g(r) = lim m→∞gm(r) By regularity condition 3d, g(r) = O(r−3−δ) for some δ > 0. Also, we have that Pr(Am r ) = (1 −gm(r))q, and therefore limm→∞Pr(Am r ) = (1 −g(r))q for any fixed q. In consequence, as m →∞, Eq. (29) converges to (1 −(1 −g(r)))q) + 2(1 −g(r))q exp −2q ǫ 2 −(1 −(1 −g(r))q)O(r) −O(exp(−r2)) 2 r2 ! . (30) Now we use the fact that r can be chosen arbitrarily. In particular, let r = q1/(2+δ/2), where δ > 0 is the same quantity appearing in condition 3d. It follows that 1 −(1 −g(r))q ≤qg(r) = O(q/r3+δ) = O  q1− 3+δ 2+δ/2  (1 −(1 −g(r))q)O(r) = qg(r)O(r) = O  q1− 2+δ 2+δ/2  = O(q− δ 4+δ ) q/r2 = q1− 1 1+δ/4 exp(−r2) = exp(−q 1 1+δ/4 ). It can be verified that the equations above imply the validness of Eq. (28) for large enough m and q (and hence r). Substituting these equations into Eq. (30), we get an upper bound O  q1− 3+δ 2+δ/2  + exp  −2q1− 1 1+δ/4  ǫ 2 −O  q− δ 4+δ  −O  exp(−q 1 1+δ/4 ) 2 . Since δ > 0, it can be verified that the first summand asymptotically dominates the second summand (as q →∞), and can be bounded in turn by o(q−1/2). Summarizing, we have that the first summand in Eq. (22) converges to o(q−1/2) as m →∞, and the second summand in Eq. (22) converge to 0 as m →∞, for any fixed ǫ > 0, and thus Pr(|√m ˆηk m,q− \ instab(Ak, D)| > ǫ) converges to o(q−1/2). 13 E Proof of Thm. 2 and Thm. 3 The tool we shall use for proving Thm. 2 and Thm. 3 is the following general central limit theorem for Z-estimators (Thm. 3.3.1 in [8]). We will first quote the theorem and then explain the terminology used. Theorem E.1 (Van der Vaart). Let Ψm and Ψ be random maps and a fixed map, respectively, from a subset Θ of some Banach space into another Banach space such that as m →∞, ∥√m(Ψm −Ψ)(ˆθ) −√m(Ψm −Ψ)(θ0)∥ 1 + √m∥ˆθ −θ0∥ →0 (31) in probability, and such that the sequence √m(Ψm −Ψ)(θ0) converges in distribution to a tight random element Z. Let θ 7→Ψ(θ) be Fr´echet-differentiable at θ0 with an invertible derivative ˙Ψθ0, which is assumed to be a continuous linear operator1. If Ψ(θ0) = 0 and Ψm(ˆθ)/√m →0 in probability, and ˆθ converges in probability to θ0, then √m(ˆθ −θ0) converges in distribution to −˙Ψ−1 θ0 Z. A Banach space is any complete normed vector space (possible infinite dimensional). A tight random element essentially means that an arbitrarily large portion of its distribution lies in compact sets. This condition is trivial when Θ is a subset of Euclidean space. Fr´echet-differentiability of a function f : U 7→V at x ∈U, where U, V are Banach spaces, means that there exists a bounded linear operator A : U 7→V such that lim h→0 ∥f(x + h) −f(x) −A(h)∥W ∥h∥U = 0. This is equivalent to regular differentiability in finite dimensional settings. It is important to note that the theorem is stronger than what we actually need, since we only consider finite dimensional Euclidean spaces, while the theorem deals with possibly infinite dimensional Banach spaces. In principle, it is possible to use this theorem to prove central limit theorems in infinite dimensional settings, for example in kernel clustering where the associated reproducing kernel Hilbert space is infinite dimensional. However, the required conditions become much less trivial, and actually fail to hold in some cases (see below for further details). We now turn to the proofs themselves. Since the proofs of Thm. 2 and Thm. 3 are almost identical, we will prove them together, marking differences between them as needed. In order to allow uniform notation in both cases, we shall assume that φ(·) is the identity mapping in Bregman divergence clustering, and the feature map from X to H in kernel clustering. With the assumptions that we made in the theorems, the only thing really left to show before applying Thm. E.1 is that Eq. (31) holds. Notice that it is enough to show that ∥√m(Ψi m −Ψi)(ˆθ) −√m(Ψi m −Ψi)(θ0)∥ 1 + √m∥ˆθ −θ0∥ →0 for any i ∈{1, . . . , k}. We will prove this in a slightly more complicated way than necessary, which also treats the case of kernel clustering where H is infinite-dimensional. By Lemma 3.3.5 in [8], since X is bounded, it is sufficient to show that for any i, there is some δ > 0 such that {ψi ˆθ,h(·) −ψi θ0,h(·)}∥ˆθ−θ0∥≤δ,h∈X is a Donsker class, where ψi θ,h(x) = ⟨θi −φ(x), φ(h)⟩ x ∈Cθ,i 0 otherwise. Intuitively, a set of real functions {f(·)} from X (with any probability distribution D) to R is called Donsker if it satisfies a uniform central limit theorem. Without getting too much into the details, 1A linear operator is automatically continuous in finite dimensional spaces, not necessarily in infinite dimensional spaces. 14 this means that if we sample i.i.d m elements from D, then (f(x1) + . . . + f(xm))/√m converges in distribution (as m →∞) to a Gaussian random variable, and the convergence is uniform over all f(·) in the set, in an appropriately defined sense. We use the fact that if F and G are Donsker classes, then so are F + G and F · G (see examples 2.10.7 and 2.10.8 in [8]). This allows us to reduce the problem to showing that the following three function classes, from X to R, are Donsker: {⟨θi, φ(h)⟩}∥ˆθ−θ0∥≤δ,h∈X , {⟨φ(·), φ(h)⟩}h∈X , {1Cθ,i(·)}∥ˆθ−θ0∥≤δ. (32) Notice that the first class is a set of bounded constant functions, while the third class is a set of indicator functions for all possible clusters. One can now use several tools to show that each class in Eq. (32) is Donsker. For example, consider a class of real functions on a bounded subset of some Euclidean space. By Thm. 8.2.1 in [3] (and its preceding discussion), the class is Donsker if any function in the class is differentiable to a sufficiently high order. This ensures that the first class in Eq. (32) is Donsker, because it is composed of constant functions. As to the second class in Eq. (32), the same holds in the case of Bregman divergence clustering (where φ(·) is the identity function), because it is then just a set of linear functions. For finite dimensional kernel clustering, it is enough to show that {⟨·, φ(h)⟩}h∈X is Donsker (namely, the same class of functions after performing the transformation from X to φ(X)). This is again a set of linear functions in Hk, a subset of some finite dimensional Euclidean space, and so it is Donsker. In infinite dimensional kernel clustering, our class of functions can be written as {k(·, h)}h∈X , where k(·, ·) is the kernel function, so it is Donsker if the kernel function is differentiable to a sufficiently high order. The third class in Eq. (32) is more problematic. By Theorem 8.2.15 in [3] (and its preceding discussion), it suffices that the boundary of each possible cluster is composed of a finite number of smooth surfaces (differentiable to a high enough order) in some Euclidean space. In Bregman divergence clustering, the clusters are separated by hyperplanes, which are linear functions (see appendix A in [1]), and thus the class is Donsker. The same holds for finite dimensional kernel clustering. This will still be true for infinite dimensional kernel clustering, if we can guarantee that any cluster in any solution close enough to θ0 in Θ will have smooth boundaries. Unfortunately, this does not hold in some important cases. For example, universal kernels (such as the Gaussian kernel) are capable of inducing cluster boundaries arbitrarily close in form to any continuous function, and thus our line of attack will not work in such cases. In a sense, this is not too surprising, since these kernels correspond to very ’rich’ hypothesis classes, and it is not clear if a precise characterization of their stability properties, via central limit theorems, is at all possible. Summarizing the above discussion, we have shown that for the settings assumed in our theorem, all three classes in Eq. (32) are Donsker and hence Eq. (31) holds. We now return to deal with the other ingredients required to apply Thm. E.1. As to the asymptotic distribution of √m(Ψm −Ψ)(θ0), since Ψ(θ0) = 0 by assumption, we have that for any i ∈{1, . . . , k}, √m(Ψi m −Ψi)(θ0) = 1 √m m X j=1 ∆i(θ0, xj). (33) where x1, . . . , xm is the sample by which Ψm is defined. The r.h.s of Eq. (33) is a sum of identically distributed, independent random variables with zero mean, normalized by √m. As a result, by the standard central limit theorem, √m(Ψi m−Ψi)(θ0) converges in distribution to a zero mean Gaussian random vector Y , with covariance matrix Vi = Z Cθ0,i p(x)(φ(x) −θ0,i)(φ(x) −θ0,i)⊤dx. Moreover, it is easily verified that Cov(∆i(θ0, x), ∆i′(θ0, x)) = 0 for any i ̸= i′. Therefore, √m(Ψm −Ψ)(θ0) converges in distribution to a zero mean Gaussian random vector, whose covariance matrix V is composed of k diagonal blocks (V1, . . . , Vk), all other elements of V being zero. Thus, we can use Thm. E.1 to get that √m(ˆθ−θ0) converges in distribution to a zero mean Gaussian random vector of the form −˙Ψ−1 θ0 Y , which is a Gaussian random vector with a covariance matrix of the form ˙Ψ−1 θ0 V ˙Ψ−1 θ0 . 15 F Proof of Thm. 4 Since our algorithm returns a locally optimal solution with respect to the differentiable loglikelihood function, we can frame it as a Z-estimator of the derivative of the log-likelihood function with respect to the parameters, namely the score function Ψm(ˆθ) = 1 m m X i=1 ∂ ∂θ log(q(xi|ˆθ)). This is a random mapping based on the sample x1, . . . , xm. Similarly, we can define Ψ(·) as the ’asymptotic’ score function with respect to the underlying distribution D: Ψ(ˆθ) = Z X ∂ ∂θ log(q(x|ˆθ))p(x)dx. Under the assumptions we have made, the model ˆθ returned by the algorithm satisfies Ψm(ˆθ) = 0, and ˆθ converges in probability to some θ0 for which Ψ(θ0) = 0. The asymptotic normality of √m(ˆθ −θ0) is now an immediate consequence of central limit theorems for ’maximum likelihood’ Z-estimators, such as Thm. 5.21 in [7]. References [1] A. Banerjee, S. Merugu, I. S. Dhillon, and J. Ghosh. Clustering with bregman divergences. Journal of Machine Learning Research, 6:1705–1749, 2005. [2] P. Billingsley and F. Topsøe. Uniformity in weak convergence. Probability Theory and Related Fields, 7:1–16, 1967. [3] R. Dudley. Uniform Central Limit Theorems. Cambridge Studies in Advanced Mathematics. Cambridge University Press, 1999. [4] G. R. Grimmet and D. R. Stirzaker. Probability and Random Processes. Oxford University Press, 2001. [5] W. Hoeffding. Probability inequalities for sums of bounded random variables. Journal of the American Statistical Association, 58(301):13–30, Mar. 1963. [6] R. R. Rao. Relations betwen weak and uniform convergence of measures with applications. The Annals of Mathematical Statistics, 33(2):659–680, June 1962. [7] A. W. V. D. Vaart. Asymptotic Statistics. Cambridge University Press, 1998. [8] A. W. van der Vaart and J. A. Wellner. Weak Convergence and Empirical Processes : With Applications to Statistics. Springer, 1996. 16
2008
194
3,447
Using matrices to model symbolic relationships Ilya Sutskever and Geoffrey Hinton University of Toronto {ilya, hinton}@cs.utoronto.ca Abstract We describe a way of learning matrix representations of objects and relationships. The goal of learning is to allow multiplication of matrices to represent symbolic relationships between objects and symbolic relationships between relationships, which is the main novelty of the method. We demonstrate that this leads to excellent generalization in two different domains: modular arithmetic and family relationships. We show that the same system can learn first-order propositions such as (2, 5) ∈+3 or (Christopher, Penelope) ∈has wife, and higher-order propositions such as (3, +3) ∈plus and (+3, −3) ∈inverse or (has husband, has wife) ∈higher oppsex. We further demonstrate that the system understands how higher-order propositions are related to first-order ones by showing that it can correctly answer questions about first-order propositions involving the relations +3 or has wife even though it has not been trained on any first-order examples involving these relations. 1 Introduction It is sometimes possible to find a way of mapping objects in a “data” domain into objects in a “target” domain so that operations in the data domain can be modelled by operations in the target domain. If, for example, we map each positive number to its logarithm, multiplication in the data domain can be modelled by addition in the target domain. When the objects in the data and target domains are more complicated than single numbers, it may be difficult to find good mappings using inspiration alone. If we consider a continuous space of possible mappings and if we define a smooth measure of how well any particular mapping works, it is possible to use gradient search to find good mappings between the data and target domains. Paccanaro and Hinton [10] introduced a method called “Linear Relational Embedding” (LRE) that uses multiplication of vectors by matrices in the target domain to model pairwise relations between objects in the data domain. LRE applies to a finite set of objects Ωand a finite set of relations R where every relation R ∈R is a set of pairs of objects, so R ⊆Ω× Ω. Given the objects and relations, LRE finds a column-vector representation A of each object A ∈Ω, and a matrix representation R of each relation R ∈R, such that the product RA is close to B for all pairs (A, B) that are members of the relation R, and far from C for all pairs (A, C) that are not members of R. LRE learns the vectors and matrices by performing gradient descent in a cost function C that measures the similarities between RA and all B such that (A, B) ∈R relative to the similarities between RA and the vector representations of all the objects in the set of known objects Ω: C = − X R X (A,B)∈R log exp(−∥RA −B∥2) P C∈Ωexp(−∥RA −C∥2) (1) The cost function in Eq. 1 is “discriminative” because it compares the distance from RA to each correct answer with the distances from RA to all possible answers. This prevents trivial solutions in which RA and B are always zero, but it also causes the cost function to be nonconvex, making it hard to optimize. We can view exp(−∥RA −B∥2) as the unnormalized probability density of B under a spherical Gaussian centered at RA. The cost function then represents the sum of the negative log probabilities of picking the correct answers to questions of the form (A,?) ∈R if we pick answers stochastically in proportion to their probability densities under the spherical Gaussian centered at RA. We say that LRE accurately models a set of objects and relations if its answers to queries of the form (A, ?) ∈R are correct, which means that for each object A and relation R such that there are k objects X satisfying (A, X) ∈R, each vector representation X of each such object X must be among the k closest vector representations to RA. The definition of correctness implies that LRE’s answer to a query (A, ?) ∈R that has no solutions is always trivially correct. More refined versions of LRE handle such unsatisfiable queries more explicitly [9]. It may not be obvious how to determine if the representation found by LRE is good. One way is to check if LRE’s representation generalizes to test data. More specifically, if LRE has not been informed that B is an answer to the query (A, ?) ∈R that has k correct answers (that is, (A, B) was removed from R during LRE’s learning), yet LRE answers the query (A, ?) ∈R correctly by placing B among the k closest object representations to RA, then we can claim that LRE’s representation generalizes. Such generalization can occur only if LRE learned the “right” representations A, B, and R from the other propositions, which can happen only if the true relation is plausible according to LRE’s inductive bias that determines the subjective plausibility of every possible set of objects and relations (see, e.g., [6]). If the representation is high-dimensional, then LRE can easily represent any set of relations that is not too large, so its inductive bias finds all sets of relations plausible, which prevents generalization from being good. However, if the representation is low-dimensional, then LRE must make use of regularities in the training set in order to accurately model the data, but if it succeeds in doing so, generalization will be good. Paccanaro and Hinton [10] show that lowdimensional LRE exhibits excellent generalization on datasets such as the family relations task. In general, the dimensionality of the representation should grow with the total numbers of objects and relations, because when there are few objects and relations, a high-dimensional representation easily overfits, but if the number of objects and relations is large then the dimensionality can be higher, without overfitting. The best dimensionality depends on the “fit” between LRE and the data, and is mainly an empirical question. A drawback of LRE is that the square matrices it uses to represent relations are quadratically more cumbersome than the vectors it uses to represent objects. This causes the number of free parameters to grow rapidly when the dimensionality of the representations is increased. More importantly, it also means that relations cannot themselves be treated as objects. Paccanaro and Hinton [10], for example, describe a system that learns propositions of the form: (2, 5) ∈+3 where +3 is a relation that is represented by a learned matrix, but their system does not understand that the learned matrix for +3 has anything in common with the learned vector that is used to model the number 3 in propositions like (5, 3) ∈−2. In this paper we describe “Matrix Relational Embedding” (MRE), which is a version of LRE that uses matrices as the representation for objects as well as for relations.1 MRE optimizes the same cost function as LRE (equation 1), with the difference that RA −C is now a matrix rather than a vector and ∥RA −C∥2 denotes the sum of the squares of the entries of the matrix. This choice of matrix norm makes MRE a direct generalization of LRE. All distances between matrices will be computed using this norm. Although MRE is a simple variation of LRE, it has two important advantages. The first advantage of MRE is that when using an N × N matrix to represent each object it is possible to make N much smaller than when using an N-dimensional vector, so MRE can use about the same number of parameters as LRE for each object but many fewer parameters than LRE for each relation, which is useful for “simple” relations. 1We have also experimented with a version of LRE that learns to generate a learned matrix representation of a relation from a learned vector representation of the relation. This too makes it possible to treat relations as objects because they both have vector representations. However, it is less straightforward than simply representing objects by matrices and it does not generalize quite as well. The second advantage of MRE, which is also the main novelty of this paper, is that MRE is capable of representing higher-order relations, instances of which are (+3, −3) ∈inverse or (has husband, has wife) ∈higher oppsex. It can also represent relations involving an object and a relation, for instance (3, +3) ∈plus. Formally, we are given a finite set of higher-order relations ˜R, where a higher-order relation ˜R ∈˜R is a relation whose arguments can be relations as well as objects, which we formalize as ˜R ⊆R × R or ˜R ⊆Ω× R (R is the set of the basic relations). The matrix representation of MRE allows it to treat relations in (almost) the same way it treats basic objects, so there is no difficulty representing relations whose arguments are also relations. We show that MRE can answer questions of the form (4,?) ∈+3 even though the training set contains no examples of the basic relation +3. It can do this because it is told what +3 means by being given higher-order information about +3. It is told that (3, +3) ∈plus and it figures out what plus means from higher-order examples of the form (2, +2) ∈plus and basic examples of the form (3, 5) ∈+2. This enables MRE to understand a relation from an “analogical definition”: if it is told that has father to has mother is like has brother to has sister, etc., then MRE can answer queries involving has father based on this analogical information alone. Finally, we show that MRE can learn new relations after an initial set of objects and relations has already been learned and the learned matrices have been fixed. This shows that MRE can add new knowledge to previously acquired propositions without the need to relearn the original propositions. We believe that MRE is the first gradient-descent learning system that can learn new relations from definitions, including learning the meanings of the terms used in the definitions. This significantly extends the symbolic learning abilities of connectionist-type learning algorithms. Some of the existing connectionist models for representing and learning relations and analogies [2, 4] are able to detect new relations and to represent hierarchical relations of high complexity. They differ by using temporal synchrony for explicitly representing the binding of the relations to object, and, more importantly, do not use distributed representations for representing the relations themselves. 2 The modular arithmetic task Paccanaro and Hinton [10] describe a very simple modular arithmetic task in which the 10 objects are the numbers from 0 to 9 and the 9 relations are +0 to +4 and −1 to −4. Linear Relational Embedding easily learns this task using two-dimensional vectors for the numbers and 2×2 matrices for the relations. It arranges the numbers in a circle centered at the origin and uses rotation matrices to implement the relations. We used base 12 modular arithmetic, thus there are 12 objects, and made the task much more difficult by using both the twelve relations +0 to +11 and the twelve relations ×0 to ×11. We did not include subtraction and division because in modular arithmetic every proposition involving subtraction or division is equivalent to one involving addition or multiplication. There are 288 propositions in the modular arithmetic ntask. We tried matrices of various sizes and discovered that 4 × 4 matrices gave the best generalization when some of the cases are held-out. We held-out 30, 60, or 90 test cases chosen at random and used the remaining cases to learn the realvalued entries of the 12 matrices that represent numbers and the 24 matrices that represent relations. The learning was performed by gradient descent in the cost function in Eq. 1. We repeated this five times with a different random selection of held-out cases each time. Table 1 shows the number of errors on the held-out test cases. 3 Details of the learning procedure To learn the parameters, we used the conjugate gradient optimization algorithm available in the “scipy” library of the Python programming language with the default optimization parameters. We computed the gradient of the cost function on all of the training cases before updating the parameters, and initialized the parameters by a random sample from a spherical Gaussian with unit variance on each dimension. We also included “weight-decay” by adding 0.01 P i w2 i to the cost function, where i indexes all of the entries in the matrices for objects and relations. The variance of the results is due to the nonconvexity of the objective function. The implementation is available in [www.cs.utoronto.ca/∼ilya/code/2008/mre.tar.gz]. Test results for the basic modular arithmetic. errors on 5 test sets mean test error (30) 0 0 0 0 0 0.0 (60) 29 4 0 1 0 6.8 (90) 27 23 16 31 23 24.0 Table 1: Test results on the basic modular arithmetic task. Each entry shows the number of errors on the randomly held-out cases. There were no errors on the training set. Each test query has 12 possible answers of which 1 is correct, so random guessing should be incorrect on at least 90% of the test cases. The number of held-out cases of each run is written in brackets. Victoria = James Margaret = Arthur Jennifer = Charles Colin Christopher = Penelope Andrew = Christine Charlotte Bortolo = Emma Giannina = Pietro Aurelio = Maria Grazia = Pierino Doralice = Marcello Alberto Mariemma (a) RA B C D (b) Figure 1: (a) Two isomorphic family trees (b) An example of a situation in which the discriminative cost function in Eq. 1 causes the matrix RA produced by MRE to be far from the correct answer, B (see section 5). In an attempt to improve generalization, we tried constraining all of the 4 × 4 matrices by setting half of the elements of each matrix to zero so that they were each equivalent to two independent 2 × 2 matrices. Separate experiments showed that 2 × 2 matrices were sufficient for learning either the mod 3 or the mod 4 version of our modular arithmetic task, so the mod 12 version can clearly be done using a pair of 2 × 2 matrices for each number or relation. However, the gradient optimization gets stuck in poor local minima. 4 The standard family trees task The “standard” family trees task defined in [3] consists of the two family trees shown in figure 1(a) where the relations are {has husband, has wife, has son, has daughter, has father, has mother, has brother, has sister, has nephew, has niece, has uncle, has aunt}. Notice that for the last four relations there are people in the families in figure 1(a) for whom there are two different correct answers to the question (A,?) ∈R. When there are N correct answers, the best way to maximize the sum of the log probabilities of picking the correct answer on each of the N cases is to produce an output matrix that is equidistant from the N correct answers and far from all other answers. If the designated correct answer on such a case is not among the N closest, we treat that case as an error. If we count cases with two correct answers as two different cases the family trees task has 112 cases. We used precisely the same learning procedure and weight-decay as for the modular arithmetic task. We held-out 10, 20, or 30 randomly selected cases as test cases, and we repeated the random selection of the test cases five times. Table 2 shows the number of errors on the test cases when 4×4 matrices are learned for each person and for each relation. MRE generalizes much better than the Test results for the basic family trees task. errors on 5 test sets mean test error (10) 0 0 0 0 2 0.4 (20) 6 0 0 0 0 1.2 (30) 0 2 4 0 4 2.0 Table 2: Test results on the basic family trees task. Each entry shows the number of errors on the randomly held-out cases. There were no errors on the training set. The same randomly selected test sets were used for the 4 × 4 matrices. Each test query has 24 possible answers, of which at most 2 objects are considered correct. As there are 24 objects, random guessing is incorrect on at least 90% of the cases. feedforward neural network used by [3] which typically gets one or two test cases wrong even when only four test cases are held-out. It also generalizes much better than all of the many variations of the learning algorithms used by [8] for the family trees task. These variations cannot achieve zero test errors even when only four test cases are held-out and the cases are chosen to facilitate generalization. 5 The higher-order modular arithmetic task We used a version of the modular arithmetic task in which the only basic relations were {+0, +2, . . . , +11}, but we also included the higher-order relations plus, minus, inverse consisting of 36 propositions, examples of which are (3, +3) ∈plus; (3, +9) ∈minus; (+3, +9) ∈inverse. We then held-out all of the examples of one of the basic relations and trained 4 × 4 matrices on all of the other basic relations plus all of the higher-order relations. Our first attempt to demonstrate that MRE could generalize from higher-order relations to basic relations failed: the generalization was only slightly better than chance. The failure was caused by a counter-intuitive property of the discriminative objective function in Eq. 1 [9]. When learning the higher-order training case (3, +3) ∈plus it is not necessary for the product of the matrix representing 3 and the matrix representing plus to be exactly equal to the matrix representing +3. The product only needs to be closer to +3 than to any of the other matrices. In cases like the one shown in figure 1(b), the relative probability of the point B under a Gaussian centered at RA is increased by moving RA up, because this lowers the unnormalized probabilities of C and D by a greater proportion than it lowers the unnormalized probability of B. The discriminative objective function prevents all of the representations collapsing to the same point, but it does not force the matrix products to be exactly equal to the correct answer. As a result, the representation of +3 produced by the product of 3 and plus does not work properly when it is applied to a number. To overcome this problem, we modified the cost function for training the higher-order relations so that it is minimized when ˜RA is exactly equal to B C = X ˜ R∈˜ R X (A,B)∈˜ R ∥˜RA −B∥2, (2) where ˜R ranges over ˜R, the set of all higher-order relations, and A and B can be either relations or basic objects, depending on ˜R’s domain. Even when using this non-discriminative cost function for training the higher-order relations, the matrices could not all collapse to zero because the discriminative cost function was still being used for training the basic relations. With this modification, the training caused the product of 3 and plus to be very close to +3 and, as a result, there was often good generalization to basic relations even when all of the basic relations involving +3 were removed from MRE’s training data and all it was told about +3 was that (3, +3) ∈plus, (9, +3) ∈minus, and (+9, +3) ∈inverse (see table 3). Test results for higher-order arithmetic task. errors on 5 test sets mean test error +1 (12) 5 0 0 0 0 1.0 +4 (12) 0 0 6 6 1 2.6 +6 (12) 0 6 4 4 0 2.8 +10 (12) 3 8 0 0 7 3.6 Table 3: Test results on the higher-order arithmetic task. Each row shows the number of incorrectly answered queries involving a relation (i.e., +1, +4, +6, or +10) all of whose basic examples were removed from MRE’s training data, so MRE’s knowledge of this relation was entirely from the other higher-order relations. Learning was performed 5 times starting from different initial random parameters. There were no errors on the training set for any of the runs. The number of test cases is written in brackets. Test results for the higher-order family trees task. errors on 5 test sets mean test error has father (12) 0 12 0 0 0 2.4 has aunt (8) 4 8 4 0 4 4.0 has sister (6) 2 0 0 0 0 0.4 has nephew (8) 0 0 8 0 0 1.6 Table 4: Test results for the higher-order family trees task. In each row, all basic propositions involving a relation are held-out (i.e., has father, has aunt, has sister, or has nephew). Each row shows the number of errors MRE makes on these held-out propositions on 5 different learning runs from different initial random parameters. The only information MRE has on these relations is in the form of a single higher-order relation, higher oppsex. There were no errors on the training sets for any of the runs. The number of held-out cases is written in brackets. 6 The higher-order family trees task To demonstrate that similar performance is obtained on family trees task when higher-order relations are used, we included in addition to the 112 basic relations the higher-order relation higher oppsex. To define higher oppsex we observe that many relations have natural male and natural female versions, as in: mother-father, nephew-niece, uncle-aunt, brother-sister, husband-wife, and sondaughter. We say that (A, B) ∈higher oppsex for relations A and B if A and B can be seen as natural counterparts in this sense. Four of the twelve examples of higher oppsex are given below: 1. (has father, has mother) ∈higher oppsex 2. (has mother, has father) ∈higher oppsex 3. (has brother, has sister) ∈higher oppsex 4. (has sister, has brother) ∈higher oppsex We performed an analogous test to that in the previous section on the higher order modular arithmetic task, using exactly the same learning procedure and learning parameters. For the results, see table 4. The family trees task and its higher-order variant may appear difficult for systems such as MRE or LRE because of the logical nature of the task, which is made apparent by hard rules such as (A, B) ∈ has father, (A, C) ∈has brother ⇒(C, B) ∈has father. However, MRE does not perform any explicit logical deduction based on explicitly inferred rules, as would be done in an Inductive Logic Programming system (e.g., [7]). Instead, it “precomputes the answers” to all queries during training, by finding the matrix representation that models its training set. Once the representation is found, many correct facts become “self-evident” and do not require explicit derivation. Humans may be using a somewhat analogous mechanism (thought not necessarily one with matrix multiplications), since when mastering a new and complicated set of concepts, some humans start by relying heavily on relatively explicit reasoning using the definitions. With experience, however, many nontrivial correct facts may become intuitive to such an extent that experts can make true conjectures whose explicit derivation would be long and difficult. New theorems are easily discovered when the representations of all the concepts make the new theorem intuitive and self-evident. The sequential higher-order arithmetic task. errors on 5 test sets mean test error +1 (12) 0 0 0 2 4 1.2 +4 (12) 10 8 8 0 3 5.8 +6 (12) 0 0 4 9 0 2.6 +10 (12) 0 4 8 0 10 4.4 The sequential higher-order family trees task. errors on 5 test sets mean test error has father (12) 0 0 0 10 0 2.0 has aunt (8) 0 0 0 8 0 1.6 has sister (6) 0 0 0 0 0 0.0 has nephew (8) 0 0 0 0 0 0.0 Table 5: Test results for the higher-order arithmetic task (top) and the higher-order family trees task (bottom) when a held-out basic relation is learned from higher-order propositions after the rest of the objects and relations have been learned and fixed. There were no errors on the training propositions. Each entry shows the number of test errors, and the number of test cases is written in brackets. Figure 2: A neural network that is equivalent to Matrix Relational Embedding (see text for details). This is analogous to the idea that humans can avoid a lot of explicit search when playing chess by “compiling” the results of previous searches into a more complex evaluation function that uses features which make the value of a position immediately obvious. This does not mean that MRE can deal with general logical data of this kind, because MRE will fail when there are many relations that have many special cases. The special cases will prevent MRE from finding low dimensional matrices that fit the data well and cause it to generalize much more poorly. 7 Adding knowledge incrementally The previous section shows that MRE can learn to apply a basic relation correctly even though the training set only contains higher-order propositions about the relation. We now show that this can be achieved incrementally. After learning some objects, basic relations, and higher-order relations, we freeze the weights in all of the matrices and learn the matrix for a new relation from a few higherorder propositions. Table 5 shows that this works about as well as learning all of the propositions at the same time. 8 An equivalent neural network Consider the neural network shown in Figure 2. The input vectors R and A represent a relation and an object using a one-of-N encoding. If the outgoing weights from the two active input units are set to R and A, these localist representations are converted into activity patterns in the first hidden layer that represent the matrices R and A. The central part of the network consists of “sigma-pi” units [12], all of whose incoming and outgoing connections have fixed weights of 1. The sigma-pi units perform a matrix multiplication by first taking the products of pairs of activities in the first hidden layer and then summing the appropriate subsets of these products. As a result, the activities in the next layer represent the matrix RA. The output layer uses a “softmax” function to compute the probability of each possible answer and we now show that if the weights and biases of the output units are set correctly, this is equivalent to picking answers with a probability that is proportional to their probability density under a spherical Gaussian centered at RA. Consider a particular output unit that represents the answer B. If the weights into this unit are set to 2B and its bias is set to −∥B∥2, the total input to this unit will be: Total input = −∥B∥2 + 2 X ij (RA)ijBij (3) The probability that the softmax assigns to B will therefore be: p(B|A, R) = e −∥B∥2+2P ij(RA)ijBij P C e −∥C∥2+2P ij(RA)ijCij = e −∥B∥2+2P ij(RA)ijBij−∥RA∥2 P C e −∥C∥2+2P ij(RA)ijCij−∥RA∥2 = e−∥RA−B∥2 P C e−∥RA−C∥2 (4) Maximizing the log probability of p(B|R, A) is therefore equivalent to minimizing the cost function given in Eq. 1. The fact that MRE generalizes much better than a standard feedforward neural network on the family trees task is due to two features. First, it uses the same representational scheme (i.e., the same matrices) for the inputs and the outputs, which the standard net does not; a similar representational scheme was used in [1] to accurately model natural language. Second, it uses “sigma-pi” units that facilitate multiplicative interactions between representations. It is always possible to approximate such interactions in a standard feedforward network, but it is often much better to build them into the model [13, 5, 11]. Acknowledgments We would like to thank Alberto Paccanaro and Dafna Shahaf for helpful discussions. This research was supported by NSERC and CFI. GEH holds a Canada Research Chair in Machine Learning and is a fellow of the Canadian Institute for Advanced Research. References [1] Y. Bengio, R. Ducharme, P. Vincent, and C. Janvin. A neural probabilistic language model. The Journal of Machine Learning Research, 3:1137–1155, 2003. [2] L.A.A. Doumas, J.E. Hummel, and C.M. Sandhofer. A Theory of the Discovery and Predication of Relational Concepts. psychological Review, 115(1):1, 2008. [3] G.E. Hinton. Learning distributed representations of concepts. Proceedings of the Eighth Annual Conference of the Cognitive Science Society, pages 1–12, 1986. [4] J.E. Hummel and K.J. Holyoak. A Symbolic-Connectionist Theory of Relational Inference and Generalization. Psychological Review, 110(2):220–264, 2003. [5] R. Memisevic and G.E. Hinton. Unsupervised learning of image transformations. Proceedings of IEEE Conference on Computer Vision and Pattern Recognition, 2007. [6] T.M. Mitchell. The need for biases in learning generalizations. Readings in Machine Learning. Morgan Kaufmann, 1991. [7] S. Muggleton and L. De Raedt. Inductive logic programming: Theory and methods. Journal of Logic Programming, 19(20):629–679, 1994. [8] R.C. O’Reilly. The LEABRA Model of Neural Interactions and Learning in the Neocortex. PhD thesis, Carnegie Mellon University, 1996. [9] A. Paccanaro. Learning Distributed Representations of Relational Data Using Linear Relational Embedding. PhD thesis, University of Toronto, 2002. [10] A. Paccanaro and G. Hinton. Learning Distributed Representations of Concepts using Linear Relational Embedding. IEEE Transactions on Knowledge and Data Engineering, 13(2):232–245, 2001. [11] R.P.N. Rao and D.H. Ballard. Development of localized oriented receptive fields by learning a translationinvariant code for natural images. Network: Computation in Neural Systems, 9(2):219–234, 1998. [12] D.E. Rumelhart, G.E. Hinton, and J.L. McClelland. A general framework for parallel distributed processing. Mit Press Computational Models Of Cognition And Perception Series, pages 45–76, 1986. [13] J.B. Tenenbaum and W.T. Freeman. Separating Style and Content with Bilinear Models. Neural Computation, 12(6):1247–1283, 2000.
2008
195
3,448
Psychiatry: insights into depression through normative decision-making models Quentin JM Huys1,2,∗Joshua T Vogelstein3,∗and Peter Dayan2,∗ 1Center for Theoretical Neuroscience, Columbia University, New York, NY 10032, USA 2Gatsby Computational Neuroscience Unit, University College London, London, WC1N 3AR, UK 3Johns Hopkins School of Medicine, Baltimore MD 21231, USA Abstract Decision making lies at the very heart of many psychiatric diseases. It is also a central theoretical concern in a wide variety of fields and has undergone detailed, in-depth, analyses. We take as an example Major Depressive Disorder (MDD), applying insights from a Bayesian reinforcement learning framework. We focus on anhedonia and helplessness. Helplessness—a core element in the conceptualizations of MDD that has lead to major advances in its treatment, pharmacological and neurobiological understanding—is formalized as a simple prior over the outcome entropy of actions in uncertain environments. Anhedonia, which is an equally fundamental aspect of the disease, is related to the effective reward size. These formulations allow for the design of specific tasks to measure anhedonia and helplessness behaviorally. We show that these behavioral measures capture explicit, questionnaire-based cognitions. We also provide evidence that these tasks may allow classification of subjects into healthy and MDD groups based purely on a behavioural measure and avoiding any verbal reports. There are strong ties between decision making and psychiatry, with maladaptive decisions and behaviors being very prominent in people with psychiatric disorders. Depression is classically seen as following life events such as divorces and job losses. Longitudinal studies, however, have revealed that a significant fraction of the stressors associated with depression do in fact follow MDD onset, and that they are likely due to maladaptive behaviors prominent in MDD (Kendler et al., 1999). Clinically effective ’talking’ therapies for MDD such as cognitive and dialectical behavior therapies (DeRubeis et al., 1999; Bortolotti et al., 2008; Gotlib and Hammen, 2002; Power, 2005) explicitly concentrate on altering patients’ maladaptive behaviors and decision making processes. Decision making is a promising avenue into psychiatry for at least two more reasons. First, it offers powerful analytical tools. Control problems related to decision making are prevalent in a huge diversity of fields, ranging from ecology to economics, computer science and engineering. These fields have produced well-founded and thoroughly characterized frameworks within which many issues in decision making can be framed. Here, we will focus on framing issues identified in psychiatric settings within a normative decision making framework. Its second major strength comes from its relationship to neurobiology, and particularly those neuromodulatory systems which are powerfully affected by all major clinically effective pharmacotherapies in psychiatry. The understanding of these systems has benefited significantly from theoretical accounts of optimal control such as reinforcement learning (Montague et al., 1996; Kapur and Remington, 1996; Smith et al., 1999; Yu and Dayan, 2005; Dayan and Yu, 2006). Such accounts may be useful to identify in more specific terms the roles of the neuromodulators in psychiatry (Smith et al., 2004; Williams and Dayan, 2005; Moutoussis et al., 2008; Dayan and Huys, 2008). ∗qhuys@cantab.net, joshuav@jhu.edu, dayan@gatsby.ucl.ac.uk; www.gatsby.ucl.ac.uk/∼qhuys/pub.html 1 Yoked Control Master Figure 1: The learned helplessness (LH) paradigm. Three sets of rats are used in a sequence of two tasks. In the first task, rats are exposed to escapable or inescapable shocks. Shocks come on at random times. The master rat is given escapable shocks: it can switch off the shock by performing an action, usually turning a wheel mounted in front of it. The yoked rat is exposed to precisely the same shocks as the master rat, i.e its shocks are terminated when the master rat terminates the shock. Thus its shocks are inescapable, there is nothing it can do itself to terminate them. A third set of rats is not exposed to shocks. Then, all three sets of rats are exposed to a shuttlebox escape task. Shocks again come on at random times, and rats have to shuttle to the other side of the box to terminate the shock. Only yoked rats fail to acquire the escape response. Yoked rats generally fail to acquire a wide variety of instrumental behaviours, either determined by reward or, as here, by punishment contingencies. This paper represents an initial attempt at validating this approach experimentally. We will frame core notions of MDD in a reinforcement learning framework and use it to design behavioral decision making experiments. More specifically, we will concentrate on two concepts central to current thinking about MDD: anhedonia and learned helplessness (LH, Maier and Seligman 1976; Maier and Watkins 2005). We formulate helplessness parametrically as prior beliefs on aspects of decision trees, and anhedonia as the effective reward size. This allows us to use choice behavior to infer the degree to which subjects’ behavioral choices are characterized by either of these. For validation, we correlate the parameters inferred from subjects’ behavior with standard, questionnaire-based measures of hopelessness and anhedonia, and finally use the inferred parameters alone to attempt to recover the diagnostic classification. 1 Core concepts: helplessness and anhedonia The basic LH paradigm is explained in figure 1. Its importance is manifold: the effect of inescapable shock on subsequent learning is sensitive to most classes of clinically effective antidepressants; it has arguably been a motivation framework for the development of the main talking therapies for depression (cognitive behavioural therapy, Williams (1992), it has motivated the development of further, yet more specific animal models (Willner, 1997), and it has been the basis of very specific research into the cognitive basis of depression (Peterson et al., 1993). Behavioral control is the central concept in LH: yoked and master rat do not differ in terms of the amount of shock (stress) they have experienced, only in terms of the behavioural control over it. It is not a standard notion in reinforcement learning, and there are several ways one could translate the concept into RL terms. At a simple level, there is intuitively more behavioural control if, when repeating one action, the same outcome occurs again and again, than if this were not true. Thus, at a very first level, control might be related to the outcome entropy of actions (see Maier and Seligman 1976 for an early formulation). Of course, this is too simple. If all available actions deterministically led to the same outcome, the agent has very little control. Finally, if one were able to achieve all outcomes except for the one one cares about (in the rats’ case switching off or avoiding the shock), we would again not say that there is much control (see Huys (2007); Huys and Dayan (2007) for a more detailed discussion). Despite its obvious limitations, we will here concentrate on the simplest notion for reasons of mathematical expediency. 2 1 2 3 4 5 −1 −0.5 0 0.5 1 Tree depth Q(aknown)−Q(aunknown) Exploration vs Exploitation 1 2 3 4 5 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 Reward P(reward aknown) Predictive Distributions 1 2 3 4 5 0 2 High control Low control Choose blue slot machine Choose orange slot machine Figure 2: Effect of γ on predictions, Q-values and exploration behaviour. Assume a slot machine (blue) has been chosen five times, with possible rewards 1-5, and that reward 2 has been obtained twice, and reward 4 three times (inset in left panel). Left: Predictive distribution for a prior with negative γ (low control) in light gray, and large γ (extensive control) in dark gray. We see that, if the agent believes he has much control (and outcome distributions have low entropy), the predictive distribution puts all mass on the observations. Right: Assume now the agent gets up to 5 more pulls (tree depth 1-5) between the blue slot machine and a new, orange slot machine. The orange slot machine’s predictive distribution is flat as it has never been tried, and its expected value is therefore 3. The plot shows the difference between the values for the two slot machines. First consider the agent only has one more pull to take. In this case, independently of the priors about control, the agent will choose the blue machine, because it is just slightly better than average. Note though that the difference is more pronounced if the agent has a high control prior. But things change if the agent has two or more choices. Now, it is worth trying out the new machine if the agent has a high-control prior. For in that case, if the new machine turns out to yield a large reward on the first try, it is likely to do so again for the second and subsequent times. Thus, the prior about control determines the exploration bonus. The second central concept in current conceptions of MDD is that of reward sensitivity. Anhedonia, an inability to enjoy previously enjoyable things, is one of two symptoms necessary for the diagnosis of depression (American Psychiatric Association, 1994). A number of tasks in the literature have attempted to measure reward sensitivity behaviourally. While these generally concur in finding decreased reward sensitivity in subjects with MDD, these results need further clarification. Some studies show interactions between reward and punishment sensitivities with respect to MDD, but important aspects of the tasks are not clearly understood. For instance, Henriques et al. (1994); Henriques and Davidson (2000) show decreased resonsiveness of MDD subjects to rewards, but equally show decreased resonsiveness of healthy subjects to punishments. Pizzagalli et al. (2005) introduced an asymmetrically rewarded perceptual discrimination task and show that the rate of change of the response bias is anticorrelated with subjects’ anhedonic symptoms. Exactly how decreased reward responsivity can account for this is at pressent not clear. Great care has to be taken to disentangle these two concepts. Anhedonia and helplessness both provide good reasons for not taking an action: either because the reinforcements associated with the action are insufficient (anhedonia), or because the outcome is not judged a likely result of taking some particular action (if actions are thought to have large outcome entropy). 2 A Bayesian formulation of control We consider a scenario where subjects have no knowledge of the outcome distributions of actions, but rather learn about them. This means that their prior beliefs about the outcome distributions are not overwhelmed by the likelihood of observations, and may thus have measurable effects on their action choices. In terms of RL, this means that agents do not know the decision tree of the problem they face. Control is formulated as a prior distribution on the outcome distributions, and thereby as a prior distribution on the decision trees. The concentration parameter α of a Dirichlet process can very simply parametrise entropy, and, if used as a prior, allow for very efficient updates of the predictive distributions of actions. Let us assume we have actions A which have as outcomes rewards R, and keep count Nt(r, a) = 3 P k:k<t;ak=a δr,rk of the number of times a particular reward r ∈R was observed for each action a ∈A, where t is the number of times that action has been chosen, rt is the reward on the tth trial and δ is the Kronecker delta. The predictive distribution for action a is then P(r|Nt, a, α) = α α + Nt(a)B(r) + 1 α + Nt(a)Nt(r, a) (1) Here, B(r) is the base distribution, which we assume is flat, and Nt(a) = P r Nt(r, a) is the number of times action a was chosen up to trial t. Thus, the first time an action is chosen, we draw a sample from B(r). For α = 0, we then always draw that very same sample again. For α = ∞, we keep drawing from the same flat outcome distribution. Thus, α very simply determines the entropy of the actions’ outcome distribution. To match parametric values onto control more intuitively, let γ = −log(α) be the control parameter. The action choice problem is now to choose action a = argmaxa Q(a|N), where the Q values are defined by the Bellman equation of our problem: Qt(a|Nt, γ) = X r p(r|Nt, a, γ)[r + argmax a′ Qt(a′|Nt+1(r), γ)] (2) where Nt+1(r) is the count including the (anticipated) reward r. The effect of the parameter γ on Q values is illustrated in Figure 2. One can now infer the maximum likelihood (ML) parameters of the prior by writing the probability of the subject’s observed actions as a standard softmaxed version of the Q values: {ˆγ, ˆβ}ML = argmax γ,β Y t p(at|Nt, γ, β) (3) where p(at|Nt, γ, β) = exp(βQt(a|Nt, γ)) P a′ exp(βQt(a′|Nt, γ)) (4) where we have introduced a second parameter β, which is either the softmax inverse temperature, or, alternatively and equivalently, the size of the rewards (the maximum of R and β are not both inferable from action observations only). Simulations of the inference revealed that the parameters γ and β, our inferred reward sensitivity and prior on control, were correlated. To alleviate this problem, subjects were additionally given a reward sensitivity task which was interleaved with the control task (see below for the task descriptions). The structure of the reward sensitivity task is such that Q values are correctly defined by a RescorlaWagner (RW) learning rule: QRW t (a) = (1 −ǫ)QRW t−1 (a) + ǫrt (5) where QRW t (a) is the Q value of action a at choice t, ǫ is the learning rate, and actions probabilities again defined via softmax with a parameter β as in equation 4. Note, importantly, i) that this is not dependent on γ, the prior belief about control and ii) that unlike equation 2 above, this is a ’model-free’ algorithm that does not look ahead and thus does not take anticipated rewards into account). Combining inference in the two tasks (sharing β between them), allows us to use the reward sensitivity task as a prior on β for the control task and to eliminate the correlation. 2.1 Task and subjects Control task: The effects illustrated in figure 2 are easily elicited in a simple behavioral task. Subjects are told to imagine that they are in a large casino, and will be dropped randomly in each of 100 rooms. In each room, they will get to choose between slot machines. At first, they see only one slot machine, which they have to choose. Next, they get to choose between two slot machines. A new machine is presented whenever all machines on the screen have been tried. Thus, the exploratory drive is always maintained with one unexplored slot machine. Subjects get 8 choices per room, and thus get to try a maximum of 8 machines once in each room. Subjects are informed that outcomes for each slot machine are between 0 and 9 points. Overall, subjects are thus always kept in the dark about the true outcome distribution of any one slot machine. Thus, their prior beliefs become relevant. For healthy control subjects, one room was chosen randomly and the total number of points 4 0 2 4 6 8 0 0.2 0.4 0.6 0.8 1 Outcome obtained once P(repeat choice) 0.05 0.5 p MDD x outcome p=0.0029359 0 2 4 6 8 Outcome obtained twice MDD x outcome p=7.6434e−05 Figure 3: Repeat modulation. Bottom plots: Probability of choosing a slot machine again given that it has just yielded a particular outcome. Control subjects are in gray and MDD subjects in red (all individuals as dots, means ± 1 std. err. as bars; red dots on the right of bars, gray dots on the left of bars). Top plots: uncorrected p-values comparing the two groups for every individual outcome. Left panel: after observing a particular outcome once, Right panel: after observing the same outcome on a particular machine twice in a row. The p-values at the top indicate the ANOVA interaction of outcome size with group. Thus, we see here that subjects with MDD are more likely to stick with a bad machine, and more likely to move away from a good machine. The same result is observed when fitting sigmoids to each subject and comparing the inferred parameters (data not shown). earned in that room determined the payment (1 point = 1 US$, minimum 10US$, maximum 50US$). MDD subjects were given the same instructions, but, for ethical reasons, could not be paid. Reward sensitivity task: Subjects chose repeatedly (300 times) between two stacks of cards with probabilistic binary outcomes. The underlying probabilities of a reward changed as a (squashed) Ornstein-Uhlenbeck process. This task was thus accurately described by a standard RescorlaWagner (RW) rule (Daw et al., 2006). Questionnaire measures: Finally, each subject filled out two questionnaires: the Beck Helplessness Score (BHS), and the Beck Depression Inventory (BDI) which are standard questionnaire measures of hopelessness and anhedonia respectively. We extracted the anhedonic subcomponent, BDIa, as the sum of responses on questions 4, 12, 15 and 21 of the BDI. Subjects: We recruited 17 healthy control subjects from the community. 15 subjects with MDD were recruited as part of an ongoing treatment study, and asked to take the behavioural test while waiting to see the psychiatrists. All subjects were given a full Structured Clinical Interview for DSMIV (First et al., 2002a,b). All MDD subjects met criteria for a current major depressive episode. Three subjects had additionally a diagnosis of either Panic Disorder (2) or Bipolar Disorder II (1). All the healthy control subjects had neither a present psychiatric disorder, nor a history thereof. All procedures were approved by the New York State Institue of Psychiatry Institutional Review Board. The subjects were matched for sex and educational level, but not for age. We thus included age in our model formulations to exclude its effects as a nuisance variable. The depressed sample was older, but throughout, the effects of age correlate negatively with those of depression. 3 Results 3.1 Reward sensitivity Preliminary analysis: Repeat modulation, a very simple proxy measure of choices, provides a first glimpse at the effects of depression on the first task. Figure 3 shows the probability with which subjects chose a slot machine again after having received outcomes 0-9. As groups, MDD subjects both avoid bad and exploit good machines less. Nearly half the subjects with MDD show very little modulation with rewards. As a group, MDD subjects appear less sensitive to the reward structure in the first task. 5 Constant factor First−order term −4 −2 0 2 0 0.1 -0.1 ζβ ζε θβ θε Figure 4: ML inferred values for constant and relevant first-order factors. The green lines are the standard deviations around the ML value, and the red represent three times that. Thus, while BDI is related to the effective reward size β, it is not related to the learning rate ǫ. Note that here the effect of age has already been accounted for. −0.4 −0.2 0 First−order term −2 0 2 Constant factor ζγ1 ζγ2 ζβ χγ1 χγ2 θβ Figure 5: ML inferred values for the constant the relevant first-order factors as in the previous figure. The green lines are the standard deviation around the ML values and the red represent three times that. Thus, the effect of the BHS on control is captured by γ that of BDIa on reward sensitivity is captured by β as predicted. Reward sensitivity: The main hypothesis with respect to reward sensitivity is that subjects’ empirically observed reward sensitivity β in equation 5 is inversely related to their expressed anhedonia, BDIa, in the questionnaires. We can build this into the action choice model by parametrising β in the QRW value (equation 5) above explicitly as a function of the questionnaire anhedonia score BDIa: β(BDIa, AGE) = θβBDIa + cβAGE + ζβ If the hypothesis is true and subjects with higher BDIa scores do indeed care less about rewards, we should observe that θβ < 0. Here, we included a regressor for the AGE as that was a confounding variable in our subject sample. Furthermore, if it is true that anhedonia, as expressed by the questionnaire, relates to reward sensitivity specifically, we should be able to write a similar regression for the learning rate ǫ (from equation 5) ǫ(BDIa, AGE) = θǫBDIa + cǫAGE + ζǫ but find that θǫ is not different from zero. Figure 4 shows the ML values for the parameters of interest (emphasized in blue in the equations) and confirms that people who express higher levels of anhedonia do indeed show less reward sensitivity, but do not differ in terms of learning rate. If it were the case that subjects with higher BDIa score were just less attentive to the task, one might also expect an effect of BDIa on learning rate. 3.2 Control Validation: The control task is new, and we first need to ascertain that subjects were indeed sensitive to main features of the task. We thus fit both a RW-learning rule (as in the previous section, but adjusted for the varying number of available actions), and the full control model. Importantly, both these models have two parameters, but only the full control model has a notion of outcome entropy, and evaluations a tree. The chance probability of subjects’ actions was 0.37, meaning that, on average, there were just under three machines on the screen. The probability of the actions under the RW-learning rule was better at 0.48, and that of the full control model 0.54. These differences are highly significant as the total number of choices is 29600. Thus, we conclude that subjects were indeed sensitive to the manipulation of outcome entropy, and that they did look ahead in a tree. Prior belief about control: Applying the procedure from the previous task to the main task, we write the main parameters of equations 2 and 4 as functions of the questionnaire measures and infer linear parameters: γ1(BDIa, BHS, age) = χγ1BHS + θγ1BDIa + cγ1AGE + ζγ1 γ2(BDIa, BHS, age) = χγ2BHS + θγ2BDIa + cγ2AGE + ζγ2 β(BDIa, BHS, age) = χβBHS + θβBDIa + cβAGE + ζβ Importantly, because the BDIa scores and the BHS scores are correlated in our sample (they tend to be large for the subjects with MDD), we include the cross-terms (θγ1, θγ2, χγ), as we are interested in the specific effects of BDIa on β, as before, and of BHS on γ. 6 2 4 6 8 10 12 14 16 −2 −1 0 1 2 3 reward sensitivity β control γ 83% correct 69% sensitivity 94% specificity Figure 6: Classification. Controls are shown as black dots, and depressed subjects as red crosses. The blue line is a linear classifier. Thus, the patients and controls can be approximately classified purely on the basis of behaviour. We here infer and display two separate values γ1 and γ2. These correspond to the level of control in the first and the second half of the experiment. In fact, to parallel the LH experiments better, the slot machines in the first 50 rooms were actually very noisy (low true γ), which means that subjects were here exposed to low levels of control just like the yoked rats in the original experiment. In the second half of the experiment on the other hand, slot machines tended to be quite reliable (high true γ). Figure 5 shows again the ML values for the parameters of interest (emphasized in blue in the equations). Again, we find that our parameter estimate are very significantly different from zero (> three standard deviations). The effect of the BHS score on the prior beliefs about control γ is much stronger in the second half than of the experiment in the first half, i.e. the effect of BHS on the prior belief about control is particularly prominent when subjects are in a high-control environment and have previously been exposed to a low-control environment. This is an interesting parallel to the learned helplessness experiments in animals. 3.3 Classification Finally we combine the two tasks. We integrate out the learning rate ǫ, which we had found not be related to the questionnaire measures (c.f. figure 4), and use the distribution over β from the first task as a prior distribution on β for the second task. We also put weak priors on γ and infer both β and γ for the second task on a subject-by-subject basis. Figure 6 shows the posterior values for γ and β for MDD and healthy subjects and the ability of a linear classifier to classify them. 4 Discussion In this paper, we have attempted to provide a specific formulation of core psychiatric concepts in reinforcement learning terms, i.e. hopelessness as a prior belief about controllability, and anhedonia as reward sensitivity. We have briefly explained how we expect these formulations to have effect in a behavioural situation, have presented a behavioral task explicitly designed to be sensitive to our formulations, and shown that people’s verbal expression of hopelessness and anhedonia do have specific behavioral impacts. Subjects who express anhedonia display insensitivity to rewards and those expressing hopelessness behave as if they had prior beliefs that outcome distributions of actions (slot machines) are very broad. Finally, we have shown that these purely behavioural measures are also predictive of their psychiatric status, in that we were able to classify patients and healthy controls purely on the basis of performance. Several aspects of this work are novel. There have been previous attempts to map aspects of psychiatric dysfunction onto specific parametrizations (Cohen et al., 1996; Smith et al., 2004; Williams and Dayan, 2005; Moutoussis et al., 2008), but we believe that our work represents the first attempt to a) apply it to MDD; b) make formal predictions about subject behavior c) present strong evidence linking anhedonia specifically to reward insensitivity across two tasks d) combine tasks to tease helplessness and anhedonia apart and e) to use the behavioral inferences for classification. The latter point is particularly important, as it will determine any potential clinical significance (Veiel, 1997). In the future, rather than cross-validating with respect to say DSM-IV criteria, it may also be important to validate measures such as ours in their own right in longitudinal studies. 7 Several important caveats do remain. First, the populations are not fully matched for age. We included age as an additional regressor and found all results to be robust. Secondly, only the healthy subjects were remunerated. However, repeating the analyses presented using only the MDD subjects yields the same results (data not shown). Thirdly, we have not yet fully mirrored the LH experiments. We have so far only tested the transfer from a low-control environment to a high-control environment. To make statements like those in animal learned helplessness experiments, the transfer from high-control to low-control environments will need to be examined, too. Fourth, the notion of control we have used is very simple, and more complex notions should certainly be tested (see Dayan and Huys 2008). Fifth, and maybe most importantly, we have so far only attempted to classify MDD and healthy subjects, and can thus not yet make any statements about the specificity of these effects with respect to MDD. Finally, it will be important to replicate these results independently, and possibly in a different modality. Nevertheless, we believe these results to be very encouraging. Acknowledgments: This work would not have been possible without the help of Sarah Hollingsworth Lisanby, Kenneth Miller and Ramin V. Parsey. We would also like to thank Nathaniel Daw and Hanneke EM Den Ouden and Ren´e Hen for invaluable discussions. Support for this work was provided by the Gatsby Charitable Foundation (PD), a UCL Bogue Fellowship and the Swartz Foundation (QH) and a Columbia University startup grant to Kenneth Miller. References American Psychiatric Association (1994). Diagnostic and Statistical Manual of Mental Disorders. American Psychiatric Association Press. Bortolotti, B., Menchetti, M., Bellini, F., Montaguti, M. B., and Berardi, D. (2008). Psychological interventions for major depression in primary care: a meta-analytic review of randomized controlled trials. Gen Hosp Psychiatry, 30(4):293–302. Cohen, J. D., Braver, T. S., and O’Reilly, R. C. (1996). A computational approach to prefrontal cortex, cognitive control and schizophrenia: recent developments and current challenges. Philos Trans R Soc Lond B Biol Sci, 351(1346):1515–1527. Daw, N. D., O’Doherty, J. P., Dayan, P., Seymour, B., and Dolan, R. J. (2006). Cortical substrates for exploratory decisions in humans. Nature, 441(7095):876–879. Dayan, P. and Huys, Q. J. M. (2008). Serotonin, inhibition, and negative mood. PLoS Comput Biol, 4(2):e4. Dayan, P. and Yu, A. J. (2006). Phasic norepinephrine: a neural interrupt signal for unexpected events. Network, 17(4):335– 350. DeRubeis, R. J., Gelfand, L. A., Tang, T. Z., and Simons, A. D. (1999). Medications versus cognitive behavior therapy for severely depressed outpatients: mega-analysis of four randomized comparisons. Am J Psychiatry, 156(7):1007–1013. First, M. B., Spitzer, R. L., Gibbon, M., and Williams, J. B. (2002a). Structured Clinical Interview for DSM-IV-TR Axis I Disorders, Research Version, Non-Patient Edition. (SCID-I/NP). Biometrics Research, New York State Psychiatric Institute. First, M. B., Spitzer, R. L., Gibbon, M., and Williams, J. B. (2002b). Structured Clinical Interview for DSM-IV-TR Axis I Disorders, Research Version, Patient Edition. (SCID-I/P). Biometrics Research, New York State Psychiatric Institute. Gotlib, I. H. and Hammen, C. L., editors (2002). Handbook of Depression. The Guilford Press. Henriques, J. B. and Davidson, R. J. (2000). Decreased responsiveness to reward in depression. Cognition and Emotion, 14(5):711–24. Henriques, J. B., Glowacki, J. M., and Davidson, R. J. (1994). Reward fails to alter response bias in depression. J Abnorm Psychol, 103(3):460–6. Huys, Q. J. M. (2007). Reinforcers and control. Towards a computational ætiology of depression. PhD thesis, Gatsby Computational Neuroscience Unit, UCL, University of London. Huys, Q. J. M. and Dayan, P. (2007). A bayesian formulation of behavioral control. Under Review, 0:00. Kapur, S. and Remington, G. (1996). Serotonin-dopamine interaction and its relevance to schizophrenia. Am J Psychiatry, 153(4):466–76. Kendler, K. S., Karkowski, L. M., and Prescott, C. A. (1999). Causal relationship between stressful life events and the onset of major depression. Am. J. Psychiatry, 156:837–41. Maier, S. and Seligman, M. (1976). Learned Helplessness: Theory and Evidence. Journal of Experimental Psychology: General, 105(1):3–46. Maier, S. F. and Watkins, L. R. (2005). Stressor controllability and learned helplessness: the roles of the dorsal raphe nucleus, serotonin, and corticotropin-releasing factor. Neurosci. Biobehav. Rev., 29(4-5):829–41. Montague, P. R., Dayan, P., and Sejnowski, T. J. (1996). A framework for mesencephalic dopamine systems based on predictive hebbian learning. J. Neurosci., 16(5):1936–47. Moutoussis, M., Bentall, R. P., Williams, J., and Dayan, P. (2008). A temporal difference account of avoidance learning. Network, 19(2):137–160. Peterson, C., Maier, S. F., and Seligman, M. E. P. (1993). Learned Helplessness: A theory for the age of personal control. OUP, Oxford, UK. Pizzagalli, D. A., Jahn, A. L., and O’Shea, J. P. (2005). Toward an objective characterization of an anhedonic phenotype: a signal-detection approach. Biol Psychiatry, 57(4):319–327. Power, M., editor (2005). Mood Disorders: A Handbook of Science and Practice. John Wiley and Sons, paperback edition. Smith, A., Li, M., Becker, S., and Kapur, S. (2004). A model of antipsychotic action in conditioned avoidance: a computational approach. Neuropsychopharm., 29(6):1040–9. Smith, K. A., Morris, J. S., Friston, K. J., Cowen, P. J., and Dolan, R. J. (1999). Brain mechanisms associated with depressive relapse and associated cognitive impairment following acute tryptophan depletion. Br. J. Psychiatry, 174:525–9. Veiel, H. O. F. (1997). A preliminary profile of neuropsychological deficits associated with major depression. J. Clin. Exp. Neuropsychol., 19:587–603. Williams, J. and Dayan, P. (2005). Dopamine, learning, and impulsivity: a biological account of attentiondeficit/hyperactivity disorder. J Child Adolesc Psychopharmacol, 15(2):160–79; discussion 157–9. Williams, J. M. G. (1992). The psychological treatment of depression. Routledge. Willner, P. (1997). Validity, reliability and utility of the chronic mild stress model of depression: a 10-year review and evaluation. Psychopharm, 134:319–29. Yu, A. J. and Dayan, P. (2005). Uncertainty, neuromodulation, and attention. Neuron, 46(4):681–692. 8
2008
196
3,449
Characteristic Kernels on Groups and Semigroups Kenji Fukumizu Institute of Statistical Mathematics 4-6-7 Minami-Azabu, Minato-ku, Tokyo 106-8569 Japan fukumizu@ism.ac.jp Bharath Sriperumbudur Department of ECE, UC San Diego / MPI for Biological Cybernetics bharathsv@ucsd.edu Arthur Gretton MPI for Biological Cybernetics Spemannstraße 38, 72076 T¨ubingen, Germany arthur.gretton@tuebingen.mpg.de Bernhard Sch¨olkopf MPI for Biological Cybernetics bs@tuebingen.mpg.de Abstract Embeddings of random variables in reproducing kernel Hilbert spaces (RKHSs) may be used to conduct statistical inference based on higher order moments. For sufficiently rich (characteristic) RKHSs, each probability distribution has a unique embedding, allowing all statistical properties of the distribution to be taken into consideration. Necessary and sufficient conditions for an RKHS to be characteristic exist for Rn. In the present work, conditions are established for an RKHS to be characteristic on groups and semigroups. Illustrative examples are provided, including characteristic kernels on periodic domains, rotation matrices, and Rn +. 1 Introduction Recent studies have shown that mapping random variables into a suitable reproducing kernel Hilbert space (RKHS) gives a powerful and straightforward method of dealing with higher-order statistics of the variables. For sufficiently rich RKHSs, it becomes possible to test whether two samples are from the same distribution, using the difference in their RKHS mappings [8]; as well as testing independence and conditional independence [6, 9]. It is also useful to optimize over kernel mappings on distributions, for instance to find the most predictive subspace in regression [5], or for ICA [1]. Key to the above work is the notion of a characteristic kernel, as introduced in [5, 6]: it gives an RKHS for which probabilities have unique images (i.e., the mapping is injective). Such RKHSs are sufficiently rich in the sense required above. Universal kernels on compact metric spaces [16] are characteristic [8], as are Gaussian and Laplace kernels on Rn [6]. Recently, it has been shown [14] that a continuous shift-invariant R-valued positive definite kernel on Rn is characteristic if and only if the support of its Fourier transform is the entire Rn. This completely determines the set of characteristic ones in the convex cone of continuous shift-invariant positive definite kernels on Rn. One of the chief advantages of kernel methods is that they allow us to deal straightforwardly with complex domains, through use of a kernel function to determine the similarity between objects in these domains [13]. A question that naturally arises is whether characteristic kernels can be defined on spaces besides Rn. Several such domains constitute topological groups/semigroups, and our focus is on kernels defined by their algebraic structure. Broadly speaking, our approach is based on extensions of Fourier analysis to groups and semigroups, where we apply appropriate extensions of Bochner’s theorem to obtain the required conditions on the kernel. The most immediate generalization of the results in [14] is to locally compact Abelian groups, of which (Rn, +) is one example. Thus, in Section 2 we provide review of characteristic kernels on (Rn, +) from this viewpoint. In Section 3 we derive necessary and sufficient conditions for kernels 1 on locally compact Abelian groups to be characteristic. Besides (Rn, +), such groups include [0, 1]n with periodic boundary conditions [13, Section 4.4.4]. We next address non-Abelian compact groups in Section 4, for which we obtain a sufficient condition for a characteristic kernel. We illustrate with the example of SO(3), which describes rotations in R3, and is used in fields such as geophysics [10] and robotics [15]. Finally, in Section 5, we consider the Abelian semigroup (Rn +, +), where R+ = [0, ∞). This semigroup has many practical applications, including expressions of nonnegative measures or frequency on n points [3]. Note that in all cases, we provide specific examples of characteristic kernels to illustrate the properties required. 2 Preliminaries: Characteristic kernels and shift-invariant kernels Let X be a random variable taking values on a measurable space (Ω, B), and H be a RKHS defined by a measurable kernel k on Ωsuch that E[ p k(X, X)] < ∞. The mean element mX of X is defined by the element in H such that ⟨mX, f⟩H = E[f(X)] (∀f ∈H) (See [6, 7]). By plugging f = k(·, y) in the definition, the explicit functional form of mX is given by mX(y) = E[k(y, X)]. A bounded measurable kernel k on Ωis called characteristic if {P : probability on (Ω, B)} →H, P 7→mP = EX∼P [k(·, X)] (1) is injective ([5, 6]). Therefore, by definition, a characteristic kernel uniquely determines a probability by its mean element. This property is important in making inference on properties of distributions. It guarantees, for example, that MMD = ∥mX −mY ∥H is a (strict) distance on the space of probabilities on Ω[8]. The following result provides the necessary and sufficient condition for a kernel to be characteristic and shows its associated RKHS to be a rich function class. Lemma 1 ([7] Prop. 5). Let (Ω, B) be a measurable space, k be a bounded measurable positive definite kernel on Ω, and H be the associated RKHS. Then, k is characteristic if and only if H + R (direct sum of the two RKHS’s) is dense in L2(P) for every probability P on (Ω, B). The above lemma and Theorem 3 of [6] imply that characteristic kernels give a criterion of (conditional) independence through (conditional) covariance on RKHS, which enables statistical tests of independence with kernels [6]. This explains also the practical importance of characteristic kernels. The following result shows that the characteristic property is invariant under some conformal mappings introduced in [17] and provides a construction to generate new characteristic kernels. Lemma 2. Let Ωbe a topological space with Borel σ-field, k be a measurable positive definite kernel on Ωsuch that R Ωk(·, y)dµ(y) = 0 means µ = 0 for a finite Borel measure µ, and f : Ω→C be a bounded continuous function such that f(x) > 0 for all x ∈Ωand k(x, x)|f(x)|2 is bounded. Then, the kernel ˜k(x, y) = f(x)k(x, y)f(y) is characteristic. Proof. Let P and Q be Borel probabilities such that R ˜k(·, x)dP(x) = R ˜k(·, x)dQ(x). We have R k(·, x)f(x)d(P −Q)(x) = 0, which means fP = fQ. We have P = Q by the positivity and continuity of f. We will focus on spaces with algebraic structure for better description of characteristic kernels. Let G be a group. A function φ : G →C is called positive definite if k(x, y) = φ(y−1x) is a positive definite kernel. We call this type of positive definite kernels shift-invariant, because k(zx, zy) = φ((zy)−1zx) = φ(y−1x) = k(x, y) for any z ∈G. There are many examples of shift-invariant positive definite kernels on the additive group Rn: Gaussian RBF kernel k(x, y) = exp(−∥x−y∥2/σ2) and Laplacian kernel k(x, y) = exp(−β Pn i=1 |xi− yi|) are famous ones. In the case of Rn, the following Bochner’s theorem is well-known; Theorem 3 (Bochner). Let φ : Rn →C be a continuous function. φ is positive definite if and only if there is a unique finite non-negative Borel measure Λ on Rn such that φ(x) = Z Rn e √−1xT ωdΛ(ω). (2) Bochner’s theorem completely characterizes the set of continuous shift-invariant positive definite kernels on Rn by the Fourier transform. It also implies that the continuous positive definite functions form a convex cone with the extreme points given by the Fourier kernels {e √−1xT ω | ω ∈Rn}. 2 It is interesting to determine the class of continuous shift-invariant “characteristic” kernels on Rn. [14] gives a complete solution: if supp(Λ) = Rn,1 then φ(x −y) is characteristic. In addition, if a continuous positive definite function of the form in Eq. (2) is real-valued and characteristic, then supp(Λ) = Rn. The basic idea is the following: since the mean element EP [φ(y −X)] is equal to the convolution φ ∗P, the Fourier transform rewrites the definition of characteristic property as ( bP −bQ)Λ = 0 =⇒ P = Q, where b denotes the Fourier transform, and we use [ φ ∗P = Λ bP. Hence, it is natural to expect that if Λ is everywhere positive, then ( bP −bQ) must be zero, which means P = Q. We will extend these results to more general algebraic objects, such as groups and semigroups, on which Fourier analysis and Bochner’s theorem can be extended. 3 Characteristic kernels on locally compact Abelian groups It is known that most of the results on Fourier analysis for Rn are extended to any locally compact Abelian (LCA) group, which is an Abelian (i.e. commutative) topological group with the topology Hausdorff and locally compact. The basic terminologies are provided in the supplementary material for readers who are not familiar to them. The group operation is denoted by “+” in Abelian cases. Hereafter, for a LCA group G, we consider only the probability measures included in the set of finite regular measures M(G) (see Supplements) to discuss characteristic property. This slightly restricts the class of measures, but removes only pathological ones. 3.1 Fourier analysis on LCA Group We briefly summarize necessary results to show our main theorems. For the details, see [12, 11]. For a LCA group G, there exists a non-negative regular measure m on G such that m(E + x) = m(E) for every x ∈G and every Borel set E in G. This measure is called Haar measure. We use dx to denote the Haar measure of G. With the Haar measure, the integral is shift-invariant, that is, Z G f(x + y)dx = Z G f(x)dx (∀y ∈G). The space of Lp(G, dx) is simply denoted by Lp(G). A function γ : G →C is called a character of G if γ(x+y) = γ(x)γ(y) and |γ(x)| = 1. The set of all continuous characters of G forms an Abelian group with the operation (γ1γ2)(x) = γ1(x)γ2(x). By convention, the group operation is denoted by addition “+”, instead of multiplication; i.e., (γ1 + γ2)(x) = γ1(x)γ2(x). This group is called the dual group of G, and denoted by bG. For any x ∈G, the function ˆx on bG given by ˆx(γ) = γ(x) (γ ∈bG) defines a character of bG. It is known that bG is a LCA group if the weakest topology is introduced so that ˆx is continuous for each x ∈G. We can therefore consider the dual of bG, denoted by Gˆˆ, and the group homomorphism G →Gˆˆ, x 7→ˆx. The Pontryagin duality guarantees that this homomorphism is an isomorphism, and homeomorphism, thus Gˆˆcan be identified with G. In view of the duality, it is customary to write (x, γ) := γ(x). We have (−x, γ) = (x, −γ) = γ(x)−1 = (x, γ), where z is the complex conjugate of z. Let f ∈L1(G) and µ ∈M(G), the Fourier transform of f and µ are respectively defined by ˆf(γ) = Z G (−x, γ)f(x)dx, ˆµ(γ) = Z G (−x, γ)dµ(x), (γ ∈bG). (3) Let f ∈L∞(G), g ∈L1(G), and µ, ν ∈M(G). The convolutions are defined respectively by (g∗f)(x) = Z G f(x−y)g(y)dy, (µ∗f)(x) = Z G f(x−y)dµ(y), (µ∗ν)(E) = Z G χE(x+y)dµ(x)dν(y). 1For a finite regular measure, there is the largest open set U with µ(U) = 0. The complement of U is called the support of µ, and denoted by supp(µ). See the supplementary material for the detail. 3 g ∗f is uniformly continuous on G. For any f, g ∈L1(G) and µ, ν ∈M(G), we have the formula [ f ∗g = ˆfˆg, [ µ ∗f = bµ bf, [ µ ∗ν = bµbν. (4) The following facts are basic ( [12], Section 1.3). Proposition 4. For µ ∈M(G), the Fourier transform ˆµ is bounded and uniformly continuous. Theorem 5 (Uniqueness theorem). If µ ∈M(G) satisfies bµ = 0, then µ = 0. It is known that the dual group of the LCA group Rn is {e √−1ωT x | ω ∈Rn}, which can be identified with Rn. The above definition and properties of Fourier transform for LCA groups are extension of the ordinary Fourier transform for Rn. Bochner’s theorem can be also extended. Theorem 6 (Bochner’s theorem. e.g., [12] Section 1.4.3). A continuous function φ on G is positive definite if and only if there is a unique non-negative measure Λ ∈M( bG) such that φ(x) = Z bG (x, γ)dΛ(γ) (x ∈G). (5) 3.2 Shift-invariant characteristic kernels on LCA group Based on Bochner’s theorem, a sufficient condition of the characteristic property is obtained. Theorem 7. Let φ be a continuous positive definite function on a LCA group G given by Eq. (5) with Λ. If supp(Λ) = bG, then the positive definite kernel k(x, y) = φ(x −y) is characteristic. Proof. It suffices to prove that if µ ∈M(G) satisfies µ ∗φ = 0 then µ = 0. We have R G(µ ∗ φ)(x)dµ(x) = 0. On the other hand, by using Fubini’s theorem, R G(µ ∗φ)(x)dµ(x) = R G R Gφ(x −y)dµ(y)dµ(x) = R G R G R bG(x −y, γ)dΛ(γ)dµ(y)dµ(x) = R bG R G(x, γ)dµ(x) R G(−y, γ)dµ(y)dΛ(γ) = R bG |bµ(γ)|2dΛ(γ). Since bµ is continuous and supp(Λ) = bG, we have bµ = 0, which means µ = 0 by Theorem 5. In real-valued cases, the condition supp(Λ) = bG is almost necessary. Theorem 8. Let φ be a R-valued continuous positive definite function on a LCA group G given by Eq. (5) with Λ. The kernel φ(x −y) is characteristic if and only if (i) 0 ∈bG is not open and supp(Λ) = bG, or (ii) 0 ∈bG is open and supp(Λ) ⊃bG −{0}. The case (ii) occurs if G is compact. Proof. It suffices to prove the only if part. Assume k(x, y) = φ(x −y) is characteristic. It is obvious that k is characteristic if and only if so is k(x, y) + 1. Thus, we can assume 0 ∈supp(Λ). Suppose supp(Λ) ̸= bG. Since φ is real-valued, Λ(−E) = Λ(E) for every Borel set E. Thus U := bG\supp(Λ) is a non-empty open set, with −U = U, and 0 /∈U by assumption. Let γ0 ∈U and τ : bG × bG →bG, (γ1, γ2) 7→γ1 −γ2. Take an open neighborhood W of 0 in bG with compact closure such that W ⊂τ −1(U −γ0). Then, (W + (−W) + γ0) ∪(W + (−W) −γ0) ⊂U. Let g = χW ∗χ−W , where χE denotes the indicator function of a set E. g is continuous, and supp(g) ⊂cl(W + (−W)). Also, g is positive definite, since P i,jcicjg(xi − xj) = P i,j cicj R GχW (xi −xj −y)χ−W (y)dy = P i,j cicj R GχW (xi −y)χ−W (y −xj)dy = R G P iciχW (xi −y) P j cjχW (xj −y)  dy ≥0. By Bochner’s theorem and Pontryagin duality, there is a non-negative measure µ ∈M(G) such that g(γ) = R G(x, γ)dµ(x) (γ ∈bG). It follows that g(γ −γ0) + g(γ + γ0) = R G{(x, γ −γ0) + (x, γ + γ0)}dµ(x) = R G(x, γ)d((γ0 + γ0)µ)(x). Since supp(g) ⊂cl(W + (−W)), the left hand side is non-zero only in (W + (−W) + γ0) ∪(W + (−W) −γ0) ⊂U, which does not contain 0. Thus, by setting γ = 0, we have ((γ0 + γ0)µ)(G) = 0. (6) 4 The measure (γ0 + γ0)µ is real-valued, and non-zero since the function g(γ −γ0) + g(γ + γ0) is not constant zero. Let m = |(γ0 + γ0)µ|(G), and define the non-negative measures µ1 = |(γ0 + γ0)µ|/m, µ2 = {|(γ0 + γ0)µ| −(γ0 + γ0)µ}/m. Both of µ1 and µ2 are probability measures on G from Eq. (6), and µ1 ̸= µ2. From Fubini’s theorem, m × ((µ1 −µ2) ∗φ)(x) = R Gφ(x −y)(γ0(y) + γ0(y))dµ(y) = R bG(x, γ) R G {(y, γ −γ0) + (y, γ + γ0)}dµ(y)dΛ(γ) = R bG(x, γ){g(γ −γ0) + g(γ + γ0)}dΛ(γ) Since the integrand is zero in supp(Λ), we have (µ1 −µ2) ∗φ = 0, which derives contradiction. The last assertion is obvious, since bG is discrete if and only if G is compact [12, Sec. 1.7.3]. Theorems 7 and 8 are generalization of the results in [14]. From Theorem 8, we can see that the characteristic property is stable under the product for shift-invariant kernels. Corollary 9. Let φ1(x −y) and φ2(x −y) be R-valued continuous shift-invariant characteristic kernels on a LCA group G. If (i) G is non-compact, or (ii) G is compact and 2γ ̸= 0 for any nonzero γ ∈bG. Then (φ1φ2)(x −y) is characteristic. Proof. We show the proof only for (i). Let Λ1, Λ2 be the non-negative measures to give φ1 and φ2, respectively, in Eq. (5). By Theorem 8, supp(Λ1) = supp(Λ2) = bG. This means supp(Λ1 ∗Λ2) = bG. The proof is completed because Λ1 ∗Λ2 gives a positive definite function φ1φ2. Example 1. (Rn, +): As already shown in [6, 14], the Gaussian RBF kernel exp(−1 2σ2 ∥x −y∥2) and Laplacian kernel exp(−β Pn i=1 |xi −yi|) are characteristic on Rn. An example of a positive definite kernel that is not characteristic on Rn is sinc(x −y) = sin(x−y) x−y . Example 2. ([0, 2π), +): The addition is made modulo 2π. The dual group is {e √−1nx | n ∈Z}, which is isomorphic to Z. The Fourier transform is equal to the ordinary Fourier expansion. The following are examples of characteristic kernels given by the expression φ(x) = P∞ n=−∞ane √−1nx, a0 ≥0, an > 0 (n ̸= 0), P∞ n=0an < ∞. (1) a0 = π2/3, an = 2/n2 (n ̸= 0) ⇒ k1(x, y) = (π −(x −y)mod 2π)2. (2) a0 = 1/2, an = 1/(1 + n2) (n ̸= 0) ⇒ k2(x, y) = cosh(π −(x −y)mod 2π). (3) a0 = 0, an = αn/n (n ̸= 0), (|α| < 1) ⇒ k3(x, y) = −log(1 −2α cos(x −y) + α2). (4) an = α|n|, (0 < α < 1) ⇒ k4(x, y) = 1/(1 −2α cos(x −y) + α2) (Poisson kernel). Examples of non-characteristic kernels on [0, 2π) include cos(x −y), F´ejer, and Dirichlet kernel. 4 Characteristic kernels on compact groups We discuss non-Abelian cases in this section. Non-Abelian groups include various matrix groups, such as SO(3) = {A ∈M(3 × 3; R) | AT A = I3, detA = 1}, which represents rotations in R3. SO(3) is used in practice as the data space of rotational data, which popularly appear in many fields such as geophysics [10] and robotics [15]. Providing useful positive definite kernels on this class is important in those applications areas. First, we give a brief summary of known results on the Fourier analysis on locally compact and compact groups. See [11, 4] for the details. 4.1 Unitary representation and Fourier analysis Let G be a locally compact group, which may not be Abelian. A unitary representation (T, H) of G is a group homomorphism T into the group U(H) of unitary operators on some nonzero Hilbert space H, that is, a map T : G →U(H) that satisfies T(xy) = T(x)T(y) and T(x−1) = T(x)−1 = T(x)∗, and for which x 7→T(x)u is continuous from G to H for any u ∈H. For a unitary representation (T, H) on a locally compact group G, a subspace V in H is called Ginvariant if T(x)V ⊂V for every x ∈G. A unitary representation (T, H) is irreducible if there are 5 no closed G-invariant subspace except {0} and H. Unitary representations (T1, H1) and (T2, H2) are said to be equivalent if there is a unitary isomorphism A : H1 →H2 such that T1 = A−1T2A. The following facts are basic (e.g., [4], Section 3,1, 5.1). Theorem 10. (i) If G is a compact group, every irreducible unitary representation (T, H) of G is finite dimensional, that is, H is finite dimensional. (ii) If G is an Abelian group, every irreducible unitary representation of G is one dimensional. They are the continuous characters of G. It is possible to extend the Fourier analysis on locally compact non-Abelian groups. Unlike Abelian cases, the Fourier transform by the characters are not possible, but we need to consider unitary representations and operator-valued Fourier transform. Since extending the results of the LCA case to the general cases causes very complicated topology, we focus on compact groups. Also, for simplicity, we assume that G is second countable, i.e., there are countable open basis on G. We define bG to be the set of equivalent classes of irreducible unitary representations of a compact group G. The equivalence class of a unitary representation (T, HT ) is denoted by [T], and the dimensionality of HT by dT . We fix a representative T for every [T] ∈bG for all. It is known that on a compact group G there is a Haar measure m, which is a left and right invariant non-negative finite measure. We normalize it so that m(G) = 1 and denote it by dx. Let (T, HT ) be a unitary representation. For f ∈L1(G) and µ ∈M(G), the Fourier transform of f and µ are defined by the “operator-valued” functions on bG, bf(T) = Z G f(x)T(x−1)dx = Z G f(x)T(x)∗dx, bµ(T) = Z G T(x−1)dµ(x) = Z G T(x)∗dµ(x), respectively. These are operators on HT . This is a natural extension of the Fourier transform on LCA groups, where bG is the characters serving as the Fourier kernel in view of Theorem 10. We can define the “inverse Fourier transform”. Let AT ([T] ∈bG) be an operator on HT . The series P [T ]∈bGdT Tr[AT T(x)] (7) is said to be absolutely convergent if P [T ]∈bG dT Tr[|AT |] < ∞, where |A| = √ AT A. It is obvious that if the above series is absolutely convergent, the convergence is uniform on G. It is known that if G is second countable, bG is at most countable, thus the sum is taken over the countable set. Bochner’s theorem can be extended to compact groups as follows [11, Section 34.10]. Theorem 11. A continuous function φ on a compact group G is positive definite if and only if the Fourier transform bφ(T) is positive semidefinite, gives an absolutely convergent series Eq. (7), and φ(x) = P [T ]∈bGdT Tr[bφ(T)T(x)]. (8) The proof of “if” part is easy; in fact, P i,jcicjφ(x−1 j xi) = P i,jcicj P [T ]∈bGdT Tr[bφ(T)T(x−1 j xi)] = P i,jcicj P [T ]dT Tr[T(xi)bφ(T)T(xj)∗] = P [T ]dT Tr[ P iciT(xi) bφ(T) P jcjT(xj) ∗] ≥0. 4.2 Shift-invariant characteristic kernels on compact groups We have the following sufficient condition of characteristic property for compact groups. Theorem 12. Let φ be a positive definite function of the form Eq. (8) on a compact group G. If bφ(T) is strictly positive definite for every [T] ∈bG\{1}, the kernel φ(y−1x) is characteristic. Proof. Let P, Q ∈ M(G) be probabilities on G. Define µ = P −Q, and suppose R G φ(y−1x)dµ(y) = 0. If we take the integral over x with the measure µ, Fubini’s theorem shows 0 = R G R G P [T ]dT Tr[bφ(T)T(y−1x)]dµ(y)dµ(x) = P [T ]dT R G R GTr[T(x)bφ(T)T(y)∗]dµ(x)dµ(y) = P [T ]dT Tr[bµ(T)bφ(T)bµ(T)∗]. Since dT > 0 and bφ(T) is strictly positive, bµ(T) = 0 for every [T] ∈bG, that is, R G T(x)∗dµ(x) = O. If we fix an orthonormal basis of HT and express T(x) by the matrix elements Tij(x), we have R GTij(x)dµ(x) = 0 (∀[T] ∈bG, i, j = 1, . . . , dT ). 6 The Peter-Weyl Theorem (e.g., [4, Section 5.2]) shows that {√dT Tij(x) | [T] ∈ bG, i, j = 1, . . . , dT } is a complete orthonormal basis of L2(G), which means µ = 0. It is interesting to ask whether Theorem 8 can be extended to compact groups. The same proof does not apply, however, because application of Bochner’s theorem to a positive definite function on bG is not possible by the lack of duality. Example of SO(3). It is known that \ SO(3) consists of (Tn, Hn) (n = 0, 1, 2, . . .), where dTn = 2n + 1. We omit the explicit form of Tn, while it is known (e.g., [4], Section 5.4), but use the character defined by γn(x) = Tr[Tn(x)]. It is also known that γn is given by γn(A) = sin((2n + 1)θ) sin θ (n = 0, 1, 2, . . .), where e±√−1θ (0 ≤θ ≤π) are the eigenvalues of A, i.e., cos θ = 1 2Tr[A]. Since plugging bφ(Tn) = anIdTn in Eq. (8) derives anγn for each term, we see that a sequence {an}∞ n=0 such that a0 ≥0, an > 0 (n ≥1), and P∞ n=0 an(2n + 1)2 < ∞defines a characteristic positive definite kernel on SO(3) by k(A, B) = P∞ n=0(2n + 1)an sin((2n + 1)θ) sin θ (cos θ = 1 2Tr[B−1A], 0 ≤θ ≤π). Some examples are listed below (α is a parameter such that |α| < 1). (1) an = 1 (2n + 1)4 : k1(A, B) = 1 sin θ ∞ X n=0 sin((2n + 1)θ) (2n + 1)3 = πθ(π −θ) 8 sin θ . (2) an = α2n+1 (2n + 1)2 : k2(A, B) = ∞ X n=0 α2n+1 sin((2n + 1)θ) (2n + 1) sin θ = 1 2 sin θ arctan 2α sin θ 1 −α2  . 5 Characteristic kernels on the semigroup Rn + In this section, we consider kernels on an Abelian semigroup (S, +). In this case, a kernel based on the semigroup structure is defined by k(x, y) = φ(x + y). For an Abelian semigroup (S, +), a semicharacter is defined by a map ρ : S →C such that ρ(x + y) = ρ(x)ρ(y). While extensions of Bochner’s theorem are known for semigroups [2], the topology on the set of semicharacters are not as obvious as LCA groups, and the straightforward extension of the results in Section 3 is difficult. We focus only on the Abelian semigroup (Rn +, +), where R+ = [0, ∞). This semigroup has many practical applications of data analysis including expressions of nonnegative measures or frequency on n points [3]. For Rn +, it is easy to see the bounded continuous semicharacters are given by {Qn i=1 e−λix | λi ≥0 (i = 1, . . . , n)} [2, Section 4.4]. For Rn +, Laplace transform replaces Fourier transform to give Bochner’s theorem. Theorem 13 ([2], Section 4.4). Let φ be a bounded continuous function on Rn +. φ is positive definite if and only if there exists a unique non-negative measure Λ ∈M(Rn +) such that φ(x) = Z Rn + e−P n i=1 tixidΛ(t) (∀x ∈Rn +). (9) Based on the above theorem, we have the following sufficient condition of characteristic property. Theorem 14. Let φ be a positive definite function given by Eq. (9). If suppΛ = Rn +, then the positive definite kernel k(x, y) = φ(x + y) is characteristic. Proof. Let P and Q be probabilities on Rn +, and µ = P −Q. Define the Laplace transform by Lµ(t) = R Rn +e−P n i=1 tixidµ(x). It is easy to see Lµ is bounded and continuous on Rn +. Suppose R φ(x + y)dµ(y) = 0 for all x ∈Rn +. In exactly the same way as the proof of Theorem 7, we have LP = LQ. By the uniqueness part of Theorem 13, we conclude P = Q. 7 We show some examples of characteristic kernels on (Rn +, +). Let a = (ai)n i=1 and b = (bi)n i=1 (ai ≥0, bi ≥0) be non-negative measures on n points. (1) Λ = Qn i=1tν−1 i eλti (λ > 0) : k1(a, b) = Qn i=1(ai + bi + λ)−1. (2) Λ = t−3/2e−β2/(4t) (β > 0) : k2(a, b) = e−β P n i=1 √ai+bi. Since the proof of Theorem 14 shows R φ(x + y)dµ(y) = 0 means µ = 0 for µ ∈M(Rn +), Lemma 2 shows ˜k2(a, b) = exp  −β Pn i=1 p (ai + bi)/2 −(Pn i=1 √ai + Pn i=1 p bi)/2  is also characteristic. The exponent has the form h a+b 2  −h(a)+h(b) 2 with h(c) = Pn i=1 √ci, which compares the value of h of the merged measure (a + b)/2 and the average of h(a) and h(b). This type of kernel on non-negative measures is discussed in [3] in connection with semigroup structure. 6 Conclusions We have discussed conditions that kernels defined by the algebraic structure of groups and semigroups are characteristic. For locally compact Abelian groups, the continuous shift-invariant Rvalued characteristic kernels are completely determined by the Fourier inverse of positive measures with support equal to the entire dual group. For compact (non-Abelian) groups, we show a sufficient condition of continuous shift-invariant characteristic kernels in terms of the operator-valued Fourier transform. We show a condition for the semigroup Rn +. In the advanced theory of harmonic analysis, Bochner’s theorem and Fourier analysis can be extended to more general algebraic structure to some extent. It is interesting to consider generalization of the results in this paper to such general classes. In practical applications of machine learning, we are given a finite sample from a distribution, rather than the distribution itself. In this setting, it becomes important to choose the best possible kernel for inference on this sample. While the characteristic property gives a necessary requirement for RKHS embeddings of distributions to be distinguishable, it does not address optimal kernel choice at finite sample sizes. Theoretical approaches to this problem are the basis for future work. References [1] F. R. Bach and M. I. Jordan. Kernel independent component analysis. JMLR, 3:1–48, 2002. [2] C. Berg, J. P. R. Christensen, and P. Ressel. Harmonic Analysis on Semigroups. Springer, 1984. [3] M. Cuturi, K. Fukumizu, and J.-P. Vert. Semigroup kernels on measures. JMLR, 6:1169–1198, 2005. [4] B. B. Folland. A course in abstract harmonic analysis. CRC Press, 1995. [5] K. Fukumizu, F. R. Bach, and M. I. Jordan. Dimensionality reduction for supervised learning with reproducing kernel Hilbert spaces. JMLR, 5:73–99, 2004. [6] K. Fukumizu, A. Gretton, X. Sun, and B. Sch¨olkopf. Kernel measures of conditional dependence. Advances in NIPS 20, 489–496. MIT Press, 2008. [7] K. Fukumizu, F. R.Bach, and M. I. Jordan. Kernel dimension reduction in regression. The Annals of Statistics, 2009, in press. [8] A. Gretton, K. M. Borgwardt, M. Rasch, B. Sch¨olkopf, and A. Smola. A kernel method for the twosample-problem. Advances in NIPS 19. MIT Press, 2007. [9] A. Gretton, K. Fukumizu, C. H. Teo, L. Song, B. Sch¨olkopf, and A. Smola. A kernel statistical test of independence. Advances in NIPS 20, 585–592. MIT Press, 2008. [10] M. S. Hanna and T. Chang. Fitting smooth histories to rotation data. Journal of Multivariate Analysis, 75:47–61, 2000. [11] E. Hewitt and K. A. Ross. Abstract Harmonic Analysis II. 1970. [12] W. Rudin. Fourier Analysis on Groups. Interscience, 1962. [13] B. Sch¨olkopf and A.J. Smola. Learning with Kernels. MIT Press. 2002. [14] B. K. Sriperumbudur, A. Gretton, K. Fukumizu, G. Lanckriet, and B. Sch¨olkopf. Injective Hilbert space embeddings of probability measures. In Proc. COLT 2008, to appear, 2008. [15] O. Stavdahl, A. K. Bondhus, K. Y. Pettersen, and K. E. Malvig. Optimal statistical operators for 3dimensional rotational data: geometric interpretations and application to prosthesis kinematics. Robotica, 23(3):283–292, 2005. [16] I. Steinwart. On the influence of the kernel on the consistency of support vector machines. JMLR, 2:67– 93, 2001. [17] S. Wu and S-I. Amari. Conformal Transformation of Kernel Functions: A Data-Dependent Way to Improve Support Vector Machine Classifiers. Neural Process. Lett., 15(1):59–67, 2002. 8
2008
197
3,450
Multi-label Multiple Kernel Learning Shuiwang Ji Arizona State University Tempe, AZ 85287 shuiwang.ji@asu.edu Liang Sun Arizona State University Tempe, AZ 85287 sun.liang@asu.edu Rong Jin Michigan State University East Lansing, MI 48824 rongjin@cse.msu.edu Jieping Ye Arizona State University Tempe, AZ 85287 jieping.ye@asu.edu Abstract We present a multi-label multiple kernel learning (MKL) formulation in which the data are embedded into a low-dimensional space directed by the instancelabel correlations encoded into a hypergraph. We formulate the problem in the kernel-induced feature space and propose to learn the kernel matrix as a linear combination of a given collection of kernel matrices in the MKL framework. The proposed learning formulation leads to a non-smooth min-max problem, which can be cast into a semi-infinite linear program (SILP). We further propose an approximate formulation with a guaranteed error bound which involves an unconstrained convex optimization problem. In addition, we show that the objective function of the approximate formulation is differentiable with Lipschitz continuous gradient, and hence existing methods can be employed to compute the optimal solution efficiently. We apply the proposed formulation to the automated annotation of Drosophila gene expression pattern images, and promising results have been reported in comparison with representative algorithms. 1 Introduction Spectral graph-theoretic methods have been used widely in unsupervised and semi-supervised learning recently. In this paradigm, a weighted graph is constructed for the data set, where the nodes represent the data points and the edge weights characterize the relationships between vertices. The structural and spectral properties of graph can then be exploited to perform the learning task. One fundamental limitation of using traditional graphs for this task is that they can only represent pairwise relationships between data points, and hence higher-order information cannot be captured [1]. Hypergraphs [1, 2] generalize traditional graphs by allowing edges, called hyperedges, to connect more than two vertices, thereby being able to capture the relationships among multiple vertices. In this paper, we propose to use a hypergraph to capture the correlation information for multi-label learning [3]. In particular, we propose to construct a hypergraph for multi-label data in which all data points annotated with a common label are included in a hyperedge, thereby capturing the similarity among data points with a common label. By exploiting the spectral properties of the constructed hypergraph, we propose to embed the multi-label data into a lower-dimensional space in which data points with a common label tend to be close to each other. We formulate the multi-label learning problem in the kernel-induced feature space, and show that the well-known kernel canonical correlation analysis (KCCA) [4] is a special case of the proposed framework. As the kernel plays an essential role in the formulation, we propose to learn the kernel matrix as a linear combination of a given collection of kernel matrices in the multiple kernel learning (MKL) framework. The resulting formulation involves a non-smooth min-max problem, and we show that it can be cast into a semiinfinite linear program (SILP). To further improve the efficiency and reduce the non-smoothness effect of the SILP formulation, we propose an approximate formulation by introducing a smoothing term into the original problem. The resulting formulation is unconstrained and convex. In addition, the objective function of the approximate formulation is shown to be differentiable with Lipschitz continuous gradient. We can thus employ the Nesterov’s method [5, 6], which solves smooth convex problems with the optimal convergence rate, to compute the solution efficiently. We apply the proposed formulation to the automated annotation of Drosophila gene expression pattern images, which document the spatial and temporal dynamics of gene expression during Drosophila embryogenesis [7]. Comparative analysis of such images can potentially reveal new genetic interactions and yield insights into the complex regulatory networks governing embryonic development. To facilitate pattern comparison and searching, groups of images are annotated with a variable number of labels by human curators in the Berkeley Drosophila Genome Project (BDGP) high-throughput study [7]. However, the number of available images produced by high-throughput in situ hybridization is now rapidly increasing. It is therefore tempting to design computational methods to automate this task [8]. Since the labels are associated with groups of a variable number of images, we propose to extract invariant features from each image and construct kernels between groups of images by employing the vocabulary-guided pyramid match algorithm [9]. By applying various local descriptors, we obtain multiple kernel matrices and the proposed multi-label MKL formulation is applied to obtain an optimal kernel matrix for the low-dimensional embedding. Experimental results demonstrate the effectiveness of the kernel matrices obtained by the proposed formulation. Moreover, the approximate formulation is shown to yield similar results to the original formulation, while it is much more efficient. 2 Multi-label Learning with Hypergraph An essential issue in learning from multi-label data is how to exploit the correlation information among labels. We propose to capture such information through a hypergraph as described below. 2.1 Hypergraph Spectral Learning Hypergraphs generalize traditional graphs by allowing hyperedges to connect more than two vertices, thus capturing the joint relationships among multiple vertices. We propose to construct a hypergraph for multi-label data in which each data point is represented as a vertex. To document the joint similarity among data points annotated with a common label, we propose to construct a hyperedge for each label and include all data points annotated with a common label into one hyperedge. Following the spectral graph embedding theory [10], we propose to compute the low-dimensional embedding through a linear transformation W by solving the following optimization problem: min W tr W T φ(X)Lφ(X)T W  (1) subject to W T φ(X)φ(X)T + λI  W = I, where φ(X) = [φ(x1), · · · , φ(xn)] is the data matrix consisting of n data points in the feature space, φ is the feature mapping, L is the normalized Laplacian matrix derived from the hypergraph, and λ > 0 is the regularization parameter. In this formulation, the instance-label correlations are encoded into L through the hypergraph, and data points sharing a common label tend to be close to each other in the embedded space. It follows from the representer theorem [11] that W = φ(X)B for some matrix B ∈Rn×k where k is the number of labels. By noting that L = I −C for some matrix C, the problem in Eq. (1) can be reformulated as max B tr BT (KCK)B  (2) subject to BT (K2 + λK)B = I, where K = φ(X)T φ(X) is the kernel matrix. Kernel canonical correlation analysis (KCCA) [4] is a widely-used method for dimensionality reduction. It can be shown [4] that KCCA is obtained by substituting C = Y T (Y Y T )−1Y in Eq. (2) where Y ∈Rk×n is the label indicator matrix. Thus, KCCA is a special case of the proposed formulation. 2.2 A Semi-infinite Linear Program Formulation It follows from the theory of kernel methods [11] that the kernel K in Eq. (2) uniquely determines the feature mapping φ. Thus, kernel selection (learning) is one of the central issues in kernel methods. Following the MKL framework [12], we propose to learn an optimal kernel matrix by integrating multiple candidate kernel matrices, that is, K ∈K =   K = p X j=1 θjKj θT e = 1, θ ≥0   , (3) where {Kj}p j=1 are the p candidate kernel matrices, {θj}p j=1 are the weights for the linear combination, and e is the vector of all ones of length p. We have assumed in Eq. (3) that all the candidate kernel matrices are normalized to have a unit trace value. It has been shown [8] that the optimal weights maximizing the objective function in Eq. (2) can be obtained by solving a semi-infinite linear program (SILP) [13] in which a linear objective is optimized subject to an infinite number of linear constraints, as summarized in the following theorem: Theorem 2.1. Given a set of p kernel matrices {Kj}p j=1, the optimal kernel matrix in K that maximizes the objective function in Eq. (2) can be obtained by solving the following SILP problem: max θ,γ γ (4) subject to θ ≥0, θT e = 1, p X j=1 θjSj(Z) ≥γ, for all Z ∈Rn×k, (5) where Sj(Z), for j = 1, · · · , p, is defined as Sj(Z) = k X i=1 1 4zT i zi + 1 4λzT i Kjzi −zT i hi  , (6) Z = [z1, · · · , zk], H is obtained from C such that HHT = C, and H = [h1, · · · , hk]. Note that the matrix C is symmetric and positive semidefinite. Moreover, for the L considered in this paper, we have rank(C) = k. Hence, H ∈Rn×k is always well-defined. The SILP formulation in Theorem 2.1 can be solved by the column generation technique as in [14]. 3 The Approximate Formulation The multi-label kernel learning formulation proposed in Theorem 2.1 involves optimizing a linear objective subject to an infinite number of constraints. The column generation technique used to solve this problem adds constraints to the problem successively until all the constraints are satisfied. Since the convergence rate of this algorithm is slow, the problem solved at each iteration may involve a large number of constraints, and hence is computationally expensive. In this section, we propose an approximate formulation by introducing a smoothing term into the original problem. This results in an unconstrained and smooth convex problem. We propose to employ existing methods to solve the smooth convex optimization problem efficiently in the next section. By rewriting the formulation in Theorem 2.1 as max θ:θT e=1,θ≥0 min Z p X j=1 θjSj(Z) and exchanging the minimization and maximization, the SILP formulation can be expressed as min Z f(Z) (7) where f(Z) is defined as f(Z) = max θ:θT e=1,θ≥0 p X j=1 θjSj(Z). (8) The maximization problem in Eq. (8) with respect to θ leads to a non-smooth objective function for f(Z). To reduce this effect, we introduce a smoothing term and modify the objective to fµ(Z) as fµ(Z) = max θ:θT e=1,θ≥0    p X j=1 θjSj(Z) −µ p X j=1 θj log θj   , (9) where µ is a positive constant controlling the approximation. The following lemma shows that the problem in Eq. (9) can be solved analytically: Lemma 3.1. The optimization problem in Eq. (9) can be solved analytically, and the optimal value can be expressed as fµ(Z) = µ log   p X j=1 exp  1 µSj(Z)  . (10) Proof. Define the Lagrangian function for the optimization problem in Eq. (9) as L = p X j=1 θjSj(Z) −µ p X j=1 θj log θj + p X j=1 αjθj +   p X j=1 θj −1  β, (11) where {αj}p j=1 and β are Lagrangian dual variables. Taking the derivative of the Lagrangian function with respect to θj and setting it to zero, we obtain that θj = exp  1 µ (Sj(Z) + αj + β −µ)  . It follows from the complementarity condition that αjθj = 0 for j = 1, · · · , p. Since θj ̸= 0, we have αj = 0 for j = 1, · · · , p. By removing {αj}p j=1 and substituting θj into the objective function in Eq. (9), we obtain that fµ(Z) = µ −β. Since µ −β = Sj(Z) −µ log θj, we have θj = exp ((Sj(Z) −fµ(Z))/µ) . (12) Following 1 = Pp j=1 θj = Pp j=1 exp ((Sj(Z) −fµ(Z))/µ) , we obtain Eq. (10). The above discussion shows that we can approximate the original non-smooth constrained min-max problem in Eq. (7) by the following smooth unconstrained minimization problem: min Z fµ(Z), (13) where fµ(Z) is defined in Eq. (10). We show in the following two lemmas that the approximate formulation in Eq. (13) is convex and has a guaranteed approximation bound controlled by µ. Lemma 3.2. The problem in Eq. (13) is a convex optimization problem. Proof. The optimization problem in Eq. (13) can be expressed equivalently as min Z,{uj}p j=1,{vj}p j=1 µ log   p X j=1 exp uj + vj − k X i=1 zT i hi !  (14) subject to µuj ≥1 4 k X i=1 zT i zi, µvj ≥1 4λ k X i=1 zT i Kjzi, j = 1, · · · , p. Since the log-exponential-sumfunction is a convex function and the two constraints are second-order cone constraints, the problem in Eq. (13) is a convex optimization problem. Lemma 3.3. Let f(Z) and fµ(Z) be defined as above. Then we have fµ(Z) ≥f(Z) and |fµ(Z) − f(Z)| ≤µ log p. Proof. The term −Pp j=1 θj log θj defines the entropy of {θj}p j=1 when it is considered as a probability distribution, since θ ≥0 and θT e = 1. Hence, this term is non-negative and fµ(Z) ≥f(Z). It is known from the property of entropy that −Pp j=1 θj log θj is maximized with a uniform {θj}p j=1, i.e., θj = 1 p for j = 1, · · · , p. Thus, we have −Pp j=1 θj log θj ≤log p and |fµ(Z) −f(Z)| = −µ Pp j=1 θj log θj ≤µ log p. This completes the proof of the lemma. 4 Solving the Approximate Formulation Using the Nesterov’s Method The Nesterov’s method (known as “the optimal method” in [5]) is an algorithm for solving smooth convex problems with the optimal rate of convergence. In this method, the objective function needs to be differentiable with Lipschitz continuous gradient. In order to apply this method to solve the proposed approximate formulation, we first compute the Lipschitz constant for the gradient of function fµ(Z), as summarized in the following lemma: Lemma 4.1. Let fµ(Z) be defined as in Eq. (10). Then the Lipschitz constant L of the gradient of fµ(Z) can be bounded from above as L ≤Lµ, (15) where Lµ is defined as Lµ = 1 2 + 1 2λ max 1≤j≤p λmax(Kj) + 1 8µλ2 tr(ZT Z) max 1≤i,j≤p λmax((Ki −Kj)(Ki −Kj)T ), (16) and λmax(·) denotes the maximum eigenvalue. Moreover, the distance from the origin to the optimal set of Z can be bounded as tr(ZT Z) ≤R2 µ where R2 µ is defined as R2 µ = k X i=1 ||[Cj]i||2 + s 4µ log p + tr  CT j  I + 1 λKj  Cj !2 , (17) Cj = 2 I + 1 λKj −1 H and [Cj]i denotes the ith column of Cj. Proof. To compute the Lipschitz constant for the gradient of fµ(Z), we first compute the first and second order derivatives as follows: ▽fµ(Z) = p X j=1 gj vec(Z) 2 + vec(KjZ) 2λ  −vec(H), (18) ▽2fµ(Z) = 1 2I + p X j=1 gj 2λDk(Kj) + 1 8µ p X i,j=1 gigj vec(KiZ) λ −vec(KjZ) λ  vec(KiZ) λ −vec(KjZ) λ T , (19) where vec(·) converts a matrix into a vector, Dk(Kj) ∈R(n×k)×(n×k) is a block diagonal matrix with the kth diagonal block as Kj, and gj = exp(Sj(Z)/µ)/ Pp i=1 exp(Si(Z)/µ). Then we have L ≤1 2 + 1 2λ max 1≤j≤p λmax(Kj) + 1 8µλ2 max 1≤i,j≤p tr(ZT (Ki −Kj)(Ki −Kj)T Z) ≤Lµ. where Lµ is defined in Eq. (16). We next derive the upper bound for tr(ZT Z). To this end, we first rewrite Sj(Z) as Sj(Z) = 1 4tr  (Z −Cj)T  I + 1 λKj  (Z −Cj)  −1 4tr  CT j  I + 1 λKj  Cj  . Since min fµ(Z) ≤fµ(0) = µ log p, and fµ(Z) ≥Sj(Z), we have Sj(Z) ≤µ log p for j = 1, · · · , p. It follows that 1 4tr (Z −Cj)T (Z −Cj)  ≤µ log p + 1 4tr CT j  I + 1 λKj  Cj  . By using this inequality, it can be verified that tr(ZT Z) ≤R2 µ where R2 µ is defined in Eq. (17). The Nesterov’s method for solving the proposed approximate formulation is presented in Table 1. After the optimal Z is obtained from the Nesterov’s method, the optimal {θj}p j=1 can be computed from Eq. (12). It follows from the convergence proof in [5] that after N iterations, as long as fµ(Xi) ≤fµ(X0) for i = 1, · · · , N, we have fµ(ZN+1) −fµ(Z∗) ≤ 4LµR2 µ (N + 1)2 , (20) Table 1: The Nesterov’s method for solving the proposed multi-label MKL formulation. • Initialize X0 = Z1 = Q0 = 0 ∈Rn×k, t0 = 1, L0 = 1 2 + 1 2λ max1≤j≤p λmax(Kj), and µ = 1 N where N is the predefined number of iterations • for i = 1, · · · , N do • Set Xi = Zi − 1 ti−1 (Zi + Qi−1) • Compute fµ(Xi) and ▽fµ(Xi) • Set L = Li−1 • while fµ(Xi −▽fµ(Xi)/L) > fµ(Xi) − 1 2Ltr((▽fµ(Xi))T ▽fµ(Xi)) do • L = L × 2 • end while • Set Li = L • Set Zi+1 = Xi − 1 Li ▽fµ(Xi), Qi = Qi−1 + ti−1 Li ▽fµ(Xi) • Set ti = 1 2  1 + q 1 + 4t2 i−1  • end for where Z∗= arg minZ fµ(Z). Furthermore, since fµ(ZN+1) ≥f(ZN+1) and fµ(Z∗) ≤f(Z∗) + µ log p, we have f(ZN+1) −f(Z∗) ≤µ log p + 4LµR2 µ (N + 1)2 . (21) By setting µ = O(1/N), we have that Lµ ∝O(1/µ) ∝O(N). Hence, the convergence rate of the Nesterov’s method is on the order of O(1/N). This is significantly better than the convergence rates of O(1/N 1/3) and O(1/N 1/2) for the SILP and the gradient descent method, respectively. 5 Experiments In this section, we evaluate the proposed formulation on the automated annotation of gene expression pattern images. The performance of the approximate formulation is also validated. Experimental Setup The experiments use a collection of gene expression pattern images retrieved from the FlyExpress database (http://www.flyexpress.net). We apply nine local descriptors (SIFT, shape context, PCA-SIFT, spin image, steerable filters, differential invariants, complex filters, moment invariants, and cross correlation) on regular grids of 16 and 32 pixels in radius and spacing on each image. These local descriptors are commonly used in computer vision problems [15]. We also apply Gabor filters with different wavelet scales and filter orientations on each image to obtain global features of 384 and 2592 dimensions. Moreover, we sample the pixel values of each image to obtain features of 10240, 2560, and 640 dimensions. After generating the features, we apply the vocabulary-guided pyramid match algorithm [9] to construct kernels between the image sets. A total of 23 kernel matrices (2 grid size × 9 local descriptors + 2 Gabor + 3 pixel) are constructed. Then the proposed MKL formulation is employed to obtain the optimal integrated kernel matrix based on which the low-dimensional embedding is computed. We use the expansion-based approach (star and clique) to construct the hypergraph Laplacian, since it has been shown [1] that the Laplacians constructed in this way are similar to those obtained directly from a hypergraph. The performance of kernel matrices (either single or integrated) is evaluated by applying the support vector machine (SVM) for each term using the one-against-rest scheme. The F1 score is used as the performance measure, and both macro-averaged and micro-averaged F1 scores across labels are reported. In each case, the entire data set is randomly partitioned into training and test sets with a ratio of 1:1. This process is repeated ten times, and the averaged performance is reported. Performance Evaluation It can be observed from Tables 2 and 3 that in terms of both macro and micro F1 scores, the kernels integrated by either star or clique expansions achieve the highest performance on almost all of the data sets. In particular, the integrated kernels outperform the best individual kernel significantly on all data sets. This shows that the proposed formulation is effective Table 2: Performance of integrated kernels and the best individual kernel (denoted as BIK) in terms of macro F1 score. The number of terms used are 20, 30, and 40, and the number of image sets used are 1000, 1500, and 2000. “SILP”, “APP”, “SVM1”, and “Uniform” denote the performance of kernels combined with the SILP formulation, the approximate formulation, the 1-norm SVM formulation proposed in [12] applied for each label separately, and the case where all kernels are given the same weight, respectively. The subscripts “star” and “clique” denote the way that Laplacian is constructed, and “KCCA” denotes the case where C = Y T (Y Y T )−1Y . # of labels 20 30 40 # of sets 1000 1500 2000 1000 1500 2000 1000 1500 2000 SILPstar 0.4396 0.4903 0.4575 0.3852 0.4437 0.4162 0.3768 0.4019 0.3927 SILPclique 0.4536 0.5125 0.4926 0.4065 0.4747 0.4563 0.4145 0.4346 0.4283 SILPKCCA 0.3987 0.4635 0.4477 0.3497 0.4240 0.4063 0.3538 0.3872 0.3759 APPstar 0.4404 0.4930 0.4703 0.3896 0.4494 0.4267 0.3900 0.4100 0.3983 APPclique 0.4510 0.5125 0.4917 0.4060 0.4741 0.4563 0.4180 0.4338 0.4281 APPKCCA 0.4029 0.4805 0.4586 0.3571 0.4313 0.4146 0.3642 0.3914 0.3841 SVM1 0.3780 0.4640 0.4356 0.3523 0.4352 0.4200 0.3741 0.4048 0.3955 Uniform 0.3727 0.4703 0.4480 0.3513 0.4410 0.4191 0.3719 0.4111 0.3986 BIK 0.4241 0.4515 0.4344 0.3782 0.4312 0.3996 0.3914 0.3954 0.3827 Table 3: Performance in terms of micro F1 score. See the caption of Table 2 for explanations. # of labels 20 30 40 # of sets 1000 1500 2000 1000 1500 2000 1000 1500 2000 SILPstar 0.4861 0.5199 0.4847 0.4472 0.4837 0.4473 0.4277 0.4470 0.4305 SILPclique 0.5039 0.5422 0.5247 0.4682 0.5127 0.4894 0.4610 0.4796 0.4660 SILPKCCA 0.4581 0.4994 0.4887 0.4209 0.4737 0.4532 0.4095 0.4420 0.4271 APPstar 0.4852 0.5211 0.4973 0.4484 0.4875 0.4582 0.4355 0.4541 0.4346 APPclique 0.5013 0.5421 0.5239 0.4673 0.5124 0.4894 0.4633 0.4793 0.4658 APPKCCA 0.4612 0.5174 0.5018 0.4299 0.4828 0.4605 0.4194 0.4488 0.4350 SVM1 0.4361 0.5024 0.4844 0.4239 0.4844 0.4632 0.3947 0.4234 0.4188 Uniform 0.4390 0.5096 0.4975 0.4242 0.4939 0.4683 0.3999 0.4358 0.4226 BIK 0.4614 0.4735 0.4562 0.4189 0.4484 0.4178 0.3869 0.3905 0.3781 in combining multiple kernels and exploiting the complementary information contained in different kernels constructed from various features. Moreover, the proposed formulation based on a hypergraph outperforms the classical KCCA consistently. SILP versus the Approximate Formulation In terms of classification performance, we can observe from Tables 2 and 3 that the SILP and the approximate formulations are similar. More precisely, the approximate formulations perform slightly better than SILP in almost all cases. This may be due to the smoothness nature of the formulations and the simplicity of the computational procedure employed in the Nesterov’s method so that it is less prone to numerical problems. Figure 1 compares the computation time and the kernel weights of SILPstar and APPstar. It can be observed that in general the approximate formulation is significantly faster than SILP, especially when the number of labels and the number of image sets are large, while they both yields very similar kernel weights. 6 Conclusions and Future Work We present a multi-label learning formulation that incorporates instance-label correlations by a hypergraph. We formulate the problem in the kernel-induced feature space and propose to learn the kernel matrix in the MKL framework. The resulting formulation leads to a non-smooth min-max problem, and it can be cast as an SILP. We propose an approximate formulation by introducing a smoothing term and show that the resulting formulation is an unconstrained convex problem that can be solved by the Nesterov’s method. We demonstrate the effectiveness and efficiency of the method on the task of automated annotation of gene expression pattern images. 20(1000) 20(1500) 20(2000) 30(1000) 30(1500) 30(2000) 40(1000) 40(1500) 40(2000) 0 50 100 150 200 250 300 350 400 The number of labels and the number of image sets Computation time (in seconds) SILPstar APPstar 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 0 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 Kernel number Weight for kernels SILPstar APPstar (a) Comparison of computation time (b) Comparison of kernel weights Figure 1: Comparison of computation time and kernel weights for SILPstar and APPstar. The left panel plots the computation time of two formulations on one partition of the data set as the number of labels and image sets increase gradually, and the right panel plots the weights assigned to each of the 23 kernels by SILPstar and APPstar on a data set of 40 labels and 1000 image sets. The experiments in this paper focus on the annotation of gene expression pattern images. The proposed formulation can also be applied to the task of multiple object recognition in computer vision. We plan to pursue other applications in the future. Experimental results indicate that the best individual kernel may not lead to a large weight by the proposed MKL formulation. We plan to perform a detailed analysis of the weights in the future. Acknowledgements This work is supported in part by research grants from National Institutes of Health (HG002516 and 1R01-GM079688-01) and National Science Foundation (IIS-0612069 and IIS-0643494). References [1] S. Agarwal, K. Branson, and S. Belongie. Higher order learning with graphs. In ICML, pages 17–24, 2006. [2] D. Zhou, J. Huang, and B. Sch¨olkopf. Learning with hypergraphs: Clustering, classification, and embedding. In NIPS, pages 1601–1608. 2007. [3] Z. H. Zhou and M. L. Zhang. Multi-instance multi-label learning with application to scene classification. In NIPS, pages 1609–1616. 2007. [4] D. R. Hardoon, S. R. Szedmak, and J. R. Shawe-taylor. Canonical correlation analysis: An overview with application to learning methods. Neural Computation, 16(12):2639–2664, 2004. [5] Y. Nesterov. Introductory Lectures on Convex Optimization: A Basic Course. Springer, 2003. [6] Y. Nesterov. Smooth minimization of non-smooth functions. Mathematical Programming, 103(1):127– 152, 2005. [7] P. Tomancak and et al. Systematic determination of patterns of gene expression during Drosophila embryogenesis. Genome Biology, 3(12), 2002. [8] S. Ji, L. Sun, R. Jin, S. Kumar, and J. Ye. Automated annotation of Drosophila gene expression patterns using a controlled vocabulary. Bioinformatics, 24(17):1881–1888, 2008. [9] K. Grauman and T. Darrell. Approximate correspondences in high dimensions. In NIPS, pages 505–512. 2006. [10] F. R. K. Chung. Spectral Graph Theory. American Mathematical Society, 1997. [11] S. Sch¨olkopf and A. Smola. Learning with Kernels: Support Vector Machines,Regularization, Optimization and Beyond. MIT Press, 2002. [12] G. R. G. Lanckriet, N. Cristianini, P. Bartlett, L. E. Ghaoui, and M. I. Jordan. Learning the kernel matrix with semidefinite programming. Journal of Machine Learning Research, 5:27–72, 2004. [13] R. Hettich and K. O. Kortanek. Semi-infinite programming: Theory, methods, and applications. SIAM Review, 35(3):380–429, 1993. [14] 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. [15] K. Mikolajczyk and C. Schmid. A performance evaluation of local descriptors. IEEE Transactions on Pattern Analysis and Machine Intelligence, 27(10):1615–1630, 2005.
2008
198
3,451
Bio-inspired Real Time Sensory Map Realignment in a Robotic Barn Owl Juan Huo, Zhijun Yang and Alan Murray DTC, School of Informatics, Schoolf of Electronics & Engineering The University of Edinburgh Edinburgh, UK {J.Huo, Zhijun.Yang, Alan.Murray}@ed.ac.uk Abstract The visual and auditory map alignment in the Superior Colliculus (SC) of barn owl is important for its accurate localization for prey behavior. Prism learning or Blindness may interfere this alignment and cause loss of the capability of accurate prey. However, juvenile barn owl could recover its sensory map alignment by shifting its auditory map. The adaptation of this map alignment is believed based on activity dependent axon developing in Inferior Colliculus (IC). A model is built to explore this mechanism. In this model, axon growing process is instructed by an inhibitory network in SC while the strength of the inhibition adjusted by Spike Timing Dependent Plasticity (STDP). We test and analyze this mechanism by application of the neural structures involved in spatial localization in a robotic system. 1 Introduction Barn owl is a nocturnal predator with strong able auditory and visual localization system. During localization, the sensory stimuli are translated into neuron response, the visual and auditory maps are formed. In the deep Superior Colliculus (SC), visual and auditory information are integrated together. Normally, the object localization of visual map and auditory map are aligned with each other. But this alignment can be disrupted by wearing a prism or blindness [1, 2]. The juvenile barn owl is able to adapt so that it can foveates correctly on the source of auditory stimuli. A model based on the newest biological discoveries and account for a large amount of biological observations has been developed to explore the adaptation in map alignment [3]. This model is applied to a robotic system emulating the behavior of heading of the barn owl, so as to provide a real-time visual and auditory information integration and map realignment. It also provides a new mechanism for the hardware to mimic some of brain’s abilities, adapt to novel situation without instruction. 1.1 Biological Background Superior Colliculus (SC) gets different sensory inputs and it sends its outputs to effect behavior. As a hub of sensory information, SC neurons access the auditory stimuli from Inferior Colliculus (IC) [4, 1], which includes external Inferior Colliculus (ICx) and central Inferior Colliculus (ICc). ICx wraps around ICc. As revealed by anatomical and physiological experiments, the main site of map adaptation is in two areas, one is axon connection between ICc and ICx, the other area is an inhibitory network in SC. Large amounts of evidence has shown axon sprouting and retraction between ICc and ICx are guided by inhibitory network in SC during prism learning [5, 6, 7]. Axons do not extend spontaneously, 1 (a) (b) Figure 1: (a) The simulation environment. (b) The information projection between ICc, ICx and SC. they’re promoted by neurotrophin (one kind of nerve growth factor) release and electrical activity of the cell body [8]. The release of neurotrophin is triggered by guiding signal from SC. In this paper we call the guiding signal, Map Adaptation Cue (MAC), as shown in Fig. 1(b). In the inhibitory network, MAC is assumed to be introduced by inter neuron, which is plausible to be bimodal neuron [7]. Bimodal neuron can be potentiated by both visual input (from retina) and auditory input (from ICx). Its neuron response is obviously strenthened when visual and auditory input are correlated [9]. Previous work has pointed out Hebbian Learning plays a main role in sensory information integration on bimodal neuron [4]. This paper includes a closer representation of biological structure. 2 Neural spike train Neurons in nervous system process and transmit information by neural spikes. Sensory stimulus is coded by the spatiotemporal spike pattern before applied to the spiking neural network [10]. In this study, the input spike pattern was applied repeatedly and frequently, similar as the input stimuli. Spike patterns within which the fixed time intervals between spikes are set mannually, with two discrete values of mean firing rate, high and low. As the neuron response in visual map (retina layer) and auditory map (ICx layer) has a center surround profile, the receptive center has the highest firing rate, e.g. the ”mexican hat”, [11]. The spike patterns of visual center and auditory center, corresponding to a same target, are highly correlated with each other. Adjacent neurons respond with template spike trains of low firing rate. The spike patterns of center neuron and ajacent neuron are independent with each other. The remaining neurons have negligible activity. Another possilbe spike train generating method and its simulation result for this model can be found in paper [12]. 3 Neural Model The simulation is to emulate a virtual barn owl at the center of a fixed, head-centered reference system with the origin centered on the perch as in Fig. 1(a). Fig. 2(b) schematically illustrates the model, 4-layer (ICc, ICx, SC, retina), 10-pathway. Each pathway corresponds to 18◦in azimuth. The single pathway is composed of two basic sections shown in Fig. 2(a). Block I comprises the ICc, ICx and the axon connections that map between them. Block II is both the detector of any shift between visual and auditory cues and the controller of the ICx/ICc mapping in block I. The connection between ICc and ICx in block I is instructed by Map Adaptation Cue (MAC), which is generated by the inter neuron in block II. In block II, both bimodal and inter neurons in this model are Leaky Integrate-and-Fire (LIF) neuron (Equation 1). ge is the excitatory synaptic conductance, which is associated with excitatory reversal potential Vexc. Similarly, gi, the inhibitory conductance, is associated with inhibitory reversal 2 (a) (b) Figure 2: (a) Schematic of the auditory and visual signal processing pathway. (b) Schematic of the network. Each single pathway represents 18◦in azimuth. The visual stimulus arrives in the retina at N42, N22 receives the strongest MAC. The active growthcone from N13 is attracted by neurotrophin. The dashed line is the new connection built when the growthcone reaches its threshold. The old connection between N13 and N23 is thus eliminated due to lack of alignment between the auditory and visual stimuli. potential Vinh. gl is the membrane conductance, the membrane resistance in this case is given by Rm = 1/gl. When the membrane potential V (t) reaches the threshold value of about -50 to -55mV , V (t) is reset to a value Vreset [13]. In this model, Vreset is chosen to be equal to Vrest, the rest membrane potential, here Vrest = Vreset = −70mV . The other paprameters of the neuron model are as follows: Vexc = 0mV , Vinh = −70mV , τm = CmRm = 5ms. Cm dV (t) dt = −gl(V (t) −Vrest) −ge(V (t) −Vexc) −gi(V (t) −Vinh) (1) The synapses connecting the sensory signals with the bimodel neuron are excitatory while the synapse between bimodal neuron and inter neuron is inhibitory. The synaptic weight change in this model is mediated by Spike Timing Dependent Plasticity (STDP). STDP is a learning rule in which the synaptic weight is strengthened or weakened by the paired presynaptic spikes and postsynaptic spikes in a time window [14]. The whole network is shown in Fig. 2(b), neuron Nij indicates the neuron location in layer i and pathway j. The developing of axon growthcone is activated by presynaptic spikes from its source layer ICc (layer 1). The target layer ICx (layer 2) releases neurotrophin when it is excited by MAC spikes. The concentration of neurotrophin c2j is set to be linearly proportional to the total MAC induced synaptic activity, P2j, which sums the MAC spikes of ICx layer neurons. In Fig. 2(b), N2j(cen) is the ICx neuron that receives strongest stimulation from the visual signal, via the retina and SC. The concentrations of neurotrophin released by neurons N2j depend upon the distance between neuron N2j and N2j(cen), ∥N2j −N2j(cen)∥. c2j is contributed by all active release sites, however, this contribution decays with distance. To represent the effect of neighbouring neurons, a spreading kernel D(N2j −N2j(cen)) is used to weight P2j. D(N2j −N2j(cen)) is an exponential decay function with the decay variable ∥N2j −N2j(cen)∥. The concentration of neurotrophin also decays with time step . 3 c(N2j(cen)) = X N2j P(N2j)D(N2j −N2j(cen)) (2) = X N2j P(N2j)e−λ∥N2j−N2j(cen)∥ (3) When there is neurotrophin released, the growth cone begins to grow induced by neural activity. The growth cone activity is bounded by the presynaptic factor which is a summation filter representing the linear sum of the presynaptic spikes of the corresponding neuron N1j. The most active growth cone from source neuron N1j(sou) has the highest possibility to be extended. If N2j(tag) is the target direction of growth cone, N2j(tag) is identified when the accumulated neurotrophin c2j(tag) exceeds the threshold, the new connection between N1j(sou) and N2j(tag) is validated, meanwhile the neurotrophin is reset to the initial state. When the new connection is completed, the old connection which is bifurcated from the same neuron is blocked [15, 16]. N2j(tag) = argmaxN2j (tag)∈Y (N2j )c2j (4) 4 Real-time Learning and Adaptation 4.1 Experiments To analyze the capability of the model in a real-time robotic system, an e-puck robot equipped with two lateral microphones, and a camera with a 30◦prism is shown in Fig. 3. E-puck robot communicates with PC through bluetooth interface. We use e-puck robot to emulate barn owl head. The visual and auditory target (LED and loudspeaker) was fixed in one location and the owl-head robot moves into different directions manually or by motor command. The high firing rate spike pattern was fed into center neurons, which correspond to the target localization in space, in ICc or retina layer. In the network model, each pathway represents 18◦field in space. We label the neurons corresponding to the azimuth angle −90◦∼−72◦, pathway 1, so that azimuth angle 0◦∼18◦is represented by pathway 6. The chirp from the loudspeaker is 1K Hz sine wave. The sound signal is processed by Fast Fourier Transform (FFT). When the average amplitude of the input signal above a threshold, the characteristic frequency f and phase ∆φ between the left and right ear are calculated. With Equation 5 and 6, we get the interaural time difference ∆t and the target direction θ in azimuth. In this equation, V is sound speed, L is the diameter of the robot head. ∆t = ∆φ 2πf (5) θ = ∆tV L (6) 4.2 Experiment Results The experiment consisted of two steps: first, the owl-head robot without prism was positioned to head towards different directions in a random sequence. For every stimulation, a visual or an audiovisual target was presented at one of the 10 available locations. Secondly, the owl-head robot wearing prism with azimuth angle 36◦was presented to randomly selected direction in azimuth. In each direction, the target stimuli repeated 75 times. Each stimuli introduce spike cluster in 40 time units. These spikes are binary signals with equal amplitude. Experiment results have shown that the system was able to adjust itself in different initial conditions. The results of 0◦target localization in the first experiment are shown in Fig. 4. Since visual and auditory signals are registered with each other, both the visual excitatory synapse (the arrow between N4j and N3j in Fig. 2(b)) and auditory excitatory synapse (the arrow between N2j and N3j in Fig. 2(b)) are strengthened. This means the bimodal neuron becomes more active. Because of 4 (a) (b) (c) Figure 3: (a) E-puck robot wearing a prism. (b) Real-time experiment. (c) Visual and auditory input. We get the visual direction from the luminous image by identifying the position of the brightest pixel. The auditory signal is processed by FFT to identify the phase difference between left and right ear, so as to find the auditory direction. the inhibitory relationship between bimodal neuron and the interneuron, the interneuron is strongly inhibited and its output is close to zero. Therefore, no neurotrophin is released in the ICx neuron, as shown in Fig. 4(a). The growthcone does not grow in the auditory layer, so there is no change to the original axon connection, Fig. 4(b). The results of 0◦target localization in the second experiment are shown in Fig. 5 and Fig. 6. Because of the prism wearing, the visual receptive center and auditory receptive center are in different pathways, pathway 8 and pathway 6. Visual and auditory input spike trains are independent of each other in pathway 8. Thus both visual and auditory synapses connected to the bimodal neuron are weakened. The reduced inhibition increases the spike output of interneuron. This stimulates neurotrophin release in pathway 8. With high neurotrophin value and high firing rate spike train input, the pathway 6 growthcone is the most active one at the source layer. When the growthcone grows to certain level, the axon connection is updated, as shown in Fig. 6(b). For the camera is limited by its visual angle −30◦∼30◦, the real-time robot experiment only tested pathway 4 ∼7. The rest of the pathway test is simulated in PC in terms of data accessed from pathway 4 ∼7. The last map realignment result is shown in Fig.7. 5 Conclusion Adaptability is a crucial issue in the design of autonomous systems. In this paper, we demonstrate a robust model to eliminate the visual and auditory localization disparity. This model explains the mechanism behind visual and auditory signal integration. Spike-Timing Dependent Plasticity is accompanied by modulation of the signals between ICc and ICx neurons. The model also provides the first clear indication of the possible role of a ”Map Adaptation Cue” in map alignment. The real-time application in a robotic barn owl head shows the model can work in real world which the brains of animals have to face. By studying the brain wiring mechanism in superior colliculus, we can better understand the maps alignment in brain. Maps alignment also exists in hippacampus and cortex. It is believed maps alignment plays an important role for learning, perception and memory which is our future work. 5 Figure 4: Visual and auditory localization signals from a same target are registered with each other. (a) There’s no neurotrophin released from ICx layer at any time during the experiment. (b) The axon connection between ICc and ICx doesn’t change. (c)(d) Here the target direction is in 0◦. Both visual and auditory receptive center corresponds to pathway 6 and their synaptic weight increases simultaneously. Figure 5: Visual and auditory localization signals are misaligned with each other. (a) Neurotrophin released from the target ICx neurons is accumulated. (b) The axon connection between ICc and ICx doesn’t change before the neurontrophin and growthcone reach a threshold. Here the visual receptive center is in pathway 8, while the auditory receptive center is in pathway 6. (c)(d) Both the visual and auditory synapses are weakened because the input spike trains are independent with each other. 6 Figure 6: New axon connection is built. (a) After the axon connection is updated, neurotrophin is reset to its original status. (b) The new axon connection is built while the old connection is inhibited. (c)(d) Both visual and auditory synapses begin to increase after visual and auditory signal registered with each other again. Figure 7: The arrangement of axon connection between maps. The small square represents the original point to point connection. The black blocks represent the new connection after adaptation. 7 Another issue for further discussion is MAC. Although it is clear MAC is generated by an inhibitory network in SC, whether it comes from bimodal neuron or not remains unclear. The video of the experiment can be found on website: http://www.see.ed.ac.uk/ s0454392/ Acknowledgments For this research, we are grateful to Barbara Webb’s suggestion for using e-puck robot. We would like to thank the support of the EPSRC Doctoral Training Center in Neuroinformatics. We also thank Leslie Smith for advice and assistance in model building. References [1] E. Knudsen, “Auditory and visual maps of space in the optic tectum of the owl,” The Journal of Neuroscience, vol. 2, pp. 1177–1194, 1982. [2] K. EI, “Early blindness results in a degraded auditory map of space in the optic tectum of the barn owl,” Proc Natl Acad Sci, vol. 85, no. 16, pp. 6211–4, 1988. [3] J. Huo, A. Murray, L. Smith, and Z. Yang, “Adaptation of barn owl localization system with spike timing dependent plasticity.” IEEE World Congress on Computational Intelligence, June 2008. [4] M. Rucci, G. Tononi, and G. M. Edelman, “Registration of neural maps through valuedependent learning: modeling the alignment of auditory and visual maps in the barn owl’s optic tectum,” J Neurosci., vol. 17, no. 1, pp. 334–52, 1997. [5] J. I.Gold and K. EI, “Adaptive adjustment of connectivity in the inferior colliculus revealed by focal pharmacological inactivation,” J Neurophysiol., vol. 85(4), pp. 1575–84, 2001. [6] P. S. Hyde and E. I. Knudsen, “Topographic projection from the optic tectum to the auditory space map in the inferior colliculus of the barn owl,” J Comp Neurol, vol. 421, pp. 146–160, 2000. [7] Y. Gutfreund, W. Zheng, and E. I. Knudsen, “Gated visual input to the central auditory system,” Science, vol. 297, pp. 1556–1559, 2002. [8] J. L. Goldberg, J. S. Espinosa, Y. Xu, N. Davidson, G. T. Kovacs, and B. A. Barres, “Retinal ganglion cells do not extend axons by default: Promotion by neurotrophic signaling and electrical activity,” Neuron, vol. 33, pp. 689–702, 2002. [9] M. Meredith, J. Nemitz, and B. Stein, “Determinants of multisensory integration in superior colliculus neurons. i. temporal factors.” J Neurosci., vol. 10, pp. 3215–29, 1987. [10] R. Hosaka, O. Araki, and T. Ikeguchi, “Stdp provides the substrate for igniting synfire chains by spatiotemporal input patterns,” Neural Computation, vol. 20, pp. 415–435, 2008. [11] J. Sneyd, Mathematical Modeling in Physiology, Cell Biology, and Immunology. New Orleans, Louisiana: American Mathematical Society, January 2001, vol. 59. [12] J. Huo, Z. Yang, and A. Murray, “Modeling visual and auditory integration of barn owl superior colliculus with stdp.” IEEE CIS&RAM, June 2008. [13] L.F.Abbott and P. Dayan, Theoretical Neuroscience. Cambridge: MIT Press, August 2001, ch. 6. [14] S. Song, K. D. Miller, and L.F.Abbott, “Competitive hebbian learning through spike-timingdependent synaptic plasticity,” Nature Neurosci, vol. 3, pp. 919–926, 2000. [15] E. W.Dent and F. B.Gertler, “Cytoskeletal dynamics and transport in growth cone mobility and axon guidance,” Neuron, vol. 40, pp. 209–227, 2003. [16] H. Hatt and D. O. Smith, “Synaptic depression related to presynaptic axon conduction block,” J. Physiol., vol. 259, no. 2, pp. 367–93, 1976. 8
2008
199
3,452
Translated Learning: Transfer Learning across Different Feature Spaces †Wenyuan Dai, †Yuqiang Chen, †Gui-Rong Xue, ‡Qiang Yang and †Yong Yu †Shanghai Jiao Tong University Shanghai 200240, China {dwyak,yuqiangchen,grxue,yyu}@apex.sjtu.edu.cn ‡Hong Kong University of Science and Technology Kowloon, Hong Kong qyang@cse.ust.hk Abstract This paper investigates a new machine learning strategy called translated learning. Unlike many previous learning tasks, we focus on how to use labeled data from one feature space to enhance the classification of other entirely different learning spaces. For example, we might wish to use labeled text data to help learn a model for classifying image data, when the labeled images are difficult to obtain. An important aspect of translated learning is to build a “bridge” to link one feature space (known as the “source space”) to another space (known as the “target space”) through a translator in order to migrate the knowledge from source to target. The translated learning solution uses a language model to link the class labels to the features in the source spaces, which in turn is translated to the features in the target spaces. Finally, this chain of linkages is completed by tracing back to the instances in the target spaces. We show that this path of linkage can be modeled using a Markov chain and risk minimization. Through experiments on the text-aided image classification and cross-language classification tasks, we demonstrate that our translated learning framework can greatly outperform many state-of-the-art baseline methods. 1 Introduction Traditional machine learning relies on the availability of a large amount of labeled data to train a model in the same feature space. However, labeled data are often scarce and expensive to obtain. In order to save much labeling work, various machine learning strategies have been proposed, including semi-supervised learning [13], transfer learning [3, 11, 10], self-taught learning [9], etc. One commonality among these strategies is they all require the training data and test data to be in the same feature space. For example, if the training data are documents, then the classifiers cannot accept test data from a video space. However, in practice, we often face the problem where the labeled data are scarce in its own feature space, whereas there are sufficient labeled data in other feature spaces. For example, there may be few labeled images available, but there are often plenty of labeled text documents on the Web (e.g., through the Open Directory Project, or ODP, http://www.dmoz.org/). Another example is cross-language classification where labeled documents in English are much more than ones in some other languages such as Bangla, which has only 21 Web pages in the ODP. Therefore, it would be great if we could learn the knowledge across different feature spaces and to save a substantial labeling effort. To address the transferring of knowledge across different feature spaces, researchers have proposed multi-view learning [2, 8, 7] in which each instance has multiple views in different feature spaces. Different from multi-view learning, in this paper, we focus on the situation where the training data are in a source feature space, and the test data are in a different target feature space, and that there is no correspondence between instances in these spaces. The source and target feature spaces can be (a) Supervised Learning (b) Semi-supervised Learning (c) Transfer Learning (d) Self-taught Learning (e) Multi-view Learning Elephants are large and gray ... big mammals on earth... thickskinned, ... massive hoofed mammal ... (f) Translated Learning Test Data Figure 1: An intuitive illustration to different kinds of learning strategies using classification of image elephants and rhinos as the example. The images in orange frames are labeled data, while the ones without frames are unlabeled data. very different, as in the case of text and images. To solve this novel learning problem, we develop a novel framework named as translated learning, where training data and test data can be in totally different feature spaces. A translator is needed to be exploited to link the different feature spaces. Clearly, the translated learning framework is more general and difficult than traditional learning problems. Figure 1 presents an intuitive illustration of six different learning strategies, including supervised learning, semi-supervised learning [13], transfer learning [10], self-taught learning [9], multi-view learning [2], and finally, translated learning. An intuitive idea for translated learning is to somehow translate all the training data into a target feature space, where learning can be done within a single feature space. This idea has already been demonstrated successful in several applications in cross-lingual text classification [1]. However, for the more general translated learning problem, this idea is hard to be realized, since machine translation between different feature spaces is very difficult to accomplish in many non-natural language cases, such as translating documents to images. Furthermore, while a text corpus can be exploited for cross-langauge translation, for translated learning, the learning of the “feature-space translator” from available resources is a key issue. Our solution is to make the best use of available data that have both features of the source and target domains in order to construct a translator. While these data may not be sufficient in building a good classifier for the target domain, as we will demonstrate in our experimental study in the paper, by leveraging the available labeled data in the source domain, we can indeed build effective translators. An example is to translate between the text and image feature spaces using the social tagging data from Web sites such as Flickr (http://www.flickr.com/). The main contribution of our work is to combine the feature translation and the nearest neighbor learning into a unified model by making use of a language model [5]. Intuitively, our model can be represented using a Markov chain c →y →x, where y represents the features of the data instances x. In translated learning, the training data xs are represented by the features ys in the source feature space, while the test data xt are represented by the features yt in the target feature space. We model the learning in the source space through a Markov chain c →ys →xs, which can be connected to another Markov chain c →yt →xt in the target space. An important contribution of our work then is to show how to connect these two paths, so that the new chain c →ys →yt →xt, can be used to translate the knowledge from the source space to the target one, where the mapping ys →yt is acting as a feature-level translator. In our final solution, which we call TLRisk, we exploit the risk minimization framework in [5] to model translated learning. Our framework can accept different distance functions to measure the relevance between two models. 2 Translated Learning Framework 2.1 Problem Formulation We first define the translated learning problem formally. Let Xs be the source instance space. In this space, each instance xs ∈Xs is represented by a feature vector (y(1) s , . . . , y(ns) s ), where y(i) s ∈Ys and Ys is the source feature space. Let Xt be the target instance space, in which each instance xt ∈Xt is represented by a feature vector (y(1) t , . . . , y(nt) t ), where y(i) t ∈Yt and Yt is the target feature space. We have a labeled training data set Ls = {(x(i) s , c(i) s )}n i=1 in the source space, where x(i) s ∈Xs and c(i) s ∈C = {1, . . . , |C|} is the true class-label of x(i) s . We also have another labeled training data set Lt = {(x(i) t , c(i) t )}m i=1 in the target space, where x(i) t ∈Xt and c(i) t ∈C. Usually, m is assumed to be small, so that Lt is not enough to train a reliable prediction model. The unlabeled test data set U is a set of k examples {x(i) u }k i=1, where x(i) u ∈Xt. Note that x(i) s is in a different feature space from x(i) t and x(i) u . For example, x(i) s may be a text document, while x(i) t and x(i) u may be visual images. To link the two feature spaces, a feature translator p(yt|ys) ∝φ(yt, ys) is constructed. However, for ease of explanation, we first assume that the translator φ is given, and will discuss the derivation of φ later in this section, based on co-occurrence data. We focus on our main objective in learning, which is to estimate a hypothesis ht : Xt 7→C to classify the instances x(i) u ∈U as accurately as possible, by making use of the labeled training data L = Ls ∪Lt and the translator φ. 2.2 Risk Minimization Framework First, we formulate our objective in terms of how to minimize an expected risk function with respect to the labeled training data L = Ls ∪Lt and the translator φ by extending the risk minimization framework in [5]. In this work, we use the risk function R(c, xt) to measure the the risk for classifying xt to the category c. Therefore, to predict the label for an instance xt, we need only to find the class-label c which minimizes the risk function R(c, xt), so that ht(xt) = arg min c∈C R(c, xt). (1) The risk function R(c, xt) can be formulate as the expected loss when c and xt are relevant; formally, R(c, xt) ≡L(r = 1|c, xt) = Z ΘC Z ΘXt L(θC, θXt, r = 1)p(θC|c) p(θXt|xt) dθXt dθC. (2) Here, r = 1 represents the event of “relevant”, which means (in Equation (2)) “c and xt are relevant”, or “the label of xt is c”. θC and θXt are the models with respect to classes C and target space instances Xt respectively. ΘC and ΘXt are two corresponding model spaces involving all the possible models. Note that, in Equation (2), θC only depends on c and θXt only depends to xt. Thus, we use p(θC|c) to replace p(θC|c, xt), and use p(θXt|xt) to replace p(θXt|c, xt). L(θC, θXt, r = 1) is the loss function with respect to the event of θC and θXt being relevant. We next address the estimation of the risk function in Equation (2). 2.3 Estimation The risk function in Equation (2) is difficult to estimate, since the sizes of ΘC and ΘXt can be exponential in general. Therefore, we have to use approximation for estimating the risk function for efficiency. First of all, the loss function L(θC, θXt, r = 1) can be formulated using distance functions between the two models θC and θXt, so that L(θC, θXt, r = 1) = α∆(θC, θXt), where ∆(θC, θXt) is the distance (or dissimilarity) function, e.g. the Kullback-Leibler divergence. Replacing L(θC, θXt, r = 1) with ∆(θC, θXt), the risk function is reformulated as R(c, xt) ∝ Z ΘC Z ΘXt ∆(θC, θXt)p(θC|c) p(θXt|xt) dθXt dθC. (3) Since the sizes of ΘC and ΘXt are exponential in general, we cannot calculate Equation (3) straightforwardly. In this paper, we approximate the risk function by its value at the posterior mode: R(c, xt) ≈∆(ˆθc, ˆθxt)p(ˆθc|c)p(ˆθxt|xt) ∝∆(ˆθc, ˆθxt)p(ˆθc|c), (4) where ˆθc = arg maxθC p(θC|c), and ˆθxt = arg maxθXt p(θXt|xt). In Equation (4), p(ˆθc|c) is the prior probability of ˆθc with respect to the target class c. This prior can be used to balance the influence of different classes in the class-imbalance case. When we assume there is no prior difference among all the classes, the risk function can be rewritten into Algorithm 1 Risk Minimization Algorithm for Translated Learning: (TLRisk) Input: Labeled training data L in the source space, unlabeled test data U in the target space, a translator φ to link the two feature spaces Ys and Yt and a dissimilarity function ∆(·, ·). Output: The prediction label ht(xt) for each xt ∈U. Procedure TLRisk train 1: for each c ∈C do 2: Estimate the model ˆθc based on Equation (6). 3: end for Procedure TLRisk test 1: for each xt ∈U do 2: Estimate the model ˆθxt based on Equation (7). 3: Predict the label ht(xt) for xt based on Equations (1) and (5). 4: end for R(c, xt) ∝∆(ˆθc, ˆθxt), (5) where ∆(ˆθc, ˆθxt) denotes the dissimilarity between two models ˆθc and ˆθxt. To achieve this objective, as in [5], we formulate these two models in the target feature space Yt; specifically, if we use KL divergence as the distance function, ∆(ˆθc, ˆθxt) can be measured by KL(p(Yt|ˆθc)||p(Yt|ˆθxt)). Our estimation is based on the Markov chain assumption where ˆθc →c →ys →yt →xt →ˆθxt and ˆθc →c →yt →xt →ˆθxt, so that p(yt|ˆθc) = Z Ys X c′∈C p(yt|ys)p(ys|c′)p(c′|ˆθc) dys + λ X c′∈C p(yt|c′)p(c′|ˆθc), (6) where p(yt|ys) can be estimated using the translator φ; p(ys|c′) can be estimated based on the statistical observations in the labeled text data set Ls in the source feature space Ys; p(yt|c′) can be estimated based on Lt in the target feature space Yt; p(c′|ˆθc) can be calculated as: p(c′|ˆθc) = 1 if c = c′, and otherwise, p(c′|ˆθc) = 0; and λ is a trade-off parameter which controls the influence of target space labeled data Lt. For another model p(Yt|ˆθxt), it can be estimated by p(yt|ˆθxt) = Z Xt p(yt|x′ t)p(x′ t|ˆθxt) dx′ t, (7) where p(yt|x′ t) can be estimated using the feature extractor in the target feature space Yt, and p(x′ t|ˆθxt) can be calculated as p(x′ t|ˆθxt) = 1 if x′ t = xt; otherwise p(x′ t|ˆθxt) = 0. Integrating Equations (1), (5), (6) and (7), our translated learning framework is summarized as algorithm TLRisk, an abbreviation for Translated Learning via Risk Minimization, which is shown in Algorithm 1. Considering the computational cost of Algorithm 1, due to the Markov chain assumption, our algorithm TLRisk can be implemented using dynamic programming. Therefore, in the worst case, the time complexity of TLRisk is O(|C||Yt| + |Yt||Ys|) in training, and O(|C||Yt|) for predicting an instance. In practice, the data are quite sparse, and good feature mappings (or translator) should also be sparse, otherwise it will consist of many ambiguous cases. Therefore, TLRisk can perform much faster than the worst cases generally, and the computational cost of TLRisk is linear in the non-zero occurrences in feature mappings. 2.4 Translator φ We now explain in particular how to build the translator φ(yt, ys) ∝p(yt|ys) to connect two different feature spaces. As mentioned before, to estimate the translator p(yt|ys), we need some cooccurrence data across the two feature spaces: source and target. Formally, we need co-occurrence data in the form of p(yt, ys), p(yt, xs), p(xt, ys), or p(xt, xs). In cross-language problems, dictionaries can be considered as data in the form of p(yt, ys) (feature-level co-occurrence). On the Web, DATA SET DATA SIZE DATA SET DATA SIZE DOCUMENTS IMAGES DOCUMENTS IMAGES + − + − + − + − horse vs coin 1610 1345 270 123 dog vs canoe 1084 1047 102 103 kayak vs bear 1045 885 102 101 greyhound vs cd 380 362 94 102 electric-guitar vs snake 335 326 122 112 stained-glass vs microwave 331 267 99 107 cake vs binoculars 265 320 104 216 rainbow vs sheet-music 261 256 102 84 laptop vs sword 210 203 128 102 tomato vs llama 175 172 102 119 bonsai vs comet 166 164 122 120 frog vs saddle 150 148 115 110 Table 1: The description for each data set. Here, horse vs coin indicates all the positive instances are about horse while all the negative instances are about coin. “+” means positive instance; “−” means negative instances. social annotations on images (e.g. Flickr, images associated with keywords) and search-engine results in response to queries are examples for correlational data in the forms of p(yt, xs) and p(xt, ys) (feature-instance co-occurrence). Moreover, multi-view data (e.g. Web pages including both text and pictures) is an example for data in the form of p(xt, xs) (instance-level co-occurrence). Where there is a pool of such co-occurrence data available, we can build the translator φ for estimating the Markov chains in the previous subsections. In particular, to estimate the translator φ, at first, the feature-instance co-occurrence data (p(yt, xs) or p(xt, ys)) can be used to estimate the probabilities for feature-level co-occurrence p(yt, ys); formally, p(yt, ys) = R Xs p(yt, xs)p(ys|xs) dxs and p(yt, ys) = R Xt p(xt, ys)p(yt|xt) dxt. The instance-level co-occurrence data can also be converted to feature-level co-occurrence; formally, p(yt, ys) = R Xt R Xs p(xt, xs)p(ys|xs)p(yt|xt) dxsdxt. Here, p(ys|xs) and p(yt|xt) are two feature extractors in Ys and Yt. Using the feature-level co-occurrence probability p(yt, ys), we can estimate the translator as p(yt|ys) = p(yt, ys)/ R Yt p(y′ t, ys)dy′ t. 3 Evaluation: Text-aided Image Classification In this section, we apply our framework TLRisk to a text-aided image classification problem, which uses binary labeled text documents as auxiliary data to enhance the image classification. This problem is derived from the application where a user or a group of users may have expressed preferences over some text documents, and we wish to translate these preferences to images for the same group of users. We will show the effectiveness of TLRisk on text-aided image classification. Our objective is to demonstrate that even with a small amount of labeled image training data, we can still build a high-quality translated learning solution for image classification by leveraging the text documents, even if the co-occurrence data themselves are not sufficient when directly used for training a classification model in the target space. 3.1 Data Sets The data sets of Caltech-2561 and Open Directory Project (ODP, http://www.dmoz.org/) were used in our evaluation, as the image and text corpora. Our ODP collection was crawled during August 2006, and involves 1,271,106 English Web pages. We generated 12 binary text-to-image classification tasks from the above corpora. The description for each data set is presented in Table 1. The first column presents the name of each data set, e.g. horse vs coin indicates all the positive instances are about horse while all the negative instances are about coin. We collected the corresponding documents from ODP for each category. However, due to space limitation, we omit the detailed ODP directory information with respect to each data set here. In the table, we also listed the data sizes for each task, including documents and images. Generally, the number of documents is much larger than the number of images. For data preprocessing, the SIFT descriptor [6] was used to find and describe the interesting points in the images, and then clustered the extracted interest points into 800 clusters to obtain the codebook. Based on the code-book, each image can be converted to a corresponding feature vector. For text documents, we first extracted and stemmed all the tokens from the ODP Web pages, and then information gain [12] was used to select the most important features for further learning process. We collected the co-occurrence data from a commercial image search engine during April 2008. The collected data are in the form of feature-instance co-occurrence p(ys, xt), so that we have to convert them to feature-level co-occurrence p(ys, yt) as discussed in Section 2.4. 1http://www.vision.caltech.edu/Image Datasets/Caltech256/ 12 4 8 16 32 0.20 0.25 0.30 0.35 0.40 0.15 number of labeled images per category Error Rate Cosine Image Only Search+Image TLRisk Lowerbound (a) 12 4 8 16 32 0.20 0.25 0.30 0.35 0.40 0.15 number of labeled images per category Error Rate Kullback−Leibler Divergence Image Only Search+Image TLRisk Lowerbound (b) 12 4 8 16 32 0.20 0.25 0.30 0.35 0.40 0.15 number of labeled images per category Error Rate Pearson’s Correlation Coefficient Image Only Search+Image TLRisk Lowerbound (c) Figure 2: The average error rates over 12 data sets for text-aided image classification with different number of labeled images Lt. 0.0625 0.25 1 4 16 0.20 0.25 0.30 0.15 0.35 λ (in log scale) Error Rate Cosine average over 12 data sets (a) 0.0625 0.25 1 4 16 0.15 0.20 0.25 0.30 0.35 λ (in log scale) Error Rate Kullback−Liebler Divergence average over 12 data sets (b) 0.0625 0.25 1 4 16 0.15 0.20 0.25 0.30 0.35 λ (in log scale) Error Rate Pearson’s Correlation Coefficient average over 12 data sets (c) Figure 3: The average error rates over 12 data sets for text-aided image classification with different trade-off λ. 3.2 Evaluation Methods Few existing research works addressed the text-aided image classification problem, so that for the baseline methods in our experiments, we first simply used the labeled data Lt as the training data in the target space to train a classification model; we refer to this model as Image Only. The second baseline is to use the category name (in this case, there are two names for binary classification problems) to search for training images and then to train classifiers together with labeled images in Lt; we refer to this model as Search+Image. Our framework TLRisk was evaluated under three different dissimilarity functions: (1) KullbackLeibler divergence (named KL): R Yt p(yt|θC) log p(yt|θC) p(yt|θXt)dyt; (2) Negative of cosine function (named NCOS): − R Yt p(yt|θC)p(yt|θXt)dyt qR Yt p2(yt|θC)dyt qR Yt p2(yt|θXt)dyt ; (3) Negative of the Pearson’s correlation coefficient (named NPCC): − cov(p(Yt|θC),p(Yt|θXt)) √ var(p(Yt|θC))var(p(Yt|θXt)). We also evaluated the lower bound of the error rate with respect to each data set. To estimate the lower bound, we conducted a 5-fold cross-validation on the test data U. Note that this strategy, which is referred to as Lowerbound, is unavailable in our problem setting, since it uses a large amount of labeled data in the target space. In our experiments, this lower bound is used just for reference. We also note that on some data sets, the performance of Lowerbound may be slightly worse than that of TLRisk, because Lowerbound was trained based on images in Caltech-256, while TLRisk was based on the co-occurrence data. These models used different supervisory knowledge. 3.3 Experimental Results The experimental results were evaluated in terms of error rates, and are shown in Figure 2. On one hand, from the table, we can see that our framework TLRisk greatly outperforms the baseline methods Image Only and Search+Image, no matter which dissimilarity function is applied. On the other hand, compared with Lowerbound, TLRisk also shows comparable performance. It indicates that our framework TLRisk can effectively learn knowledge across different feature spaces in the case of text-to-image classification. Moreover, when the number of target space labeled images decreases, the performance of Image Only declines rapidly, while the performances of Search+Image and TLRisk stay very staDATA SET ENGLISH GERMAN LOCATION SIZE LOCATION SIZE 1 Top: Sport: Ballsport 2000 Top: World: Deutsch: Sport: Ballsport 128 Top: Computers: Internet 2000 Top: World: Deutsch: Computer: Internet 126 2 Top: Arts: Architecture: Building Types 1259 Top: World: Deutsch: Kultur: Architektur: Geb¨audetypen 71 Top: Home: Cooking: Recipe Collections 475 Top: World: Deutsch: Zuhause: Kochen: Rezeptesammlungen 72 3 Top: Science: Agriculture 1886 Top: World: Deutsch: Wissenschaft: Agrarwissenschaften 71 Top: Society: Crime 1843 Top: World: Deutsch: Gesellschaft: Kriminalit¨at 69 4 Top: Sports: Skating: Roller Skating 926 Top: World: Deutsch: Sport: Rollsport 70 Top: Health: Public Health and Safety 2361 Top: World: Deutsch: Gesundheit: Public Health 71 5 Top: Recreation: Outdoors: Hunting 2919 Top: World: Deutsch: Freizeit: Outdoor: Jagd 70 Top: Society: Holidays 2258 Top: World: Deutsch: Gesellschaft: Fest´und Feiertage 72 Table 2: The description for each cross-language classification data set. ble. This indicates that TLRisk is not quite sensitive to the size of Lt; in other words, TLRisk has good robustness. We also want to note that, sometimes TLRisk performs slightly better than Lowerbound. This is not a mistake, because these two methods use different supervisory knowledge: Lowerbound is based on images in the Caltech-256 corpus; TLRisk is based on the cooccurrence data. In these experiments, Lowerbound is just for reference. In TLRisk, a parameter to tune is the trade off parameter λ (refer to Equation (6)). Figure 3 shows the average error rate curves on all the 12 data sets, when λ gradually changes from 2−5 to 25. In this experiment, we fixed the number of target training images per category to one, and set the threshold K (which is the number of images to collect for each text keyword, when collecting the co-occurrence data) to 40. From the figure, we can see that, on one hand, when λ is very large, which means the classification model mainly builds on the target space training images Lt, the performance is rather poor. On the other hand, when λ is small such that the classification model relies more on the auxiliary text training data Ls, the classification performance is relatively stable. Therefore, we suggest to set the trade-off parameter λ to a small value, and in these experiments, all the λs are set to 1, based on Figure 3. 4 Evaluation: Cross-language Classification In this section, we apply our framework TLRisk to another scenario, the cross-language classification. We focused on English-to-German classification, where English documents are used as the source data to help classify German documents, which are target data. In these experiments, we collected the documents from corresponding categories from ODP English pages and ODP German pages, and generated five cross-language classification tasks, as shown in Table 2. For the co-occurrence data, we used the English-German dictionary from the Internet Dictionary Project2 (IDP). The dictionary data are in the form of feature-level co-occurrence p(yt, ys). We note that while most cross-language classification works rely on machine translation [1], our assumption is that the machine translation is unavailable and we rely on dictionary only. We evaluated TLRisk with the negative of cosine (named NCOS) as the dissimilarity function. Our framework TLRisk was compared to classification using only very few German labeled documents as a baseline, called German Labels Only. We also present the lower bound of error rates by performing 5-fold cross-validation on the test data U, which we refer to as Lowerbound. The performances of the evaluated methods are presented in Table 3. In this experiment, we have only sixteen German labeled documents in each category. The error rates in Table 3 were evaluated by averaging the results of 20 random repeats. From the figure, we can see that TLRisk always shows marked improvements compared with the baseline method German Labels Only, although there are still gaps between TLRisk and the ideal case Lowerbound. This indicates our algorithm TLRisk is effective on the cross-language classification problem. DATA SET 1 2 3 4 5 German Labels Only 0.246 ± 0.061 0.133 ± 0.037 0.301 ± 0.067 0.257 ± 0.053 0.277 ± 0.068 TLRisk 0.191 ± 0.045 0.122 ± 0.043 0.253 ± 0.062 0.247 ± 0.059 0.183 ± 0.072 Lowerbound 0.170 ± 0.000 0.116 ± 0.000 0.157 ± 0.000 0.176 ± 0.000 0.166 ± 0.000 Table 3: The average error rate and variance on each data set, given by all the evaluation methods, for English-to-German cross-language classification. We have empirically tuned the trade-off parameter λ. Similar to the results of the text-aided image classification experiments, when λ is small, the performance of TLRisk is better and stable. In 2http://www.ilovelanguages.com/idp/index.html these experiments, we set λ to 2−4. However, due to space limitation, we cannot present the curves for λ tuning here. 5 Related Work We review several prior works related to our work. To solve the label sparsity problem, researchers proposed several learning strategies, e.g. semi-supervised learning [13] and transfer learning [3, 11, 10, 9, 4]. Transfer learning mainly focuses on training and testing processes being in different scenarios, e.g. multi-task learning [3], learning with auxiliary data sources [11], learning from irrelevant categories [10], and self-taught learning [9, 4]. The translated learning proposed in this paper can be considered as an instance of general transfer learning; that is, transfer learning from data in different feature spaces. Multi-view learning addresses learning across different feature spaces. Co-training [2] established the foundation of multi-view learning, in which the classifiers in two views learn from each other to enhance the learning process. Nigam and Ghani [8] proposed co-EM to apply EM algorithm to each view, and interchange probabilistic labels between different views. Co-EMT [7] is an active learning multi-view learning algorithm, and has shown more robustness empirically. However, as discussed before, multi-view learning requires that each instance should contain two views, while in translated learning, this requirement is relaxed. Translated learning can accept training data in one view and test data in another view. 6 Conclusions In this paper, we proposed a translated learning framework for classifying target data using data from another feature space. We have shown that in translated learning, even though we have very little labeled data in the target space, if we can find a bridge to link the two spaces through feature translation, we can achieve good performance by leveraging the knowledge from the source data. We formally formulated our translated learning framework using risk minimization, and presented an approximation method for model estimation. In our experiments, we have demonstrated how this can be done effectively through the co-occurrence data in TLRisk. The experimental results on the text-aided image classification and the cross-language classification show that our algorithm can greatly outperform the state-of-the-art baseline methods. Acknowledgement We thank the anonymous reviewers for their greatly helpful comments. Wenyuan Dai and Gui-Rong Xue are supported by the grants from National Natural Science Foundation of China (NO. 60873211) and the MSRA-SJTU joint lab project “Transfer Learning and its Application on the Web”. Qiang Yang thanks the support of Hong Kong CERG Project 621307. References [1] N. Bel, C. Koster, and M. Villegas. Cross-lingual text categorization. In ECDL, 2003. [2] A. Blum and T. Mitchell. Combining labeled and unlabeled data with co-training. In COLT, 1998. [3] R. Caruana. Multitask learning. Machine Learning, 28(1):41–75, 1997. [4] W. Dai, Q. Yang, G.-R. Xue, and Y. Yu. Self-taught clustering. In ICML, 2008. [5] J. Lafferty and C. Zhai. Document language models, query models, and risk minimization for information retrieval. In SIGIR, 2001. [6] D. Lowe. Distinctive image features from scale-invariant keypoints. International Journal of Computer Vision, 60(2):91–110, 2004. [7] I. Muslea, S. Minton, and C. Knoblock. Active + semi-supervised learning = robust multi-view learning. In ICML, 2002. [8] K. Nigam and R. Ghani. Analyzing the effectiveness and applicability of co-training. In CIKM, 2000. [9] R. Raina, A. Battle, H. Lee, B. Packer, and A. Ng. Self-taught learning: transfer learning from unlabeled data. In ICML, 2007. [10] R. Raina, A. Ng, and D. Koller. Constructing informative priors using transfer learning. In ICML, 2006. [11] P. Wu and T. Dietterich. Improving svm accuracy by training on auxiliary data sources. In ICML, 2004. [12] Y. Yang and J. Pedersen. A comparative study on feature selection in text categorization. In ICML, 1997. [13] X. Zhu. Semi-supervised learning literature survey. Technical Report 1530, University of WisconsinMadison, 2007.
2008
2
3,453
Kernel Change-point Analysis Za¨ıd Harchaoui LTCI, TELECOM ParisTech and CNRS 46, rue Barrault, 75634 Paris cedex 13, France zaid.harchaoui@enst.fr Francis Bach Willow Project, INRIA-ENS 45, rue d’Ulm, 75230 Paris, France francis.bach@mines.org ´Eric Moulines LTCI, TELECOM ParisTech and CNRS 46, rue Barrault, 75634 Paris cedex 13, France eric.moulines@enst.fr Abstract We introduce a kernel-based method for change-point analysis within a sequence of temporal observations. Change-point analysis of an unlabelled sample of observations consists in, first, testing whether a change in the distribution occurs within the sample, and second, if a change occurs, estimating the change-point instant after which the distribution of the observations switches from one distribution to another different distribution. We propose a test statistic based upon the maximum kernel Fisher discriminant ratio as a measure of homogeneity between segments. We derive its limiting distribution under the null hypothesis (no change occurs), and establish the consistency under the alternative hypothesis (a change occurs). This allows to build a statistical hypothesis testing procedure for testing the presence of a change-point, with a prescribed false-alarm probability and detection probability tending to one in the large-sample setting. If a change actually occurs, the test statistic also yields an estimator of the change-point location. Promising experimental results in temporal segmentation of mental tasks from BCI data and pop song indexation are presented. 1 Introduction The need to partition a sequence of observations into several homogeneous segments arises in many applications, ranging from speaker segmentation to pop song indexation. So far, such tasks were most often dealt with using probabilistic sequence models, such as hidden Markov models [1], or their discriminative counterparts such as conditional random fields [2]. These probabilistic models require a sound knowledge of the transition structure between the segments and demand careful training beforehand to yield competitive performance; when data are acquired online, inference in such models is also not straightforward (see, e.g., [3, Chap. 8]). Such models essentially perform multiple change-point estimation, while one is often also interested in meaningful quantitative measures for the detection of a change-point within a sample. When a parametric model is available to model the distributions before and after the change, a comprehensive literature for change-point analysis has been developed, which provides optimal criteria from the maximum likelihood framework, as described in [4]. Nonparametric procedures were also proposed, as reviewed in [5], but were limited to univariate data and simple settings. Online counterparts have also been proposed and mostly built upon the cumulative sum scheme (see [6] for extensive references). However, so far, even extensions to the case where the distribution before the change is known, and the distribution after the change is not known, remains an open problem [7]. This brings to light the need to develop statistically grounded change-point analysis algorithms, working on multivariate, high-dimensional, and also structured data. 1 We propose here a regularized kernel-based test statistic, which allows to simultaneously provide quantitative answers to both questions: 1) is there a change-point within the sample? 2) if there is one, then where is it? We prove that our test statistic for change-point analysis has a false-alarm probability tending to α and a detection probability tending to one as the number of observations tends to infinity. Moreover, the test statistic directly provides an accurate estimate of the change-point instant. Our method readily extends to multiple change-point settings, by performing a sequence of change-point analysis in sliding windows running along the signal. Usually, physical considerations allow to set the window-length to a sufficiently small length for being guaranteed that at most one change-point occurs within each window, and sufficiently large length for our decision rule to be statistically significant (typically n > 50). In Section 2, we set up the framework of change-point analysis, and in Section 3, we describe how to devise a regularized kernel-based approach to the change-point problem. Then, in Section 4 and in Section 5, we respectively derive the limiting distribution of our test statistic under the null hypothesis H0 : ”no change occurs“, and establish the consistency in power under the alternative HA : ”a change occurs“. These theoretical results allow to build a test statistic which has provably a false-alarm probability tending to a prescribed level α, and a detection probability tending to one, as the number of observations tends to infinity. Finally, in Section 7, we display the performance of our algorithm for respectively, segmentation into mental tasks from BCI data and temporal segmentation of pop songs. 2 Change-point analysis In this section, we outline the change-point problem, and describe formally a strategy for building change-point analysis test statistics. Change-point problem Let X1, . . . , Xn be a time series of independent random variables. The change-point analysis of the sample {X1, . . . , Xn} consists in the following two steps. 1) Decide between H0 : PX1 = · · · = PXk = · · · = PXn HA : there exists 1 < k⋆< n such that (1) PX1 = · · · = PXk⋆̸= PXk⋆+1 = · · · = PXn . 2) Estimate k⋆from the sample {X1, . . . , Xn} if HA is true . While sharing many similarities with usual machine learning problems, the change-point problem is different. Statistical hypothesis testing An important aspect of the above formulation of the changepoint problem is its natural embedding in a statistical hypothesis testing framework. Let us recall briefly the main concepts in statistical hypothesis testing, in order to rephrase them within the change-point problem framework (see, e.g., [8]). The goal is to build a decision rule to answer question 1) in the change-point problem stated above. Set a false-alarm probability α with 0 < α < 1 (also called level or Type I error), whose purpose is to theoretically guarantee that P(decide HA, when H0 is true) is close to α. Now, if there actually is a changepoint within the sample, one would like not to miss it, that is that the detection probability π = P(decide HA, when HA is true)—also called power and equal to one minus the Type II error—should be close to one. The purpose of Sections 4-5 is to give theoretical guarantees to those practical requirements in the large-sample setting, that is when the number of observations n tends to infinity. Running maximum partition strategy An efficient strategy for building change-point analysis procedures is to select the partition of the sample which yields a maximum heterogeneity between the two segments: given a sample {X1, . . . , Xn} and a candidate change point k with 1 < k < n, assume we may compute a measure of heterogeneity ∆n,k between the segments {X1, . . . , Xk} on the one hand, and {Xk+1, . . . , Xn} on the other hand. Then, the “running maximum partition strategy” consists in using max1<k<n ∆n,k as a building block for change-point analysis (cf. Figure 1). Not only max1<k<n ∆n,k may be used to test for the presence of a change-point and assess/discard 2                       P(ℓ) P(r) 1 k k⋆ n Figure 1: The running maximum strategy for change-point analysis. The test statistic for changepoint analysis runs a candidate change-point k with 1 < k < n along the sequence of observations, hoping to catch the true change-point k⋆. the overall homogeneity of the sample; besides, ˆk = argmax1<k<n∆n,k provides a sensible estimator of the true change-point instant k⋆[5]. 3 Kernel Change-point Analysis In this section, we describe how the kernel Fisher discriminant ratio, which has proven relevant for measuring the homogeneity of two samples in [9], may be embedded into the running maximum partition strategy to provide a powerful test statistic, coined KCpA for Kernel Change-point Analysis, for addressing the change-point problem. This is described in the operator-theoretic framework, developed for the statistical analysis of kernel-based learning and testing algorithms in [10, 11]. Reproducing kernel Hilbert space Let (X, d) be a separable measurable metric space. Let X be an X-valued random variable, with probability measure P; the expectation with respect to P is denoted by E[·] and the covariance by Cov(·, ·). Consider a reproducing kernel Hilbert space (RKHS) (H, ⟨·, ·⟩H) of functions from X to R. To each point x ∈X, there corresponds an element Φ(x) ∈H such that ⟨Φ(x), f⟩H = f(x) for all f ∈H, and ⟨Φ(x), Φ(y)⟩H = k(x, y), where k : X × X →R is a positive definite kernel [12]. In the following, we exclusively work with the Aronszajn-map, that is, we take Φ(x) = k(x, ·) for all x ∈X. It is assumed from now on that H is a separable Hilbert space. Note that this is always the case if X is a separable metric space and if the kernel is continuous [13]. We make the following two assumptions on the kernel (which are satisfied in particular for the Gaussian kernel; see [14]): (A1) the kernel k is bounded, that is sup(x,y)∈X×X k(x, y) < ∞, (A2) for all probability distributions P on X, the RKHS associated with k(·, ·) is dense in L2(P). Kernel Fisher Discriminant Ratio Consider a sequence of independent observations X1, . . . , Xn ∈X. For any [i, j] ⊂{2, . . . , n −1}, define the corresponding empirical mean elements and covariance operators as follows ˆµi:j := 1 j −i + 1 j X ℓ=i k(Xℓ, ·) , ˆΣi:j := 1 j −i + 1 j X ℓ=i {k(Xℓ, ·) −ˆµi:j} ⊗{k(Xℓ, ·) −ˆµi:j} . These quantities have obvious population counterparts, the population mean element and the population covariance operator, defined for any probability measure P as ⟨µP, f⟩H := E[f(X)] for all f ∈H, and ⟨f, ΣPg⟩H := CovP[f(X), g(X)] for f, g ∈H. For all k ∈{2, . . . , n −1} the (maximum) kernel Fisher discriminant ratio, which we abbreviate as KFDR is defined as KFDRn,k;γ(X1, . . . , Xn) := k(n −k) n k n ˆΣ1:k + n −k n ˆΣk+1:n + γI −1/2 (ˆµk+1:n −ˆµ1:k) 2 H . Note that, if we merge two labelled samples {X1, . . . , Xn1} and {X′ 1, . . . , X′ n2} into a single sample as {X1, . . . , Xn1, X′ 1, . . . , X′ n2}, then with KFDRn1+n2,n1+1;γ(X1, . . . , Xn1, X′ 1, . . . , X′ n2) we recover the test statistic considered in [9] for testing the homogeneity of two samples {X1, . . . , Xn1} and {X′ 1, . . . , X′ n2}. 3 Following [9], we make the following assumptions on all the covariance operators Σ considered in this paper: (B1) the eigenvalues {λp(Σ)}p≥1 satisfy P∞ p=1 λ1/2 p (Σ) < ∞, (B2) there are infinitely many strictly positive eigenvalues {λp(Σ)}p≥1 of Σ. Kernel change-point analysis Now, we may apply the strategy described before (cf. Figure 1) to obtain the main building block of our test statistic for change-point analysis. Indeed, we define our test statistic Tn,k;γ as Tn;γ(k) := max an<k<bn KFDRn,k;γ −d1,n,k;γ(ˆΣW n,k) √ 2 d2,n,k;γ(ˆΣW n,k) , where nˆΣW n,k := kˆΣ1:k + (n −k)ˆΣk+1:n. The quantities d1,n,k;γ(ˆΣW n,k) and d2,n,k;γ(ˆΣW n,k), defined respectively as d1,n,k;γ(ˆΣW n,k) := Tr{(ˆΣW n,k + γI)−1 ˆΣW n,k} , d2,n,k;γ(ˆΣW n,k) := Tr{(ˆΣW n,k + γI)−2(ˆΣW n,k)2} , act as normalizing constants for Tn;γ(k) to have zero-mean and unit-variance as n tends to infinity, a standard statistical transformation known as studentization. The maximum is searched within the interval [an, bn] with an > 1 and bn < n, which is restriction of ]1, n[, in order to prevent the test statistic from uncontrolled behaviour in the neighborhood of the interval boundaries, which is standard practice in this setting [15]. Remark Note that, if the input space is Euclidean, for instance X = Rd, and if the kernel is linear k(x, y) = xT y, then Tn;γ(k) may be interpreted as a regularized version of the classical maximumlikelihood multivariate test statistic used to test change in mean with unequal covariances, under the assumption of normal observations, described in [4, Chap. 3]. Yet, as the next section shall show, our test statistic is truly nonparametric, and its large-sample properties do not require any “gaussian in the feature space”-type of assumption. Moreover, in practice it may be computed thanks to the kernel trick, adapted to the kernel Fisher discriminant analysis and outlined in [16, Chapter 6]. False-alarm and detection probability In order to build a principled testing procedure, a proper theoretical analysis from a statistical point of view is necessary. First, as the next section shows, for a prescribed α, we may build a procedure which has, as n tends to infinity, the false-alarm probability α under the null hypothesis H0, that is when the sample is completely homogeneous and contains no-change-point. Besides, when the sample actually contains at most one change-point, we prove that our test statistic is able to catch it with probability one as n tends to infinity. Large-sample setting For the sake of generality, we describe here the large-sample setting for the change-point problem under the alternative hypothesis HA. Essentially, it corresponds to normalizing the signal sampling interval to [0, 1] and letting the resolution increase as we observe more data points [4]. Assume there is 0 < k⋆< n such that PX1 = · · · = PXk⋆̸= PXk⋆+1 = · · · = PXn. Define τ ⋆:= k⋆/n such that τ ⋆∈]0, 1[, and define P(ℓ) the probability distribution prevailing within the left segment of length τ ⋆, and P(r) the probability distribution prevailing within the right segment of length 1 −τ ⋆. Then, we want to study what happens if we have ⌊nτ ⋆⌋observations from P(ℓ) (before change) and ⌊n(1 −τ ⋆)⌋observations from P(r) (after change) where n is large and τ ⋆is kept fixed. 4 Limiting distribution under the null hypothesis Throughout this section, we work under the null hypothesis H0 that is PX1 = · · · = PXk = · · · = PXn for all 2 ≤k ≤n. The first result gives the limiting distribution of Tn;γ(k) as the number of observations n tends to infinity. Before stating the theoretical results, let us describe informally the crux of our approach. We may prove, under H0, using operator-theoretic pertubation results similar to [9], that it is sufficient to study the large-sample behaviour of ˜Tn;γ(k) := maxan<k<bn( √ 2 d2;γ(Σ))−1Qn,∞;γ(k) where Qn,∞;γ(k) := k(n −k) n (Σ + γI)−1/2 (ˆµk+1:n −ˆµ1:k) 2 H −d1;γ(Σ) , 1 < k < n , (2) 4 and d1;γ(Σ) and d2;γ(Σ) are respectively the population recentering and rescaling quantities with Σ = Σ1:n = ΣW 1:n the within-class covariance operator. Note that the only remaining stochastic term in (2) is ˆµk+1:n −ˆµ1:k. Let us expand (2) onto the eigenbasis {λp, ep}p≥1 of the covariance operator Σ, as follows: Qn,∞;γ(k) = ∞ X p=1 (λp + γ)−1 k(n −k) n ⟨µk+1:n −µ1:k, ep⟩2 −λp  , 1 < k < n . (3) Then, defining S1:k,p := n−1/2 Pk i=1 λ−1/2 p (ep(Xi) −E[ep(X1)]), we may rewrite Qn,∞;γ(k) as an infinite-dimensional quadratic form in the tied-down partial sums S1:k,p −k nS1:n,p, which yields Qn,∞;γ(k) = ∞ X p=1 (λp + γ)−1λp ( n2 k(n −k)  S1:k,p −k nS1:n,p 2 −1 ) , 1 < k < n . (4) The idea is to view {Qn,∞;γ(k)}1<k<n as a stochastic process, that is a random function [k 7→ Qn,∞;γ(k, ω)] for any ω ∈Ω, where (Ω, F, P) is a probability space. Then, invoking the socalled invariance principle in distribution [17], we realize that the random sum S1:⌊nt⌋,p(ω), which for all ω linearly interpolates between the values S1:i/n,p(ω) at points i/n for i = 1, . . . , n, behaves, asymptotically as n tends to infinity, like a Brownian motion (also called Wiener process) {Wp(t)}0<t<1. Hence, along each component ep, we may define a Brownian bridge {Bp(t)}0<t<1, that is a tied-down brownian motion Bp(t) := Wp(t) −tWp(1) which yields continuous approximation in distribution of the corresponding {S1:k,p −k nS1:n,p}1<k<n. The proof (omitted due to space limitations) consists in deriving a functional (noncentral) limit theorem for KFDRn,k;γ, and then applying a continuous mapping argument. Proposition 1 Assume (A1) and (B1), and that H0 holds, that is PXi = P for all 1 ≤i ≤n. Assume in addition that the regularization parameter γ is held fixed as n tends to infinity, and that an/n →u > 0 and bn/n →v < 1 as n tends to infinity. Then, Tn;γ(k) D −→sup u<t<v Q∞;γ(t) := 1 √ 2d2;γ(Σ) ∞ X p=1 λp(Σ) λp(Σ) + γ B2 p(t) t(1 −t) −1 ! , where {λp(Σ)}p≥1 is the sequence of eigenvalues of the overall covariance operator Σ, while {Bp(t)}p≥1 is a sequence of independent brownian bridges. Define t1−α as the (1 −α)-quantile of supu<t<v Q∞;γ(t). We may compute t1−α either by MonteCarlo simulations, as described in [18], or by bootstrap resampling under the null hypothesis (see). The next result proves that, using the limiting distribution under the null stated above, we may build a test statistic with prescribed false-alarm probability α for large n. Corollary 2 The test maxan<k<bn Tn,γ(k) ≥t1−α(Σ, γ) has false-alarm probability α, as n tends to infinity. Besides, when the sequence of regularization parameters {γn}n≥1 decreases to zero slowly enough (in particular slower than n−1/2), the test statistic maxan<k<bn Tn,γn(k) turns out to be asymptotically kernel-independent as n tends to infinity. While the proof hinges upon martingale functional limit theorems [17], still, we may point out that if we replace γ by γn in the limiting null distribution, then Q∞;γ(·) is correctly normalized for all n ≥1 to have zero-mean and variance one. Proposition 3 Assume (A1) and (B1-B2) and that H0 holds, that is PXi = P for all 1 ≤i ≤n. Assume in addition that the regularization parameters {γn}n≥1 is such that γn + d1,n;γn(Σ) d2,n;γn(Σ)γ−1 n n−1/2 →0 , and that an/n →u > 0 and bn/n →v < 1 as n tends to infinity. Then, max an<k<bn Tn;γn(k) D −→sup u<t<v B(t) p t(1 −t) . 5 Remark A closer look at Proposition 1 brings to light that the reweighting by t(1 −t) of the squared brownian bridges on each component is crucial for our test statistic to be immune against imbalance between segment lengths under the alternative HA, that is when τ ⋆is far from 1/2. Indeed, swapping out the reweighting by t(1 −t), to simply consider the corresponding unweighted test statistic is hazardous, and yields a loss of power for alternatives when τ ⋆is far from 1/2. This section allowed us get an α-level test statistic for the change-point problem, by looking at the large-sample behaviour of the test statistic under the null hypothesis H0. The next step is to prove that the test statistic is consistent in power, that is the detection probability tends to one as n tends to infinity under the alternative hypothesis HA. 5 Consistency in power This section shows that, when the alternative hypothesis HA holds, our test statistic is able to detect presence of a change with probability one in the large-sample setting. The next proposition is proved within the same framework as the one considered in the previous section, except that now, along each component ep, one has to split the random sum into three parts [1, k], [k + 1, k⋆], [k⋆+ 1, n], and then the large-sample behaviour of each projected random sum is the one of a two-sided Brownian motion with drifts. Proposition 4 Assume (A1-A2) and (B1-B2), and that HA holds, that is there is exists u < τ ⋆< v with u > 0 and v < 1 such that PX⌊nτ⋆⌋̸= PX⌊nτ⋆⌋+1 for all 1 ≤i ≤n. Assume in addition that the regularization parameter γ is held fixed as n tends to infinity, and that limn→∞an/n > u and limn→∞bn/n < v. Then, for any 0 < α < 1, we have PHA  max an<k<bn Tn;γ(k) > t1−α  →1 , as n →∞. (5) 6 Extensions and related works Extensions It is worthwhile to note that we may also have built similar procedures from the maximum mean discrepancy (MMD) test statistic proposed by [19]. Note also that, instead of the Tikhonov-type regularization of the covariance operator, other regularization schemes may also be applied, such as the spectral truncation regularization of the covariance operator, equivalent to preprocessing by a centered kernel principal component analysis [20, 21], as used in [22] for instance. Related works A related problem is the abrupt change detection problem, explored in [23], which is naturally also encompassed by our framework. Here, one is interested in the early detection of a change from a nominal distribution to an erratic distribution. The procedure KCD of [23] consists in running a window-limited detection algorithm, using two one-class support vector machines trained respectively on the left and the right part of the window, and comparing the sets of obtained weights; Their approach differs from our in two points. First, we have the limiting null distribution of KCpA, which allows to compute decision thresholds in a principled way. Second, our test statistic incorporates a reweighting to keep power against alternatives with unbalanced segments. 7 Experiments Computational considerations In all experiments, we set γ = 10−5 and took the Gaussian kernel with isotropic bandwidth set by the plug-in rule used in density estimation. Second, since from k to k + 1, the test statistic changes from KFDRn,k;γ to KFDRn,k+1;γ, it corresponds to take into account the change from {(X1, Y1 = −1), . . . , (Xk, Yk = −1), (Xk+1, Yk+1 = +1), . . . , (Xn, Yn = +1)} to {(X1, Y1 = −1), . . . , (Xk, Yk = −1), (Xk+1, Yk+1 = −1), (Xk+2, Yk+2 = +1) . . . , (Xn, Yn = +1)} in the labelling in KFDR [9, 16]. This motivates an efficient strategy for the computation of the test statistic. We compute the matrix inversion of the regularized kernel gram matrix once for all, at the cost of O(n3), and then compute all values of the test statistic for all partitions in one matrix multiplication—in O(n2). As for computing the decision threshold t1−α, we used bootstrap resampling calibration with 10, 000 runs. Other Monte-Carlo based calibration procedures are possible, but are left for future research. 6 Subject 1 Subject 2 Subject 3 KCpA 79% 74% 61% SVM 76% 69% 60% Table 1: Average classification accuracy for each subject Brain-computer interface data Signals acquired during Brain-Computer Interface (BCI) trial experiments naturally exhibit temporal structure. We considered a dataset proposed in BCI competition III1 acquired during 4 non-feedback sessions on 3 normal subjects, where each subject was asked to perform different tasks, the time where the subject switches from one task to another being random (see also [24]). Mental tasks segmentation is usually tackled with supervised classification algorithms, which require labelled data to be acquired beforehand. Besides, standard supervised classification algorithms are context-sensitive, and sometimes yield poor performance on BCI data. We performed a sequence of change-point analysis on sliding windows overlapping by 20% along the signals. We provide here two ways of measuring the performance of our method. First, in Figure 2 (left), we give in the empirical ROC-curve of our test statistic, averaged over all the signals at hand. This shows that our test statistic yield competitive performance for testing the presence of a change-point, when compared with a standard parametric multivariate procedure (param) [4]. Second, in Table 1, we give experimental results in terms of classification accuracy, which proves that we can reach comparable/better performance as supervised multi-class (one-versus-one) classification algorithms (SVM) with our completely unsupervised kernel change-point analysis algorithm. If each segment is considered as a sample of a given class, then the classification accuracy corresponds here to the proportion of correctly assigned points at the end of the segmentation process. This also clearly shows that KCpA algorithm give accurate estimates of the change-points, since the change-point estimation error is directly measured by the classification accuracy. 0 0.1 0.2 0.3 0.4 0.5 0 0.2 0.4 0.6 0.8 1 Level Power ROC Curve KCpA param 0 0.1 0.2 0.3 0.4 0.5 0 0.2 0.4 0.6 0.8 1 Level Power ROC Curve KCpA KCD Figure 2: Comparison of ROC curves for task segmentation from BCI data (left), and pop songs segmentation (right). Pop song segmentation Indexation of music signals aims to provide a temporal segmentation into several sections with different dynamic or tonal or timbral characteristics. We investigated the performance of KCpA on a database of 100 full-length “pop music” signals, whose manual segmentation is available. In Figure 2 (right), we provide the respective ROC-curves of KCD of [23] and KCpA. Our approach is indeed competitive in this context. 8 Conclusion We proposed a principled approach for the change-point analysis of a time-series of independent observations. It provides a powerful testing procedure for testing the presence of a change in distribution in a sample. Moreover, we saw in experiments that it also allows to accurately estimate the change-point when a change occurs. We are currently exploring several extensions of KCpA. Since experimental results are promising on real data, in which the assumption of independence is rather unrealistic, it is worthwhile to analyze the effect of dependence on the large-sample behaviour of our 1see http://ida.first.fraunhofer.de/projects/bci/competition_iii/ 7 test statistic, and explain why the test statistic remains powerful even for (weakly) dependent data. We are also investigating adaptive versions of the change-point analysis, in which the regularization parameter γ and the reproducing kernel k are learned from the data. Acknowledgments This work has been supported by Agence Nationale de la Recherche under contract ANR-06-BLAN0078 KERNSIG. References [1] F. De la Torre Frade, J. Campoy, and J. F. Cohn. Temporal segmentation of facial behavior. In ICCV, 2007. [2] J. Lafferty, A. McCallum, and F. Pereira. Conditional random fields: Probabilistic models for segmenting and labeling sequence data. In Proc. ICML, 2001. [3] O. Capp´e, E. Moulines, and T. Ryden. Inference in Hidden Markov Models. Springer, 2005. [4] J. Chen and A.K. Gupta. Parametric Statistical Change-point Analysis. Birkh¨auser, 2000. [5] M. Cs¨org¨o and L. Horv´ath. Limit Theorems in Change-Point Analysis. Wiley and sons, 1998. [6] M. Basseville and N. Nikiforov. Detection of abrupt changes. Prentice-Hall, 1993. [7] T. L. Lai. Sequential analysis: some classical problems and new challenges. Statistica Sinica, 11, 2001. [8] E. Lehmann and J. Romano. Testing Statistical Hypotheses (3rd ed.). Springer, 2005. [9] Z. Harchaoui, F. Bach, and E. Moulines. Testing for homogeneity with kernel Fisher discriminant analysis. In Adv. NIPS, 2007. [10] G. Blanchard, O. Bousquet, and L. Zwald. Statistical properties of kernel principal component analysis. Machine Learning, 66, 2007. [11] K. Fukumizu, F. Bach, and A. Gretton. Statistical convergence of kernel canonical correlation analysis. JLMR, 8, 2007. [12] C. Gu. Smoothing Spline ANOVA Models. Springer, 2002. [13] I. Steinwart, D. Hush, and C. Scovel. An explicit description of the rkhs of gaussian RBF kernels. IEEE Trans. on Inform. Th., 2006. [14] B. K. Sriperumbudur, A. Gretton, K. Fukumizu, G. R. G. Lanckriet, and B. Sch¨olkopf. Injective hilbert space embeddings of probability measures. In COLT, 2008. [15] B. James, K. L. James, and D. Siegmund. Tests for a change-point. Biometrika, 74, 1987. [16] J. Shawe-Taylor and N. Cristianini. Kernel Methods for Pattern Analysis. Camb. UP, 2004. [17] P. Billingsley. Convergence of Probability Measures (2nd ed.). Wiley Interscience, 1999. [18] P. Glasserman. Monte Carlo Methods in Financial Engineering (1rst ed.). Springer, 2003. [19] A. Gretton, K. Borgwardt, M. Rasch, B. Schoelkopf, and A.J. Smola. A kernel method for the two-sample problem. In Adv. NIPS, 2006. [20] B. Sch¨olkopf and A. J. Smola. Learning with Kernels. MIT Press, 2002. [21] G. Blanchard and L. Zwald. Finite-dimensional projection for classification and statistical learning. IEEE Transactions on Information Theory, 54(9):4169–4182, 2008. [22] Z. Harchaoui, F. Vallet, A. Lung-Yut-Fong, and O. Capp´e. A regularized kernel-based approach to unsupervised audio segmentation. In ICASSP, 2009. [23] F. D´esobry, M. Davy, and C. Doncarli. An online kernel change detection algorithm. IEEE Trans. on Signal Processing, 53(8):2961–2974, August 2005. [24] Z. Harchaoui and O. Capp´e. Retrospective multiple change-point estimation with kernels. In IEEE Workshop on Statistical Signal Processing (SSP), 2007. 8
2008
20
3,454
Spectral Hashing Yair Weiss1,3 3School of Computer Science, Hebrew University, 91904, Jerusalem, Israel yweiss@cs.huji.ac.il Antonio Torralba1 1CSAIL, MIT, 32 Vassar St., Cambridge, MA 02139 torralba@csail.mit.edu Rob Fergus2 2Courant Institute, NYU, 715 Broadway, New York, NY 10003 fergus@cs.nyu.edu Abstract Semantic hashing[1] seeks compact binary codes of data-points so that the Hamming distance between codewords correlates with semantic similarity. In this paper, we show that the problem of finding a best code for a given dataset is closely related to the problem of graph partitioning and can be shown to be NP hard. By relaxing the original problem, we obtain a spectral method whose solutions are simply a subset of thresholded eigenvectors of the graph Laplacian. By utilizing recent results on convergence of graph Laplacian eigenvectors to the Laplace-Beltrami eigenfunctions of manifolds, we show how to efficiently calculate the code of a novel datapoint. Taken together, both learning the code and applying it to a novel point are extremely simple. Our experiments show that our codes outperform the state-of-the art. 1 Introduction With the advent of the Internet, it is now possible to use huge training sets to address challenging tasks in machine learning. As a motivating example, consider the recent work of Torralba et al. who collected a dataset of 80 million images from the Internet [2, 3]. They then used this weakly labeled dataset to perform scene categorization. To categorize a novel image, they simply searched for similar images in the dataset and used the labels of these retrieved images to predict the label of the novel image. A similar approach was used in [4] for scene completion. Although conceptually simple, actually carrying out such methods requires highly efficient ways of (1) storing millions of images in memory and (2) quickly finding similar images to a target image. Semantic hashing, introduced by Salakhutdinov and Hinton[5] , is a clever way of addressing both of these challenges. In semantic hashing, each item in the database is represented by a compact binary code. The code is constructed so that similar items will have similar binary codewords and there is a simple feedforward network that can calculate the binary code for a novel input. Retrieving similar neighbors is then done simply by retrieving all items with codes within a small Hamming distance of the code for the query. This kind of retrieval can be amazingly fast - millions of queries per second on standard computers. The key for this method to work is to learn a good code for the dataset. We need a code that is (1) easily computed for a novel input (2) requires a small number of bits to code the full dataset and (3) maps similar items to similar binary codewords. To simplify the problem, we will assume that the items have already been embedded in a Euclidean space, say Rd, in which Euclidean distance correlates with the desired similarity. The problem of finding such a Euclidean embedding has been addressed in a large 1 number of machine learning algorithms (e.g. [6, 7]). In some cases, domain knowledge can be used to define a good embedding. For example, Torralba et al. [3] found that a 512 dimensional descriptor known as the GIST descriptor, gives an embedding where Euclidean distance induces a reasonable similarity function on the items. But simply having Euclidean embedding does not give us a fast retrieval mechanism. If we forget about the requirement of having a small number of bits in the codewords, then it is easy to design a binary code so that items that are close in Euclidean space will map to similar binary codewords. This is the basis of the popular locality sensitive hashing method E2LSH [8]. As shown in[8], if every bit in the code is calculated by a random linear projection followed by a random threshold, then the Hamming distance between codewords will asymptotically approach the Euclidean distance between the items. But in practice this method can lead to very inefficient codes. Figure 1 illustrates the problem on a toy dataset of points uniformly sampled in a two dimensional rectangle. The figure plots the average precision at Hamming distance 1 using a E2LSH encoding. As the number of bits increases the precision improves (and approaches one with many bits), but the rate of convergence can be very slow. Rather than using random projections to define the bits in a code, several authors have pursued machine learning approaches. In [5] the authors used an autoencoder with several hidden layers. The architecture can be thought of as a restricted Boltzmann machine (RBM) in which there are only connections between layers and not within layers. In order to learn 32 bits, the middle layer of the autoencoder has 32 hidden units, and noise was injected during training to encourage these bits to be as binary as possible. This method indeed gives codes that are much more compact than the E2LSH codes. In [9] they used multiple stacked RBMs to learn a non-linear mapping between input vector and code bits. Backpropagation using an Neighborhood Components Analysis (NCA) objective function was used to refine the weights in the network to preserve the neighborhood structure of the input space. Figure 1 shows that the RBM gives much better performance compared to random bits. A simpler machine learning algorithm (Boosting SSC) was pursued in [10] who used adaBoost to classify a pair of input items as similar or nonsimilar. Each weak learner was a decision stump, and the output of all the weak learners on a given output is a binary code. Figure 1 shows that this boosting procedure also works much better than E2LSH codes, although slightly worse than the RBMs1. The success of machine learning approaches over LSH is not limited to synthetic data. In [5], RBMs gave several orders of magnitude improvement over LSH in document retrieval tasks. In [3] both RBMs and Boosting were used to learn binary codes for a database of millions of images and were found to outperform LSH. Also, the retrieval speed using these short binary codes was found to be significantly faster than LSH (which was faster than other methods such as KD trees). The success of machine learning methods leads us to ask: what is the best code for performing semantic hashing for a given dataset? We formalize the requirements for a good code and show that these are equivalent to a particular form of graph partitioning. This shows that even for a single bit, the problem of finding optimal codes is NP hard. On the other hand, the analogy to graph partitioning suggests a relaxed version of the problem that leads to very efficient eigenvector solutions. These eigenvectors are exactly the eigenvectors used in many spectral algorithms including spectral clustering and Laplacian eigenmaps [6, 11]. This leads to a new algorithm, which we call “spectral hashing” where the bits are calculated by thresholding a subset of eigenvectors of the Laplacian of the similarity graph. By utilizing recent results on convergence of graph Laplacian eigenvectors to the Laplace-Beltrami eigenfunctions of manifolds, we show how to efficiently calculate the code of a novel datapoint. Taken together, both learning the code and applying it to a novel point are extremely simple. Our experiments show that our codes outperform the state-of-the art. 1All methods here use the same retrieval algorithm, i.e. semantic hashing. In many applications of LSH and Boosting SSC, a different retrieval algorithm is used whereby the binary code only creates a shortlist and exhaustive search is performed on the shortlist. Such an algorithm is impractical for the scale of data we are considering. 2 0 5 10 15 20 25 30 35 0 0.2 0.4 0.6 0.8 1 LSH stumps boosting SSC RBM Proportion good neighbors for hamming distance < 2 number of bits stumps boosting SSC LSH RBM (two hidden layers) Training samples Figure 1: Building hash codes to find neighbors. Neighbors are defined as pairs of points in 2D whose Euclidean distance is less than ϵ. The toy dataset is formed by uniformly sampling points in a two dimensional rectangle. The figure plots the average precision (number of neighbors in the original space divided by number of neighbors in a hamming ball using the hash codes) at Hamming distance ≤1 for three methods. The plots on the left show how each method partitions the space to compute the bits to represent each sample. Despite the simplicity of this toy data, the methods still require many bits in order to get good performance. 2 Analysis: what makes a good code As mentioned earlier, we seek a code that is (1) easily computed for a novel input (2) requires a small number of bits to code the full dataset and (3) maps similar items to similar binary codewords. Let us first ignore the first requirement, that codewords be easily computed for a novel input and search only for a code that is efficient (i.e. requires a small number of bits) and similarity preserving (i.e. maps similar items to similar codewords). For a code to be efficient, we require that each bit has a 50% chance of being one or zero, and that different bits are independent of each other. Among all codes that have this property, we will seek the ones where the average Hamming distance between similar points is minimal. Let {yi}n i=1 be the list of codewords (binary vectors of length k) for n datapoints and Wn×n be the affinity matrix. Since we are assuming the inputs are embedded in Rd so that Euclidean distance correlates with similarity, we will use W(i, j) = exp(−∥xi −xj∥2/ϵ2). Thus the parameter ϵ defines the distance in Rd which corresponds to similar items. Using this notation, the average Hamming distance between similar neighbors can be written: P ij Wij∥yi −yj∥2. If we relax the independence assumption and require the bits to be uncorrelated we obtain the following problem: minimize : X ij Wij∥yi −yj∥2 (1) subject to : yi ∈{−1, 1}k X i yi = 0 1 n X i yiyT i = I where the constraint P i yi = 0 requires each bit to fire 50% of the time, and the constraint 1 n P i yiyT i = I requires the bits to be uncorrelated. Observation: For a single bit, solving problem 1 is equivalent to balanced graph partitioning and is NP hard. 3 Proof: Consider an undirected graph whose vertices are the datapoints and where the weight between item i and j is given by W(i, j). Consider a code with a single bit. The bit partitions the graph into two equal parts (A, B), vertices where the bit is on and vertices where the bit is off. For a single bit, P ij Wij∥yi −yj∥2 is simply the weight of the edges cut by the partition: cut(A, B) = P i∈A,j∈B W(i, j). Thus problem 1 is equivalent to minimizing cut(A, B) with the requirement that |A| = |B| which is known to be NP hard [12]. For k bits the problem can be thought of as trying to find k independent balanced partitions, each of which should have as low cut as possible. 2.1 Spectral Relaxation By introducing a n × k matrix Y whose jth row is yT j and a diagonal n × n matrix D(i, i) = P j W(i, j) we can rewrite the problem as: minimize : trace(Y T (D −W)Y ) (2) subject to : Y (i, j) ∈{−1, 1} Y T 1 = 0 Y T Y = I This is of course still a hard problem, but by removing the constraint that Y (i, j) ∈{−1, 1} we obtain an easy problem whose solutions are simply the k eigenvectors of D −W with minimal eigenvalue (after excluding the trivial eigenvector 1 which has eigenvalue 0). 2.2 Out of Sample Extension The fact that the solution to the relaxed problem are the k eigenvectors of D −W with minimal eigenvalue would suggest simply thresholding these eigenvectors to obtain a binary code. But this would only tell us how to compute the code representation of items in the training set. This is the problem of out-of-sample extension of spectral methods which is often solved using the Nystrom method [13, 14]. But note that the cost of calculating the Nystrom extension of a new datapoint is linear in the size of the dataset. In our setting, where there can be millions of items in the dataset this is impractical. In fact, calculating the Nystrom extension is as expensive as doing exhaustive nearest neighbor search. In order to enable efficient out-of-sample extension we assume the datapoints xi ∈Rd are samples from a probability distribution p(x). The equations in the problem 1 are now seen to be sample averages which we replace with their expectations: minimize : Z ∥y(x1) −y(x2)∥2W(x1, x2)p(x1)p(x2)dx1x2 (3) subject to : y(x) ∈{−1, 1}k Z y(x)p(x)dx = 0 Z y(x)y(x)T p(x)dx = I with W(x1, x2) = e−∥x1−x2∥2/ϵ2. Relaxing the constraint that y(x) ∈{−1, 1}k now gives a spectral problem whose solutions are eigenfunctions of the weighted Laplace-Beltrami operators defined on manifolds [15, 16, 13, 17]. More explicitly, define the weighted Laplacian Lp as an operator that maps a function f to g = Lpf by g(x) p(x) = D(x)f(x)p(x) − R s W(s, x)f(s)p(s)ds with D(x) = R s W(x, s). The solution to the relaxation of problem 3 are functions that satisfy Lpf = λf with minimal eigenvalue (ignoring the trivial solution f(x) = 1 which has eigenvalue 0). As discussed in [16, 15, 13], with proper normalization, the eigenvectors of the discrete Laplacian defined by n points sampled from p(x) converges to eigenfunctions of Lp as n →∞. What do the eigenfunctions of Lp look like ? One important special case is when p(x) is a separable distribution. A simple case of a separable distribution is a multidimensional 4 uniform distribution Pr(x) = Q i ui(xi) where ui is a uniform distribution in the range [ai, bi]. Another example is a multidimensional Gaussian, which is separable once the space has been rotated so that the Gaussian is axes aligned. Observation: [17] If p(x) is separable, and similarity between datapoints is defined as e−∥xi−xj∥2/ϵ2 then the eigenfunctions of the continuous weighted Laplacian, Lp have an outer product form. That is, if Φi(x) is an eigenfunction of the weighted Laplacian defined on R1 with eigenvalue λi then Φi(x1)Φj(x2) · · · Φd(xd) is an eigenfunction of the d dimensional problem with eigenvalue λiλj · · · λd. Specifically for a case of a uniform distribution on [a, b] the eigenfunctions of the onedimensional Laplacian Lp are extremely well studied objects in mathematics. They correspond to the fundamental modes of vibration of a metallic plate. The eigenfunctions Φk(x) and eigenvalues λk are: Φk(x) = sin(π 2 + kπ b −ax) (4) λk = 1 −e−ϵ2 2 | kπ b−a |2 (5) A similar equation is also available for the one dimensional Gaussian . In this case the eigenfunctions of the one-dimensional Laplacian Lp are (in the limit of small ϵ) solutions to the Schrodinger equations and are related to Hermite polynomials. Figure 2 shows the analytical eigenfunctions for a 2D rectangle in order of increasing eigenvalue. The eigenvalue (which corresponds to the cut) determines which k bits will be used. Note that the eigenvalue depends on the aspect ratio of the rectangle and the spatial frequency — it is better to cut the long dimension before the short one, and low spatial frequencies are preferred. Note that the eigenfunctions do not depend on the radius of similar neighbors ϵ. The radius does change the eigenvalue but does not affect the ordering. We distinguish between single-dimension eigenfunctions, which are of the form Φk(x1) or Φk(x2) and outer-product eigenfunctions which are of the form Φk(x1)Φl(x2). These outerproduct eigenfunctions are shown marked with a red border in the figure. As we now discuss, these outer-product eigenfunctions should be avoided when building a hashing code. Observation: Suppose we build a code by thresholding the k eigenfunctions of Lp with minimal eigenvalue y(x) = sign(Φk(x)). If any of the eigenfunctions is an outer-product eigenfunction, then that bit is a deterministic function of other bits in the code. Proof: This follows from the fact that sign(Φ1(x1)Φ2(x2)) = sign(Φ1(x1))sign(Φ2(x2)). This observation highlights the simplification we made in relaxing the independence constraint and requiring that the bits be uncorrelated. Indeed the bits corresponding to outerproduct eigenfunctions are approximately uncorrelated but they are surely not independent. The exact form of the eigenfunctions for 1D continuous Laplacian for different distributions is a matter of ongoing research [17]. We have found, however, that the bit codes obtained by thresholding the eigenfunctions are robust to the exact form of the distribution. In particular, simply fitting a multidimensional rectangle distribution to the data (by using PCA to align the axes, and then assuming a uniform distribution on each axis) works surprisingly well for a wide range of distributions. In particular, using the analytic eigenfunctions of a uniform distribution on data sampled from a Gaussian, works as well as using the numerically calculated eigenvectors and far better than boosting or RBMs trained on the Gaussian distribution. To summarize, given a training set of points {xi} and a desired number of bits k the spectral hashing algorithm works by: • Finding the principal components of the data using PCA. • Calculating the k smallest single-dimension analytical eigenfunctions of Lp using a rectangular approximation along every PCA direction. This is done by evaluating the k smallest eigenvalues for each direction using (equation 4), thus creating a list of dk eigenvalues, and then sorting this list to find the k smallest eigenvalues. 5 Figure 2: Left: Eigenfunctions for a uniform rectangular distribution in 2D. Right: Thresholded eigenfunctions. Outer-product eigenfunctions have a red frame. The eigenvalues depend on the aspect ratio of the rectangle and the spatial frequency of the cut – it is better to cut the long dimension first and lower spatial frequencies are better than higher ones. Boosting SSC RBM (two hidden layers) LSH Spectral hashing a) 3 bits b) 7 bits c) 15 bits Boosting SSC RBM (two hidden layers) LSH Spectral hashing Boosting SSC RBM (two hidden layers) LSH Spectral hashing Figure 3: Comparison of neighborhood defined by hamming balls of different radii using codes obtained with LSH, Boosting, RBM and spectral hashing when using 3, 7 and 15 bits. The yellow dot denotes a test sample. The red points correspond to the locations that are within a hamming distance of zero. Green corresponds to a hamming ball of radius 1, and blue to radius 2. • Thresholding the analytical eigenfunctions at zero, to obtain binary codes. This simple algorithm has two obvious limitations. First, it assumes a multidimensional uniform distribution generated the data. We have experimented with using multidimensional Gaussians instead. Second, even though it avoids the trivial 3 way dependencies that arise from outer-product eigenfunctions, other high-order dependencies between the bits may exist. We have experimented with using only frequencies that are powers of two to avoid these dependencies. Neither of these more complicated variants of spectral hashing gave a significant improvement in performance in our experiments. Figure 4a compares the performance of spectral hashing to LSH, RBMs and Boosting on a 2D rectangle and figure 3 visualizes the Hamming balls for the different methods. Despite the simplicity of spectral hashing, it outperforms the other methods. Even when we apply RBMs and Boosting to the output of spectral hashing the performance does not improve. A similar pattern of results is shown in high dimensional synthetic data (figure 4b). Some insight into the superior performance can be obtained by comparing the partitions that each bit defines on the data (figures 2,1). Recall that we seek partitions that give low cut value and are approximately independent. LSH which uses random linear partitions may give very unbalanced partitions. RBMs and Boosting both find good partitions, but the partitions can be highly dependent on each other. 3 Results In addition to the synthetic results we applied the different algorithms to the image databases discussed in [3]. Figure 5 shows retrieval results for spectral hashing, RBMs and boosting on the “labelme” dataset. Note that even though the spectral hashing uses a terrible model of the statistics of the database — it simply assumes a N dimensional rectangle, it performs better than boosting which actually uses the distribution (the difference in performance relative to RBMs is not significant). Not only is the performance numerically better, but 6 0 5 10 15 20 25 30 35 0 0.2 0.4 0.6 0.8 1 LSH stumps boosting SSC RBM Proportion good neighbors for hamming distance < 2 number of bits Spectral hashing Boosting + spectral hashing RBM+ spectral hashing 0 5 10 15 20 25 30 35 0 0.2 0.4 0.6 0.8 1 LSH stumps boosting SSC RBM Proportion good neighbors for hamming distance < 2 number of bits a) 2D uniform distribution b) 10D uniform distribution Spectral hashing Figure 4: left: results on 2D rectangles with different methods. Even though spectral hashing is the simplest, it gives the best performance. right: Similar pattern of results for a 10 dimensional distribution. 0 10 20 30 40 50 60 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 9 1 Gist neighbors Spectral hashing 10 bits Boosting 10 bits Input Proportion good neighbors for hamming distance < 2 number of bits LSH Boosting SSC Spectral hashing RBM Figure 5: Performance of different binary codes on the LabelMe dataset described in [3]. The data is certainly not uniformly distributed, and yet spectral hashing gives better retrieval performance than boosting and LSH. our visual inspection of the retrieved neighbors suggests that with a small number of bits, the retrieved images are better using spectral hashing than with boosting. Figure 6 shows retrieval results on a dataset of 80 million images. This dataset is obviously more challenging and even using exhaustive search some of the retrieved neighbors are semantically quite different. Still, the majority of retrieved neighbors seem to be semantically relevant, and with 64 bits spectral hashing enables this peformance in fractions of a second. 4 Discussion We have discussed the problem of learning a code for semantic hashing. We defined a hard criterion for a good code that is related to graph partitioning and used a spectral relaxation to obtain an eigenvector solution. We used recent results on convergence of graph Laplacian eigenvectors to obtain analytic solutions for certain distributions and showed the importance of avoiding redundant bits that arise from separable distributions. The final algorithm we arrive at, spectral hashing, is extremely simple - one simply performs PCA on the data and then fits a multidimensional rectangle. The aspect ratio of this multidimensional rectangle determines the code using a simple formula. Despite this simplicity, the method is comparable, if not superior, to state-of-the-art methods. 7 Spectral hashing: 32 bits 64 bits Gist neighbors Figure 6: Retrieval results on a dataset of 80 million images using the original gist descriptor, and hash codes build with spectral hashing with 32 bits and 64 bits. The input image corresponds to the image on the top-left corner, the rest are the 24 nearest neighbors using hamming distance for the hash codes and L2 for gist. References [1] R. R. Salakhutdinov and G. E. Hinton. Learning a nonlinear embedding by preserving class neighbourhood structure. In AISTATS, 2007. [2] A. Torralba, R. Fergus, and W. T. Freeman. Tiny images. Technical Report MIT-CSAIL-TR-2007-024, Computer Science and Artificial Intelligence Lab, Massachusetts Institute of Technology, 2007. [3] A. Torralba, R. Fergus, and Y. Weiss. Small codes and large databases for recognition. In CVPR, 2008. [4] James Hays and Alexei A Efros. Scene completion using millions of photographs. ACM Transactions on Graphics (SIGGRAPH 2007), 26(3), 2007. [5] R. R. Salakhutdinov and G. E. Hinton. Semantic hashing. In SIGIR workshop on Information Retrieval and applications of Graphical Models, 2007. [6] Mikhail Belkin and Partha Niyogi. Laplacian eigenmaps and spectral techniques for embedding and clustering. In NIPS, pages 585–591, 2001. [7] Geoffrey E. Hinton and Sam T. Roweis. Stochastic neighbor embedding. In NIPS, pages 833–840, 2002. [8] A. Andoni and P. Indyk. Near-optimal hashing algorithms for approximate nearest neighbor in high dimensions. In FOCS, pages 459–468, 2006. [9] R. R. Salakhutdinov and G. E. Hinton. Learning a nonlinear embedding by preserving class neighbourhood structure. In AI and Statistics, 2007. [10] G. Shakhnarovich, P. Viola, and T. Darrell. Fast pose estimation with parameter sensitive hashing. In ICCV, 2003. [11] A.Y. Ng, M.I. Jordan, and Y. Weiss. On spectral clustering, analysis and an algorithm. In Advances in Neural Information Processing 14, 2001. [12] J. Shi and J. Malik. Normalized cuts and image segmentation. In Proc. IEEE Conf. Computer Vision and Pattern Recognition, pages 731–737, 1997. [13] Yoshua Bengio, Olivier Delalleau, Nicolas Le Roux, Jean-Fran¸cois Paiement, Pascal Vincent, and Marie Ouimet. Learning eigenfunctions links spectral embedding and kernel pca. Neural Computation, 16(10):2197–2219, 2004. [14] Charless Fowlkes, Serge Belongie, Fan R. K. Chung, and Jitendra Malik. Spectral grouping using the nystr¨om method. IEEE Trans. Pattern Anal. Mach. Intell., 26(2):214–225, 2004. [15] R. R. Coifman, S. Lafon, A. B. Lee, M. Maggioni, B. Nadler, F. Warner, and S. W. Zucker. Geometric diffusions as a tool for harmonic analysis and structure definition of data: Diffusion maps. Proceedings of the National Academy of Sciences, 102(21):7426–7431, May 2005. [16] M. Belkin and P. Niyogi. Towards a theoretical foundation for laplacian based manifold methods. Journal of Computer and System Sciences, 2007. [17] Boaz Nadler, Stephane Lafon amd Ronald R. Coifman, and Ioannis G. Kevrekidis. Diffusion maps, spectral clustering and reaction coordinates of dynamical systems. Arxiv, 2008. http://arxiv.org/. 8
2008
200
3,455
Multi-resolution Exploration in Continuous Spaces Ali Nouri Department of Computer Science Rutgers University Piscataway , NJ 08854 nouri@cs.rutgers.edu Michael L. Littman Department of Computer Science Rutgers University Piscataway , NJ 08854 mlittman@cs.rutgers.edu Abstract The essence of exploration is acting to try to decrease uncertainty. We propose a new methodology for representing uncertainty in continuous-state control problems. Our approach, multi-resolution exploration (MRE), uses a hierarchical mapping to identify regions of the state space that would benefit from additional samples. We demonstrate MRE’s broad utility by using it to speed up learning in a prototypical model-based and value-based reinforcement-learning method. Empirical results show that MRE improves upon state-of-the-art exploration approaches. 1 Introduction Exploration, in reinforcement learning, refers to the strategy an agent uses to discover new information about the environment. A rich set of exploration techniques, some ad hoc and some not, have been developed in the RL literature for finite MDPs (Kaelbling et al., 1996). Using optimism in the face of uncertainty in combination with explicit model representation, some of these methods have led to the derivation of polynomial sample bounds on convergence to near-optimal policies (Kearns & Singh, 2002; Brafman & Tennenholtz, 2002). But, because they treat each state independently, these techniques are not directly applicable to continuous-space problems, where some form of generalization must be used. Some attempts have been made to improve the exploration effectiveness of algorithms in continuousstate spaces. Kakade et al. (2003) extended previous work of Kearns and Singh (2002) to metric spaces and provided a conceptual approach for creating general provably convergent model-based learning methods. Jong and Stone (2007) proposed a method that can be interpreted as a practical implementation of this work, and Strehl and Littman (2007) improved its complexity in the case that the model can be captured by a linear function. The performance metric used in these works demands near-optimal behavior after a polynomial number of timesteps with high probability, but does not insist on performance improvements before or after convergence. Such “anytime” behavior is encouraged by algorithms with regret bounds (Auer & Ortner, 2006), although regret-type algorithms have not yet been explored in continuous-state space problems to our knowledge. As a motivating example for the work we present here, consider how a discrete state-space algorithm might be adapted to work for a continuous state-space problem. The practitioner must decide how to discretize the state space. While finer discretizations allow the learning algorithm to learn more accurate policies, they require much more experience to learn well. The dilemma of picking fine or coarse resolution has to be resolved in advance using estimates of the available resources, the dynamics and reward structure of the environment, and a desired level of optimality. Performance depends critically on these a priori choices instead of responding dynamically to the available resources. We propose using multi-resolution exploration (MRE) to create algorithms that explore continuous state spaces in an anytime manner without the need for a priori discretization. The key to this ideal is to be able to dynamically adjust the level of generalization the agent uses during the learning process. MRE sports a knownness criterion for states that allows the agent to reliably apply function approximation with different degrees of generalization to different regions of the state space. One of the main contributions of this work is to provide a general exploration framework that can be used in both model-based and value-based algorithms. While model-based techniques are known for their small sample complexities, thanks to their smart exploration, they haven’t been as successful as value-based methods in continuous spaces because of their expensive planning part. Value-based methods, on the other hand, have been less fortunate in terms of intelligent exploration, and some of the very powerful RL techniques in continuous spaces, such as LSPI (Lagoudakis & Parr, 2003) and fitted Q-iteration (Ernst et al., 2005) are in the form of offline batch learning and completely ignore the problem of exploration. In practice, an exploration strategy is usually incorporated with these algorithms to create online versions. Here, we examine fitted Q-iteration and show how MRE can be used to improve its performance over conventional exploration schemes by systematically collecting better samples. 2 Background We consider environments that are modeled as Markov decision processes (MDPs) with continuous state spaces (Puterman, 1994). An MDP M in our setting can be described as a tuple ⟨S, A, T, R, γ⟩, where S is a bounded measurable subspace of ℜk; we say the problem is k-dimensional as one can represent a state by a vector of size k and we use s(i) to denote the i-th component of this vector. A = {a1, ..., am} is the discrete set of actions. T is the transition function that determines the next state given the current state and action. It can be written in the form of st+1 = T(xt, at) + ωt, where xt and at are the state and action at time t and ωt is a white noise drawn i.i.d. from a known distribution. R : S →ℜis the bounded reward function, whose maximum we denote by Rmax, and γ is the discount factor. Other concepts are similar to that of a general finite MDP (Puterman, 1994). In particular, a policy π is a mapping from states to actions that prescribes what action to take from each state. Given a policy π and a starting state s, the value of s under π, denoted by V π(s), is the expected discounted sum of rewards the agent will collect by starting from s and following policy π. Under mild conditions (Puterman, 1994), at least one policy exists that maximizes this value function over all states, which we refer to as the optimal policy or π∗. The value of states under this policy is called the optimal value function V ∗(·) = V π∗(·). The learning agent has prior knowledge of S, γ, ω and Rmax, but not T and R, and has to find a near-optimal policy solely through direct interaction with the environment. 3 Multi-resolution Exploration We’d like to build upon the previous work of Kakade et al. (2003). One of the key concepts to this method and many other similar algorithms is the notion of known state. Conceptually, it refers to the portion of the state space in which the agent can reliably predict the behavior of the environment. Imagine how the agent would decide whether a state is known or unknown as described in (Kakade et al., 2003). Based on the prior information about the smoothness of the environment and the level of desired optimality, we can form a hyper sphere around each query point and check if enough data points exist inside it to support the prediction. In this method, we use the same hyper-sphere size across the entire space, no matter how the sample points are distributed, and we keep this size fixed during the entire learning process. In another words, the degree of generalization is fixed both in time and space. To support “anytime” behavior, we need to make the degree of generalization variable both in time and space. MRE partitions the state space into a variable resolution discretization that dynamically forms smaller cells for regions with denser sample sets. Generalization happens inside the cells (similar to the hyper sphere example), therefore it allows for wider but less accurate generalization in parts of the state space that have fewer sample points, and narrow but more accurate ones for denser parts. To effectively use this mechanism, we need to change the notion of known states, as its common definition is no longer applicable. Let’s define a new knownness criterion that maps S into [0, 1] and quantifies how much we should trust the function approximation. The two extreme values, 0 and 1, are the two degenerate cases equal to unknown and known conditions in the previous definitions. In the remainder of this section, we first show how to form the variable resolution structure and compute the knownness, and then we demonstrate how to use this structure in a prototypical modelbased and value-based algorithm. 3.1 Regression Trees and Knownness Regression trees are function approximators that partition the input space into non-overlapping regions and use the training samples of each region for prediction of query points inside it. Their ability to maintain a non-uniform discretization of high-dimensional spaces with relatively fast query time has proven to be very useful in various RL algorithms (Ernst et al., 2005; Munos & Moore, 2002). For the purpose of our discussion, we use a variation of the kd-tree structure (Preparata & Shamos, 1985) to maintain our variable-resolution partitioning and produce knownness values. We call this structure the knownness-tree. As this structure is not used in a conventional supervised-learning setting, we next describe some of the details. A knownness-tree τ with dimension k accepts points s ∈ℜk satisfying ||s||∞≤1 1, and answers queries of the form 0 ≤knownness(s) ≤1. Each node ς of the tree covers a bounded region and keeps track of the points inside that region, with the root covering the whole space. Let Rς be the region of ς. Each internal node splits its region into two half-regions along one of the dimensions to create two child nodes. Parameter ν determines the maximum allowed number of points in each leaf. For a node l, l.size is the inf-norm of the size of the region it covers and l.count is the number of points inside it. Given n points, the normalizing size of the resulting tree, denoted by µ, is the region size of a hypothetical uniform discretization of the space that puts ν/k points inside each cell, if the points were uniformly distributed in the space; that is µ = 1 ⌊k√ nk/ν⌋. Upon receiving a new point, the traversal algorithm starts at the root and travels down the tree, guided by the splitting dimension and value of each internal node. Once inside a leaf l, it adds the point to its list of points; if l.count is more than ν, the node splits and creates two new half-regions2. Splitting is performed by selecting a dimension j ∈[1..k] and splitting the region into two equal half-regions along the j-th dimension. The points inside the list are added to each of the children according to what half-region they fall into. Similar to regular regression trees, several different criteria could be used to select j. Here, we assume a round-robin method just like kd-tree. To answer a query knownness(s), the lookup algorithm first finds the corresponding leaf that contains s, denoted l(s), then computes knownness based on l(s).size, l(s).count and µ: knownness(s) = min(1, l(s).count ν . µ l(s).size) (1) The normalizing size of the tree is bigger when the total number of data points is small. This creates higher knownness values for a fixed cell at the beginning of the learning. As more experience is collected, µ becomes smaller and encourages finer discretization. This process creates a variable degree of generalization over time. 1In practice, scaling can be used to satisfy this property. 2For the sake of practicality, we can assign a maximum depth to avoid indefinite growth of the tree 3.2 Application to Model-based RL The model-based algorithm we describe here uses function approximation to estimate T and R, which are the two unknown parameters of the environment. Let Θ be the set of function approximators for estimating the transition function, with each θj i ∈Θ : ℜk →ℜpredicting the i-th component of T(., aj). Accordingly, let τ j i be a knownness-tree for θj i . Let φ : ℜk →ℜbe the function approximator for the reward function. The estimated transition function, ˆT(s, a), is therefore formed by concatenating all the θa i (s). Let knownness(s, a) = mini{τ a i .knownness(s)}. Construct the augmented MDP M ′ = D S + sf, A, ˆT ′, φ, γ E by adding a new state, sf, with a reward of Rmax and only self-loop transitions. The augmented transition function ˆT ′ is a stochastic function defined as: ˆT ′(s, a) = ( sf , with probability 1 −knownness(s, a) ˆT(s, a) + ω , otherwise (2) Algorithm 1 constructs and solves M ′ and always acts greedily with respect to this internal model. DPlan is a continuous MDP planner that supports two operations: solveModel, which solves a given MDP and getBestAction, which returns the greedy action for a given state. Algorithm 1 A model-based algorithm using MRE for exploration 1: Variables: DPlan, Θ, φ and solving period planFreq 2: Observe a transition of the form (st, at, rt, st+1) 3: Add (st, rt) as a training sample to φ. 4: Add (st, st+1(i)) as a training sample to θat i . 5: Add (st) to τ at i . 6: if t mod planFreq = 0 then 7: Construct the Augmented MDP M ′ as defined earlier. 8: DPlan.solveModel(M ′) 9: end if 10: Execute action DPlan.getBestAction(st+1) While we leave a rigorous theoretical analysis of Algorithm 1 to another paper, we’d like to discuss some of its properties. The core of the algorithm is the way knownness is computed and how it’s used to make the estimated transition function optimistic. In particular, if we use a uniform fixed grid instead of the knownness-tree, the algorithm starts to act similar to MBIE (Strehl & Littman, 2005). That is, like MBIE, the value of a state becomes gradually less optimistic as more data is available. Because of their similarity, we hypothesize that similar PAC-bounds could be proved for MRE in this configuration. If we further change knownness(s, a) to be ⌊knownness(s.a)⌋, the algorithm reduces to an instance of metric E3 (Kakade et al., 2003), which can also be used to derive finite sample bounds. But, Algorithm1 also has “anytime” behavior. Let’s assume the transition and reward functions are Lipschitz smooth with Lipschitz constants CT and CR respectively. Let ρt be the maximum size of the cells and ℓt be the minimum knownness of all of the trees τ j i at time t. The following establishes performance guarantee of the algorithm at time t. Theorem 1 If learning is frozen at time t, Algorithm 1 achieves ϵ-optimal behavior, with ϵ being: ϵ = O ρt(CR + CT √ k) + 2(1 −ℓt) (1 −γ)2  Proof 1 (sketch) This follows as an application of the simulation lemma (Kearns & Singh, 2002). We can use the smoothness assumptions to compute the closeness of ˆT ′ to the original transition function based on the shape of the trees and the knownness they output. □ Of course, this theorem doesn’t provide a bound for ρt and ℓt based on t, as used in common “anytime” analyses, but gives us some insight on how the algorithm would behave. For example, the incremental refinement of model estimation assures a certain global accuracy before forcing the algorithm to collect denser sampling locally. As a result, MRE encourages more versatile sampling at the early stages of learning. As time goes by and size of the cells gets smaller, the algorithm gets closer to the optimal policy. In fact, we hypothesize that with some caveats concerning the computation of µ, it can be proved that Algorithm 1 converges to the optimal policy in the limit, given that an oracle planner is available. The bound in Theorem 1 is loose because it involves only the biggest cell size, as opposed to individual cell sizes. Alternatively, one might be able to achieve better bounds, similar to those in the work of Munos and Moore (2000), by taking the variable resolution of the tree into account. 3.3 Application to Value-based RL Here, we show how to use MRE in fitted Q-iteration, which is a value-based batch learner for continuous spaces. A similar approach can be used to apply MRE to other types of value-based methods, such as LSPI, as an alternative to random sampling or ϵ-greedy exploration, which are widely used in practice. The fitted Q-iteration algorithm accepts a set of four-tuple samples S = {(sl, al, rl, s′l), l = 1 . . . n} and uses regression trees to iteratively compute more accurate ˆQ-functions. In particular, let ˆQj i be the regression tree used to approximate Q(·, j) in the i-th iteration. Let Sj ⊂S be the set of samples with action equal to j. The training samples for ˆQj 0 are Sj 0 = {(sl, rl)|(sl, al, rl, s′l) ∈Sj}. ˆQj i+1 is constructed based on ˆ Qi in the following way: xl = {sl|(sl, al, rl, s′l) ∈Sj} (3) yl = {rl + γ max a∈A ˆQa i (s′l)|(sl, al, rl, s′l) ∈Sj} (4) Sj i+1 = {(xl, yl)}. (5) Random sampling is usually used to collect S for fitted Q-iteration when used as an offline algorithm. In online settings, ϵ-greedy can be used as the exploration scheme to collect samples. The batch portion of the algorithm is applied periodically to incorporate the new collected samples. Combining MRE with fitted Q-iteration is very simple. Let τ j correspond to ˆQj i for all i’s, and be trained on the same samples. The only change in the algorithm is the computation of Equation 4. In order to use optimistic values, we elevate ˆQ-functions according to their knownness: yl = τ j.knownness(sl)  rl + γ max a∈A Qa i (s′l)  + 1 −τ j.knownness sl Rmax 1 −γ  . 4 Experimental Results To empirically evaluate the performance of MRE, we consider a well-studied environment called “Mountain Car” (Sutton & Barto, 1998). In this domain, an underpowered car tries to climb up to the right of a valley, but has to increase its velocity via several back and forth trips across the valley. The state space is 2-dimensional and consists of the horizontal position of the car in the range of [−1.2, 0.6], and its velocity in [−0.07, 0.07]. The action set is forward, backward, and neutral, which correspond to accelerating in the intended direction. Agent receives a −1 penalty in each timestep except for when it escapes the valley and receives a reward of 0 that ends the episode. Each episode has a cap of 300 steps, and γ = 0.95 is used for all the experiments. A small amount of gaussian noise ω ∼N(0, 0.01) is added to the position component of the deterministic transition function used in the original definition, and the starting position of the car is chosen very close to the bottom of the hill with a random velocity very close to 0 (achieved by drawing samples from a normal distribution with the mean on the bottom of the hill and variance of 1/15 of the state space. This set of parameters makes this environment especially interesting for the purpose of comparing exploration strategies, because it is unlikely for random exploration to guide the car to the top of the hill. Similar scenarios occur in almost all of the complex real-life domains, where a long trajectory is needed to reach the goal. Three versions of Algorithm 1 are compared in Figure 1(a): the first two implementations use fixed discretizations instead of the knownness-tree, with different normalized resolutions of 0.05 and 0.3. The third one uses variable discretization using the knownness-tree as defined in Section 3.1. All the instances use the same Θ and φ, which are regular kd-tree structures (Ernst et al., 2005) with maximum allowed points of 10 in each cell. All of the algorithms use fitted value-iteration (Gordon, 1999) as their DPlan, and their planFreq is set to 100. Furthermore, the known threshold parameter of the first two instances was hand-tuned to 4 and 30 respectively. The learning curve in Figure 1(a) is averaged over 20 runs with different random seeds and smoothed over a window of size 5 to avoid a cluttered graph. The finer fixed-discretization converges to a very good policy, but takes a long time to do so, because it trusts only very accurate estimations throughout the learning. The coarse discretization on the other hand, converges very fast, but not to a very good policy; it constructs rough estimations and doesn’t compensate as more samples are gathered. MRE refines the notion of knownness to make use of rough estimations at the beginning and accurate ones later, and therefore converges to a good policy fast. 250 300 variable fixed 0 05 200 250 o goal fixed 0.05 fixed 0.3 100 150 Step to 50 100 0 50 100 150 0 50 100 150 Episode (a) 150 200 250 oal per episode fixed 0.05 fixed 0.3 variable 0 50 100 episode 0-100 episode 100-200 episode 200-300 Average step to go (b) Figure 1: (a) The learning curve of Algorithm 1 in Mountain Car with three different exploration strategies. (b) Average performance of Algorithm 1 in Mountain Car with three exploration strategies. Performance is evaluated at three different stages of learning. A more detailed comparison of this result is shown in Figure 1(b), where the average time-perepisode is provided for three different phases: At the early stages of learning (episode 1-100), at the middle of learning (episode 100-200), and during the late stages (episode 200-300). Standard deviation is used as the error bar. To have a better look at why MRE provides better results than the fixed 0.05 at the early stages of learning (note that both of them achieve the same performance level at the end), value functions of the two algorithms at timestep = 1500 are shown in Figure 2. Most of the samples at this stage have very small knownness in the fixed version, due to the very fine discretization, and therefore have very little effect on the estimation of the transition function. This situation results in a too optimistic value function (the flat part of the function). The variable discretization however, achieves a more realistic and smooth value function by allowing coarser generalizations in parts of the state space with fewer samples. The same type of learning curve is shown for the fitted Q-iteration algorithm in Figure 3. Here, we compare ϵ-greedy to two versions of variable-resolution MRE; in the first version, although a knownness-tree is chosen for partitioning the state space, knownness is computed as a Boolean value using the ⌊⌋operator. The second version uses continuous knownness. For ϵ-greedy, ϵ is set to 0.3 at the beginning and is decayed linearly to 0.03 as t = 10000, and is kept constant afterward. This parameter setting is the result of a rough optimization through a few trial and errors. As expected, ϵ-greedy performs poorly, because it cannot collect good samples to feed the batch learner. Both of the versions of MRE converge to the same policy, although the one that uses continuous knownness does so faster. 0 -5 -10 -15 -20 0.1 1 0.05 0.5 0 0 -0.5 -0.05 -1 -0.1 -1.5 (a) -1.5 0 -5 -10 -15 -20 0.1 1 0.05 0.5 0 0 -0.5 -0.05 -1 -0.1 (b) Figure 2: Snapshot of the value function at timestep 1500 in Algorithm 1 with two configuration: (a) fixed discretization with resolution= 0.05, and (b) variable resolution. 300 300 Continuous knownness Boolean knownness 250 lll -greedy 200 p to goa 150 Ste 100 50 0 50 100 150 200 250 Episode Figure 3: The learning curve for fitted Q-iteration in Mountain Car. ϵ-greedy is compared to two versions of MRE: one that uses Boolean knownness, and one that uses continuous knownness. To have a better understanding of why the continuous knownness helps fitted Q-iteration during the early stages of learning, snapshots of knownness from the two versions are depicted in Figure 6, along with the set of visited states at timestep 1500. Black indicates a completely unknown region, while white means completely known; gray is used for intermediate values. The continuous notion of knownness helps fitted Q-iteration in this case to collect better-covering samples at the beginning of learning. 5 Conclusion In this paper, we introduced multi-resolution exploration for reinforcement learning in continuous spaces and demonstrated how to use it in two algorithms from the model-based and value-based paradigms. The combination of two key features distinguish MRE from previous smart exploration schemes in continuous spaces: The first is that MRE uses a variable-resolution structure to identify known vs. unknown regions, and the second is that it successively refines the notion of knownness during learning, which allows it to assign continuous, instead of Boolean, knownness. The applicability of MRE to value-based methods allows us to benefit from smart exploration ideas from the model-based setting in powerful value-based batch learners that usually use naive approaches like 1.2 0.4 0.6 0.06 0 0.06 -1 0.06 0 0.6 -0.06 (a) 0.06 0 -0.06 -1.2 0.4 0.6 0.06 0 -0.06 -1 -0.4 0.6 (b) Figure 4: Knownness computed in two versions of MRE for fitted Q-iteration: One that has Boolean values, and one that uses continuous ones. Black indicates completely unknown and white means completely known. Collected samples are also shown for the same two versions at timestep 1500. random sampling to collect data. Experimental results confirm that MRE holds significant advantage over some other exploration techniques widely used in practice. References Auer, P., & Ortner, R. (2006). Logarithmic online regret bounds for undiscounted reinforcement learning. Advances in Neural Information Processing Systems 20 (NIPS-06). Brafman, R. I., & Tennenholtz, M. (2002). R-max, a general polynomial time algorithm for nearoptimal reinforcement learning. Journal of Machine Learning Research, 3, 213–231. Ernst, D., Geurts, P., & Wehenkel, L. (2005). Tree-based batch mode reinforcement learning. Journal of Maching Learning Research, 6, 503–556. Gordon, G. J. (1999). Approximate solutions to Markov decision processes. Doctoral dissertation, School of Computer Science, Carnegie Mellon University, Pittsburgh, PA. Jong, N. K., & Stone, P. (2007). Model-based function approximation for reinforcement learning. The Sixth International Joint Conference on Autonomous Agents and Multiagent Systems. Kaelbling, L. P., Littman, M. L., & Moore, A. P. (1996). Reinforcement learning: A survey. Journal of Artificial Intelligence Research, 4, 237–285. Kakade, S., Kearns, M., & Langford, J. (2003). Exploration in metric state spaces. In Proc. of the 20th International Conference on Machine Learning, 2003. Kearns, M. J., & Singh, S. P. (2002). Near-optimal reinforcement learning in polynomial time. Machine Learning, 49, 209–232. Lagoudakis, M. G., & Parr, R. (2003). Least-squares policy iteration. Journal of Machine Learning Research, 4, 1107–1149. Munos, R., & Moore, A. (2002). Variable resolution discretization in optimal control. Machine Learning, 49, 291–323. Munos, R., & Moore, A. W. (2000). Rates of convergence for variable resolution schemes in optimal control. Proceedings of the Seventeenth International Conference on Machine Learning (ICML00) (pp. 647–654). Preparata, F. P., & Shamos, M. I. (1985). Computational geometry - an introduction. Springer. Puterman, M. L. (1994). Markov decision processes: Discrete stochastic dynamic programming. New York: Wiley. Strehl, A., & Littman, M. (2007). Online linear regression and its application to model-based reinforcement learning. Advances in Neural Information Processing Systems 21 (NIPS-07). Strehl, A. L., & Littman, M. L. (2005). A theoretical analysis of model-based interval estimation. ICML-05 (pp. 857–864). Sutton, R. S., & Barto, A. G. (1998). Reinforcement learning: An introduction. Cambridge, MA: MIT Press.
2008
201
3,456
A computational model of hippocampal function in trace conditioning Elliot A. Ludvig, Richard S. Sutton, Eric Verbeek Department of Computing Science University of Alberta Edmonton, AB, Canada T6G 2E8 {elliot,sutton,everbeek}@cs.ualberta.ca E. James Kehoe School of Psychology University of New South Wales Sydney, NSW, Australia 2052 j.kehoe@unsw.edu.au Abstract We introduce a new reinforcement-learning model for the role of the hippocampus in classical conditioning, focusing on the differences between trace and delay conditioning. In the model, all stimuli are represented both as unindividuated wholes and as a series of temporal elements with varying delays. These two stimulus representations interact, producing different patterns of learning in trace and delay conditioning. The model proposes that hippocampal lesions eliminate long-latency temporal elements, but preserve short-latency temporal elements. For trace conditioning, with no contiguity between cue and reward, these long-latency temporal elements are necessary for learning adaptively timed responses. For delay conditioning, the continued presence of the cue supports conditioned responding, and the short-latency elements suppress responding early in the cue. In accord with the empirical data, simulated hippocampal damage impairs trace conditioning, but not delay conditioning, at medium-length intervals. With longer intervals, learning is impaired in both procedures, and, with shorter intervals, in neither. In addition, the model makes novel predictions about the response topography with extended cues or post-training lesions. These results demonstrate how temporal contiguity, as in delay conditioning, changes the timing problem faced by animals, rendering it both easier and less susceptible to disruption by hippocampal lesions. The hippocampus is an important structure in many types of learning and memory, with prominent involvement in spatial navigation, episodic and working memories, stimulus configuration, and contextual conditioning. One empirical phenomenon that has eluded many theories of the hippocampus is the dependence of aversive trace conditioning on an intact hippocampus (but see Rodriguez & Levy, 2001; Schmajuk & DiCarlo, 1992; Yamazaki & Tanaka, 2005). For example, trace eyeblink conditioning disappears following hippocampal lesions (Solomon et al., 1986; Moyer, Jr. et al., 1990), induces hippocampal neurogenesis (Gould et al., 1999), and produces unique activity patterns in hippocampal neurons (McEchron & Disterhoft, 1997). In this paper, we present a new abstract computational model of hippocampal function during trace conditioning. We build on a recent extension of the temporal-difference (TD) model of conditioning (Ludvig, Sutton & Kehoe, 2008; Sutton & Barto, 1990) to demonstrate how the details of stimulus representation can qualitatively alter learning during trace and delay conditioning. By gently tweaking this stimulus representation and reducing long-latency temporal elements, trace conditioning is severely impaired, whereas delay conditioning is hardly affected. In the model, the hippocampus is responsible for maintaining these long-latency elements, thus explaining the selective importance of this brain structure in trace conditioning. The difference between trace and delay conditioning is one of the most basic operational distinctions in classical conditioning (e.g., Pavlov, 1927). Figure 1 is a schematic of the two training procedures. In trace conditioning, a conditioned stimulus (CS) is followed some time later by a reward or uncon1 Stimulus Reward Trace Delay Figure 1: Event timelines in trace and delay conditioning. Time flows from left-to-right in the diagram. A vertical bar represents a punctate (short) event, and the extended box is a continuously available stimulus. In delay conditioning, the stimulus and reward overlap, whereas, in trace conditioning, there is a stimulus-free gap between the two punctate events. ditioned stimulus (US); the two stimuli are separated by a stimulus-free gap. In contrast, in delay conditioning, the CS remains on until presentation of the US. Trace conditioning is learned more slowly than delay conditioning, with poorer performance often observed even at asymptote. In both eyeblink conditioning (Moyer, Jr. et al., 1990; Solomon et al., 1986; Tseng et al., 2004) and fear conditioning (e.g., McEchron et al., 1998), hippocampal damage severely impairs the acquisition of conditioned responding during trace conditioning, but not delay conditioning. These selective hippocampal deficits with trace conditioning are modulated by the inter-stimulus interval (ISI) between CS onset and US onset. With very short ISIs (∼300 ms in eyeblink conditioning in rabbits), there is little deficit in the acquisition of responding during trace conditioning (Moyer, Jr. et al., 1990). Furthermore, with very long ISIs (>1000 ms), delay conditioning is also impaired by hippocampal lesions (Beylin et al., 2001). These interactions between ISI and the hippocampaldependency of conditioning are the primary data that motivate the new model. 1 TD Model of Conditioning Our full model of conditioning consists of three separate modules: the stimulus representation, learning algorithm, and response rule. The explanation of hippocampal function relies mostly on the details of the stimulus representation. To illustrate the implications of these representational issues, we have chosen the temporal-difference (TD) learning algorithm from reinforcement learning (Sutton & Barto, 1990, 1998) that has become the sine qua non for modeling reward learning in dopamine neurons (e.g., Ludvig et al., 2008; Schultz, Dayan, & Montague, 1997), and a simple, leaky-integrator response rule described below. We use these for simplicity and consistency with prior work; other learning algorithms and response rules might also yield similar conclusions. 1.1 Stimulus Representation In the model, stimuli are not coherent wholes, but are represented as a series of elements or internal microstimuli. There are two types of elements in the stimulus representation: the first is the presence microstimulus, which is exactly equivalent to the external stimulus (Sutton & Barto, 1990). This microstimulus is available whenever the corresponding stimulus is on (see Fig. 3). The second type of elements are the temporal microstimuli or spectral traces, which are a series of successively later and gradually broadening elements (see Grossberg & Schmajuk, 1989; Machado, 1997; Ludvig et al., 2008). Below, we show how the interaction between these two types of representational elements produces different styles of learning in delay and trace conditioning, resulting in differential sensitivity of these procedures to hippocampal manipulation. The temporal microstimuli are created in the model through coarse coding of a decaying memory trace triggered by stimulus onset. Figure 2 illustrates how this memory trace (left panel) is encoded by a series of basis functions evenly spaced across the height of the trace (middle panel). Each basis function effectively acts as a receptive field for trace height: As the memory trace fades, different basis functions become more or less active, each with a particular temporal profile (right panel). These activity profiles for the temporal microstimuli are then used to generate predictions of the US. For the basis functions, we chose simple Gaussians: f(y, µ, σ) = 1 √ 2π exp(−(y −µ)2 2σ2 ). (1) 2 0 20 40 60 0 0.1 0.2 0.3 0.4 Time Step Microstimulus Level 0 20 40 60 0 0.25 0.5 0.75 1 Time Step Trace Height + Temporal Basis Functions Figure 2: Creating Microstimuli. The memory traces for a stimulus (left) are coarsely coded by a series of temporal basis functions (middle). The resultant time courses (right) of the temporal microstimuli are used to predict future occurrence of the US. A single basis function (middle) and approximately corresponding microstimulus (right) have been darkened. The inset in the right panel shows the levels of several microstimuli at the time indicated by the dashed line. Given these basis functions, the microstimulus levels xt(i) at time t are determined by the corresponding memory trace height: xt(i) = f(yt, i/m, σ)yt, (2) where f is the basis function defined above and m is the number of temporal microstimuli per stimulus. The trace level yt was set to 1 at stimulus onset and decreased exponentially, controlled by a single decay parameter, which was allowed to vary to simulate the effects of hippocampal lesions. Every stimulus, including the US, was represented by a single memory trace and resultant microstimuli. 1.2 Hippocampal Damage We propose that hippocampal damage results in the selective loss of the long-latency temporal elements of the stimulus representation. This idea is implemented in the model through a decrease in the memory decay constant from .985 to .97, approximately doubling the decay rate of the memory trace that determines the microstimuli. In effect, we assume that hippocampal damage results in a memory trace that decays more quickly, or, equivalently, is more susceptible to interference. Figure 3 shows the effects of this parameter manipulation on the time course of the elements in the stimulus representation. The presence microstimulus is not affected by this manipulation, but the temporal microstimuli are compressed for both the CS and the US. Each microstimulus has a briefer time course, and, as a group, they cover a shorter time span. Other means for eliminating or reducing the long-latency temporal microstimuli are certainly possible and would likely be compatible with our theory. For example, if one assumes that the stimulus representation contains multiple memory traces with different time constants, each with a separate set of microstimuli, then eliminating the slower memory traces would also remove the long-latency elements, and many of the results below hold (simulations not shown). The key point is that hippocampal damage reduces the number and magnitude of long-latency microstimuli. 1.3 Learning and Responding The model approaches conditioning as a reinforcement-learning prediction problem, wherein the agent tries to predict the upcoming rewards or USs. The model learns through linear TD(λ) (Ludvig et al., 2008; Schultz et al., 1997; Sutton, 1988; Sutton & Barto, 1990, 1998). At each time step, the US prediction (Vt) is determined by: Vt(x) = ⌊wT t x⌋0 = $ n X i=1 wt(i)x(i) % 0 , (3) 3 0 500 1000 0 0.2 0.4 0.6 0.8 0 500 1000 0 0.2 0.4 0.6 0.8 Time (ms) Microstimulus Level Hippocampal Normal Figure 3: Hippocampal effects on the stimulus representation. The left panel presents the stimulus representation in delay conditioning with the normal parameter settings, and the right panel presents the altered stimulus representation following simulated hippocampal damage. In the hippocampal representation, the temporal microstimuli for both CS (red, solid lines) and US (green, dashed lines) are all briefer and shallower. The presence microstimuli (blue square wave and black spike) are not affected by the hippocampal manipulation. where x is a vector of the activation levels x(i) for the various microstimuli, wt is a corresponding vector of adjustable weights wt(i) at time step t, and n is the total number of all microstimuli. The US prediction is constrained to be non-negative, with negative values rectified to 0. As is standard in TD models, this US prediction is compared to the reward received and the previous US prediction to generate a TD error (δt): δt = rt + γVt(xt) −Vt(xt−1), (4) where γ is a discount factor that determines the temporal horizon of the US prediction. This TD error is then used to update the weight vector based on the following update rule: wt+1 = wt + αδtet, (5) where α is a step-size parameter and et is a vector of eligibility trace levels (see Sutton & Barto, 1998), which together help determine the speed of learning. Each microstimulus has its own corresponding eligibility trace which continuously decays, but accumulates whenever that microstimulus is present: et+1 = γλet + xt, (6) where γ is the discount factor as above and λ is a decay parameter that determines the plasticity window. These US predictions are translated into responses through a simple, thresholded leakyintegrator response rule: at+1 = υat + ⌊Vt+1(xt)⌋θ, (7) where υ is a decay constant, and θ is a threshold on the value function V . Our model is defined by Equations 1-7 and 7 additional parameters, which were fixed at the following values for the simulations below: λ = .95, α = .005, γ = .97, n = 50, σ = .08, υ = .93, θ = .25. In the simulated experiments, one time step was interpreted as 10 ms. 4 Trials CR Magnitude ISI250 ISI500 ISI1000 50 250 500 0 1 2 3 4 5 Delay!Normal Delay!HPC Trace!Normal Trace!HPC 50 250 500 0 1 2 3 4 5 50 250 500 0 1 2 3 4 5 Figure 4: Learning in the model for trace and delay conditioning with and without hippocampal (HPC) damage. The three panels present training with different interstimulus intervals (ISI). 2 Results We simulated 12 total conditions with the model: trace and delay conditioning, both with and without hippocampal damage, for short (250 ms), medium (500 ms), and long (1000 ms) ISIs. Each simulated experiment was run for 500 trials, with every 5th trial an unreinforced probe trial, during which no US was presented. For delay conditioning, the CS lasted the same duration as the ISI and terminated with US presentation. For trace conditioning, the CS was present for 5 time steps (50 ms). The US always lasted for a single time step, and an inter-trial interval of 5000 ms separated all trials (onset to onset). Conditioned responding (CR magnitude) was measured as the maximum height of the response curve on a given trial. Figure 4 summarizes our results. The figure depicts how the CR magnitude changed across the 500 trials of acquisition training. In general, trace conditioning produced lower levels of responding than delay conditioning, but this effect was most pronounced with the longest ISI. The effects of simulated hippocampal damage varied with the ISI. With the shortest ISI (250 ms; left panel), there was little effect on responding in either trace or delay conditioning. There was a small deficit early in training with trace conditioning, but this difference disappeared quickly with further training. With the longest ISI (1000 ms; right panel), there was a profound effect on responding in both trace and delay conditioning, with trace conditioning completely eliminated. The intermediate ISI (500 ms; middle panel) produced the most complex and interesting results. With this interval, there was only a minor deficit in delay conditioning, but a substantial drop in trace conditioning, especially early in training. This pattern of results roughly matches the empirical data, capturing the selective deficit in trace conditioning caused by hippocampal lesions (Solomon et al., 1986) as well as the modulation of this deficit by ISI (Beylin et al., 2001; Moyer, Jr. et al., 1990). 0 250 500 750 0 1 2 3 4 5 0 500 250 750 0 0.2 0.4 0.6 0.8 Delay Trace Time (ms) US Prediction CR Magnitude Time (ms) Figure 5: Time course of US prediction and CR magnitude for both trace (red, dashed line) and delay conditioning (blue, solid line) with a 500-ms ISI. 5 These differences in sensitivity to simulated hippocampal damage arose despite similar model performance during normal trace and delay conditioning. Figure 5 shows the time course of the US prediction (left panel) and CR magnitude (right panel) after trace and delay conditioning on a probe trial with a 500-ms ISI. In both instances, the US prediction grew throughout the trial as the usual time of the US became imminent. Note the sharp drop off in US prediction for delay conditioning exactly as the CS terminates. This change reflects the disappearance of the presence microstimulus, which supports much of the responding in delay conditioning (see Fig. 6). In both procedures, even after the usual time of the US (and CS termination in the case of delay conditioning), there was still some residual US prediction. These US predictions were caused by the long-latency microstimuli, which did not disappear exactly at CS offset, and were ordinarily (on non-probe trials) countered by negative weights on the US microstimuli. The CR magnitude tracked the US prediction curve quite closely, peaking around the time the US would have occurred for both trace and delay conditioning. There was little difference in either curve between trace and delay conditioning, yet altering the stimulus representation (see Fig. 3) had a more pronounced effect on trace conditioning. An examination of the weight distribution for trace and delay conditioning explains why hippocampal damage had a more pronounced effect on trace than delay conditioning. Figure 6 depicts some representative microstimuli (left column) as well as their corresponding weights (right columns) following trace or delay conditioning with or without simulated hippocampal damage. For clarity in the figure, we have grouped the weights into four categories: positive (+), large positive (+++), negative (-), and large negative (--). The left column also depicts how the model poses the computational problem faced by an animal during conditioning; the goal is to sum together weighted versions of the available microstimuli to produce the ideal US prediction curve in the bottom row. In normal delay conditioning, the model placed a high positive weight on the presence microstimulus, but balanced that with large negative weights on the early CS microstimuli, producing a prediction topography that roughly matched the ideal prediction (see Fig. 5, left panel). In normal trace conditioning, the model only placed a small positive weight on the presence microstimulus, but supplemented that with large positive weights on both the early and late CS microstimuli, also producing a prediction topography that roughly matched the ideal prediction. Ideal Summed Prediction US Early Microstimuli CS Late Microstimuli CS Presence Stimulus CS Early Microstimuli Delay +++ -+ Trace + + +++ -Delay +++ -N/A Trace + + N/A Normal HPC Lesion Weights Figure 6: Schematic of the weights (right columns) on various microstimuli following trace and delay conditioning. The left column illustrates four representative microstimuli: the presence microstimulus, an early CS microstimulus, a late CS microstimulus, and a US microstimulus. The ideal prediction is the expectation of the sum of future discounted rewards. 6 Following hippocampal lesions, the late CS microstimuli were no longer available (N/A), and the system could only use the other microstimuli to generate the best possible prediction profile. In delay conditioning, the loss of these long-latency microstimuli had a small effect, notable only with the longest ISI (1000 ms) with these parameter settings. With trace conditioning, the loss of the long-latency microstimuli was catastrophic, as these microstimuli were usually the major basis for the prediction of the upcoming US. As a result, trace conditioning became much more difficult (or impossible in the case of the 1000-ms ISI), even though delay conditioning was less affected. The most notable (and defining) difference between trace and delay conditioning is that the CS and US overlap in delay conditioning, but not trace conditioning. In our model, this overlap is necessary, but not sufficient, for the the unique interaction between the presence microstimulus and temporal microstimuli in delay conditioning. For example, if the CS were extended to stay on beyond the time of US occurrence, this contiguity would be maintained, but negative weights on the early CS microstimuli would not suffice to suppress responding throughout this extended CS. In this case, the best solution to predicting the US for the model might be to put high weights on the long-latency temporal microstimuli (as in trace conditioning; see Fig 6), which would not persist as long as the now extended presence microstimulus. Indeed, with a CS that was three times as long as the ISI, we found that the US prediction, CR magnitude, and underlying weights were completely indistinguishable from trace conditioning (simulations not shown). Thus, the model predicts that this extended delay conditioning should be equally sensitive to hippocampal damage as trace conditioning for the same ISIs. This empirical prediction is a fundamental test of the representational assumptions underlying the model. The particular mechanism that we chose for simulating the loss of the long-latency microstimuli (increasing the decay rate of the memory trace) also leads to a testable model prediction. If one were to pre-train an animal with trace conditioning and then perform hippocampal lesions, there should be some loss of responding, but, more importantly, those CRs that do occur should appear earlier in the interval because the temporal microstimuli now follow a shorter time course (see Fig. 3). There is some evidence for additional short-latency CRs during trace conditioning in lesioned animals (e.g., Port et al., 1986; Solomon et al., 1986), but, to our knowledge, this precise model prediction has not been rigorously evaluated. 3 Discussion and Conclusion We evaluated a novel computational model for the role of the hippocampus in trace conditioning, based on a reinforcement-learning framework. We extended the microstimulus TD model presented by Ludvig et al. (2008) by suggesting a role for the hippocampus in maintaining long-latency elements of the temporal stimulus representation. The current model also introduced an additional element to the stimulus representation (the presence microstimulus) and a simple response rule for translating prediction into actions; we showed how these subtle innovations yield interesting interactions when comparing trace and delay conditioning. In addition, we adduced a pair of testable model predictions about the effects of extended stimuli and post-training lesions. There are several existing theories for the role of the hippocampus in trace conditioning, including the modulation of timing (Solomon et al., 1986), establishment of contiguity (e.g., Wallenstein et al., 1998), and overcoming of task difficulty (Beylin et al., 2001). Our new model provides a computational mechanism that links these three proposed explanations. In our model, for similar ISIs, delay conditioning requires learning to suppress responding early in the CS, whereas trace conditioning requires learning to create responding later in the trial, near the time of the US (see Fig. 6). As a result, for the same ISI, delay conditioning requires changing weights associated with earlier microstimuli than trace conditioning, though in opposite directions. These early microstimuli reach higher activation levels (see Fig. 2), producing higher eligibility traces, and are therefore learned about more quickly. This differential speed of learning for short-latency temporal microstimuli corresponds with much behavioural data that shorter ISIs tend to improve both the speed and asymptote of learning in eyeblink conditioning (e.g., Schneiderman & Gormerzano, 1964). Thus, the contiguity between the CS and US in delay conditioning alters the timing problem that the animal faces, effectively making the time interval to be learned shorter, and rendering the task easier for most ISIs. In future work, it will be important to characterize the exact mathematical properties that constrain the temporal microstimuli. Our simple Gaussian basis function approach suffices for the datasets 7 examined here (cf. Ludvig et al., 2008), but other related mathematical functions are certainly possible. For example, replacing the temporal microstimuli in our model with the spectral traces of Grossberg & Schmajuk (1989) produces results that are similar to ours, but using sequences of Gamma-shaped functions tends to fail, with longer intervals learned too slowly relative to shorter intervals. One important characteristic of the microstimulus series seems to be that the heights of individual elements should not decay too quickly. Another key challenge for future modeling is reconciling this abstract account of hippocampal function in trace conditioning with approaches that consider greater physiological detail (e.g., Rodriguez & Levy, 2001; Yamazaki & Tanaka, 2005). The current model also contributes to our understanding of the TD models of dopamine (e.g., Schultz et al., 1997) and classical conditioning (Sutton & Barto, 1990). These models have often given short shrift to issues of stimulus representation, focusing more closely on the properties of the learning algorithm (but see Ludvig et al., 2008). Here, we reveal how the interaction of various stimulus representations in conjunction with the TD learning rule produces a viable model of some of the differences between trace and delay conditioning. References Beylin, A. V., Gandhi, C. C, Wood, G. E., Talk, A. C., Matzel, L. D., & Shors, T. J. (2001). The role of the hippocampus in trace conditioning: Temporal discontinuity or task difficulty? Neurobiology of Learning & Memory, 76, 447-61. Gould, E., Beylin, A., Tanapat, P., Reeves, A., & Shors, T. J. (1999). Learning enhances adult neurogenesis in the hippocampal formation. Nature Neuroscience, 2, 260-5. Grossberg, S., & Schmajuk, N. A. (1989). Neural dynamics of adaptive timing and temporal discrimination during associative learning. Neural Networks, 2, 79-102. Ludvig, E. A., Sutton, R. S., & Kehoe, E. J. (2008). Stimulus representation and the timing of reward-prediction errors in models of the dopamine system. Neural Computation, 20, 3034-54. Machado, A. (1997). Learning the temporal dynamics of behavior. Psychological Review, 104, 241-265. McEchron, M. D., Bouwmeester, H., Tseng, W., Weiss, C., & Disterhoft, J. F. (1998). Hippocampectomy disrupts auditory trace fear conditioning and contextual fear conditioning in the rat. Hippocampus, 8, 63846. McEchron, M. D., Disterhoft, J. F. (1997). Sequence of single neuron changes in CA1 hippocampus of rabbits during acquisition of trace eyeblink conditioned responses. Journal of Neurophysiology, 78, 1030-44. Moyer, J. R., Jr., Deyo, R. A., & Disterhoft, J. F. (1990). Hippocampectomy disrupts trace eye-blink conditioning in rabbits. Behavioral Neuroscience, 104, 243-52. Pavlov, I. P. (1927). Conditioned Reflexes. London: Oxford University Press. Port, R. L., Romano, A. G., Steinmetz, J. E., Mikhail, A. A., & Patterson, M. M. (1986). Retention and acquisition of classical trace conditioned responses by rabbits with hippocampal lesions. Behavioral Neuroscience, 100, 745-752. Rodriguez, P., & Levy, W. B. (2001). A model of hippocampal activity in trace conditioning: Where’s the trace? Behavioral Neuroscience, 115, 1224-1238. Schmajuk, N. A., & DiCarlo, J. J. (1992). Stimulus configuration, classical conditioning, and hippocampal function. Psychological Review, 99, 268-305. Schneiderman, N., & Gormezano, I. (1964). Conditioning of the nictitating membrane of the rabbit as a function of CS-US interval. Journal of Comparative and Physiological Psychology, 57, 188-195. Schultz, W., Dayan, P., & Montague, P. R. (1997). A neural substrate of prediction and reward. Science, 275, 1593-9. Solomon, P. R., Vander Schaaf, E. R., Thompson, R. F., & Weisz, D. J. (1986). Hippocampus and trace conditioning of the rabbit’s classically conditioned nictitating membrane response. Behavioral Neuroscience, 100, 729-744. Sutton, R. S. (1988). Learning to predict by the methods of temporal differences. Machine Learning, 3, 9-44. Sutton, R. S., & Barto, A. G. (1990). Time-derivative models of Pavlovian reinforcement. In M. Gabriel & J. Moore (Eds.), Learning and Computational Neuroscience: Foundations of Adaptive Networks (pp. 497-537). Cambridge, MA: MIT Press. Sutton, R. S., & Barto, A. G. (1998). Reinforcement Learning: An Introduction. Cambridge, MA: MIT Press. Tseng, W., Guan, R., Disterhoft, J. F., & Weiss, C. (2004). Trace eyeblink conditioning is hippocampally dependent in mice. Hippocampus, 14, 58-65. Wallenstein, G., Eichenbaum, H., & Hasselmo, M. (1998). The hippocampus as an associator of discontiguous events. Trends in Neuroscience, 21, 317-323. Yamazaki, T., & Tanaka, S. (2005). A neural network model for trace conditioning. International Journal of Neural Systems, 15, 23-30. 8
2008
202
3,457
Online Prediction on Large Diameter Graphs Mark Herbster, Guy Lever, Massimiliano Pontil Department of Computer Science University College London Gower Street, London WC1E 6BT, England, UK {m.herbster, g.lever, m.pontil}@cs.ucl.ac.uk Abstract We continue our study of online prediction of the labelling of a graph. We show a fundamental limitation of Laplacian-based algorithms: if the graph has a large diameter then the number of mistakes made by such algorithms may be proportional to the square root of the number of vertices, even when tackling simple problems. We overcome this drawback by means of an efficient algorithm which achieves a logarithmic mistake bound. It is based on the notion of a spine, a path graph which provides a linear embedding of the original graph. In practice, graphs may exhibit cluster structure; thus in the last part, we present a modified algorithm which achieves the “best of both worlds”: it performs well locally in the presence of cluster structure, and globally on large diameter graphs. 1 Introduction We study the problem of predicting the labelling of a graph in the online learning framework. Consider the following game for predicting the labelling of a graph: Nature presents a graph; nature queries a vertex vi1; the learner predicts ˆy1 ∈{−1, 1}, the label of the vertex; nature presents a label y1; nature queries a vertex vi2; the learner predicts ˆy2; and so forth. The learner’s goal is to minimise the total number of mistakes M = |{t : ˆyt ̸= yt}|. If nature is adversarial, the learner will always mispredict, but if nature is regular or simple, there is hope that a learner may make only a few mispredictions. Thus, a central goal of online learning is to design algorithms whose total mispredictions can be bounded relative to the complexity of nature’s labelling. In [9, 8, 7], the cut size (the number of edges between disagreeing labels) was used as a measure of the complexity of a graph’s labelling, and mistake bounds relative to this and the graph diameter were derived. The strength of the methods in [8, 7] is in the case when the graph exhibits “cluster structure”. The apparent deficiency of these methods is that they have poor bounds when the graph diameter is large relative to the number of vertices. We observe that this weakness is not due to insufficiently tight bounds, but is a problem in their performance. In particular, we discuss an example of a n-vertex labelled graph with a single edge between disagreeing label sets. On this graph, sequential prediction using the common method based upon minimising the Laplacian semi-norm of a labelling, subject to constraints, incurs θ(√n) mistakes (see Theorem 3). The expectation is that the number of mistakes incurred by an optimal online algorithm is bounded by O(ln n). We solve this problem by observing that there exists an approximate structure-preserving embedding of any graph into a path graph. In particular the cut-size of any labelling is increased by no more than a factor of two. We call this embedding a spine of the graph. The spine is the foundation on which we build two algorithms. Firstly we predict directly on the spine with the 1-nearest-neighbor algorithm. We demonstrate that this equivalent to the Bayes-optimal classifier for a particular Markov random field. A logarithmic mistake bound for learning on a path graph follows by the Halving algorithm analysis. Secondly, we use the spine of the graph as a foundation to add a binary support tree to the original graph. This enables us to prove a bound which is the “best of both worlds” – if the predicted set of vertices has cluster-structure we will obtain a bound appropriate for that case, but if instead, the predicted set exhibits a large diameter we will obtain a polylogarithmic bound. Previous work. The seminal approach to semi-supervised learning over graphs in [3] is to predict with a labelling which is consistent with a minimum label-separating cut. More recently, the graph Laplacian has emerged as a key object in semi-supervised learning, for example the semi-norm induced by the Laplacian is commonly either directly minimised subject to constraints, or used as a regulariser [14, 2]. In [8, 7] the online graph labelling problem was studied. An aim of those papers was to provide a natural interpretation of the bound on the cumulative mistakes of the kernel perceptron when the kernel is the pseudoinverse of the graph Laplacian – bounds in this case being relative to the cut and (resistance) diameter of the graph. In this paper we necessarily build directly on the very recent results in [7] as those results depend on the resistance diameter of the predicted vertex set as opposed to the whole graph [8]. The online graph labelling problem is also studied in [13], and here the graph structure is not given initially. A slightly weaker logarithmic bound for the online graph labelling problem has also been independently derived via a connection to an online routing problem in the very recent [5]. 2 Preliminaries We study the process of predicting a labelling defined on the vertices of a graph. Following the classical online learning framework, a sequence of labelled vertices {(vi1, y1), (vi2, y2), . . . }, the trial sequence, is presented to a learning algorithm such that, on sight of each vertex vit, the learner makes a prediction ˆyt for the label value, after which the correct label is revealed. This feedback information is then used by the learning algorithm to improve its performance on further examples. We analyse the performance of a learning algorithm in the mistake bound framework [12] – the aim is to minimise the maximum possible cumulative number of mistakes made on the training sequence. A graph G = (V, E) is a collection of vertices V = {v1, . . . , vn} joined by connecting (possibly weighted) edges. Denote i ∼j whenever vi and vj are connected so that E = {(i, j) : i ∼j} is the set of unordered pairs of connected vertex indices. Associated with each edge (i, j) ∈E is a weight Aij, so that A is the n × n symmetric adjacency matrix. We say that G is unweighted if Aij = 1 for every (i, j) ∈E and is 0 otherwise. In this paper, we consider only connected graphs – that is, graphs such that there exists a path between any two vertices. The Laplacian G of a graph G is the n × n matrix G = D −A, where D is the diagonal degree matrix such that Dii = P j Aij. The quadratic form associated with the Laplacian relates to the cut size of graph labellings. Definition 1. Given a labelling u ∈IRn of G = (V, E) we define the cut size of u by ΦG(u) = 1 4uT Gu = 1 4 X (i,j)∈E Aij(ui −uj)2. (1) In particular, if u ∈{−1, 1}n we say that a cut occurs on edge (i, j) if ui ̸= uj and ΦG(u) measures the number of cuts. We evaluate the performance of prediction algorithms in terms of the cut size and the resistance diameter of the graph. There is an established natural connection between graphs and resistive networks where each edge (i, j) ∈E is viewed as a resistor with resistance 1/Aij [4]. Thus the effective resistance rG(vi, vj) between vertex vi and vj is the potential difference needed to induce a unit current flow between vi and vj. The effective resistance may be computed by the formula [11] rG(vi, vj) = (ei −ej)T G+(ei −ej), (2) where “+” denotes the pseudoinverse and e1, . . . , en are the canonical basis vectors of IRn. The resistance diameter of a graph RG := maxvi,vj∈V rG(vi, vj) is the maximum effective resistance between any pair of vertices on the graph. 3 Limitations of online minimum semi-norm interpolation As we will show, it is possible to develop online algorithms for predicting the labelling of a graph which have a mistake bound that is a logarithmic function of the number of vertices. Conversely, we first highlight a deficiency in a standard Laplacian based method for predicting a graph labelling. Given a partially labelled graph G = (V, E) with |V | = n – that is, such that for some ℓ≤n, yℓ∈{−1, 1}ℓis a labelling defined on the ℓvertices Vℓ= {vi1, vi2, . . . , viℓ} – the minimum semi-norm interpolant is defined by ¯y = argmin{uT Gu : u ∈IRn, uik = yk, k = 1, . . . , ℓ}. We then predict using ˆyi = sgn(¯yi), for i = 1, . . . , n. The common justification behind the above learning paradigm [14, 2] is that minimizing the cut (1) encourages neighbouring vertices to be similarly labelled. However, we now demonstrate that in the online setting such a regime will perform poorly on certain graph constructions – there exists a trial sequence on which the method will make at least θ(√n) mistakes. Definition 2. An octopus graph of size d is defined to be d path graphs (the tentacles) of length d (that is, with d + 1 vertices) all adjoined at a common end vertex, to which a further single head vertex is attached, so that n = |V | = d2 + 2. This corresponds to the graph O1,d,d discussed in [8]. Theorem 3. Let G = (V, E) be an octopus graph of size d and y = (y1, . . . , y|V |) the labelling such that yi = 1 if vi is the head vertex and yi = −1 otherwise. There exists a trial sequence for which online minimum semi-norm interpolation makes θ( p |V |) mistakes. Proof. Let the first query vertex be the head vertex, and let the end vertex of a tentacle be queried at each subsequent trial. We show that this strategy forces at least d mistakes. The solution to the minimum semi-norm interpolation with boundary values problem is precisely the harmonic solution [4] ¯y (that is, for every unlabeled vertex vj, Pn i=1 Aij(¯yi −¯yj) = 0). If the graph is connected ¯y is unique and the graph labelling problem is identical to that of identifying the potential at each vertex of a resistive network defined on the graph where each edge corresponds to a resistor of 1 unit; the harmonic principle corresponds to Kirchoff’s current law in this case. Using this analogy, suppose that the end points of k < d tentacles are labelled and that the end vertex vq of an unlabelled tentacle is queried. Suppose a current of kλ flows from the head to the body of the graph. By Kirchoff’s law, a current of λ flows along each labelled tentacle (in order to obey the harmonic principle at every vertex it is clear that no current flows along the unlabelled tentacles). By Ohm’s law λ = 2 d+k. Minimum semi-norm interpolation therefore results in the solution ¯yq = 1 − 2k d + k ≥0 iffk ≤d. Hence the minimum semi-norm solution predicts incorrectly whenever k < d and the algorithm makes at least d mistakes. The above demonstrates a limitation in the method of online Laplacian minimum semi-norm interpolation for predicting a graph labelling – the mistake bound can be proportional to the square root of the number of data points. We solve these problems in the following section. 4 A linear graph embedding We demonstrate a method of embedding data represented as a connected graph G into a path graph, we call it a spine of G, which partially preserves the structure of G. Let Pn be the set of path graphs with n vertices. We would like to find a path graph with the same vertex set as G, which solves min P∈Pn max u∈{−1,1}n ΦP(u) ΦG(u) . If a Hamiltonian path H of G (a path on G which visits each vertex precisely once) exists, then the approximation ratio is ΦH(u) ΦG(u) ≤1. The problem of finding a Hamiltonian path is NP-complete however, and such a path is not guaranteed to exist. As we shall see, a spine S of G may be found efficiently and satisfies ΦS(u) ΦG(u) ≤2. We now detail the construction of a spine of a graph G = (V, E), with |V | = n. Starting from any node, G is traversed in the manner of a depth-first search (that is, each vertex is fully explored before backtracking to the last unexplored vertex), and an ordered list VL = {vl1, vl2, . . . , vl2m+1} of the vertices (m ≤|E|) in the order that they are visited is formed, allowing repetitions when a vertex is visited more than once. Note that each edge in EG is traversed no more than twice when forming VL. Define an edge multiset EL = {(l1, l2), (l2, l3), . . . , (l2m, l2m+1)} – the set of pairs of consecutive vertices in VL. Let u be an arbitrary labelling of G and denote, as usual, ΦG(u) = 1 4 P (i,j)∈EG(ui −uj)2 and ΦL(u) = 1 4 P (i,j)∈EL(ui −uj)2. Since the multiset EL contains every element of EG no more than twice, ΦL(u) ≤2ΦG(u). We then take any subsequence V ′ L of VL containing every vertex in V exactly once. A spine S = (V, ES) is a graph formed by connecting each vertex in V to its immediate neighbours in the subsequence V ′ L with an edge. Since a cut occurs between connected vertices vi and vj in S only if a cut occurs on some edge in EL located between the corresponding vertices in the list VL we have ΦS(u) ≤ΦL(u) ≤2ΦG(u). (3) Thus we have reduced the problem of learning the cut on a generic graph to that of learning the cut on a path graph. In the following we see that 1-nearest neighbour (1-NN) algorithm is a Bayes optimal algorithm for this problem. Note that the 1-NN algorithm does not perform well on general graphs; on the octopus graph discussed above, for example, it can make at least θ(√n) mistakes, and even θ(n) mistakes on a related graph construction [8]. 5 Predicting with a spine We consider implementing the 1-NN algorithm on a path graph and demonstrate that it achieves a mistake bound which is logarithmic in the length of the line. Let G = (V, E) be a path graph, where V = {v1, v2, . . . , vn} is the set of vertices and E = {(1, 2), (2, 3), . . . , (n −1, n)}. The nearest neighbour algorithm, in the standard online learning framework described above, attempts to predict a graph labelling by producing, for each query vertex vit, the prediction ˆyt which is consistent with the label of the closest labelled vertex (and predicts randomly in the case of a tie). Theorem 4. Given the task of predicting the labelling of any unweighted, n-vertex path graph P in the online framework, the number of mistakes, M, incurred by the 1-NN algorithm satisfies M ≤ΦP(u) log2  n −1 ΦP(u)  + ΦP(u) ln 2 + 1, (4) where u ∈{−1, 1}n is any labelling consistent with the trial sequence. Proof. We shall prove the result by noting that the Halving algorithm [1] (under certain conditions on the probabilities assigned to each hypothesis) implements the nearest neighbour algorithm on a path graph. Given any input space X and finite binary concept class C ⊂{−1, 1}|X|, the Halving algorithm learns any target concept c∗∈C as follows. Each hypothesis c ∈C is given an associated probability p(c). A sequence of labelled examples {(x1, y1), . . . , (xt−1, yt−1)} ⊂X × {−1, 1}, is revealed in accordance with the usual online framework. Let Ft be the set of feasible hypotheses at trial t; Ft = {c : c(xs) = ys ∀s < t}. Given an unlabelled example xt ∈X at trial t the predicted label ˆyt is that which agrees with the majority vote – that is, such that P c∈Ft,c(xt)=ˆyt p(c) P c∈Ft p(c) > 1 2 (and it predicts randomly if this is equal to 1 2). It is well known [1] that the Halving algorithm makes at most MH mistakes with MH ≤log2  1 p(c∗)  . (5) We now define a probability distribution over the space of all labellings u ∈{−1, 1}n of P such that the Halving algorithm with these probabilities implements the nearest neighbour algorithm. Let a cut occur on any given edge with probability α, independently of all other cuts; Prob(ui+1 ̸= ui) = α ∀i < n. The position of all cuts fixes the labelling up to flipping every label, and each of these two resulting possible arrangements are equally likely. This recipe associates with each possible labelling u ∈{−1, 1}n a probability p(u) which is a function of the labelling’s cut size p(u) = 1 2αΦP(u)(1 −α)n−1−ΦP(u). (6) This induces a full joint probability distribution on the space of vertex labels. In fact (6) is a Gibbs measure and as such defines a Markov random field over the space of vertex labels [10]. The mass function p therefore satisfies the Markov property p(ui = γ | uj = γj ∀j ̸= i) = p(ui = γ | uj = γj ∀j ∈Ni), (7) where here Ni is the set of vertices neighbouring vi – those connected to vi by an edge. We will give an equivalent Markov property which allows a more general conditioning to reduce to that over boundary vertices. Definition 5. Given a path graph P = (V, E), a set of vertices V ′ ⊂V and a vertex vi ∈V , we define the boundary vertices vℓ, vr (either of which may be vacuous) to be the two vertices in V ′ that are closest to vi in each direction along the path; its nearest neighbours in each direction. The distribution induced by (6) satisfies the following Markov property; given a partial labelling of P defined on a subset V ′ ⊂V , the label of any vertex vi is independent of all labels on V ′ except those on the vertices vℓ, vr (either of which could be vacuous) p(ui = γ | uj = γj, ∀j : vj ∈V ′) = p(ui = γ | uℓ= γℓ, ur = γr). (8) Given the construction of the probability distribution formed by independent cuts on graph edges, we can evaluate conditional probabilities. For example, p(uj = γ | uk = γ) is the probability of an even number of cuts between vertex vj and vertex vk. Since cuts occur with probability α and there are |k−j| s  possible arrangements of s cuts we have p(uj = γ | uk = γ) = X s even |k −j| s  αs(1 −α)|k−j|−s = 1 2(1 + (1 −2α)|k−j|). (9) Likewise we have that p(uj ̸= γ | uk = γ) = X s odd |k −j| s  αs(1 −α)|k−j|−s = 1 2(1 −(1 −2α)|k−j|). (10) Note also that for any single vertex we have p(ui = γ) = 1 2 for γ ∈{−1, 1}. Lemma 6. Given the task of predicting the labelling of an n-vertex path graph online, the Halving algorithm, with a probability distribution over the labellings defined as in (6) and such that 0 < α < 1 2, implements the nearest neighbour algorithm. Proof. Suppose that t −1 trials have been performed so that we have a partial labelling of a subset V ′ ⊂V , {(vi1, y1), (vi2, y2), . . . , (vit−1, yt−1)}. Suppose the label of vertex vit is queried so that the Halving algorithm makes the following prediction ˆyt for vertex vit: ˆyt = y if p(uit = y | uij = yj ∀1 ≤j < t) > 1 2, ˆyt = −y if p(uit = y | uij = yj ∀1 ≤j < t) < 1 2 (and predicts randomly if this probability is equal to 1 2). We first consider the case where the conditional labelling includes vertices on both sides of vit. We have, by (8), that p(uit = y | uij = yj ∀1 ≤j < t) = p(uit = y | uℓ= yτ(ℓ), ur = yτ(r)) = p(uℓ= yτ(ℓ) | ur = yτ(r), uit = y)p(ur = yτ(r), uit = y) p(uℓ= yτ(ℓ), ur = yτ(r)) = p(uℓ= yτ(ℓ) | uit = y)p(ur = yτ(r) | uit = y) p(uℓ= yτ(ℓ) | ur = yτ(r)) (11) where vℓand vr are the boundary vertices and τ(ℓ) and τ(r) are trials at which vertices vℓand vr are queried, respectively. We can evaluate the right hand side of this expression using (9, 10). To show equivalence with the nearest neighbour method whenever α < 1 2, we have from (9, 10, 11) p(uit = y | uℓ= y, ur ̸= y) = (1 + (1 −2α)|ℓ−it|)(1 −(1 −2α)|r−it|) 2(1 −(1 −2α)|ℓ−r|) which is greater than 1 2 if |ℓ−it| < |r −it| and less than 1 2 if |ℓ−it| > |r −it|. Hence, this produces predictions exactly in accordance with the nearest neighbour scheme. We also have more simply that for all it, ℓand r and α < 1 2 p(uit = y | uℓ= y, ur = y) > 1 2, and p(uit = y | uℓ= y) > 1 2. This proves the lemma for all cases. A direct application of the Halving algorithm mistake bound (5) now gives M ≤log2  1 p(u)  = log2  2 αΦP(u)(1 −α)n−1−ΦP(u)  where u is any labelling consistent with the trial sequence. We choose α = min( ΦP(u) n−1 , 1 2) (note that the bound is vacuous when ΦP(u) n−1 > 1 2 since M is necessarily upper bounded by n) giving M ≤ ΦP(u) log2  n −1 ΦP(u)  + (n −1 −ΦP(u)) log2  1 + ΦP(u) n −1 −ΦP(u)  + 1 ≤ ΦP(u) log2  n −1 ΦP(u)  + ΦP(u) ln 2 + 1. This proves the theorem. The nearest neighbour algorithm can predict the labelling of any graph G = (V, E), by first transferring the data representation to that of a spine S of G, as presented in Section 4. We now apply the above argument to this method and immediately deduce our first main result. Theorem 7. Given the task of predicting the labelling of any unweighted, connected, n-vertex graph G = (V, E) in the online framework, the number of mistakes, M, incurred by the nearest neighbour algorithm operating on a spine S of G satisfies M ≤2ΦG(u) max  0, log2  n −1 2ΦG(u)  + 2ΦG(u) ln 2 + 1, (12) where u ∈{−1, 1}n is any labelling consistent with the trial sequence. Proof. Theorem 4 gives bound (4) for predicting on any path, hence M ≤ΦS(u) log2  n−1 ΦS(u)  + ΦS(u) ln 2 + 1. Since this is an increasing function of ΦS(u) for ΦS(u) ≤n −1 and is vacuous at ΦS(u) ≥n −1 (M is necessarily upper bounded by n) we upper bound substituting ΦS(u) ≤ 2ΦG(u) (equation (3)). We observe that predicting with the spine is a minimax improvement over Laplacian minimal seminorm interpolation. Recall Theorem 3, there we showed that there exists a trial sequence such that Laplacian minimal semi-norm interpolation incurs θ(√n) mistakes. In fact this trivially generalizes to θ( p ΦG(u)n) mistakes by creating a colony of ΦG(u) octopi then identifying each previously separate head vertex as a single central vertex. The upper bound (12) is smaller than the prior lower bound. The computational complexity for this algorithm is O(|E|+|V | ln |V |) time. We compute the spine in O(|E|) time by simply listing vertices in the order in which they are first visited during a depthfirst search traversal of G. Using online 1-NN requires O(|V | ln |V |) time to predict an arbitrary vertex sequence using a self-balancing binary search tree (e.g., a red-black tree) as the insertion of each vertex into the tree and determination of the nearest left and right neighbour is O(ln |V |). 6 Prediction with a binary support tree The Pounce online label prediction algorithm [7] is designed to exploit cluster structure of a graph G = (V, E) and achieves the following mistake bound M ≤N(X, ρ, rG) + 4ΦG(u)ρ + 1, (13) for any ρ > 0. Here, u ∈IRn is any labelling consistent with the trial sequence, X = {vi1, vi2, . . . } ⊆V is the set of inputs and N(X, ρ, rG) is a covering number – the minimum number of balls of resistance diameter ρ (see Section 2) required to cover X. The mistake bound (13) can be preferable to (12) whenever the inputs are sufficiently clustered and so has a cover of small diameter sets. For example, consider two (m + 1)-cliques, one labeled “+1”, one “−1” with cm arbitrary interconnecting edges (c ≥1) here the bound (12) is vacuous while (13) is M ≤8c+3 (with ρ = 2 m, N(X, ρ, rG) = 2, and ΦG(u) = cm). An input space V may have both local cluster structure yet have a large diameter. Imagine a “universe” such that points are distributed into many dense clusters such that some sets of clusters are tightly packed but overall the distribution is quite diffuse. A given “problem” X ⊆V may then be centered on a few clusters or alternatively encompass the entire space. Thus, for practical purposes, we would like a prediction algorithm which achieves the “best of both worlds”, that is a mistake bound which is no greater, in order of magnitude, than the maximum of (12) and (13). The rest of this paper is directed toward this goal. We now introduce the notion of binary support tree, formalise the Pounce method in the support tree setting and then prove the desired result. Definition 8. Given a graph G = (V, E), with |V | = n, and spine S, we define a binary support tree of G to be any binary tree T = (VT , ET ) of least possible depth, D, whose leaves are the vertices of S, in order. Note that D < log2(n) + 1. We show that there is a weighting of the support tree which ensures that the resistance diameter of the support tree is small, but also such that any labelling of the leaf vertices can be extended to the support tree such that its cut size remains small. This enables effective learning via the support tree. A related construction has been used to build preconditioners for solving linear systems [6]. Lemma 9. Given any spine graph S = (V, E) with |V | = n, and labelling u ∈{−1, 1}n, with support tree T = (VT , ET ), there exists a weighting A of T , and a labelling ¯u ∈[−1, 1]|VT | of T such that ¯u and u are identical on V , ΦT (¯u) < ΦS(u) and RT ≤(log2 n + 1)(log2 n + 4)(log2(log2 n + 2))2. Proof. Let vr be the root vertex of T . Suppose each edge (i, j) ∈ET has a weight Aij, which is a function of the edge’s depth d = max{dT (vi, vr), dT (vj, vr)}, Aij = W(d) where dT (v, v′) is the number of edges in the shortest path from v to v′. Consider the unique labelling ¯u such that, for 1 ≤i ≤n we have ¯ui = ui and such that for every other vertex vp ∈VT , with child vertices vc1, vc2, we have ¯up = ¯uc1+¯uc2 2 , or ¯up = ¯uc in the case where vp has only one child, vc. Suppose the edges (p, c1), (p, c2) ∈ET are at some depth d in T , and let V ′ ⊂V correspond to the leaf vertices of T descended from vp. Define ΦS(uV ′) to be the cut of u restricted to vertices in V ′. If ¯uc1 = ¯uc2 then (¯up −¯uc1)2 + (¯up −¯uc2)2 = 0 ≤2ΦS(uV ′), and if ¯uc1 ̸= ¯uc2 then (¯up −¯uc1)2 + (¯up −¯uc2)2 ≤2 ≤2ΦS(uV ′). Hence W(d) (¯up −¯uc1)2 + (¯up −¯uc2)2 ≤2W(d)ΦS(uV ′) (14) (a similar inequality is trivial in the case that vp has only one child). Since the sets of leaf descendants of all vertices at depth d form a partition of V , summing (14) first over all parent nodes at a given depth and then over all integers d ∈[1, D] gives 4ΦT (¯u) ≤2 D X d=1 W(d)ΦS(u). (15) We then choose W(d) = 1 (d + 1)(log2(d + 1))2 (16) and note that P∞ d=1 1 (d+1)(log2(d+1))2 ≤1 2 + ln2 2 R ∞ 2 1 x ln2 xdx = 1 2 + ln 2 < 2. Further, RT = 2 PD d=1(d + 1)(log2(d + 1))2 ≤D(D + 3)(log2(D + 1))2 and so D ≤log2 n + 1 gives the resistance bound. Definition 10. Given the task of predicting the labelling of an unweighted graph G = (V, E) the augmented Pounce algorithm proceeds as follows: An augmented graph ¯G = ( ¯V , ¯E) is formed by attaching a binary support tree of G, with weights defined as in (16), to G; formally let T = (VT , ET ) be such a binary support tree of G, then ¯G = (VT , E ∪ET ). The Pounce algorithm is then used to predict the (partial) labelling defined on ¯G. Theorem 11. Given the task of predicting the labelling of any unweighted, connected, n-vertex graph G = (V, E) in the online framework, the number of mistakes, M, incurred by the augmented Pounce algorithm satisfies M ≤min ρ>0{N(X, ρ, rG) + 12ΦG(u)ρ} + 1, (17) where N(X, ρ, rG) is the covering number of the input set X = {vi1, vi2, . . . } ⊆V relative to the resistance distance rG of G and u ∈IRn is any labelling consistent with the trial sequence. Furthermore, M ≤12ΦG(u)(log2 n + 1)(log2 n + 4)(log2(log2 n + 2))2 + 2. (18) Proof. Let u be some labelling consistent with the trial sequence. By (3) we have that ΦS(u) ≤ 2ΦG(u) for any spine S of G. Moreover, by the arguments in Lemma 9 there exists some labelling ¯u of the weighted support tree T of G, consistent with u on V , such that ΦT (¯u) < ΦS(u). We then have Φ ¯G(¯u) = ΦT (¯u) + ΦG(u) < 3ΦG(u). (19) By Rayleigh’s monotonicity law the addition of the support tree does not increase the resistance between any vertices on G, hence N(X, ρ, r ¯G) ≤N(X, ρ, rG). (20) Combining inequalities (19) and (20) with the pounce bound (13) for predicting ¯u on ¯G, yields M ≤N(X, ρ, r ¯G) + 4Φ ¯G(¯u)ρ + 1 ≤N(X, ρ, rG) + 12ΦG(u)ρ + 1. which proves (17). We prove (18) by covering ¯G with single ball so that M ≤4Φ ¯G(¯u)R ¯G + 2 ≤ 12ΦG(u)RT + 2 and the result follows from the bound on RT in Lemma 9. 7 Conclusion We have explored a deficiency with existing online techniques for predicting the labelling of a graph. As a solution, we have presented an approximate cut-preserving embedding of any graph G = (V, E) into a simple path graph, which we call a spine, such that an implementation of the 1nearest-neighbours algorithm is an efficient realisation of a Bayes optimal classifier. This therefore achieves a mistake bound which is logarithmic in the size of the vertex set for any graph, and the complexity of our algorithm is of O(|E| + |V | ln |V |). We further applied the insights gained to a second algorithm – an augmentation of the Pounce algorithm, which achieves a polylogarithmic performance guarantee, but can further take advantage of clustered data, in which case its bound is relative to any cover of the graph. References [1] J. M. Barzdin and R. V. Frievald. On the prediction of general recursive functions. Soviet Math. Doklady, 13:1224–1228, 1972. [2] M. Belkin and P. Niyogi. Semi-supervised learning on riemannian manifolds. Machine Learning, 56:209– 239, 2004. [3] A. Blum and S. Chawla. Learning from labeled and unlabeled data using graph mincuts. In Proc. 18th International Conf. on Machine Learning, pages 19–26. Morgan Kaufmann, San Francisco, CA, 2001. [4] P. Doyle and J. Snell. Random walks and electric networks. Mathematical Association of America, 1984. [5] J. Fakcharoenphol and B. Kijsirikul. Low congestion online routing and an improved mistake bound for online prediction of graph labeling. CoRR, abs/0809.2075, 2008. [6] K. Gremban, G. Miller, and M. Zagha. Performance evaluation of a new parallel preconditioner. Parallel Processing Symposium, International, 0:65, 1995. [7] M. Herbster. Exploiting cluster-structure to predict the labeling of a graph. In The 19th International Conference on Algorithmic Learning Theory, pages 54–69, 2008. [8] M. Herbster and M. Pontil. Prediction on a graph with a perceptron. In B. Sch¨olkopf, J. Platt, and T. Hoffman, editors, Advances in Neural Information Processing Systems 19, pages 577–584. MIT Press, Cambridge, MA, 2007. [9] M. Herbster, M. Pontil, and L. Wainer. Online learning over graphs. In ICML ’05: Proceedings of the 22nd international conference on Machine learning, pages 305–312, New York, NY, USA, 2005. ACM. [10] R. Kinderman and J. L. Snell. Markov Random Fields and Their Applications. Amer. Math. Soc., Providence, RI, 1980. [11] D. Klein and M. Randi´c. Resistance distance. Journal of Mathematical Chemistry, 12(1):81–95, 1993. [12] N. Littlestone. Learning when irrelevant attributes abound: A new linear-threshold algorithm. Machine Learning, 2:285–318, 1988. [13] K. Pelckmans and J. A. Suykens. An online algorithm for learning a labeling of a graph. In In Proceedings of the 6th International Workshop on Mining and Learning with Graphs, 2008. [14] X. Zhu, Z. Ghahramani, and J. Lafferty. Semi-supervised learning using gaussian fields and harmonic functions. In 20-th International Conference on Machine Learning (ICML-2003), pages 912–919, 2003.
2008
203
3,458
Sparse probabilistic projections C´edric Archambeau Department of Computer Science University College London, United Kingdom c.archambeau@cs.ucl.ac.uk Francis R. Bach INRIA - Willow Project Ecole Normale Sup´erieure, Paris, France francis.bach@mines.org Abstract We present a generative model for performing sparse probabilistic projections, which includes sparse principal component analysis and sparse canonical correlation analysis as special cases. Sparsity is enforced by means of automatic relevance determination or by imposing appropriate prior distributions, such as generalised hyperbolic distributions. We derive a variational Expectation-Maximisation algorithm for the estimation of the hyperparameters and show that our novel probabilistic approach compares favourably to existing techniques. We illustrate how the proposed method can be applied in the context of cryptoanalysis as a preprocessing tool for the construction of template attacks. 1 Introduction Principal component analysis (PCA) is widely used for data pre-processing, data compression and dimensionality reduction. However, PCA suffers from the fact that each principal component is a linear combination of all the original variables. It is thus often difficult to interpret the results. In recent years, several methods for sparse PCA have been designed to find projections which retain maximal variance, while enforcing many entries of the projection matrix to be zero [20, 6]. While most of these methods are based on convex or partially convex relaxations of the sparse PCA problem, [16] has looked at using the probabilistic PCA framework of [18] along with ℓ1-regularisation. Canonical correlation analysis (CCA) is also commonly used in the context for dimensionality reduction.The goal is here to capture features that are common to several views of the same data. Recent attempts for constructing sparse CCA include [10, 19]. In this paper, we build on the probabilistic interpretation of CCA outlined by [2] and further extended by [13]. We introduce a general probabilistic model, which allows us to infer from an arbitrary number of views of the data, both a shared latent representation and individual low-dimensional representations of each one of them. Hence, the probabilistic reformulations of PCA and CCA fit this probabilistic framework. Moreover, we are interested in sparse solutions, as these are important for interpretation purposes, denoising or feature extraction. We consider a Bayesian approach to the problem. A proper probabilistic approach allows us to treat the trade-off between the modelling accuracy (of the high-dimensional observations by low-dimensional latent variables) and the degree of sparsity of the projection directions in principled way. For example, we do not need to estimate the sparse components successively, using, e.g., deflation, but we can estimate all sparse directions jointly as we are taking the uncertainty of the latent variable into account. In order to ensure sparse solutions we propose two strategies. The first one, discussed in Appendix A, is based on automatic relevance determination (ARD) [14]. No parameter needs to be set in advance. The entries in the projection matrix which are not well determined by the data are automatically driven to zero. The second approach uses priors from the generalised hyperbolic family [3], and more specifically the inverse Gamma. In this case, the degree of sparsity can be adjusted, eventually leading to very sparse solutions if desired. For both approaches we derive a variational EM algorithm [15]. 1 (a) −10 −5 0 5 10 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 ! p(! ) a/DQ=0.1 a/DQ=1 a/DQ=10 (b) Figure 1: (a) Graphical model (see text for details). Arrows denote conditional dependencies. Shaded and unshaded nodes are respectively observed and unobserved random variables. Plates indicate repetitions. (b) Marginal prior on the individual matrix entries (b = 1). 2 Generative model We consider the graphical model shown in Figure 1(a). For each observation, we have P independent measurements x1, . . . , xP in different measurement spaces or views. The measurement xp ∈RDp is modelled as a mix of a common (or view independent) continuous latent vector y0 ∈RQ0 and a view dependent continuous latent vector yp ∈RQp, such that xp = Wpy0 + Vpyp + µp + ϵp, Wp ∈RDp×Q0, Vp ∈RDp×Qp, (1) where {µp}P p=1 are the view dependent offsets and ϵp ∼N(0, τ −1 p IDp) is the residual error in view p. We are interested in the case where y0 and yp are low-dimensional vectors, i.e., Q0, Qp ≪Dp for all p. We impose Gaussian priors on the latent vectors: y0 ∼N(0, Φ−1 0 ), yp ∼N(0, Φ−1 p ), p ∈{1, . . . , P}. (2) The resulting generative model comprises a number of popular probabilistic projection techniques as special cases. If there is a single view (and a single latent cause) and the prior covariance is diagonal, we recover probabilistic factor analysis [9]. If the prior is also isotropic, then we get probabilistic PCA [18]. If there are two views, we recover probabilistic CCA [2]. We seek a solution for which the matrices {Wp}P p=1 and {Vp}P p=1 are sparse, i.e. most of their entries are zero. One way to achieve sparsity is by means of ARD-type priors [14]. In this framework, a zero-mean Gaussian prior is imposed on the entries of the weight matrices: wipj ∼N(0, 1/αipj), ip ∈{1, . . . , Dp}, j ∈{1, . . . , Q0}, (3) vipkp ∼N(0, 1/βipkp), ip ∈{1, . . . , Dp}, kp ∈{1, . . . , Qp}. (4) Type II maximum likelihood leads then to a sparse solution when considering independent hyperparameters. The updates arising in the context of probabilistic projections are given in Appendix A. Since marginalisation with respect to both the latent vectors and the weights is intractable, we apply variational EM [15]. Unfortunately, following this route does not allow us to adjust the degree of sparsity, which is important e.g. for interpretation purposes or for feature extraction. Hence, we seek a more flexible approach. In the remaining of this paper, we will assume that the marginal prior on each weight λij, which is either an entry of {Wp}P p=1 or {Vp}P p=1 and will be defined shortly, has the form of an (infinite) weighted sum of scaled Gaussians: p(λij) = Z N(0, γ−1 ij ) p(γij) dγij. (5) We will chose the prior over γij in such a way that the resulting marginal prior over the corresponding λij induces sparsity. A similar approach was followed in the context of sparse nonparametric Bayesian regression in [4, 5]. 2 2.1 Compact reformulation of the generative model Before discussing the approximate inference scheme, we rewrite the model in a more compact way. Let us denote the nth observation, the corresponding latent vector and the means respectively by xn = x⊤ n1, . . . , x⊤ nP ⊤, zn = y⊤ n0, y⊤ n1, . . . , y⊤ nP ⊤, µ = µ⊤ 1 , . . . , µ⊤ P ⊤. The generative model can be reformulated as follows: zn ∼N(0, Φ−1), Φ ∈RQ×Q, Q = Q0 + P pQp, (6) λij|γij ∼N(0, γ−1 ij ), i ∈{1, . . . , D}, j ∈{1, . . . , Q}, D = P pDp, (7) xn|zn, Λ ∼N(Λzn + µ, Ψ−1), Λ ∈RD×Q, Ψ ∈RD×D, (8) where Λ =    Λ1 ... ΛP   =    W1 V1 . . . 0 ... ... ... ... WP 0 . . . VP   , Ψ =    τ1ID1 . . . 0 ... ... ... 0 . . . τP IDP   . Note that we do not assume that the latent spaces are correlated as Φ = diag{Φ0, Φ1, . . . , ΦP }. This is consistent with the fact the common latent space is modelled independently through y0. Subsequently, we will also denote the matrix of the hyperparameters by Γ ∈RD×Q, where we set (and fix) γij = ∞for all λij = 0. 2.2 Sparsity inducing prior over the individual scale variables We impose an inverse Gamma prior on the scale variable γij: γij ∼IG(a/DQ, b), (9) for all i and j. The shape parameter a and the scale parameter b are non-negative. The marginal prior on the weight λij is then in the class of the generalised hyperbolic distributions [3] and is defined in terms of the modified Bessel function of the third kind Kω(·): p(λij) = r 2 π b a DQ Γ( a DQ) λ2 ij 2b ! a 2DQ −1 4 K a DQ −1 2 q 2bλ2 ij  (10) for λij ̸= 0, and lim λij→0 p(λij) = ( q b 2π Γ( a DQ −1 2 ) Γ( a DQ ) a DQ > 1 2, ∞ otherwise. (11) The function Γ(·) is the (complete) Gamma function. The effective prior on the individual weights is shown in Figure 1(b). Intuitively, the joint distribution over the weights is sparsity inducing as it is sharply peaked around zero (and in fact infinite for sufficiently small a). It favours only a small number of weights to be non-zero if the scale variable b is sufficiently large. For a more formal discussion in the context of regression we refer to [7]. It is interesting to note that for a/DQ = 1 we recover the popular Laplace prior, which is equivalent to the ℓ1-regulariser or the LASSO [17], and for a/DQ →0 and b →0 the resulting prior is the Normal-Jeffreys prior. In fact, the automatic thresholding method described in Appendix A fits also into the framework defined by (5). However, it corresponds to imposing a flat prior on the scale variables over the log-scale, which is a limiting case of the Gamma distribution. When imposing independent Gamma priors on the scale variables, the effective joint marginal is a product of Student-t distributions, which again is sharply peaked around zero and sparsity inducing. 3 Variational approximation We view {zn}N n=1 and matrix Γ as latent variables, and optimise the parameters θ = {µ, Φ, Λ, Ψ} by EM. In other words, we view the weight matrix Λ as a matrix of parameter and estimate the 3 entries by maximum a posteriori (MAP) learning. The other parameters are estimated by maximum likelihood (ML). The variational free energy is given by Fq(x1, . . . , xN, θ) = − N X n=1 ⟨ln p(xn, zn, Γ|θ)⟩q −H[q(z1, . . . , zN, Γ)], (12) where ⟨·⟩q denotes the expectation with respect to the variational distribution q and H[·] is the differential entropy. Since the Kullback-Leibler divergence (KL) is non-negative, the negative free energy is a lower bound to log-marginal likelihood: N X n=1 ln p(xn|θ) = −Fq({xn}, θ) + KL [q({zn}, Γ)∥p({zn}, Γ)|{xn}, θ)] ⩾−Fq({xn}, θ). (13) Interestingly it is not required to make a factorised approximation of the the joint posterior q to find a tractable solution. Indeed, the posterior q factorises naturally given the data and the weights, such that the posteriors we will obtain in the E-step are exact. The variational EM finds maximum likelihood estimates for the parameters by cycling through the following two steps until convergence: 1. The posterior over the latent variables are computed for fixed parameters by minimising the KL in (13). It can be shown that the variational posteriors are given by q(z1, . . . , zN) ∝ N Y n=1 e⟨ln p(xn,zn,Γ|θ)⟩q(Γ), (14) q(Γ) ∝e⟨ln p(xn,zn|Γ,θ)⟩q(z1,...,zN )p(Γ). (15) 2. The variational free energy (12) is minimised wrt the parameters for fixed q. This leads in effect to type II ML estimates for the paramteres and is equivalent to maximising the expected complete log-likelihood: θ ←argmax θ N X n=1 ⟨ln p(xn, zn, Γ|θ)⟩q . (16) Depending on the initialisation, the variational EM algorithm converges to a local maximum of the log-marginal likelihood. The convergence can be checked by monitoring the variational lower bound, which monotonically increases during the optimisation. The explicit expression of the variational bound is here omitted due to a lack of space 3.1 Posterior of the latent vectors The joint posterior of the latent vectors factorises into N posteriors due to the fact the observations are independent. Hence, the posterior of each low-dimenstional latent vector is given by q(zn) = N(¯zn, ¯Sn), (17) where ¯zn = ¯SnΛ⊤Ψ(xn −µ) is the mean and ¯Sn = Λ⊤ΨΛ + Φ −1 is the covariance. 3.2 Posterior of the scale variables The inverse Gamma distribution is not conjugate to the exponential family. However, the posterior over matrix Γ is tractable. It has the form of a product of generalised inverse Gaussian distributions (see Appendix B for a formal definition): q(Γ) = D Y i=1 Q Y j=1 p(γij|λij) = D Y i=1 Q Y j=1 N −(¯ωij, ¯ϕij, ¯χij) (18) where ¯ωij = −a DQ + 1 2 is the index and ¯ϕij = λ2 ij and ¯χij = 2b are the shape parameters. The factorised form arises from the scale variable being independent conditioned on the weights. 4 3.3 Update for the parameters Based on the properties of the Gaussian and the generalised inverse Gaussian, we can compute the variational lower bound, which can then be maximised. This leads to the following updates: µ ←1 N N X n=1 (xn −Λ¯zn), Φ−1 ←1 N N X n=1 diag{¯zn¯z⊤ n + ¯Sn}, (19) λi ←  ¯Γi + Ψ(i, i) N X n=1 ⟨znz⊤ n ⟩ −1 Ψ(i, i) N X n=1 (xn(i) −µ(i))¯zn, (20) τ −1 p ← 1 NDp N X n=1  (xnp −µp)⊤(xnp −µp) −2(xnp −µp)⊤Λp¯zn + (Λpzn)⊤Λpzn , (21) where the required expectations are given by ⟨znz⊤ n ⟩= ¯Sn + ¯zn¯z⊤ n , (Λpzn)⊤Λpzn = tr{⟨¯zn¯z⊤ n ⟩Λ⊤ p Λp}, (22) ¯Γi = diag  ⟨γi1⟩, . . . , ⟨γiQ⟩ , ⟨γij⟩= s ¯χij ¯ϕij Kω+1 √¯χij ¯ϕij  Kω √¯χij ¯ϕij  . (23) Note that diag{·} denotes a block-diagonal operation in (19). More importantly, since we are seeking a sparse projection matrix, we do not suffer from the rotational ambiguity problem as is for example the case standard probabilistic PCA. 4 Experiments 4.1 Synthetic denoising experiments Because of identifiability issues which are subject of ongoing work, we prefer to compare various methods for sparse PCA in a denoising experiment. That is, we assume that the data were generated from sparse components plus some noise and we compare the various sparse PCA on the denoising task, i.e., on the task of recovering the original data. We generated the data as follows: select uniformly at random M = 4 unit norm sparse vectors in P = 10 dimensions with known number S = 4 of non zero entries, then generate i.i.d. values of the random variables Z from three possible distributions (Gaussian, Laplacian, uniform), then add isotropic noise of relative standard deviation 1/2. When the latent variables are Gaussian, our model exactly matches the data and our method should provide a better fit; however, we consider also situations where the model is misspecified in order to study the robustness of our probabilistic model. We consider our two models: SCA-1 (which uses automatic relevance determination type of sparsity priors) and SCA-2 (which uses generalised hyperbolic distribution), where we used 6 latent dimensions (larger than 4) and fixed hyperparameters that lead to vague priors. Those two models thus have no free parameters and we compare them to the following methods, which all have two regularisation parameters (rank and regularisation): DSPCA [6], the method of Zou [20] and the recent method of [16] which essentially considers a probabilistic PCA with ℓ1-penalty on the weights. In Table 1 we report mean-squared reconstruction error averaged over 10 replications. It can be seen that two proposed probabilistic approaches perform similarly and significantly outperform other sparse PCA methods, even when the model is misspecified. 4.2 Template attacks Power consumption and electromagnetic radiation are among the most extensively used sidechannels for analysing physically observable cryptographic devices. A common belief is that the useful information for attacking a device is hidden at times where the traces (or time series) have large variance. Once the relevant samples have been identified they can be used to construct templates, which can then be used to assess if a device is secure. A simple, yet very powerful approach, recently proposed by [1], is to select time samples based on PCA. Figure 2(a) shows the weight 5 N SCA-1 SCA-2 Zou DSPCA L1-PCA 100 39.9 40.8 42.2 42.9 50.8 200 36.5 36.8 40.8 41.4 50.4 400 35.5 35.5 39.8 40.3 42.5 N SCA-1 SCA-2 Zou DSPCA L1-PCA 100 39.9 40.9 42.6 43.6 49.8 200 36.8 37.0 40.9 41.1 48.1 400 36.4 36.4 40.5 40.7 46.8 N SCA-1 SCA-2 Zou DSPCA L1-PCA 100 39.3 40.3 42.7 43.4 48.5 200 36.5 36.7 40.2 40.8 46.2 300 35.8 35.8 40.6 40.9 41.0 Table 1: Denoising experiment with sparse PCA (we report mean squared errors): (top) Gaussian distributed latent vectors, (middle) latent vectors generated from the uniform distribution, (bottom) latent vectors generated from the Laplace distribution. 0 20 40 60 80 100 120 140 160 180 200 0 0.1 0.2 Power 0 20 40 60 80 100 120 140 160 180 200 −1 0 1 !1 0 20 40 60 80 100 120 140 160 180 200 −1 0 1 !2 0 20 40 60 80 100 120 140 160 180 200 −1 0 1 !3 t (a) Probabilistic PCA. 0 20 40 60 80 100 120 140 160 180 200 0 0.1 0.2 Power 0 20 40 60 80 100 120 140 160 180 200 −1 0 1 !1 0 20 40 60 80 100 120 140 160 180 200 −1 0 1 !2 0 20 40 60 80 100 120 140 160 180 200 −1 0 1 !3 t (b) Sparse probabilistic PCA (SCA-2). Figure 2: Power traces and first three principal directions. associated to each time sample by the first three principal directions found by PCA. The problem with this approach is that all time samples get a non-zero weights. As a result, the user has to define a threshold manually in order to decide whether the information leakage at time t is relevant or not. Figure 2(b) shows the weight associated to the time samples by SCA-2 when using a Laplace prior (i.e. for a/DQ = 1). It can be observed that one gets a much better picture of where the relevant information is. Clearly, sparse probabilitic PCA can be viewed as being more robust to spurious noise and provides a more reliable and amenable solution. 5 Conclusion In this paper we introduced a general probabilistic model for inferring sparse probabilistic projection matrices. Sparsity was enforced by either imposing an ARD-type prior or by means of the a NormalInverse Gamma prior. Although the inverse Gamma is not conjugate to the exponential family, the posterior is tractable as it is a special case of the generalised inverse Gaussian [12], which in turn is a conjugate prior to this family. Future work will include the validation of the method on a wide range of applications and in particular as a feature extracting tool. Acknowledgments We are grateful to the PASCAL European network of excellence for partially supporting this work. 6 A Automatic thresholding the weights by ARD In this section, we provide the updates for achieving automatic thresholding of projection matrix entries in a probabilistic setting. We apply Tipping’s sparse Bayesian theory [8], which is closely related to ARD [14]. More specifically, we assume the prior over the scale variables is uniform over a log-scale, which is a limiting case of the Gamma distribution. Let us view {zn}N n=1 and Λ as latent variables and optimise the parameters θ = {µ, Φ, Ψ, Γ} by variational EM. The variational free energy is given by Fq(x1, . . . , xN, θ) = − N X n=1 ⟨ln p(xn, zn, Λ|θ)⟩q −H[q(z1, . . . , zN, Λ)]. (24) In order to find a tractable solution, we further have to assume that the approximate posterior q has a factorised form. We can then compute the posterior of the low-dimenstional latent vectors: q(zn) = N(¯zn, ¯Sn), (25) where ¯zn = ¯Sn ¯Λ ⊤Ψ(xn −µ) and ¯Sn = ¯Λ ⊤Ψ ¯Λ + P iΨ(i, i) ¯Σi + Φ −1. And the posterior of the weights is given by q(Λ) = D Y i=1 q(λi) = D Y i=1 N(¯λi, ¯Σi), (26) where ¯λi = ¯ΣiΨ(i, i) P n(xn(i) −µ(i))¯zn and ¯Σi = Γi + Ψ(i, i) P n{¯Sn + ¯zn¯z⊤ n } −1. The partially factorised form Q i q(λi) arises naturally. Note also that the update for the mean weights has the same form as in (20). Finally, the updates for the parameters are found by maximising the negative free energy, which corresponds to performing type II ML for the scaling variables. This yields µ ←1 N N X n=1 (xn −¯Λ¯zn), Φ−1 ←1 N N X n=1 diag ¯zn¯z⊤ n + ¯Sn , γij ←⟨λ2 ij⟩−1, (27) τ −1 p ← 1 NDp N X n=1  (xnp −µp)⊤(xnp −µp) −2(xnp −µp)⊤¯Λp¯zn + (Λpzn)⊤Λpzn , (28) where ⟨λ2 ij⟩= ¯λ2 ij + ¯Σi(j, j) and (Λpzn)⊤Λpzn = tr{(¯zn¯z⊤ n + ¯Sn) P ip(¯λip ¯λ ⊤ ip + ¯Σip)}. B Generalised inverse Gaussian distribution The Generalised inverse Gaussian distribution is in the class of generalised hyperbolic distributions. It is defined as follows [12, 11]: y ∼N −(ω, χ, φ) = χ−ω(√χφ)ω 2Kω(√χφ) yω−1e−1 2 (χy−1+φy), (29) where y > 0 and Kω(·) is the modified Bessel function of the third kind1 with index ω. The following expectations are useful [12]: ⟨y⟩= rχ φRω( p χφ), ⟨y−1⟩= s φ χR−ω( p χφ), ⟨ln y⟩= ln ω + d ln Kω(√χφ) dω , (30) where Rω(·) ≡Kω+1(·)/Kω(·). 1The modified Bessel function of the third kind is known under various names. In particular, it is also known as the modified Bessel function of the second kind (cf. E. W. Weisstein: ”Modified Bessel Function of the Second Kind.” From MathWorld: http://mathworld.wolfram.com/ModifiedBesselFunctionoftheSecondKind.html). 7 Inverse Gamma distribution When φ = 0 and ω < 0, the generalised inverse Gaussian distribution reduces to the inverse Gamma distribution: IG(a, b) = ba Γ(a)x−a−1e−b x , a, b > 0. (31) It is straightforward to verify this result by posing a = −ω and b = χ/2, and noting that lim y→0 Kω(y) = Γ(−ω)2−ω−1yω (32) for ω < 0. References [1] C. Archambeau, E. Peeters, F.-X. Standaert, and J.-J. Quisquater. Template attacks in principal subspaces. In L. Goubin and M. Matsui, editors, 8th International Workshop on Cryptographic Hardware and Embedded Systems(CHES), volume 4249 of Lecture Notes in Computer Science, pages 1–14. Springer, 2006. [2] F. Bach and M. I. Jordan. A probabilistic interpretation of canonical correlation analysis. Technical Report 688, Department of Statistics, University of California, Berkeley, 2005. [3] O. Barndorff-Nielsen and R. Stelzer. Absolute moments of generalized hyperbolic distributions and approximate scaling of normal inverse Gaussian L´evy processes. Scandinavian Journal of Statistics, 32(4):617–637, 2005. [4] P. J. Brown and J. E. Griffin. Bayesian adaptive lassos with non-convex penalization. Technical Report CRiSM 07-02, Department of Statistics, University of Warwick, 2007. [5] F. Caron and A. Doucet. Sparse bayesian nonparametric regression. In 25th International Conference on Machine Learning (ICML). ACM, 2008. [6] A. d’Aspremont, E. L. Ghaoui, M. I. Jordan, and G. R. G. Lanckriet. A direct formulation for sparse PCA using semidefinite programming. SIAM Review, 49(3):434–48, 2007. [7] J. Fan and R. Li. Variable selection via nonconcave penalized likelihood and its oracle properties. Journal of the American Statistical Association, 96:1348–1360, 2001. [8] A. C. Faul and M. E. Tipping. Analysis of sparse Bayesian learning. In T. G. Dietterich, S. Becker, and Z. Ghahramani, editors, Advances in Neural Information Processing Systems 14 (NIPS), pages 383–389. The MIT Press, 2002. [9] Z. Ghahramani and G. E. Hinton. The EM algorithm for mixtures of factor analyzers. Technical Report CRG-TR-96-1, Department of Computer Science, University of Toronto, 1996. [10] D. Hardoon and J. Shawe-Taylor. Sparse canonical correlation analysis. Technical report, PASCAL EPrints, 2007. [11] Wenbo Hu. Calibration of multivariate generalized hyperbolic distributions using the EM algorithm, with applications in risk management, portfolio optimization and portfolio credit risk. PhD thesis, Florida State University, United States of America, 2005. [12] B. Jørgensen. Statistical Properties of the Generalized Inverse Gaussian Distribution. Springer-Verlag, 1982. [13] A. Klami and S. Kaski. Local dependent components. In Z. Ghahramani, editor, 24th International Conference on Machine Learning (ICML), pages 425–432. Omnipress, 2007. [14] D. J. C. MacKay. Bayesian methods for backprop networks. In E. Domany, J.L. van Hemmen, and K. Schulten, editors, Models of Neural Networks, III, pages 211–254. 1994. [15] 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, pages 355–368. The MIT press, 1998. [16] C. D. Sigg and J. M. Buhmann. Expectation-maximization for sparse and non-negative PCA. In 25th International Conference on Machine Learning (ICML). ACM, 2008. [17] R. Tibshirani. Regression shrinkage and selection via the LASSO. Journal of the Royal Statistical Society B, 58:267–288, 1996. [18] M. E. Tipping and C. M. Bishop. Probabilistic principal component analysis. Journal of the Royal Statistical Society B, 61:611–622, 1999. [19] D. Torres, D. Turnbull, B. K. Sriperumbudur, L. Barrington, and G.Lanckriet. Finding musically meaningful words using sparse CCA. In NIPS workshop on Music, Brain and Cognition, 2007. [20] H. Zou, T. Hastie, and R. Tibshirani. Sparse principal component analysis. Journal of Computational and Graphical Statistics, 15(2):265–286, 2006. 8
2008
204
3,459
Sparsity of SVMs that use the ϵ-insensitive loss Ingo Steinwart Information Sciences Group CCS-3 Los Alamos National Laboratory Los Alamos, NM 87545, USA ingo@lanl.gov Andreas Christmann University of Bayreuth Department of Mathematics D-95440 Bayreuth Andreas.Christmann@uni-bayreuth.de Abstract In this paper lower and upper bounds for the number of support vectors are derived for support vector machines (SVMs) based on the ϵ-insensitive loss function. It turns out that these bounds are asymptotically tight under mild assumptions on the data generating distribution. Finally, we briefly discuss a trade-off in ϵ between sparsity and accuracy if the SVM is used to estimate the conditional median. 1 Introduction Given a reproducing kernel Hilbert space (RKHS) of a kernel k : X × X →R and training set D := ((x1, y1), . . . , (xn, yn)) ∈(X × R)n, the ϵ-insensitive SVM proposed by Vapnik and his co-workers [10, 11] for regression tasks finds the unique minimizer fD,λ ∈H of the regularized empirical risk λ∥f∥2 H + 1 n n X i=1 Lϵ(yi, f(xi)) , (1) where Lϵ denotes the ϵ-insensitive loss defined by Lϵ(y, t) := max{0, |y −t| −ϵ} for all y, t ∈R and some fixed ϵ ≥0. It is well known, see e.g. [2, Proposition 6.21], that the solution is of the form fD,λ = n X i=1 β∗ i k(xi, · ) , (2) where the coefficients β∗ i are a solution of the optimization problem maximize n X i=1 yiβi −ϵ n X i=1 |βi| −1 2 n X i,j=1 βiβjk(xi, xj) (3) subject to −C ≤βi ≤C for all i = 1, . . . , n. (4) Here we set C := 1/(2λn). Note that the equality constraint Pn i=1 βi = 0 needed in [2, Proposition 6.21] is superfluous since we do not include an offset term b in the primal problem (1). In the following, we write SV (fD,λ) := {i : β∗ i ̸= 0} for the set of indices that belong to the support vectors of fD,λ. Furthermore, we write # for the counting measure, and hence #SV (fD,λ) denotes the number of support vectors of fD,λ. It is obvious from (2) that #SV (fD,λ) has a crucial influence on the time needed to compute fD,λ(x). Due to this fact, the ϵ-insensitive loss was originally motivated by the goal to achieve sparse decision functions, i.e., decision functions fD,λ with #SV (fD,λ) < n. Although empirically it is well-known that the ϵ-insensitive SVM achieves this sparsity, there is, so far, no theoretical explanation in the sense of [5]. The goal of this work is to provide such an explanation by establishing asymptotically tight lower and upper bounds for the number of support vectors. Based on these bounds we then investigate the trade-off between sparsity and estimation accuracy of the ϵ-insensitive SVM. 2 Main results Before we can formulate our main results we need to introduce some more notations. To this end, let P be a probability measure on X × R, where X is some measurable space. Given a measurable f : X →R, we then define the Lϵ-risk of f by RLϵ,P(f) := E(x,y)∼PLϵ(y, f(x)). Moreover, recall that P can be split into the marginal distribution PX on X and the regular conditional probability P( · |x). Given a RKHS H of a bounded kernel k, [1] then showed that fP,λ := arg inf f∈H λ∥f∥2 H + RLϵ,P(f) exists and is uniquely determined whenever RLϵ,P(0) < ∞. Let us write δ(x,y) for the Dirac measure at some (x, y) ∈X × R. By considering the empirical measure D := 1 n Pn i=1 δ(xi,yi) of a training set D := ((x1, y1), . . . , (xn, yn)) ∈(X × R)n, we then see that the corresponding fD,λ is the solution of (1). Finally, we need to introduce the sets Aδ low(f) :=  (x, y) ∈X × R : |f(x) −y| > ϵ + δ Aδ up(f) :=  (x, y) ∈X × R : |f(x) −y| ≥ϵ −δ , where f : X →R is an arbitrary function and δ ∈R. Moreover, we use the short forms Alow(f) := A0 low(f) and Aup(f) := A0 up(f). Now we can formulate our first main result. Theorem 2.1 Let P be a probability measure on X × R and H be a separable RKHS with bounded measurable kernel satisfying ∥k∥∞≤1. Then, for all n ≥1, ρ > 0, δ > 0, and λ > 0 satisfying δλ ≤4, we have Pn D ∈(X × R)n : #SV (fD,λ) n > P Aδ low(fP,λ)  −ρ  ≥1 −3e−δ2λ2n 16 −e−2ρ2n and Pn D ∈(X × R)n : #SV (fD,λ) n < P Aδ up(fP,λ)  + ρ  ≥1 −3e−δ2λ2n 16 −e−2ρ2n . Before we present our second main result, we briefly illustrate Theorem 2.1 for the case where we fix the regularization parameter λ and let n →∞. Corollary 2.2 Let P be a probability measure on X ×R and H be a separable RKHS with bounded measurable kernel satisfying ∥k∥∞≤1. Then, for all ρ > 0 and λ > 0, we have lim n→∞Pn D ∈(X × R)n : P Alow(fP,λ)  −ρ ≤#SV (fD,λ) n ≤P Aup(fP,λ)  + ρ  = 1 . Note that the above corollary exactly describes the asymptotic behavior of the fraction of support vectors modulo the probability of the set Aup(fP,λ)\Alow(fP,λ) =  (x, fP,λ(x) −ϵ) : x ∈X ∪  (x, fP,λ(x) + ϵ) : x ∈X . In particular, if the conditional distributions P( · |x), x ∈X, have no discrete components, then the above corollary gives an exact description. Of course, in almost no situation it is realistic to assume that λ stays fixed if the sample size n grows. Instead, it is well-known, see [1], that the regularization parameter should vanish in order to achieve consistency. To investigate this case, we need to introduce some additional notations from [6] that are related to the Lϵ-risk. Let us begin by denoting the Bayes Lϵ-risk by R∗ Lϵ,P := inf RLϵ,P(f), where P is a distribution and the infimum is taken over all measurable functions f : X →R. In addition, given a distribution Q on R, [6] and [7, Chapter 3] defined the inner Lϵ-risks by CLϵ,Q(t) := Z R Lϵ(y, t) dQ(y) , t ∈R, and the minimal inner Lϵ-risks were denoted by C∗ Lϵ,Q := inft∈R CLϵ,Q(t). Obviously, we have RLϵ,P(f) = Z X CLϵ,P( · |x) f(x)  dPX(x) , (5) and [6, Lemma 2.5], see also [7, Lemma 3.4], further established the intuitive formula R∗ Lϵ,P = R X C∗ Lϵ,P( · |x) dPX(x). Moreover, we need the sets of conditional minimizers M∗(x) :=  t ∈R : CLϵ,P( · |x)(t) = C∗ Lϵ,P( · |x) . The following lemma collects some useful properties of these sets. Lemma 2.3 Let P be a probability measure on X × R with R∗ Lϵ,P < ∞. Then M∗(x) is a nonempty and compact interval for PX-almost all x ∈X. Given a function f : X →R, Lemma 2.3 shows that for PX-almost all x ∈X there exists a unique t∗(x) ∈M∗(x) such that t∗(x) −f(x) ≤ t −f(x) for all t ∈M∗(x) . (6) In other words, t∗(x) is the element in M∗(x) that has the smallest distance to f(x). In the following, we sometimes write t∗ λ(x) := t∗(x) if f = fP,λ and we wish to emphasize the dependence of t∗(x) on λ. With the help of these elements, we finally introduce the sets M δ low(f) :=  (x, y) ∈X × R : |t∗(x) −y| > ϵ + δ M δ up(f) :=  (x, y) ∈X × R : |t∗(x) −y| ≥ϵ −δ , where δ ∈R. Moreover, we again use the short forms Mlow(f) := M 0 low(f) and Mup(f) := M 0 up(f). Now we can formulate our second main result. Theorem 2.4 Let P be a probability measure on X × R and H be a separable RKHS with bounded measurable kernel satisfying ∥k∥∞≤1. Assume that RLϵ,P(0) < ∞and that H is dense in L1(PX). Then, for all ρ > 0, there exist a δρ > 0 and a λρ > 0 such that for all λ ∈(0, λρ] and all n ≥1 we have Pn D ∈(X ×R)n : P Mlow(fP,λ)  −ρ ≤#SV (fD,λ) n ≤P Mup(fP,λ)  +ρ  ≥1−8e−δ2 ρλ2n. If we choose a sequence of regularization parameters λn such that λn →0 and λ2 nn →∞, then the resulting SVM is Lϵ-risk consistent under the assumptions of Theorem 2.4, see [1]. For this case, the following obvious corollary of Theorem 2.4 establishes lower and upper bounds on the number of support vectors. Corollary 2.5 Let P be a probability measure on X ×R and H be a separable RKHS with bounded measurable kernel satisfying ∥k∥∞≤1. Assume that RLϵ,P(0) < ∞and that H is dense in L1(PX). Furthermore, let (λn) ∈(0, ∞) be a sequence with λn →0 and λ2 nn →∞. Then, for all ρ > 0, the probability Pn of D ∈(X × R)n satisfying lim inf m→∞P Mlow(fP,λm)  −ρ ≤#SV (fD,λn) n ≤lim sup m→∞P Mup(fP,λm)  + ρ converges to 1 for n →∞. In general, the probabilities of the sets Mlow(fP,λ) and Mup(fP,λ) are hard to control since, e.g., for fixed x ∈X and λ →0 it seems difficult to show that fP,λ(x) is not “flipping” from the left hand side of M∗(x) to the right hand side. Indeed, for general M∗(x), such flipping would give different values t∗ λ(x) ∈M∗(x) for λ →0, and hence would result in significantly different sets Mlow(fP,λ) and Mup(fP,λ). As a consequence, it seems hard to show that, for probability measures P whose conditional distributions P( · |x), x ∈X, have no discrete components, we always have lim inf λ→0 P Mlow(fP,λ)  = lim sup λ→0 P Mup(fP,λ)  . (7) However, there are situations in which this equality can easily be established. For example, assume that the sets M∗(x) are PX-almost surely singletons. In this case, t∗ λ(x) is in fact independent of λ, and hence so are Mlow(fP,λ) and Mup(fP,λ). Namely, in this case these sets contain the pairs (x, y) for which y is not contained in the closed or open ϵ-tube around M∗(x), respectively. Consequently, (7) holds provided that the conditional distributions P( · |x), x ∈X, have no discrete components, and hence Corollary 2.5 gives a tight bound on the number of support vectors. Moreover, if in this case we additionally assume ϵ = 0, i.e., we consider the absolute loss, then we easily find P(Mlow(fP,λ)) = P(Mup(fP,λ)) = 1, and hence Corollary 2.5 shows that the corresponding SVM does not tend to produce sparse decision functions. Finally, recall that for this specific loss function, M∗(x) equals the median of P( · |x), and hence M∗(x) is a singleton whenever the median of P( · |x) is unique. Let us now illustrate Corollary 2.5 for ϵ > 0. To this end, we assume in the following that the conditional distributions P( · |x) are symmetric, i.e., for PX-almost all x ∈X there exists a conditional center c(x) ∈R such that P(c(x) + A|x) = P(c(x) −A|x) for all measurable A ⊂R. Note that by considering A := [0, ∞) it is easy to see that c(x) is a median of P( · |x). Furthermore, the assumption RLϵ,P(0) < ∞imposed in the results above ensures that the conditional mean f ∗ P(x) := E(Y |x) of P( · |x) exists PX-almost surely, and from this it is easy to conclude that c(x) = f ∗ P(x) for PX-almost all x ∈X. Moreover, from [8, Proposition 3.2 and Lemma 3.3] we immediately obtain the following lemma. Lemma 2.6 Let P be a probability measure on X × R such that RLϵ,P(0) < ∞. Assume that the conditional distributions P( · |x), x ∈X, are symmetric and that for PX-almost all x ∈X there exists a δ(x) > 0 such that for all δ ∈(0, δ(x)] we have P f ∗ P(x) + [−δ, δ] x  > 0 , (8) P f ∗ P(x) + [ϵ −δ, ϵ + δ] x  > 0 . (9) Then, for PX-almost all x ∈X, we have M∗(x) = {f ∗ P(x)} and f ∗ P(x) equals PX-almost surely the unique median of P( · |x). Obviously, condition (8) means that the conditional distributions have some mass around their median f ∗ P, whereas (9) means that the conditional distributions have some mass around f ∗ P ± ϵ. Moreover, [8] showed that under the assumptions of Lemma 2.6, the corresponding ϵ-insensitive SVM can be used to estimate the conditional median. Let us now illustrate how the value of ϵ influences both the accuracy of this estimate and the sparsity. To this end, let us assume for the sake of simplicity that the conditional distributions P( · |x) have continuous Lebesgue densities p( · |x) : R →[0, ∞). By the symmetry of the conditional distributions it is then easy to see that these densities are symmetric around f ∗ P(x). Now, it follows from the continuity of the densities, that (8) is satisfied if p(f ∗ P(x)|x) > 0, whereas (9) is satisfied if p(f ∗ P(x) + ϵ|x) > 0. Let us first consider the case where the conditional distributions are equal modulo translations. In other words, we assume that there exists a continuous Lebesgue density q : R →[0, ∞) which is symmetric around 0 such that for PX-almost all x ∈X we have q(y) = p(f ∗ P(x) + y|x) , y ∈R. Note that this assumption is essentially identical to a classical “signal plus noise” assumption. In the following we further assume that q is unimodal, i.e., q has its only local and global maximum at 0. From this we easily see that (8) is satisfied, and (9) is satisfied if q(ϵ) > 0. By Lemma 2.6 and the discussion around (7) we then conclude that under the assumptions of Corollary 2.5 the fraction of support vectors asymptotically approaches 2Q([ϵ, ∞)), where Q is the probability measure defined by q. This confirms the intuition that larger values of ϵ lead to sparser decision functions. In particular, if Q([ϵ, ∞)) = 0, the corresponding SVM produces super sparse decision functions, i.e., decision functions whose number of support vectors does not grow linearly in the sample size. However, not surprisingly, there is a price to be paid for this sparsity. Indeed, [8, Lemma 3.3] indicates that the size of q(ϵ) has a direct influence on the ability of fD,λ to estimate the conditional median f ∗ P. Let us describe this in a little more detail. To this end, we first find by [8, Lemma 3.3] and the convexity of t 7→CLϵ,Q(t) that CLϵ,Q(t) −C∗ Lϵ,Q ≥q(ϵ) · t2/2 if t ∈[0, ϵ] tϵ −ϵ2/2 if t ≥ϵ. By a literal repetition of the proof of [8, Theorem 2.5] we then find the self-calibration inequality ∥f −f ∗ P∥L1(PX) ≤ p 2/q(ϵ) q RLϵ,P(f) −R∗ Lϵ,P , (10) which holds for all f : X →R with RLϵ,P(f) −R∗ Lϵ,P ≤ϵ2/2. Now, if we are in the situation of Corollary 2.5, then we know that RLϵ,P(fD,λn) →R∗ Lϵ,P in probability for n →∞, and thus (10) shows that fD,λn approximates the conditional median f ∗ P with respect to the L1(PX)-norm. However, the guarantee for this approximation becomes worse the smaller q(ϵ) becomes, i.e., the larger ϵ is. In other words, the sparsity of the decision functions may be paid by less accurate estimates of the conditional median. On the other hand, our results also show that moderate values for ϵ can lead to both reasonable estimates of the conditional median and relatively sparse decision functions. In this regard we further note that one can also use [8, Lemma 3.3] to establish selfcalibration inequalities that measure the distance of f to f ∗ P only up to ϵ. In this case, however, it is obvious that such self-calibration inequalities are worse the larger ϵ is, and hence the informal conclusions above remain unchanged. Finally, we like to mention that, if the conditional distributions are not equal modulo translations, then the situation may become more involved. In particular, if we are in a situation with p(f ∗ P(x)|x) > 0 and p(f ∗ P(x) + ϵ|x) > 0 but infx p(f ∗ P(x)|x) = infx p(f ∗ P(x) + ϵ|x) = 0, selfcalibration inequalities of the form (10) are in general impossible, and weaker self-calibration inequalities require additional assumptions on P. We refer to [8] where the case ϵ = 0 is considered. 3 Proofs Setting C := 1 2λn and introducing slack variables, we can restate the optimization problem (1) as minimize 1 2∥f∥2 H + C n X i=1 (ξi + ˜ξi) (11) subject to f(xi) −yi ≤ϵ + ξi, yi −f(xi) ≤ϵ + ˜ξi, ξi, ˜ξi ≥0 for all i = 1, . . . , n. In the following we denote the (unique) solution of (11) by (f ∗, ξ∗, ˜ξ∗), where we note that we have f ∗= fD,λ. It is well-known, see e.g. [2, p. 117], that the dual optimization problem of (11) is maximize n X i=1 yi(˜αi −αi) −ϵ n X i=1 (˜αi + αi) −1 2 n X i,j=1 (˜αi −αi)(˜αj −αj)k(xi, xj) (12) subject to 0 ≤αi, ˜αi ≤C for all i = 1, . . . , n, where k is the kernel of the RKHS H. Furthermore, if (α∗ 1, ˜α∗ 1, . . . , α∗ n, ˜α∗ n) denotes a solution of (12), then we can recover the primal solution (f ∗, ξ∗, ˜ξ∗) by f ∗ = n X i=1 (˜α∗ i −α∗ i )k(xi, · ) , (13) ξ∗ i = max{0, f ∗(xi) −yi −ϵ} , (14) ˜ξ∗ i = max{0, yi −f ∗(xi) −ϵ} , (15) for all i = 1, . . . , n. Moreover, the Karush-Kuhn-Tucker conditions of (12) are α∗ i (f ∗(xi) −yi −ϵ −ξ∗ i ) = 0 , (16) ˜α∗ i (yi −f ∗(xi) −ϵ −˜ξ∗ i ) = 0 , (17) (α∗ i −C)ξ∗ i = 0 , (18) (˜α∗ i −C)˜ξ∗ i = 0 , (19) ξ∗ i ˜ξ∗ i = 0 , (20) α∗ i ˜α∗ i = 0 , (21) where i = 1, . . . , n. Finally, note that by setting βi := ˜αi −αi the problem (12) can be simplified to (3), and consequently, a solution β∗of (3) is of the form β∗= ˜α∗−α∗. The following simple lemma provides lower and upper bounds for the set of support vectors. Lemma 3.1 Using the above notations we have  i : |fD,λ(xi) −yi| > ϵ ⊂  i : β∗ i ̸= 0 ⊂  i : |fD,λ(xi) −yi| ≥ϵ . Proof: Let us first prove the inclusion on the left hand side. To this end, we begin by fixing an index i with fD,λ(xi) −yi > ϵ. By fD,λ = f ∗and (14), we then find ξ∗ i > 0, and hence (18) implies α∗ i = C. From (21) we conclude ˜α∗ i = 0 and hence we have β∗ i = ˜α∗ i −α∗ i = −C ̸= 0. The case yi −fD,λ(xi) > ϵ can be shown analogously, and hence we obtain the first inclusion. In order to show the second inclusion we fix an index i with β∗ i ̸= 0. By β∗ i = ˜α∗ i −α∗ i and (21) we then have either α∗ i ̸= 0 or ˜α∗ i ̸= 0. Let us first consider the case α∗ i ̸= 0 and ˜α∗ i = 0. The KKT condition (16) together with fD,λ = f ∗implies fD,λ(xi)−yi −ϵ = ξ∗ i and since ξ∗ i ≥0 we get fD,λ(xi)−yi ≥ϵ. The second case ˜α∗ i = 0 can be shown analogously. We further need the following Hilbert space version of Hoeffding’s inequality from [12, Chapter 3], see also [7, Chapter 6.2] for a slightly sharper inequality. Theorem 3.2 Let (Ω, A, P) be a probability space and H be a separable Hilbert space. Moreover, let η1, . . . , ηn : Ω→H be independent random variables satisfying EPηi = 0 and ∥ηi∥∞≤1 for all i = 1, . . . , n. Then, for all τ ≥1 and all n ≥τ, we have P  1 n n X i=1 ηi H < 4 rτ n  ≥1 −3e−τ . Finally, we need the following theorem, see [7, Corollary 5.10], which was essentially shown by [13, 5, 3] . Theorem 3.3 Let P be a probability measure on X × R and H be a separable RKHS with bounded measurable kernel satisfying ∥k∥∞≤1. We write Φ : X →H for the canonical feature map of H, i.e., Φ(x) := k( · , x), x ∈X. Then for all λ > 0 there exists a function h : X × R →[−1, 1] such that for all n ≥1 and all D ∈(X × R)n we have ∥fD,λ −fP,λ∥H ≤λ−1∥EDhΦ −EPhΦ∥H , where ED denotes the empirical average with respect to D. Proof of of Theorem 2.1: In order to show the first estimate we fix a δ > 0 and a λ > 0 such that δλ ≤4. Let τ := λ2δ2n/16 which implies n ≥τ. Combining Theorems 3.2 and 3.3 we then obtain 1 −3e−τ ≤ PnD ∈(X × R)n : ∥EDhΦ −EPhΦ∥H ≤4 p τ/n  ≤ PnD ∈(X × R)n : ∥fD,λ −fP,λ∥H ≤δ  . (22) Let us now assume that we have a training set D ∈(X ×R)n such that ∥fP,λ −fD,λ∥H ≤δ. Given a pair (x, y) ∈Aδ low(fP,λ), we then have ϵ + δ < |fP,λ(x) −y| ≤|fD,λ(x) −y| + |fP,λ(x) −fD,λ(x)| ≤|fD,λ(x) −y| + δ by the triangle inequality and ∥k∥∞≤1 which implies ∥· ∥∞≤∥· ∥H. In other words, we have Aδ low(fP,λ) ⊂Alow(fD,λ). Consequently, Lemma 3.1 yields #SV (fD,λ) ≥#  i : |fD,λ(xi) −yi| > ϵ ≥ #  i : |fP,λ(xi) −yi| > ϵ + δ = n X i=1 1Aδ low(fP,λ)(xi, yi) . Combining this estimate with (22) we then obtain Pn D ∈(X × R)n : #SV (fD,λ) n ≥1 n n X i=1 1Aδ low(fP,λ)(xi, yi)  ≥1 −3e−δ2λ2n 16 . Moreover, Hoeffding’s inequality, see, e.g. [4, Theorem 8.1], shows Pn D ∈(X × R)n : 1 n n X i=1 1Aδ low(fP,λ)(xi, yi) > P Aδ low(fP,λ)  −ρ  ≥1 −e−2ρ2n for all ρ > 0 and n ≥1. From these estimates and a union bound we conclude the first inequality. In order to show the second estimate we first observe that for training sets D ∈(X × R)n with ∥fP,λ −fD,λ∥H ≤δ we have Aup(fD,λ) ⊂Aδ up(fP,λ). Lemma 3.1 then shows #SV (fD,λ) ≤ n X i=1 1Aδ up(fP,λ)(xi, yi) , and hence (22) yields Pn D ∈(X × R)n : #SV (fD,λ) n ≤1 n n X i=1 1Aδ up(fP,λ)(xi, yi)  ≥1 −3e−δ2λ2n 16 . Using Hoeffding’s inequality analogously to the proof of the first estimate we then obtain the second estimate. Proof of of Corollary 2.2: We first observe that we have Aδ low(fP,λ) ⊂Aδ′ low(fP,λ) for 0 ≤δ′ ≤δ. Let us show [ δ>0 Aδ low(fP,λ) = Alow(fP,λ) . (23) Obviously, the inclusion “⊂” directly follows from the above monotonicity. Conversely, for (x, y) ∈ Alow(fP,λ) we have |f(x) −y| > ϵ and hence |f(x) −y| > ϵ + δ for some δ > 0, i.e., we have shown (x, y) ∈Aδ low(fP,λ). From (23) we now conclude lim δ↘0 P Aδ low(fP,λ)  = P Alow(fP,λ)  . (24) In addition, we have Aδ′ up(fP,λ) ⊂Aδ up(fP,λ) for 0 ≤δ′ ≤δ, and it is easy to check that \ δ>0 Aδ up(fP,λ) = Aup(fP,λ) . (25) Indeed, if (x, y) ∈Aδ up(fP,λ) for all δ > 0 we have |f(x) −y| ≥ϵ −δ for all δ > 0, from which we conclude |f(x)−y| ≥ϵ, i.e. (x, y) ∈Aup(fP,λ). Conversely, the inclusion “⊃” directly follows from the above monotonicity of the sets Aup. From (25) we then conclude lim δ↘0 P Aδ up(fP,λ)  = P Aup(fP,λ)  . (26) Let us now fix a decreasing sequence (δn) ⊂(0, 1) with δn →0 and δ2 nn →∞. Combining (24) and (26) with the estimates of Theorem 2.1, we then obtain the assertion. Proof of Lemma 2.3: Since the loss function Lϵ is Lipschitz continuous and convex in t, it is easy to verify that t 7→CLϵ,P( · |x)(t) is Lipschitz continuous and convex for PX-almost all x ∈X, and hence M∗(x) is a closed interval. In order to prove the remaining assertions it suffices to show that limt→±∞CLϵ,P( · |x)(t) = ∞for PX-almost all x ∈X. To this end, we first observe that R∗ Lϵ,P < ∞implies C∗ Lϵ,P( · |x) < ∞for PX-almost all x ∈X. Let us fix such an x, a B > 0, and a sequence (tn) ⊂R with tn →−∞. By the shape of Lϵ, there then exists an r0 > 0 such that Lϵ(y, t) ≥2B for all y, t ∈R with |y −t| ≥r0. Furthermore, there exists an M > 0 with P([−M, M] | x) ≥1/2, and since tn →−∞there further exists an n0 ≥1 such that tn ≤−M −r0 for all n ≥n0. For y ∈[−M, M] we thus have y −tn ≥r0, and hence we finally find CLϵ,P( · |x)(tn) ≥ Z [−M,M] Lϵ(y, tn) dP(y|x) ≥B for all n ≥n0. The case tn →∞can be shown analogously. For the proof of Theorem 2.4 we need the following two intermediate results. Theorem 3.4 Let P be a probability measure on X × R and H be a separable RKHS with bounded measurable kernel satisfying ∥k∥∞≤1. Assume that RLϵ,P(0) < ∞and that H is dense in L1(PX). Then, for all δ > 0 and ρ > 0, there exists a λ0 > 0 such that for all λ ∈(0, λ0] we have PX  x ∈X : |fP,λ(x) −t| > δ for all t ∈M∗(x)  < ρ . Proof: Since H is dense in L1(PX) we have inff∈H RLϵ,P(f) = R∗ Lϵ,P by [9, Theorem 3], and hence limλ→0 RLϵ,P(fP,λ) = R∗ Lϵ,P. Now we obtain the assertion from [6, Theorem 3.16]. Lemma 3.5 Let P be a probability measure on X × R and H be a separable RKHS with bounded measurable kernel satisfying ∥k∥∞≤1. Assume that RLϵ,P(0) < ∞and that H is dense in L1(PX). Then, for all δ > 0 and ρ > 0, there exists a λ0 > 0 such that for all λ ∈(0, λ0] we have P M 2δ low(fP,λ)  ≤P Aδ low(fP,λ)  + ρ and P M 2δ up(fP,λ)  ≥P Aδ up(fP,λ)  −ρ . Proof: We write t∗ λ(x) for the real number defined by (6) for f(x) := fP,λ(x). Then we have M 2δ low(fP,λ) ⊂  M 2δ low(fP,λ) ∩  (x, y) ∈X × R : |fP,λ(x) −t∗ λ(x)| ≤δ  ∪  (x, y) ∈X × R : |fP,λ(x) −t(x)| > δ for all t(x) ∈M∗(x) . Moreover, given an (x, y) ∈M 2δ low(fP,λ) ∩{(x, y) ∈X × R : |fP,λ(x) −t∗ λ(x)| ≤δ}, we find ϵ + 2δ < |t∗ λ(x) −y| ≤|fP,λ(x) −t∗ λ(x)| + |fP,λ(x) −y| ≤δ + |fP,λ(x) −y| , i.e., we have (x, y) ∈Aδ low(fP,λ). Estimating the probability of the remaining set by Theorem 3.4 then yields the first assertion. In order to prove the second estimate we first observe that Aδ up(fP,λ) ⊂  Aδ up(fP,λ) ∩  (x, y) ∈X × R : |fP,λ(x) −t∗ λ(x)| ≤δ  ∪  (x, y) ∈X × R : |fP,λ(x) −t(x)| > δ for all t(x) ∈M∗(x) . For (x, y) ∈Aδ up(fP,λ) ∩{(x, y) ∈X × R : |fP,λ(x) −t∗ λ(x)| ≤δ} we further have ϵ −δ ≤|fP,λ(x) −y| ≤|fP,λ(x) −t∗ λ(x)| + |t∗ λ(x) −y| ≤δ + |t∗ λ(x) −y| , i.e., we have (x, y) ∈M 2δ up(fP,λ). Again, the assertion now follows from Theorem 3.4 . Proof of Theorem 2.4: Analogously to the proofs of (24) and (26), we find lim δ↘0 P M δ low(fP,λ)  = P Mlow(fP,λ)  and lim δ↘0 P M δ up(fP,λ)  = P Mup(fP,λ)  Combining these equations with Theorem 2.1 and Lemma 3.5, we then obtain the assertion. References [1] A. Christmann and I. Steinwart. Consistency and robustness of kernel based regression. Bernoulli, 13:799–819, 2007. [2] N. Cristianini and J. Shawe-Taylor. An Introduction to Support Vector Machines. Cambridge University Press, Cambridge, 2000. [3] E. De Vito, L. Rosasco, A. Caponnetto, M. Piana, and A. Verri. Some properties of regularized kernel methods. J. Mach. Learn. Res., 5:1363–1390, 2004. [4] L. Devroye, L. Gy¨orfi, and G. Lugosi. A Probabilistic Theory of Pattern Recognition. Springer, New York, 1996. [5] I. Steinwart. Sparseness of support vector machines. J. Mach. Learn. Res., 4:1071–1105, 2003. [6] I. Steinwart. How to compare different loss functions. Constr. Approx., 26:225–287, 2007. [7] I. Steinwart and A. Christmann. Support Vector Machines. Springer, New York, 2008. [8] I. Steinwart and A. Christmann. How SVMs can estimate quantiles and the median. In J.C. Platt, D. Koller, Y. Singer, and S. Roweis, editors, Advances in Neural Information Processing Systems 20, pages 305–312. MIT Press, Cambridge, MA, 2008. [9] I. Steinwart, D. Hush, and C. Scovel. Function classes that approximate the Bayes risk. In G. Lugosi and H. U. Simon, editors, Proceedings of the 19th Annual Conference on Learning Theory, pages 79–93. Springer, New York, 2006. [10] V. Vapnik, S. Golowich, and A. Smola. Support vector method for function approximation, regression estimation, and signal processing. In M. Mozer, M. Jordan, and T. Petsche, editors, Advances in Neural Information Processing Systems 9, pages 81–287. MIT Press, Cambridge, MA, 1997. [11] V. N. Vapnik. Statistical Learning Theory. John Wiley & Sons, New York, 1998. [12] V. Yurinsky. Sums and Gaussian Vectors. Lecture Notes in Math. 1617. Springer, Berlin, 1995. [13] T. Zhang. Convergence of large margin separable linear classification. In T. K. Leen, T. G. Dietterich, and V. Tresp, editors, Advances in Neural Information Processing Systems 13, pages 357–363. MIT Press, Cambridge, MA, 2001.
2008
205
3,460
Automatic online tuning for fast Gaussian summation Vlad I. Morariu1∗, Balaji V. Srinivasan1, Vikas C. Raykar2, Ramani Duraiswami1, and Larry S. Davis1 1University of Maryland, College Park, MD 20742 2Siemens Medical Solutions Inc., USA, 912 Monroe Blvd, King of Prussia, PA 19406 morariu@umd.edu, balajiv@umiacs.umd.edu, vikas.raykar@siemens.com, ramani@umiacs.umd.edu, lsd@cs.umd.edu Abstract Many machine learning algorithms require the summation of Gaussian kernel functions, an expensive operation if implemented straightforwardly. Several methods have been proposed to reduce the computational complexity of evaluating such sums, including tree and analysis based methods. These achieve varying speedups depending on the bandwidth, dimension, and prescribed error, making the choice between methods difficult for machine learning tasks. We provide an algorithm that combines tree methods with the Improved Fast Gauss Transform (IFGT). As originally proposed the IFGT suffers from two problems: (1) the Taylor series expansion does not perform well for very low bandwidths, and (2) parameter selection is not trivial and can drastically affect performance and ease of use. We address the first problem by employing a tree data structure, resulting in four evaluation methods whose performance varies based on the distribution of sources and targets and input parameters such as desired accuracy and bandwidth. To solve the second problem, we present an online tuning approach that results in a black box method that automatically chooses the evaluation method and its parameters to yield the best performance for the input data, desired accuracy, and bandwidth. In addition, the new IFGT parameter selection approach allows for tighter error bounds. Our approach chooses the fastest method at negligible additional cost, and has superior performance in comparisons with previous approaches. 1 Introduction Gaussian summations occur in many machine learning algorithms, including kernel density estimation [1], Gaussian process regression [2], fast particle smoothing [3], and kernel based machine learning techniques that need to solve a linear system with a similarity matrix [4]. In such algorithms, the sum g(yj) = PN i=1 qie−||xi−yj||2/h2 must be computed for j = 1, . . . , M, where {x1, . . . , xN} and {y1, . . . , yM} are d-dimensional source and target (or reference and query) points, respectively; qi is the weight associated with xi; and h is the bandwidth. Straightforward computation of the above sum is computationally intensive, taking O(MN) time. To reduce the computational complexity, Greengard and Strain proposed the Fast Gauss Transform (FGT) [5], using two expansions, the far-field Hermite expansion and the local Taylor expansion, and a translation process that converts between the two, yielding an overall complexity of O(M + N). However, due to the expensive translation operation, O(pd) constant term, and the box based data structure, this method becomes less effective for higher dimensions (e.g. d > 3) [6]. Dual-tree methods [7, 8, 9, 10] approach the problem by building two separate trees for the source and target points respectively, and recursively considering contributions from nodes of the source tree to nodes of the target tree. The most recent works [9, 10] present new expansions and error control schemes that yield improved results for bandwidths in a large range above and below the optimal bandwidth, as determined by the standard least-squares cross-validation score [11]. Efficiency across bandwidth scales is important in cases where the optimal bandwidth must be searched for. ∗Our code is available for download as open source at http://sourceforge.net/projects/figtree. Another approach, the Improved Fast Gauss Transform (IFGT) [6, 12, 13], uses a Taylor expansion and a space subdivision different than the original FGT, allowing for efficient evaluation in higher dimensions. This approach also achieves O(M + N) asymptotic computational complexity. However, the approach as initially presented in [6, 12] was not accompanied by an automatic parameter selection algorithm. Because the parameters interact in a non-trivial way, some authors designed simple parameter selection methods to meet the error bounds, but which did not maximize performance [14]; others attempted, unsuccessfully, to choose parameters, reporting times of “∞” for IFGT [9, 10]. Recently, Raykar et al [13] presented an approach which selects parameters that minimize the constant term that appears in the asymptotic complexity of the method, while guaranteeing that error bounds are satisfied. This approach is automatic, but only works for uniformly distributed sources, a situation often not met in practice. In fact, Gaussian summations are often used because a simple distribution cannot be assumed. In addition, the IFGT performs poorly at low bandwidths because of the number of Taylor expansion terms that must be retained to meet error bounds. We address both problems with IFGT: 1) small bandwidth performance, and 2) parameter selection. First we employ a tree data structure [15, 16] that allows for fast neighbor search and greatly speeds up computation for low bandwidths. This gives rise to four possible evaluation methods that are chosen based on input parameters and data distributions: direct evaluation, direct evaluation using tree data structure, IFGT evaluation, and IFGT evaluation using tree data structure (denoted by direct, direct+tree, ifgt, and ifgt+tree, respectively). We improve parameter selection by removing the assumption that data is uniformly distributed and by providing a method for selecting individual source and target truncation numbers that allows for tighter error bounds. Finally, we provide an algorithm that automatically selects the evaluation method that is likely to be fastest for the given data, bandwidth, and error tolerance. This is done in a way that is automatic and transparent to the user, as for other software packages such as FFTW [17] and ATLAS [18].The algorithm is tested on several datasets, including those in [10], and in each case found to perform as expected. 2 Improved Fast Gauss Transform We briefly summarize the IFGT, which is described in detail [13, 12, 6]. The speedup is achieved by employing a truncated Taylor series factorization, using a space sub-division to reduce the number of terms needed to satisfy the error bound, and ignoring sources whose contributions are negligible. The approximation is guaranteed to satisfy the absolute error |ˆg(yj) −g(yj)| /Q ≤ǫ, where Q = P i |qi|. The factorization that IFGT uses involves the truncated multivariate Taylor expansion e−∥yj−xi∥2/h2 = e−∥xi−x∗∥2/h2e−||yj−x∗∥2/h2   X |α|≤p−1 2α α! yj −x∗ h α xi −x∗ h α  + ∆ij where α is multi-index notation1 and ∆ij is the error induced by truncating the series to exclude terms of degree p and higher and can be bounded by ∆ij ≤2p p! ||xi −x∗|| h p ||yj −x∗|| h p e−(||xi−x∗||−||yj−x∗||)2/h2. (1) Because reducing the distance ||xi −x∗|| also reduces the error bound given above, the sources can be divided into K clusters, so the Taylor series center of expansion for source xi is the center of the cluster to which the source belongs. Because of the rapid decay of the Gaussian function, the contribution of sources in cluster k can be ignored if ||yj −ck|| > rk y = rk x + h p log(1/ǫ), where ck and rk x are cluster center and radius of the kth cluster, respectively. In [13], the authors ensure that the error bound is met by choosing the truncation number pi for each source so that ∆ij ≤ǫ. This guarantees that |ˆg(yj) −g(yj)| = | PN i=1 qi∆ij| ≤PN i=1 |qi|ǫ = Qǫ. Because ||yj −ck|| cannot be computed for each ∆ij term (to prevent quadratic complexity), the authors use the worst case scenario; denoting dik = ||xi −ck|| and djk = ||yj −ck||, the bound on error term ∆ij is maximized at d∗ jk = dik+√ d2 ik+2pih2 2 , or d∗ jk = rk y, whichever is smaller (since targets further than rk y from ck will not consider cluster k). 1Multi-index α = {α1, . . . , αd} is a d-tuple of nonnegative integers, its length is |α| = α1 + . . . + αd, its factorial is defined as α! = α1!α2! . . . αd!, and for x = (x1, . . . , xd) ∈Rd, xα = xα1 1 xα2 2 . . . xαd d . T a r g e t S o u r c e s r T a r g e t S o u r c e s r T a r g e t S o u r c e s c2 c1 c3 r T a r g e t S o u r c e s c2 c3 c1 direct direct+tree ifgt ifgt+tree Figure 1: The four evaluation methods. Target is displayed elevated to separate it from sources. The algorithm proceeds as follows. First, the number of clusters K, maximum truncation number pmax, and the cut-off radius r are selected by assuming that sources are uniformly distributed. Next, K-center clustering is performed to obtain c1, . . . , cK, and the set of sources S is partitioned into S1, . . . , Sk. Using the max cluster radius rx, the truncation number pmax is found that satisfies worst-case error bound. Choosing pi for each source xi so that ∆ij ≤ǫ, source contributions are accumulated to cluster centers: Ck α = 2α α! X xi∈Sk qie−||xi−ck||2 h2 xi −ck h α 1|α|≤pi−1 For each yi, influential clusters for which ||yi −ck|| ≤rk y = rk x + r are found, and contributions from those clusters are evaluated: ˆg(yj) = X ||yi−ck||≤ry k X |α|≤pmax−1 Ck αe−||yj −ck||2 h2 yj −ck h α The clustering step can be performed in O(NK) time using a simple algorithm [19] due to Gonzalez, or in optimal O(N log K) time using the algorithm by Feder and Greene [20]. Because the number of values of α such that |α| ≤p is rpd = C(p + d, d), the total complexity of the algorithm is O (N + Mnc)(log K + r(pmax−1)d)  where nc is the number of cluster centers that are within the cut-off radius of a target point. Note that for fixed p, rpd is polynomial in the dimension d rather than exponential. Searching for clusters within the cut-off radius of each target can take time O(MK), but efficient data-structures can be used to reduce the cost to O(Mnc log K). 3 Fast Fixed-Radius Search with Tree Data Structure One problem that becomes apparent from the point-wise error bound on ∆ij is that as bandwidth h decreases, the error bound increases, and either dik = ||xi −ck|| must be decreased (by increasing the number of clusters K) or the maximum truncation number pmax must be increased to continue satisfying the desired error. An increase in either K or pmax increases the total cost of the algorithm. Consequently, the algorithm originally presented above does not perform well for small bandwidths. However, few sources have a contribution greater than qiǫ at low bandwidths, since the cut-off radius becomes very small. Also, because the number of clusters increases as the bandwidth decreases, we need an efficient way of searching for clusters that are within the cut-off radius. For this reason, a tree data structure can be used since it allows for efficient fixed-radius nearest neighbor search. If h is moderately low, a tree data structure can be built on the cluster centers, such that the nc influential clusters within the cut-off radius can be found in O(nc log K) time [15, 16]. If the bandwidth is very low, then it is more efficient to simply find all source points xi that influence a target yj and perform exact evaluation for those source points. Thus, if ns source points are within the cut-off radius of yj, then the time to build the structure is O(N log N) and the time to perform a query is O(ns log N) for each target. Thus, we have four methods that may be used for evaluation of the Gauss Transform: direct evaluation, direct evaluation with the tree data structure, IFGT evaluation, and IFGT evaluation with a tree data structure on the cluster centers. Figure 1 shows a graphical representation of the four methods. Because the running times of the four methods for various parameters can differ greatly (i.e. using direct+tree evaluation when ifgt is optimal could result in a running time that is many orders of magnitude larger), we will need an efficient and online method selection approach, which is presented in section 5. 0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2 x 10 4 10 −4 10 −3 10 −2 10 −1 10 0 10 1 Number of clusters, K Max Cluster Radius, rx Actual radius Predicted radius 10 −2 10 −1 10 −1 10 0 10 1 10 2 10 3 Bandwidth h Speedup d = 1 d = 2 d = 3 d = 4 d = 5 d = 6 Figure 2: Selecting pmax and K using cluster radius, for M=N=20000, sources dist. as mixture of 25 N(µ ∼U[0, 1]d, Σ=4−4I), targets as U[0, 1]d, ǫ=10−2. Left: Predicted cluster radius as K−1/d vs actual cluster radius for d = 3. Right: Speedup from using actual cluster radius. 4 Choosing IFGT Parameters As mentioned in Section 1, the process of choosing the parameters is non-trivial. In [13], the pointwise error bounds described in Eq. 1 were used in an automatic parameter selection scheme that is optimized when sources are uniformly distributed. We remove the uniformity assumption and also make the error bounds tighter by selecting individual source and target truncation numbers to satisfy cluster-wise error bounds instead of the worst-case point-wise error bounds. The first improvement provides significant speedup in cases where sources are not uniformly distributed, and the second improvement results in general speedup since we are no longer considering the error contribution of just the worst source point, but considering the total error of each cluster instead. 4.1 Number of Clusters and Maximum Truncation Number The task of selecting the number of clusters K and maximum truncation number pmax is difficult because they depend on each other indirectly through the source distribution. For example, increasing K decreases the cluster radius, which allows for a lower truncation number while still satisfying the error bound; conversely, increasing pmax allows clusters to have a larger radius, which allows for a smaller K. Ideally, both parameters should be as low as possible since they both affect computational complexity. Unfortunately, we cannot find the balance between the two without analyzing the source distribution because it influences the rate at which the cluster radius decreases. The uniformity assumption leads to an estimate of maximum cluster radius, rx ∼K−1/d [13]. However, few interesting datasets are uniformly distributed, and when the assumption is violated, as in Fig. 2, actual rx will decrease faster than K−1/d, leading to over-clustering and increased running time. Our solution is to perform clustering as part of the parameter selection process, obtaining the actual cluster radii for each value of K. Using this approach, parameters are selected in a way that the algorithm is tuned to the actual distribution of the sources. We can take advantage of the incremental nature of some clustering algorithms such as the greedy algorithm proposed by Gonzalez [19] or the first phase of the Feder and Greene algorithm [20], which provide a 2-approximation and 6-approximation of the optimal k-center clustering, respectively. We can then increment the value K, obtain the maximum cluster radius, and then find the lowest p that satisfies the error bound, picking the final value K which yields the lowest computational cost. Note that if we simply set the maximum number of clusters to Klimit = N, we would spend O(N log N) time to estimate parameters. However, in practice, the optimal value of K is low relative to N, and it is possible to detect when we cannot lower cost further by increasing K or lowering pmax, thus allowing the search to terminate early. In addition, in Section 5, we show how the data distribution allows us to intelligently choose Klimit. 4.2 Individual Truncation Numbers by Cluster-wise Error Bounds Once the maximum truncation number pmax is selected, we can guarantee that the worst sourcetarget pairwise error is below the desired error bound. However, simply setting each source and target truncation number to pmax wastes computational resources since most source-target pairs do not contribute much error. This problem is addressed in [13] by allowing each source to have its own truncation number based on its distance from the cluster center and assuming the worst placement of 10 −2 10 −1 10 0 Bandwidth h Speedup d = 1 d = 2 d = 3 d = 4 d = 5 d = 6 Figure 3: Speedup obtained by using cluster-wise instead of point-wise truncation numbers, for M=N=4000, sources dist. as mixture of 25 N(µ ∼U[0, 1]d, Σ=4−4I), targets as U[0, 1]d, ǫ=10−4. For d=1, the gain of lowering truncation is not large enough to make up for overhead costs. any target. However, this means that each cluster will have to compute r(pi−1)d coefficients where pi is the truncation number of its farthest point. We propose a method for further decreasing most individual source and target truncation numbers by considering the total error incurred by evaluation at any target |ˆg(yj) −g(yj)| ≤ X k : ||yj−ck||≤rk y X xi∈Sk |qi|∆ij + X k : ||yj−ck||>rk y X xi∈Sk |qi|ǫ where the left term on the r.h.s. is the error from truncating the Taylor series for the clusters that are within the cut-off radius, and the right term bounds the error from ignoring clusters outside the cut-off radius, ry. Instead of ensuring that ∆ij ≤ǫ for all (i, j) pairs, we ensure P xi∈Sk |qi|∆ij ≤P xi∈Sk |qi|ǫ = Qkǫ for all clusters. In this case, if a cluster is outside the cut-off radius, then the error incurred is no greater than Qkǫ; otherwise, the cluster-wise error bounds guarantee that the error is still no greater than Qkǫ. Summing over all clusters we have |ˆg(yj) −g(yj)| ≤P k Qkǫ = Qǫ, our desired error bound. The lowest truncation number that satisfies the cluster-wise error for each cluster is found in O(pmaxN) time by evaluating the cluster-wise error for all clusters for each value of p = {1 . . . pmax}. In addition, we can find individual target point truncation numbers by not only considering the worst case target distance rk y when computing cluster error contributions, but considering target errors for sources at varying distance ranges from each cluster center. This yields concentric regions around each cluster, each of which has its own truncation number, which can be used for targets in that region. Our approach satisfies the error bound tighter and reduces computational cost because: • Each cluster’s maximum truncation number no longer depends only on its farthest point, so if most points are clustered close to the center the maximum truncation will be lower; • The weight of each source point is considered in the error contributions, so if a source point is far away but has a weight of qi = 0 its error contribution will be ignored; and finally • Each target can use a truncation number that depends on its distance from the cluster. 5 Automatic Tuning via Method Selection For any input source and target point distribution, requested absolute error, and Gaussian bandwidth, we have the option of evaluating the Gauss Transform using any one of four methods: direct, direct+tree, ifgt, and ifgt+tree. As Fig. 4 shows, choosing the wrong method can result in orders of magnitude more time to evaluate the sum. Thus, we require an efficient scheme to automatically choose the best method online based on the input. The scheme must use the distribution of both the source and target points in making its decision, while at the same time avoiding long computations that would defeat the purpose of automatic method selection. Note that if we know d, M, N, ns, nc, K, and pmax, we can calculate the cost of each method: Costdirect(d, N, M) O(dMN) Costdirect+tree(d, N, M, ns) O(d(N + Mns) log N) Costifgt(d, N, M, K, nc, pmax) O(dN log K + (N + Mnc)r(pmax−1)d + dMK) Costifgt+tree(d, N, M, K, nc, pmax) O((N + Mnc)(d log K + r(pmax−1)d)) 10 −2 10 −1 10 0 10 −3 10 −2 10 −1 10 0 10 1 10 2 Bandwidth h CPU Time (seconds) direct direct−tree ifgt ifgt−tree auto 10 −2 10 −1 10 0 10 −4 10 −3 10 −2 10 −1 10 0 10 1 Bandwidth h Time ratio d = 1, auto to best d = 2, auto to best d = 3, auto to best d = 4, auto to best d = 5, auto to best d = 6, auto to best d = 1, auto to worst d = 2, auto to worst d = 3, auto to worst d = 4, auto to worst d = 5, auto to worst d = 6, auto to worst Figure 4: Running times of the four methods and our automatic method selection for M=N=4000, sources dist. as mixture of 25 N(µ ∼U[0, 1]d, Σ=4−4I), targets as U[0, 1]d, ǫ=10−4. Left: example for d=4. Right: Ratio of automatic to fastest method and automatic to slowest method, showing that method selection incurs very small overhead while preventing potentially large slowdowns. Algorithm 1 Method Selection 1: Calculate ˆns, an estimate of ns 2: Calculate Costdirect(d, N, M) and Costdirect+tree(d, N, M, ˆns) 3: Calculate highest Klimit ≥0 such that for some nc and pmax min(Costifgt, Costifgt+tree) ≤min(Costdirect, Costdirect+tree) 4: if Klimit > 0 then 5: Compute pmax and K ≤Klimit that minimize estimated cost of IFGT 6: Calculate ˆnc, an estimate of nc 7: Calculate Costifgt+tree(d, N, M, K, ˆnc, pmax) and Costifgt(d, N, M, K, ˆnc, pmax) 8: end if 9: return arg mini Costi More precise equations and the correct constants that relate the four costs can be obtained directly from the specific implementation of each method (this could be done by inspection, or automatically offline or at compile-time to account for hardware). A simple approach to estimating the distribution dependent ns and nc is to build a tree on sample source points and compute the average number of neighbors to a sampled set of targets. The asymptotic complexity of this approximation is the same as that of direct+tree, unless sub-linear sampling is used at the expense of accuracy in predicting cost. However, ns and nc can be estimated in O(M + N) time even without sampling by using techniques from the field of database management systems for estimating spatial join selectivity[21]. Given ns, we predict the cost of direct+tree, and estimate Klimit as the highest value that might yield lower costs than direct or direct+tree. If Klimit > 0, then, we can estimate the parameters and costs of ifgt or ifgt+tree. Finally, we pick the method with lowest cost. As figure 4 shows, our method selection approach chooses the correct method across bandwidths at very low computational cost. 6 Experiments Performance Across Bandwidths. We empirically evaluate our method on the same six real-world datasets as in [10] and compare against the authors’ reported results. As in [10], we scale the data to fit the unit hypercube and evaluate the Gauss transform using all 50K points as sources and targets, with bandwidths varying from 10−3 to 103 times the optimal bandwidth. Because our method satisfies an absolute error, we use for absolute ǫ the highest value that guarantees a relative error of 10−2 (to achieve this, ǫ ranges from 10−1 to 10−4 by factors of 10). We do not include the time required to choose ǫ (since we are doing this only to evaluate the running times of the two methods for the same relative errors) but we do include the time to automatically select the method and parameters. Since the code of [10] is not currently available, our experiments do not use the same machine as [10], and the CPU times are scaled based on the reported/computed the times needed by the naive approach on the corresponding machines. Figure 5 shows the normalized running times of our method versus the Dual-Tree methods DFD, DFDO, DFTO, and DITO. For most bandwidths our method is generally faster by about one order of magnitude (sometimes as much as 1000 times faster). For near-optimal bandwidths, our approach is either faster or comparable to the other approaches. Gaussian Process Regression. Gaussian process regression (GPR) [22] provides a Bayesian framework for non-parametric regression. The computational complexity for straightforward GPR is 10 −3 10 −2 10 −1 10 0 10 1 10 2 10 3 10 −4 10 −3 10 −2 10 −1 10 0 Bandwidth scale h/h* CPU Time / Naive CPU Time sj2, d = 1, h* = 0.001395 DFD DFDO DFTO DITO Our method 10 −3 10 −2 10 −1 10 0 10 1 10 2 10 3 10 −4 10 −3 10 −2 10 −1 10 0 10 1 Bandwidth scale h/h* CPU Time / Naive CPU Time mockgalaxy, d = 3, h* = 0.000768 10 −3 10 −2 10 −1 10 0 10 1 10 2 10 3 10 −4 10 −3 10 −2 10 −1 10 0 10 1 Bandwidth scale h/h* CPU Time / Naive CPU Time bio5, d = 5, h* = 0.000567 10 −3 10 −2 10 −1 10 0 10 1 10 2 10 3 10 −4 10 −3 10 −2 10 −1 10 0 10 1 Bandwidth scale h/h* CPU Time / Naive CPU Time pall7, d = 7, h* = 0.001319 10 −3 10 −2 10 −1 10 0 10 1 10 2 10 3 10 −4 10 −3 10 −2 10 −1 10 0 10 1 Bandwidth scale h/h* CPU Time / Naive CPU Time covtype, d = 10, h* = 0.015476 10 −3 10 −2 10 −1 10 0 10 1 10 2 10 3 10 −4 10 −3 10 −2 10 −1 10 0 10 1 Bandwidth scale h/h* CPU Time / Naive CPU Time CoocTexture, d = 16, h* = 0.026396 Figure 5: Comparison with Dual-Tree methods for six real-world datasets (lower is faster). O(N 3) which is undesirable for large datasets. The core computation in GPR involves the solution of a linear system for the dense covariance matrix K + σ2I, where [K]ij = K(xi, xj). Our method can be used to accelerate this solution for Gaussian processes with Gaussian covariance, given by K(x, x′) = σ2 f exp(−Pd k=1 (xk −x′ k)2/h2 k) [22]. Given the training set, D = {xi, yi}N i=1, and a new point x∗, the training phase involves computing α = (K + σ2I)−1y, and the prediction of y∗ is given by y∗= k(x∗)T α, where k(x∗) = [K(x∗, x1), . . . , K(x∗, xN)]. The system can be solved efficiently by a conjugate gradient method using IFGT for matrix-vector multiplication. Further, the accuracy of the matrix-vector product can be reduced as the iterations proceed (i.e. ǫ is modified every iteration) if we use inexact Krylov subspaces [23] for the conjugate gradient iterations. We apply our method for Gaussian process regression on four standard datasets: robotarm, abalone, housing, and elevator2. We present the results of the training phase (though we also speed up the prediction phase). For each dataset we ran five experiments: the first four fixed one of the four methods (direct, direct+tree, ifgt, ifgt+tree) and used it for all conjugate gradient iterations; the fifth automatically selected the best method at each iteration (denoted by auto in figure 6). To validate our solutions, we measured the relative error between the vectors found by the direct method and our approximate methods; they were small, ranging from ∼10−10 to ∼10−5. As expected, auto chose the correct method for each dataset, incurring only a small overhead cost. Also, for the abalone dataset, auto outperformed any of the fixed method experiments; as the right side of figure 6 shows, half way through the iterations, the required accuracy decreased enough to make ifgt faster than direct evaluation. By switching methods dynamically, the automatic selection approach outperformed any fixed method, further demonstrating the usefulness of our online tuning approach. Fast Particle Smoothing. Finally, we embed our automatic method selection in the the two-filter particle smoothing demo provided by the authors of [3]3. For a data size of 1000, tolerance set at 10−6, the run-times are 18.26s, 90.28s and 0.56s for the direct, dual-tree and automatic (ifgt was chosen) methods respectively. The RMS error for all methods from the ground truth values were observed as 2.904 ± 10−04. 2The last three datasets can be downloaded from http://www.liaad.up.pt/˜ltorgo/Regression/DataSets.html; the first, robotarm, is a synthetic dataset generated as in [2] 3The code was downloaded from http://www.cs.ubc.ca/˜awll/nbody/demos.html Robotarm Abalone Housing Elevator Dims 2 7 12 18 Size 1000 4177 506 8752 direct 0.578s 16.1s 0.313s 132s ifgt 0.0781s 32.3s 1317s 133s direct-tree 5.45s 328s 2.27s 0.516s ifgt-tree 0.0781s 35.2s 549s 101s auto 0.0938s 14.5s 0.547s 0.797s 0 2 4 6 8 10 12 14 16 18 20 0 1 2 3 4 5 6 7 8 −log(desired accuracy) Iteration Number IFGT Direct Method Figure 6: GPR Results. Left: CPU times. Right: Desired accuracy per iteration for abalone dataset. 7 Conclusion We presented an automatic online tuning approach to Gaussian summations that combines a tree data structure with IFGT that is well suited for both high and low bandwidths and which users can treat as a black box. The approach also tunes IFGT parameters to the source distribution, and provides tighter error bounds. Experiments demonstrated that our approach outperforms competing methods for most bandwidth settings, and dynamically adapts to various datasets and input parameters. Acknowledgments. We would like to thank the U.S. Government VACE program for supporting this work. This work was also supported by a NOAA-ESDIS Grant to ASIEP at UMD. References [1] M.P. Wand and M.C. Jones. Kernel Smoothing. Chapman and Hall, 1995. [2] C. K. I. Williams and C. E. Rasmussen. Gaussian processes for regression. In NIPS, 1995. [3] M. Klaas, M. Briers, N. de Freitas, A. Doucet, S. Maskell, and D. Lang. Fast particle smoothing: if I had a million particles. In ICML, 2006. [4] N. de Freitas, Y. Wang, M. Mahdaviani, and D. Lang. Fast Krylov methods for N-body learning. In NIPS, 2006. [5] L. Greengard and J. Strain. The fast Gauss transform. SIAM J. Sci. Stat. Comput., 1991. [6] C. Yang, R. Duraiswami, N. A. Gumerov, and L. S. Davis. Improved fast Gauss transform and efficient kernel density estimation. In ICCV, 2003. [7] A. G. Gray and A. W. Moore. ‘N-body’ problems in statistical learning. In NIPS, 2000. [8] A. G. Gray and A. W. Moore. Nonparametric density estimation: Toward computational tractability. In SIAM Data Mining, 2003. [9] D. Lee, A. Gray, and A. Moore. Dual-tree fast Gauss transforms. In NIPS, 2006. [10] D. Lee and A. G. Gray. Faster Gaussian summation: Theory and experiment. In UAI, 2006. [11] B. W. Silverman. Density estimation for statistics and data analysis. Chapman and Hal, 1986. [12] C. Yang, R. Duraiswami, and L. S. Davis. Efficient kernel machines using the improved fast Gauss transform. In NIPS, 2004. [13] V. Raykar, C. Yang, R. Duraiswami, and N. Gumerov. Fast computation of sums of Gaussians in high dimensions. UMD-CS-TR-4767, 2005. [14] D. Lang, M. Klaas, and N. de Freitas. Empirical testing of fast kernel density estimation algorithms. Technical Report UBC TR-2005-03, University of British Columbia, Vancouver, 2005. [15] S. Arya and D. Mount. Approximate nearest neighbor queries in fixed dimensions. In SODA, 1993. [16] S. Arya, D. M. Mount, N. S. Netanyahu, R. Silverman, and A. Y. Wu. An optimal algorithm for approximate nearest neighbor searching fixed dimensions. Journal of the ACM, 1998. [17] M. Frigo and S. G. Johnson. The design and implementation of FFTW3. Proceedings of the IEEE, 2005. [18] R. C. Whaley, A. Petitet, and J. J. Dongarra. Automated empirical optimization of software and the ATLAS project. Parallel Computing, 27(1–2):3–35, 2001. [19] T. F. Gonzalez. Clustering to minimize the maximum inter–cluster distance. In Journal of Theoretical Computer Science, number 38, pages 293 – 306, October 1985. [20] T. Feder and D. H. Greene. Optimal algorithms for approximate clustering. In STOC, 1988. [21] C. Faloutsos, B. Seeger, A. Traina, and C. Traina. Spatial join selectivity using power laws. In SIGMOD Conference, 2000. [22] C. E. Rasmussen and C. K. I. Williams. Gaussian Processes for Machine Learning. The MIT Press, 2006. [23] V. Simoncini and D. Szyld. Theory of inexact Krylov subspace methods and applications to scientific computing. Technical Report 02-4-12, Temple University, 2002.
2008
206
3,461
Reducing statistical dependencies in natural signals using radial Gaussianization Siwei Lyu Computer Science Department University at Albany, SUNY Albany, NY 12222 lsw@cs.albany.edu Eero P. Simoncelli Center for Neural Science New York University New York, NY 10003 eero@cns.nyu.edu Abstract We consider the problem of transforming a signal to a representation in which the components are statistically independent. When the signal is generated as a linear transformation of independent Gaussian or non-Gaussian sources, the solution may be computed using a linear transformation (PCA or ICA, respectively). Here, we consider a complementary case, in which the source is non-Gaussian but elliptically symmetric. Such a source cannot be decomposed into independent components using a linear transform, but we show that a simple nonlinear transformation, which we call radial Gaussianization (RG), is able to remove all dependencies. We apply this methodology to natural signals, demonstrating that the joint distributions of nearby bandpass filter responses, for both sounds and images, are closer to being elliptically symmetric than linearly transformed factorial sources. Consistent with this, we demonstrate that the reduction in dependency achieved by applying RG to either pairs or blocks of bandpass filter responses is significantly greater than that achieved by PCA or ICA. 1 Introduction Signals may be manipulated, transmitted or stored more efficiently if they are transformed to a representation in which there is no statistical redundancy between the individual components. In the context of biological sensory systems, the efficient coding hypothesis [1, 2] proposes that the principle of reducing redundancies in natural signals can be used to explain various properties of biological perceptual systems. Given a source model, the problem of deriving an appropriate transformation to remove statistical dependencies, based on the statistics of observed samples, has been studied for more than a century. The most well-known example is principal components analysis (PCA), a linear transformation derived from the second-order signal statistics (i.e., the covariance structure), that can fully eliminate dependencies for Gaussian sources. Over the past two decades, a more general method, known as independent component analysis (ICA), has been developed to handle the case when the signal is sampled from a linearly transformed factorial source. ICA and related methods have shown success in many applications, especially in deriving optimal representations for natural signals [3, 4, 5, 6]. Although PCA and ICA bases may be computed for nearly any source, they are only guaranteed to eliminate dependencies when the assumed source model is correct. And even in cases where these methodologies seems to produce an interesting solution, the components of the resulting representation may be far from independent. A case in point is that of natural images, for which derived ICA transformations consist of localized oriented basis functions that appear similar to the receptive field descriptions of neurons in mammalian visual cortex [3, 5, 4]. Although dependency between the responses of such linear basis functions is reduced compared to that of the original pixels, this reduc1 Elliptical Linearly transformed factorial Factorial Gaussian Spherical Fig. 1. Venn diagram of the relationship between density models. The two circles represent the linearly transformed factorial densities as assumed by the ICA methods, and elliptically symmetric densities (ESDs). The intersection of these two classes is the set of all Gaussian densities. The factorial densities form a subset of the linearly transformed factorial densities and the spherically symmetric densities form a subset of the ESDs. tion is only slightly more than that achieved with PCA or other bandpass filters [7, 8]. Furthermore, the responses of ICA and related filters still exhibit striking higher-order dependencies [9, 10, 11]. Here, we consider the dependency elimination problem for the class of source models known as elliptically symmetric densities (ESDs) [12]. For ESDs, linear transforms have no effect on the dependencies beyond second-order, and thus ICA decompositions offer no advantage over PCA. We introduce an alternative nonlinear procedure, which we call radial Gaussianization (RG). In RG, the norms of whitened signal vectors are nonlinearly adjusted to ensure that the resulting output density is a spherical Gaussian, whose components are statistically independent. We first show that the joint statistics of proximal bandpass filter responses for natural signals (sounds and images) are better described as an ESD than linearly transformed factorial sources. Consistent with this, we demonstrate that the reduction in dependency achieved by applying RG to such data is significantly greater than that achieved by PCA or ICA. A preliminary version of portions of this work was described in [13]. 2 Elliptically Symmetric Densities The density of a random vector x ∈Rd with zero mean is elliptically symmetric if it is of the form: p(x) = 1 α|Σ| 1 2 f −1 2xTΣ−1x ! , (1) where Σ is a positive definite matrix, f(·) is the generating function satisfying f(·) ≥0 and R ∞ 0 f(−r2/2) rd−1 dr < ∞, and the normalizing constant α is chosen so that the density integrates to one [12]. The definitive characteristic of an ESD is that the level sets of constant probability are ellipsoids determined by Σ. In the special case when Σ is a multiple of the identity matrix, the level sets of p(x) are hyper-spheres and the density is known as a spherically symmetric density (SSD). Assuming x has finite second-order statistics, Σ is a multiple of the covariance matrix, which implies that any ESD can be transformed into an SSD by a PCA/whitening operation. When the generating function is an exponential, the resulting ESD is a zero-mean multivariate Gaussian with covariance matrix Σ. In this case, x can also be regarded as a linear transformation of a vector s containing independent unit-variance Gaussian components, as: x = Σ−1/2s. In fact, the Gaussian is the only density that is both elliptically symmetric and linearly decomposable into independent components [14]. In other words, the Gaussian densities correspond to the intersection of the class of ESDs and the class assumed by the ICA methods. As a special case, a spherical Gaussian is the only spherically symmetric density that is also factorial (i.e., has independent components). These relationships are illustrated in a Venn diagram in Fig. 1. Apart from the special case of Gaussian densities, a linear transformation such as PCA or ICA cannot completely eliminate dependencies in the ESDs. In particular, PCA and whitening can transform an ESD variable to a spherically symmetric variable, xwht, but the resulting density will not be factorial unless it is Gaussian. And ICA would apply an additional rotation (i.e., an orthogonal 2 g(r) pout(r) rin rout (c) (d) (e) (f) (b) pin(r) (a) Fig. 2. Radial Gaussianization procedure for 2D data. (a,e): 2D joint densities of a spherical Gaussian and a non-Gaussian SSD, respectively. The plots are arranged such that a spherical Gaussian has equalspaced contours. (b,f): radial marginal densities of the spherical Gaussian in (a) and the SSD in (e), respectively. Shaded regions correspond to shaded annuli in (a) and (e). (c): the nonlinear mapping that transforms the radii of the source to those of the spherical Gaussian. (d): log marginal densities of the Gaussian in (a) and the SSD in (e), as red dashed line and green solid line, respectively. matrix) to transform xwht to a new set of coordinates maximizing a higher-order contrast function (e.g., kurtosis). However, for spherically symmetric xwht, p(xwht) is invariant to rotation, and thus unaffected by orthogonal transformations. 3 Radial Gaussianization Given that linear transforms are ineffective in removing dependencies from a spherically symmetric variable xwht (and hence the original ESD variable x), we need to consider non-linear mappings. As described previously, a spherical Gaussian is the only SSD with independent components. Thus, a natural solution for eliminating the dependencies in a non-Gaussian spherically symmetric xwht is to transform it to a spherical Gaussian. Selecting such a non-linear mapping without any further constraint is a highly ill-posed problem. It is natural to restrict to nonlinear mappings that act radially, preserving the spherical symmetry. Specifically, one can show that the generating function of p(xwht) is completely determined by its radial marginal distribution: pr(r) = rd−1 β f(−r2/2), where r = ∥xwht∥, Γ(·) is the standard Gamma function, and β is the normalizing constant that ensures that the density integrates to one. In the special case of a spherical Gaussian of unit variance, the radial marginal is a chi-density with d degrees of freedom: pχ(r) = rd−1 2d/2−1Γ(d/2) exp(−r2/2). We define the radial Gaussianization (RG) transformation as xrg = g(∥xwht∥) xwht ∥xwht∥, where nonlinear function g(·) is selected to map the radial marginal density of xwht to the chi-density. Solving for a monotonic g(·) is a standard onedimensional density-mapping problem, and the unique solution is the composition of the inverse cumulative density function (CDF) of pχ with the CDF of pr: g(r) = F−1 χ Fr(r). A illustration of the procedure is provided in Fig. 2. In practice, we can estimate Fr(r) from a histogram computed from training data, and use this to construct a numerical approximation (i.e., a look-up table) of the continuous function ˆg(r). Note that the accuracy of the estimated RG transformation will depend on the number of data samples, but is independent of the dimensionality of the data vectors. In summary, a non-Gaussian ESD signal can be radially Gaussianized by first applying PCA and whitening operations to remove second-order dependency (yielding an SSD), followed by a nonlinear transformation that maps the radial marginal to a chi-density. 4 Application to Natural Signals An understanding of the statistical behaviors of source signals is beneficial for many problems in signal processing, and can also provide insights into the design and functionality of biological sensory systems. Gaussian signal models are widely used, because they are easily characterized and often lead to clean and efficient solutions. But many naturally occurring signals exhibit striking 3 non-Gaussian statistics, and much recent literature focuses on the problem of characterizing and exploiting these behaviors. Specifically, ICA methodologies have been used to derive linear representations for natural sound and image signals whose coefficients are maximally sparse or independent [3, 5, 6]. These analyses generally produced basis sets containing bandpass filters resembling those used to model the early transformations of biological auditory and visual systems. Despite the success of ICA methods in providing a fundamental motivation for sensory receptive fields, there are a number of simple observations that indicate inconsistencies in this interpretation. First, the responses of ICA or other bandpass filters exhibit striking dependencies, in which the variance of one filter response can be predicted from the amplitude of another nearby filter response [10, 15]. This suggests that although the marginal density of the bandpass filter responses are heavy-tailed, their joint density is not consistent with the linearly transformed factorial source model assumed by ICA. Furthermore, the marginal distributions of a wide variety of bandpass filters (even a “filter” with randomly selected zero-mean weights) are all highly kurtotic [7]. This would not be expected for the ICA source model: projecting the local data onto a random direction should result in a density that becomes more Gaussian as the neighborhood size increases, in accordance with a generalized version of the central limit theorem [16]. A recent quantitative study [8] further showed that the oriented bandpass filters obtained through ICA optimization on images lead to a surprisingly small improvement in reducing dependency relative to decorrelation methods such as PCA. Taken together, all of these observations suggest that the filters obtained through ICA optimization represent a “shallow” optimum, and are perhaps not as uniquely suited for image or sound representation as initially believed. Consistent with this, recently developed models for local image statistics model local groups of image bandpass filter responses with non-Gaussian ESDs [e.g., 17, 18, 11, 19, 20]. These all suggest that RG might provide an appropriate means of eliminating dependencies in natural signals. Below, we test this empirically. 4.1 Dependency Reduction in Natural Sounds We first apply RG to natural sounds. We used sound clips from commercial CDs, which have a sampling frequency of 44100 Hz and typical length of 15 −20 seconds, and contents including animal vocalization and recordings in natural environments. These sound clips were filtered with a bandpass gammatone filter, which are commonly used to model the peripheral auditory system [21]. In our experiments, analysis was based on a filter with center frequency of 3078 Hz. Shown in the top row of column (a) in Fig.3 are contour plots of the joint histograms obtained from pairs of coefficients of a bandpass-filtered natural sound, separated with different time intervals. Similar to the empirical observations for natural images [17, 11], the joint densities are nonGaussian, and have roughly elliptically symmetric contours for temporally proximal pairs. Shown in the top row of column (b) in Fig.3 are the conditional histograms corresponding to the same pair of signals. The “bow-tie” shaped conditional distribution, which has been also observed in natural images [10, 11, 15], indicates that the conditional variance of one signal depends on the value of the other. This is a highly non-Gaussian behavior, since the conditional variances of a jointly Gaussian density are always constant, independent of the value of the conditioning variable. For pairs that are distant, both the second-order correlation and the higher-order dependency become weaker. As a result, the corresponding joint histograms show more resemblance to the factorial product of two one-dimensional super-Gaussian densities (bottom row of column (a) in Fig.3), and the shape of the corresponding conditional histograms (column (b)) is more constant, all as would be expected for two independent random variables . As described in previous sections, the statistical dependencies in an elliptically symmetric random variable can be effectively removed by a linear whitening operation followed by a nonlinear radial Gaussianization, the latter being implemented as histogram transform of the radial marginal density of the whitened signal. Shown in columns (c) and (d) in Fig.3 are the joint and conditional histograms of the transformed data. First, note that when the two signals are nearby, RG is highly effective, as suggested by the roughly Gaussian joint density (equally spaced circular contours), and by the consistent vertical cross-sections of the conditional histogram. However, as the temporal separation between the two signals increases, the effects of RG become weaker (middle row, Fig. 3). When the two signals are distant (bottom row, Fig.3), they are nearly independent, and applying RG can actually increase dependency, as suggested by the irregular shape of the conditional densities (bottom row, column (d)). 4 (a) (b) (c) (d) 0.1 msec (4 samples) 1.5 msec (63 samples) 3.5 msec (154 samples) Fig. 3. Radial Gaussianization of natural sounds. (a): Contour plots of joint histograms of pairs of band-pass filter responses of a natural sound clip. Each row corresponds to pairs with different temporal separation, and levels are chosen so that a spherical Gaussian density will have equally spaced contours. (c) Joint histograms after whitening and RG transformation. (b,d): Conditional histograms of the same data shown in (a,c), computed by independently normalizing each column of the joint histogram. Histogram intensities are proportional to probability, except that each column of pixels is independently rescaled so that the largest probability value is displayed as white. To quantify more precisely the dependency reduction achieved by RG, we measure the statistical dependency of our multivariate sources using the multi-information (MI) [22], which is defined as the Kulback-Leibler divergence [23] between the joint distribution and the product of its marginals: I(x) = DKL p(x) ∥Q k p(xk) = Pd k=1 H(xk) −H(x), where H(x) = R p(x) log (p(x))dx is the differential entropy of x, and H(xk) denotes the differential entropy of the kth component of x. As a measure of statistical dependency among the elements of x, MI is non-negative, and is zero if and only if the components of x are mutually independent. Furthermore, MI is invariant to any transformation on individual components of x (e.g., element-wise rescaling). To compare the effect of different dependency reduction methods, we estimated the MI of pairs of bandpass filter responses with different temporal separations. This is achieved with a non-parametric “bin-less” method based on the order statistics [24], which alleviates the strong bias and variance intrinsic to the more traditional binning (i.e., “plug-in”) estimators. It is especially effective in this case, where the data dimensionality is two. We computed the MI for each pair of raw signals, as well as pairs of the PCA, ICA and RG transformed signals. The ICA transformation was obtained using RADICAL [25], an algorithm that directly optimizes the MI using a smoothed grid search over a non-parametric estimate of entropy. The results, averaged over all 10 sounds, are plotted in Fig. 4. First, we note that PCA produces a relatively modest reduction in MI: roughly 20% for small separations, decreasing gradually as the separation increase. We also see that ICA offers very little additional reduction over PCA for small separations. In contrast, the nonlinear RG transformation achieves an impressive reduction (nearly 100%) in MI for pairs separated by less than 0.5 msec. This can be understood by considering the joint and conditional histograms in Fig. 3. Since the joint density of nearby pairs is approximately elliptically symmetric, ICA cannot provide much improvement beyond what is obtained with PCA, while RG is expected to perform well. On the other hand, the joint densities of more distant pairs (beyond 2.5 msec) are roughly factorial, as seen in the bottom row of Fig. 3. In this case, neither PCA nor ICA is effective in further reducing dependency, as is seen in the plots of Fig. 4, but RG makes the pairs more dependent, as indicated by an increase in MI above that of the original pairs for separation over 2.5 msec. This is a direct result of the fact that the data do not adhere to the elliptically symmetric source model assumptions underlying the RG procedure. For intermediate separations (0.2 to 2 msec), there is a transition of the joint densities from elliptically symmetric to factorial (second row in Fig. 3), and ICA is seen to offer a modest improvement over PCA. We 5 0.1 0.5 1 1.5 2 2.5 3.5 0 0.1 0.2 0.3 0.4 0.5 separation (msec) MI (bits/coeff) raw pca/ica rg 1 2 4 8 16 32 0 0.1 0.2 0.3 0.4 0.5 MI (bits/coeff) separation (samples) raw pca/ica rg Fig. 4. Left: Multi-information (in bits/coefficient) for pairs of bandpass filter responses of natural audio signals, as a function of temporal separation. Shown are the MI of the raw filter response pairs, as well as the MI of the pairs transformed with PCA, ICA, and RG. Results are averaged over 10 natural sound signals. Right: Same analysis for pairs of bandpass filter responses averaged over 8 natural images. 0.2 0.3 0.4 0.5 0.6 0.2 0.3 0.4 0.5 0.6 0.7 blk size = 3x3 0.4 0.5 0.6 0.7 0.8 0.9 0.4 0.5 0.6 0.7 0.8 0.9 1 blk size = 7x7 0.6 0.7 0.8 0.9 1 1.1 0.6 0.7 0.8 0.9 1 1.1 1.2 1.3 blk size = 15x15 3 × 3 7 × 7 15 × 15 Fig. 5. Reduction of MI (bits/pixel) achieved with ICA and RG transforms, compared to that achieved with PCA, for pixel blocks of various sizes. The x-axis corresponds to ∆Ipca. Pluses denotes ∆Irg, and circles denotes ∆Iica. Each plotted symbol corresponds to the result from one image in our test set. found qualitatively similar behaviors (right column in Fig. 4) when analyzing pairs of bandpass filter responses of natural images using the data sets described in the next section. 4.2 Dependency Reduction in Natural Images We have also examined the ability of RG to reduce dependencies of image pixel blocks with local mean removed. We examined eight images of natural woodland scenes from the van Hateren database [26]. We extracted the central 1024 × 1024 region from each, computed the log of the intensity values, and then subtracted the local mean [8] by convolving with an isotropic bandpass filter that captures an annulus of frequencies in the Fourier domain ranging from π/4 to π radians/pixel. We denote blocks taken from these bandpass filtered images as xraw. These blocks were then transformed with PCA (denoted xpca), ICA (denoted xica) and RG (denoted xrg). These block data are of significantly higher dimension than the filter response pairs examined in the previous section. For this reason, we switched our ICA computations from RADICAL to the more efficient FastICA algorithm [27], with a contrast function g(u) = 1 −exp(−u2) and using the symmetric approach for optimization. We would like to compare the dependency reduction performance of each of these methods using multi-information. However, direct estimation of MI becomes difficult and less accurate with higher data dimensionality. Instead, as in [8], we can avoid direct estimation of MI by evaluating and comparing the differences in MI of the various transformed blocks relative to xraw. Specifically, we use ∆Ipca = I(xraw) −I(xpca) as a reference value, and compare this with ∆Iica = I(xraw) −I(xica) and ∆Irg = I(xraw) −I(xrg). Full details of this computation are described in [13]. 6 Shown in Fig.5 are scatter plots of ∆Ipca versus ∆Iica (red circles) and ∆Irg (blue pluses) for various block sizes. Each point corresponds to MI computation over blocks from one of eight bandpassfiltered test images. As the figure shows, RG achieves significant reduction in MI for most images, and this holds over a range of block sizes, whereas ICA shows only a very small improvement relative to PCA1. We again conclude that ICA does not offer much advantage over second-order decorrelation algorithms such as PCA, while RG offers significant improvements. These results may be attributed to the fact that the joint density for local pixel blocks tend to be close to be elliptically symmetric [17, 11]. 5 Conclusion We have introduced a new signal transformation known as radial Gaussianization (RG), which can eliminate dependencies of sources with elliptically symmetric densities. Empirically, we have shown that RG transform is highly effective at removing dependencies between pairs of samples in bandpass filtered sounds and images, and within local blocks of bandpass filtered images. One important issue underlying our development of this methodology is the intimate relation between source models and dependency reduction methods. The class of elliptically symmetric densities represents a generalization of the Gaussian family that is complementary to the class of linearly transformed factorial densities (see Fig. 1). The three dependency reduction methods we have discussed (PCA, ICA and RG) are each associated with one of these classes, and are each guaranteed to produce independent responses when applied to signals drawn from a density belonging to the corresponding class. But applying one of these methods to a signal with an incompatible source model may not achieve the expected reduction in dependency (e.g., applying ICA to an ESD), and in some cases can even increase dependencies (e.g., applying RG to a factorial density). Several recently published methods are related to RG. An iterative Gaussianization scheme transforms any source model to a spherical Gaussian by alternating between linear ICA transformations and nonlinear histogram matching to map marginal densities to Gaussians [28]. However, in general, the overall transformation of iterative Gaussianization is an alternating concatenation of many linear/nonlinear transformations, and results in a substantial distortion of the original source space. For the special case of ESDs, RG provides a simple one-step procedure with minimal distortion. Another nonlinear transform that has also been shown to be able to reduce higher-order dependencies in natural signals is divisive normalization [15]. In the extended version of this paper [13], we show that there is no ESD source model for whose dependencies can be completely eliminated by divisive normalization. On the other hand, divisive normalization provides a rough approximation to RG, which suggests that RG might provide a more principled justification for normalization-like nonlinear behaviors seen in biological sensory systems. There are a number of extensions of RG that are worth considering in the context of signal representation. First, we are interested in specific sub-families of ESD for which the nonlinear mapping of signal amplitudes in RG may be expressed in closed form. Second, the RG methodology provides a solution to the efficient coding problem for ESD signals in the noise-free case, and it is worthwhile to consider how the solution would be affected by the presence of sensor and/or channel noise. Third, we have shown that RG substantially reduces dependency for nearby samples of bandpass filtered image/sound, but that performance worsens as the coefficients become more separated, where their joint densities are closer to factorial. Recent models of natural images [29, 30] have used Markov random fields based on local elliptically symmetric models, and these are seen to provide a natural transition of pairwise joint densities from elliptically symmetric to factorial. We are currently exploring extensions of the RG methodology to such global models. And finally, we are currently examining the statistics of signals after local RG transformations, with the expectation that remaining statistical regularities (e.g., orientation and phase dependencies in images) can be studied, modeled and removed with additional transformations. References [1] F Attneave. Some informational aspects of visual perception. Psych. Rev., 61:183–193, 1954. 1Similar results for the comparison of ICA to PCA were obtained with a slightly different method of removing the mean values of each block [8]. 7 [2] H B Barlow. Possible principles underlying the transformation of sensory messages. In W A Rosenblith, editor, Sensory Communication, pages 217–234. MIT Press, Cambridge, MA, 1961. [3] 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. [4] A van der Schaaf and J H van Hateren. Modelling the power spectra of natural images: Statistics and information. Vision Research, 28(17):2759–2770, 1996. [5] A J Bell and T J Sejnowski. The ’independent components’ of natural scenes are edge filters. Vision Research, 37(23):3327–3338, 1997. [6] M S Lewicki. Efficient coding of natural sounds. Nature Neuroscience, 5(4):356–363, 2002. [7] R. Baddeley. Searching for filters with “interesting” output distributions: an uninteresting direction to explore. Network, 7:409–421, 1996. [8] Matthias Bethge. Factorial coding of natural images: how effective are linear models in removing higherorder dependencies? J. Opt. Soc. Am. A, 23(6):1253–1268, 2006. [9] B Wegmann and C Zetzsche. Statistical dependence between orientation filter outputs used in an human vision based image code. In Proc Visual Comm. and Image Processing, volume 1360, pages 909–922, Lausanne, Switzerland, 1990. [10] E P Simoncelli. Statistical models for images: Compression, restoration and synthesis. In Proc 31st Asilomar Conf on Signals, Systems and Computers, volume 1, pages 673–678, Pacific Grove, CA, November 2-5 1997. IEEE Computer Society. [11] M J Wainwright and E P Simoncelli. Scale mixtures of Gaussians and the statistics of natural images. In S. A. Solla, T. K. Leen, and K.-R. M¨uller, editors, Adv. Neural Information Processing Systems (NIPS*99), volume 12, pages 855–861, Cambridge, MA, May 2000. MIT Press. [12] K.T. Fang, S. Kotz, and K.W. Ng. Symmetric Multivariate and Related Distributions. Chapman and Hall, London, 1990. [13] S. Lyu and E. P. Simoncelli. Nonlinear extraction of “independent components” of elliptically symmetric densities using radial Gaussianization. Technical Report TR2008-911, Computer Science Technical Report, Courant Inst. of Mathematical Sciences, New York University, April 2008. [14] D. Nash and M. S. Klamkin. A spherical characterization of the normal distribution. Journal of Multivariate Analysis, 55:56–158, 1976. [15] O Schwartz and E P Simoncelli. Natural signal statistics and sensory gain control. Nature Neuroscience, 4(8):819–825, August 2001. [16] William Feller. An Introduction to Probability Theory and Its Applications, volume 1. Wiley, January 1968. [17] C Zetzsche and G Krieger. The atoms of vision: Cartesian or polar? J. Opt. Soc. Am. A, 16(7), July 1999. [18] J. Huang and D. Mumford. Statistics of natural images and models. In IEEE International Conference on Computer Vision and Pattern Recognition (CVPR), 1999. [19] A Srivastava, X Liu, and U Grenander. Universal analytical forms for modeling image probability. IEEE Pat. Anal. Mach. Intell., 24(9):1200–1214, Sep 2002. [20] Y. Teh, M. Welling, and S. Osindero. Energy-based models for sparse overcomplete representations. Journal of Machine Learning Research, 4:1235–1260, 2003. [21] P I M Johannesma. The pre-response stimulus ensemble of neurons in the cochlear nucleus. In Symposium on Hearing Theory (IPO), pages 58–69, Eindhoven, Holland, 1972. [22] M. Studeny and J. Vejnarova. The multiinformation function as a tool for measuring stochastic dependence. In M. I. Jordan, editor, Learning in Graphical Models, pages 261–297. Dordrecht: Kluwer., 1998. [23] T. Cover and J. Thomas. Elements of Information Theory. Wiley-Interscience, 2nd edition, 2006. [24] A. Kraskov, H. St¨ogbauer, and P. Grassberger. Estimating mutual information. Phys. Rev. E, 69(6):66–82, Jun 2004. [25] E. G. Learned-Miller and J. W. Fisher. ICA using spacings estimates of entropy. Journal of Machine Learning Research, 4(1):1271–1295, 2000. [26] J H van Hateren and A van der Schaaf. Independent component filters of natural images compared with simple cells in primary visual cortex. Proc. R. Soc. Lond. B, 265:359–366, 1998. [27] A. Hyv¨arinen. Fast and robust fixed-point algorithms for independent component analysis. IEEE Transactions on Neural Networks, 10(3):626–634, 1999. [28] Scott Saobing Chen and Ramesh A. Gopinath. Gaussianization. In Advances in Neural Computation Systems (NIPS), pages 423–429, 2000. [29] S. Roth and M. Black. Fields of experts: A framework for learning image priors. In IEEE Conference on Computer Vision and Patten Recognition (CVPR), volume 2, pages 860–867, 2005. [30] S Lyu and E P Simoncelli. Statistical modeling of images with fields of Gaussian scale mixtures. In B Sch¨olkopf, J Platt, and T Hofmann, editors, Adv. Neural Information Processing Systems 19, volume 19, Cambridge, MA, May 2007. MIT Press. 8
2008
207
3,462
A Transductive Bound for the Voted Classifier with an Application to Semi-supervised Learning Massih R. Amini Laboratoire d’Informatique de Paris 6 Universit´e Pierre et Marie Curie, Paris, France massih-reza.amini@lip6.fr Franc¸ois Laviolette Universit´e Laval Qu´ebec (QC), Canada francois.laviolette@ift.ulaval.ca Nicolas Usunier Laboratoire d’Informatique de Paris 6 Universit´e Pierre et Marie Curie, Paris, France nicolas.usunier@lip6.fr Abstract We propose two transductive bounds on the risk of majority votes that are estimated over partially labeled training sets. The first one involves the margin distribution of the classifier and a risk bound on its associate Gibbs classifier. The bound is tight when so is the Gibbs’s bound and when the errors of the majority vote classifier is concentrated on a zone of low margin. In semi-supervised learning, considering the margin as an indicator of confidence constitutes the working hypothesis of algorithms which search the decision boundary on low density regions. Following this assumption, we propose to bound the error probability of the voted classifier on the examples for whose margins are above a fixed threshold. As an application, we propose a self-learning algorithm which iteratively assigns pseudo-labels to the set of unlabeled training examples that have their margin above a threshold obtained from this bound. Empirical results on different datasets show the effectiveness of our approach compared to the same algorithm and the TSVM in which the threshold is fixed manually. 1 Introduction Ensemble methods [5] return a weighted vote of baseline classifiers. It is well known that under the PACBayes framework [9], one can obtain an estimation of the generalization error (also called risk) of such majority votes (referred as Bayes classifier). Unfortunately, those bounds are generally not tight, mainly because they are indirectly obtain via a bound on a randomized combination of the baseline classifiers (called the Gibbs classifier). Although the PAC-Bayes theorem gives tight risk bounds of Gibbs classifiers, the bounds of their associate Bayes classifiers come at a cost of worse risk (trivially a factor of 2, or under some margin assumption, a factor of 1+ϵ). In practice the Bayes risk is often smaller than the Gibbs risk. In this paper we present a transductive bound over the Bayes risk. This bound is also based on the risk of the associated Gibbs classifier, but it takes as an additional information the exact knowledge of the margin distribution of unlabeled data. This bound is obtained by analytically solving a linear program. The intuitive idea here is that given the risk of the Gibbs classifier and the margin distribution, the risk of the majority vote classifier is maximized when all its errors are located on low margin examples. We show that our bound is tight when the associated Gibbs risk can accurately be estimated and when the Bayes classifier makes most of its errors on low margin examples. The proof of this transductive bound makes use of the (joint) probability over an unlabeled data set that the majority vote classifier makes an error and the margin is above a given threshold. This second result naturally leads to consider the conditional probability that the majority vote classifier makes an error knowing that the margin is above a given threshold. This conditional probability is related to the concept that the margin is an indicator of confidence which is recurrent in semi-supervised self-learning algorithms [3,6,10,11,12]. These methods first train a classifier on the labeled training examples. The classifier outputs serve then to assign pseudo-class labels to unlabeled data having margin above a given threshold. The supervised method is retrained using the initial labeled set and its previous predictions on unlabeled data as additional labeled examples. Practical algorithms almost fix the margin threshold manually. In the second part of the paper, we propose to find this margin threshold by minimizing the bound on the conditional probability. Empirical results on different datasets show the effectiveness of our approach compared to TSVM [7] and the same algorithm but with a manually fixed threshold as in [11] In the remainder of the paper, we present, in section 2, our transductive bounds and show their outcomes in terms of sufficient conditions under which unlabeled data may be of help in the learning process and a linear programming method to estimate these bounds. In section 4, we present experimental results obtained with a self-learning algorithm on different datasets in which we use the bound presented in section 2.2 for choosing the threshold which serve in the label assignment step of the algorithm. Finally, in section 5 we discuss the outcomes of this study and give some pointers to further research. 2 Transductive Bounds on the Risk of the Voted Classifier We are interested in the study of binary classification problems where the input space X is a subset of Rd and the output space is Y = {−1, +1}. We furthermore suppose that the training set is composed of a labeled set Zℓ= ((xi, yi))l i=1 ∈Zl and an unlabeled set XU = (x′ i)l+u i=l+1 ∈X u, where Z represents the set of X × Y. We suppose that each pair (x, y) ∈Zℓis drawn i.i.d. with respect to a fixed, but unknown, probability distribution D over X × Y and we denote the marginal distribution over X by DX . To simplify the notation and the proofs, we restrict ourselves to the deterministic labeling case, that is, for each x′ ∈XU, there is exactly one possible label that we will denote by y′.1 In this study, we consider learning algorithms that work in a fixed hypothesis space H of binary classifiers (defined without reference to the training data). After observing the training set S = Zℓ∪XU, the task of the learner is to choose a posterior distribution Q over H such that the Q-weighted majority vote classifier BQ (also called the Bayes classifier) will have the smallest possible risk on examples of XU. Recall that the Bayes classifier is defined by BQ(x) = sgn [Eh∼Qh(x)] ∀x ∈X. (1) where, sgn(x)=+1 if the real number x > 0 and −1 otherwise. We further denote by GQ the associated Gibbs classifier which for classifying any example x ∈X chooses randomly a classifier h according to the distribution Q. We accordingly define the transductive risk of GQ over an unlabeled set by: Ru(GQ) def= 1 u X x′∈XU Eh∼Q[[h(x′) ̸= y′]] (2) Where, [[π]] = 1 if predicate π holds and 0 otherwise, and for every unlabeled example x′ ∈XU we refer to y′ as its true unknown class label. In section 2.1 we show that if we consider the margin as an indicator of confidence and that we dispose a tight upper bound Rδ u(GQ) of the risk of GQ which holds with probability 1 −δ over the random choice of Zℓand XU (for example using Theorem 17 or 18 of Derbelo et al. [4]), we are then able to accurately bound the transductive risk of the Bayes classifier: Ru(BQ) def= 1 u X x′∈XU [[BQ(x′) ̸= y′]] (3) This result follows from a bound on the joint Bayes risk: Ru∧θ(BQ) def= 1 u X x′∈XU [[BQ(x′) ̸= y′ ∧mQ(x′) > θ]] (4) Where mQ(·) = |Eh∼Qh(·)| denotes the unsigned margin function. One of the practical issues that arises from this result is the possibility to define a threshold θ for which the bound is optimal and that we use in a self-learning algorithm by iteratively assigning pseudo-labels to unlabeled examples having margin above this threshold. We finally denote by Euz the expectation of a random variable z with respect to the uniform distribution over XU and for notation convenience we equivalently define Pu the uniform probability distribution over XU i.e. For any subset A, P(A) = 1 ucard(A). 1The proofs can be inferred to the more general noisy case, but one has to replace the summation P x′∈XU by P (x′,y′)∈XU ×{−1,+1}. P(x′,y′)∼D(y′|x′) in the definitions of equations (3) and (4). 2.1 Main Result Our main result is the following theorem which provides two bounds on the transductive risks of the Bayes classifier (3) and the joint Bayes risk (4). Theorem 1 Suppose that BQ is as in (1). Then for all Q and all δ ∈(0, 1] with probability at least 1 −δ: Ru(BQ) ≤ inf γ∈(0,1]  Pu(mQ(x′) < γ) + 1 γ  Kδ u(Q) −M < Q (γ)  +  (5) Where Kδ u(Q) = Rδ u(GQ) + 1 2 (EumQ(x′) −1), M ◁ Q (t) = EumQ(x′)[[mQ(x′) ◁t]] for ◁being < or ≤ and ⌊.⌋+ denotes the positive part (i.e. ⌊x⌋+ = [[x > 0]]x). More generally, with probability at least 1 −δ, for all Q and all θ ≥0: Ru∧θ(BQ) ≤ inf γ∈(θ,1]  Pu(θ < mQ(x′) < γ) + 1 γ j Kδ u(Q) + M ≤ Q (θ) −M < Q (γ) k +  (6) In section 2.2 we will prove that the bound (5) simply follows from (6). In order to better understand the former bound on the risk of the Bayes classifier, denote by F δ u(Q) the right hand side of equation (5): F δ u(Q) def= inf γ∈(0,1]  Pu(mQ(x′) < γ) + 1 γ  Kδ u(Q) −M < Q (γ)  +  and consider the following special case where the classifier makes most of its errors on unlabeled examples with low margin. Proposition 2, together with the explanations that follow, makes this idea clearer. Proposition 2 Assume that ∀x ∈XU, mQ(x) > 0 and that ∃C ∈(0, 1] such that ∀γ > 0: Pu (BQ(x′) ̸= y′ ∧mQ(x′) = γ) ̸= 0 ⇒Pu (BQ(x′) ̸= y′ ∧mQ(x′) < γ) ≥C · Pu (mQ(x′) < γ) Then, with probability at least 1 −δ: F δ u(Q) −Ru(BQ) ≤1 −C C Ru(BQ) + Rδ u(GQ) −Ru(GQ) γ∗ (7) Where γ∗= sup {γ|Pu (BQ(x′) ̸= y′ ∧mQ(x′) = γ) ̸= 0} Now, suppose that the margin is an indicator of confidence. Then, a Bayes classifier that makes its error mostly on low margin regions will admit a coefficient C in inequality (7) close to 1 and the bound of (5) becomes tight (provided we have an accurate upper bound Rδ u(GQ) ). In the next section we provide proofs of all the statements above and show in lemma 4 a simple way to compute the best margin threshold for which the general bound on the joint Bayes risk is the lowest. 2.2 Proofs All our proofs are based on the relationship between Ru(GQ) and Ru(BQ) and the following lemma: Lemma 3 Let (γ1, .., γN) be the ordered sequence of the different strictly positive values of the margin on XU, that is {γi, i = 1..N} = {mQ(x′)|x′ ∈XU ∧mQ(x′) > 0} and ∀i ∈{1, . . . , N −1}, γi < γi+1. Denote moreover bi = Pu (BQ(x′) ̸= y′ ∧mQ(x′) = γi) for i ∈{1, . . . , N}. Then, Ru(GQ) = N X i=1 biγi + 1 2 (1 −EumQ(x′)) (8) ∀θ ∈[0, 1], Ru∧θ(BQ) = N X i=k+1 bi with k = max{i|γi ≤θ} (9) Proof Equation (9) follows the definition Ru∧θ(BQ) = Pu (BQ(x′) ̸= y′ ∧mQ(x′) > θ). Equation (8) is obtained from the definition of the margin mQ which writes as ∀x′ ∈XU, mQ(x′) = |Eh∼Q[[h(x′) = 1]] −Eh∼Q[[h(x′) = −1]]| = |1 −2Eh∼Q[[h(x′) ̸= y′]]| By noticing that for all x′ ∈XU the condition Eh∼Q[[h(x′) ̸= y′]] > 1 2 is equivalent to the statement y′Eh∼Qh(x′) < 0 or BQ(x′) ̸= y′, we can rewrite mQ without absolute values and hence get: Eh∼Q[[h(x′) ̸= y′]] = 1 2(1 + mQ(x′))[[BQ(x′) ̸= y′]] + 1 2(1 −mQ(x′))[[BQ(x′) = y′]] (10) Finally equation (8) yields by taking the mean over x′ ∈XU and by reorganizing the equation using the notations of bi and γi. Recall that the values the x′ for which mQ(x′) = 0 counts for 0 in the sum that defined the Gibbs risk (see equation 2 and the definition of mQ). □ Proof of Theorem 1 First, we notice that equation (5) follows equation (6) from the fact that M ≤ Q (0) = 0 and the following inequality: Ru(BQ) = Ru∧0(BQ) + Pu(BQ(x′) ̸= y′ ∧mQ(x′) = 0) ≤Ru∧0(BQ) + Pu(mQ(x′) = 0) For proving equation (6), we know from lemma 3 that for a fix θ ∈[0, 1] there exist (b1, . . . , bN) such that 0 ≤bi ≤Pu (mQ(x′) = γi) and which satisfy equations (8) and (9). Let k = max{i | γi ≤θ}, assuming now that we can obtain an upper bound Rδ u(GQ) of Ru(GQ) which holds with probability 1 −δ over the random choices of Zℓand XU, from the definition (4) of Ru∧θ(BQ) with probability 1 −δ we have then Ru∧θ(BQ) ≤max b1,..,bN N X i=k+1 bi u.c. ∀i, 0 ≤bi ≤Pu (mQ(x′) = γi) and N X i=1 biγi ≤Kδ u(Q) (11) Where Kδ u(Q) = Rδ u(GQ) −1 2 (1 −EumQ(x′)). It turns out that the right hand side in equation (11) is the solution of a linear program that can be solved analytically and which is attained for: bi =      0 if i ≤k, min Pu (mQ(x′) = γi) ,  Kδ u(Q)−P k<j<i γjPu(mQ(x′)=γj) γi  + ! elsewhere. (12) For clarity, we defer the proof of equation (12) to lemma 4, and continue the proof of equation (6). Using the notations defined in Theorem 1, we rewrite P k<j<i γjPu (mQ(x′) = γj) as M < Q (γi) −M ≤ Q (θ). We further define I = max n i|Kδ u(Q) + M ≤ Q (θ) −M < Q (γi) > 0 o which implies PN i=k+1 bi = PI i=k+1 bi from equations (11) and (12) with bI = Kδ u(Q)+M ≤ Q (θ)−M < Q (γI) γI . From this inequality we hence obtain a bound on Ru∧θ(BQ): Ru∧θ(BQ) ≤Pu (θ < mQ(x′) < γI) + Kδ u(Q) + M ≤ Q (θ) −M < Q (γI) γI (13) The proof of the second point in theorem 1 is just a rewriting of this result as from the definition of γI, for any γ > γI, the right-hand side of equation (6) is equal to Pu (mQ(x′) < γ), which is greater than the right-hand side of equation (13). Moreover, for γ < γI, we notice that γ 7→Pu (mQ(x′) < γ)+ Kδ u(Q)+M ≤ Q (θ)−M < Q (γ) γ decreases. □ Lemma 4 (equation (12)) Let gi, i = 1...N be such that 0 < gi < gi+1, pi ≥0, i = 1...N, B ≥0 and k ∈{1, . . . , N}. Then, the optimal value of the linear program: max q1,...,qN N X i=k+1 qi u.c. ∀i, 0 ≤qi ≤pi and N X i=1 qigi ≤B (14) is attained for q∗defined by: ∀i ≤k : q∗ i = 0 and ∀i > k, q∗ i = min  pi, ⌊ B−P j<i q∗ j gj gi ⌋+  Proof Define O = {0}k × QN i=k+1[0, pi]. We will show that problem (14) has a unique optimal solution in O, and that this solution is q∗. In the rest of the proof, we denote F(q) = PN i=k+1 qi. First, the problem is convex, feasible (take ∀i, qi = 0) and bounded. Therefore there is an optimal solution qopt ∈QN i=1[0, pi]. Define qopt,O by qopt,O i = qopt i if i > k and qopt,O i = 0 otherwise. Then, qopt,O ∈O, it is clearly feasible, and F(qopt,O) = F(qopt). Therefore, there is an optimal solution in O. Now, for (q, q′) ∈RN × RN, define I(q, q′) = {i|qi > q′ i}, and consider the lexicographic order ⪰: ∀(q, q′) ∈RN × RN, q ⪰q′ ⇔I(q′, q) = ∅or (I(q, q′) ̸= ∅and min I(q, q′) < min I(q′, q)) The crucial point is that q∗is the greatest feasible solution in O for ⪰. Indeed, notice first that q∗is necessarily feasible and PN i=1 q∗ i = B. To see this result let M be the set {i > k| : q∗ i < pi}, we then have two possibilities to consider. (a) M = ∅. In this case q∗is simply the maximal element for ⪰in O. (b) M ̸= ∅. In this case, let K = min{i > k|q∗ i < pi} and M = I(q, q∗). We claim that there are no feasible q ∈RN such that q ≻q∗. By way of contradiction, suppose such a q exists. Then, if M ≤k, we have qM > 0, and therefore q is not in O; if k < M < K, we have qM > pM, which yields the same result; and finally, if M ≥K, we have PN i=1 qi > PN i=1 q∗ i = B, and q is not feasible. We now show that if q ∈O is feasible and q∗≻q, then q is not optimal (which is equivalent to show that an optimal solution in O must be the greatest feasible solution for ⪰). Let q ∈O be a feasible solution such that q∗≻q. Since q ≻q∗, I(q∗, q) is not empty. If I(q, q∗) = ∅, we have F(q∗) > F(q), and therefore q is not optimal. We now treat the case where I(q, q∗) ̸= ∅. Let K = min I(q∗, q) and M = min I(q, q∗). We have qM > 0 by definition, and K < M because q∗≻q and q ∈O. Let λ = min  qM, gM gK (pK −qK)  and define q′ by: q′ i = qi if i ̸∈{K, M} , q′ K = qK + gM gK λ and q′ M = qM −λ. We can see that q′ is feasible by the definition of λ, that it satisfies the box constraints, and P i q′ igi = P i qigi + gM gK λ ∗gK −λ ∗gM = P i qigi ≤B. Moreover F(q′) = F(q) + λ( gM gK −1) > F(q) since gK < gM and λ > 0. Thus, q is not optimal. In summary, we have shown that there is an optimal solution in O, and that a feasible solution in O must be the greatest feasible solution for the lexicographic order in O to be optimal and which is q∗. □ Proof of Proposition 2 First let us claim that Ru(BQ) ≥Pu (BQ(x′) ̸= y′ ∧mQ(x′) < γ∗) + 1 γ∗  Ku(Q) −M < Q (γ∗)  + (15) where γ∗= sup {γ|Pu (BQ(x′) ̸= y′ ∧mQ(x′) = γ) ̸= 0} and Ku(Q) = Ru(GQ)+ 1 2 (EumQ(x′) −1). Indeed, assume for now that equation (15) is true. Then, by assumption we have: Ru(BQ) ≥C · Pu (mQ(x′) < γ∗) + 1 γ∗  Ku(Q) −M < Q (γ∗)  + (16) Since F δ u(Q) ≤Pu (mQ(x′) < γ∗) + 1 γ∗ j Kδ u(Q) −M < Q (γ∗) k +, with probability at least 1 −δ we obtain: F δ u(Q) −Ru(BQ) ≤(1 −C)Pu (mQ(x′) < γ∗) + Rδ u(GQ) −Ru(GQ) γ∗ (17) This is due to the fact that ⌊Kδ u(Q) −M < Q (γ∗)⌋+ −⌊Ku(Q) −M < Q (γ∗)⌋+ ≤Rδ u(GQ) −Ru(GQ) when Rδ u(GQ) ≥Ru(GQ). Taking once again equation (16), we have Pu (mQ(x′) < γ∗) ≤ 1 C Ru(BQ). Plugging back this result in equation (17) yields Proposition 2. Now, let us prove the claim (equation (15)). Since ∀x′ ∈XU, mQ(x′) > 0, we have Ru(BQ) = Ru∧0(BQ). Using the notations of lemma 3, denote K the index such that γK = γ∗. Then, it follows from equation (8) of lemma 3 that Ru(GQ) = PK i=1 biγi + 1 2 (1 −EumQ(x′)). Solving for bK in this equality yields bK = Ku(Q)−P K−1 i=1 biγi γK and we therefore have bK ≥ 1 γK ⌊Ku(Q) −M < Q (γ∗)⌋+ since bK ≥0 and ∀i, bi ≤ Pu (mQ(x′) = γi). Finally, from equation (9), we have Ru(BQ) = PK i=1 bi, which implies equation (15) by using the lower bound on bK and the fact that PK−1 i=1 bi = Pu (BQ(x′) ̸= y′ ∧mQ(x′) < γ∗). □ In general, good PAC-Bayesian approximations of Ru(GQ) are difficult to carry out in supervised learning [4] mostly due to the huge number of needed instances to obtain accurate approximations of the distribution of the absolute values of the margin. In this section we have shown that the transductive setting allows for high precision on the bounds from the risk Ru(GQ) of the Gibbs classifier to the risk Ru(BQ) if we suppose that the Bayes classifier makes its errors mostly on low margin regions. 3 Relationship with margin-based self-learning algorithms In Proposition 2 we have considered the hypothesis that the margin is an indicator of confidence as one of the sufficient conditions which leads to a tight approximation of the risk of the Bayes classifier, Ru(BQ). This assumption constitutes the working hypothesis of margin-based self-learning algorithms in which a classifier is first built on the labeled training set. The output of the learner can then be used to assign pseudo-labels to unlabeled examples having a margin above a fixed threshold (denoted by the set ZU\ in what follows) and the supervised method is repeatedly retrained upon the set of the initial labeled and unlabeled examples that have been classified in the previous steps. The idea behind this pseudo-labeling is that unlabeled examples having a margin above a threshold are less subject to error prone labels, or equivalently, are those which have a small conditional Bayes error defined as: Ru|θ(BQ) def= Pu(BQ(x′) ̸= y′ | mQ(x′) > θ) = Ru∧θ(BQ) Pu(mQ(x′) > θ) (18) In this case the label assignation of unlabeled examples upon a margin criterion has the effect to push away the decision boundary from the unlabeled data. This strategy follows the cluster assumption [10] used in the design of some semi-supervised learning algorithms where the decision boundary is supposed to pass through a region of low pattern density. Though margin-based self-learning algorithms are inductive in essence, their learning phase is nearly related to transductive learning which predicts the labels of a given unlabeled set. Indeed, in both cases the pseudo class-label assignation of unlabeled examples is interrelated to their margin. Input: Labeled and Unlabeled training sets: Zℓ, XU Initialize (1) Train a classifier H on Zℓ (2) Set ZU\ ←∅ repeat (3) Compute the margin threshold θ∗minimizing (18) from (6) (4) S ←{(x′, y′) | x′ ∈XU; mQ(x′) ≥θ∗∧y′ = sgn(H(x′))} (5) ZU\ ←ZU\ ∪S, XU = XU\S (6) Learn a classifier H by optimizing a global loss function on Zℓand ZU\ until XU is empty or that there are no adds to ZU\ ; Output The final classifier H Figure 1: Self-learning algorithm (SLA∗) For all these algorithms the choice of the threshold is a crucial point, as with a low threshold the risk to assign false labels to examples is high and a higher value of the threshold would not provide enough examples to enhance the current decision function. In order to examine the effect of fixing the threshold or computing it automatically we considered the marginbased self-training algorithm proposed by T¨ur et al. [10, Figure 6] (referred as SLA in the following), in which unlabeled examples having margin above a fixed threshold are iteratively added to the labeled set and are not considered in next rounds for label distribution. In our approach, the best threshold minimizing the conditional Bayes error (18) from equation (6) of theorem 1 is computed at each round of the algorithm (line 3, figure 1 - SLA∗) while the threshold is kept fixed in [10, Figure 6] (line 3 is outside of the repeat loop). The bound Rδ Q(G), of the risk of the Gibbs classifier which is involved in the computation of the threshold in equation (18) was fixed to its worst value 0.5. 4 Experiments and Results In our experiments, we employed a Boosting algorithm optimizing the following exponential loss2 as the baseline learner (line (6), figure 1): Lc(H, Zℓ, ZU\) = 1 l X x∈Zℓ e−yH(x) + 1 |ZU\| X x′∈ZU\ e−y′H(x′) (19) 2Bennett et al. [1] have shown that the minimization of (19) allows to reach a local minima of the margin loss function LM(H, Zℓ, ZU\) = 1 l P x∈Zℓe−yH(x) + 1 |ZU\| P x′∈ZU\ e|H(x′)|. Where H = P t αtht is a linear weighted sum of decision stumps ht which are uniquely defined by an input feature jt ∈{1, . . . , d} and a threshold λt as: ht(x) = 2[[ϕjt(x) > λt]] −1 With ϕj(x) the jth feature characteristic of x. Within this setting, the Gibbs classifier is defined as a random choice from the set of baseline classifiers {ht}T t=1 according to Q such that ∀t, PQ(ht) = |αt| P t |αt|. Accordingly the Bayes classifier is simply the weighted voting classifier BQ = sign(H). Although the self-learning model (SLA∗) is an inductive algorithm we carried out experiments in a transductive setting in order to compare results with the transductive SVM of Joachims [7] and the self-learning algorithm (SLA) described in [11, Figure 6]. For the latter, after training a classifier H on Zℓ(figure 1, step 1) we fixed different margin thresholds considering the lowest and the highest output values of H over the labeled training examples. We evaluated the performance of the algorithms on 4 collections from the benchmark data sets3 used in [3] as well as 2 data sets from the UCI repository [2]. In this case, we chose sets large enough for reasonable labeled/unlabeled partitioning, and that represent binary classification problems. Each experiment was repeated 20 times by partitioning, at each time, the data set into two random labeled and unlabeled training sets. Table 1: Means and standard deviations of the classification error on unlabeled training data over the 20 trials for each data set. d denotes the dimension, l and u refer respectively to the number of labeled and unlabeled examples in each data set. Dataset d l + u l SLA SLA∗ TSVM l SLA SLA∗ TSVM COIL2 241 1500 10 .302↓±.042 .255±.019 .286↓±.031 100 .148↓±.015 .134±.011 .152↓±.016 DIGIT 241 1500 10 .201↓±.038 .149±.012 .156±.014 100 .091↓±.01 .071±.005 .087↓±.009 G241c 241 1500 10 .314↓±.037 .248±.018 .252±.021 100 .201↓±.017 .191±.014 .196±.022 USPS 241 1500 10 .342↓±.024 .278↓±.022 .261±.019 100 .114↓±.012 .112↓±.012 .103±.011 PIMA 8 768 10 .379↓±.026 .305±.021 .318↓±.018 50 .284↓±.019 .266±.018 .276±.021 WDBC 30 569 10 .168↓±.016 .124±.011 .141↓±.016 50 .112↓±.011 .079±.007 .108↓±.01 For each data set, means and standard deviations of the classification error on unlabeled training data over the 20 trials are shown in Table 1 for 2 different splits of the labeled and unlabeled sets. The symbol ↓ indicates that performance is significantly worse than the best result, according to a Wilcoxon rank sum test used at a p-value threshold of 0.01 [8]. In addition, we show in figure 2 the evolutions on the COIL2, DIGIT and USPS data sets of the classification and both risks of the Gibbs classifier (on the labeled and unlabeled training sets) for different number of rounds in the SLA∗algorithm. These figures are obtained from one of the 20 trials that we ran for these collections. The most important conclusion from these empirical results is that for all data sets, the self-learning algorithm becomes competitive when the margin threshold is found automatically rather than if it is fixed manually. The augmented self-learning algorithm achieves performance statistically better or equivalent to that of TSVM in most cases, while it outperforms the initial method over all runs. Figure 2: Classification error, train and test Gibbs errors with respect to the iterations of the SLA∗algorithm for a fixed number of labeled training data l = 10. 3http://www.kyb.tuebingen.mpg.de/ssl-book/benchmarks.html In SLA∗the automatic choice of the margin-threshold has the effect to select, at the first rounds of the algorithm, many unlabeled examples for which their class labels can be predicted with high confidence by the voted classifier. The exponential fall of the classification rate in figure 2 can be explained by the addition of these highly informative pseudo-labeled examples at the first steps of the learning process (figure 1). After this fall, few examples are added because the learning algorithm does not increase the margin on unlabeled data. Hence, the number of additional pseudo-labeled examples decreases resulting in a plateau in the classification error curves in figure 2. We further notice that the error of the Gibbs classifier on labeled data increases fastly to a stationary error point and that on the unlabeled examples does not vary in time. 5 Conclusions The contribution of this paper is two fold. First, we proposed a bound on the risk of the voted classifier using the margin distribution of unlabeled examples and an estimation of the risk of the Gibbs classifier. We have shown that our bound is a good approximation of the true risk when the errors of the associated Gibbs classifier can accurately be estimated and that the voted classifier makes most its errors on low margin examples. The proof of the bound passed through a second bound on the joint probability that the voted classifier makes an error and that the margin is above a given threshold. This tool led to the conditional probability that the voted classifier makes an error knowing that the margin is above a given threshold. We showed that the search of a margin threshold minimizing this conditional probability can be obtained by analytically solving a linear program. This resolution conducted to our second contribution which is to find automatically the margin threshold in a self-learning algorithm. Empirical results on a number of data sets have shown that the adaptive threshold allows to enhance the performance of a self-learning algorithm. References [1] Bennett, K., Demiriz, A. & Maclin, R. (2002) Expoliting unlabeled data in ensemble methods. In Proc. ACM Int. Conf. Knowledge Discovery and Data Mining, 289-296. [2] Blake, C., Keogh, E. & Merz, C.J. (1998) UCI repository of machine learning databases. University of California, Irvine. [on-line] http://www.ics.uci.edu/ mlearn/MLRepository.html [3] Chapelle, O., Sch¨olkopf, B. & Zien, A. (2006) Semi-supervised learning. MA: MIT Press. [4] Derbeko, P., El-Yaniv, R. & Meir, R. (2004) Explicit learning curves for transduction and application to clustering and compression algorithms. Journal of Artificial Intelligence Research 22:117-142. [5] Dietterich, T.G. (2000) Ensemble Methods in Machine Learning. In First International Workshop on Multiple Classifier Systems, 1-15. [6] Grandvalet, Y. & Bengio, Y. (2005) Semi-supervised learning by entropy minimization. In Advances in Neural Information Processing Systems 17, 529-536. Cambridge, MA: MIT Press. [7] Joachims, T. (1999) Transductive Inference for Text Classification using Support Vector Machines. In Proceedings of the 16th International Conference on Machine Learning, 200-209. [8] Lehmann, E.L. (1975) Nonparametric Statistical Methods Based on Ranks. McGraw-Hill, New York. [9] McAllester, D. (2003) Simplified PAC-Bayesian margin bounds. In Proc. od the 16th Annual Conference on Learning Theory, Lecture Notes in Artificial Intelligence, 203-215. [10] Seeger, M. (2002) Learning with labeled and unlabeled data. Technical report, Institute for Adaptive and Neural Computation, University of Edinburgh. [11] T¨ur, G., Hakkani-T¨ur, D.Z. & Schapire, R.E. (2005) Combining active and semi-supervised learning for spoken language understanding. Journal of Speech Communication 45(2):171-186. [12] Vittaut, J.-N., Amini, M.-R. & Gallinari, P. (2002) Learning Classification with Both Labeled and Unlabeled Data. In European Conference on Machine Learning, 468-476.
2008
208
3,463
Nonrigid Structure from Motion in Trajectory Space Ijaz Akhter LUMS School of Science and Engineering Lahore, Pakistan akhter@lums.edu.pk Yaser Sheikh Carnegie Mellon University Pittsburgh, PA, USA yaser@cs.cmu.edu Sohaib Khan LUMS School of Science and Engineering Lahore, Pakistan sohaib@lums.edu.pk Takeo Kanade Carnegie Mellon University Pittsburgh, PA, USA tk@cs.cmu.edu Abstract Existing approaches to nonrigid structure from motion assume that the instantaneous 3D shape of a deforming object is a linear combination of basis shapes, which have to be estimated anew for each video sequence. In contrast, we propose that the evolving 3D structure be described by a linear combination of basis trajectories. The principal advantage of this approach is that we do not need to estimate any basis vectors during computation. We show that generic bases over trajectories, such as the Discrete Cosine Transform (DCT) basis, can be used to compactly describe most real motions. This results in a significant reduction in unknowns, and corresponding stability in estimation. We report empirical performance, quantitatively using motion capture data, and qualitatively on several video sequences exhibiting nonrigid motions including piece-wise rigid motion, partially nonrigid motion (such as a facial expression), and highly nonrigid motion (such as a person dancing). 1 Introduction Nonrigid structure from motion is the process of recovering the time varying 3D coordinates of points on a deforming object from their 2D locations in an image sequence. Factorization approaches, first proposed for recovering rigid structure by Tomasi and Kanade in [1], were extended to handle nonrigidity in the seminal paper by Bregler et al. in [2]. The key idea in [2] is that observed shapes can be represented as a linear combination of a compact set of basis shapes. Each instantaneous structure, such as the mouth of a smiling actor shown in Figure 1(a), is expressed as a point in the linear space of shapes spanned by the shape basis. A number of approaches that develop the use of shape basis have subsequently been proposed, including [3, 4, 5]. Since the space of spatial deformations is highly object specific, the shape basis need to be estimated anew for each video sequence. The shape basis of a mouth smiling, for instance, cannot be recycled to compactly represent a person walking. In this paper, we posit that representing nonrigid structure as a combination of basis shapes is one of two ways of looking at the space-time structure induced by P points seen across F frames. Instead of a shape space representation, we propose looking across time, representing the time-varying structure of a nonrigid object as a linear combination of a set of basis trajectories, as illustrated in Figure 1(b). The principal advantage of taking this “lateral” approach arises from the fact that compact representation in trajectory space is better motivated physically than compact representation in shape space. To see this, consider a deformable object being acted upon by a force. The extent of its deformation is limited by the force that can be applied. Hence, a tree swaying in the wind or a person walking cannot arbitrarily and randomly deform; the trajectories of their points are a function of the speed of the wind and the flexing of muscles respectively. Deformations are, thereq 1 q 2 q 3 S 1 S 2 S 3 (a) (b) Figure 1: 3D points on a smiling mouth: a comparison of shape and trajectory space. (a) In approaches that represent the time varying structure in shape space, all 3D points observed at one time instant are projected onto a single point in the shape space. S1, S2, · · · , Sk each represent a shape basis vector. (b) In our approach, we represent the time varying structure in trajectory space, where a 3D point’s trajectory over time is projected to a single point in the trajectory space. θ1, θ2, · · · , θk each represent a trajectory basis vector. P points observed across F frames are expressed as F projected points in shape space and P points in trajectory space. fore, constrained by the physical limits of actuation to remain incremental, not random, across time. Since this property is, to a large degree, ubiquitous, basis can be defined in trajectory that are object independent. We show that while the inherent representative power of both shape and trajectory projections of structure data are equal (a duality exists), the significant reduction in number of unknowns that results from knowing the basis apriori allows us to handle much more nonrigidity of deformation than state of the art methods, like [4] and [5]. In fact, most previous results consider deformations which have a large rigid component, such as talking-head videos or the motion of a swimming shark. To the best of our knowledge, we are the first to show reasonable reconstructions of highly nonrigid motions from a single video sequence without making object specific assumptions. For all results, we use the same trajectory basis, the Discrete Cosine Transform (DCT) basis, underlining the generic nature of the trajectory space representation. A useful byproduct of this approach is that structure is automatically compressed for compact transmission without the need for post facto compression or the overhead transmission of object specific basis. 2 Related work If deformation of a 3D scene is unconstrained, the structure observed in each image would be independent of those in other images. In this case, recovering structure from motion is ill-posed, equivalent to finding 3D structure from a single 2D image at each time instant. To make nonrigid structure recovery tractable, some consistency in the deformation of structure has to be imposed. One early measure of consistency that was applied assumes that the scene consists of multiple rigid objects which are moving independently [6, 7, 8]. However, the first general solution to the problem of nonrigid structure recovery was introduced by Bregler et al. in [2], approximating the structure at each time instant as a linear combination of basis shapes. They recovered the structure, the shape basis and the camera rotations simultaneously, by exploiting orthonormality constraints of the rotation matrices. Xiao et al. [4] showed that these orthonormality constraints alone lead to ambiguity in the solution, and introduced additional constraints to remove ambiguity. In [9] Xiao et al. proposed a rank deficient basis. Other extensions of the work by Bregler et al. include [10] which improved the numerical stability of the estimation process and [3] which introduced a Gaussian prior on the shape coefficients. Common to all of these approaches is that results are shown on objects which have a significant number of points that move rigidly, such as faces. Some approaches, such as [11] make explicit use of this fact to initialize rotation matrices, while others favor such sequences for stability in estimation. In contrast to this entire corpus of work, which approximate structure by a shape basis, we propose a new representation of time varying structure, as a collection of trajectories. We not only demonstrate that a compact trajectory space can be defined, but also that the basis of this trajectory space can be pre-defined, removing a large number of unknowns from the estimation process altogether. The duality of spatial and temporal representations has been hinted at earlier in literature. Shashua [12] discusses the duality of the joint image space and the joint point space in the context of multiview geometry. Zelnik-Manor and Irani [13] have exploited a similar duality for an alternate approach to = a x1 + a x2 ... + a xk Figure 2: As described in Equation 3, each trajectory is represented as a linear combination of k predefined basis trajectories. In this paper, we use DCT basis to compactly represent trajectories. segmenting video sequences. Ours is the first paper to use this dual representation in the structure from motion problem, and to note that a generic basis can be defined in trajectory space which compactly represents most real trajectories. 3 Representing Nonrigid Structure The structure at a time instant t can be represented by arranging the 3D locations of the P points in a matrix S(t) ∈R3×P , S(t) = " Xt1 XtP Yt1 · · · YtP Zt1 ZtP # . The complete time varying structure can be represented by concatenating these instantaneous structures as S3F ×P = [S(1)T S(2)T · · · S(F)T ]T . In [2], each instantaneous shape matrix S(t) is approximated as a linear combination of basis shapes, S(t) = X j cj(t)Sj, (1) where Sj ∈R3×P is a basis shape and cj(t) is the coefficient of that basis shape. If the set of observed structures can be compactly expressed in terms of k such basis shapes, S has a rank of at most 3k. This rank constraint can be restated by rearrangement of S as the following rank k matrix, S∗=   X11 · · · X1P Y11 · · · Y1P Z11 · · · Z1P ... ... ... ... ... ... XF 1 · · · XF P YF 1 · · · YF P ZF 1 · · · ZF P  . (2) The row space of this matrix corresponds to the shape space. Since the row and column space of a matrix are of equal dimension, it follows that the columns of S∗are also spanned by k vectors. We call the column space of this matrix the trajectory space and note that it enjoys a dual relationship with the shape space. Specifically, if the time varying shape of an object can be expressed by a minimum of k shape basis, then there exist exactly k trajectory basis vectors that can represent the same time varying shape. To represent the time varying structure in terms of trajectory basis, we consider the structure as a set of trajectories, T(i) = [Tx(i)T Ty(i)T Tz(i)T ]T , (see Figure 1(b)) where Tx(i) = [X1i, · · · , XF i]T , Ty(i) = [Y1i, · · · , YF i]T , Tz(i) = [Z1i, · · · , ZF i]T are the x, y, and z coordinates of the ith trajectory. As illustrated in Figure 2, we describe each trajectory as a linear combination of basis trajectory, Tx(i) = k X j=1 axj(i)θj, Ty(i) = k X j=1 ayj(i)θj, Tz(i) = k X j=1 azj(i)θj, (3) where θj ∈RF is a trajectory basis vector and axj(i), ayj(i) and azj(i) are the coefficients corresponding to that basis vector. The time varying structure matrix can then be factorized into an inverse projection matrix and coefficient matrix as S3F ×P = Θ3F ×3kA3k×P , where A = [AT x AT y AT z ]T and Ax =   ax1(1) · · · ax1(P) ... ... axk(1) · · · axk(P)  , Θ =           θT 1 θT 1 θT 1 ... θT F θT F θT F           , (4) Here θi represents a truncated basis for transformation from coefficient space to original space. The principal benefit of the trajectory space representation is that a basis can be pre-defined that can compactly approximate most real trajectories. A number of bases such as the Hadamard Transform basis, the Discrete Fourier Transform basis, and the Discrete Wavelet Transform basis can all compactly represent trajectories in an object independent way. In this paper, we use the Discrete Cosine Transform basis set to generate Θ (shown in Figure 2) for all reconstructions results shown. The efficacy of the DCT basis has been demonstrated for compressing motion capture data, [14], and has been effective in our experiments as well. 4 Nonrigid Structure and Motion Factorization The measured 2D trajectories are contained in a 2F × P measurement matrix W, containing the location of P image points across F frames, W =      u11 . . . u1P v11 . . . v1P ... ... uF 1 . . . uF P vF 1 . . . vF P     . This measurement matrix can be decomposed as W = RS where R is a 2F × 3F matrix, R =   R1 ... RF  , and Rt is a 2 × 3 orthographic projection matrix. In the previous section we showed that S = ΘA, as a result we can further factorize W as W = RΘA = ΛA, (5) where Λ = RΘ. Since Λ is a 3F × 3k matrix, the rank of matrix W will be at most 3k. This is a dual property to the rank constraint defined by [2]. We can use SVD to factorize W as, W = ˆΛ ˆ A. In general, the matrix ˆΛ and ˆ A will not be equal to Λ and A respectively, because the above factorization is not unique. For any invertible 3k × 3k matrix Q, ˆΛQ and Q−1A are also valid factorizations. Therefore, to recover metric structure we need to estimate the rectification matrix Q such that the following equations hold true, Λ = ˆΛQ, A = Q−1 ˆ A. (6) 5 Metric Upgrade The problem of recovering the rotation and structure is reduced to estimating the rectification matrix Q. The elements of matrix Λ are, Λ =       r1 1θT 1 r1 2θT 1 r1 3θT 1 r1 4θT 1 r1 5θT 1 r1 6θT 1 ... rF 1 θT F rF 2 θT F rF 3 θT F rF 4 θT F rF 5 θT F rF 6 θT F       . Instead of estimating the whole matrix Q, to rectify ˆΛ and ˆ A it is sufficient to estimate only three columns of Q. Let us define Q||| to be the first, k +1st and 2k +1st columns of the matrix Q. From Equation 6, if we just use Q||| instead of Q, we get ˆΛQ||| =   θ1,1R1 ... θF,1RF  . (7) 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5 10 0 10 1 10 2 10 3 10 4 10 5 10 6 10 7 10 8 F=200 Camera motion per frame (in Degrees) Condition # of ΛT Λ K=2 K=3 K=4 K=5 K=6 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5 10 0 10 1 10 2 10 3 10 4 10 5 10 6 10 7 10 8 K=2 K=3 K=4 K=5 K=6 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5 10 0 10 1 10 2 10 3 10 4 10 5 10 6 10 7 10 K=2 K=3 K=4 K=5 K=6 Camera motion per frame (in Degrees) Camera motion per frame (in Degrees) F=400 F=800 Condition # of ΛT Λ Condition # of ΛT Λ Figure 3: Effect of increasing camera motion on reconstruction stability. Reconstruction stability is measured in terms of condition number of matrix ΛT Λ with different values of k and different values of F. Synthetic rotations were generated by revolving the camera around the z-axis and camera motion was measured in terms of the angle the camera moved per frame. This equation shows that the unknowns in matrix Q||| can be found by exploiting the fact that Ri is a truncated rotation matrix (as was done in [1]). Specifically, if ˆΛ2i−1:2i denotes the two rows of matrix ˆΛ at positions 2i −1 and 2i, then we have ˆΛ2i−1:2iQ|||QT ||| ˆΛT 2i−1:2i = θ2 i,1I2×2, (8) where I2×2 is an identity matrix, giving three indepedent constraints for each image i. Therefore for F frames, we have 3F constraints and 9k unknowns in Q|||. Hence at least 3k non-degenerate images are required to estimate Q|||. Once Q||| has been computed, using a nonlinear minimization routine (e.g. Levenberg Marquardt), we can estimate the rotation matrices, and therefore R, using Equation 7. Once R is known, it can be multiplied with the (known) DCT basis matrix Θ3F ×3k to recover the matrix Λ2F ×3k = R2F ×3F Θ3F ×3k. The coefficients can then be estimated by solving the following overconstrained linear system of equations, Λ2F ×3k ˆ A3k×P = W2F ×P . (9) 6 Results The proposed algorithm has been validated quantitatively on motion capture data over different actions and qualitatively on video data. We have tested the approach extensively on highly nonrigid human motion like volleyball digs, handstands, karate moves and dancing. Figure 4 shows a few sample reconstructions of different actors. As mentioned earlier, we choose DCT as the basis for the trajectory space. In subsequent experiments, we compare our approach with [5] and [9] (we use code kindly provided by the respective authors). The results, data and the code used to produce the results are all shared at http://cvlab.lums.edu.pk/nrsfm. In nonrigid structure from motion, the key relationship that determines successful reconstruction is the one between the degree of deformation of the object, measured by the number of basis k required to approximate it and the degree of camera motion. To test the relationship between k, camera motion and reconstruction stability, we constructed Λ matrices using different values of k and synthetic rotations around the z-axis, at various magnitudes of motion per frame. In Figure 3, the reconstruction stability, measured by the condition number of ΛT Λ, is shown as k is varied between 2 and 6, for 200, 400, and 800 frames (at different angular velocities per frame). The plots confirm intuition: the smaller the degree of object deformation and the larger the camera motion, the more stable reconstruction tends to be. For quantitative evaluation of reconstruction accuracy we used the drink, pickup, yoga, stretch, and dance actions from the CMU Mocap database, and the shark dataset of [3]. Multiple rigid body data was generated by simulation of points on rigidly moving cubes. We generated synthetic camera rotations and projected 3D data using these rotations to get image observations. The camera rotation for the Mocap datasets was 5 degrees per frame and 2 degrees per frame for the multi-body 0 50 100 150 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 0 50 100 150 0.8 0.6 0.4 0.2 0 0.2 0.4 0.6 0 50 100 150 0.4 0.3 0.2 0.1 0 0.1 0.2 0.3 0.4 0.5 V olleyball Dig X-coordinate of head X-coordinate of hand X-coordinate of foot 0 50 100 150 1 0.8 0.6 0.4 0.2 0 0.2 0.4 0 50 100 150 1.6 1.4 1.2 1 0.8 0.6 0.4 0.2 0 0 50 100 150 0.4 0.3 0.2 0.1 0 0.1 0.2 0.3 Hand-stand Slip and Fall 0 20 40 60 80 100 120 140 160 180 1.6 1.4 1.2 1 0.8 0.6 0.4 0.2 0 0.2 0 20 40 60 80 100 120 140 160 180 1.6 1.4 1.2 1 0.8 0.6 0.4 0.2 0 0.2 0 20 40 60 80 100 120 140 160 180 1 0.8 0.6 0.4 0.2 0 0.2 0.4 Figure 4: Simultaneous reconstruction accuracy for three actors. The X-coordinate trajectories for three different points on the actors is shown. The approximation error introduced by DCT projection has a smoothing impact on the reconstruction. Red lines indicate ground truth data and blue lines indicate reconstructed data. Trajectory Basis Torresani et al. [5] Xiao et al. [9] Figure 5: The dance sequence from the CMU mocap database. The black dots are the ground truth points while the gray circles are the reconstructions by the three methods respectively. sequence. We did not rotate the camera for the dance and shark sequences, since the object itself was rotating in these sequences. In obtaining the results discussed below, k was chosen to provide the best reconstructions, the value varying between 2 and 13 depending on the length of the sequence and the nonrigidity of motion. We normalize the structure, so that the average standard deviation of the structure matrix S becomes equal to unity (to make comparison of error across datasets more meaningful). Table 1 shows a quantitative comparison of our method with the shape basis approach of Torresani et al. [5] and Xiao and Kanade [9]. This table shows both the camera rotation estimation error and structure reconstruction error. The estimated structure is valid up to a 3D rotation and translation and the estimated rotations also have a 3D rotation ambiguity. We therefore align them for error measurement. Procrustes analysis was used for aligning camera rotations and the 3D structure. The error measure for camera rotations was the average Frobenius norm difference between the original camera rotation and the estimated camera rotation. For structure evaluation we compute the per frame mean squared error between original 3D points and the estimated 3D points. Finally, to test the proposed approach on real data, we used a face sequence from the PIE dataset, a sequence from the movie “The Matrix”, a sequence capturing two rigidly moving cubes and a sequence of a toy dinosaur moving nonrigidly. For the last three sequences, the image points were tracked in a semi-automatic manner, using the approach proposed in [15] with manual correction. We show the resulting reconstructions in Figure 6, and compare against the reconstructions obtained from Torresani et al. [5] and Xiao and Kanade [9]. Table 1: The quantitative comparison of proposed algorithm with the techniques described in Xiao and Kanade [9] and Torresani et al. [5]. The Erot is the average Frobenius difference between original rotations and aligned estimated rotations, and E∆is the average distance between original 3D points and aligned reconstructed points Trajectory Bases Torresani’s EM-Gaussian Xiao’s Shape Bases Datset Erot E∆ Erot E∆ Erot E∆ DRINK 5.8E-03 2.50E-02 0.2906 0.3393 0.3359 3.5186 PICKUP 1.55E-01 2.37E-01 0.4277 0.5822 0.4687 3.3721 YOGA 1.06E-01 1.62E-01 0.8089 0.8097 1.2014 7.4935 STRETCH 5.49E-02 1.09E-01 0.7594 1.1111 0.9489 4.2415 MULTIRIGID 1.96E-08 4.88E-02 0.1718 2.5902 0.0806 11.7013 DANCE NA 2.96E-01 NA 0.9839 NA 2.9962 SHARK NA 3.12E-01 NA 0.1086 NA 0.4772 7 Conclusion We describe an algorithm to reconstruct nonrigid structure of an object from 2D trajectories of points across a video sequence. Unlike earlier approaches that require an object-specific shape basis to be estimated for each new video sequence, we demonstrate that a generic trajectory basis can be defined that can compactly represent the motion of a wide variety of real deformations. Results are shown using the DCT basis to recover structures of piece-wise rigid motion, facial expressions, actors dancing, walking, and doing yoga. Our experiments show that there is a relationship between camera motion, degree of object deformation, and reconstruction stability. We observe that as the motion of the camera increases with respect to the degree of deformation, the reconstruction stability increases. Future directions of research include experimenting with different unitary transform bases to verify that DCT basis are, in fact, the best generic basis to use, and developing a synergistic approach to use both shape and trajectory bases concurrently. 8 Acknowledgements This research was partially supported by a grant from the Higher Education Commission of Pakistan. The authors would like to acknowledge Fernando De La Torre for useful discussions. We further thank J. Xiao, L. Agapito, I. Matthews and L. Torresani for making their code or data available to us. The motion capture data used in this project was obtained from http://mocap.cs.cmu.edu. References [1] C. Tomasi and T. Kanade. Shape and motion from image streams under orthography: A factorization method. IJCV, 9:137–154, 1992. [2] C. Bregler, A. Hertzmann, and H. Biermann. Recovering non-rigid 3D shape from image streams. CVPR, 2:690–696, 2000. [3] L. Torresani, A. Hertzmann, and C. Bregler. Learning non-rigid 3D shape from 2D motion. NIPS, 2005. [4] J. Xiao, J. Chai, and T. Kanade. A closed form solution to non-rigid shape and motion recovery. IJCV, 67:233–246, 2006. [5] L. Torresani, A. Hertzmann, and C. Bregler. Nonrigid structure-from motion: Estimating shape and motion with hierarchical priors. PAMI, 30(5):878–892, May 2008. [6] J.P. Costeira and T. Kanade. A multibody factorization method for independently moving objects. IJCV, 49:159–179, 1998. [7] M. Han and T. Kanade. Reconstruction of a scene with multiple linearly moving objects. IJCV, 59:285–300, 2004. [8] A. Gruber and Y. Weiss. Multibody factorization with uncertainity and missing data using the EM algorithm. CVPR, 1:707–714, 2004. [9] J. Xiao and T. Kanade. Non-rigid shape and motion recovery: Degenerate deformations. CVPR, 1:668–675, 2004. Trajectory Basis Torresani et al. [5] Xiao et al. [9] Trajectory Basis Torresani et al. [5] Xiao et al. [9] Trajectory Basis Torresani et al. [5] Xiao et al. [9] Trajectory Basis Torresani et al. [5] Xiao et al. [9] Figure 6: Results on Dinosaur, Matrix, PIE face, and Cubes sequences. k was set to 12, 3, 2, and 2 respectively. [10] M. Brand. Morphable 3D models from video. CVPR, 2:456, 2001. [11] A. Del Bue, F.Smeraldi, and L. Agapito. Non-rigid structure from motion using ranklet-based tracking and non-linear optimization. IVC, pages 297–310, 2007. [12] Amnon Shashua. Trilinear tensor: The fundamental construct of multiple-view geometry and its applications. AFPAC, 1997. [13] Lihi Zelnik-Manor and Michal Irani. Temporal factorization vs. spatial factorization. ECCV, 2004. [14] O. Arikan. Compression of motion capture databases. ACM Trans. on Graphics, 2006. [15] A. Datta, Y. Sheikh, and T. Kanade. Linear motion estimation for systems of articulated planes. CVPR, 2008.
2008
209
3,464
Biasing Approximate Dynamic Programming with a Lower Discount Factor Marek Petrik Department of Computer Science University of Massachusetts Amherst Amherst, MA 01003 petrik@cs.umass.edu Bruno Scherrer LORIA Campus Scientifique B.P. 239 54506 Vandoeuvre-les-Nancy, France bruno.scherrer@loria.fr Abstract Most algorithms for solving Markov decision processes rely on a discount factor, which ensures their convergence. It is generally assumed that using an artificially low discount factor will improve the convergence rate, while sacrificing the solution quality. We however demonstrate that using an artificially low discount factor may significantly improve the solution quality, when used in approximate dynamic programming. We propose two explanations of this phenomenon. The first justification follows directly from the standard approximation error bounds: using a lower discount factor may decrease the approximation error bounds. However, we also show that these bounds are loose, thus their decrease does not entirely justify the improved solution quality. We thus propose another justification: when the rewards are received only sporadically (as in the case of Tetris), we can derive tighter bounds, which support a significant improvement in the solution quality with a decreased discount factor. 1 Introduction Approximate dynamic programming methods often offer surprisingly good performance in practical problems modeled as Markov Decision Processes (MDP) [6, 2]. To achieve this performance, the parameters of the solution algorithms typically need to be carefully tuned. One such important parameter of MDPs is the discount factor γ. Discount factors are important in infinite-horizon MDPs, in which they determine how the reward is counted. The motivation for the discount factor originally comes from economic models, but has often no meaning in reinforcement learning problems. Nevertheless, it is commonly used to ensure that the rewards are bounded and that the Bellman operator is a contraction [8]. In this paper, we focus on the quality of the solutions obtained by approximate dynamic programming algorithms. For simplicity, we disregard the computational time, and use performance to refer to the quality of the solutions that are eventually obtained. In addition to regularizing the rewards, using an artificially low discount factor sometimes has a significant effect on the performance of the approximate algorithms. Specifically, we have observed a significant improvement of approximate value iteration when applied to Tetris, a common reinforcement learning benchmark problem. The natural discount factor in Tetris is 1, since the received rewards have the same importance, independently of when received. Currently, the best results achieved with approximate dynamic programming algorithms are on average about 6000 lines removed in a single game [4, 3]. Our results, depicted in Figure 1, with approximate value iteration and standard features [1] show that setting the discount factor to γ ∈(0.84, 0.88) gives the best expected total number of removed lines, a bit more than 20000. That is five times the performance with discount factor of γ = 1 (about 4000). The improved performance for γ ∈(0.84, 0.88) is surprising, since computing a policy for this discount factor dramatically improves the return calculated with γ = 1. 0 5000 10000 15000 20000 25000 0 10 20 30 40 50 60 70 80 90 100 Average of 10 runs of average scores on 100 games Iterations 0.8 0.84 0.88 0.92 0.96 1.0 Figure 1: Performance of approximate value iteration on Tetris with different discount factors. For each value of γ, we ran the experiments 10 times and recorded the evolution of the score (the evaluation of the policy with γ = 1) on the 100 games, and averaged over 10 learning runs. In this paper, we study why using a lower discount factor improves the quality of the solution with regard to a higher discount factor. First, in Section 2, we define the framework for our analysis. In Section 3 we analyze the influence of the discount factor on the standard approximation error bounds [2]. Then in Section 4 we argue that, in the context of this paper, the existing approximation error bounds are loose. Though these bounds may be tightened by a lower discount factor, they are not sufficient to explain the improved performance. Finally, to explain the improved performance, we identify a specific property of Tetris in Section 5 that enables the improvement. In particular, the rewards in Tetris are received sparsely, unlike the approximation error, which makes the value function less sensitive to the discount factor than the approximation error. 2 Framework and Notations In this section we formalize the problem of adjusting the discount factor in approximate dynamic programming. We assume γ-discounted infinite horizon problems, with γ < 1. Tetris does not directly fit in this class, since its natural discount factor is 1. It has been shown, however, that undiscounted infinite horizon problems with a finite total reward can be treated as discounted problems [7]. Blackwell optimality implies that there exists γ∗< 1 such that for all γ > γ∗the γ-discounted problem and the undiscounted problem have the same optimal policy. We therefore treat Tetris as a discounted problem with a discount factor γ∗< 1 near one. The analysis is based on Markov decision processes, defined as follows. Definition 1. A Markov Decision Process is a tuple (S, A, P, r). S is the set of states, A is the set of actions, P : S × S × A 7→[0, 1] is the transition function (P(s′, s, a) is the probability of transiting to state s′ from state s given action a), and r : S × A 7→R+ is a (non-negative) reward function. We assume that the number of states and actions is finite, but possibly very large. For sake of simplicity, we also assume that the rewards are non-negative; our analysis can be extended to arbitrary rewards in a straight-forward way. We write ∥r∥∞to denote the maximal reward for any action and state. Given a Markov decision process (S, A, P, r) and some discount factor γ, the objective is to find a policy, i.e. a mapping π : S 7→A, with the maximal value from any initial states s. The value vπ(s) of π from state s is defined as the γ-discounted infinite horizon return: vπ(s) := E " ∞ X t=0 γtr(st, at) s0 = s, a0 = π(s0), . . . , at = π(st) # . It is well known [7, 2] that this problem can be solved by computing the optimal value function v∗, which is the fixed point of the Bellman operator Lv = maxπ rπ + γPπv. Here rπ is the vector on S with components r(s, π(s)) and P π is the stochastic matrix associated with a policy π. We consider in this paper that the MDP is solved with 1) an approximate dynamic programming algorithm and 2) a different discount factor β < γ. In particular, our analysis applies to approximate value and policy iteration with existing error bounds. These methods invariably generate a sequence of approximate value functions, which we denote as ˜vβ. Then, πβ is a policy greedy with regard to the approximate value function ˜vβ. As we have two different discount factors, we use a subscript to denote the discount factor used in calculating the value. Let δ be a discount factor and π any policy. We use vπ δ to represent the value of policy π calculated with the discount factor δ; when π is the optimal policy corresponding to the discount δ, we will simply denote its value vδ. As mentioned above, our objective is to compare, for the discount factor γ, the value vγ of the optimal policy and the value vπβ γ . Here, πβ is the policy derived from the approximate β-discount value. The following shows how this error may be decomposed in order to simplify the analysis. Most of our analysis is in terms of L∞mainly because this is the most common measure used in the existing error bounds. Moreover, the results could be extended to L2 norm in a rather straight-forward way without a qualitative difference in the results. From the optimality of vγ, vγ ≥vπβ γ and from the non-negativity of the rewards, it is easy to show that the value function is monotonous with respect to the discount factor, and therefore: vπβ γ ≥vπβ β . Thus 0 ≤vγ −vπβ γ ≤vγ −vπβ β and consequently: e(β) := ∥vγ −vπβ γ ∥∞≤∥vγ −vπβ β ∥∞≤∥vγ −vβ∥∞+ ∥vβ −vπβ β ∥∞= ed(β) + ea(β). where ed(β) := ∥vγ −vβ∥∞denotes the discount error, and ea(β) := ∥vβ −vπβ β ∥∞the approximation error. In other words, a bound of the loss due to using πβ instead of the optimal policy for discount factor γ is the sum of the error on the optimal value function due to the change of discount and the error due to the approximation for discount β. In the remainder of the paper, we analyze each of these error terms. 3 Error Bounds In this section, we develop a discount error bound and overview the existing approximation error bounds. We also show how these bounds motivate decreasing the discount factor in the majority of MDPs. First, we bound the discount error as follows. Theorem 2. The discount error due to using a discount factor β instead of γ is: ed(β) = ∥vγ −vβ∥∞≤ γ −β (1 −β)(1 −γ)∥r∥∞. Proof. Let Lγ and Lβ be the Bellman operators for the corresponding discount factors. We have now: ∥vγ −vβ∥∞ = ∥Lγvγ −Lβvβ∥∞= ∥Lγvγ −Lβvγ + Lβvγ −Lβvβ∥∞ ≤ ∥Lγvγ −Lβvγ∥∞+ ∥Lβvγ −Lβvβ∥∞≤∥Lγvγ −Lβvγ∥∞+ β∥vγ −vβ∥∞ Let Pγ, rγ and Pβ, rβ be the transition matrices and rewards of policies greedy with regard to vγ for γ and β respectively. Then we have: Lγvγ −Lβvγ = (γPγvγ + rγ) −(βPβvγ + rβ) ≤(γ −β)Pγvγ Lγvγ −Lβvγ = (γPγvγ + rγ) −(βPβvγ + rβ) ≥(γ −β)Pβvγ. Finally, the bound follows from above as: ∥vγ −vβ∥∞≤ 1 1 −β max{∥(γ −β)Pγvγ∥∞, ∥(γ −β)Pβvγ∥∞} ≤ γ −β (1 −γ)(1 −β)∥r∥∞. Remark 3. This bound is trivially tight, that is there exists a problem for which the bound reduces to equality. It is however also straightforward to construct a problem in which the bound is not tight. 0 0.2 0.4 0.6 0.8 1 60 70 80 90 100 110 β Figure 2: Example e(β) function in a problem with γ = 0.9 and ϵ = 0.01 and ∥r∥∞= 10. 0 0.2 0.4 0.6 0.8 1 0 0.1 0.2 0.3 0.4 0.5 γ ε Figure 3: The dependence of ϵ on γ needed for the improvement in Proposition 6. 3.1 Approximation Error Bound We now discuss the dependence of the approximation error ea(β) on the discount factor β. Approximate dynamic programming algorithms like approximate value and policy iteration build a sequence of value functions (˜vk β)k≥0 with πk β being the policy greedy with respect to ˜vk β. These algorithms are approximate because at each iteration the value ˜vk β is an approximation of some target value vk β, which is hard to compute. The analysis of [2] (see Section 6.5.3 and Proposition 6.1 for value iteration, and Proposition 6.2 for policy iteration) bounds the loss of using the policies πk β instead of the optimal policy: lim sup k→∞ ∥vβ −v πk β β ∥∞≤ 2β (1 −β)2 sup k ∥˜vk β −vk β∥∞. (1) To completely describe how Eq. (1) depends on the discount factor, we need to bound the one-step approximation error ∥˜vk β −vk β∥in terms of β. Though this specific error depends on the particular approximation framework used and is in general difficult to estimate, we propose to make the following assumption. Assumption 4. There exists ϵ ∈(0, 1/2), such that for all k, the single-step approximation error is bounded by: ∥˜vk β −vk β∥∞≤ ϵ 1 −β ∥r∥∞. We consider only ϵ ≤1/2 because the above assumption holds with ϵ = 1/2 and the trivial constant approximation ˜vk β = ∥r∥∞/2. Remark 5. Alternatively to Assumption 4, we could assume that the approximation error is constant in the discount factor β, i.e. ∥˜vk β −vk β∥∞≤ϵ = O(1) for some ϵ for all β. We believe that such a bound is unlikely in practice. To show that, consider an MDP with two states s0 and s1, and a single action. The transitions loop from each state to itself, and the rewards are r(s0) = 0 and r(s1) = 1. Assume a linear least-squares approximation with basis M = [1/ √ 2; 1/ √ 2]. The approximation error in terms of β is: 1/2(1 −β) = O(1/(1 −β)). If Assumption 4 holds, we see from Eq. (1) that the approximation error ea is bounded as: ea(β) ≤ 2β (1 −β)3 ϵ∥r∥∞. 3.2 Global Error Bound Using the results above, and considering that Assumption 4 holds, the cumulative error bound when using approximate dynamic programming with a discount factor β < γ is: e(β) = ea(β) + ed(β) ≤ γ −β (1 −β)(1 −γ)∥r∥∞+ 2β (1 −β)3 ϵ∥r∥∞. An example of this error bound is shown in Figure 2: the bound is minimized for β ≃0.8 < γ. This is because the approximation error decreases rapidly in comparison with the increasing discount error. More generally, the following proposition suggests how we should choose β. Proposition 6. If the approximation factor ϵ introduced in Assumption 4 is sufficiently large, precisely if ϵ > (1 −γ)2/2(1 + 2γ), then the best error bound e(β) will be achieved for the discount factor β = (2ϵ + 1) − p (2ϵ + 1)2 + (2ϵ −1) < γ. Figure 3 shows the approximation error fraction necessary to improve the performance. Notice that the fraction decreases rapidly when γ →1. Proof. The minimum of β 7→e(β) can be derived analytically by taking its derivative: e′(β) = −(1 −β)−2∥r∥∞+ (1 −β)−32∥r∥∞ϵ + (−3)2β(−1)(1 −β)−4∥r∥∞ϵ = (1 −β)2 + 2(1 −β)ϵ + 6βϵ (1 −β)4 ∥r∥∞= −β2 + 2(2ϵ + 1)β + 2ϵ −1 (1 −β)4 ∥r∥∞. So we want to know when β 7→−1/2β2 + (2ϵ + 1)β + 1/2(2ϵ −1) equals 0. The discriminant ∆= (2ϵ + 1)2 + (2ϵ −1) = 2ϵ(2ϵ + 3) is always positive. Therefore e′(β) equals 0 for the points β−= (2ϵ + 1) − √ ∆and β+ = (2ϵ + 1) + √ ∆and is positive in between and negative outside. This means that β−is a local minimum of e and β+ a local maximum. It is clear that β+ > 1 > γ. From the definition of ∆and the fact (cf Assumption 4) that ϵ ≤1/2, we see that β−≥0. Then, the condition β−< γ is satisfied if and only if: β−< γ ⇔ (2ϵ + 1) − p (2ϵ + 1)2 + (2ϵ −1) < γ ⇔1 − s 1 + 2ϵ −1 (2ϵ + 1)2 < γ 2ϵ + 1 ⇔ 1 − γ 2ϵ + 1 < s 1 + 2ϵ −1 (2ϵ + 1)2 ⇔1 −2 γ 2ϵ + 1 + γ2 (2ϵ + 1)2 < 1 + 2ϵ −1 (2ϵ + 1)2 ⇔ −2γ(2ϵ + 1) + γ2 < 2ϵ −1 ⇔(1 −γ)2 1 + 2γ < 2ϵ where the inequality holds after squaring, since both sides are positive. 4 Bound Tightness We show in this section that the bounds on the approximation error ea(β) are very loose for β →1 and thus the analysis above does not fully explain the improved performance. In particular, there exists a naive bound on the approximation error that is dramatically tighter than the standard bounds when β is close to 1. Lemma 7. There exists a constant c ∈R+ such that for all β we have ∥vβ −˜vβ∥∞≤c/(1 −β). Proof. Let P ∗, r∗and ˆP, ˆr be the transition reward functions of the optimal approximate policies respectively. The functions may depend on the discount factor, but we omit that to simplify the notation. Then the approximation error is: ∥vβ −ˆvβ∥∞= ∥(I −βP ∗)−1r∗−(I −β ˆP)−1ˆr∥∞≤ 1 1 −β (∥r∗∥∞+ ∥ˆr∥∞) . Thus setting c = 2 maxπ ∥rπ∥∞proves the lemma. Lemma 7 implies that for every MDP, there exists a discount factor β, such that Eq. (1) is not tight. Consider even that the single-step approximation error is bounded by a constant, such that lim supk→∞∥˜vk β −vk β∥∞≤ϵ. This is impractical, as discussed in Remark 5, but it tightens the bound. Such a bound implies that: ea(β) ≤2βϵ/(1 −β)2. From Lemma 7, this bound is loose when 2β (1−β)2 ϵ > c 1−β . Thus we have that there exists β < 1 for which the standard approximation error bounds are loose, whenever ϵ > 0. The looseness of the bound will be more apparent in problems with high discount factors. For example in the MDP formulation of Blackjack [5] the discount factor γ = 0.999, in which case the error bound may overestimate the true error by a factor up to 1/(1 −γ) = 1000. The looseness of the approximation error bounds may seem to contradict Example 6.4 in [2], which shows that Eq. (1) is tight. The discrepancy is because in our analysis we assume that the MDP has 0.8 0.85 0.9 0.95 1 0 50 100 150 200 γ Bellman error / true error Figure 4: Looseness of the Bellman error bound. 0 0.2 0.4 0.6 0.8 1 50 100 150 200 250 β Bellman error Figure 5: Bellman error bound as a function of β for a problem with γ = 0.9. 0 0.2 0.4 0.6 0.8 2 2.2 2.4 2.6 2.8 3 β || a − b ||∞ Figure 6: The approximation error with a = ˜vβ and b = vγ. fixed rewards and number of states, while the example in [2] assumes that the reward depends on the discount factor and the number of states is potentially infinite. Another way to put it is to say that Example 6.4 shows that for any discount factor β there exists an MDP (which depends on β) for which the bound Eq. (1) is tight. We, on the other hand, show that there does not exist a fixed MDP such that for all discount factor β the bound Eq. (1) is tight. Proposition 6 justifies the improved performance with a lower discount factor by a more rapid decrease in ea with β than the increase in ed. The naive bound from Lemma 7 however shows that ea may scale with 1/(1 −β), the same as ed. As a result, while the approximation error will decrease, it may not be sufficient to offset the increase in the discount error. Some of the standard approximation error bound may be tightened by using a lower discount factor. For example consider the standard a-posteriori approximation error bound for the value function ˜vβ [7] : ∥vβ −v˜π β∥∞≤ 1 1 −β ∥Lβ˜vβ −˜vβ∥∞, where ˜πβ is greedy with respect to ˜vβ. This bound is widely used and known as Bellman error bound. The following example demonstrates that the Bellman error bound may also be loose for β close to 1: P1 =  1 0 0 1  P2 =  0 1 0 1  r1 = 1 2 r2 = 2 2 Assume that the current value function is the value of a policy with the transition matrix and reward P1, r1, while the optimal policy has the transition matrix and reward P2, r2. The looseness of the bound is depicted in Figure 4. The approximation error bound scales with 1 (1−γ)2 , while the true error scales with 1 1−γ . As a result, for γ = 0.999, the bound is 1000 times the true error value in this example. The intuitive reason for the looseness of the bound is that the bound treats each state as recurrent, even when is it transient. The global error bound may be also tightened by using a lower discount factor β as follows: ∥vγ −v˜πβ γ ∥∞≤ 1 1 −β ∥Lβ˜vβ −˜vβ∥∞+ γ −β (1 −β)(1 −γ)∥r∥∞. Finding the discount factor β that minimizes this error is difficult, because the function may not be convex or differentiable. Thus the most practical method is a sub-gradient optimization method. The global error bound the MDP example above is depicted in Figure 5. 5 Sparse Rewards In this section, we propose an alternative explanation for the performance improvement in Tetris that does not rely on the loose approximation error bounds. A specific property of Tetris is that the rewards are not received in every step, i.e. they are sparse. The value function, on the other hand, is approximated in every step. As a result, the return should be less sensitive to the discount factor than the approximation error. Decreasing the discount factor will thus reduce the approximation error more significantly than it increases the discount error. The following assumption formalizes this intuition. Assumption 8 (Sparse rewards). There exists an integer q such that for all m ≥0 and all instantiations ri with non-zero probability: Pm i=0 ri ≤⌊m/q⌋and ri ∈{0, 1}. Now define uβ = P∞ i=0 βiti, where ti = 1 when i ≡0 mod q. Then let Im = {i ri = 1, i ≤m} and Jm = {j tj = 1, j ≤m} and let I = I∞and J = J∞. From the definition, these two sets satisfy that |Im| ≤|Jm|. First we show the following lemma. Lemma 9. Given sets Im and Jm, there exists an injective function f : I →J, such that f(i) ≤i. Proof. By induction on m. The base case m = 0 is trivial. For the inductive case, consider the following two cases: 1) rm+1 = 0. From the inductive assumption, there exists a function that maps Im to Jm. Now, this is also an injective function that maps Im+1 = Im to Jm+1. 2) rm+1 = 1. Let j∗= max Jm+1. Then if j∗= m + 1 then the function f : Im →Jm can be extended by setting f(m + 1) = j∗. If j∗≤m then since |Jm+1| −1 = |Jj∗−1| ≥|Im|, such an injective function exists from the inductive assumption. In the following, let Ri be the random variable representing the reward received in step i. It is possible to prove that the discount error scales with a coefficient that is lower than in Theorem 2: Theorem 10. Let β ≤γ −φ, let k = −log(1 −γ)/(log(γ) −log(γ −φ)), and let ρ = E hPk i=0 γiRi i . Then assuming the reward structure as defined in Assumption 8 we have that: ∥vγ −vβ∥∞≤γk∥uγ −uβ∥∞+ ρ ≤ γk(γq −βq) (1 −γq)(1 −βq) + ρ. Proof. Consider π be the optimal policy for the discount factor γ. Then we have: 0 ≤vγ −vβ ≤ vπ γ −vπ β. In the remainder of the proof, we drop the superscript π for simplicity, that is vβ = vπ β, not the optimal value function. Intuitively, the proof is based on “moving” the rewards to earlier steps to obtain a regular rewards structure. A small technical problem with this approach is that moving the rewards that are close to the initial time step decreases the bound. Therefore, we treat these rewards separately within the constant ρ. First, we show that for f(i) ≥k, we have that γi −βi ≤γf(i) −βf(i). Let j = f(i) = i −k, for some k ≥0. Then: γj −βj ≥ γj+k −βj+k j ≥ max β∈[0,γ−φ] log(1 −βk) −log(1 −γk) log(γ) −log(β) ≥ −log(1 −γk) log(γ) −log(γ −φ), with the maximization used to get a sufficient condition independent of β. Since the function f maps only at most ⌊k/q⌋values of Im to j < k, there is such |Iz| = k, that ∀x ∈Im \ Iz f(x) ≥k Then we have for j > k: 0 ≤vγ −vβ = lim m→∞E   X i∈Im\Iz (γi −βi)  ≤ρ + lim m→∞E   X i=1...m∧f(i)≥k (γf(i) −βf(i))tf(i)   ≤ ρ + ∞ X j=k (γj −βj)tj = ρ + γk(uγ −uβ). Because the playing board in Tetris is 10 squares wide, and each piece has 4 squares, it takes on average 2.5 moves to remove a line. Since Theorem 10 applies only to integer values of q, we use a Tetris formulation in which dropping each piece requires two steps. A proper Tetris action is taken in the first step, and there is no action in the second one. To make this model identical to the original formulation, we change the discount factor to γ 1 2 . Then the upper bound from Theorem 10 on the discount error is: ∥vγ −vβ∥∞≤γk(γ2.5 −β2.5)/(1 −γ2.5)(1 −β2.5) + ρ, Notice that ρ is a constant; it is independent of the new discount factor β. The sparse rewards property can now be used to motivate the performance increase, even if the approximation error is bounded by ϵ/(1 −β) instead of by ϵ/(1 −β)3 (as Lemma 7 suggests). The approximation error bound will not, in most cases, satisfy the sparsity assumption, as the errors are typically distributed almost uniformly over the state space and is received in every step as a result. Therefore, for sparse rewards, the discount error increase will typically be offset by the larger decrease in the approximation error. The cumulative error bounds derived above predict it is beneficial to reduce the discount factor to β when: ∥vγ −vβ∥∞≤γk (γ2.5 −β2.5) (1 −γ2.5)(1 −β2.5) + ρ + ϵ 1 −β < ϵ 1 −γ . The effective discount factor γ∗in Tetris is not known, but consider for example that it is γ∗= 0.99. Assuming φ = 0.1 we have that k = 48, which means that the first ⌊48/2.5⌋rewards must be excluded, and included in ρ. The bounds then predict that for ϵ ≥0.4 the performance of approximate value iteration may be expected to improve using β ≤γ −φ. We end by empirically illustrating the influence of reward sparsity in a general context. Consider a simple 1-policy, 7-state chain problem. Consider two reward instances, one with a single reward of 1, and the other with randomly generated rewards. We show the comparison of the effects of a lower discount factor of these two examples in Figure 6. The dotted line represents the global error with sparse rewards, and the solid line represents the cumulative error with dense rewards. Sparsity of rewards makes a decrease of the discount factor more interesting. 6 Conclusion and Future Work We show in this paper that some common approximation error bounds may be tightened with a lower discount factor. We also identified a class of problems in which a lower discount factor is likely to increase the performance of approximate dynamic programming algorithms. In particular, these are problems in which the rewards are received relatively sparsely. We concentrated on a theoretical analysis of the influence of the discount factor, not on the specific methods which could be used to determine a discount factor. The actual dependence of the performance on the discount factor may be non-trivial, and therefore hard to predict based on simple bounds. Therefore, the most practical approach is to first predict an improving discount factor based on the theoretical predictions, and then use line search to find a discount factor that ensures good performance. This is possible since the discount factor is a single-dimensional variable with a limited range. The central point of our analysis is based on bounds that are in general quite loose. An important future direction is to analyze the approximation error more carefully. We shall do experiments in order to see if we can have some insight on the form (i.e. the distribution) of the error for several settings (problems, approximation architecture). If such errors follow some law, it might be interesting to see whether it helps to tighten the bounds. Acknowledgements This work was supported in part by the Air Force Office of Scientific Research Grant No. FA9550-08-1-0171 and by the National Science Foundation Grant No. 0535061. The first author was also supported by a University of Massachusetts Graduate Fellowship. References [1] Dimitri P. Bertsekas and Sergey Ioffe. Temporal differences-based policy iteration and applications in neuro-dynamic programming. Technical Report LIDS-P-2349, LIDS, 1997. [2] Dimitri P. Bertsekas and John N. Tsitsiklis. Neuro-dynamic programming. Athena Scientific, 1996. [3] V.F. Farias and B. Van Roy. Probabilistic and Randomized Methods for Design Under Uncertainty, chapter 6: Tetris: A Study of Randomized Constraint Sampling. Springer-Verlag, 2006. [4] Sham Machandranath Kakade. A Natural Policy Gradient. In Advances in neural information processing systems, pages 1531–1538. MIT Press, 2001. [5] Ronald Parr, Lihong Li, Gavin Taylor, Christopher Painter-Wakefield, and Michael L. Littman. An analysis of linear models, linear value function approximation, and feature selection for reinforcement learning. In International Conference on Machine Learning, 2008. [6] Warren B. Powell. Approximate Dynamic Programming. Wiley-Interscience, 2007. [7] Martin L. Puterman. Markov decision processes: Discrete stochastic dynamic programming. John Wiley & Sons, Inc., 2005. [8] Richard S. Sutton and Andrew Barto. Reinforcement learning. MIT Press, 1998.
2008
21
3,465
Transfer Learning by Distribution Matching for Targeted Advertising Steffen Bickel, Christoph Sawade, and Tobias Scheffer University of Potsdam, Germany {bickel, sawade, scheffer}@cs.uni-potsdam.de Abstract We address the problem of learning classifiers for several related tasks that may differ in their joint distribution of input and output variables. For each task, small – possibly even empty – labeled samples and large unlabeled samples are available. While the unlabeled samples reflect the target distribution, the labeled samples may be biased. This setting is motivated by the problem of predicting sociodemographic features for users of web portals, based on the content which they have accessed. Here, questionnaires offered to a portion of each portal’s users produce biased samples. We derive a transfer learning procedure that produces resampling weights which match the pool of all examples to the target distribution of any given task. Transfer learning enables us to make predictions even for new portals with few or no training data and improves the overall prediction accuracy. 1 Introduction We study a problem setting of transfer learning in which classifiers for multiple tasks have to be learned from biased samples. Some of the multiple tasks will likely relate to one another, but one cannot assume that the tasks share a joint conditional distribution of the class label given the input variables. The challenge of multi-task learning is to come to a good generalization across tasks: each task should benefit from the wealth of data available for the entirety of tasks, but the optimization criterion needs to remain tied to the individual task at hand. A common method for learning under covariate shift (marginal shift) is to weight the biased training examples by the test-to-training ratio ptest(x) ptrain(x) to match the marginal distribution of the test data [1]. Instead of separately estimating the two potentially high-dimensional densities one can directly estimate the density ratio – by kernel mean matching [2], minimization of the KL-divergence between test and weighted training data [3], or by discrimination of training against test data with a probabilistic classifier [4]. Hierarchical Bayesian models are a standard statistical approach to multi-task learning [5, 6, 7]. Here, a common prior on model parameters across tasks captures the task dependencies. Similar to the idea of learning under marginal shift by weighting the training examples, [8] devise a method for learning under joint shift of covariates and labels over multiple tasks that is based on instancespecific rescaling factors. We generalize this idea to a setting where not only the joint distributions between tasks may differ but also the training and test distribution within each task. Our work is motivated by the targeted advertising problem for which the goal is to predict sociodemographic features (such as gender, age, or marital status) of web users, based on their surfing history. Many types of products are specifically targeted at clearly defined market segments, and marketing organizations seek to disseminate their message under minimal costs per delivery to a targeted individual. When sociodemographic attributes can be identified, delivering advertisements to users outside the target segment can be avoided. For some campaigns, clicks and resulting online purchases constitute an ultimate success criterion. However, for many campaigns – including campaigns for products that are not typically purchased on the web – the sole goal is to deliver the advertisement to customers in the target segment. The paper is structured as follows. Section 2 defines the problem setting. In Section 3, we devise our transfer learning model. We empirically study transfer learning for targeted advertising in Section 4 and Section 5 concludes. 2 Problem Setting We consider the following multi-task learning scenario. Each of several tasks z is characterized by an unknown joint distribution ptest(x, y|z) = ptest(x|z)p(y|x, z) over features x and labels y given the task z. The joint distributions of different tasks may differ arbitrarily but usually some tasks have similar distributions. An unlabeled test sample T = ⟨(x1, z1), . . . , (xm, zm)⟩with examples from different tasks is available. For each test example, attributes xi and the originating task zi are known. The test data for task z are governed by ptest(x|z). A labeled training set L = ⟨(xm+1, ym+1, zm+1), . . . , (xm+n, ym+n, zm+n)⟩collects examples from several tasks. In addition to xi and zi, the label yi is known for each example. The training data for task z is drawn from a joint distribution ptrain(x, y|z) = ptrain(x|z)p(y|x, z) that may differ from the test distribution in terms of the marginal distribution ptrain(x|z). The training and test marginals may differ arbitrarily, as long as each x with positive ptest(x|z) also has a positive ptrain(x|z). This guarantees that the training distribution covers the entire support of the test distribution for each task. The conditional distribution p(y|x, z) of test and training data is identical for a given task z, but conditionals can differ arbitrarily between tasks. The entire training set over all tasks is governed by the mixed density ptrain(z)ptrain(x, y|z). The prior ptrain(z) specifies the task proportions. There may be tasks with only a few or no labeled data. The goal is to learn a hypothesis fz : x 7→y for each task z. This hypothesis fz(x) should correctly predict the true label y of unseen examples drawn from p(x|z) for all z. That is, it should minimize the expected loss E(x,y)∼ptest(x,y|z)[ℓ(fz(x), y)] with respect to the unknown distribution ptest(x, y|z) for each individual z. This abstract problem setting models the targeted advertising application as follows. The feature vector x encodes the web surfing behavior of a user of web portal z (task). For a small number of users the sociodemographic target label y (e.g., gender of user) is collected through web surveys. For new portals the number of such labeled training instances is initially small. The sociodemographic labels for all users of all portals are to be predicted. The joint distribution ptest(x, y|z) can be different between portals since they attract specific populations of users. The training distribution differs from the test distribution because the response to the web surveys is not uniform with respect to the test distribution. Since the completion of surveys cannot be enforced, it is intrinsically impossible to obtain labeled samples that are governed by the test distribution. Therefore, a possible difference between the conditionals ptest(y|x, z) and ptrain(y|x, z) cannot be reflected in the model. One reference strategy is to learn individual models for each target task z by minimizing an appropriate loss function on the portion of Lz = {(xi, yi, zi) ∈L : zi = z}. This procedure does not exploit data of related tasks. In addition, it minimizes the loss with respect to ptrain(x, y|z); the minimum of this optimization problem will not generally coincide with the minimal loss on ptest(x, y|z). The other extreme is a one-size-fits-all model f∗(x) trained on the pooled training sample L. The training sample may deviate arbitrarily from the target distribution ptest(x, y|z). In order to describe the following model accurately, we introduce selector variable s which distinguishes training (s = 1) from test distributions (s = −1). Symbol ptrain(x, y|z) is a shorthand for p(x, y|z, s=1); likewise, ptest(x, y|z) = p(x, y|z, s=−1). 3 Transfer Learning by Distribution Matching In learning a classifier ft(x) for target task t, we seek to minimize the loss function with respect to ptest(x, y|t) = p(x, y|t, s = −1). Both, t and z are values of the random variable task; value t identifies the current target task. Simply pooling the available data for all tasks would create a sample governed by P z p(z|s = 1)p(x, y|z, s = 1). Our approach is to create a task-specific resampling weight rt(x, y) for each element of the pool of examples. The resampling weights match the pool distribution to the target distribution p(x, y|t, s=−1). The resampled pool is governed by the correct target distribution, but is larger than the labeled sample of the target task. Instead of sampling from the pool, one can weight the loss incurred by each instance by the resampling weight. The expected weighted loss with respect to the mixture distribution that governs the pool equals the loss with respect to the target distribution p(x, y|t, s = −1). Equation 1 defines the condition that the resampling weights have to satisfy. E(x,y)∼p(x,y|t,s=−1)[ℓ(f(x, t), y)] (1) = E(x,y)∼P z p(z|s=1)p(x,y|z,s=1) [rt(x, y)ℓ(f(x, t), y)] In the following, we will show that rt(x, y) = p(x, y|t, s=1) P z p(z|s=1)p(x, y|z, s=1) p(x|t, s=−1) p(x|t, s=1) (2) satisfies Equation 1. Equation 3 expands the expectation and introduces two fractions that equal one. We can factorize p(x, y|t, s = −1) and expand the sum over z in the numerator to run over the entire expression because the integral over (x, y) is independent of z (Equation 4). Equation 5 rearranges some terms and Equation 6 is the expected loss over the distribution of all tasks weighted by rt(x, y). E(x,y)∼p(x,y|t,s=−1)[ℓ(f(x, t), y)] = Z P z p(z|s=1)p(x, y|z, s=1) P z′ p(z′|s=1)p(x, y|z′, s=1) p(x|t, s=1) p(x|t, s=1)p(x, y|t, s=−1)ℓ(f(x, t), y)dxdy (3) = Z X z µ p(z|s=1)p(x, y|z, s=1) P z′p(z′|s=1)p(x, y|z′, s=1) p(x|t, s=1) p(x|t, s=1)p(x|t, s=−1)p(y|x, t)ℓ(f(x, t), y) ¶ dxdy (4) = Z X z µ p(z|s=1)p(x, y|z, s=1) p(x|t, s=1)p(y|x, t) P z′ p(z′|s=1)p(x, y|z′, s=1) p(x|t, s=−1) p(x|t, s=1) (5) ℓ(f(x, t), y) ¶ dxdy = E(x,y)∼P z p(z|s=1)p(x,y|z,s=1) · p(x, y|t, s=1) P z′ p(z′|s=1)p(x, y|z′, s=1) p(x|t, s=−1) p(x|t, s=1) ℓ(f(x, t), y) ¸ (6) Equation 5 signifies that we can train a hypothesis for task t by minimizing the expected loss over the distribution of all tasks weighted by rt(x, y). This amounts to minimizing the expected loss with respect to the target distribution p(x, y|t, s = −1). The resampling weights of Equation 2 have an intuitive interpretation: The first fraction accounts for the difference in the joint distributions across tasks, and the second fraction accounts for the covariate shift within the target task. Equation 5 leaves us with the problem of estimating the product of two density ratios rt(x, y) = p(x,y|t,s=1) P z p(z|s=1)p(x,y|z,s=1) p(x|t,s=−1) p(x|t,s=1) . One might be tempted to train four separate density estimators, one for each of the two numerators and the two denominators. However, obtaining estimators for potentially high-dimensional densities is unnecessarily difficult because ultimately only a scalar weight is required for each example. 3.1 Discriminative Density Ratio Models In this section, we derive a discriminative model that directly estimates the two factors r1 t (x, y) = p(x,y|t,s=1) P z p(z|s=1)p(x,y|z,s=1) and r2 t (x) = p(x|t,s=−1) p(x|t,s=1) of the resampling weights rt(x, y) = r1 t (x, y)r2 t (x) without estimating the individual densities. We reformulate the first density ratio r1 t (x, y) = p(x,y|t,s=1) P z p(z|s=1)p(x,y|z,s=1) in terms of a conditional model p(t|x, y, s = 1). This conditional has the following intuitive meaning: Given that an instance (x, y) has been drawn at random from the pool distribution P z p(z|s = 1)p(x, y|z, s = 1) over all tasks (including target task t); the probability that (x, y) originates from p(x, y|t, s = 1) is p(t|x, y, s = 1). The following equations assume that the prior on the size of the target sample is greater than zero, p(t|s = 1) > 0. In Equation 7 Bayes’ rule is applied to the numerator and z is summed out in the denominator. Equation 8 follows by dropping the normalization factor p(t|s=1) and by canceling p(x, y|s=1). r1 t (x, y) = p(x, y|t, s=1) P z p(z|s=1)p(x, y|z, s=1) = p(t|x, y, s=1)p(x, y|s=1) p(t|s=1)p(x, y|s=1) (7) ∝ p(t|x, y, s=1) (8) The significance of Equation 8 is that it shows how the first factor of the resampling weights r1 t (x, y) can be determined without knowledge of any of the task densities p(x, y|z, s = 1). The right hand side of Equation 8 can be evaluated based on a model p(t|x, y, s = 1) that discriminates labeled instances of the target task against labeled instances of the pool of examples for all non-target tasks. Similar to the first density ratio, the second density ratio r2 t (x) = p(x|t,s=−1) p(x|t,s=1) can be expressed using a conditional model p(s = 1|x, t). In Equation 9 Bayes’ rule is applied twice. The two terms of p(x|t) cancel each other out, p(s = 1|t)/p(s = −1|t) is just a normalization factor, and since p(s=−1|x, t) = 1 −p(s=1|x, t), Equation 10 follows. r2 t (x) = p(x|t, s=−1) p(x|t, s=1) = p(s=−1|x, t)p(x|t) p(s=−1|t) p(s=1|t) p(s=1|x, t)p(x|t) (9) ∝ 1 p(s=1|x, t) −1 (10) The significance of the above derivations is that instead of the four potentially high-dimensional densities in rt(x, y), only two conditional distributions with binary variables (Equations 8 and 10) need to be estimated. One can apply any probabilistic classifier to this estimation. 3.2 Estimation of Discriminative Density Ratios For estimation of r1 t (x, y) we model p(t|x, y, s=1) of Equation 8 with a logistic regression model p(t|x, y, s=1, ut) = 1 1 + exp(−uT t Φ(x, y)) over model parameters ut using a problem-specific feature mapping Φ(x, y). We define this mapping for binary labels, Φ(x, y) = h δ(y, +1)Φ(x) δ(y, −1)Φ(x) i , where δ is the Kronecker delta. In the absence of prior knowledge about the similarity of classes, input features x of examples with different class labels y are mapped to disjoint subsets of the feature vector. With this feature mapping the models for positive and negative examples do not interact and can be trained independently. Any suitable mapping Φ(x) can be applied. In [8], p(t|x, y, s = 1) is modeled for all tasks jointly in single optimization problem with a soft-max model. Empirically, we observe that a separate binary logistic regression model (as described above) for each task yields more accurate results with the drawback of a slightly increased overall training time. Optimization Problem 1 For task t: over parameters ut, maximize X (x,y)∈Lt log p(t|x, y, s=1, ut) + X (x,y)∈L\Lt log(1 −p(t|x, y, s=1, ut)) −uT t ut 2σu . The solution of Optimization Problem 1 is a MAP estimate of the logistic regression using a Gaussian prior on ut. The estimated vector ut leads to the first part of the weighting factor ˆr1 t (x, y) ∝p(t|x, y, s=1, ut) according to Equation 8. ˆr1 t (x, y) is normalized so that the weighted empirical distribution over the pool L sums to one, 1 |L| P (x,y)∈L ˆr1 t (x, y) = 1. According to Equation 10 density ratio r2 t (x) = p(x|t,s=−1) p(x|t,s=1) ∝ 1 p(s=1|x,t) −1 can be inferred from p(s = 1|x, t) which is the likelihood that a given x for task t originates from the training distribution, as opposed to from the test distribution. A model of p(s = 1|x, t) can be obtained by discriminating a sample governed by p(x|t, s=1) against a sample governed by p(x|t, s=−1) using a probabilistic classifier. Unlabeled test data Tt is governed by p(x|t, s = −1). The labeled pool L over all training examples weighted by r1 t (x, y) can serve as a sample governed by p(x|t, s = 1); the labels y can be ignored for this step. Empirically, we find that using the weighted pool L instead of just Lt (as used by [4]) achieves better results because the former sample is larger. We model p(s=1|x, vt) of Equation 10 with a regularized logistic regression on target variable s with parameters vt (Optimization Problem 2). Labeled examples L are weighted by the estimated first factor ˆr1 t (x, y) using the outcome of Optimization Problem 1. Optimization Problem 2 For task t: over parameters vt, maximize X (x,y)∈L ˆr1 t (x, y) log p(s=1|x, vt) + X x∈Tt log p(s=−1|x, vt) −vT t vt 2σv . With the result of Optimization Problem 2 the estimate for the second factor is ˆr2 t (x) ∝ 1 p(s=1|x,vt)− 1, according to Equation 10. ˆr2 t (x) is normalized so that the final weighted empirical distribution over the pool sums to one, 1 |L| P (x,y)∈L ˆr1 t (x, y)ˆr2 t (x) = 1. 3.3 Weighted Empirical Loss and Target Model The learning procedure first determines resampling weights ˆrt(x, y) = ˆr1 t (x, y)ˆr2 t (x) by solving Optimization Problems 1 and 2. These weights can now be used to reweight the labeled pool over all tasks and train the target model for task t. Using the weights we can evaluate the expected loss over the weighted training data as displayed in Equation 11. It is the regularized empirical counterpart of Equation 6. E(x,y)∼L £ ˆr1 t (x, y)ˆr2 t (x)ℓ(f(x, t), y) ¤ + wT t wt 2σ2w (11) Optimization Problem 3 minimizes Equation 11, the weighted regularized loss over the training data using a standard Gaussian log-prior with variance σ2 w on the parameters wt. Each example is weighted by the two discriminatively estimated density fractions from Equations 8 and 10 using the solution of Optimization Problems 1 and 2. Optimization Problem 3 For task t: over parameters wt, minimize 1 |L| X (x,y)∈L ˆr1 t (x, y)ˆr2 t (x)ℓ(f(x, wt), y) + wT t wt 2σ2w . In order to train target models for all tasks, instances of Optimization Problems 1 to 3 are solved for each task. 4 Targeted Advertising We study the benefit of distribution matching and other reference methods on targeted advertising for four web portals. The portals play the role of tasks. We manually assign topic labels, out of a fixed set of 373 topics, to all web pages on all portals. For each user the topics of the surfed pages are tracked and the topic counts are stored in cookies of the user’s web browser. The average number of surfed topics per user over all portals is 17. The feature vector x of a specific surfer is the normalized 373 dimensional vector of topic counts. A small proportion of users is asked to fill out a web questionnaire that collects sociodemographic user profiles. About 25% of the questionnaires get completely filled out (accepted) and in 75% of the cases the user rejects to fill out the questionnaire. The accepted questionnaires constitute the training data L. The completion of the questionnaire cannot be enforced and it is therefore not possible to obtain labeled data that is governed by the test distribution of all users that surf the target portal. In order to evaluate the model, we approximate the distribution of users who reject the questionnaire as follows. We take users who have answered the very first survey question (gender) but have then discontinued the survey as an approximation of the reject set. We add the correct proportion (25%) of users who have taken the survey, and thereby construct a sample that is governed by an approximation of the test distribution. Consequently, in our experiments we use the binary target label y ∈{male, female}. Table 1 gives an overview of the data set. Table 1: Portal statistics: number of accepted, partially rejected, and test examples (mix of all partial reject (=75%) and 25% accept); ratio of male users in training (accept) and test set. portal # accept # partial reject # test % male training % male test family 8073 2035 2713 53.8% 46.6% TV channel 8848 1192 1589 50.5% 50.1% news 1 3051 149 199 79.4% 76.7% news 2 2247 143 191 73.0% 76.0% We compare distribution matching on labeled and unlabeled data (Optimization Problems 1 to 3) and distribution matching only on labeled data by setting ˆr2 t (x) = 1 in Optimization Problem 3 to the following reference models. The first baseline is a one-size-fits-all model that directly trains a logistic regression on L (setting ˆr1 t (x, y)ˆr2 t (x) = 1 in Optimization Problem 3). The second baseline is a logistic regression trained only on Lt, the training examples of the target task. Training only on the reweighted target task data and correcting for marginal shift with respect to the unlabeled test data is the third baseline [4]. The last reference method is a hierarchical Bayesian model. Evgeniou and Pontil [6] describe a feature mapping for regularized regression models that corresponds to hierarchical Bayes with Gaussian prior on the regression parameters of the tasks. Training a logistic regression with their feature mapping over training examples from all tasks is equivalent to a joint MAP estimation of all model parameters and the mean of the Gaussian prior. We evaluate the methods using all training examples from non-target tasks and different numbers of training examples of the target task. From all available accept examples of the target task we randomly select a certain number (0-1600) of training examples. From the remaining accept examples of the target task we randomly select an appropriate number and add them to all partial reject examples of the target task so that the evaluation set has the right proportions as described above. We repeat this process ten times and report the average accuracies of all methods. We use a logistic loss as the target loss of distribution matching in Optimization Problem 3 and all reference methods. We compare kernelized variants of Optimization Problems 1 to 3 with RBF, polynomial, and linear kernels and find the linear kernel to achieve the best performance on our data set. All reported results are based on models with linear kernels. For the optimization of the logistic regression models we use trust region Newton descent [9]. We tune parameters σu, σv, and σw with grid search by executing the following steps. 1. σu is tuned by nested ten-fold cross-validation. The outer loop is a cross-validation on Lt. In each loop Optimization Problem 1 is solved on L¬t merged with current training folds of Lt. • The inner loop temporarily tunes σw by cross-validation on rescaled L¬t merged with the rescaled current training folds of Lt. At this point σw cannot be finally tuned because σv has not been tuned yet. In each loop Optimization Problem 3 is solved with fixed ˆr2 t (x) = 1. The temporary σw is chosen to maximize the accuracy on the tuning folds. Optimization Problem 3 is solved for each outer loop with the temporary σw and with ˆr2 t (x) = 1. The final σu is chosen to maximize the accuracy on the tuning folds of Lt over all outer loops. 2. σv is tuned by likelihood cross-validation on Tt ∪L. The labels of the labeled data are ignored for this step. Test data Tt of the target task as well as the weighted pool L (weighted by ˆr1 t (x, y), based on previously tuned σu) are split into ten folds. With the nine training folds of the test data and the nine training folds of the weighted pool L, Optimization Problem 2 is solved. Parameter distr. matching on lab. and unlab. data distribution matching on labeled data hierarchical Bayes one-size-fts-all on pool of labeled data training only on lab. data of target task training on lab. and unlab. data of targ. task 0.56 0.6 0.64 0.68 0 25 50 100 200 400 800 1600 accuracy training examples for target portal family 0.64 0.68 0.72 0 25 50 100 200 400 800 1600 accuracy training examples for target portal TV channel 0.72 0.76 0.8 0 25 50 100 200 400 800 1600 accuracy training examples for target portal news 1 0.8 0.84 0.88 0 25 50 100 200 400 800 1600 accuracy training examples for target portal news 2 Figure 1: Accuracy over different number of training examples for target portal. Error bars indicate the standard error of the differences to distribution matching on labeled data. σv is chosen to maximize the log-likelihood X (x,y)∈Ltune ˆr1 t (x, y) log p(s=1|x, vt) + X x∈T tune t log p(s=−1|x, vt) on the tuning folds of test data and weighted pool (denoted by Ltune and T tune t ) over all ten cross-validation loops. Applying non-uniform weights to labeled data (some of which may even be zero) reduces the effective sample size. This leads to a bias-variance trade-off [1]: training on unweighted data causes a bias, applying non-uniform weights reduces the sample size and increases the variance of the estimator. We follow [1] and smooth the estimated weights by ˆr2 t (x)λ before including them into Optimization Problem 3. The smoothing parameter λ biases the weights towards uniformity and thereby controls the trade-off. Without looking at the test data of the target task we tune η on the non-target tasks so that the accuracy of the distribution matching method is maximized. This procedure usually results in η values around 0.3. 3. Finally, σw is tuned by cross-validation on L rescaled by ˆr1 t (x, y)ˆr2 t (x) (based on the previously tuned parameters σu and σv). In each cross-validation loop Optimization Problem 3 is solved. Figure 1 displays the accuracies over different numbers of labeled data for the four different target portals. The error bars are the standard errors of the differences to the distribution matching method on labeled data (solid blue line). For the “family” and “TV channel” portals the distribution matching method on labeled and unlabeled data outperforms all other methods in almost all cases. The distribution matching method on labeled data outperforms the baselines trained only on the data of the target task for all portals and all data set sizes and it is at least as good as the one-size-fits-all model in almost all cases. The hierarchical Bayesian method yields low accuracies for smaller numbers of training examples but becomes comparable to the distribution matching method when training set sizes of the target portal increase. The simple covariate shift model that trains only on labeled and unlabeled data of the target task does not improve over the iid model that only trains on the labeled data of the target task. This indicates that the marginal shift between training and test distributions is small, or could indicate that the approximation of the reject distribution which we use in our experimentation is not sufficiently close. Either reason also explains why accounting for the marginal shift in the distribution matching method does not always improve over distribution matching using only labeled data. Transfer learning by distribution matching passes all examples for all tasks to the underlying logistic regressions. This is computationally more expensive than the reference methods. For example, the single task baseline trains only one logistic regression on the examples of the target task. Empirically, we observe that all methods scale linearly in the number training examples. 5 Conclusion We derived a multi-task learning method that is based on the insight that the expected loss with respect to the unbiased test distribution of the target task is equivalent to the expected loss over the biased training examples of all tasks weighted by a task specific resampling weight. This led to an algorithm that discriminatively estimates these resampling weights by training two simple conditional models. After weighting the pooled examples over all tasks the target model for a specific task can be trained. In our empirical study on targeted advertising, we found that distribution matching using labeled data outperforms all reference methods in almost all cases; the differences are particularly large for small sample sizes. Distribution matching with labeled and unlabeled data outperforms the reference methods and distribution matching with only labeled data in two out of four portals. Even with no labeled data of the target task the performance of the distribution matching method is comparable to training on 1600 examples of the target task for all portals. Acknowledgments We gratefully acknowledge support by nugg.ad AG and the German Science Foundation DFG. We wish to thank Stephan Noller and the nugg.ad team for their valuable contributions. References [1] H. Shimodaira. Improving predictive inference under covariate shift by weighting the log-likelihood function. Journal of Statistical Planning and Inference, 90:227–244, 2000. [2] J. Huang, A. Smola, A. Gretton, K. Borgwardt, and B. Sch¨olkopf. Correcting sample selection bias by unlabeled data. In Advances in Neural Information Processing Systems, 2007. [3] M. Sugiyama, S. Nakajima, H. Kashima, P. von Bunau, and M. Kawanabe. Direct importance estimation with model selection and its application to covariate shift adaptation. In Advances in Neural Information Processing Systems, 2008. [4] S. Bickel, M. Br¨uckner, and T. Scheffer. Discriminative learning for differing training and test distributions. In Proceedings of the International Conference on Machine Learning, 2007. [5] A. Schwaighofer, V. Tresp, and K. Yu. Learning Gaussian process kernels via hierarchical Bayes. In Advances in Neural Information Processing Systems, 2005. [6] T. Evgeniou and M. Pontil. Regularized multi–task learning. Proceedings of the International Conference on Knowledge Discovery and Data Mining, pages 109–117, 2004. [7] Y. Xue, X. Liao, L. Carin, and B. Krishnapuram. Multi-task learning for classification with Dirichlet process priors. Journal of Machine Learning Research, 8:35–63, 2007. [8] S. Bickel, J. Bogojeska, T. Lengauer, and T. Scheffer. Multi-task learning for HIV therapy screening. In Proceedings of the International Conference on Machine Learning, 2008. [9] C. Lin, R. Weng, and S. Keerthi. Trust region Newton method for large-scale logistic regression. Journal of Machine Learning Research, 9:627–650, 2008.
2008
210
3,466
A Convergent O(n) Algorithm for Off-policy Temporal-difference Learning with Linear Function Approximation Richard S. Sutton, Csaba Szepesv´ari∗, Hamid Reza Maei Reinforcement Learning and Artificial Intelligence Laboratory Department of Computing Science University of Alberta Edmonton, Alberta, Canada T6G 2E8 Abstract We introduce the first temporal-difference learning algorithm that is stable with linear function approximation and off-policy training, for any finite Markov decision process, behavior policy, and target policy, and whose complexity scales linearly in the number of parameters. We consider an i.i.d. policy-evaluation setting in which the data need not come from on-policy experience. The gradient temporal-difference (GTD) algorithm estimates the expected update vector of the TD(0) algorithm and performs stochastic gradient descent on its L2 norm. We prove that this algorithm is stable and convergent under the usual stochastic approximation conditions to the same least-squares solution as found by the LSTD, but without LSTD’s quadratic computational complexity. GTD is online and incremental, and does not involve multiplying by products of likelihood ratios as in importance-sampling methods. 1 Off-policy learning methods Off-policy methods have an important role to play in the larger ambitions of modern reinforcement learning. In general, updates to a statistic of a dynamical process are said to be “off-policy” if their distribution does not match the dynamics of the process, particularly if the mismatch is due to the way actions are chosen. The prototypical example in reinforcement learning is the learning of the value function for one policy, the target policy, using data obtained while following another policy, the behavior policy. For example, the popular Q-learning algorithm (Watkins 1989) is an offpolicy temporal-difference algorithm in which the target policy is greedy with respect to estimated action values, and the behavior policy is something more exploratory, such as a corresponding ϵgreedy policy. Off-policy methods are also critical to reinforcement-learning-based efforts to model human-level world knowledge and state representations as predictions of option outcomes (e.g., Sutton, Precup & Singh 1999; Sutton, Rafols & Koop 2006). Unfortunately, off-policy methods such as Q-learning are not sound when used with approximations that are linear in the learned parameters—the most popular form of function approximation in reinforcement learning. Counterexamples have been known for many years (e.g., Baird 1995) in which Q-learning’s parameters diverge to infinity for any positive step size. This is a severe problem in so far as function approximation is widely viewed as necessary for large-scale applications of reinforcement learning. The need is so great that practitioners have often simply ignored the problem and continued to use Q-learning with linear function approximation anyway. Although no instances ∗Csaba Szepesv´ari is on leave from MTA SZTAKI. 1 of absolute divergence in applications have been reported in the literature, the potential for instability is disturbing and probably belies real but less obvious problems. The stability problem is not specific to reinforcement learning. Classical dynamic programming methods such as value and policy iteration are also off-policy methods and also diverge on some problems when used with linear function approximation. Reinforcement learning methods are actually an improvement over conventional dynamic programming methods in that at least they can be used stably with linear function approximation in their on-policy form. The stability problem is also not due to the interaction of control and prediction, or to stochastic approximation effects; the simplest counterexamples are for deterministic, expected-value-style, synchronous policy evaluation (see Baird 1995; Sutton & Barto 1998). Prior to the current work, the possibility of instability could not be avoided whenever four individually desirable algorithmic features were combined: 1) off-policy updates, 2) temporal-difference learning, 3) linear function approximation, and 4) linear complexity in memory and per-time-step computation. If any one of these four is abandoned, then stable methods can be obtained relatively easily. But each feature brings value and practitioners are loath to give any of them up, as we discuss later in a penultimate related-work section. In this paper we present the first algorithm to achieve all four desirable features and be stable and convergent for all finite Markov decision processes, all target and behavior policies, and all feature representations for the linear approximator. Moreover, our algorithm does not use importance sampling and can be expected to be much better conditioned and of lower variance than importance sampling methods. Our algorithm can be viewed as performing stochastic gradient-descent in a novel objective function whose optimum is the least-squares TD solution. Our algorithm is also incremental and suitable for online use just as are simple temporaldifference learning algorithms such as Q-learning and TD(λ) (Sutton 1988). Our algorithm can be broadly characterized as a gradient-descent version of TD(0), and accordingly we call it GTD(0). 2 Sub-sampling and i.i.d. formulations of temporal-difference learning In this section we formulate the off-policy policy-evaluation problem for one-step temporaldifference learning such that the data consists of independent, identically-distributed (i.i.d.) samples. We start by considering the standard reinforcement learning framework, in which a learning agent interacts with an environment consisting of a finite Markov decision process (MDP). At each of a sequence of discrete time steps, t = 1, 2, . . ., the environment is in a state st ∈S, the agent chooses an action at ∈A, and then the environment emits a reward rt ∈R, and transitions to its next state st+1 ∈S. The state and action sets are finite. State transitions are stochastic and dependent on the immediately preceding state and action. Rewards are stochastic and dependent on the preceding state and action, and on the next state. The agent process generating the actions is termed the behavior policy. To start, we assume a deterministic target policy π : S →A. The objective is to learn an approximation to its state-value function: V π(s) = Eπ " ∞ X t=1 γt−1rt|s1 = s # , (1) where γ ∈[0, 1) is the discount rate. The learning is to be done without knowledge of the process dynamics and from observations of a single continuous trajectory with no resets. In many problems of interest the state set is too large for it to be practical to approximate the value of each state individually. Here we consider linear function approximation, in which states are mapped to feature vectors with fewer components than the number of states. That is, for each state s ∈S there is a corresponding feature vector φ(s) ∈Rn, with n ≪|S|. The approximation to the value function is then required to be linear in the feature vectors and a corresponding parameter vector θ ∈Rn: V π(s) ≈θ⊤φ(s). (2) Further, we assume that the states st are not visible to the learning agent in any way other than through the feature vectors. Thus this function approximation formulation can include partialobservability formulations such as POMDPs as a special case. The environment and the behavior policy together generate a stream of states, actions and rewards, s1, a1, r1, s2, a2, r2, . . ., which we can break into causally related 4-tuples, (s1, a1, r1, s′ 1), 2 (s2, a2, r2, s′ 2), ..., where s′ t = st+1. For some tuples, the action will match what the target policy would do in that state, and for others it will not. We can discard all of the latter as not relevant to the target policy. For the former, we can discard the action because it can be determined from the state via the target policy. With a slight abuse of notation, let sk denote the kth state in which an on-policy action was taken, and let rk and s′ k denote the associated reward and next state. The kth on-policy transition, denoted (sk, rk, s′ k), is a triple consisting of the starting state of the transition, the reward on the transition, and the ending state of the transition. The corresponding data available to the learning algorithm is the triple (φ(sk), rk, φ(s′ k)). The MDP under the behavior policy is assumed to be ergodic, so that it determines a stationary state-occupancy distribution µ(s) = limk→∞Pr{sk = s}. For any state s, the MDP and target policy together determine an N × N state-transition-probability matrix P, where pss′ = Pr{s′ k = s′|sk = s}, and an N × 1 expected-reward vector R, where Rs = E[rk|sk = s]. These two together completely characterize the statistics of on-policy transitions, and all the samples in the sequence of (φ(sk), rk, φ(s′ k)) respect these statistics. The problem still has a Markov structure in that there are temporal dependencies between the sample transitions. In our analysis we first consider a formulation without such dependencies, the i.i.d. case, and then prove that our results extend to the original case. In the i.i.d. formulation, the states sk are generated independently and identically distributed according to an arbitrary probability distribution µ. From each sk, a corresponding s′ k is generated according to the on-policy state-transition matrix, P, and a corresponding rk is generated according to an arbitrary bounded distribution with expected value Rsk. The final i.i.d. data sequence, from which an approximate value function is to be learned, is then the sequence (φ(sk), rk, φ(s′ k)), for k = 1, 2, . . . Further, because each sample is i.i.d., we can remove the indices and talk about a single tuple of random variables (φ, r, φ′) drawn from µ. It remains to define the objective of learning. The TD error for the linear setting is δ = r + γθ⊤φ′ −θ⊤φ. (3) Given this, we define the one-step linear TD solution as any value of θ at which 0 = E[δφ] = −Aθ + b, (4) where A = E  φ(φ −γφ′)⊤ and b = E[rφ]. This is the parameter value to which the linear TD(0) algorithm (Sutton 1988) converges under on-policy training, as well as the value found by LSTD(0) (Bradtke & Barto 1996) under both on-policy and off-policy training. The TD solution is always a fixed-point of the linear TD(0) algorithm, but under off-policy training it may not be stable; if θ does not exactly satisfy (4), then the TD(0) algorithm may cause it to move away in expected value and eventually diverge to infinity. 3 The GTD(0) algorithm We next present the idea and gradient-descent derivation leading to the GTD(0) algorithm. As discussed above, the vector E[δφ] can be viewed as an error in the current solution θ. The vector should be zero, so its norm is a measure of how far we are away from the TD solution. A distinctive feature of our gradient-descent analysis of temporal-difference learning is that we use as our objective function the L2 norm of this vector: J(θ) = E[δφ]⊤E[δφ] . (5) This objective function is quadratic and unimodal; it’s minimum value of 0 is achieved when E[δφ] = 0, which can always be achieved. The gradient of this objective function is ∇θJ(θ) = 2(∇θE[δφ])E[δφ] = 2E  φ(∇θδ)⊤⊤E[δφ] = −2E  φ(φ −γφ′)⊤⊤E[δφ] . (6) This last equation is key to our analysis. We would like to take a stochastic gradient-descent approach, in which a small change is made on each sample in such a way that the expected update 3 is the direction opposite to the gradient. This is straightforward if the gradient can be written as a single expected value, but here we have a product of two expected values. One cannot sample both of them because the sample product will be biased by their correlation. However, one could store a long-term, quasi-stationary estimate of either of the expectations and then sample the other. The question is, which expectation should be estimated and stored, and which should be sampled? Both ways seem to lead to interesting learning algorithms. First let us consider the algorithm obtained by forming and storing a separate estimate of the first expectation, that is, of the matrix A = E  φ(φ −γφ′)⊤ . This matrix is straightforward to estimate from experience as a simple arithmetic average of all previously observed sample outer products φ(φ −γφ′)⊤. Note that A is a stationary statistic in any fixed-policy policy-evaluation problem; it does not depend on θ and would not need to be re-estimated if θ were to change. Let Ak be the estimate of A after observing the first k samples, (φ1, r1, φ′ 1), . . . , (φk, rk, φ′ k). Then this algorithm is defined by Ak = 1 k k X i=1 φi(φi −γφ′ i)⊤ (7) along with the gradient descent rule: θk+1 = θk + αkA⊤ kδkφk, k ≥1, (8) where θ1 is arbitrary, δk = rk + γθ⊤ kφ′ k −θ⊤ kφk, and αk > 0 is a series of step-size parameters, possibly decreasing over time. We call this algorithm A⊤TD(0) because it is essentially conventional TD(0) prefixed by an estimate of the matrix A⊤. Although we find this algorithm interesting, we do not consider it further here because it requires O(n2) memory and computation per time step. The second path to a stochastic-approximation algorithm for estimating the gradient (6) is to form and store an estimate of the second expectation, the vector E[δφ], and to sample the first expectation, E  φ(φ −γφ′)⊤ . Let uk denote the estimate of E[δφ] after observing the first k −1 samples, with u1 = 0. The GTD(0) algorithm is defined by uk+1 = uk + βk(δkφk −uk) (9) and θk+1 = θk + αk(φk −γφ′ k)φ⊤ kuk, (10) where θ1 is arbitrary, δk is as in (3) using θk, and αk > 0 and βk > 0 are step-size parameters, possibly decreasing over time. Notice that if the product is formed right-to-left, then the entire computation is O(n) per time step. 4 Convergence The purpose of this section is to establish that GTD(0) converges with probability one to the TD solution in the i.i.d. problem formulation under standard assumptions. In particular, we have the following result: Theorem 4.1 (Convergence of GTD(0)). Consider the GTD(0) iteration (9,10) with step-size sequences αk and βk satisfying βk = ηαk, η > 0, αk, βk ∈(0, 1], P∞ k=0 αk = ∞, P∞ k=0 α2 k < ∞. Further assume that (φk, rk, φ′ k) is an i.i.d. sequence with uniformly bounded second moments. Let A = E  φk(φk −γφ′ k)⊤ and b = E[rkφk] (note that A and b are well-defined because the distribution of (φk, rk, φ′ k) does not depend on the sequence index k). Assume that A is non-singular. Then the parameter vector θk converges with probability one to the TD solution (4). Proof. We use the ordinary-differential-equation (ODE) approach (Borkar & Meyn 2000). First, we rewrite the algorithm’s two iterations as a single iteration in a combined parameter vector with 2n components ρ⊤ k = (v⊤ k, θ⊤ k), where vk = uk/√η, and a new reward-related vector with 2n components g⊤ k+1 = (rkφ⊤ k , 0⊤): ρk+1 = ρk + αk √η (Gk+1ρk + gk+1) , where Gk+1 =  −√ηI φk(γφ′ k −φk)⊤ (φk −γφ′ k)φ⊤ k 0  . 4 Let G = E[Gk] and g = E[gk]. Note that G and g are well-defined as by the assumption the process {φk, rk, φ′ k}k is i.i.d. In particular, G =  −√η I −A A⊤ 0  , g =  b 0  . Further, note that (4) follows from Gρ + g = 0, (11) where ρ⊤= (v⊤, θ⊤). Now we apply Theorem 2.2 of Borkar & Meyn (2000). For this purpose we write ρk+1 = ρk + αk√η(Gρk+g+(Gk+1−G)ρk+(gk+1−g)) = ρk+α′ k(h(ρk)+Mk+1), where α′ k = αk√η, h(ρ) = g +Gρ and Mk+1 = (Gk+1 −G)ρk +gk+1 −g. Let Fk = σ(ρ1, M1, . . . , ρk−1, Mk). Theorem 2.2 requires the verification of the following conditions: (i) The function h is Lipschitz and h∞(ρ) = limr→∞h(rρ)/r is well-defined for every ρ ∈R2n; (ii-a) The sequence (Mk, Fk) is a martingale difference sequence, and (ii-b) for some C0 > 0, E  ∥Mk+1∥2 | Fk  ≤C0(1 + ∥ρk∥2) holds for any initial parameter vector ρ1; (iii) The sequence α′ k satisfies 0 < α′ k ≤1, P∞ k=1 α′ k = ∞, P∞ k=1(α′ k)2 < +∞; and (iv) The ODE ˙ρ = h(ρ) has a globally asymptotically stable equilibrium. Clearly, h(ρ) is Lipschitz with coefficient ∥G∥and h∞(ρ) = Gρ. By construction, (Mk, Fk) satisfies E[Mk+1|Fk] = 0 and Mk ∈Fk, i.e., it is a martingale difference sequence. Condition (ii-b) can be shown to hold by a simple application of the triangle inequality and the boundedness of the the second moments of (φk, rk, φ′ k). Condition (iii) is satisfied by our conditions on the step-size sequences αk, βk. Finally, the last condition (iv) will follow from the elementary theory of linear differential equations if we can show that the real parts of all the eigenvalues of G are negative. First, let us show that G is non-singular. Using the determinant rule for partitioned matrices1 we get det(G) = det(A⊤A) ̸= 0. This indicates that all the eigenvalues of G are non-zero. Now, let λ ∈C, λ ̸= 0 be an eigenvalue of G with corresponding normalized eigenvector x ∈C2n; that is, ∥x∥2 = x∗x = 1, where x∗is the complex conjugate of x. Hence x∗Gx = λ. Let x⊤= (x⊤ 1, x⊤ 2), where x1, x2 ∈Cn. Using the definition of G, λ = x∗Gx = −√η∥x1∥2 + x∗ 1Ax2 −x∗ 2A⊤x1. Because A is real, A∗= A⊤, and it follows that (x∗ 1Ax2)∗= x∗ 2A⊤x1. Thus, Re(λ) = Re(x∗Gx) = −√η∥x1∥2 ≤0. We are now done if we show that x1 cannot be zero. If x1 = 0, then from λ = x∗Gx we get that λ = 0, which contradicts with λ ̸= 0. The next result concerns the convergence of GTD(0) when (φk, rk, φ′ k) is obtained by the off-policy sub-sampling process described originally in Section 2. We make the following assumption: Assumption A1 The behavior policy πb (generator of the actions at) selects all actions of the target policy π with positive probability in every state, and the target policy is deterministic. This assumption is needed to ensure that the sub-sampled process sk is well-defined and that the obtained sample is of “high quality”. Under this assumption it holds that sk is again a Markov chain by the strong Markov property of Markov processes (as the times selected when actions correspond to those of the behavior policy form Markov times with respect to the filtration defined by the original process st). The following theorem shows that the conclusion of the previous result continues to hold in this case: Theorem 4.2 (Convergence of GTD(0) with a sub-sampled process.). Assume A1. Let the parameters θk, uk be updated by (9,10). Further assume that (φk, rk, φ′ k) is such that E  ∥φk∥2|sk−1  , E  r2 k|sk−1  , E  ∥φ′ k∥2|sk−1  are uniformly bounded. Assume that the Markov chain (sk) is aperiodic and irreducible, so that limk→∞P(sk = s′|s0 = s) = µ(s′) exists and is unique. Let s be a state randomly drawn from µ, and let s′ be a state obtained by following π for one time step in the MDP from s. Further, let r(s, s′) be the reward incurred. Let A = E  φ(s)(φ(s) −γφ(s′))⊤ and b = E[r(s, s′)φ(s)]. Assume that A is non-singular. Then the parameter vector θk converges with probability one to the TD solution (4), provided that s1 ∼µ. Proof. The proof of Theorem 4.1 goes through without any changes once we observe that G = E[Gk+1|Fk] and g = E[gk+1 | Fk]. 1According to this rule, if A ∈Rn×n, B ∈Rn×m, C ∈Rm×n, D ∈Rm×m then for F = [A B; C D] ∈ R(n+m)×(n+m), det(F) = det(A) det(D −CA−1B). 5 The condition that (sk) is aperiodic and irreducible guarantees the existence of the steady state distribution µ. Further, the aperiodicity and irreducibility of (sk) follows from the same property of the original process (st). For further discussion of these conditions cf. Section 6.3 of Bertsekas and Tsitsiklis (1996). With considerable more work the result can be extended to the case when s1 follows an arbitrary distribution. This requires an extension of Theorem 2.2 of Borkar and Meyn (2000) to processes of the form ρk+1 + ρk(h(ρk) + Mk+1 + ek+1), where ek+1 is a fast decaying perturbation (see, e.g., the proof of Proposition 4.8 of Bertsekas and Tsitsiklis (1996)). 5 Extensions to action values, stochastic target policies, and other sample weightings The GTD algorithm extends immediately to the case of off-policy learning of action-value functions. For this assume that a behavior policy πb is followed that samples all actions in every state with positive probability. Let the target policy to be evaluated be π. In this case the basis functions are dependent on both the states and actions: φ : S × A →Rn. The learning equations are unchanged, except that φt and φ′ t are redefined as follows: φt = φ(st, at), (12) φ′ t = X a π(st+1, a)φ(st+1, a). (13) (We use time indices t denoting physical time.) Here π(s, a) is the probability of selecting action a in state s under the target policy π. Let us call the resulting algorithm “one-step gradient-based Q-evaluation,” or GQE(0). Theorem 5.1 (Convergence of GQE(0)). Assume that st is a state sequence generated by following some stationary policy πb in a finite MDP. Let rt be the corresponding sequence of rewards and let φt, φ′ t be given by the respective equations (12) and (13), and assume that E  ∥φt∥2|st−1  , E  r2 t |st−1  , E  ∥φ′ t∥2|st−1  are uniformly bounded. Let the parameters θt, ut be updated by Equations (9) and (10). Assume that the Markov chain (st) is aperiodic and irreducible, so that limt→∞P(st = s′|s0 = s) = µ(s′) exists and is unique. Let s be a state randomly drawn from µ, a be an action chosen by πb in s, let s′ be the next state obtained and let a′ = π(s′) be the action chosen by the target policy in state s′. Further, let r(s, a, s′) be the reward incurred in this transition. Let A = E  φ(s, a)(φ(s, a) −γφ(s′, a′))⊤ and b = E[r(s, a, s′)φ(s, a)]. Assume that A is non-singular. Then the parameter vector θt converges with probability one to a TD solution (4), provided that s1 is selected from the steady-state distribution µ. The proof is almost identical to that of Theorem 4.2, and hence it is omitted. Our main convergence results are also readily generalized to stochastic target policies by replacing the sub-sampling process described in Section 2 with a sample-weighting process. That is, instead of including or excluding transitions depending upon whether the action taken matches a deterministic policy, we include all transitions but give each a weight. For example, we might let the weight wt for time step t be equal to the probability π(st, at) of taking the action actually taken under the target policy. We can consider the i.i.d. samples now to have four components (φk, rk, φ′ k, wk), with the update rules (9) and (10) replaced by uk+1 = uk + βk(δkφk −uk)wk, (14) and θk+1 = θk + αk(φk −γφ′ k)φ⊤ kukwk. (15) Each sample is also weighted by wk in the expected values, such as that defining the TD solution (4). With these changes, Theorems 4.1 and 4.2 go through immediately for stochastic policies. The reweighting is, in effect, an adjustment to the i.i.d. sampling distribution, µ, and thus our results hold because they hold for all µ. The choice wt = π(st, at) is only one possibility, notable for its equivalence to our original case if the target policy is deterministic. Another natural weighting is wt = π(st, at)/πb(st, at), where πb is the behavior policy. This weighting may result in the TD solution (4) better matching the target policy’s value function (1). 6 6 Related work There have been several prior attempts to attain the four desirable algorithmic features mentioned at the beginning this paper (off-policy stability, temporal-difference learning, linear function approximation, and O(n) complexity) but none has been completely successful. One idea for retaining all four desirable features is to use importance sampling techniques to reweight off-policy updates so that they are in the same direction as on-policy updates in expected value (Precup, Sutton & Dasgupta 2001; Precup, Sutton & Singh 2000). Convergence can sometimes then be assured by existing results on the convergence of on-policy methods (Tsitsiklis & Van Roy 1997; Tadic 2001). However, the importance sampling weights are cumulative products of (possibly many) target-to-behavior-policy likelihood ratios, and consequently they and the corresponding updates may be of very high variance. The use of “recognizers” to construct the target policy directly from the behavior policy (Precup, Sutton, Paduraru, Koop & Singh 2006) is one strategy for limiting the variance; another is careful choice of the target policies (see Precup, Sutton & Dasgupta 2001). However, it remains the case that for all of such methods to date there are always choices of problem, behavior policy, and target policy for which the variance is infinite, and thus for which there is no guarantee of convergence. Residual gradient algorithms (Baird 1995) have also been proposed as a way of obtaining all four desirable features. These methods can be viewed as gradient descent in the expected squared TD error, E  δ2 ; thus they converge stably to the solution that minimizes this objective for arbitrary differentiable function approximators. However, this solution has always been found to be much inferior to the TD solution (exemplified by (4) for the one-step linear case). In the literature (Baird 1995; Sutton & Barto 1998), it is often claimed that residual-gradient methods are guaranteed to find the TD solution in two special cases: 1) systems with deterministic transitions and 2) systems in which two samples can be drawn for each next state (e.g., for which a simulation model is available). Our own analysis indicates that even these two special requirements are insufficient to guarantee convergence to the TD solution.2 Gordon (1995) and others have questioned the need for linear function approximation. He has proposed replacing linear function approximation with a more restricted class of approximators, known as averagers, that never extrapolate outside the range of the observed data and thus cannot diverge. Rightly or wrongly, averagers have been seen as being too constraining and have not been used on large applications involving online learning. Linear methods, on the other hand, have been widely used (e.g., Baxter, Tridgell & Weaver 1998; Sturtevant & White 2006; Schaeffer, Hlynka & Jussila 2001). The need for linear complexity has also been questioned. Second-order methods for linear approximators, such as LSTD (Bradtke & Barto 1996; Boyan 2002) and LSPI (Lagoudakis & Parr 2003; see also Peters, Vijayakumar & Schaal 2005), can be effective on moderately sized problems. If the number of features in the linear approximator is n, then these methods require memory and per-timestep computation that is O(n2). Newer incremental methods such as iLSTD (Geramifard, Bowling & Sutton 2006) have reduced the per-time-complexity to O(n), but are still O(n2) in memory. Sparsification methods may reduce the complexity further, they do not help in the general case, and may apply to O(n) methods as well to further reduce their complexity. Linear function approximation is most powerful when very large numbers of features are used, perhaps millions of features (e.g., as in Silver, Sutton & M¨uller 2007). In such cases, O(n2) methods are not feasible. 7 Conclusion GTD(0) is the first off-policy TD algorithm to converge under general conditions with linear function approximation and linear complexity. As such, it breaks new ground in terms of important, 2For a counterexample, consider that given in Dayan’s (1992) Figure 2, except now consider that state A is actually two states, A and A’, which share the same feature vector. The two states occur with 50-50 probability, and when one occurs the transition is always deterministically to B followed by the outcome 1, whereas when the other occurs the transition is always deterministically to the outcome 0. In this case V (A) and V (B) will converge under the residual-gradient algorithm to the wrong answers, 1/3 and 2/3, even though the system is deterministic, and even if multiple samples are drawn from each state (they will all be the same). 7 absolute abilities not previous available in existing algorithms. We have conducted empirical studies with the GTD(0) algorithm and have confirmed that it converges reliably on standard off-policy counterexamples such as Baird’s (1995) “star” problem. On on-policy problems such as the n-state random walk (Sutton 1988; Sutton & Barto 1998), GTD(0) does not seem to learn as efficiently as classic TD(0), although we are still exploring different ways of setting the step-size parameters, and other variations on the algorithm. It is not clear that the GTD(0) algorithm in its current form will be a fully satisfactory solution to the off-policy learning problem, but it is clear that is breaks new ground and achieves important abilities that were previously unattainable. Acknowledgments The authors gratefully acknowledge insights and assistance they have received from David Silver, Eric Wiewiora, Mark Ring, Michael Bowling, and Alborz Geramifard. This research was supported by iCORE, NSERC and the Alberta Ingenuity Fund. References Baird, L. C. (1995). Residual algorithms: Reinforcement learning with function approximation. In Proceedings of the Twelfth International Conference on Machine Learning, pp. 30–37. Morgan Kaufmann. Baxter, J., Tridgell, A., Weaver, L. (1998). Experiments in parameter learning using temporal differences. International Computer Chess Association Journal, 21, 84–99. Bertsekas, D. P., Tsitsiklis. J. (1996). Neuro-Dynamic Programming. Athena Scientific, 1996. Borkar, V. S. and Meyn, S. P. (2000). The ODE method for convergence of stochastic approximation and reinforcement learning. SIAM Journal on Control And Optimization , 38(2):447–469. Boyan, J. (2002). Technical update: Least-squares temporal difference learning. Machine Learning, 49:233– 246. Bradtke, S., Barto, A. G. (1996). Linear least-squares algorithms for temporal difference learning. Machine Learning, 22:33–57. Dayan, P. (1992). The convergence of TD(λ) for general λ. Machine Learning, 8:341–362. Geramifard, A., Bowling, M., Sutton, R. S. (2006). Incremental least-square temporal difference learning. Proceedings of the National Conference on Artificial Intelligence, pp. 356–361. Gordon, G. J. (1995). Stable function approximation in dynamic programming. Proceedings of the Twelfth International Conference on Machine Learning, pp. 261–268. Morgan Kaufmann, San Francisco. Lagoudakis, M., Parr, R. (2003). Least squares policy iteration. Journal of Machine Learning Research, 4:1107-1149. Peters, J., Vijayakumar, S. and Schaal, S. (2005). Natural Actor-Critic. Proceedings of the 16th European Conference on Machine Learning, pp. 280–291. Precup, D., Sutton, R. S. and Dasgupta, S. (2001). Off-policy temporal-difference learning with function approximation. Proceedings of the 18th International Conference on Machine Learning, pp. 417–424. Precup, D., Sutton, R. S., Paduraru, C., Koop, A., Singh, S. (2006). Off-policy Learning with Recognizers. Advances in Neural Information Processing Systems 18. Precup, D., Sutton, R. S., Singh, S. (2000). Eligibility traces for off-policy policy evaluation. Proceedings of the 17th International Conference on Machine Learning, pp. 759–766. Morgan Kaufmann. Schaeffer, J., Hlynka, M., Jussila, V. (2001). Temporal difference learning applied to a high-performance gameplaying program. Proceedings of the International Joint Conference on Artificial Intelligence, pp. 529–534. Silver, D., Sutton, R. S., M¨uller, M. (2007). Reinforcement learning of local shape in the game of Go. Proceedings of the 20th International Joint Conference on Artificial Intelligence, pp. 1053–1058. Sturtevant, N. R., White, A. M. (2006). Feature construction for reinforcement learning in hearts. In Proceedings of the 5th International Conference on Computers and Games. Sutton, R. S. (1988). Learning to predict by the method of temporal differences. Machine Learning, 3:9–44. Sutton, R. S., Barto, A. G. (1998). Reinforcement Learning: An Introduction. MIT Press. Sutton, R.S., Precup D. and Singh, S (1999). Between MDPs and semi-MDPs: A framework for temporal abstraction in reinforcement learning. Artificial Intelligence, 112:181–211. Sutton, R. S., Rafols, E.J., and Koop, A. 2006. Temporal abstraction in temporal-difference networks. Advances in Neural Information Processing Systems 18. Tadic, V. (2001). On the convergence of temporal-difference learning with linear function approximation. In Machine Learning 42:241–267 Tsitsiklis, J. N., and Van Roy, B. (1997). An analysis of temporal-difference learning with function approximation. IEEE Transactions on Automatic Control, 42:674–690. Watkins, C. J. C. H. (1989). Learning from Delayed Rewards. Ph.D. thesis, Cambridge University. 8
2008
211
3,467
Estimating Robust Query Models with Convex Optimization Kevyn Collins-Thompson∗ Microsoft Research 1 Microsoft Way Redmond, WA U.S.A. 98052 kevynct@microsoft.com Abstract Query expansion is a long-studied approach for improving retrieval effectiveness by enhancing the user’s original query with additional related words. Current algorithms for automatic query expansion can often improve retrieval accuracy on average, but are not robust: that is, they are highly unstable and have poor worst-case performance for individual queries. To address this problem, we introduce a novel formulation of query expansion as a convex optimization problem over a word graph. The model combines initial weights from a baseline feedback algorithm with edge weights based on word similarity, and integrates simple constraints to enforce set-based criteria such as aspect balance, aspect coverage, and term centrality. Results across multiple standard test collections show consistent and significant reductions in the number and magnitude of expansion failures, while retaining the strong positive gains of the baseline algorithm. Our approach does not assume a particular retrieval model, making it applicable to a broad class of existing expansion algorithms. 1 Introduction A major goal of current information retrieval research is to develop algorithms that can improve retrieval effectiveness by inferring a more complete picture of the user’s information need, beyond that provided by the user’s query text. A query model captures a richer representation of the context and goals of a particular information need. For example, in the language modeling approach to retrieval [9], a simple query model may be a unigram language model, with higher probability given to terms related to the query text. Once estimated, a query model may be used for such tasks as query expansion, suggesting alternate query terms to the user, or personalizing search results [11]. In this paper, we focus on the problem of automatically inferring a query model from the top-ranked documents obtained from an initial query. This task is known as pseudo-relevance feedback or blind feedback, because we do not assume any direct input from the user other than the initial query text. Despite decades of research, even state-of-the-art methods for inferring query models – and in particular, pseudo-relevance feedback – still suffer from some serious drawbacks. First, past research efforts have focused largely on achieving good average performance, without regard for the stability of individual retrieval results. The result is that current models are highly unstable and have bad worst-case performance for individual queries. This is one significant reason that Web search engines still make little or no use of automatic feedback methods. In addition, current methods do not ∗This work was primarily done while the author was at the Language Technologies Institute, School of Computer Science, Carnegie Mellon University. adequately capture the relationships or tradeoffs between competing objectives, such as maximizing the expected relevance weights of selected words versus the risks of those choices. This is turn leads to several problems. First, when term risk is ignored, the result will be less reliable algorithms for query models, as we show in Section 3. Second, selection of expansion terms is typically done in a greedy fashion by rank or score, which ignores the properties of the terms as a set and leads to the problem of aspect imbalance, a major source of retrieval failures [2]. Third, few existing expansion algorithms can operate selectively; that is, automatically detect when a query is risky to expand, and then avoid or reduce expansion in such cases. The few algorithms we have seen that do attempt selective expansion are not especially effective, and rely on sometimes complex heuristics that are integrated in a way that is not easy to untangle, modify or refine. Finally, for a given task there may be additional factors that must be constrained, such as the computational cost of sending many expansion terms to the search engine. To our knowledge such situations are not handled by any current query model estimation methods in a principled way. To remedy these problems, we need a better theoretical framework for query model estimation: one that incorporates both risk and reward data about terms, that detect risky situations and expands selectively, that can incorporate arbitrary additional problem constraints such as a computational budget, and has fast practical implementations. Our solution is to develop a novel formulation of query model estimation as a convex optimization problem [1], by casting the problem in terms of constrained graph labeling. Informally, we seek query models that use a set of terms with high expected relevance but low expected risk. This idea has close connections with models of risk in portfolio optimization [7]. An optimization approach frees us from the need to provide a closed-form formula for term weighting. Instead, we specify a (convex) objective function and a set of constraints that a good query model should satisfy, letting the solver do the work of searching the space of feasible query models. This approach gives a natural way to perform selective expansion: if there is no feasible solution to the optimization problem, we do not attempt to expand the original query. ore generally, it gives a very flexible framework for integrating different criteria for expansion as optimization constraints or objectives. Our risk framework consists of two key parts. First, we seek to minimize an objective function that consists of two criteria: term relevance, and term risk. Term risk in turn has two subcomponents: the individual risk of a term, and the conditional risk of choosing one term given we have already chosen another. Second, we specify constraints on what ‘good’ sets of terms should look like. These constraints are chosen to address traditional reasons for query drift. With these two parts, we obtain a simple convex program for solving for the relative term weights in a query model. 2 Theoretical model Our aim in this section is to develop a constrained optimization program to find stable, effective query models. Typically, our optimization will embody a basic tradeoff between wanting to use evidence that has strong expected relevance, such as expansion terms with high relevance model weights, and the risk or confidence in using that evidence. We begin by describing the objectives and constraints over term sets that might be of interest for estimating query models. We then describe a set of (sometimes competing) constraints whose feasible set reflects query models that are likely to be effective and reliable. Finally, we put all these together to form the convex optimization problem. 2.1 Query model estimation as graph labeling We can gain some insight into the problem of query model estimation by viewing the process of building a query as a two-class labeling problem over terms. Given a vocabulary V , for each term t ∈V we decide to either add term t to the query (assign label ‘1’ to the term), or to leave it out (assign label ‘0’). The initial query terms are given a label of ‘1’. Our goal is to find a function f : V →{0, 1} that classifies the finite set V of |V | = K terms, choosing one of the two labels for each term. The terms are typically related, so that the pairwise similarity σ(i, j) between any two terms wi, wj is represented by the weight of the edge connecting wi and wj in the undirected graph G = (V, E), where E is the set of all edges. The cost function L(f) captures our displeasure for a given f, according to how badly the following two criteria are given by the labeling produced by f. ȋ Y Z ȋ Y Z Figure 1: Query model estimation as a constrained graph labeling problem using two labels (relevant, non-relevant) on a graph of pairwise term relations. The square nodes X, Y, and Z represent query terms, and circular nodes represent potential expansion terms. Dark nodes represent terms with high estimated label weights that are likely to be added to the initial query. Additional constraints can select sets of terms having desirable properties for stable expansion, such as a bias toward relevant labels related to multiple query terms (right). • The cost ci:k gives the cost of labeling term ti with label k ∈{0, 1}. • The cost σi,j · d(f(i), f(j)) gives the penalty for assigning labels f(i) and f(j) to items i and j when their similarity is σi,j. The function d(u, v) is a metric that is the same for all edges. Typically, similar items are expected to have similar labels and thus a penalty is assigned to the degree this expectation is violated. For this study, we assume a very simple metric in which d(i, j) = 1 if i ̸= j and 0 otherwise. In a probabilistic setting, finding the most probable labeling can be viewed as a form of maximum a posteriori (MAP) estimation over the Markov random field defined by the term graph. Although this problem is NP-hard for arbitrary configurations, various approximation algorithms exist that run in polynomial time by relaxing the constraints. Here we relax the condition that the labels be integers in {0, 1} and allow real values in [0, 1]. A review of relaxations for the more general metric labeling problem is given by Ravikumar and Lafferty [10]. The basic relaxation we use is maximize X s;j cs;jxs;j + X s,t;j,k σs,j;t,kxs;jxt;k subject to X j xs;j = 1 0 ≤xs;j ≤1. (1) The variable xs;j denotes the assignment value of label j for term s. Our method obtains its initial assignment costs cs;j from a baseline feedback method, given an observed query and corresponding set of query-ranked documents. For our baseline expansion method, we use the strong default feedback algorithm included in Indri 2.2 based on Lavrenko’s Relevance Model [5]. Further details are available in [4]. In the next section, we discuss how to specify values for cs;j and σs,j;t,k that make sense for query model estimation. For a two-label problem where j ∈{0, 1}, the values of xi for one label completely determine the values for the other, since they must sum to 1, so it suffices to optimize over only the xi;1, and for simplicity we simply refer to xi instead of xi;1. Our goal is to find a set of weights x = (x1, . . . , xK) where each xi corresponds to the weight in the final query model of term wi and thus is the relative value of each word in the expanded query. The graph labeling formulation may be interpreted as combining two natural objectives: the first maximizes the expected relevance of the selected terms, and the second minimizes the risk associated with the selection. We now describe each of these in more detail, followed by a description of additional set-based constraints that are useful for query expansion. 2.2 Relevance objectives Given an initial set of term weights from a baseline expansion method c = (c1, . . . , cK) the expected relevance over the vocabulary V of a solution x is given by the weighted sum c · x = P k ckxk. Essentially, maximizing expected relevance biases the ‘relevant’ labels toward those words with the highest ci values. Other relevance objective functions are also possible, as long as they are convex. For example, if c and x represent probability distributions over terms, then we could replace c · x with KL(c||x) as an objective since KL-divergence is also convex in c and x. The initial assignment costs (label values) c can be set using a number of methods depending on how scores from the baseline expansion model are normalized. In the case of Indri’s language model-based expansion, we are given estimates of the Relevance Model p(w|R) over the highestranking k documents1. We can also estimate a non-relevance model p(w|N) using the collection to approximate non-relevant documents, or using the lowest-ranked k documents out of the top 1000 retrieved by the initial query Q. To set cs:1, we first compute p(R | w) for each word w via Bayes Theorem, p(R|w) = p(w|R) p(w|R) + p(w|N) (2) assuming p(R) = p(N) = 1/2. Using the notation p(R|Q) and p(R| ¯Q) to denote our belief that any query word or non-query word respectively should have label 1, the initial expected label value is then cs:1 = ( p(R|Q) + (1 −p(R|Q)) · p(R|ws) s ∈Q p(R| ¯Q) · p(R|ws) s /∈Q (3) for the ‘relevant’ label. We use p(R|Q) = 0.75 and p(R| ¯Q) = 0.5. Since the label values must sum to one, for binary labels we have cs:0 = 1 −cs:1. 2.3 Risk objectives Optimizing for expected term relevance only considers one dimension of the problem. A second critical objective is minimizing the risk associated with a particular term labeling. We adapt an informal definition of risk here in which the variance of the expected relevance is a proxy for uncertainty, encoded in the matrix Σ with entries σij. Using a betting analogy, the weights x = {xi} represent wagers on the utility of the query model terms. A risky strategy would place all bets on the single term with highest relevance score. A lower-risk strategy would distribute bets among terms that had both a large estimated relevance and low redundancy, to cover all aspects of the query. Conditional term risk. First, we consider the conditional risk σij between pairs of terms wi and wj. To quantify conditional risk, we measure the redundancy of choosing word wi given that wj has already been selected. This relation is expressed by choosing a symmetric similarity measure σ(wi, wj) between wi and wj, which is rescaled into a distance-like measure d(wi, wj) with the formula σij = d(wi, wj) = γ exp(−ρ · σ(wi, wj)) (4) The quantities γ and ρ are scaling constants that depend on the output scale of σ, and the choice of γ also controls the relative importance of individual vs. conditional term risk. In this study, our σ(wi, wj) measure is based on term associations over the 2 × 2 contingency table of term document counts. For this experiment we used the Jaccard coefficient: future work will examine others. Individual risk. We say that a term related to multiple query terms exhibits term centrality. Previous work has shown that central terms are more likely to be more effective for expansion than terms related to few query terms [3] [12]. We use term centrality to quantify a term’s individual risk, and define it for a term wi in terms of the vector di of all similarities of wi with all query terms. The covariance matrix Σ then has diagonal entries σii = ∥di∥2 2 = X wq∈Q d2(wi, wq) (5) 1We use the symbols R and N to represent relevance and non-relevance respectively. ȋ Y Y ȋ Bad Good (a) Aspect balance ȋ Y Y ȋ Low High (b) Aspect coverage ȋ Y Y ȋ Variable Centered (c) Term centering Figure 2: Three complementary criteria for expansion term weighting on a graph of candidate terms, and two query terms X and Y . The aspect balance constraint (left) prefers sets of expansion terms that balance the representation of X and Y . The aspect coverage constraint (center) increases recall by allowing more expansion candidates within a distance threshold of each term. Term centering (right) prefers terms near the center of the graph, and thus more likely to be related to both terms, with minimum variation in the distances to X and Y . Other definitions of centrality are certainly possible, e.g. depending on generative assumptions for term distributions. We can now combine relevance and risk into a single objective, and control the tradeoff with a single parameter κ, by minimizing the function L(x) = −cT x + κ 2 xT Σx. (6) If Σ is estimated from term co-occurrence data in the top-retrieved documents, then the condition to minimize xT Σx also encodes the fact that we want to select expansion terms that are not all in the same co-occurrence cluster. Rather, we prefer a set of expansion terms that are more diverse, covering a larger range of potential topics. 2.4 Set-based constraints One limitation of current query model estimation methods is that they typically make greedy termby-term decisions using a threshold, without considering the qualities of the set of terms as a whole. A one-dimensional greedy selection by term score, especially for a small number of terms, has the risk of emphasizing terms related to one aspect and not others. This in turn increases the risk of query drift after expansion. We now define several useful constraints on query model terms: aspect balance, aspect coverage, and query term support. Figure 2 gives graphical examples of aspect balance, aspect coverage, and the term centrality objective. Aspect balance. We make the simplistic assumption that each of a query’s terms represents a separate and unique aspect of the user’s information need. We create the matrix A from the vectors φk(wi) for each query term qk, by setting Aki = φk(wi) = σik. In effect, Ax gives the projection of the solution model x on each query term’s feature vector φk. We define the requirement that x be in balance to be that the vector Ax be element-wise close to the mean vector µ of the φk, within a tolerance ζµ, which we denote (with some flexibility in notation) by Ax ⪯µ + ζµ. (7) To demand an exact solution, we set ζµ = 0. In reality, some slack is desirable for slightly better results and so we use a small positive value for ζµ such as 1.0. Query term support. Another important constraint is that the set of initial query terms Q be predicted by the solution labeling. We express this mathematically by requiring that the the weights for the ‘relevant’ label on the query terms xi:1 lie in a range li ≤xi ≤ui and in particular be above the threshold li for xi ∈Q. Currently li is set to a default value of 0.95 for all query terms, and zero for all other terms. ui is set to 1.0 for all terms. Term-specific values for li may also be desirable to reflect the rarity or ambiguity of individual query terms. minimize −cT x + κ 2 xT Σx Relevance, term centrality & risk (9) subject to Ax ⪯µ + ζµ Aspect balance (10) gi T x ≥ζi, wi ∈Q Aspect coverage (11) li ≤xi ≤ui, i = 1, . . . , K Query term support, positivity (12) Figure 3: The basic constrained quadratic program QMOD used for query model estimation. Aspect coverage. One of the strengths of query expansion is its potential for solving the vocabulary mismatch problem by finding different words to express the same information need. Therefore, we can also require a minimal level of aspect coverage. That is, we may require more than just that terms are balanced evenly among all query terms: we may care about the absolute level of support that exists. For example, suppose our information sources are feedback terms, and we have two possible term weightings that are otherwise feasible solutions. The first weighting has only enough terms selected to give a minimal non-zero but even covering to all aspects. The second weighting scheme has three times as many terms, but also gives an even covering. Assuming no conflicting constraints such as maximum query length, we may prefer the second weighting because it increases the chance we find the right alternate words for the query, potentially improving recall. We denote the set of distances to neighboring words of query term qi by the vector gi. The projection giT x gives us the aspect coverage, or how well the words selected by the solution x ‘cover’ term qi. The more expansion terms near qi that are given higher weights, the larger this value becomes. When only the query term is covered, the value of giT x = σii. We want the aspect coverage for each of the vectors gi to exceed a threshold ζi, and this is expressed by the constraint gi T x ≥ζi. (8) Putting together the relevance and risk objectives, and constraining by the set properties, results in the following complete quadratic program for query model estimation, which we call QMOD and is shown in Figure 3. The role of each constraint is given in italics. 3 Evaluation In this section we summarize the effectiveness of using the QMOD convex programs to estimate query models and examine how well the QMOD feasible set is calibrated to the empirical risk of expansion. For space reasons we are unable to include a complete sensitivity analysis of the effect of the various constraints. The best risk-reward tradeoff is generally obtained with a strong query support constraint (li near 1.0) and moderate balance between individual and conditional term risk. We used the following default values for the control parameters: κ = 1.0, γ = 0.75, ζµ = 1.0, ζi = 0.1, ui = 1.0, and li = 0.95 for query terms and li = 0 for non-query terms. 3.1 Robustness of Model Estimation In this section we evaluate the robustness of the query models estimated using the convex program in Fig. 3 over several TREC collections. We created a histogram of MAP improvement across sets of topics. This is a fine-grained look that shows the distribution of gain or loss in MAP for a given feedback method. Using these histograms we can distinguish between two systems that might have the same number of failures, but which help or hurt queries by very different magnitudes. The number of queries helped or hurt by expansion is shown, binned by the loss or gain in average precision by using feedback. The baseline feedback here was Indri 2.2 (Modified Relevance Model with stoplist) [8]. The robustness histogram with results combined for all collections is shown in Fig. 4. Both algorithms achieve the same gain in average precision over all collections (15%). Yet considering the expansion failures whose loss in average precision is more than 10%, the robust version hurts more than 60% fewer queries. 0 5 10 15 20 25 30 35 40 [-100,-90) [-90,-80) [-80,-70) [-70,-60) [-60,-50) [-50,-40) [-40,-30) [-30,-20) [-20,-10) [-10, 0) Number of Queries (a) Queries hurt 0 10 20 30 40 50 60 70 80 [0, 10) [10. 20) [20, 30) [30, 40) [40, 50) [50, 60) [60, 70) [70, 80) [80, 90) [90, 100) 100+ Number of Queries (b) Queries helped Figure 4: Comparison of expansion robustness for four TREC collections combined (TREC 1&2, TREC 7, TREC 8, wt10g). The histograms show counts of queries, binned by percent change in average precision. The dark bars show robust expansion performance using the QMOD convex program with default control parameters. The light bars show baseline expansion performance using term relevance weights only. Both methods improve average precision by an average of 15%, but the robust version hurts significantly fewer queries, as evident by the greatly reduced tail on the left histogram (queries hurt). 3.2 Calibration of Feasible Set If the constraints of a convex program are well-designed for stable query expansion, the odds of an infeasible solution should be much greater than 50% for queries that are risky. In those cases, the algorithm will not attempt to enhance the query. Conversely, the odds of finding a feasible query model should ideally increase for thoese queries that are more amenable to expansion. Overall, 17% of all queries had infeasible programs. We binned these queries according to the actual gain or loss that would have been achieved with the baseline expansion, normalized by the original number of queries appearing in each bin when the (non-selective) baseline expansion is used. This gives the log-odds of reverting to the original query for any given gain/loss level. The results are shown in in Figure 5. As predicted, the QMOD algorithm is more likely to decide infeasibility for the high-risk zones at the extreme ends of the scale. Furthermore, the odds of finding a feasible solution do indeed increase directly with the actual benefits of using expansion, up to a point where we reach an average precision gain of 75% and higher. At this point, such high-reward queries are considered high risk by the algorithm, and the likelihood of reverting to the original query increases dramatically again. This analysis makes clear that the selective expansion behavior of the convex algorithm is well-calibrated to the true expansion benefit. 4 Conclusions We have presented a new research approach to query model estimation, showing how to adapt convex optimization methods to the problem by casting it as constrained graph labeling. By integrating relevance and risk objectives with additional constraints to selectively reduce expansion for the most risky queries, our approach is able to significantly reduce the downside risk of a strong baseline algorithm while retaining its strong gains in average precision. Our expansion framework is quite general and easily accomodates further extensions and refinements. For example, similar to methods used for portfolio optimization [6] we can assign a computational cost to each term having non-zero weight, and add budget constraints to prefer more efficient expansions. In addition, sensitivity analysis of the constraints is likely provide useful information for active learning: interesting extensions to semi-supervised learning are possible to incorporate additional observations such as relevance feedback from the user. Finally, there are a number of Figure 5: The log-odds of reverting to the original query as a result of selective expansion. Queries are binned by the percent change in average precision if baseline expansion were used. Columns above the line indicate greater-than-even odds that we revert to the original query. higher-level control parameters and it would be interesting to determine the optimal settings. The values we use have not been extensively tuned, so that further performance gains may be possible. Acknowledgments We thank Jamie Callan, John Lafferty, William Cohen, and Susan Dumais for their valuable feedback on many aspects of this work. References [1] S. Boyd and L. Vandenberghe. Convex Optimization. Cambridge University Press, 2004. [2] C. Buckley. Why current IR engines fail. In Proceedings of the 27th Annual International ACM SIGIR Conference on Research and Development in Information Retrieval (SIGIR 2004), pages 584–585, 2004. [3] K. Collins-Thompson and J. Callan. Query expansion using random walk models. In Proc. of the 14th International Conf. on Information and Knowledge Management (CIKM 2005), pages 704–711, 2005. [4] K. Collins-Thompson and J. Callan. Estimation and use of uncertainty in pseudo-relevance feedback. In Proceedings of the 30th Annual International ACM SIGIR Conference on Research and Development in Information Retrieval (SIGIR 2007), pages 303–310, 2007. [5] V. Lavrenko. A Generative Theory of Relevance. PhD thesis, Univ. of Massachusetts, Amherst, 2004. [6] M. S. Lobo, M. Fazel, and S. Boyd. Portfolio optimization with linear and fixed transaction costs. Annals of Operations Research, 152(1):376–394, 2007. [7] H. M. Markowitz. Portfolio selection. Journal of Finance, 7(1):77–91, 1952. [8] D. Metzler and W. B. Croft. Combining the language model and inference network approaches to retrieval. Information Processing and Management, 40(5):735–750, 2004. [9] J. M. Ponte and W. B. Croft. A language modeling approach to information retrieval. In Proc. of the 1998 ACM SIGIR Conference on Research and Development in Information Retrieval, pages 275–281, 1998. [10] P. Ravikumar and J. Lafferty. Quadratic programming relaxations for metric labeling and markov random field map estimation. In Proceedings of the 23rd International Conference on Machine Learning (ICML 2006), pages 737–744, 2006. [11] J. Teevan, S. T. Dumais, and E. Horvitz. Personalizing search via automated analysis of interests and activities. In Proceedings of the 28th Annual International ACM SIGIR Conference on Research and Development in Information Retrieval (SIGIR 2005), pages 449–456, New York, NY, USA, 2005. ACM. [12] J. Xu and W. B. Croft. Query expansion using local and global document analysis. In Proceedings of the 1996 Annual International ACM SIGIR Conference on Research and Development in Information Retrieval, pages 4–11, 1996.
2008
212
3,468
Learning Taxonomies by Dependence Maximization Matthew B. Blaschko Arthur Gretton Max Planck Institute for Biological Cybernetics Spemannstr. 38 72076 T¨ubingen, Germany {blaschko,arthur}@tuebingen.mpg.de Abstract We introduce a family of unsupervised algorithms, numerical taxonomy clustering, to simultaneously cluster data, and to learn a taxonomy that encodes the relationship between the clusters. The algorithms work by maximizing the dependence between the taxonomy and the original data. The resulting taxonomy is a more informative visualization of complex data than simple clustering; in addition, taking into account the relations between different clusters is shown to substantially improve the quality of the clustering, when compared with state-ofthe-art algorithms in the literature (both spectral clustering and a previous dependence maximization approach). We demonstrate our algorithm on image and text data. 1 Introduction We address the problem of finding taxonomies in data: that is, to cluster the data, and to specify in a systematic way how the clusters relate. This problem is widely encountered in biology, when grouping different species; and in computer science, when summarizing and searching over documents and images. One of the simpler methods that has been used extensively is agglomerative clustering [18]. One specifies a distance metric and a linkage function that encodes the cost of merging two clusters, and the algorithm greedily agglomerates clusters, forming a hierarchy until at last the final two clusters are merged into the tree root. A related alternate approach is divisive clustering, in which clusters are split at each level, beginning with a partition of all the data, e.g. [19]. Unfortunately, this is also a greedy technique and we generally have no approximation guarantees. More recently, hierarchical topic models [7, 23] have been proposed to model the hierarchical cluster structure of data. These models often rely on the data being representable by multinomial distributions over bags of words, making them suitable for many problems, but their application to arbitrarily structured data is in no way straightforward. Inference in these models often relies on sampling techniques that can affect their practical computational efficiency. On the other hand, many kinds of data can be easily compared using a kernel function, which encodes the measure of similarity between objects based on their features. Spectral clustering algorithms represent one important subset of clustering techniques based on kernels [24, 21]: the spectrum of an appropriately normalized similarity matrix is used as a relaxed solution to a partition problem. Spectral techniques have the advantage of capturing global cluster structure of the data, but generally do not give a global solution to the problem of discovering taxonomic structure. In the present work, we propose a novel unsupervised clustering algorithm, numerical taxonomy clustering, which both clusters the data and learns a taxonomy relating the clusters. Our method works by maximizing a kernel measure of dependence between the observed data, and a product of the partition matrix that defines the clusters with a structure matrix that defines the relationship between individual clusters. This leads to a constrained maximization problem that is in general NP hard, but that can be approximated very efficiently using results in spectral clustering and numerical 1 taxonomy (the latter field addresses the problem fitting taxonomies to pairwise distance data [1, 2, 4, 8, 11, 15, 25], and contains techniques that allow us to efficiently fit a tree structure to our data with tight approximation guarantees). Aside from its simplicity and computational efficiency, our method has two important advantages over previous clustering approaches. First, it represents a more informative visualization of the data than simple clustering, since the relationship between the clusters is also represented. Second, we find the clustering performance is improved over methods that do not take cluster structure into account, and over methods that impose a cluster distance structure rather than learning it. Several objectives that have been used for clustering are related to the objective employed here. Bach and Jordan [3] proposed a modified spectral clustering objective that they then maximize either with respect to the kernel parameters or the data partition. Christianini et al. [10] proposed a normalized inner product between a kernel matrix and a matrix constructed from the labels, which can be used to learn kernel parameters. The objective we use here is also a normalized inner product between a similarity matrix and a matrix constructed from the partition, but importantly, we include a structure matrix that represents the relationship between clusters. Our work is most closely related to that of Song et al. [22], who used an objective that includes a fixed structure matrix and an objective based on the Hilbert-Schmidt Independence Criterion. Their objective is not normalized, however, and they do not maximize with respect to the structure matrix. The paper is organized as follows. In Section 2, we introduce a family of dependence measures with which one can interpret the objective function of the clustering approach. The dependence maximization objective is presented in Section 3, and its relation to classical spectral clustering algorithms is explained in Section 3.1. Important results for the optimization of the objective are presented in Sections 3.2 and 3.3. The problem of numerical taxonomy and its relation to the proposed objective function is presented in Section 4, as well as the numerical taxonomy clustering algorithm. Experimental results are given in Section 5. 2 Hilbert-Schmidt Independence Criterion In this section, we give a brief introduction to the Hilbert-Schmidt Independence Criterion (HSIC), which is a measure of the strength of dependence between two variables (in our case, following [22], these are the data before and after clustering). We begin with some basic terminology in kernel methods. Let F be a reproducing kernel Hilbert space of functions from X to R, where X is a separable metric space (our input domain). To each point x ∈X, there corresponds an element φ(x) ∈F (we call φ the feature map) such that ⟨φ(x), φ(x′)⟩F = k(x, x′), where k : X × X →R is a unique positive definite kernel. We also define a second RKHS G with respect to the separable metric space Y, with feature map ψ and kernel ⟨ψ(y), ψ(y′)⟩G = l(y, y′). Let (X, Y ) be random variables on X × Y with joint distribution PrX,Y , and associated marginals PrX and PrY . Then following [5, 12], the covariance operator Cxy : G →F is defined such that for all f ∈F and g ∈G, ⟨f, Cxyg⟩F = Ex,y ([f(x) −Ex(f(x))] [g(y) −Ey(g(y))]) . A measure of dependence is then the Hilbert-Schmidt norm of this operator (the sum of the squared singular values), ∥Cxy∥2 HS. For characteristic kernels [13], this is zero if and only if X and Y are independent. It is shown in [13] that the Gaussian and Laplace kernels are characteristic on Rd. Given a sample of size n from PrX,Y , the Hilbert-Schmidt Independence Criterion (HSIC) is defined by [14] to be a (slightly biased) empirical estimate of ∥Cxy∥2 HS, HSIC := Tr [HnKHnL] , where Hn = I −1 n1n1T n, 1n is the n × 1 vector of ones, K is the Gram matrix for samples from PrX with (i, j)th entry k(xi, xj), and L is the Gram matrix with kernel l(yi, yj). 3 Dependence Maximization We now specify how the dependence criteria introduced in the previous section can be used in clustering. We represent our data via an n × n Gram matrix M ⪰0: in the simplest case, this 2 is the centered kernel matrix (M = HnKHn), but we also consider a Gram matrix corresponding to normalized cuts clustering (see Section 3.1). Following [22], we define our output Gram matrix to be L = ΠY ΠT , where Π is an n × k partition matrix, k is the number of clusters, and Y is a positive definite matrix that encodes the relationship between clusters (e.g. a taxonomic structure). Our clustering quality is measured according to Tr  MHnΠY ΠT Hn  p Tr [ΠY ΠT HnΠY ΠT Hn] . (1) In terms of the covariance operators introduced earlier, we are optimizing HSIC, this being an empirical estimate of ∥Cxy∥2 HS, while normalizing by the empirical estimate of ∥Cyy∥2 HS (we need not normalize by ∥Cxx∥2 HS, since it is constant). This criterion is very similar to the criterion introduced for use in kernel target alignment [10], the difference being the addition of centering matrices, Hn, as required by definition of the covariance. We remark that the normalizing term HnΠY ΠT Hn HS was not needed in the structured clustering objective of [22]. This is because Song et al. were interested only in solving for the partition matrix, Π, whereas we also wish to solve for Y : without normalization, the objective can always be improved by scaling Y arbitrarily. In the remainder of this section, we address the maximization of Equation (1) under various simplifying assumptions: these results will then be used in our main algorithm in Section 4. 3.1 Relation to Spectral Clustering Maximizing Equation (1) is quite difficult given that the entries of Π can only take on values in {0, 1}, and that the row sums have to be equal to 1. In order to more efficiently solve this difficult combinatorial problem, we make use of a spectral relaxation. Consider the case that Π is a column vector and Y is the identity matrix. Equation (1) becomes max Π Tr  MHnΠΠT Hn  p Tr [ΠΠT HnΠΠT Hn] = max Π ΠT HnMHnΠ ΠT HnΠ (2) Setting the derivative with respect to Π to zero and rearranging, we obtain HnMHnΠ = ΠT HnMHnΠ ΠT HnΠ HnΠ. (3) Using the normalization ΠT HnΠ = 1, we obtain the generalized eigenvalue problem HnMHnΠi = ρiHnΠi, or equivalently HnMHnΠi = ρiΠi. (4) For Π ∈{0, 1}n×k where k > 1, we can recover Π by extracting the k eigenvectors associated with the largest eigenvalues. As discussed in [24, 21], the relaxed solution will contain an arbitrary rotation which can be recovered using a reclustering step. If we choose M = D−1 2 AD−1 2 where A is a similarity matrix, and D is the diagonal matrix such that Dii = P j Aij, we can recover a centered version of the spectral clustering of [21]. In fact, we wish to ignore the eigenvector with constant entries [24], so the centering matrix Hn does not alter the clustering solution. 3.2 Solving for Optimal Y ⪰0 Given Π We now address the subproblem of solving for the optimal structure matrix, Y , subject only to positive semi-definiteness, for any Π. We note that the maximization of Equation (1) is equivalent to the constrained optimization problem max Y Tr  MHnΠY ΠT Hn  , s.t. Tr  ΠY ΠT HnΠY ΠT Hn  = 1 (5) We write the Lagrangian L(Y, ν) = Tr  MHnΠY ΠT Hn  + ν 1 −Tr  ΠY ΠT HnΠY ΠT Hn  , (6) take the derivative with respect to Y , and set to zero, to obtain ∂L ∂Y = ΠT HnMHnΠ −2ν ΠT HnΠY ΠT HnΠ  = 0 (7) 3 which together with the constraint in Equation (5) yields Y ∗= ΠT HnΠ † ΠT HnMHnΠ ΠT HnΠ † r Tr h ΠT HnMHnΠ (ΠT HnΠ)† ΠT HnMHnΠ (ΠT HnΠ)†i, (8) where † indicates the Moore-Penrose generalized inverse [17, p. 421]. Because ΠT HnΠ † ΠT Hn = Hk ΠT Π −1 ΠT Hn (see [6, 20]), we note that Equation (8) computes a normalized set kernel between the elements in each cluster. Up to a constant normalization factor, Y ∗is equivalent to Hk ˜Y ∗Hk where ˜Y ∗ ij = 1 NiNj X ι∈Ci X κ∈Cj ˜ Mικ, (9) Ni is the number of elements in cluster i, Ci is the set of indices of samples assigned to cluster i, and ˜ M = HnMHn. This is a standard set kernel as defined in [16]. 3.3 Solving for Π with the Optimal Y ⪰0 As we have solved for Y ∗in closed form in Equation (8), we can plug this result into Equation (1) to obtain a formulation of the problem of optimizing Π∗that does not require a simultaneous optimization over Y . Under these conditions, Equation (1) is equivalent to max Π r Tr h ΠT HnMHnΠ (ΠT Π)−1 ΠT HnMHnΠ (ΠT Π)−1i . (10) By evaluating the first order conditions on Equation (10), we can see that the relaxed solution, Π∗, to Equation (10) must lie in the principal subspace of HnMHn.1 Therefore, for the problem of simultaneously optimizing the structure matrix, Y ⪰0, and the partition matrix, one can use the same spectral relaxation as in Equation (4), and use the resulting partition matrix to solve for the optimal assignment for Y using Equation (8). This indicates that the optimal partition of the data is the same for Y given by Equation (8) and for Y = I. We show in the next section how we can add additional constraints on Y to not only aid in interpretation, but to actually improve the optimal clustering. 4 Numerical Taxonomy In this section, we consolidate the results developed in Section 3 and introduce the numerical taxonomy clustering algorithm. The algorithm allows us to simultaneously cluster data and learn a tree structure that relates the clusters. The tree structure imposes constraints on the solution, which in turn affect the data partition selected by the clustering algorithm. The data are only assumed to be well represented by some taxonomy, but not any particular topology or structure. In Section 3 we introduced techniques for solving for Y and Π that depend only on Y being constrained to be positive semi-definite. In the interests of interpretability, as well as the ability to influence clustering solutions by prior knowledge, we wish to explore the problem where additional constraints are imposed on the structure of Y . In particular, we consider the case that Y is constrained to be generated by a tree metric. By this, we mean that the distance between any two clusters is consistent with the path length along some fixed tree whose leaves are identified with the clusters. For any positive semi-definite matrix Y , we can compute the distance matrix, D, given by the norm implied by the inner product that computes Y , by assigning Dij = p Yii + Yjj −2Yij. It is sufficient, then, to reformulate the optimization problem given in Equation (1) to add the following constraints that characterize distances generated by a tree metric Dab + Dcd ≤max (Dac + Dbd, Dad + Dbc) ∀a, b, c, d, (11) where D is the distance matrix generated from Y . The constraints in Equation (11) are known as the 4-point condition, and were proven in [8] to be necessary and sufficient for D to be a tree metric. 1For a detailed derivation, see the extended technical report [6]. 4 Optimization problems incorporating these constraints are combinatorial and generally difficult to solve. The problem of numerical taxonomy, or fitting additive trees, is as follows: given a fixed distance matrix, D, that fulfills metric constraints, find the solution to min DT ∥D −DT ∥2 (12) with respect to some norm (e.g. L1, L2, or L∞), where DT is subject to the 4-point condition. While numerical taxonomy is in general NP hard, a great variety of approximation algorithms with feasible computational complexity have been developed [1, 2, 11, 15]. Given a distance matrix that satisfies the 4-point condition, the associated unrooted tree that generated the matrix can be found in O(k2) time, where k is equal to the number of clusters [25]. We propose the following iterative algorithm to incorporate the 4-point condition into the optimization of Equation (1): Require: M ⪰0 Ensure: (Π, Y ) ≈(Π∗, Y ∗) that solve Equation (1) with the constraints given in Equation (11) Initialize Y = I Initialize Π using the relaxation in Section 3.1 while Convergence has not been reached do Solve for Y given Π using Equation (8) Construct D such that Dij = p Yii + Yjj −2Yij Solve for minDT ∥D −DT ∥2 Assign Y = −1 2Hk(DT ⊙DT )Hk, where ⊙represents the Hadamard product Update Π using a normalized version of the algorithm described in [22] end while One can view this optimization as solving the relaxed version of the problem such that Y is only constrained to be positive definite, and then projecting the solution onto the feasible set by requiring Y to be constructed from a tree metric. By iterating the procedure, we can allow Π to reflect the fact that it should best fit the current estimate of the tree metric. 5 Experimental Results To illustrate the effectiveness of the proposed algorithm, we have performed clustering on two benchmark datasets. The face dataset presented in [22] consists of 185 images of three different people, each with three different facial expressions. The authors posited that this would be best represented by a ternary tree structure, where the first level would decide which subject was represented, and the second level would be based on facial expression. In fact, their clustering algorithm roughly partitioned the data in this way when the appropriate structure matrix was imposed. We will show that our algorithm is able to find a similar structure without supervision, which better represents the empirical structure of the data. We have also included results for the NIPS 1-12 dataset,2 which consists of binarized histograms of the first 12 years of NIPS papers, with a vocabulary size of 13649 and a corpus size of 1740. A Gaussian kernel was used with the normalization parameter set to the median squared distance between points in input space. 5.1 Performance Evaluation on the Face Dataset We first describe a numerical comparison on the face dataset [22] of the approach presented in Section 4 (where M = HnKHn is assigned as in a HSIC objective). We considered two alternative approaches: a classic spectral clustering algorithm [21], and the dependence maximization approach of Song et al. [22]. Because the approach in [22] is not able to learn the structure of Y from the data, we have optimized the partition matrix for 8 different plausible hierarchical structures (Figure 1). These have been constructed by truncating n-ary trees to the appropriate number of leaf nodes. For the evaluation, we have made use of the fact that the desired partition of the data is known for the face dataset, which allows us to compare the predicted clusters to the ground truth labels. For each 2The NIPS 1-12 dataset is available at http://www.cs.toronto.edu/˜roweis/data.html 5 partition matrix, we compute the conditional entropy of the true labels, l, given the cluster ids, c, H(l|c), which is related to mutual information by I(l; c) = H(l) −H(l|c). As H(l) is fixed for a given dataset, argmaxc I(l; c) = argminc H(l|c), and H(l|c) ≥0 with equality only in the case that the clusters are pure [9]. Table 1 shows the learned structure and proper normalization of our algorithm results in a partition of the images that much more closely matches the true identities and expressions of the faces, as evidenced by a much lower conditional entropy score than either the spectral clustering approach of [21] or the dependence maximization approach of [22]. Figure 2 shows the discovered taxonomy for the face dataset, where the length of the edges is proportional to the distance in the tree metric (thus, in interpreting the graph, it is important to take into account both the nodes at which particular clusters are connected, and the distance between these nodes; this is by contrast with Figure 1, which only gives the hierarchical cluster structure and does not represent distance). Our results show we have indeed recovered an appropriate tree structure without having to pre-specify the cluster similarity relations. (a) (b) (c) (d) (e) (f) (g) (h) Figure 1: Structures used in the optimization of [22]. The clusters are identified with leaf nodes, and distances between the clusters are given by the minimum path length from one leaf to another. Each edge in the graph has equal cost. spectral a b c d e f g h taxonomy 0.5443 0.7936 0.4970 0.6336 0.8652 1.2246 1.1396 1.1325 0.5180 0.2807 Table 1: Conditional entropy scores for spectral clustering [21], the clustering algorithm of [22], and the method presented here (last column). The structures for columns a-h are shown in Figure 1, while the learned structure is shown in Figure 2. The structure for spectral clustering is implicitly equivalent to that in Figure 1(h), as is apparent from the analysis in Section 3.1. Our method exceeds the performance of [21] and [22] for all the structures. 5.2 NIPS Paper Dataset For the NIPS dataset, we partitioned the documents into k = 8 clusters using the numerical taxonomy clustering algorithm. Results are given in Figure 3. To allow us to verify the clustering performance, we labeled each cluster using twenty informative words, as listed in Table 2. The most representative words were selected for a given cluster according to a heuristic score γ ν −η τ , where γ is the number of times the word occurs in the cluster, η is the number of times the word occurs outside the cluster, ν is the number of documents in the cluster, and τ is the number of documents outside the cluster. We observe that not only are the clusters themselves well defined (e.g cluster a contains neuroscience papers, cluster g covers discriminative learning, and cluster h Bayesian learning), but the similarity structure is also reasonable: clusters d and e, which respectively cover training and applications of neural networks, are considered close, but distant from g and h; these are themselves distant from the neuroscience cluster at a and the hardware papers in b; reinforcement learning gets a cluster at f distant from the remaining topics. Only cluster c appears to be indistinct, and shows no clear theme. Given its placement, we anticipate that it would merge with the remaining clusters for smaller k. 6 Conclusions and Future Work We have introduced a new algorithm, numerical taxonomy clustering, for simultaneously clustering data and discovering a taxonomy that relates the clusters. The algorithm is based on a dependence 6 Figure 2: Face dataset and the resulting taxonomy that was discovered by the algorithm f g h d e c b a Figure 3: The taxonomy discovered for the NIPS dataset. Words that represent the clusters are given in Table 2. a b c d e f g h neurons chip memory network training state function data cells circuit dynamics units recognition learning error model model analog image learning network policy algorithm models cell voltage neural hidden speech action functions distribution visual current hopfield networks set reinforcement learning gaussian neuron figure control input word optimal theorem likelihood activity vlsi system training performance control class parameters synaptic neuron inverse output neural function linear algorithm response output energy unit networks time examples mixture firing circuits capacity weights trained states case em cortex synapse object error classification actions training bayesian stimulus motion field weight layer agent vector posterior spike pulse motor neural input algorithm bound probability cortical neural computational layer system reward generalization density frequency input network recurrent features sutton set variables orientation digital images net test goal approximation prior motion gate subjects time classifier dynamic bounds log direction cmos model back classifiers step loss approach spatial silicon associative propagation feature programming algorithms matrix excitatory implementation attractor number image rl dimension estimation Table 2: Representative words for the NIPS dataset clusters. maximization approach, with the Hilbert-Schmidt Independence Criterion as our measure of dependence. We have shown several interesting theoretical results regarding dependence maximization clustering. First, we established the relationship between dependence maximization and spectral clustering. Second, we showed the optimal positive definite structure matrix takes the form of a set kernel, where sets are defined by cluster membership. This result applied to the original dependence maximization objective indicates that the inclusion of an unconstrained structure matrix does not affect the optimal partition matrix. In order to remedy this, we proposed to include constraints that guarantee Y to be generated from an additive metric. Numerical taxonomy clustering allows us to optimize the constrained problem efficiently. In our experiments on grouping facial expressions, numerical taxonomy clustering is more accurate than the existing approaches of spectral clustering and clustering with a fixed predefined structure. We were also able to fit a taxonomy to NIPS papers that resulted in a reasonable and interpretable clustering by subject matter. In both the facial expression and NIPS datasets, similar clusters are close together on the resulting tree.We conclude that numerical taxonomy clustering is a useful tool both for improving the accuracy of clusterings and for the visualization of complex data. Our approach presently relies on the combinatorial optimization introduced in [22] in order to optimize Π given a fixed estimate of Y . We believe that this step may be improved by relaxing the problem similar to Section 3.1. Likewise, automatic selection of the number of clusters is an interesting area of future work. We cannot expect to use the criterion in Equation (1) to select the number of clusters because increasing the size of Π and Y can never decrease the objective. However, the 7 elbow heuristic can be applied to the optimal value of Equation (1), which is closely related to the eigengap approach. Another interesting line of work is to consider optimizing a clustering objective derived from the Hilbert-Schmidt Normalized Independence Criterion (HSNIC) [13]. Acknowledgments This work is funded by the EC projects CLASS, IST 027978, PerAct, EST 504321, and by the Pascal Network, IST 2002-506778. We would also like to thank Christoph Lampert for simplifying the Moore-Penrose generalized inverse. References [1] R. Agarwala, V. Bafna, M. Farach, B. Narayanan, M. Paterson, and M. Thorup. On the approximability of numerical taxonomy (fitting distances by tree metrics). In SODA, pages 365–372, 1996. [2] N. Ailon and M. Charikar. Fitting tree metrics: Hierarchical clustering and phylogeny. In Foundations of Computer Science, pages 73–82, 2005. [3] F. R. Bach and M. I. Jordan. Learning spectral clustering, with application to speech separation. JMLR, 7:1963–2001, 2006. [4] R. Baire. Lec¸ons sur les Fonctions Discontinues. Gauthier Villars, 1905. [5] C. Baker. Joint measures and cross-covariance operators. Transactions of the American Mathematical Society, 186:273–289, 1973. [6] M. B. Blaschko and A. Gretton. Taxonomy inference using kernel dependence measures. Technical report, Max Planck Institute for Biological Cybernetics, 2008. [7] D. Blei, T. Griffiths, M. Jordan, and J. Tenenbaum. Hierarchical topic models and the nested chinese restaurant process. In NIPS 16, 2004. [8] P. Buneman. The Recovery of Trees from Measures of Dissimilarity. In D. Kendall and P. Tautu, editors, Mathematics the the Archeological and Historical Sciences, pages 387–395. Edinburgh U.P., 1971. [9] T. M. Cover and J. A. Thomas. Elements of Information Theory. Wiley, 1991. [10] N. Cristianini, J. Shawe-Taylor, A. Elisseeff, and J. Kandola. On kernel-target alignment. In NIPS 14, 2002. [11] M. Farach, S. Kannan, and T. Warnow. A robust model for finding optimal evolutionary trees. In STOC, pages 137–145, 1993. [12] K. Fukumizu, F. R. Bach, and M. I. Jordan. Dimensionality reduction for supervised learning with reproducing kernel Hilbert spaces. JMLR, 5:73–99, 2004. [13] K. Fukumizu, A. Gretton, X. Sun, and B. Sch¨olkopf. Kernel measures of conditional dependence. In NIPS 20, 2008. [14] A. Gretton, O. Bousquet, A. Smola, and B. Sch¨olkopf. Measuring statistical dependence with HilbertSchmidt norms. In Algorithmic Learning Theory, pages 63–78, 2005. [15] B. Harb, S. Kannan, and A. McGregor. Approximating the best-fit tree under lp norms. In APPROXRANDOM, pages 123–133, 2005. [16] D. Haussler. Convolution kernels on discrete structures. Technical Report UCSC-CRL-99-10, University of California at Santa Cruz, 1999. [17] R. A. Horn and C. R. Johnson. Matrix Analysis. Cambridge University Press, Cambridge, 1985. [18] A. K. Jain and R. C. Dubes. Algorithms for Clustering Data. Prentice Hall, 1988. [19] P. Macnaughton Smith, W. Williams, M. Dale, and L. Mockett. Dissimilarity analysis: a new technique of hierarchical subdivision. Nature, 202:1034–1035, 1965. [20] C. D. Meyer, Jr. Generalized inversion of modified matrices. SIAM Journal on Applied Mathematics, 24(3):315–323, 1973. [21] A. Y. Ng, M. I. Jordan, and Y. Weiss. On Spectral Clustering: Analysis and an Algorithm. In NIPS, pages 849–856, 2001. [22] L. Song, A. Smola, A. Gretton, and K. M. Borgwardt. A Dependence Maximization View of Clustering. In ICML, pages 815–822, 2007. [23] Y. W. Teh, M. I. Jordan, M. J. Beal, and D. M. Blei. Hierarchical dirichlet processes. JASA, 101(476):1566–1581, 2006. [24] U. von Luxburg. A Tutorial on Spectral Clustering. Statistics and Computing, 17(4):395–416, 2007. [25] M. S. Waterman, T. F. Smith, M. Singh, and W. A. Beyer. Additive Evolutionary Trees. Journal of Theoretical Biology, 64:199–213, 1977. 8
2008
213
3,469
Finding Latent Causes in Causal Networks: an Efficient Approach Based on Markov Blankets Jean-Philippe Pellet1,2 jep@zurich . ibm . com 1 Pattern Recognition and Machine Learning Group Swiss Federal Institute of Technology Zurich 8092 Zurich, Switzerland Abstract Andre Elisseeff2 ae l@ zurich.ibm .com 2 Data Analytics Group IBM Research GmbH 8803 Rlischlikon, Switzerland Causal structure-discovery techniques usually assume that all causes of more than one variable are observed. This is the so-called causal sufficiency assumption. In practice, it is untestable, and often violated. In this paper, we present an efficient causal structure-learning algorithm, suited for causally insufficient data. Similar to algorithms such as IC* and FCI, the proposed approach drops the causal sufficiency assumption and learns a structure that indicates (potential) latent causes for pairs of observed variables. Assuming a constant local density of the data-generating graph, our algorithm makes a quadratic number of conditionalindependence tests w.r.t. the number of variables. We show with experiments that our algorithm is comparable to the state-of-the-art FCI algorithm in accuracy, while being several orders of magnitude faster on large problems. We conclude that MBCS* makes a new range of causally insufficient problems computationally tractable. Keywords: Graphical Models, Structure Learning, Causal Inference. 1 Introduction: Task Definition & Related Work The statistical definition of causality pioneered by Pearl (2000) and Spirtes et al. (2001) has shed new light on how to detect causation. Central in this approach is the automated detection of causeeffect relationships using observational (i.e., non-experimental) data. This can be a necessary task, as in many situations, performing randomized controlled experiments to unveil causation can be impossible, unethical, or too costly. When the analysis deals with variables that cannot be manipulated, being able to learn from data collected by observing the running system is the only possibility. It turns out that learning the full causal structure of a set of variables is, in its most general form, impossible. If we suppose that the "causal ground truth" can be represented by a directed acyclic graph (DAG) over the variables to analyze, denoted by V, where the arcs denote direct causation, current causal structure-learning algorithms can only learn an equivalence class representing statistically indistinguishable DAGs. This class can be represented by a partially directed acyclic graph (PDAG), where arcs between variables may be undirected, indicating that both directions are equaJly possible given the data. This is know as the problem of causal underdetermination (Pearl, 2000). Common to most structure-learning algorithms are three important assumptions which ensure the correctness of the causal claims entailed by the returned PDAG (see Scheines, 1997, for a more extensive discussion of these assumptions and of their implications). First, the causal Markov condition states that every variable is independent of its non-effects given its direct causes. It implies that every dependency can be explained by some form of causation (direct, indirect, common cause, or any combination). Second, the faithfulness condition demands that the dependencies be DAGisomorphic; i.e., that there be a DAG whose entailed variable dependencies coincide exactly with the dependencies found in the data. Third, causal sufficiency of the data states that every common cause for two variables in V is also in V. Causal sufficiency often appears as the most controversial assumption as it is generally considered impossible to ensure that all possible causes are measured-there is no such thing as a closed world. In this paper, we are interested in relaxing causal sufficiency: we do not require the data to contain all common causes of pairs of variables. Some of the few algorithms that relax causal sufficiency are Inductive Causation* (IC*) by Pearl and Verma (1991); Pearl (2000), and Fast Causal Inference (FCI) by Spirtes et al. (1995, 2001). The kind of graph IC* and FCI return is known as a partial ancestral graph (PAG), which indicate for each link whether it (potentially) is the manifestation of a hidden common cause for the two linked variables. Assuming continuous variables with linear causal influences, Silva et al. (2006) recover hidden variables that are the cause for more than two observed variables, to infer the relationships between the hidden variables themselves. They check additional constraints on the covariance matrix, known as tetrad constraints (Scheines et aI., 1995), entailed by special kinds of hidden structures. There are more specialized techniques to deal with hidden variables. Elidan et al. (2001) look for structural signatures of hidden variables in a learned DAG model. Boyen et al. (1999) describe a technique that looks for violation of the Markov condition to infer the presence of latent variables in Bayesian networks. Once a hidden variable is identified, Elidan and Friedman (2001) discuss how to assign it a given dimensionality to best model its interactions with the observed variables. In this paper, we describe recent advances in making the PAG-learning task tractable for a wider range of problems, and present the Markov blanketlcollidet set (MBCS*) algorithm. In Section 2, we formally describe the PAG-Iearning task and motivate it with an example. Section 3 describes FCI. We then present MBCS* in Section 4 and compare it experimentally to FCI in Section 5. We finally conclude in Section 6. Correctness proofs are provided in the supplemental material l . Notation Throughout this paper, uppercase capitals such as X and Y denote variables or nodes in a graph and sets of variables are set in boldface, such as V. Hand L (possibly with indices) denote latent (unobserved) variables. Bold lowercase greek characters such as 7r are paths (ordered list of nodes), while the calligraphic letter 9 refers to a graph. Finally, we denote conditional independence of X and Y given Z by the notation (X Jl Y I Z). 2 Mixed Ancestral Graphs & Partial Ancestral Graphs In this section, we first introduce the notation of mixed ancestral graphs (MAGs) and partial ancestral graphs (pAGs) used by Spirtes et al. (1996) and describe how to learn them on a high level. We first review the definition of a V-structure. Definition 2.1 (V-structure) In a causal DAG, a V-structure is a triplet X ---> Z f- Y, where X and Yare nonadjacent. Z is then called an unshielded collider for X and Y. Its presence implies: ::JS Xy<;;; V \{X ,Y ,Z}: ((X JlY ISxy) and (X.,ilY I Sxy u{Z})), (1) In a V-structure, two causes X and Y, which are made independent by S xy, become dependent when conditioned on a common effect Z (or one of its descendants). This is the base fact that allows initial edge orientation in causal structure learning. Let us now suppose we are learning from data whose (unknown) actual causal DAG is: (2) Further assume that HI and H2 are hidden. Assuming the adjacencies X Y Z W have been found, conditional-independence tests will reveal that (X Jl Z) and (X .,il Z I Y), which is a sufficient condition for the V-structure X ---> Y f- Z. Similarly, (Y Jl W) and (Y .,il W I Z) is a sufficient condition for the V-structure Y ---> Z f- W. In a DAG like in a PDAG, however, those two overlapping V-structures are incompatible. The simplest DAG compatible with those findings needs the addition of an extra variable H: X ---> Y f- H ---> Z f- W. (3) I Available at http : //jp.pellet.name/publis/pellet08nips_supplement . pdf. Actually, (3) is the projection of the latent structure in (2). In the projection of a latent structure as defined by Pearl (2000), all hidden variables are parentless and have only two direct effects. Verma (1993) proved that any hidden structure has at least one projection. Notice that we cannot recover the information about the two separate hidden variables HI and H 2 . In the projection, information can thus be lost with respect to the true latent structure. Whereas causally sufficient datasets are represented as DAGs and learned as PDAGs to represent independence-equivalent DAGs, the projection of latent structures is represented by special graphs known as mixed ancestral graphs (MAGs) (Spirtes et aI., 2001), which allow for bidirected arrows to represent a hidden cause for a pair of variables. Independence-equivalent MAGs are represented by partial ancestral graphs (PAGs). PAGs are thus to MAGs what PDAGs are to DAGs, and structurelearning algorithms like FCI return a PAG. PAGs allow four kinds of arrows: ----7, 0----7, <J-O, and +----+. X ----7 Y in the PAG denotes true causation X ----7 Y in the projection; X +----+ Y indicates the presence of a latent cause X +-- H ----7 Y (without excluding direct causation); X 0----7 Y denotes either true causation X ----7 Y or a latent cause X +-H ----7 Y (or a combination of both); finally, X <J-O Y denotes potential causation from X ----7 Y or Y ----7 X and/or a latent common cause X +-- H ----7 Y in the projection, and is thus the most "agnostic link." An asterix as an arrowhead is a wildcard for any of the three possible endpoints of a link, such that X ...--+ Y, for instance, means any of X ----7 Y, X 0----7 Y, and X +----+ Y. Additionally, we also use the notation X <--* ~ <--* Y to indicate that Z is a definite noncollider for X and Y, such that any of X ...--+ Z ----7 Y, X+-- Z f-* Y , or X+-- Z ----7 Y can occur, but not X ...--+ Z f-* Y. To illustrate how MAGs and PAGs are related to a latent structure, consider the causal graph shown in Figure I (i). There, the hidden variable H is a cause for 3 observed variables, and L is a hidden variable in the causal chain from Z to W. All other variables are observed. In (ii), we show the projection of (i): note that we lose information about L and about the fact that HI, H 2, and H 3 are actually the same variable. The corresponding MAG is shown in (iii), and in (iv) the PAG that represents the class of independence-equivalent MAGs of which (iii) is a member. Note how the causal-underdetermination problem influences PAG learning: for instance, the model shown in (vi), if learned as a PAG, will also be represented as in (iv). (v) is commented on later in the text. S +-H S+-HI S S S S x~ /1 xi? E2 1 x~l~ x~!~ x~ x~l~ \" / Z+-Y Z+-Y Z~Y z~ Z +-Y I tB?' t t I t L ~W W 3 W W W W (i) (ii) (iii) (iv) (v) (vi) Figure 1: (i) Example of a causal structure with the hidden variables Hand L. (ii) Projection of (i). (iii) MAG representing the projection (ii). (iv) PAG representing the class of projections that are independence-equivalent to (iii). (v) The moral graph of (iii). (vi) Another structure with no hidden variable whose learned PAG is (iv). 3 Learning PAGs with the FeI Algorithm This section now turns to the task of learning PAGs with conditional-independence tests and describes shortly the reference algorithm, FCI. In principle, learning the structure of a PAG is not much different from learning the structure of a PDAG. The main difference is that instead of creating V-structures in a PDAG, we now just add arrow heads into the identified colliders, independently of what the other arrow endpoints are. A PAG-Iearning algorithm could thus operate this way: 1. Adjacencies: insert the "agnostic link" X <J-O Y if IfS c:;;; V \ {X, Y} : (X )l Y I S); 2. V-structures: when the condition (1) holds for triplet (X, Z, Y) , add arrow heads into Z; 3. Orientations: use rules to further orient "agnostic" endpoints wherever possible. The second difference w.r.t. PDAG learning is in the set of rules applied in Step 3 to further orient the graph. Those rules are detailed in the next subsection. To the best of our knowledge, the FCI algorithm is regarded as the state-of-the-art implementation of a PAG-Iearning algorithm. We list its pseudocode in Algorithm]. The notation Nb(X) stands for the set of direct neighbors of X in the graph being constructed g (and potentially changes at each iteration). The set ExtDSep(X, Y) is the union of Possible-D-Sep(X, Y) and Possible-D-Sep(Y, X). Possible-D-Sep(X, Y) is the set of nodes Z where there is an undirected path 7r between X and Z such that for each subpath 8 ...... W ...... T of 7r, either (a) W is a collider; or (b) W is not marked as a noncollider and 8, W, T are a triangle. (A triangle is a set of three nodes all adjacent to one another.) We list the orientation rules as a separate procedure in Algorithm 2, as we reuse them in our algorithm. Rule I preserves acyc1icity. Rule 2 honors the noncollider constraint when one of the two endpoints is an arrowhead. Rule 3 orients double-triangle structures; for instance; it orients 8 o----t Z in Figure 1 (iii). Rule 4 needs the following definition (Spirtes et al., 1995). Definition 3.1 (DDP) In a PAG g, 7r is a definite discriminating path (DDP) between 8 and Y (8, Y nonadjacent) for Z (Z -=I- 8, Y) if and only if 7r is an undirected path between 8 and Y containing Z, Z precedes Y on 7r, every vertex V between 8 and Z on 7r is a collider or a definite noncollider on 7r, and.' (i) if V and V' are adjacent on 7r and Viis between V and Z, then V +---+ V' on 7r; (ii) if V is between 8 and Z on 7r and V is a collider on 7r, then V ~ Yin g, else Y +---+ V in g. Figure 2 shows an example for a DDP and for Rule 4, wruch produces the orientation Z +---<> Y. For a more extensive justification and a proof of those rules, see Spirtes et al. (1995, 2001). The time complexity of FCI makes it non-scalable for larger networks. In particular, the two subset searches at lines 5 and 19 of Algorithm I are computationally costly in dense networks. In the next section, we present an algorithm that takes another approach at PAG learning to tackle problems larger than those that FCI can handle. Figure 2: Path 7r = (8 , V, X , Z , Y ) is a DDP for Z. Rule 4 adds an arrow head into Z if Z tj. S SY . 4 Efficient Structure Learning with the MBCS* Algorithm In this section, we propose a PAG-Iearning algorithm, MBCS*, which is more efficient than FCI in the sense that it performs much fewer conditional-independence tests, whose average conditioningset size is smaller. We show in Section 5 that MBCS* compares very favorably to FCI on test networks in terms of computational tractability, while reaching similar accuracy. Pseudocode for MCBS* is listed in Algorithm 3. MBCS* proceeds in three steps: first, it detects the Markov blankets for each variable; second, it examines the triangle structures to identify colliders and noncolliders; finally, it uses the same orientation rules as FCI to obtain the maximally oriented PAG. We detail the first two steps below; the orientation rules are the same as for FCI. 4.1 Step 1: Learning the Markov Blanket The first phase of MBCS* builds an undirected graph where each variable is connected to all members of its Markov blanket. Definition 4.1 (Markov blanket) The Markov blanket of a node X is the smallest set of variables Mb(X) such that 'VY E V \ Mb(X) \ {X} : (X Jl Y I Mb(X)). Assuming faithfulness, Mb(X) is unique. In a DAG, it corresponds to the parents, children, and children's parents (spouses) of X. We extend trus to MAGs. Algorithm 1 9 = FCI(V, J) Input: V : set of observed variables I : Output: g: a conditional-independence oracle, called with the notation ( . JL . I .) maximally oriented partial ancestral graph 1: 9 f-- fully connected graph over V 2: i f-- 0 II Detect adjacencies 3: while :3(X Y) s.t. INb(X)1 > i do 4: for each X Y s.t. INb(X)1 > i do 5: for each S <:;; Nb (X) \ {Y} of size i do 6: if (X JL Y I S) then 7: remove link X Y from 9 8: S Xy, S yX f-- S 9: break from loop line 4 10: end if 11: end for 12: end for 13: if--i+l 14: end while 15: for each X Z Y s.t. X , Y nonadjacent do 16: if Z tt S XY then orient as X --> Z f-- Y 17: end for II Detect additional adjacencies 18: for each pair of adjacent variables X , Y do 19: for each S <:;; ExtDSep(X,Y)\{X,Y} do 20: if(X JL Y IS) then 21: remove link X Y from 9 22: S Xy, Syxf-- S 23: break from loop line 18 24: end if 25: end for 26: end for 27: orient every link as 0-0 II Orient V-structures 28: for each X ...... Z ...... Y s.t. X , Y nonadjacent do 29: if Z tt S XY then orient as X ....... Z f-* Y 30: else mark Z as noncollider: X ...... Z ...... Y 31: end for 32: return ORIENTMAXIMALLY(9, \f(X,Y): S XY ) Algorithm 2 9 = ORIENTMAXIMALLY(9, a list of sets SXY) Input: 9 : partial ancestral graph S XY : for (some) nonadjacent pairs (X, Y): a d-separating set of variables Output: g: maximally oriented partial ancestral graph 1: while 9 is changed by some rule do 2: for each X *-0 Y such that there is a directed path from X to Y do orient as X ....... Y II Rule 1 II Rule 2 II Rule 3 II Rule 4 3: for each X ....... Z 0-;< Y do orient as X ....... Z --> Y 4: for each X ....... Z f-* Y with S *-0 Z and S E S XY do orient as S ....... Z 5: for each definite discriminating path 11" between Sand Y for Z do 6: if X ...... Y where X is adjacent to Z on 11" and X , Z, Yare a triangle then 7: if S SY exists and Z tt S SY then orient as X ....... Z f-* Y 8: else mark Z as a noncollider X ...... Z ...... Y 9: end if 10: end for 11: end while Algorithm 3 9 = MBCS*(V, J) Input: V : set of observed variables I : a conditional-independence oracle, called with the notation ( . JL . I .) Output: g: maximally oriented partial ancestral graph II Initialization 1: 9 f-- empty graph over V II Find Markov blankets (Grow-Shrink) 2: for each X E V do 3: S f-- empty set of Markov blanket variables 4: while:3Y E V \ {X} s.t. (X .,It Y IS) do 5: add Y to S 6: while :3Y E S s.t. (X JL Y I S \ {Y} ) do 7: remove Y from S 8: for each Y E S do add link X 0-0 Y 9: end for II Add noncollider constraints 10: for each X 0-0 Z 0-0 Y s.t. X , Y nonadjacent do 11 : mark as noncollider X 0-0 Z 0-0 Y 12: end for 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: II Adjust local structures (Collider Set search) C f-- empty list of collider-orientation directives for each X ...... Y in a fully connected triangle do if :3collider set Z <:;; Tri(X - Y) then S XY f-- d-separating set for (X, Y) remove link X ...... Y from 9 for each Z E Z do add ordered triplet (X, Z, Y) to C for each Z E S XY do end if end for mark as noncollider X ...... Z ...... Y for each orientation directive (X, Z, Y) E C do if X ...... Z ...... Y then orient as X ....... Z f-* Y end for return ORIENTMAXIMALLY(9, \f(X,Y): S XY ) Property 4.2 In a faithful MAG, the Markov blanket Mb(X) of a node X is the set of parents, children, children 's parents (spouses) of X, as well as the district of X and of the children of X, and the parents of each node of these districts, where the district of a node Y is the set of all nodes reachable from Y using only bidirected edges. (Proofin supplemental material.) We use algorithmic ideas from Margaritis and Thrun (1999) to learn the Markov blanket of a node with a linear number of conditional-independence tests (proof in the supplemental material of Margaritis and Thrun, 1999). This technique is used in lines 3 to 6 of Algorithm 3. The resulting graph is an undirected graph called moral graph where each node is connected to its Markov blanket. Therefore, it contains spurious links to its spouses, to members of its district, to members of its children's district, and to parents of nodes in those districts, which we all call SD links (for Spouse/District). Removal of those links is done in the second step of MBCS*. 4.2 Step 2: Removing the SD Links In the second step of MBCS*, each undirected edge must be identified as either an SD link to be removed, or a true link of the original MAG to be kept. Direct parents and children are dependent given any conditioning set, while spouses and district members (and their parents) can be made independent. For each link X Y, a search is thus performed to try to d-separate the two connected nodes. This search can be limited to the smallest of the Markov blankets of X and Y, as by definition they contain all nodes that can minimally make them independent from each other, provided they are linked by an SD link. If such a d-separating set S Xy is found, the link is removed. Interestingly, identifying a d-separating set SXY also identifies the collider set for X and Y. Definition 4.3 (Collider set) In an undirected graph 9 over V, let Thi(X - Y) (X, Y adjacent) be the set of all vertices that form a triangle with X and Y. Suppose that 9 is the moral graph of the DAG or MAG representing the causal structure of a faithful dataset. A set of vertices Z ~ Thi (X - Y) then has the Collider set property for the pair (X, Y) if it is the largest set that fulfills :3SXy ~ V \ {X , Y} \ Z:(X Jl Y ISxy) and VZ E Z : (X .,Ii Y I S X Y U {Z}). Collider sets are useful because each node in them satisfies the property of a collider (1) and reveals a V-structure. Suppose (X Jl Y I SXy): then each node Z (connected by a non-SD link to both X and Y) not in S Xy is a collider. This follows from the fact that for each path X ....... Z ....... Y where Z rf. S xy , the only structural possibility is to have arrow head pointing into Z by the definition of dseparation (Pearl, 1988). Similarly, if Z E SXY, then any orientation is possible save for a collider. Those two types of constraints appear in lines 19 and 21 of Algorithm 3, respectively. Note that more noncollider constraints are added in line 11: in the case X 0-0 Z 0-0 Y with X , Y nonadjacent, we know that Z cannot be a V-structure owing to the following lemma. Lemma 4.4 In the moral graph gm of a DAG or a MAG g, whenever the pattern X ;<--7 Z +---> Y occurs in g, then X and Yare linked in gm. (Proof in supplemental material.) In practice, the search for collider sets and simultaneously for d-separating sets in lines 15 and 16 is performed following the implementation proposed by Pellet and Elisseeff (2008). They also discuss why V-structure orientations must be delayed to line 25 instead of being made immediately in line 19. In the supplemental material to this paper, we prove that MBCS* correctly identifies all adjacencies and V-structures. The final orientation step (Algorithm 2) requires d-separating-set information for Rules 3 and 4: we also prove that MBCS* provides all necessary information. 5 Experimental Evaluation We now compare FCI and MBCS* with a series of experiments. We took two standard benchmark networks, ALARM and HAILFINDER, and for each of them, chose to hide 0, 1, 2, and 3 variables, creating in total 8 learning problems. On a first series on experiments, the algorithms were run with a d-separation oracle, which is equivalent to perfect conditional-independence tests. Conditioning Table 1: Comparison of MBCS* and FCI where conditional-independence tests are done using a d-separation oracle. We report the number of tests t; the weighted number of tests wt, where each test contributes to wt a summand equal to the size of its conditioning set; and the ratio of t for FCI over the t for MBCS*: r ~ t (FCI) It (MBCS*). Alg. ALARM HAILFINDER #hid. v. t wt r #hid. v. t wt r MBCS* FCI MBCS* FCI MBCS* FCI MBCS* FCI 40 o 2 3 2,237 12,123 9,340 27,666 3,397 18,113 21,497 95,497 5,208 27,576 31,018 145,322 7,527 42,133 231,096 1,612,106 Alarm _ Edgeerrors 35 c=J Orientation errors '" e 30 " '0 25 " ~ 20 :J C Ql 15 ~ ~ 10 5 o MBCS' FCI MBCS' FCI MBCS' FCI MBCS' FCI o hid.v. 1 hid.v. 2 hid.v. 3 hid.v. 4 I 6 l 6 l 30 5,333 35,841 2,254,774 20,153,894 o 6,516 42,379 2,302,707 20,448,775 2 7,205 46,291 2,324,503 20,608,841 18,244 117,209 2,622,312 22,888,622 3 Hailfinder 50 0==0---------, MBCS'FCI MBCS'FCI MBCS' FCI MBCS' FCI o hid.v. 1 hid.v. 2 hid.v. 3 hid.v. l 423 I 353 l 322 143 Figure 3: Comparison of MBCS* and FCI where conditional-independence tests are done using Fisher's z-test. We compare the number of edge errors (missing/extraneous) and orientation errors (including missing/extraneous hidden variables). Error bars show the standard deviation over the 5 runs. on hidden variables was prohibited. The results are listed in Table 1. In a second series, multivariate Gaussian datasets (with 500 datapoints) were sampled from the networks and data corresponding to the hidden variables were removed. The algorithms were run with Fisher's z-test on partial correlation as conditional-independence test. This was repeated 5 times for each learning problem.2 For FCI, we used the authors' implementation in TETRAD (Scheines et aI., 1995). MBCS* was implemented in Matlab. See Figure 3 for the comparison. Table 1 shows in the columns named t that MBCS* makes up to 3 orders of magnitude fewer conditional-independence tests than FCI on the tested networks. As the number of tests alone does not reflect the quality of the algorithm, we also list in the wt column a weighted sum of tests, where each test is weighted by the size of its conditioning set. As the ALARM network becomes denser by hiding certain variables, the difference between FCI and MBCS* becomes even more apparent. The inverse phenomenon is to be observed for HAILFINDER, where the difference between FCI and MBCS* gets smaller: this is because this network is more densely connected, and both algorithms exhibit a behavior gradually evolving towards the worst case of the fully connected graph. FCI slowly "catches up" with MBCS* in those circumstances. 2We would have liked to both vary the number of samples for each dataset and include more test networks, but the running times of Fer on the larger instances, even when run with an upper limit on the maximum size of conditioning sets, were prohibitive, ranging up to a week on dense networks on a 2 GHz machine. Figure 3 essentially shows that the difference of accuracy between FCI and MBCS* is not significant in either way. On each learning problem, the returned PAGs have been checked for correctness with respect to the maximally oriented PAG go theoretically obtainable (as returned by the first series of experiments). The discrepancies were classified either as edge errors (when an arc was missing or extraneous in the returned PAG W.r.t. go), or orientation errors (when a predicted arc in the returned PAG was indeed present in go, but had a reversed direction or different end points). On aIlS learning problems, both edge and orientation errors are similar within the margin indicated by the standarddeviation error bars. Note that the overall relatively high error rate comes from the failure of statistical tests with limited sample size. This indicates that structure learning is a hard problem and that low-sample-size situations where tests typically fail must be investigated further. 6 Conclusion With the formalism of MAGs and PAGs, it is possible to learn an independence-equivalence class of projections of latent structures. We have shown an algorithm, MBCS*, which is much more efficient than the reference FCI algorithms on networks that are sufficiently sparse, making up to three orders of magnitude fewer conditional-independence tests to retrieve the same structure. We have experimental evidence that structural accuracy of MBCS* is as good as that of FCI. MBCS* is based on a first phase that identifies the Markov blanket of the underlying MAG, and then makes local adjustments to remove the spurious links and identify all colliders. The last step involving orientation rules is the same as for FCI. The reduced practical complexity makes MBCS* solve in minutes problems that FCI would need several days to solve. In that sense, MBCS* makes a whole new range of problems computationally tractable. References X. Boyen, N. Friedman, and D. Koller. Discovering the hidden structure of complex dynamic systems. In Proceedings of the 15th Conference on Uncertainty in Artijicial1ntelligence, 1999. G. Elidan and N. Friedman. Learning the dimensionality of hidden variables. In Proceedings of the 17th Conference in Uncertainty in Artijicial1ntelligence, pages 144-151, 2001. G. Elidan, N. Lotner, N. Friedman, and D. Koller. Discovering hidden variables: A structure-based approach. In Proceedings of the 13th Conference on Advances in Neural Information Processing Systems, 2001. D. Margaritis and S. Thrun. Bayesian network induction via local neighborhoods. In Advances in Neural Information Processing Systems 12, 1999. 1. Pearl. Causality: Models, Reasoning, and Inference. Cambridge University Press, 2000. 1. Pearl. Probabilistic Reasoning in Intelligent Systems: Networks of Plausible Inference. Morgan Kaufmann, Los Altos, 1988. 1. Pearl and T. Verma. A theory of inferred causation. In Proc. of the Second Int. Con! on Principles of Knowledge Representation and Reasoning. Morgan Kaufmann, 1991. J.-P. Pellet and A. Elisseeff. Using Markov blankets for causal structure learning. Journal of Machine Learning Research, 9: 1295-1342, 2008. R. Scheines. An introduction to causal inference. In V. McKim and S. Turner, editors, Causality in Crisis?, pages 185- 200. Univ. of Notre Dame Press, 1997. R. Scheines, P. Spirtes, C. Glymour, C. Meek, and T. Richardson. The TETRAD project: Constraint based aids to causal model specification. Technical report, Carnegie Mellon University, Dpt. of Philosophy, 1995. R. Silva, R. Scheines, C. Glymour, and P. Spirtes. Learning the structure of linear latent variable models. Journal of Machine Learning Research, 7: 191-246,2006. P. Spirtes, C. Meek, and T. Richardson. Causal inference in the presence of latent variables and selection bias. In Philippe Besnard and Steve Hanks, editors, Proceedings of the 11th Conference on Uncertainty in ArtijicialIntelligence, pages 491--498, San Mateo, CA, 1995. Morgan Kaufmann. P. Spirtes, T. Richardson, and C. Meek. Heuristic greedy search algorithms for latent variable models. In Proceedings of the 6th International Workshop on Artijiciallntelligence and Statistics, 1996. P. Spirtes, C. Glymour, and R. Scheines. Causation, Prediction, and Search, Second Edition. The MIT Press, 200 I. ISBN 0262194406. T. Verma. Graphical aspects of causal models. Technical Report R-191, Cognitive Systems Laboratory, UCLA, 1993.
2008
214
3,470
Goal-directed decision making in prefrontal cortex: A computational framework Matthew Botvinick James An Princeton Neuroscience Institute and Computer Science Department Department of Psychology, Princeton University Princeton University Princeton, NJ 08540 Princeton, NJ 08540 matthewb@princeton.edu an@princeton.edu Abstract Research in animal learning and behavioral neuroscience has distinguished between two forms of action control: a habit-based form, which relies on stored action values, and a goal-directed form, which forecasts and compares action outcomes based on a model of the environment. While habit-based control has been the subject of extensive computational research, the computational principles underlying goal-directed control in animals have so far received less attention. In the present paper, we advance a computational framework for goal-directed control in animals and humans. We take three empirically motivated points as founding premises: (1) Neurons in dorsolateral prefrontal cortex represent action policies, (2) Neurons in orbitofrontal cortex represent rewards, and (3) Neural computation, across domains, can be appropriately understood as performing structured probabilistic inference. On a purely computational level, the resulting account relates closely to previous work using Bayesian inference to solve Markov decision problems, but extends this work by introducing a new algorithm, which provably converges on optimal plans. On a cognitive and neuroscientific level, the theory provides a unifying framework for several different forms of goal-directed action selection, placing emphasis on a novel form, within which orbitofrontal reward representations directly drive policy selection. 1 Goal-directed action control In the study of human and animal behavior, it is a long-standing idea that reward-based decision making may rely on two qualitatively different mechanisms. In habit-based decision making, stimuli elicit reflex-like responses, shaped by past reinforcement [1]. In goal-directed or purposive decision making, on the other hand, actions are selected based on a prospective consideration of possible outcomes and future lines of action [2]. Over the past twenty years or so, the attention of cognitive neuroscientists and computationally minded psychologists has tended to focus on habit-based control, due in large part to interest in potential links between dopaminergic function and temporal-difference algorithms for reinforcement learning. However, a resurgence of interest in purposive action selection is now being driven by innovations in animal behavior research, which have yielded powerful new behavioral assays [3], and revealed specific effects of focal neural damage on goaldirected behavior [4]. In discussing some of the relevant data, Daw, Niv and Dayan [5] recently pointed out the close relationship between purposive decision making, as understood in the behavioral sciences, and model-based methods for the solution of Markov decision problems (MDPs), where action policies are derived from a joint analysis of a transition function (a mapping from states and actions to outcomes) and a reward function (a mapping from states to rewards). Beyond this important insight, little work has yet been done to characterize the computations underlying goal-directed action selection (though see [6, 7]). As discussed below, a great deal of evidence indicates that purposive action selection depends critically on a particular region of the brain, the prefrontal cortex. However, it is currently a critical, and quite open, question what the relevant computations within this part of the brain might be. Of course, the basic computational problem of formulating an optimal policy given a model of an MDP has been extensively studied, and there is no shortage of algorithms one might consider as potentially relevant to prefrontal function (e.g., value iteration, policy iteration, backward induction, linear programming, and others). However, from a cognitive and neuroscientific perspective, there is one approach to solving MDPs that it seems particularly appealing to consider. In particular, several researchers have suggested methods for solving MDPs through probabilistic inference [8-12]. The interest of this idea, in the present context, derives from a recent movement toward framing human and animal information processing, as well as the underlying neural computations, in terms of structured probabilistic inference [13, 14]. Given this perspective, it is inviting to consider whether goal-directed action selection, and the neural mechanisms that underlie it, might be understood in those same terms. One challenge in investigating this possibility is that previous research furnishes no ‘off-theshelf’ algorithm for solving MDPs through probabilistic inference that both provably yields optimal policies and aligns with what is known about action selection in the brain. We endeavor here to start filling in that gap. In the following section, we introduce an account of how goal-directed action selection can be performed based on probabilisitic inference, within a network whose components map grossly onto specific brain structures. As part of this account, we introduce a new algorithm for solving MDPs through Bayesian inference, along with a convergence proof. We then present results from a set of simulations illustrating how the framework would account for a variety of behavioral phenomena that are thought to involve purposive action selection. 2 Computational model As noted earlier, the prefrontal cortex (PFC) is believed to play a pivotal role in purposive behavior. This is indicated by a broad association between prefrontal lesions and impairments in goal-directed action in both humans (see [15]) and animals [4]. Single-unit recording and other data suggest that different sectors of PFC make distinct contributions. In particular, neurons in dorsolateral prefrontal cortex (DLPFC) appear to encode taskspecific mappings from stimuli to responses (e.g., [16]): “task representations,” in the language of psychology, or “policies” in the language of dynamic programming. Although there is some understanding of how policy representations in DLPFC may guide action execution [15], little is yet known about how these representations are themselves selected. Our most basic proposal is that DLPFC policy representations are selected in a prospective, model-based fashion, leveraging information about action-outcome contingencies (i.e., the transition function) and about the incentive value associated with specific outcomes or states (the reward function). There is extensive evidence to suggest that state-reward associations are represented in another area of the PFC, the orbitofrontal cortex (OFC) [17, 18]. As for the transition function, although it is clear that the brain contains detailed representations of action-outcome associations [19], their anatomical localization is not yet entirely clear. However, some evidence suggests that the enviromental effects of simple actions may be represented in inferior fronto-parietal cortex [20], and there is also evidence suggesting that medial temporal structures may be important in forecasting action outcomes [21]. As detailed in the next section, our model assumes that policy representations in DLPFC, reward representations in OFC, and representations of states and actions in other brain regions, are coordinated within a network structure that represents their causal or statistical interdependencies, and that policy selection occurs, within this network, through a process of probabilistic inference. 2.1 Architecture The implementation takes the form of a directed graphical model [22], with the layout shown in Figure 1. Each node represents a discrete random variable. State variables (s), Fig 1. Left: Single-step decision. Right: Sequential decision. Each time-slice includes a set of m policy nodes. representing the set of m possible world states, serve the role played by parietal and medial temporal cortices in representing action outcomes. Action variables (a) representing the set of available actions, play the role of high-level cortical motor areas involved in the programming of action sequences. Policy variables (), each repre-senting the set of all deterministic policies associated with a specific state, capture the representational role of DLPFC. Local and global utility variables, described further below, capture the role of OFC in representing incentive value. A separate set of nodes is included for each discrete time-step up to the planning horizon. The conditional probabilities associated with each variable are represented in tabular form. State probabilities are based on the state and action variables in the preceding time-step, and thus encode the transition function. Action probabilities depend on the current state and its associated policy variable. Utilities depend only on the current state. Rather than representing reward magnitude as a continuous variable, we adopt an approach introduced by [23], representing reward through the posterior probability of a binary variable (u). States associated with large positive reward raise p(u) (i.e, p(u=1|s)) near to one; states associated with large negative rewards reduce p(u) to near zero. In the simulations reported below, we used a simple linear transformation to map from scalar reward values to p(u): p u si ( ) = 1 2 R si ( ) rmax +1      , rmax  max j R s j ( ) (1) In situations involving sequential actions, expected returns from different time-steps must be integrated into a global representation of expected value. In order to accomplish this, we employ a technique proposed by [8], introducing a “global” utility variable (uG). Like u, this is a binary random variable, but associated with a posterior probability determined as: 1 p uG ( ) = 1 N p(ui) i (2) where N is the number of u nodes. The network as whole embodies a generative model for instrumental action. The basic idea is to use this model as a substrate for probabilistic inference, in order to arrive at optimal policies. There are three general methods for accomplishing this, which correspond three forms of query. First, a desired outcome state can be identified, by treating one of the state variables (as well as the initial state variable) as observed (see [9] for an application of this approach). Second, the expected return for specific plans can be evaluated and compared by conditioning on specific sets of values over the policy nodes (see [5, 21]). However, our focus here is on a less obvious possibility, which is to condition directly on the utility variable uG , as explained next. 2.2 Policy selection by probabilistic inference: an iterative algorithm Cooper [23] introduced the idea of inferring optimal decisions in influence diagrams by treating utility nodes into binary random variables and then conditioning on these variables. Although this technique has been adopted in some more recent work [9, 12], we are aware of no application that guarantees optimal decisions, in the expected-reward sense, in multi-step tasks. We introduce here a simple algorithm that does furnish such a guarantee. The procedure is as follows: (1) Initialize the policy nodes with any set of non-deterministic priors. (2) Treating the initial state and uG as observed variables (uG = 1), 2 use standard belief 1 Note that temporal discounting can be incorporated into the framework through minimal modifications to Equation 2. 2 In the single-action situation, where there is only one u node, it is this variable that is treated as observed (u = 1). propagation (or a comparable algorithm) to infer the posterior distributions over all policy nodes. (3) Set the prior distributions over the policy nodes to the values (posteriors) obtained in step 2. (4) Go to step 2. The next two sections present proofs of monotonicity and convergence for this algorithm. 2.2.1 Monotonicity We show first that, at each policy node, the probability associated with the optimal policy will rise on every iteration. Define * as follows: p uG  *, + ( ) > p uG   , + ( ),     * (3) where + is the current set of probability distributions at all policy nodes on subsequent time-steps. (Note that we assume here, for simplicity, that there is a unique optimal policy.) The objective is to establish that: p t * ( ) > p t1 * ( ) (4) where t indexes processing iterations. The dynamics of the network entail that p t ( ) = p t1 uG ( ) (5) where  represents any value (i.e., policy) of the decision node being considered. Substituting this into (4) gives p t1 * uG ( ) > p t1 * ( ) (6) From this point on the focus is on a single iteration, which permits us to omit the relevant subscripts. Applying Bayes’ law to (6) yields p uG  * ( ) p  * ( ) p uG  ( )  p ( ) > p  * ( ) (7) Canceling, and bringing the denominator up, this becomes p uG  * ( ) > p uG  ( ) p ( )  (8) Rewriting the left hand side, we obtain p uG  * ( ) p ( )  > p uG  ( ) p ( )  (9) Subtracting and further rearranging: p uG  * ( )  p uG  ( )  p  ( )  > 0 (10) p uG  * ( )  p uG  * ( )   p  * ( ) + p uG  * ( )  p uG   ( )   p   ( )   *  > 0 (11) p uG  * ( ) p uG   ( )   p   ( )   *  > 0 (12) Note that this last inequality (12) follows from the definition of *. Remark: Of course, the identity of * depends on +. In particular, the policy * will only be part of a globally optimal plan if the set of choices + is optimal. Fortunately, this requirement is guaranteed to be met, as long as no upper bound is placed on the number of processing cycles. Recalling that we are considering only finite-horizon problems, note that for policies leading to states with no successors, + is empty. Thus * at the relevant policy nodes is fixed, and is guaranteed to be part of the optimal policy. The proof above shows that * will continuously rise. Once it reaches a maximum, * at immediately preceding decisions will perforce fit with the globally optimal policy. The process works backward, in the fashion of backward induction. 2.2.2 Convergence Continuing with the same notation, we show now that limt pt  * uG ( ) =1 (13) Note that, if we apply Bayes’ law recursively, pt   uG ( ) = p uG   ( ) pt   ( ) pi uG ( ) = p uG   ( ) 2 pt1   ( ) pi uG ( ) pt1 uG ( ) = p uG   ( ) 3 pt2   ( ) pt uG ( ) pt1 uG ( ) pt2 uG ( ) … (14) Thus, p1   uG ( ) = p uG   ( ) p1   ( ) p1 uG ( ) , p2   uG ( ) = p uG   ( ) 2 p1   ( ) p2 uG ( ) p1 uG ( ) , p3   uG ( ) = p uG   ( ) 3 p1   ( ) p3 uG ( ) p2 uG ( ) p1 uG ( ) , (15) and so forth. Thus, what we wish to prove is p uG  * ( )  p1  * ( ) pt uG ( ) t=1   =1 (16) or, rearranging, pt uG ( ) p uG   ( ) t=1   = p1   ( ). (17) Note that, given the stipulated relationship between p() on each processing iteration and p( | uG) on the previous iteration, pt uG ( ) = p uG  ( )  pt ( ) = p uG  ( )  pt1  uG ( ) = p uG  ( ) 2  pt 1 ( ) pt 1 uG ( ) = p uG  ( ) 3  pt1 ( ) pt 1 uG ( ) pt2 uG ( ) = p uG  ( ) 4  pt1 ( ) pt1 uG ( ) pt 2 uG ( ) pt 3 uG ( ) … (18) With this in mind, we can rewrite the left hand side product in (17) as follows: p1 uG ( ) p uG   ( )  p uG  ( ) 2  p1 ( ) p uG   ( ) p1 uG ( )  p uG  ( ) 3  p1 ( ) p uG   ( ) p1 uG ( ) p2 uG ( )  p uG  ( ) 4  p1 ( ) p uG   ( ) p1 uG ( ) p2 uG ( ) p3 uG ( ) … (19) Note that, given (18), the numerator in each factor of (19) cancels with the denominator in the subsequent factor, leaving only p(uG|*) in that denominator. The expression can thus be rewritten as 1 p uG   ( )  1 p uG   ( )  1 p uG   ( )  p uG  ( ) 4  p1 ( ) p uG   ( ) … = p uG  ( )  p uG   ( )  p1 ( )  . (20) The objective is then to show that the above equals p(*). It proceeds directly from the definition of * that, for all  other than *, p uG  ( ) p uG   ( ) <1 (21) Thus, all but one of the terms in the sum above approach zero, and the remaining term equals p1(*). Thus, p uG  ( )  p uG   ( )   p1  ( ) = p1   ( ) (22) 3 Simulations 3.1 Binary choice We begin with a simulation of a simple incentive choice situation. Here, an animal faces two levers. Pressing the left lever reliably yields a preferred food (r = 2), the right a less preferred food (r = 1). Representing these contingencies in a network structured as in Fig. 1 (left) and employing the iterative algorithm described in section 2.2 yields the results in Figure 2A. Shown here are the posterior probabilities for the policies press left and press right, along with the marginal value of p(u = 1) under these posteriors (labeled EV for expected value). The dashed horizontal line indicates the expected value for the optimal plan, to which the model obviously converges. A key empirical assay for purposive behavior involves outcome devaluation. Here, actions yielding a previously valued outcome are abandoned after the incentive value of the outcome is reduced, for example by pairing with an aversive event (e.g., [4]). To simulate this within the binary choice scenario just described, we reduced to zero the reward value of the food yielded by the left lever (fL), by making the appropriate change to p(u|fL). This yielded a reversal in lever choice (Fig. 2B). Another signature of purposive actions is that they are abandoned when their causal connection with rewarding outcomes is removed (contingency degradation, see [4]). We simulated this by starting with the model from Fig. 2A and changing conditional probabilities at s for t=2 to reflect a decoupling of the left action from the fL outcome. The resulting behavior is shown in Fig. 2C. Fig 2. Simulation results, binary choice. 3.2 Stochastic outcomes A critical aspect of the present modeling paradigm is that it yields reward-maximizing choices in stochastic domains, a property that distinguishes it from some other recent approaches using graphical models to do planning (e.g., [9]). To illustrate, we used the architecture in Figure 1 (left) to simulate a choice between two fair coins. A ‘left’ coin yields $1 for heads, $0 for tails; a ‘right’ coin $2 for heads but for tails a $3 loss. As illustrated in Fig. 2D, the model maximizes expected value by opting for the left coin. Fig 3. Simulation results, two-step sequential choice. 3.3 Sequential decision Here, we adopt the two-step T-maze scenario used by [24] (Fig. 3A). Representing the task contingencies in a graphical model based on the template from Fig 1 (right), and using the reward values indicated in Fig. 3A, yields the choice behavior shown in Figure 3B. Following [24], a shift in motivational state from hunger to thirst can be represented in the graphical model by changing the reward function (R(cheese) = 2, R(X) = 0, R(water) = 4, R(carrots) = 1). Imposing this change at the level of the u variables yields the choice behavior shown in Fig. 3C. The model can also be used to simulate effort-based decision. Starting with the scenario in Fig. 2A, we simulated the insertion of an effort-demanding scalable barrier at S2 (R(S2) = -2) by making appropriate changes p(u|s). The resulting behavior is shown in Fig. 3D. A famous empirical demonstration of purposive control involves detour behavior. Using a maze like the one shown in Fig. 4A, with a food reward placed at s5, Tolman [2] found that rats reacted to a barrier at location A by taking the upper route, but to a barrier at B by taking the longer lower route. We simulated this experiment by representing the corresponding transition and reward functions in a graphical model of the form shown in Fig. 1 (right), 3 representing the insertion of barriers by appropriate changes to the transition function. The resulting choice behavior at the critical juncture s2 is shown in Fig. 4. Fig 4. Simulation results, detour behavior. B: No barrier. C: Barrier at A. D: Barrier at B. Another classic empirical demonstration involves latent learning. Blodgett [25] allowed rats to explore the maze shown in Fig. 5. Later insertion of a food reward at s13 was followed immediately by dramatic reductions in the running time, reflecting a reduction in entries into blind alleys. We simulated this effect in a model based on the template in Fig. 1 (right), representing the maze layout via an appropriate transition function. In the absence of a reward at s12, random choices occurred at each intersection. However, setting R(s13) = 1 resulted in the set of choices indicated by the heavier arrows in Fig. 5. 4 Relation to previous work Initial proposals for how to solve decision problems through probabilistic inference in graphical models, including the idea of encoding reward as the posterior probability of a random utility variable, were put forth by Cooper [23]. Related ideas were presented by Shachter and Peot [12], including the use of nodes that integrate information from multiple utility nodes. More recently, Attias [11] and Verma and Rao [9] have used graphical models to solve shortest-path problems, leveraging probabilistic representations of rewards, though not in a way that guaranteed convergence on optimal (reward maximizing) plans. More closely related to the present research is work by Toussaint and Storkey [10], employing the EM algorithm. The iterative approach we have introduced here has a certain resemblance to the EM procedure, which becomes evident if one views the policy variables in our models as parameters on the mapping from states to actions. It seems possible that there may be a formal equivalence between the algorithm we have proposed and the one reported by [10]. As a cognitive and neuroscientific proposal, the present work bears a close relation to recent work by Hasselmo [6], addressing the prefrontal computations underlying goal-directed action selection (see also [7]). The present efforts are tied more closely to normative principles of decision-making, whereas the work in [6] is tied more closely to the details of neural circuitry. In this respect, the two approaches may prove complementary, and it will be interesting to further consider their interrelations. 3 In this simulation and the next, the set of states associated with each state node was limited to the set of reachable states for the relevant time-step, assuming an initial state of s1. Fig 5. Latent learning. Acknowledgments Thanks to Andrew Ledvina, David Blei, Yael Niv, Nathaniel Daw, and Francisco Pereira for useful comments. References [1] Hull, C.L., Principles of Behavior. 1943, New York: Appleton-Century. [2] Tolman, E.C., Purposive Behavior in Animals and Men. 1932, New York: Century. [3] Dickinson, A., Actions and habits: the development of behavioral autonomy. Philosophical Transactions of the Royal Society (London), Series B, 1985. 308: p. 67-78. [4] Balleine, B.W. and A. Dickinson, Goal-directed instrumental action: contingency and incentive learning and their cortical substrates. Neuropharmacology, 1998. 37: p. 407-419. [5] Daw, N.D., Y. Niv, and P. Dayan, Uncertainty-based competition between prefrontal and striatal systems for behavioral control. Nature Neuroscience, 2005. 8: p. 1704-1711. [6] Hasselmo, M.E., A model of prefrontal cortical mechanisms for goal-directed behavior. Journal of Cognitive Neuroscience, 2005. 17: p. 1115-1129. [7] Schmajuk, N.A. and A.D. Thieme, Purposive behavior and cognitive mapping. A neural network model. Biological Cybernetics, 1992. 67: p. 165-174. [8] Tatman, J.A. and R.D. Shachter, Dynamic programming and influence diagrams. IEEE Transactions on Systems, Man and Cybernetics, 1990. 20: p. 365-379. [9] Verma, D. and R.P.N. Rao. Planning and acting in uncertain enviroments using probabilistic inference. in IEEE/RSJ International Conference on Intelligent Robots and Systems. 2006. [10] Toussaint, M. and A. Storkey. Probabilistic inference for solving discrete and continuous state markov decision processes. in Proceedings of the 23rd International Conference on Machine Learning. 2006. Pittsburgh, PA. [11] Attias, H. Planning by probabilistic inference. in Proceedings of the 9th Int. Workshop on Artificial Intelligence and Statistics. 2003. [12] Shachter, R.D. and M.A. Peot. Decision making using probabilistic inference methods. in Uncertainty in artificial intelligence: Proceedings of the Eighth Conference (1992). 1992. Stanford University: M. Kaufmann. [13] Chater, N., J.B. Tenenbaum, and A. Yuille, Probabilistic models of cognition: conceptual foundations. Trends in Cognitive Sciences, 2006. 10(7): p. 287-291. [14] Doya, K., et al., eds. The Bayesian Brain: Probabilistic Approaches to Neural Coding. 2006, MIT Press: Cambridge, MA. [15] Miller, E.K. and J.D. Cohen, An integrative theory of prefrontal cortex function. Annual Review of Neuroscience, 2001. 24: p. 167-202. [16] Asaad, W.F., G. Rainer, and E.K. Miller, Task-specific neural activity in the primate prefrontal cortex. Journal of Neurophysiology, 2000. 84: p. 451-459. [17] Rolls, E.T., The functions of the orbitofrontal cortex. Brain and Cognition, 2004. 55: p. 11-29. [18] Padoa-Schioppa, C. and J.A. Assad, Neurons in the orbitofrontal cortex encode economic value. Nature, 2006. 441: p. 223-226. [19] Gopnik, A., et al., A theory of causal learning in children: causal maps and Bayes nets. Psychological Review, 2004. 111: p. 1-31. [20] Hamilton, A.F.d.C. and S.T. Grafton, Action outcomes are represented in human inferior frontoparietal cortex. Cerebral Cortex, 2008. 18: p. 1160-1168. [21] Johnson, A., M.A.A. van der Meer, and D.A. Redish, Integrating hippocampus and striatum in decision-making. Current Opinion in Neurobiology, 2008. 17: p. 692-697. [22] Jensen, F.V., Bayesian Networks and Decision Graphs. 2001, New York: Springer Verlag. [23] Cooper, G.F. A method for using belief networks as influence diagrams. in Fourth Workshop on Uncertainty in Artificial Intelligence. 1988. University of Minnesota, Minneapolis. [24] Niv, Y., D. Joel, and P. Dayan, A normative perspective on motivation. Trends in Cognitive Sciences, 2006. 10: p. 375-381. [25] Blodgett, H.C., The effect of the introduction of reward upon the maze performance of rats. University of California Publications in Psychology, 1929. 4: p. 113-134.
2008
215
3,471
Localized Sliced Inverse Regression Qiang Wu, Sayan Mukherjee Department of Statistical Science Institute for Genome Sciences & Policy Department of Computer Science Duke University, Durham NC 27708-0251, U.S.A {qiang, sayan}@stat.duke.edu Feng Liang Department of Statistics University of Illinois at Urbana-Champaign IL 61820, U.S.A. liangf@uiuc.edu Abstract We developed localized sliced inverse regression for supervised dimension reduction. It has the advantages of preventing degeneracy, increasing estimation accuracy, and automatic subclass discovery in classification problems. A semisupervised version is proposed for the use of unlabeled data. The utility is illustrated on simulated as well as real data sets. 1 Introduction The importance of dimension reduction for predictive modeling and visualization has a long and central role in statistical graphics and computation In the modern context of high-dimensional data analysis this perspective posits that the functional dependence between a response variable y and a large set of explanatory variables x ∈Rp is driven by a low dimensional subspace of the p variables. Characterizing this predictive subspace, supervised dimension reduction, requires both the response and explanatory variables. This problem in the context of linear subspaces or Euclidean geometry has been explored by a variety of statistical models such as sliced inverse regression (SIR, [10]), sliced average variance estimation (SAVE, [3]), principal Hessian directions (pHd, [11]), (conditional) minimum average variance estimation (MAVE, [18]), and extensions to these approaches. To extract nonlinear subspaces, one can apply the aforementioned linear algorithms to the data mapped into a feature space induced by a kernel function [13, 6, 17]. In machine learning community research on nonlinear dimension reduction in the spirit of [19] has been developed of late. This has led to a variety of manifold learning algorithms such as isometric mapping (ISOMAP, [16]), local linear embedding (LLE, [14]), Hessian Eigenmaps [5], and Laplacian Eigenmaps [1]. Two key differences exist between the paradigm explored in this approach and that of supervised dimension reduction. The first difference is that the above methods are unsupervised in that the algorithms take into account only the explanatory variables. This issue can be addressed by extending the unsupervised algorithms to use the label or response data [7]. The bigger problem is that these manifold learning algorithms do not operate on the space of the explanatory variables and hence do not provide a predictive submanifold onto which the data should be projected. These methods are based on embedding the observed data onto a graph and then using spectral properties of the embedded graph for dimension reduction. The key observation in all of these manifold algorithms is that metrics must be local and properties that hold in an ambient Euclidean space are true locally on smooth manifolds. This suggests that the use of local information in supervised dimension reduction methods may be of use to extend methods for dimension reduction to the setting of nonlinear subspaces and submanifolds of the ambient space. In the context of mixture modeling for classification two approaches have been developed [9, 15]. 1 In this paper we extend SIR by taking into account the local structure of the explanatory variables. This localized variant of SIR, LSIR, can be used for classification as well as regression applications. Though the predictive directions obtained by LSIR are linear ones, they coded nonlinear information. Another advantage of our approach is that ancillary unlabeled data can be easily added to the dimension reduction analysis – semi-supervised learning. The paper is arranged as follows. LSIR is introduced in Section 2 for continuous and categorical response variables. Extensions are discussed in Section 3. The utility with respect to predictive accuracy as well as exploratory data analysis via visualization is demonstrated on a variety of simulated and real data in Sections 4 and 5. We close with discussions in Section 6. 2 Localized SIR We start with a brief review of SIR method and remark that the failure of SIR in some situations is caused by ignoring local structures. Then we propose a generalization of SIR, called localized SIR, by incorporating some localization idea from manifold learning. Connection to some existing work is addressed at the end. 2.1 Sliced inverse regression Assume the functional dependence between a response variable Y and an explanatory variable X ∈ Rp is given by Y = f(βt 1X, . . . , βt LX, ǫ), (1) where βl’s are unknown orthogonal vectors in Rp and ǫ is noise independent of X. Let B denote the L-dimensional subspace spanned by βl’s. Then PBX, where PB denotes the projection operator onto space B, provides a sufficient summary of the information in X relevant to Y . Estimating B or βl’s becomes the central problem in supervised dimension reduction. Though we define B here via a heuristic model assumption (1), a general definition based on conditional independence between Y and X given PBX can be found in [4]. Following [4], we refer to B as the dimension reduction (d.r.) subspace and βl’s the d.r. directions. Slice inverse regression (SIR) model is introduced [10] to estimate the d.r. directions. The idea underlying this approach is that, if X has an identity covariance matrix, the centered inverse regression curve E(X|Y ) −EX is contained in the d.r. space B under some design conditions; see [10] for details. According to this result the d.r. directions βl’s are given by the top eigenvectors of the covariance matrix Γ = Cov(E(X|Y )). In general when the covariance matrix of X is Σ, the βl’s can be obtained by solving a generalized eigen decomposition problem Γβ = λΣβ. A simple SIR algorithm operates as the following on a set of samples {(xi, yi)}n i=1: 1. Compute an empirical estimate of Σ, ˆΣ = 1 n n X i=1 (xi −m)(xi −m)T where m = 1 n Pn i=1 xi is the sample mean. 2. Divide the samples into H groups (or slices) G1, . . . , GH according to the value of y. Compute an empirical estimate of Γ, ˆΓ = H X i=1 nh n (mh −m)(mh −m)T where mh = 1 nh P j∈Gh xj is the sample mean for group Gh with nh being the group size. 3. Estimate the d.r. directions β by solving a generalized eigen problem ˆΓβ = λˆΣβ. (2) 2 When Y takes categorical values as in classification problems, it is natural to divide the data into different groups by their group labels. Then SIR is equivalent to Fisher discriminant analysis (FDA).1 Though SIR has been widely used for dimension reduction and yielded many useful results in practice, it has some known problems. For example, it is easy to construct a function f such that E(X|Y = y) = 0 then SIR fails to retrieve any useful directions [3]. The degeneracy of SIR has also restricted its use in binary classification problems where only one direction can be obtained. The failure of SIR in these scenario is partly because the algorithm uses just the mean, E(X|Y = y), as a summary of the information in each slice, which apparently is not enough. Generalizations of SIR include SAVE [3], SIR-II [12] and covariance inverse regression estimation (CIRE, [2]) that exploit the information from the second moment of the conditional distribution of X|Y . However in some scenario the information in each slice can not be well described by a global statistics. For example, similar to the multimodal situation considered by [15], the data in a slice may form two clusters, then a good description of the data would not be a single number such as any moments, but the two cluster centers. Next we will propose a new algorithm that is a generalization of SIR based on local structures of X in each slice. 2.2 Localization A key principle in manifold learning is that the Euclidean representation of a data point in Rp is only meaningful locally. Under this principle, it is dangerous to calculate the slice average mh, whenever the slice contains data that are far away. Instead some kind of local averages should be considered. Motivated by this idea we introduce a localized SIR (LSIR) method for dimension reduction. Here is the intuition for LSIR. Let us start with the transformed data set where the empirical covariance is identity, for example, the data set after PCA. In the original SIR method, we shift every data point xi to the corresponding group average, then apply PCA on the new data set to identify SIR directions. The underline rational for this approach is that if a direction does not differentiate different groups well, the group means projected to that direction would be very close, therefore the variance of the new data set will be small at that direction. A natural way to incorporate localization idea into this approach is to shift each data point xi to the average of a local neighborhood instead of the average of its global neighborhood(i.e., the whole group). In manifolds learning, local neighborhood is often chosen by k nearest neighborhood (k-NN). Different from manifolds learning that is designed for unsupervised learning, the neighborhood selection for LSIR that is designed for supervised learning will also incorporate information from the response variable y. Here is the mathematical description of LSIR. Recall that the group average mh is used in estimating Γ = Cov(E(X|Y )). The estimate ˆΓ is equivalent to the sample covariance of a data set {mi}n i=1 where mi = mh, average of the group Gh to which xi belongs. In our LSIR algorithm, we set mi equal to some local average, and then use the corresponding sample covariance matrix to replace ˆΓ in equation (2). Below we give the details of our LSIR algorithm: 1. Compute ˆΣ as in SIR. 2. Divide the samples into H groups as in SIR. For each sample (xi, yi) we compute mi,loc = 1 k X j∈si xj, where, with h being the group so that i ∈Gh, si = {j : xj belongs to the k nearest neighbors of xi in Gh} . Then we compute a localized version of Γ by ˆΓloc = 1 n n X i=1 (mi,loc −m)(mi,loc −m)T . 3. Solve the generalized eigen decomposition problem ˆΓlocβ = λˆΣβ. (3) 1FDA is referred to as linear discriminant analysis (LDA) in some literatures. 3 The neighborhood size k in LSIR is a tuning parameter specified by users. When k is large enough, say, larger than the size of any group, then ˆΓloc is the same as ˆΓ and LSIR recovers all SIR directions. With a moderate choice of k, LSIR uses the local information within each slice and is expected to retrieve directions lost by SIR in case of SIR fails due to degeneracy. For classification problems LSIR becomes a localized version of FDA. Suppose the number of classes is C, then the estimate ˆΓ from the original FDA is of rank at most C −1, which means FDA can only estimate at most C −1 directions. This is why FDA is seldom used for binary classification problems where C = 2. In LSIR we use more points to describe the data in each class. Mathematically this is reflected by the increase of the rank of ˆΓloc that is no longer bounded by C and hence produces more directions. Moreover, if for some classes the data is composed of several sub-clusters, LSIR can automatically identify these sub-cluster structures. As showed in one of our examples, this property of LSIR is very useful in data analysis such as cancer subtype discovery using genomic data. 2.3 Connection to Existing Work The idea of localization has been introduced to dimension reduction for classification problems before. For example, the local discriminant information (LDI) introduced by [9] is one of the early work in this area. In LDI, the local information is used to compute the between-group covariance matrix Γi over a nearest neighborhood at every data point xi and then estimate the d.r. directions by the top eigenvector of the averaged between-group matrix 1 n Pn i=1 Γi. The local Fisher discriminant analysis (LFDA) introduced by [15] can be regarded as an improvement of LDI with the within-class covariance matrix also being localized. Comparing to these two approaches, LSIR utilizes the local information directly at the point level. One advantage of this simple localization is computation. For example, for a problem of C classes, LDI needs to compute nC local mean points and n between-group covariance matrices, while LSIR computes only n local mean points and one covariance matrix. Another advantage is LSIR can be easily extended to handle unlabeled data in semi-supervised learning as explained in the next section. Such an extension is less straightforward for the other two approaches that operate on the covariance matrices instead of data points. 3 Extensions Regularization. When the matrix ˆΣ is singular or has a very large condition number, which is common in high-dimensional problems, the generalized eigen-decomposition problems (3) is unstable. Regularization techniques are often introduced to address this issue [20]. For LSIR we adopt the following regularization: ˆΓlocβ = λ(ˆΣ + s)β (4) where the regularization parameter s can be chosen by cross validation or other criteria (e.g. [20]). Semi-supervised learning. In semi-supervised learning some data have y’s (labeled data) and some do not (unlabeled data). How to incorporate the information from unlabeled data has been the main focus of research in semi-supervised learning. Our LSIR algorithm can be easily modified to take the unlabeled data into consideration. Since y of an unlabeled sample can take any possible values, we put the unlabeled data into every slice. So the neighborhood si is defined as the following: for any point in the k-NN of xi, it belongs to si if it is unlabeled, or if it is labeled and belongs to the same slice as xi. 4 Simulations In this section we apply LSIR to several synthetic data sets to illustrate the power of LSIR. The performance of LSIR is compared with other dimension reduction methods including SIR, SAVE, pHd, and LFDA. 4 Method SAVE pHd LSIR (k = 20) LSIR (k = 40) Accuracy 0.3451(±0.1970) 0.3454(±0.1970) 0.9534(±.0004) 0.9011(±.0008) Table 1: Estimation accuracy (and standard deviation) of various dimension reduction methods for semisupervised learning in Example 1. −2 −1 0 1 2 −2 −1 0 1 2 Dimension 1 Dimension 2 (a) −0.1 0 0.1 −0.1 0 0.1 Principal Component 1 Principal Component 2 (b) −2 −1 0 1 2 −2 −1 0 1 2 LSIR 1 LSIR 2 (c) −2 −1 0 1 2 −2 −1 0 1 2 semiLSIR 1 semiLSIR 2 (d) Figure 1: Result for Example 1. (a) Plot of data in the first two dimensions, where ‘+’ corresponds to y = 1 while ’o’ corresponds to y = −1. The data points in red and blue are labeled and the ones in green are unlabeled when the semisupervised setting is considered. (b) Projection of data to the first two PCA directions. (c) Projection of data to the first two LSIR directions when all the n = 400 data points are labeled. (d) Projection of the data to the first two LSIR directions when only 20 points as indicated in (a) are labeled. Let ˆB = (ˆβ1, · · · , ˆβL) denote an estimate of the d.r. subspace B where its columns ˆβl’s are the estimated d.r. directions. We introduce the following metric to measure the accuracy: Accuracy( ˆB, B) = 1 L L X i=1 ∥PB ˆβi∥2 = 1 L L X i=1 ∥(BBT )ˆβi∥2. In LSIR the influence of the parameter k, the size of local neighborhoods, is subtle. In our simulation study, we found it usually good enough to choose k between 10 to 20, except for the semisupervised setting (e.g. Example 1 below). But further study and a theoretical justification are necessary. Example 1. Consider a binary classification problem on R10 where the d.r. directions are the first two dimensions and the remaining eight dimensions are Gaussian noise. The data in the first two relevant dimensions are plotted in Figure 1(a) with sample size n = 400. For this example SIR cannot identify the two d.r. directions because the group averages of the two groups are roughly the same for the first two dimensions, due to the symmetry in the data. Using local average instead of group average, LSIR can find both directions, see Figure 1(c). But so do SAVE and pHd since the high-order moments also behave differently in the two groups. Next we create a data set for semi-supervised learning by randomly selecting 20 samples, 10 from each group, to be labeled and setting others to be unlabeled. The directions from PCA where one ignores the labels do not agree with the discriminant directions as shown in Figure 1(b). So to retrieve the relevant directions, the information from the labeled points has to be taken consideration. We evaluate the accuracy of LSIR (the semi-supervised version), SAVE and pHd where the latter two are operated on just the labeled set. We repeat this experiment 20 times and each time select a different random set to be labeled. The averaged accuracy is reported in Table 1. The result for one iteration is displayed in Figure 1 where the labeled points are indicated in (a) and the projection to the top two directions from LSIR (with k = 40) is in (d). All the results clearly indicate that LSIR out-performs the other two supervised dimension reduction methods. Example 2. We first generate a 10-dimensional data set where the first three dimensions are the Swiss roll data [14]: X1 = t cost, X2 = 21h, X3 = t sin t, where t = 3π 2 (1 + 2θ), θ ∼Uniform(0, 1) and h ∼Uniform([0, 1]). The remaining 7 dimensions are independent Gaussian noises. Then all dimensions are normalized to have unit variance. Consider the following function: Y = sin(5πθ) + h2 + ǫ, ǫ ∼N(0, 0.12). (5) 5 200 300 400 500 600 700 800 900 1000 0.4 0.5 0.6 0.7 0.8 0.9 1 sample size accuracy SIR LSIR SAVE PHD Figure 2: Estimation accuracy of various dimension methods for example 2. We randomly choose n samples as a training set and let n change from 200 to 1000 and compare the estimation accuracy for LSIR with SIR, SAVE and pHd. The result is showed in Figure 2. SAVE and pHd outperform SIR, but are still much worse comparing to LSIR. Note that Swiss roll (the first three dimensions) is a benchmark data set in manifolds learning, where the goal is to “unroll” the data into the intrinsic two dimensional space. Since LSIR is a linear dimension reduction method we do not expect LSIR to unroll the data, but expect to retrieve the dimensions relevant to the prediction of Y . Meanwhile, with the noise, manifolds learning algorithms will not unroll the data either since the dominant directions are now the noise dimensions. Example 3. (Tai Chi) The Tai Chi figure is well known in Asian culture where the concepts of Yin-Yang provide the intellectual framework for much of ancient Chinese scientific development. A 6-dimensional data set for this example is generated as follows: X1 and X2 are from the Tai Chi structure as shown in Figure 3(a) where the Yin and Yang regions are assigned class labels Y = −1 and Y = 1 respectively. X3, . . . , X6 are independent random noise generated by N(0, 1). The Tai Chi data set was first used as a dimension reduction example in [12, Chapter 14]. The correct d.r. subspace B is span(e1, e2). SIR, SAVE and pHd are all known to fail for this example. By taking the local structure into account, LSIR can easily retrieve the relevant directions. Following [12], we generate n = 1000 samples as the training data, then run LSIR with k = 10 and repeat 100 times. The average accuracy is 98.6% and the result from one run is shown in Figure 3. For comparison we also applied LFDA for this example. The average accuracy is 82% which is much better than SIR, SAVE and pHd but worse than LSIR. Figure 3: Result for Tai Chi example. (a) The training data in first two dimensions; (b) The training data projected onto the first two LSIR directions; (c) An independent test data projected onto the first two LSIR directions. 5 Applications In this section we apply our LSIR methods to two real data sets. 5.1 Digits recognition The MNIST data set (Y. LeCun, http://yann.lecun.com/exdb/mnist/)is a well known benchmark data set for classification learning. It contains 60, 000 images of handwritten digits as training data and 10, 000 images as test data. This data set is commonly believed to have strong nonlinear structures. 6 −5 0 5 10 x 10 4 −10 −5 0 5 x 10 4 Figure 4: Result for leukemia data by LSIR. Red points are ALL and blue ones are AML In our simulations, we randomly sampled 1000 images (100 samples for each digit) as training set. We apply LSIR and computed d = 20 e.d.r. directions. Then we project the training data and 10000 test data onto these directions. Using a k-nearest neighbor classifier with k = 5 to classify the test data, we report the classification error over 100 iterations in Table 2. Compared with SIR method, the classification accuracy are increased for almost all digits. The improvement for digits 2, 3, 5 is much significant. digits 0 1 2 3 4 5 6 7 8 9 average LSIR 0.0350 0.0098 0.1363 0.1055 0.1309 0.1175 0.0445 0.1106 0.1417 0.1061 0.0927 SIR 0.0487 0.0292 0.1921 0.1723 0.1327 0.2146 0.0816 0.1354 0.1981 0.1533 0.1358 Table 2: Classification error rate for digits classification by SIR and LSIR. 5.2 Gene expression data Cancer classification and discovery using gene expression data becomes an important technique in modern biology and medical science. In gene expression data number of genes is huge (usually up to thousands) and the samples is quite limited. As a typical large p small n problem, dimension reduction plays very essential role to understand the data structure and make inference. Leukemia classification. We consider leukemia classification in [8]. This data has 38 training samples and 34 test samples. The training sample has two classes, AML and ALL, and the class ALL has two subtypes. We apply SIR and LSIR to this data. The classification accuracy is similar by predicting the test data with 0 or 1 error. An interesting point is that LSIR automatically realizes subtype discovery while SIR cannot. By project the training data onto the first two directions (Figure 4), we immediately notice that the ALL has two subtypes. It turns out that the 6-samples cluster are T-cell ALL and the 19-samples cluster is B-cell ALL samples. Note that there are two samples (which are T-cell ALL) cannot be assigned to each subtype only by visualization. This means LSIR only provides useful subclass knowledge for future research but itself may not a perfect clustering method. 6 Discussion We developed LSIR method for dimension reduction by incorporating local information into the original SIR. It can prevent degeneracy, increase estimation accuracy, and automatically identify subcluster structures. Regularization technique is introduced for computational stability. A semisupervised version is developed for the use of unlabeled data. The utility is illustrated on synthetic as well as real data sets. Since LSIR involves only linear operations on the data points, it is straightforward to extend it to kernel models [17] via the so-called kernel trick. An extension of LSIR along this direction 7 can be helpful to realize nonlinear dimension reduction directions and to reduce the computational complexity in case of p ≫n. Further research on LSIR and its kernelized version includes their asymptotic properties such as consistency and statistically more rigorous approaches for the choice of k, the size of local neighborhoods, and L, the dimensionality of the reduced space. References [1] M. Belkin and P. Niyogi. Laplacian eigenmaps for dimensionality reduction and data representation. Neural Computation, 15(6):1373–1396, 2003. [2] R. Cook and L. Ni. Using intra-slice covariances for improved estimation of the central subspace in regression. Biometrika, 93(1):65–74, 2006. [3] R. Cook and S. Weisberg. Disussion of li (1991). J. Amer. Statist. Assoc., 86:328–332, 1991. [4] R. Cook and X. Yin. Dimension reduction and visualization in discriminant analysis (with discussion). Aust. N. Z. J. Stat., 43(2):147–199, 2001. [5] D. Donoho and C. Grimes. Hessian eigenmaps: new locally linear embedding techniques for highdimensional data. PNAS, 100:5591–5596, 2003. [6] K. Fukumizu, F. R. Bach, and M. I. Jordan. Kernel dimension reduction in regression. Annals of Statistics, to appear, 2008. [7] A. Globerson and S. Roweis. Metric learning by collapsing classes. In Y. Weiss, B. Sch¨olkopf, and J. Platt, editors, Advances in Neural Information Processing Systems 18, pages 451–458. MIT Press, Cambridge, MA, 2006. [8] T. Golub, D. Slonim, P. Tamayo, C. Huard, M. Gaasenbeek, J. Mesirov, H. Coller, M. Loh, J. Downing, M. Caligiuri, C. Bloomfield, and E. Lander. Molecular classification of cancer: class discovery and class prediction by gene expression monitoring. Science, 286:531–537, 1999. [9] T. Hastie and R. Tibshirani. Discrminant adaptive nearest neighbor classification. IEEE Transacations on Pattern Analysis and Machine Intelligence, 18(6):607–616, 1996. [10] K. Li. Sliced inverse regression for dimension reduction (with discussion). J. Amer. Statist. Assoc., 86:316–342, 1991. [11] K. C. Li. On principal hessian directions for data visulization and dimension reduction: another application of stein’s lemma. J. Amer. Statist. Assoc., 87:1025–1039, 1992. [12] K. C. Li. High dimensional data analysis via the sir/phd approach, 2000. [13] J. Nilsson, F. Sha, and M. I. Jordan. Regression on manifold using kernel dimension reduction. In Proc. of ICML 2007, 2007. [14] S. Roweis and L. Saul. Nonlinear dimensionality reduction by locally linear embedding. Science, 290:2323–2326, 2000. [15] M. Sugiyam. Dimension reduction of multimodal labeled data by local fisher discriminatn analysis. Journal of Machine Learning Research, 8:1027–1061, 2007. [16] J. Tenenbaum, V. de Silva, and J. Langford. A global geometric framework for nonlinear dimensionality reduction. Science, 290:2319–2323, 2000. [17] Q. Wu, F. Liang, and S. Mukherjee. Regularized sliced inverse regression for kernel models. Technical report, ISDS Discussion Paper, Duke University, 2007. [18] Y. Xia, H. Tong, W. Li, and L.-X. Zhu. An adaptive estimation of dimension reduction space. J. R. Statist. Soc. B, 64(3):363–410, 2002. [19] G. Young. Maximum likelihood estimation and factor analysis. Psychometrika, 6:49–53, 1941. [20] W. Zhong, P. Zeng, P. Ma, J. S. Liu, and Y. Zhu. RSIR: regularized sliced inverse regression for motif discovery. Bioinformatics, 21(22):4169–4175, 2005. 8
2008
216
3,472
Near-optimal Regret Bounds for Reinforcement Learning Peter Auer Thomas Jaksch Ronald Ortner University of Leoben, Franz-Josef-Strasse 18, 8700 Leoben, Austria {auer,tjaksch,rortner}@unileoben.ac.at Abstract For undiscounted reinforcement learning in Markov decision processes (MDPs) we consider the total regret of a learning algorithm with respect to an optimal policy. In order to describe the transition structure of an MDP we propose a new parameter: An MDP has diameter D if for any pair of states s, s′ there is a policy which moves from s to s′ in at most D steps (on average). We present a reinforcement learning algorithm with total regret ˜O(DS √ AT) after T steps for any unknown MDP with S states, A actions per state, and diameter D. This bound holds with high probability. We also present a corresponding lower bound of Ω( √ DSAT) on the total regret of any learning algorithm. 1 Introduction In a Markov decision process (MDP) M with finite state space S and finite action space A, a learner in state s ∈S needs to choose an action a ∈A. When executing action a in state s, the learner receives a random reward r with mean ¯r(s, a) according to some distribution on [0, 1]. Further, according to the transition probabilities p (s′|s, a), a random transition to a state s′ ∈S occurs. Reinforcement learning of MDPs is a standard model for learning with delayed feedback. In contrast to important other work on reinforcement learning — where the performance of the learned policy is considered (see e.g. [1, 2] and also the discussion and references given in the introduction of [3]) — we are interested in the performance of the learning algorithm during learning. For that, we compare the rewards collected by the algorithm during learning with the rewards of an optimal policy. In this paper we will consider undiscounted rewards. The accumulated reward of an algorithm A after T steps in an MDP M is defined as R(M, A, s, T) := PT t=1 rt, where s is the initial state and rt are the rewards received during the execution of algorithm A. The average reward ρ(M, A, s) := lim T →∞ 1 T E [R(M, A, s, T)] can be maximized by an appropriate stationary policy π : S →A which defines an optimal action for each state [4]. The difficulty of learning an MDP does not only depend on its size (given by the number of states and actions), but also on its transition structure. In order to measure this transition structure we propose a new parameter, the diameter D of an MDP. The diameter D is the time it takes to move from any state s to any other state s′, using an appropriate policy for this pair of states s and s′: Definition 1. Let T(s′|M, π, s) be the first (random) time step in which state s′ is reached when policy π is executed on MDP M with initial state s. Then the diameter of M is given by D(M) := max s,s′∈S min π:S→A E [T(s′|M, π, s)] . A finite diameter seems necessary for interesting bounds on the regret of any algorithm with respect to an optimal policy. When a learner explores suboptimal actions, this may take him into a “bad part” of the MDP from which it may take about D steps to reach again a “good part” of the MDP. Hence, the learner may suffer regret D for such exploration, and it is very plausible that the diameter appears in the regret bound. For MDPs with finite diameter (which usually are called communicating, see e.g. [4]) the optimal average reward ρ∗does not depend on the initial state (cf. [4], Section 8.3.3), and we set ρ∗(M) := ρ∗(M, s) := max π ρ(M, π, s). The optimal average reward is the natural benchmark for a learning algorithm A, and we define the total regret of A after T steps as1 ∆(M, A, s, T) := Tρ∗(M) −R(M, A, s, T). In the following, we present our reinforcement learning algorithm UCRL2 (a variant of the UCRL algorithm of [5]) which uses upper confidence bounds to choose an optimistic policy. We show that the total regret of UCRL2 after T steps is ˜O(D|S| p |A|T). A corresponding lower bound of Ω( p D|S||A|T) on the total regret of any learning algorithm is given as well. These results establish the diameter as an important parameter of an MDP. Further, the diameter seems to be more natural than other parameters that have been proposed for various PAC and regret bounds, such as the mixing time [3, 6] or the hitting time of an optimal policy [7] (cf. the discussion below). 1.1 Relation to previous Work We first compare our results to the PAC bounds for the well-known algorithms E3 of Kearns, Singh [3], and R-Max of Brafman, Tennenholtz [6] (see also Kakade [8]). These algorithms achieve ε-optimal average reward with probability 1−δ after time polynomial in 1 δ , 1 ε, |S|, |A|, and the mixing time T mix ε (see below). As the polynomial dependence on ε is of order 1/ε3, the PAC bounds translate into T 2/3 regret bounds at the best. Moreover, both algorithms need the ε-return mixing time T mix ε of an optimal policy π∗as input parameter. This parameter T mix ε is the number of steps until the average reward of π∗over these T mix ε steps is ε-close to the optimal average reward ρ∗. It is easy to construct MDPs of diameter D with T mix ε ≈D/ε. This additional dependency on ε further increases the exponent in the above mentioned regret bounds for E3 and R-max. Also, the exponents of the parameters |S| and |A| in the PAC bounds of [3] and [6] are substantially larger than in our bound. The MBIE algorithm of Strehl and Littman [9, 10] — similarly to our approach — applies confidence bounds to compute an optimistic policy. However, Strehl and Littman consider only a discounted reward setting, which seems to be less natural when dealing with regret. Their definition of regret measures the difference between the rewards2 of an optimal policy and the rewards of the learning algorithm along the trajectory taken by the learning algorithm. In contrast, we are interested in the regret of the learning algorithm in respect to the rewards of the optimal policy along the trajectory of the optimal policy. Tewari and Bartlett [7] propose a generalization of the index policies of Burnetas and Katehakis [11]. These index policies choose actions optimistically by using confidence bounds only for the estimates in the current state. The regret bounds for the index policies of [11] and the OLP algorithm of [7] are asymptotically logarithmic in T. However, unlike our bounds, these bounds depend on the gap between the “quality” of the best and the second best action, and these asymptotic bounds also hide an additive term which is exponential in the number of states. Actually, it is possible to prove a corresponding gap-dependent logarithmic bound for our UCRL2 algorithm as well (cf. Remark 4 below). This bound holds uniformly over time and under weaker assumptions: While [7] and [11] consider only ergodic MDPs in which any policy will reach every state after a sufficient number of steps, we make only the more natural assumption of a finite diameter. 1It can be shown that maxA E [R(M, A, s, T)] = Tρ∗(M) + O(D(M)) and maxA R(M, A, s, T) = Tρ∗(M) + ˜O√ T with high probability. 2Actually, the state values. 2 Results We summarize the results achieved for our algorithm UCRL2 which is described in the next section, and also state a corresponding lower bound. We assume an unknown MDP M to be learned, with S := |S| states, A := |A| actions, and finite diameter D := D(M). Only S and A are known to the learner, and UCRL2 is run with parameter δ. Theorem 2. With probability 1−δ it holds that for any initial state s ∈S and any T > 1, the regret of UCRL2 is bounded by ∆(M, UCRL2, s, T) ≤c1 · DS q TA log T δ , for a constant c1 which is independent of M, T, and δ. It is straightforward to obtain from Theorem 2 the following sample complexity bound. Corollary 3. With probability 1 −δ the average per-step regret is at most ε for any T ≥c2 D2S2A ε2 log DSA δε  steps, where c2 is a constant independent of M. Remark 4. The proof method of Theorem 2 can be modified to give for each initial state s and T > 1 an alternative upper bound on the expected regret, E [∆(M, UCRL2, s, T)] ≤c3 D2S2A log T g , where g := ρ∗(M) −maxπ,s{ρ(M, π, s) : ρ(M, π, s) < ρ∗(M)} is the gap between the optimal average reward and the second best average reward achievable in M. These new bounds are improvements over the bounds that have been achieved in [5] for the original UCRL algorithm in various respects: the exponents of the relevant parameters have been decreased considerably, the parameter D we use here is substantially smaller than the corresponding mixing time in [5], and finally, the ergodicity assumption is replaced by the much weaker and more natural assumption that the MDP has finite diameter. The following is an accompanying lower bound on the expected regret. Theorem 5. For some c4 > 0, any algorithm A, and any natural numbers S, A ≥10, D ≥ 20 logA S, and T ≥DSA, there is an MDP 3 M with S states, A actions, and diameter D, such that for any initial state s ∈S the expected regret of A after T steps is E [∆(M, A, s, T)] ≥c4 · √ DSAT . In a different setting, a modification of UCRL2 can also deal with changing MDPs. Remark 6. Assume that the MDP (i.e. its transition probabilities and reward distributions) is allowed to change ℓtimes up to step T, such that the diameter is always at most D (we assume an initial change at time t = 1). In this model we measure regret as the sum of missed rewards compared to the ℓpolicies which are optimal after the changes of the MDP. Restarting UCRL2 with parameter δ/ℓ2 at steps ⌈i3/ℓ2⌉for i = 1, 2, 3 . . ., this regret is upper bounded by c5 · ℓ 1 3 T 2 3 DS q A log T δ with probability 1 −2δ. MDPs with a different model of changing rewards have already been considered in [12]. There, the transition probabilities are assumed to be fixed and known to the learner, but the rewards are allowed to change in every step. A best possible upper bound of O( √ T) on the regret against an optimal stationary policy, given all the reward changes in advance, is derived. 3The diameter of any MDP with S states and A actions is at least logA S. Input: A confidence parameter δ ∈(0, 1). Initialization: Set t := 1, and observe the initial state s1. For episodes k = 1, 2, . . . do Initialize episode k: 1. Set the start time of episode k, tk := t. 2. For all (s, a) in S × A initialize the state-action counts for episode k, vk(s, a) := 0. Further, set the state-action counts prior to episode k, Nk (s, a) := # {τ < tk : sτ = s, aτ = a} . 3. For s, s′ ∈S and a ∈A set the observed accumulated rewards and the transition counts prior to episode k, Rk (s, a) := tk−1 X τ=1 rτ1sτ =s,aτ =a, Pk (s, a, s′) := # {τ < tk : sτ = s, aτ = a, sτ+1 = s′} , and compute estimates ˆrk (s, a) := Rk(s,a) max{1,Nk(s,a)}, ˆpk (s′|s, a) := Pk(s,a,s′) max{1,Nk(s,a)}. Compute policy ˜πk: 4. Let Mk be the set of all MDPs with states and actions as in M, and with transition probabilities ˜p (·|s, a) close to ˆpk (·|s, a), and rewards ˜r(s, a) ∈[0, 1] close to ˆrk (s, a), that is, ˜r(s, a) −ˆrk s, a  ≤ q 7 log(2SAtk/δ) 2 max{1,Nk(s,a)} and (1) ˜p ·|s, a  −ˆpk ·|s, a  1 ≤ q 14S log(2Atk/δ) max{1,Nk(s,a)} . (2) 5. Use extended value iteration (Section 3.1) to find a policy ˜πk and an optimistic MDP ˜ Mk ∈Mk such that ˜ρk := min s ρ( ˜ Mk, ˜πk, s) ≥ max M ′∈Mk,π,s′ ρ(M ′, π, s′) − 1 √tk . (3) Execute policy ˜πk: 6. While vk(st, ˜πk(st)) < max{1, Nk(st, ˜πk(st))} do (a) Choose action at := ˜πk(st), obtain reward rt, and observe next state st+1. (b) Update vk(st, at) := vk(st, at) + 1. (c) Set t := t + 1. Figure 1: The UCRL2 algorithm. 3 The UCRL2 Algorithm Our algorithm is a variant of the UCRL algorithm in [5]. As its predecessor, UCRL2 implements the paradigm of “optimism in the face of uncertainty”. As such, it defines a set M of statistically plausible MDPs given the observations so far, and chooses an optimistic MDP ˜ M (with respect to the achievable average reward) among these plausible MDPs. Then it executes a policy ˜π which is (nearly) optimal for the optimistic MDP ˜ M. More precisely, UCRL2 (Figure 1) proceeds in episodes and computes a new policy ˜πk only at the beginning of each episode k. The lengths of the episodes are not fixed a priori, but depend on the observations made. In Steps 2–3, UCRL2 computes estimates ˆpk (s′|s, a) and ˆrk (s, a) for the transition probabilities and mean rewards from the observations made before episode k. In Step 4, a set Mk of plausible MDPs is defined in terms of confidence regions around the estimated mean rewards ˆrk(s, a) and transition probabilities ˆpk (s′|s, a). This guarantees that with high probability the true MDP M is in Mk. In Step 5, extended value iteration (see below) is used to choose a nearoptimal policy ˜πk on an optimistic MDP ˜ Mk ∈Mk. This policy ˜πk is executed throughout episode k (Step 6). Episode k ends when a state s is visited in which the action a = ˜πk(s) induced by the current policy has been chosen in episode k equally often as before episode k. Thus, the total number of occurrences of any state-action pair is at most doubled during an episode. The counts vk(s, a) keep track of these occurrences in episode k.4 3.1 Extended Value Iteration In Step 5 of the UCRL2 algorithm we need to find a near-optimal policy ˜πk for an optimistic MDP. While value iteration typically calculates a policy for a fixed MDP, we also need to select an optimistic MDP ˜ Mk which gives almost maximal reward among all plausible MDPs. This can be achieved by extending value iteration to search also among the plausible MDPs. Formally, this can be seen as undiscounted value iteration [4] on an MDP with extended action set. We denote the state values of the i-th iteration by ui(s) and the normalized state values by u′ i(s) and get for all s ∈S: u0(s) = 0, ui+1(s) = max a∈A ( ˜rk (s, a) + max p(·)∈P(s,a)  X s′∈S p(s′) · ui(s′) ) , (4) Here ˜rk (s, a) are the maximal rewards satisfying condition (1) in algorithm UCRL2, and P(s, a) is the set of transition probabilities ˜p ·|s, a  satisfying condition (2). While (4) may look like a step of value iteration with an infinite action space, maxp p·ui is actually a linear optimization problem over the convex polytope P(s, a). This implies that only the finite number of vertices of the polytope need to be considered as extended actions, which guarantees convergence of the value iteration.5 The value iteration is stopped when max s∈S  ui+1(s) −ui(s) −min s∈S  ui+1(s) −ui(s) < 1 √tk , (5) which means that the change of the state values is almost uniform and actually close to the average reward of the optimal policy. It can be shown that the actions, rewards, and transition probabilities chosen in (4) for this i-th iteration define an optimistic MDP ˜ Mk and a policy ˜πk which satisfy condition (3) of algorithm UCRL2. 4 Analysis of UCRL2 and Proof Sketch of Theorem 2 In the following we present an outline of the main steps of the proof of Theorem 2. Details and the complete proofs can be found in the full version of the paper [13]. We also make the assumption that the rewards r(s, a) are deterministic and known to the learner.6 This simplifies the exposition. Considering unknown stochastic rewards adds little to the proof and only lower order terms to the regret bounds. We also assume that the true MDP M satisfies the confidence bounds in Step 4 of algorithm UCRL2 such that M ∈Mk. This can be shown to hold with sufficiently high probability (using a union bound over all T). We start by considering the regret in a single episode k. Since the optimistic average reward ˜ρk of the optimistically chosen policy ˜πk is essentially larger than the true optimal average reward ρ∗, it is sufficient to calculate by how much the optimistic average reward ˜ρk overestimates the actual rewards of policy ˜πk. By the choice of ˜πk and ˜ Mk in Step 5 of UCRL2, ˜ρk ≥ρ∗−1/√tk. Thus the 4Since the policy ˜πk is fixed for episode k, vk(s, a) ̸= 0 only for a = ˜πk(s). Nevertheless, we find it convenient to use a notation which explicitly includes the action a in vk(s, a). 5Because of the special structure of the polytope P(s, a), the linear program in (4) can be solved very efficiently in O(S) steps after sorting the state values ui(s′). For the formal convergence proof also the periodicity of optimal policies in the extended MDP needs to be considered. 6In this case all plausible MDPs considered in Steps 4 and 5 of algorithm UCRL2 would give these rewards. regret ∆k during episode k is bounded as ∆k := tk+1−1 X t=tk (ρ∗−rt) ≤ tk+1−1 X t=tk (˜ρk −rt) + tk+1 −tk √tk . The sum over k of the second term on the right hand side is O( √ T) and will not be considered further in this proof sketch. The first term on the right hand side can be rewritten using the known deterministic rewards r(s, a) and the occurrences of state action pairs (s, a) in episode k, ∆k ≲ tk+1−1 X t=tk (˜ρk −rt) = X (s,a) vk(s, a) ˜ρk −r(s, a)  . (6) 4.1 Extended Value Iteration revisited To proceed, we reconsider the extended value iteration in Section 3.1. As an important observation for our analysis, we find that for any iteration i the range of the state values is bounded by the diameter of the MDP M, max s ui(s) −min s ui(s) ≤D. (7) To see this, observe that ui(s) is the total expected reward after i steps of an optimal non-stationary i-step policy starting in state s, on the MDP with extended action set as considered for the extended value iteration. The diameter of this extended MDP is at most D as it contains the actions of the true MDP M. If there were states with ui(s1) −ui(s0) > D, then an improved value for ui(s0) could be achieved by the following policy: First follow a policy which moves from s0 to s1 most quickly, which takes at most D steps on average. Then follow the optimal i-step policy for s1. Since only D of the i rewards of the policy for s1 are missed, this policy gives ui(s0) ≥ui(s1) −D, proving (7). For the convergence criterion (5) it can be shown that at the corresponding iteration |ui+1(s) −ui(s) −˜ρk| ≤ 1 √tk for all s ∈S, where ˜ρk is the average reward of the policy ˜πk chosen in this iteration on the optimistic MDP ˜ Mk.7 Expanding ui+1(s) according to (4), we get ui+1(s) = r(s, ˜πk(s)) + X s′ ˜pk (s′|s, ˜πk(s)) · ui(s′) and hence ˜ρk −r(s, ˜πk(s)) ! − X s′ ˜pk (s′|s, ˜πk(s)) · ui(s′) −ui(s) ! ≤ 1 √tk . Defining rk := rk s, ˜πk(s)  s as the (column) vector of rewards for policy ˜πk, ˜P k := ˜pk (s′|s, ˜πk(s))  s,s′ as the transition matrix of ˜πk on ˜ Mk, and vk := vk s, ˜πk(s)  s as the (row) vector of visit counts for each state and the corresponding action chosen by ˜πk, we can rewrite (6) as ∆k ≲ X (s,a) vk(s, a) ˜ρk −r(s, a)  ≤vk ˜P k −I  ui + X (s,a) vk(s, a) √tk , (8) recalling that vk(s, a) = 0 for a ̸= ˜πk(s). Since the rows of ˜P k sum to 1, we can replace ui by wk with wk(s) = ui(s) −mins ui(s) (we again use the subscript k to reference the episode). The last term on the right hand side of (8) is of lower order, and by (7) we have ∆k ≲ vk ˜P k −I  wk, (9) ∥wk∥∞ ≤ D. (10) 7This is quite intuitive. We expect to receive average reward ˜ρk per step, such that the difference of the state values after i + 1 and i steps should be about ˜ρk. 4.2 Completing the Proof Replacing the transition matrix ˜P k of the policy ˜πk in the optimistic MDP ˜ Mk by the transition matrix P k of ˜πk in the true MDP M, we get ∆k ≲ vk ˜P k −I  wk = vk ˜P k −P k + P k −I  wk = vk ˜P k −P k  wk + vk P k −I  wk. (11) The intuition about the second term in (11) is that the counts of the state visits vk are relatively close to the stationary distribution of the transition matrix P k, such that vk P k −I  should be small. The formal proof requires the definition of a suitable martingale and the use of concentration inequalities for this martingale. This yields X k vk P k −I  wk = O D r T log T δ ! with high probability, which gives a lower order term in our regret bound. Thus, our regret bound is mainly determined by the first term in (11). Since ˜ Mk and M are in the set of plausible MDPs Mk, this term can be bounded using condition (2) in algorithm UCRL2: ∆k ≲vk ˜P k −P k  wk = X s X s′ vk s, ˜πk(s)  · ˜P k(s, s′) −P k(s, s′)  · wk(s′) ≤ X s vk s, ˜πk(s)  · ˜P k(s, ·) −P k(s, ·) 1 · ∥wk∥∞ ≤ X s vk s, ˜πk(s)  · 2 q 14S log(2AT/δ) max{1,Nk(s,˜πk(s))} · D . (12) Let N(s, a) := P k vk(s, a) such that P (s,a) N(s, a) = T and recall that Nk(s, a) = P i<k vi(s, a). By the condition of the while-loop in Step 6 of algorithm UCRL2, we have that vk(s, a) ≤Nk(s, a). Summing (12) over all episodes k we get X k ∆k ≤ const · X k X (s,a) vk(s, a) · q S log(AT/δ) max{1,Nk(s,a)} · D = const · D · p S log(AT/δ) · X (s,a) X k vk(s,a) √ max{1,Nk(s,a)} ≤ const · D · p S log(AT/δ) · X (s,a) p N(s, a) (13) ≤ const · D · p S log(AT/δ) · √ SAT. (14) Here we used for (13) that n X k=1 xk p Xk−1 ≤ √ 2 + 1  p Xn , where Xk = max n 1, Pk i=1 xi o and 0 ≤xk ≤Xk−1, and we used Jensen’s inequality for (14). Noting that Theorem 2 holds trivially true for T ≤A gives the bound of the theorem. 5 The Lower Bound (Proof Sketch for Theorem 5) We first consider an MDP with two states s0 and s1, and A′ = ⌊(A −1)/2⌋actions. For each action a, let r(s0, a) = 0, r(s1, a) = 1, and p (s0|s1, a) = δ where δ = 10/D. For all but a single “good” action a∗let p (s1|s0, a) = δ, while p (s1|s0, a∗) = δ +ε for some 0 < ε < δ. The diameter of this MDP is 1/δ. The average reward of a policy which chooses action a∗in state s0 is δ+ε 2δ+ε > 1 2, while the average reward of any other policy is 1 2. Thus the regret suffered by a suboptimal action in state s0 is Ω(ε/δ). The main observation for the proof of the lower bound is that any algorithm needs to probe Ω(A′) actions in state s0 for Ω δ/ε2 times on average, to detect the “good” action a∗ reliably. Considering k := ⌊S/2⌋copies of this MDP where only one of the copies has such a “good” action a∗, we find that Ω(kA′) actions in the s0-states of the copies need to be probed for Ω δ/ε2 times to detect the “good” action. Setting ε = p δkA′/T, suboptimal actions need to be taken Ω kA′δ/ε2 = Ω(T) times which gives Ω(Tε/δ) = Ω( √ TDSA) regret. Finally, we need to connect the k copies into a single MDP. This can be done by introducing A′ + 1 additional deterministic actions per state, which do not leave the s1-states but connect the s0-states of the k copies by inducing an A′-ary tree structure on the s0-states (1 action for going toward the root, A′ actions to go toward the leaves). The diameter of the resulting MDP is at most 2(D/10 + ⌈logA′ k⌉) which is twice the time to travel to or from the root for any state in the MDP. Thus we have constructed an MDP with ≤S states, ≤A actions, and diameter ≤D which forces regret Ω( √ DSAT) on any algorithm. This proves the theorem. Acknowledgments This work was supported in part by the Austrian Science Fund FWF (S9104-N13 SP4). The research leading to these results has received funding from the European Community’s Seventh Framework Programme (FP7/2007-2013) under grant agreements n◦216886 (PASCAL2 Network of Excellence), and n◦216529 (Personal Information Navigator Adapting Through Viewing, PinView). This publication only reflects the authors’ views. References [1] Richard S. Sutton and Andrew G. Barto. Reinforcement Learning: An Introduction. MIT Press, 1998. [2] Michael J. Kearns and Satinder P. Singh. Finite-sample convergence rates for Q-learning and indirect algorithms. In Advances in Neural Information Processing Systems 11. MIT Press, 1999. [3] Michael J. Kearns and Satinder P. Singh. Near-optimal reinforcement learning in polynomial time. Mach. Learn., 49:209–232, 2002. [4] Martin L. Puterman. Markov Decision Processes: Discrete Stochastic Dynamic Programming. John Wiley & Sons, Inc., New York, NY, USA, 1994. [5] Peter Auer and Ronald Ortner. Logarithmic online regret bounds for reinforcement learning. In Advances in Neural Information Processing Systems 19, pages 49–56. MIT Press, 2007. [6] Ronen I. Brafman and Moshe Tennenholtz. R-max – a general polynomial time algorithm for near-optimal reinforcement learning. J. Mach. Learn. Res., 3:213–231, 2002. [7] Ambuj Tewari and Peter Bartlett. Optimistic linear programming gives logarithmic regret for irreducible mdps. In Advances in Neural Information Processing Systems 20, pages 1505–1512. MIT Press, 2008. [8] Sham M. Kakade. On the Sample Complexity of Reinforcement Learning. PhD thesis, University College London, 2003. [9] Alexander L. Strehl and Michael L. Littman. A theoretical analysis of model-based interval estimation. In Proc. 22nd ICML 2005, pages 857–864, 2005. [10] Alexander L. Strehl and Michael L. Littman. An analysis of model-based interval estimation for Markov decision processes. J. Comput. System Sci., 74(8):1309–1331, 2008. [11] Apostolos N. Burnetas and Michael N. Katehakis. Optimal adaptive policies for Markov decision processes. Math. Oper. Res., 22(1):222–255, 1997. [12] Eyal Even-Dar, Sham M. Kakade, and Yishay Mansour. Experts in a Markov decision process. In Advances in Neural Information Processing Systems 17, pages 401–408. MIT Press, 2005. [13] Peter Auer, Thomas Jaksch, and Ronald Ortner. Near-optimal regret bounds for reinforcement learning. Technical Report CIT-2009-01, University of Leoben, Chair for Information Technology, 2009. http://institute.unileoben.ac.at/infotech/publications/TR/CIT-2009-01.pdf.
2008
217
3,473
Non-parametric Regression Between Manifolds Florian Steinke1, Matthias Hein2 1 Max Planck Institute for Biological Cybernetics, 72076 T¨ubingen, Germany 2 Saarland University, 66041 Saarbr¨ucken, Germany steinke@tuebingen.mpg.de, hein@cs.uni-sb.de Abstract This paper discusses non-parametric regression between Riemannian manifolds. This learning problem arises frequently in many application areas ranging from signal processing, computer vision, over robotics to computer graphics. We present a new algorithmic scheme for the solution of this general learning problem based on regularized empirical risk minimization. The regularization functional takes into account the geometry of input and output manifold, and we show that it implements a prior which is particularly natural. Moreover, we demonstrate that our algorithm performs well in a difficult surface registration problem. 1 Introduction In machine learning, manifold structure has so far been mainly used in manifold learning [1], to enhance learning methods especially in semi-supervised learning. The setting we want to discuss in this paper is rather different, and has not been addressed yet in the machine learning community. Namely, we want to predict a mapping between known Riemannian manifolds based on input/output example pairs. In the statistics literature [2], this problem is treated for certain special output manifolds in directional statistics, where the main applications are to predict angles (circle), directions (sphere) or orientations (set of orthogonal matrices). More complex manifolds appear naturally in signal processing [3, 4], computer graphics [5, 6], and robotics [7]. Impressive results in shape processing have recently been obtained [8, 9] by imposing a Riemannian metric on the set of shapes, so that shape interpolation is reduced to the estimation of a smooth curve in the manifold of all shapes. Moreover, note that almost any regression problem with differentiable equality constraints can also be seen as an instance of manifold-valued learning. The problem of learning, when input and output domain are Riemannian manifolds, is quite distinct from standard multivariate regression or manifold learning. One fundamental problem of using traditional regression methods for manifold-valued regression is that standard techniques use the linear structure of the output space. It thus makes sense to linearly combine simple basis functions, since the addition of function values is still an element of the target space. While this approach still works for manifold-valued input, it is no longer feasible if the output space is a manifold, as general Riemannian manifolds do not allow an addition operation, see Figure 1 for an illustration. One way how one can learn manifold-valued mappings using standard regression techniques is to learn mappings directly into charts of the manifold. However, this approach leads to problems even for the simple sphere, since no single chart covers the sphere without a coordinate singularity. Another approach is to use an embedding of the manifold in Euclidean space where one can use standard multivariate regression and then project the learned mapping onto the manifold. But, as is obvious from Figure 1, the projection can lead to huge distortions. Even if the original mapping in Euclidean space is smooth, its projection onto the manifold might be discontinuous. In this paper we generalize our previous work [6] which is based on regularized empirical risk minimization. The main ingredient is a smoothness functional which depends only on the geometric 1 Figure 1: The black line is a 1D-manifold in R2. The average of the red points in R2 does not lie on the manifold. Averaging of the green points which are close with respect to the geodesic distance is still reasonable. However, the blue points which are close with respect to the Euclidean distance are not necessarily close in geodesic distance and therefore averaging can fail. properties of input and output manifold, and thus avoids the problems encountered in the naive generalization of standard regression methods discussed above. Here, we provide a theoretical analysis of the preferred mappings of the employed regularization functional, and we show that these can be seen as natural generalizations of linear mappings in Euclidean space to the manifold-valued case. It will become evident that this property makes the regularizer particularly suited as a prior for learning mappings between manifolds. Moreover, we present a new algorithm for solving the resulting optimization problem, which compared to the our previously proposed one is more robust and, most importantly, can deal with arbitrary manifold-valued input. In our implementation, the manifolds can be either given analytically or as point clouds in Euclidean space, rendering our approach applicable for almost any manifold-valued regression problem. In the experimental section we demonstrate good performance in a surface registration task, where both input manifold and output manifold are non-Euclidean – a task which could not be solved previously in [6]. Since the problem is new to the machine learning community, we give a brief summary of the learning problem in Section 2 and discuss the regularizer and its properties in Section 3. Finally, in Section 4, we describe the new algorithm for learning mappings between Riemannian manifolds, and provide performance results for a toy problem and a surface registration task in Section 5. 2 Regularized empirical risk minimization for manifold-valued regression Suppose we are given two Riemannian manifolds, the input manifold M of dimension m and the target manifold N of dimension n. We assume that M is isometrically embedded in Rs, and N in Rt respectively. Since most Riemannian manifolds are given in this form anyway – think of the sphere or the set of orthogonal matrices, this is only a minor restriction. Given a set of k training pairs (Xi, Yi) with Xi ∈M and Yi ∈N we would like to learn a mapping Ψ : M ⊆Rs →N ⊆Rt. This learning problem reduces to standard multivariate regression if M and N are both Euclidean spaces Rm and Rn, and to regression on a manifold if at least N is Euclidean. We use regularized empirical risk minimization, which can be formulated in our setting as arg min Ψ∈C∞(M,N) 1 k k X i=1 L(Yi, Ψ(Xi)) + λ S(Ψ), (1) where C∞(M, N) denotes the set of smooth mappings Ψ between M ⊆Rs and N ⊆Rt, L : N ×N →R+ is the loss function, λ ∈R+ the regularization parameter, and S : C∞(M, N) →R+ the regularization functional. Loss function: In multivariate regression, f : Rm →Rn, a common loss function is the squared Euclidean distance of f(Xi) and Yi, L(Yi, f(Xi)) = ∥Yi −f(Xi)∥2 Rn. A quite direct generalization to a loss function on a Riemannian manifold N is to use the squared geodesic distance in N, L(Yi, Ψ(Xi)) = d2 N(Yi, Ψ(Xi)). The correspondence to the multivariate case can be seen from the fact that dN(Yi, Ψ(Xi)) is the length of the shortest path between Yi and Ψ(Xi) in N, as ∥f(Xi) −Yi∥is the length of the shortest path, namely the length of the straight line, between f(Xi) and Yi in Rn. Regularizer: The regularization functional should measure the smoothness of the mapping Ψ. We use the so-called Eells energy introduced in [6] as our smoothness functional which, as we will show in the next section, implements a particularly well-suited prior over mappings for many applications. The derivation of the regularization functional is quite technical. In order that the reader can get the main intuition without having to bother with the rather heavy machinery from differential geometry, we will discuss the regularization functional in a simplified setting, namely we assume that the input manifold M is Euclidean, that is, M is an open subset of Rm. The general definition is given in the next section. Let xα be Cartesian coordinates in M and let Ψ(x) be given in Cartesian coordinates 2 in Rt then the Eells energy can be written as, SEells(Ψ) = Z M⊆Rm t X µ=1 m X α,β=1  ∂2Ψµ ∂xα∂xβ ⊤2 dx, (2) where ⊤denotes the projection onto the tangent space TΨ(x)N of the target manifold at Ψ(x). Note, that the Eells energy reduces to the well-known thin-plate spline energy if also the target manifold N is Euclidean, that is, N = Rn. Let Ψ : Rm →Rn, then SThinPlate(Ψ) = Z M⊆Rm n X µ=1 m X α,β=1  ∂2Ψµ ∂xα∂xβ 2 dx. (3) The apparently small step of the projection onto the tangent space leads to huge qualitative differences in the behavior of both energies. In particular, the Eells energy penalizes only the second derivative along the manifold, whereas changes in the normal direction are discarded. In the case of m = 1, that is, we are learning a curve on N, the difference is most obvious. In this case the Eells energy penalizes only the acceleration along the curve (the change of the curve in tangent direction) whereas the thin-plate spline energy penalizes also the normal part which just measures the curvature of the curve in the ambient space. This is illustrated in the following figure. The input manifold is R and the output manifold N is a one-dimensional curve embedded in R2, i.e. Ψ : R →N. If the images Ψ(xi) of equidistant points xi in the input manifold M = R are also equidistant on the output manifold, then Ψ has no acceleration in terms of N, i.e. its second derivative in N should be zero. However, the second derivative of Ψ in the ambient space, which is marked red in the left figure, is not vanishing in this case. Since the manifold is curved, also the graph of Ψ has to bend to stay on N. The Eells energy only penalizes the intrinsic acceleration, that is, only the component parallel to the tangent space at Ψ(xi), the green arrow. 3 Advantages and properties of the Eells energy In the last section we motivated that the Eells energy penalizes only changes along the manifold. This property and the fact that the Eells energy is independent of the parametrization of M and N, can be directly seen from the covariant formulation in the following section. We briefly review the derivation of the Eells energy derivation in [10], which we need in order to discuss properties of the Eells energy and the extension to manifold-valued input. Our main emphasis lies on an intuitive explanation, for the exact technical details we refer to [10]. 3.1 The general Eells energy Let xα and yµ be coordinates on M and N. The differential of φ : M →N at x ∈M is dφ = ∂φµ ∂xα dxα x ⊗ ∂ ∂yµ φ(x), where it is summed over double-occurring indices. This is basically just the usual Jacobian matrix for a multivariate map. In order to get a second covariant derivative of φ, we apply the covariant derivative M∇of M. The problem is that the derivative M∇ ∂ ∂xα ∂ ∂yµ is not defined, since ∂ ∂yµ is not an element of TxM but of Tφ(x)N. For this derivative, we use the concept of the pull-back connection ∇′ [11], which is given as ∇′ ∂ ∂xα ∂ ∂yµ = N∇dφ( ∂ ∂xα ) ∂ ∂yµ , i.e., the direction of differentiation ∂ ∂xα ∈TxM is first mapped to Tφ(x)N using the differential dφ, and then the covariant derivative N∇of N is used. Putting things together, the second derivative, the “Hessian”, of φ is given in coordinates as ∇′dφ = h ∂2φµ ∂xβ∂xα −∂φµ ∂xγ MΓ γ βα + ∂φρ ∂xα ∂φν ∂xβ NΓ µ νρ i dxβ ⊗dxα ⊗ ∂ ∂yµ , (4) where MΓ, NΓ are the Christoffel symbols of M and N. Note, that if M and N are Euclidean, the Christoffel symbols are zero and the second derivative reduces to the standard Hessian in Euclidean 3 space. The Eells energy penalizes the squared norm of this second derivative tensor, corresponding to the Frobenius norm of the Hessian in Euclidean space, SEells(φ) = Z M ∥∇′dφ∥2 T ∗ x M⊗T ∗ x M⊗Tφ(x)N dV (x). In this tensorial form the energy is parametrization independent and, since it depends only on intrinsic properties, it measures smoothness of φ only with respect to the geometric properties of M and N. Equation (4) can be simplified significantly when N is isometrically embedded in Rt. Let i : N →Rt to be the isometric embedding and denote by Ψ : M →Rt the composition Ψ = i ◦φ. Then we show in [10] that ∇′dφ simplifies to ∇′dφ = h ∂2Ψµ ∂xβ∂xα −∂Ψµ ∂xγ MΓ γ βα i dxβ ⊗dxα ⊗ ∂ ∂zµ ⊤ , (5) where ⊤is the orthogonal projection onto the tangent space of N and zµ are Cartesian coordinates in Rt. Note, that if M is Euclidean, the Christoffel symbols MΓ are zero and the Eells energy reduces to Equation (2) discussed in the previous section. This form of the Eells energy was also used in our previous implementation in [6] which could therefore not deal with non-Euclidean input manifolds. In this paper we generalize our setting to non-trivial input manifolds, which requires that we take into account the slightly more complicated form of ∇′dφ in Equation (5). In Section 3.3 we discuss how to compute ∇′dφ and thus the Eells energy for this general case. 3.2 The null space of the Eells energy and the generalization of linear mappings The null space of a regularization functional S(φ) is the set {φ | S(φ) = 0}. This set is an important characteristic of a regularizer, since it contains all mappings which are not penalized. Thus, the null space is the set of mappings which we are free to fit the data with – only deviations from the null space are penalized. In standard regression, depending on the order of the differential used for regularization, the null space often consists out of linear maps or polynomials of small degree. We have shown in the last section, that the Eells energy reduces to the classical thin-plate spline energy, if input and output manifold are Euclidean. For the thin-plate spline energy it is wellknown that the null space consists out of linear maps between input and output space. However, the concept of linearity breaks down if the input and output spaces are Riemannian manifolds, since manifolds have no linear structure. A key observation towards a natural generalization of the concept of linearity to the manifold setting is that linear maps map straight lines to straight lines. Now, a straight line between two points in Euclidean space corresponds to a curve with no acceleration in a Riemannian manifold, that is, a geodesic between the two points. In analogy to the Euclidean case we therefore consider mappings which map geodesics to geodesics as the proper generalization of linear maps for Riemannian manifolds. The following proposition taken from [11] defines this concept and shows that the set of generalized linear maps is exactly the null space of the Eells energy. Proposition 1 [11] A map φ : M →N is totally geodesic, if φ maps geodesics of M linearly to geodesics of N, i.e. the image of any geodesic in M is also a geodesic in N, though potentially with a different constant speed. We have, φ is totally geodesic if and only if ∇′dφ = 0. Linear maps encode a very simple relation in the data: the relative changes between input and output are the same everywhere. This is the simplest relation a non-trivial mapping can encode between input and output, and totally geodesic mappings encode the same “linear” relationship even though the input and output manifold are nonlinear. However, note that like linear maps, totally geodesic maps are not necessarily distortion-free, but every distortion-free (isometric) mapping is totally geodesic. Furthermore, given “isometric” training points, dM(Xi, Xj) = dN(Yi, Yj), i, j = 1, . . . , k, then among all minimizers of (1), there will be an isometry fitting the data points, given that such an isometry exists. With this restriction in mind, one can see the Eells energy also as a measure of distortion of the mapping φ. This makes the Eells energy an interesting candidate for a variety of geometric fitting problems, e.g., for surface registration as demonstrated in the experimental section. 4 3.3 Computation of the Eells energy for general input manifolds In order to compute the Eells energy for general input manifolds, we need to be able to evaluate the second derivative in Equation (5), in particular, the Christoffel symbols of the input manifold M. While the Christoffel symbols could be evaluated directly for analytically given manifolds, we propose a much simpler scheme here, that also works for point clouds. It is based on local second order approximations of M, assuming that M is given as a submanifold of Rs (where the Riemannian metric of M is induced from the Euclidean ambient space). For simplicity, we restrict ourselves here to the intuitive case of hypersurfaces in Rs. The case of general submanifolds in Rs and all proofs are provided in the supplementary material. Proposition 2 Let x1, . . . , xm be the coordinates associated with an orthonormal basis of the tangent space at TpM, that is p has coordinates x = 0. Then in Cartesian coordinates z of Rs centered at p and aligned with the tangent space TpM, the manifold can be approximated up to second order as z(x) = (x1, . . . , xs−1, f s(x)), where given that the orthonormal basis in TpM is aligned with the principal directions we have f s(x) = s−1 X α=1 να xα2, where να are the principal curvatures of M at x. For an example of a second-order approximation, see the approximation of a sphere at the south pole on the left. Note, that the principal curvature, also called extrinsic curvature, quantifies how much the input manifold bends with respect to the ambient space. The principal curvatures can be computed directly for manifolds in analytic form and approximated for point cloud data using standard techniques, see Section 4. Proposition 3 Given a second-order approximation of M at p as in Proposition 2, then for the coordinates x one has MΓ α βγ(0) = 0. If x1, . . . , xs−1 are aligned with the principal directions at p, then the coordinate expressions for the manifold-adapted second derivative of Ψ (5) are at p ∂2Ψµ ∂xβ∂xα −∂Ψµ ∂xγ MΓ γ βα = ∂2Ψµ ∂xβ∂xα = ∂2Ψµ ∂zβ∂zα + ∂Ψµ ∂zs δαβνα. (6) Note that (6) is not an approximation, but the true second derivative of Ψ at p on M. This is because a parametrisation of M at p with an exponential map differs from the second order approximation at most in third order. Expression (6) allows us to compute the Eells energy in the case of manifoldvalued input. We just have to replace the second-partial derivative in the Eells energy in (2) by this manifold input-adapted formulation, which can be computed easily. 4 Implementation We present a new algorithm for solving the optimization problem of (1). In comparison to [6], the method is more robust, since it avoids the hard constraints of optimizing along the surface, and most importantly it allows manifold-valued input through a collocation-like discretization. The basic idea is to use a linearly parameterized set of functions and to express the objective in terms of the parameters. The resulting non-linear optimization problem is then solved using Newton’s method. Problem Setup: A flexible set of functions are the local polynomials. Let M be an open subset or submanifold of Rs, then we parameterize the µ-th component of the mapping Ψ : Rs →Rt as Ψµ(x) = PK i=1 kσi(∥∆xi∥)g(∆xi, wµ i ) PK j=1 kσj(∥∆xj∥) . Here, g(∆xi, wµ i ) is a first or second order polynomial in ∆xi with parameters wµ i , ∆xi = (x−ci) is the difference of x to the local polynomial centers ci, and kσi(r) = k( r σi ) is a compactly supported smoothing kernel. We choose the K local polynomial centers ci approximately uniformly distributed over M, thereby adapting the function class to the shape of the input manifold M. If we stack all parameters wµ i into a single vector w, then Ψ and its partial derivatives are just linear functions of w, 5 which allows to compute these values in parallel for many points using simple matrix multiplication. We compute the energy integral (2) as a function of w, by summing up the energy density over an approximately uniform discretisation of M. The projection onto the tangent space, used in (2) and (5), and the second order approximation for computing intrinsic second derivatives, used in (5) and (6), are manifold specific and are explained below. We also express the squared geodesic distance used as loss function in terms of w, see below, and thus end up with a finite dimensional optimisation problem in w which we solve using Newton’s method with line search. The Newton step can be done efficiently because the smoothing kernel has compact support and thus the Hessian is sparse. Moreover, since we have discretised the optimisation problem directly, and not its Euler-Lagrange equations, we do not need to explicitly formulate boundary conditions. The remaining problem is the constraint Ψ(x) ∈N for x ∈M. We transform it into a soft constraint and add it to the objective function as γ R M d(Ψ(x), N)2dx, where d(Ψ(x), N) denotes the distance of Ψ(x) to N in Rt and γ ∈R+. During the optimization, we iteratively minimize till convergence and then increase the weight γ by a fixed amount, repeating this until the maximum distance of Ψ to N is smaller than a given threshold. As initial solution, we compute the free solution, i.e. where N is assumed to be Rt, in which case the problem becomes convex. In contrast to a simple projection of the initial solution onto N, as done in [6], which can lead to large distortions potentially causing the optimization to stop in a local minimum, the increasing penalization of the distance to the manifold leads to a slow settling of the solution towards the target manifold, which turned out to be much more robust. The projection of the second derivative of Ψ onto the tangent space for Ψ(x) ̸∈N, as required in (2) or (5), is computed using the iso-distance manifolds NΨ(x) = {y ∈Rt|d(y, N) = d(Ψ(x), N)} of N. For the loss, we use dN(argminy∈N ∥Ψ(x) −y∥, Yi). These two constructions are sensible, since as Ψ approaches the manifold N for increasing γ, both approximations converge to the desired operations on the manifold N. Manifold Operations: For each output manifold N, we need to compute projections onto the tangent spaces of N and its iso-distance manifolds, the closest point to p ∈Rt on N, and geodesic distances on N. Using a signed distance function η, projections P ⊤onto the tangent spaces of N or its iso-distance manifolds at p ∈Rt are given as P ⊤= 1 −∥∇η(p)∥−2 ∇η(p)∇η(p)T . For spheres St−1 the signed distance function is simply η(x) = 1 −∥x∥. Finding the closest point to p ∈Rt in St−1 is trivial and the geodesic distance is dSt−1(x, y) = arccos ⟨x, y⟩for x, y ∈St−1. For the surface registration task, the manifold is given as a densely sampled point cloud with surface normals. Here, we proceed as follows. Given a point p ∈Rt, we first search for the closest point p′ in the point cloud and compute there a local second order approximation of N, that is, we fit the distances of the 10 nearest neighbors of p′ to the tangent plane (defined by the normal vector) with a quadratic polynomial in the points’ tangent plane coordinates using weighted least squares, see Proposition 2. We then use the distance to the second order approximation as the desired signed distance function η, and also use this approximation to find the closest point to p ∈Rt in N. Since in the surface registration problem we used rather large weights for the loss, Ψ(Xi) and Yi were always close on the surface. In this case the geodesic distance can be well approximated by the Euclidean one, so that for performance reasons we used the Euclidean distance. An exact, but more expensive method to compute geodesics is to minimize the harmonic energy of curves, see [6]. For non-Euclidean input manifolds M, we similarly compute local second order approximations of M in Rs to estimate the principal curvatures needed for the second derivative of Ψ in (6). 5 Experiments In a simple toy experiment, we show that our framework can handle noisy training data and all parameters can be adjusted using cross-validation. In the second experiment, we prove that the new implementation can deal with manifold-valued input and apply it to the task of surface registration. Line on Sphere: Consider regression from [0, 1] to the sphere S2 ⊆R3. As ground-truth, we choose a curve given in spherical coordinates as φ(t) = 40t2, θ(t) = 1.3πt + π sin(πt). The k training inputs were sampled uniformly from [0, 1], the outputs were perturbed by “additive” noise from the von Mises distribution with concentration parameter κ. The von Mises distribution is the maximum entropy distribution on the sphere for fixed mean and variance [2], and thus is the analog to the Gaussian distribution. In the experiments the optimal regularization parameter λ was determined by 6 10 2 10 4 10 6 10 8 10 10 10 −1 10 0 1/λ CV error k = 100, κ = 10000 Eells TPS 10 2 10 3 10 −2 10 −1 k Test Error κ = 10000 Eells TPS Local 1e0 1e2 1e4 Inf 10 −2 10 −1 10 0 κ Test Error k = 100 Eells TPS Local a) b) c) d) Figure 2: Regression from [0, 1] to the sphere. a) Noisy data samples (black crosses) of the black ground-truth curve. The blue dots show the estimated curve for our Eells-regularized approach, the green dots depict thin-plate splines (TPS) in R3 radially projected onto the sphere, and the red dots show results for the local approach of [8]. b) Cross-validation errors for given sample size k and noise concentration κ. Von-Mises distributed noise in this case corresponds roughly to Gaussian noise with standard deviation 0.01. c) Test errors for different k, but fixed κ. In all experiments the regularization parameter λ is found using cross-validation. d) Test errors for different κ, but fixed k. performing 10-fold cross-validation and the experiment was repeated 10 times for each size of the training sample k and noise parameter κ. The run-time was dominated by the number of parameters chosen for Ψ, and mostly independent of k. For training one regression it was about 10s in this case. We compare our framework for nonparametric regression between manifolds with standard cubic smoothing splines in R3 – the equivalent of thin-plate splines (TPS) for one input dimension – projected radially on the sphere, and with the local manifold-valued Nadaraya-Watson estimator of [8]. As can be seen in Figure 2, our globally regularized approach performs significantly better than [8] for this task. Note that even in places where the estimated curve of [8] follows the ground truth relatively closely, the spacing between points varies greatly. These sampling dependent speed changes, that are not seen in the ground truth curve, cannot be avoided without a global smoothness prior such as for example the Eells energy. The Eells approach also outperforms the projected TPS, in particular for small sample sizes and reasonable noise levels. For a fixed noise level of κ = 10000 a paired t-test shows that the difference in test error is statistically significant at level α = 5% for the sample sizes k = 70, 200, 300, 500. Clearly, as the curve is very densely sampled for high k, both approaches perform similar, since the problem becomes essentially local, and locally all manifolds are Euclidean. In contrast, for small sample sizes, a plausible a prior is more important. The necessary projections for TPS can introduce arbitrary distortions, especially for parts of the curve where consecutive training points are far apart, and where TPS thus deviate significantly from the circle, see Figure 2a). Using our manifold-adapted approach we avoid distorting projections and use the true manifold distances in the loss and the regularizer. The next example shows that the difference between TPS and our approach is even more striking for more complicated manifolds. Surface / Head Correspondence: Computing correspondence between the surfaces of different, but similar objects, such as for example human heads, is a central problem in shape processing. A dense correspondence map, that is, an assignment of all points of one head to the anatomically equivalent points on the other head, allows one to perform morphing [12] or to build linear object models [13] which are flexible tools for computer graphics as well as computer vision. While the problem is wellstudied, it remains a difficult problem which is still actively investigated. Most approaches minimize a functional consisting of a local similarity measure and a smoothness functional or regularizer for the overall mapping. Motivated by the fact that the Eells energy favors simple “linear” mappings, we propose to use it as regularizer for correspondence maps. For testing and highlighting the role of this “prior” independently of the choice of local similarity measure, we formulate the dense correspondence problem as a non-parametric regression problem between manifolds where 55 point correspondences on characteristic local texture or shape features are given (Only on the forehead we fix some less well-defined markers, to determine a relevant length-scale). It is in general difficult to evaluate correspondences numerically, since for different heads anatomical equivalence is not easily specified. Here, we have used a subset of the head database of [13] and considered their correspondence as ground-truth. These correspondences are known to be perceptually highly plausible. We took the average head of one part of the database and registered it to the other 10 faces, using the mean distance to the correspondence of [13] as error score. Apart from the average deviation over the whole head, we also show results for an interior region, see Fig. 3 g), for which the correspondence given by [13] is known to be more exact compared to other regions such as, for example, around the ear or below the chin. 7 a) Original b) 50% c) Target d) TPS e) Eells f) [12] g) Mask Error in mm 2.97 (1.17) 2.31 (0.93) 2.49 (1.46) Figure 3: Correspondence computation from the original head in a) to the target head in c) with 55 markers (yellow crosses). A resulting 50% morph using our method is shown in c). Distance of the computed correspondence to the correspondence of [13] is color-coded in d) - f) for different methods. The numbers below give the average distance over the whole head, in brackets the average over an interior region (red area in g). We compared our approach against [12] and a thin-plate spline (TPS) like approach. The TPS method represents the initial solution of our approach, that is, a mapping into R3 minimizing the TPS energy (3), which is then projected onto the target manifold. [12] use a volume-deformation based approach that directly finds smooth mappings from surface to surface, without the need of projection, but their regularizer does not take into account the true distances along the surface. We did not compare against [8], since their approach requires computing a large number of geodesics in each iteration, which is computationally prohibitive on point clouds. In order to obtain a sufficiently flexible, yet not too high-dimensional function set for our implementation, we place polynomial centers ci on all markers points and also use a coarse, approximately uniform sampling of the other parts of the manifold. Free parameters, that is, the regularisation parameter λ and the density of additional polynomial centers, were chosen by 10-fold cross-validation for our and the TPS method, by manual inspection for the approach of [12]. One computed correspondence example is shown in Fig. 3, the average over all 10 test heads is summarized in the table below. TPS Eells [12] Mean error for the full head in mm 2.90 2.16 2.15 Mean error for the interior in mm 1.49 1.17 1.36 The proposed manifold-adapted Eells approach outperforms the TPS method, especially in regions of high curvature such as around the nose as the error heatmaps in Fig. 3 show. Compared to [12], our method finds a smoother, more plausible solution, also on large texture-less areas such as the forehead or the cheeks. References [1] M. Belkin and P. Niyogi. Semi-supervised learning on manifolds. Machine Learning, 56:209–239, 2004. [2] K.V. Mardia and P.E. Jupp. Directional statistics. Wiley, New York, 2000. [3] A. Srivastava. A Bayesian approach to geometric subspace estimation. IEEE Trans. Sig. Proc., 48(5):1390–1400, 2000. [4] I. U. Rahman, I. Drori, V. C. Stodden, D. L. Donoho, and P. Schr¨oder. Multiscale representations for manifold-valued data. Multiscale Mod. and Sim., 4(4):1201–1232, 2005. [5] F. M´emoli, G. Sapiro, and S. Osher. Solving variational problems and partial differential equations mapping into general target manifolds. J.Comp.Phys., 195(1):263–292, 2004. [6] F. Steinke, M. Hein, J. Peters, and B. Sch¨olkopf. Manifold-valued Thin-Plate Splines with Applications in Computer Graphics. Computer Graphics Forum, 27(2):437–448, 2008. [7] M. Hofer and H. Pottmann. Energy-minimizing splines in manifolds. ACM ToG, 23:284–293, 2004. [8] B. C. Davis, P. T. Fletcher, E. Bullitt, and S. Joshi. Population shape regression from random design data. Proc. of IEEE Int. Conf. Computer Vision (ICCV), pages 1–7, 2007. [9] M. Kilian, N.J. Mitra, and H. Pottmann. Geometric modeling in shape space. ACM ToG, 26(3), 2007. [10] M. Hein, F. Steinke, and B. Sch¨olkopf. Energy functionals for manifold-valued mappings and their properties. Technical Report 167, MPI for Biological Cybernetics, 2008. [11] J. Eells and L. Lemaire. Selected topics in harmonic maps. AMS, Providence, RI, 1983. [12] B. Sch¨olkopf, F. Steinke, and V. Blanz. Object correspondence as a machine learning problem. In Proc. of the Int. Conf. on Machine Learning (ICML), pages 777 –784, 2005. [13] V. Blanz and T. Vetter. A morphable model for the synthesis of 3d faces. In SIGGRAPH’99 Conference Proceedings, pages 187–194, Los Angeles, 1999. ACM Press. 8
2008
218
3,474
Unsupervised Learning of Visual Sense Models for Polysemous Words Kate Saenko MIT CSAIL Cambridge, MA saenko@csail.mit.edu Trevor Darrell UC Berkeley EECS / ICSI Berkeley, CA trevor@eecs.berkeley.edu Abstract Polysemy is a problem for methods that exploit image search engines to build object category models. Existing unsupervised approaches do not take word sense into consideration. We propose a new method that uses a dictionary to learn models of visual word sense from a large collection of unlabeled web data. The use of LDA to discover a latent sense space makes the model robust despite the very limited nature of dictionary definitions. The definitions are used to learn a distribution in the latent space that best represents a sense. The algorithm then uses the text surrounding image links to retrieve images with high probability of a particular dictionary sense. An object classifier is trained on the resulting sense-specific images. We evaluate our method on a dataset obtained by searching the web for polysemous words. Category classification experiments show that our dictionarybased approach outperforms baseline methods. 1 Introduction We address the problem of unsupervised learning of object classifiers for visually polysemous words. Visual polysemy means that a word has several dictionary senses that are visually distinct. Web images are a rich and free resource compared to traditional human-labeled object datasets. Potential training data for arbitrary objects can be easily obtained from image search engines like Yahoo or Google. The drawback is that multiple word meanings often lead to mixed results, especially for polysemous words. For example, the query “mouse” returns multiple senses on the first page of results: “computer” mouse, “animal” mouse, and “Mickey Mouse” (see Figure 1.) The dataset thus obtained suffers from low precision of any particular visual sense. Some existing approaches attempt to filter out unrelated images, but do not directly address polysemy. One approach involves bootstrapping object classifiers from labeled image data [9], others cluster the unlabeled images into coherent components [6],[2]. However, most rely on a labeled seed set of inlier-sense images to initialize bootstrapping or to select the right cluster. The unsupervised approach of [12] bootstraps an SVM from the top-ranked images returned by a search engine, with the assumption that they have higher precision for the category. However, for polysemous words, the top-ranked results are likely to include several senses. We propose a fully unsupervised method that specifically takes word sense into account. The only input to our algorithm is a list of words (such as all English nouns, for example) and their dictionary entries. Our method is multimodal, using both web search images and the text surrounding them in the document in which they are embedded. The key idea is to learn a text model of the word sense, using an electronic dictionary such as Wordnet together with a large amount of unlabeled text. The model is then used to retrieve images of a specific sense from the mixed-sense search results. One application is an image search filter that automatically groups results by word sense for easier navigation for the user. However, our main focus in this paper is on using the re-ranked images 1 Figure 1: Which sense of “mouse”? Mixed-sense images returned from an image keyword search. as training data for an object classifier. The resulting classifier can predict not only the English word that best describes an input image, but also the correct sense of that word. A human operator can often refine the search by using more sense-specific queries, for example, “computer mouse” instead of “mouse”. We explore a simple method that does this automatically by generating sense-specific search terms from entries in Wordnet (see Section 2.3). However, this method must rely on one- to three-word combinations and is therefore brittle. Many of the generated search terms are too unnatural to retrieve any results, e.g., “percoid bass”. Some retrieve many unrelated images, such as the term “ticker” used as an alternative to “watch”. We regard this method as a baseline to our main approach, which overcomes these issues by learning a model of each sense from a large amount of text obtained by searching the web. Web text is more natural and is a closer match to the text surronding web images than dictionary entries, which allows us to learn more robust models. Each dictionary sense is represented in the latent space of hidden “topics” learned empirically for the polysemous word. To evaluate our algorithm, we collect a dataset by searching the Yahoo Search engine for five polysemous words: “bass”, “face”, “mouse”, “speaker” and “watch”. Each of these words has anywhere from three to thirteen noun senses. Experimental evaluation on this dataset includes both retrieval and classification of unseen images into specific visual senses. 2 Model The inspiration for our method comes from the fact that text surrounding web images indexed by a polysemous keyword can be a rich source of information about the sense of that word. The main idea is to learn a probabilistic model of each sense, as defined by entries in a dictionary (in our case, Wordnet), from a large amount of unlabeled text. The use of a dictionary is key because it frees us from needing a labeled set of images to learn the visual sense model. Since this paper is concerned with objects rather than actions, we restrict ourselves to entries for nouns. Like standard word sense disambiguation (WSD) methods, we make a one-sense-perdocument assumption [14], and rely on words co-occurring with the image in the HTML document to indicate that sense. Our method consists of three steps: 1) discovering latent dimensions in text associated with a keyword, 2) learning probabilistic models of dictionary senses in that latent space, and 3) using the text-based sense models to construct sense-specific image classifiers. We will now describe each step in detail. 2.1 Latent Text Space Unlike words in text commonly used in WSD, image links are not guaranteed to be surrounded by grammatical prose. This makes it difficult to extract structured features such as part-of-speech tags. We therefore take a bag-of-words approach, using all available words near the image link to evaluate the probability of the sense. The first idea is to use a large collection of such bags-of-words to learn coherent dimensions which align with different senses or uses of the word. 2 We could use one of several existing techniques to discover latent dimensions in documents consisting of bags-of-words. We choose to use Latent Dirichlet Allocation, or LDA, as introduced by Blei et. al.[4]. LDA 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. Then, 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. The probability of generating a document is defined as P(w1, ..., wNd|φ, θd) = Nd Y i=1 K X z=1 P(wi|z, φ) P(z|θd) (1) Our initial approach was to learn hidden topics using LDA directly on the words surrounding the images. However, while the resulting topics were often aligned along sense boundaries, the approach suffered from over-fitting, due to the irregular quality and low quantity of the data. Often, the only clue to the image’s sense is a short text fragment, such as “fishing with friends” for an image returned for the query “bass”. To allieviate the overfitting problem, we instead create an additional dataset of text-only web pages returned from regular web search. We then learn an LDA model on this dataset and use the resulting distributions to train a model of the dictionary senses, described next. 2.2 Dictionary Sense Model We use the limited text available in the Wordnet entries to relate dictionary sense to topics formed above. For example, sense 1 of “bass” contains the definition “the lowest part of the musical range.” To these words we also add the synonyms (e.g., “pitch”), the hyponyms, if they exist, and the first-level hypernyms (e.g., “sound property”). We denote the bag-of-words extracted from such a dictionary entry for sense s as es = w1, w2, ..., wEs, where Es is the number of words in the bag. The model is trained as follows: Given a query word with sense s ∈{1, 2, ...S} we define the likelihood of a particular sense given the topic j as P(s|z = j) ≡1 Es Es X i=1 P(wi|z = j), (2) or the average likelihood of words in the definition. For a web image with an associated text document d = w1, w2, ..., wD, the model computes the probability of a particular sense as P(s|d) = K X j=1 P(s|z = j)P(z = j|d). (3) The above requires the distribution of LDA topics in the text context, P(z|d), which we compute by marginalizing across words and using Bayes’ rule: P(z = j|d) = D X i=1 P(z = j|wi) = D X i=1 P(wi|z = j)P(z = j) P(wi) , (4) and also normalizing for the length of the text context. Finally, we define the probability of a particular dictionary sense given the image to be equal to P(s|d). Thus, our model is able to assign sense probabilities to images returned from the search engine, which in turn allows us to group the images according to sense. 2.3 Visual Sense Model The last step of our algorithm uses the sense model learned in the first two steps to generate training data for an image-based classifier. The choice of classifier is not a crucial part of the algorithm. We choose to use a discriminative classifier, in particular, a support vector machine (SVM), because of its ability to generalize well in high-dimentional spaces without requiring a lot of training data. 3 Table 1: Dataset Description: sizes of the three datasets, and distribution of ground truth sense labels in the keyword dataset. category size of datasets distribution of labels in the keyword dataset text-only sense term keyword positive (good) negative (partial, unrelated) Bass 984 357 678 146 532 Face 961 798 756 130 626 Mouse 987 726 768 198 570 Speaker 984 2270 660 235 425 Watch 936 2373 777 512 265 For each particular sense s, the model re-ranks the images according to the probability of that sense, and selects the N highest-ranked examples as positive training data for the SVM. The negative training data is drawn from a “background” class, which in our case is the union of all other objects that we are asked to classify. We represent images as histograms of visual words, which are obtained by detecting local interest points and vector-quantizing their descriptors using a fixed visual vocabulary. We compare our model with a simple baseline method that attempts to refine the search by automatically generating search terms from the dictionary entry. Experimentally, it was found that queries consisting of more than about three terms returned very few images. Consequently, the terms are generated by appending the polysemous word to its synonyms and first-level hypernyms. For example, sense 4 of “mouse” has synonym “computer mouse” and hypernym “electronic device”, which produces the terms “computer mouse” and “mouse electronic device”. An SVM classifier is then trained on the returned images. 3 Datasets To train and evaluate the outlined algorithms, we use three datasets: image search results using the given keyword, image search results using sense-specific search terms, and text search results using the given keyword. The first dataset was collected automatically by issuing queries to the Yahoo Image SearchTM website and downloading the returned images and HTML web pages. The keywords used were: “bass”, “face”, “mouse”, “speaker” and “watch”. In the results, “bass” can refer to a fish or a musical term, as in “bass guitar”; “face” has a multitude of meanings, as in “human face”, “animal face”, “mountain face”, etc.; “speaker” can refer to audio speakers or human speakers; “watch” can mean a timepiece, the act of watching, as in “hurricane watch”, or the action, as in “watch out!” Samples that had dead page links and/or corrupted images were removed from the dataset. The images were labeled by a human annotator with one sense per keyword. The annotator labeled the presense of the following senses: “bass” as in fish, “face” as in a human face, “mouse” as in computer mouse, “speaker” as in an audio output device, and “watch” as in a timepiece. The annotator saw only the images, and not the text or the dictionary definitions. The labels used were 0 : unrelated, 1 : partial, or 2 : good. Images where the object was too small or occluded were labeled partial. For evaluation, we used only good labels as positive, and grouped partial and unrelated images into the negative class. The labels were only used in testing, and not in training. The second image search dataset was collected in a similar manner but using the generated sensespecific search terms. The third, text-only dataset was collected via regular web search for the original keywords. Neither of these two datasets were labeled. Table 1 shows the size of the datasets and distribution of labels. 4 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 [11]. 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 4 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 sense model ranges between 12K-20K words for different keywords. 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 [6] and scale-invariant salient points. In our experiments, we found that using both types of points boosts classficiation performance relative to using just one type. 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 scale-invariant salient points, we use the Harris-Laplace [10] 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 histograms over the resulting visual words. To be precise, the “visual words” are the cluster centers (codewords) of the codebook. No spatial information is included in the image representation, but rather it is treated as a bag-of-words. 5 Experiments 5.1 Re-ranking Image Search Results In the first set of experiments, we evaluate how well our text-based sense model can distinguish between images depicting the correct visual sense and all the other senses. We train a separate LDA model for each keyword on the text-only dataset, setting the number of topics K to 8 in each case. Although this number is roughly equal to the average number of senses for the given keywords, we do not expect nor require each topic to align with one particular sense. In fact, multiple topics can represent the same sense. Rather, we treat K as the dimensionality of the latent space that the model uses to represent senses. While our intuition is that it should be on the order of the number of senses, it can also be set automatically by cross-validation. In our initial experiments, different values of K did not significantly alter the results. To perform inference in LDA, a number of approximate inference algorithms can be applied. We use a Gibbs sampling approach of [7], implemented in the Matlab Topic Modeling Toolbox [13]. 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. The LDA model provides us with topic distributions P(w|z) and P(z). We complete training the model by computing P(s|z) for each sense s in Wordnet, as in Equation 2. We train a separate model for each keyword. We then compute P(s|d) for all text contexts d associated with images in the keyword dataset, using Equation 3, and rank the corresponding images according to the probability of each sense. Since we only have ground truth labels for a single sense per keyword (see Section 3), we evaluate the retrieval performance for that particular ground truth sense. Figure 2 shows the resulting ROCs for each keyword, computed by thresholding P(s|d). For example, the first plot shows ROCs obtained by the eight models corresponding to each of the senses of the keyword “bass”. The thick blue curve is the ROC obtained by the original Yahoo retrieval order. The other thick curves show the dictionary sense models that correspond to the ground truth sense (a fish). The results demonstrate that we are able to learn a useful sense model that retrieves far more positiveclass images than the original search engine order. This is important in order for the first step of our method to be able to improve the precision of training data used in the second step. Note that, for some keywords, there are multiple dictionary definitions that are difficult to distinguish visually, for example, “human face” and “facial expression”. In our evaluation, we did not make such finegrained distinctions, but simply chose the sense that applied most generally. In interactive applications, the human user can specify the intended sense of the word by providing an extra keyword, such as by saying or typing “bass fish”. The correct dictionary sense can then be selected by evaluating the probability of the extra keyword under each sense model, and choosing the highest-scoring one. 5 Figure 2: Retrieval of the ground truth sense from keyword search results. Thick blue lines are the ROCs for the original Yahoo search ranks. Other thick lines are the ROCs obtained by our dictionary model for the true senses, and thin lines are the ROCs obtained for the other senses. 5.2 Classifying Unseen Images The goal of the second set of experiments is to evaluate the dictionary-based object classifier. We train a classifier for the object corresponding to the ground-truth sense of each polysemous keyword in our data. The clasifiers are binary, assigning a positive label to the correct sense and a negative label to incorrect senses and all other objects. The top N unlabeled images ranked by the sense model are selected as positive training images. The unlabeled pool used in our model consists of both the keyword and the sense-term datasets. N negative images are chosen at random from positive data for all other keywords. A binary SVM with an RBF kernel is trained on the image features, with the C and γ parameters chosen by four-fold cross-validation. The baseline search-terms algorithm that we compare against is trained on a random sample of N images from the sense-term dataset. Recall 6 bass face mouse speaker watch 55% 65% 75% 85% terms dict (a) 1-SENSE test set bass face mouse speaker watch 55% 65% 75% 85% terms dict (b) MIX-SENSE test set 50 100 150 200 250 300 55% 65% 75% 85% N terms dict (c) 1-SENSE average vs. N Figure 3: Classification accuracy for the search-terms baseline (terms) and our dictionary model (dict). that this dataset was collected by simply searching with word combinations extracted from the target sense definition. Training on the first N images returned by Yahoo did not qualitatively change the results. We evaluate the method on two test cases. In the first case, the negative class consists of only the ground-truth senses of the other objects. We refer to this as the 1-SENSE test set. In the second case, the negative class also includes other senses of the given keyword. For example, we test detection of “computer mouse” among other keyword objects as well as “animal mouse”, “Mickey Mouse” and other senses returned by the search, including unrelated images. We refer to this as the MIX-SENSE test set. Figure 3 compares the classification accuracy of our classifier to the baseline search-terms classifier. Average accuracy across ten trials with different random splits into train and test sets is shown for each object. Figure 3(a) shows results on 1-SENSE and 3(b) on MIX-SENSE, with N equal to 250. Figure 3(c) shows 1-SENSE results averaged over the categories, at different numbers of training images N. In both test cases, our dictionary method significantly improves on the baseline algorithm. As the per-object results show, we do much better for three of the five objects, and comparably for the other two. One explanation why we do not see a large improvement in the latter cases is that the automatically generated sense-specific search terms happened to return relatively high-precision images. However, in the other three cases, the term generation fails while our model is still able to capture the dictionary sense. 6 Related Work A complete review of WSD work is beyond the scope of the present paper. Yarowsky [14] proposed an unsupervised WSD method, and suggested the use of dictionary definitions as an initial seed. Several approaches to building object models using image search results have been proposed, although none have specifically addressed polysemous words. Fei-Fei et. al. [9] bootstrap object classifiers from existing labeled image data. Fergus et. al. [6] cluster in the image domain and use a small validation set to select a single positive component. Schroff et. al. [12] incorporate text features (such as whether the keyword appears in the URL) and use them re-rank the images before training the image model. However, the text ranker is category-independent and does not learn which words are predictive of a specific sense. Berg et. al. [2] discover topics using LDA in the text domain, and then use them to cluster the images. However, their method requires manual intervention by the user to sort the topics into positive and negative for each category. The combination of image and text features is used in some web retrieval methods (e.g. [5]), however, our work is focused not on instance-based image retrieval, but on category-level modeling. A related problem is modeling images annotated with words, such as the caption “sky, airplane”, which are assigned by a human labeler. Barnard et. al. [1] use visual features to help disambiguate word senses in such loosely labeled data. Models of annotated images assume that there is a correspondence between each image region and a word in the caption (e.g. Corr-LDA, [3]). 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. In general, a text context word does not necessarily have a corresponding visual region, and vice versa. 7 In work closely related to Corr-LDA, a People-LDA [8] 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 text contexts. 7 Conclusion We introduced a model that uses a dictionary and text contexts of web images to disambiguate image senses. To the best of our knowledge, it is the first use of a dictionary in either web-based image retrieval or classifier learning. Our approach harnesses the large amount of unlabeled text available through keyword search on the web in conjunction with the dictionary entries to learn a generative model of sense. Our sense model is purely unsupervised, and is appropriate for web images. The use of LDA to discover a latent sense space makes the model robust despite the very limited nature of dictionary definitions. The definition text is used to learn a distribution over the empirical text topics that best represents the sense. As a final step, a discriminative classifier is trained on the re-ranked mixed-sense images that can predict the correct sense for novel images. We evaluated our model on a large dataset of over 10,000 images consisting of search results for five polysemous words. Experiments included retrieval of the ground truth sense and classification of unseen images. On the retrieval task, our dictionary model improved on the baseline search engine precision by re-ranking the images according to sense probability. On the classification task, our method outperformed a baseline method that attempts to refine the search by generating sense-specific search terms from Wordnet entries. Classification also improved when the test objects included the other senses of the keyword, making distinctions such as “loudspeaker” vs. “invited speaker”. Of course, we would not expect the dictionary senses to always produce accurate visual models, as many senses do not refer to objects (e.g. “bass voice”). Future work will include annotating the data with more senses to further explore the “visualness” of some of them. 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] 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. [4] D. Blei, A. Ng, and M. Jordan. Latent Dirichlet allocation. J. Machine Learning Research, 3:993-1022, Jan 2003. [5] 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. [6] R. Fergus, L. Fei-Fei, P. Perona, and A. Zisserman. Learning Object Categories from Google’s Image Search. In Proc. ICCV 2005. [7] T. Griffiths and M. Steyvers. Finding Scientific Topics. In Proc. of the National Academy of Sciences, 101 (suppl. 1), pages 5228-5235, 2004. [8] V. Jain, E. Learned-Miller, A. McCallum. People-LDA: Anchoring Topics to People using Face Recognition. In Proc. ICCV, 2007. [9] J. Li, G. Wang, and L. Fei-Fei. OPTIMOL: automatic Object Picture collecTion via Incremental MOdel Learning. In Proc. CVPR, 2007. [10] K. Mikolajczyk and C. Schmid. Scale and affine invariant interest point detectors. In Proc. IJCV, 2004. [11] M. Porter, An algorithm for suffix stripping, Program, 14(3) pp 130-137, 1980. [12] F. Schroff, A. Criminisi and A. Zisserman. Harvesting image databases from the web. In Proc. ICCV, 2007. [13] M. Steyvers and T. Griffiths. Matlab Topic Modeling Toolbox. http://psiexp.ss.uci.edu/research/programs_data/toolbox.htm [14] D. Yarowsky. Unsupervised word sense disambiguation rivaling supervised methods. ACL, 1995. 8
2008
219
3,475
Performance analysis for L2 kernel classification JooSeuk Kim Department of EECS University of Michigan Ann Arbor, MI, USA stannum@umich.edu Clayton D. Scott∗ Department of EECS University of Michigan Ann Arbor, MI, USA clayscot@umich.edu Abstract We provide statistical performance guarantees for a recently introduced kernel classifier that optimizes the L2 or integrated squared error (ISE) of a difference of densities. The classifier is similar to a support vector machine (SVM) in that it is the solution of a quadratic program and yields a sparse classifier. Unlike SVMs, however, the L2 kernel classifier does not involve a regularization parameter. We prove a distribution free concentration inequality for a cross-validation based estimate of the ISE, and apply this result to deduce an oracle inequality and consistency of the classifier on the sense of both ISE and probability of error. Our results also specialize to give performance guarantees for an existing method of L2 kernel density estimation. 1 Introduction In the binary classification problem we are given realizations (x1, y1), . . . , (xn, yn) of a jointly distributed pair (X, Y ), where X ∈Rd is a pattern and Y ∈{−1, +1} is a class label. The goal of classification is to build a classifier, i.e., a function taking X as input and outputting a label, such that some measure of performance is optimized. Kernel classifiers [1] are an important family of classifiers that have drawn much recent attention for their ability to represent nonlinear decision boundaries and to scale well with increasing dimension d. A kernel classifier (without offset) has the form g(x) = sign ( n X i=1 αiyik(x, xi) ) , where αi are parameters and k is a kernel function. For example, support vector machines (SVMs) without offset have this form [2], as does the standard kernel density estimate (KDE) plug-in rule. Recently Kim and Scott [3] introduced an L2 or integrated squared error (ISE) criterion to design the coefficients αi of a kernel classifier with Gaussian kernel. Their L2 classifier performs comparably to existing kernel methods while possesing a number of desirable properties. Like the SVM, L2 kernel classifiers are the solutions of convex quadratic programs that can be solved efficiently using standard decomposition algorithms. In addition, the classifiers are sparse, meaning most of the coefficients αi = 0, which has advantages for representation and evaluation efficiency. Unlike the SVM, however, there are no free parameters to be set by the user except the kernel bandwidth parameter. In this paper we develop statistical performance guarantees for the L2 kernel classifier introduced in [3]. The linchpin of our analysis is a new concentration inequality bounding the deviation of a cross-validation based ISE estimate from the true ISE. This bound is then applied to prove an oracle inequality and consistency in both ISE and probability of error. In addition, as a special case of ∗Both authors supported in part by NSF Grant CCF-0830490 1 our analysis, we are able to deduce performance guarantees for the method of L2 kernel density estimation described in [4, 5]. The ISE criterion has a long history in the literature on bandwidth selection for kernel density estimation [6] and more recently in parametric estimation [7]. The use of ISE for optimizing the weights of a KDE via quadratic programming was first described in [4] and later rediscovered in [5]. In [8], an ℓ1 penalized ISE criterion was used to aggregate a finite number of pre-determined densities. Linear and convex aggregation of densities, based on an L2 criterion, are studied in [9], where the densities are based on a finite dictionary or an independent sample. In contrast, our proposed method allows data-adaptive kernels, and does not require and independent (holdout) sample. In classification, some connections relating SVMs and ISE are made in [10], although no new algorithms are proposed. Finally, the “difference of densities” perspective has been applied to classification in other settings by [11], [12], and [13]. In [11] and [13], a difference of densities are used to find smoothing parameters or kernel bandwidths. In [12], conditional densities are chosen among a parameterized set of densities to maximize the average (bounded) density differences. Section 2 reviews the L2 kernel classifier, and presents a slight modification needed for our analysis. Our results are presented in Section 3. Conclusions are offered in the final section, and proofs are gathered in an appendix. 2 L2 Kernel Classification We review the previous work of Kim & Scott [3] and introduce an important modification. For convenience, we relabel Y so that it belongs to {1, −γ} and denote I+ = {i | Yi = +1} and I−= {i | Yi = −γ}. Let f−(x) and f+(x) denote the class-conditional densities of the pattern given the label. From decision theory, the optimal classifier has the form g∗(x) = sign {f+(x) −γf−(x)} , (1) where γ incorporates prior class probabilities and class-conditional error costs (in the Bayesian setting) or a desired tradeoff between false positives and false negatives [14]. Denote the “difference of densities” dγ(x) := f+(x) −γf−(x). The class-conditional densities are modelled using the Gaussian kernel as bf+ (x; α) = X i∈I+ αikσ (x, Xi) , bf−(x; α) = X i∈I− αikσ (x, Xi) with constraints α = (α1, . . . , αn) ∈A where A =   α | X i∈I+ αi = X i∈I− αi = 1, αi ≥0 ∀i   . The Gaussian kernel is defined as kσ (x, Xi) = ¡ 2πσ2¢−d/2 exp ½ −∥x −Xi∥2 2σ2 ¾ . The ISE associated with α is ISE (α) = ∥bdγ (x; α) −dγ (x) ∥2 L2 = Z ³ bdγ (x; α) −dγ (x) ´2 dx = Z bd2 γ (x; α) dx −2 Z bdγ (x; α) dγ (x) dx + Z d2 γ (x) dx. Since we do not know the true dγ (x), we need to estimate the second term in the above equation H (α) ≜ Z bdγ (x; α) dγ (x) dx (2) by Hn (α) which will be explained in detail in Section 2.1. Then, the empirical ISE is d ISE (α) = Z bd2 γ (x; α) dx −2Hn (α) + Z d2 γ (x) dx. (3) 2 Now, bα is defined as bα = arg min α∈A d ISE (α) (4) and the final classifier will be g (x) = ( +1, bdγ (x; bα) ≥0 −γ, bdγ (x; bα) < 0. 2.1 Estimation of H (α) In this section, we propose a method of estimating H (α) in (2). The basic idea is to view H (α) as an expectation and estimate it using a sample average. In [3], the resubstitution estimator for H (α) was used. However, since this estimator is biased, we use a leave-one-out cross-validation (LOOCV) estimator, which is unbiased and facilitates our theoretical analysis. Note that the difference of densities can be expressed as bdγ (x; α) = bf+ (x) −γ bf−(x) = n X i=1 αiYikσ (x, Xi) . Then, H (α) = Z bdγ (x; α) dγ (x) dx = Z bdγ (x; α) f+ (x) dx −γ Z bdγ (x; α) f−(x) dx = Z n X i=1 αiYikσ (x, Xi) f+ (x) dx −γ Z n X i=1 αiYikσ (x, Xi) f−(x) dx = n X i=1 αiYih (Xi) where h (Xi) ≜ Z kσ (x, Xi) f+ (x) dx −γ Z kσ (x, Xi) f−(x) dx. (5) We estimate each h (Xi) in (5) for i = 1, . . . , n using leave-one-out cross-validation bhi ≜          1 N+ −1 X j∈I+,j̸=i kσ (Xj, Xi) −γ N− X j∈I− kσ (Xj, Xi) , i ∈I+ 1 N+ X j∈I+ kσ (Xj, Xi) − γ N−−1 X j∈I−,j̸=i kσ (Xj, Xi) , i ∈I− where N+ = |I+| , N−= |I−|. Then, the estimate of H (α) is Hn (α) = Pn i=1 αiYibhi. 2.2 Optimization The optimization problem (4) can be formulated as a quadratic program. The first term in (3) is Z bd2 γ (x; α) dx = Z à n X i=1 αiYikσ (x, Xi) !2 dx = n X i=1 n X j=1 αiαjYiYj Z kσ (x, Xi) kσ (x, Xj) dx = n X i=1 n X j=1 αiαjYiYjk√ 2σ (Xi, Xj) by the convolution theorem for Gaussian kernels [15]. As we have seen in Section 2.1, the second term Hn (α) in (3) is linear in α and can be expressed as Pn i=1 αici where ci = Yibhi. Finally, since the third term does not depend on α, the optimization problem (4) becomes the following quadratic program (QP) bα = arg min α∈A 1 2 n X i=1 n X j=1 αiαjYiYjk√ 2σ (Xi, Xj) − n X i=1 ciαi. (6) The QP (6) is similar to the dual QP of the 2-norm SVM with hinge loss [2] and can be solved by a variant of the Sequential Minimal Optimization (SMO) algorithm [3]. 3 3 Statistical performance analysis In this section, we give theoretical performance analysis on our proposed method. We assume that {Xi}i∈I+ and {Xi}i∈I−are i.i.d samples from f+ (x) and f−(x), respectively, and treat N+ and N−as deterministic variables n+ and n−such that n+ →∞and n−→∞as n →∞. 3.1 Concentration inequality for Hn (α) Lemma 1. Conditioned on Xi, bhi is an unbiased estimator of h (Xi), i.e, E h bhi | Xi i = h (Xi) . Furthermore, for any ϵ > 0, P ½ sup α∈A |Hn (α) −H (α)| > ϵ ¾ ≤2n ³ e−c(n+−1)ϵ2 + e−c(n−−1)ϵ2´ where c = 2 ¡√ 2πσ ¢2d / (1 + γ)4. Lemma 1 implies that Hn (α) →H (α) almost surely for all α ∈A simultaneously, provided that σ, n+, and n−evolve as functions of n such that n+σ2d/ ln n →∞and n−σ2d/ ln n →∞. 3.2 Oracle Inequality Next, we establish on oracle inequality, which relates the performance of our estimator to that of the best possible kernel classifier. Theorem 1. Let ϵ > 0 and set δ = δ (ϵ) = 2n ³ e−c(n+−1)ϵ2 + e−c(n−−1)ϵ2´ where c = 2 ¡√ 2πσ ¢2d / (1 + γ)4. Then, with probability at least 1 −δ ISE (bα) ≤inf α∈A ISE (α) + 4ϵ. Proof. From Lemma 1, with probability at least 1 −δ ¯¯¯ISE (α) −d ISE (α) ¯¯¯ ≤2ϵ, ∀α ∈A by using the fact ISE (α)−d ISE (α) = 2 (Hn (α) −H (α)). Then, with probability at least 1−δ, for all α ∈A, we have ISE (bα) ≤d ISE (bα) + 2ϵ ≤d ISE (α) + 2ϵ ≤ISE (α) + 4ϵ where the second inequality holds from the definition of bα. This proves the theorem. 3.3 ISE consistency Next, we have a theorem stating that ISE (bα) converges to zero in probability. Theorem 2. Suppose that for f = f+ and f−, the Hessian Hf (x) exists and each entry of Hf (x) is piecewise continuous and square integrable. If σ, n+, and n−evolve as functions of n such that σ →0, n+σ2d/ ln n →∞, and n−σ2d/ ln n →∞, then ISE (bα) →0 in probability as n →∞ This result intuitively follows from the oracle inequality since the standard Parzen window density estimate is consistent and uniform weights are among the simplex A. The rigorous proof is omitted due to space limitations. 4 3.4 Bayes Error Consistency In classification, we are ultimately interested in minimizing the probability of error. Let us now assume {Xi}n i=1 is an i.i.d sample from f (x) = pf+ (x) + (1 −p)f−(x), where 0 < p < 1 is the prior probability of the positive class. The consistency with respect to the probability of error could be easily shown if we set γ to γ∗= 1−p p and apply Theorem 3 in [17]. However, since p is unknown, we must estimate γ∗. Note that N+ and N−are binomial random variables, and we may estimate γ∗as γ = N− N+ . The next theorem says the L2 kernel classifier is consistent with respect to the probability of error. Theorem 3. Suppose that the assumptions in Theorem 2 are satisfied. In addition, suppose that f−∈L2 (R), i.e. ∥f−∥L2 < ∞. Let γ = N−/N+ be an estimate of γ∗= 1−p p . If σ evolves as a function of n such that σ →0 and nσ2d/ ln n →∞as n →∞, then the L2 kernel classifier is consistent. In other words, given training data Dn = ((X1, Y1) , . . . , (Xn, Yn)), the classification error Ln = P n sgn n bdγ (X; bα) o ̸= Y | Dn o converges to the Bayes error L∗in probability as n →∞. The proof is given in Appendix A.2. 3.5 Application to density estimation By setting γ = 0, our goal becomes estimating f+ and we recover the L2 kernel density estimate of [4, 5] using leave-one-out cross-validation. Given an i.i.d sample X1, . . . , Xn from f (x), the L2 kernel density estimate of f (x) is defined as bf (x; bα) = n X i=1 bαikσ (x, Xi) with bαi’s optimized such that bα = arg min P αi=1 αi≥0 1 2 n X i=1 n X j=1 αiαjk√ 2σ (Xi, Xj) − n X i=1 αi   1 n −1 X j̸=i kσ (Xi, Xj)  . Our concentration inequality, oracle inequality, and L2 consistency result immediately extend to provide the same performance guarantees for this method. For example, we state the following corollary. Corollary 1. Suppose that the Hessian Hf (x) of a density function f (x) exists and each entry of Hf (x) is piecewise continuous and square integrable. If σ →0 and nσ2d/ ln n →∞as n →∞, then Z ³ bf (x; bα) −f (x) ´2 dx →0 in probability. 4 Conclusion Through the development of a novel concentration inequality, we have established statistical performance guarantees on a recently introduced L2 kernel classifier. We view the relatively clean analysis of this classifier as an attractive feature relative to other kernel methods. In future work, we hope to invoke the full power of the oracle inequality to obtain adaptive rates of convergence, and consistency for σ not necessarily tending to zero. 5 A Appendix A.1 Proof of Lemma 1 Note that for any given i, (kσ (Xj, Xi))j̸=i are independent and bounded by M = 1/ ¡√ 2πσ ¢d. For random vectors Z ∼f+ (x) and W ∼f−(x), h (Xi) in (5) can be expressed as h (Xi) = E [kσ (Z, Xi) | Xi] −γE [kσ (W, Xi) | Xi] . Since Xi ∼f+ (x) for i ∈I+ and Xi ∼f−(x) for i ∈I−, it can be easily shown that E h bhi | Xi i = h (Xi) . For i ∈I+, P ½¯¯bhi −h (Xi) ¯¯ > ϵ ¯¯¯¯ Xi = x ¾ ≤ P ½¯¯¯¯ 1 n+ −1 X j∈I+,j̸=i kσ (Xj, Xi) −E [kσ (Z, Xi) | Xi] ¯¯¯¯ > ϵ 1 + γ ¯¯¯¯ Xi = x ¾ + P ½¯¯¯¯ γ n− X j∈I− kσ (Xj, Xi) −γE [kσ (W, Xi) | Xi] ¯¯¯¯ > γϵ 1 + γ ¯¯¯¯ Xi = x ¾ (7) By Hoeffding’s inequality [16], the first term in (7) is P ½¯¯¯¯ X j∈I+,j̸=i kσ (Xj, Xi) −(n+ −1)E [kσ (Z, Xi) | Xi] ¯¯¯¯ > (n+ −1) ϵ 1 + γ ¯¯¯¯ Xi = x ¾ = P ½¯¯¯¯ X j∈I+,j̸=i kσ (Xj, Xi) −E · X j∈I+,j̸=i kσ (Xj, Xi) | Xi ¸¯¯¯¯ > (n+ −1) ϵ 1 + γ ¯¯¯¯ Xi = x ¾ = P ½¯¯¯¯ X j∈I+,j̸=i kσ (Xj, Xi) −E · X j∈I+,j̸=i kσ (Xj, Xi) | Xi ¸¯¯¯¯ > (n+ −1) ϵ 1 + γ ¯¯¯¯ Xi = x ¾ ≤ 2e−2(n+−1)ϵ2/(1+γ)2M 2. The second term in (7) is P ½¯¯¯¯ X j∈I− kσ (Xj, Xi) −n−E [kσ (W, Xi) | Xi] ¯¯¯¯ > n−ϵ 1 + γ ¯¯¯¯ Xi = x ¾ = P ½¯¯¯¯ X j∈I− kσ (Xj, Xi) −E · X j∈I− kσ (Xj, Xi) | Xi ¸¯¯¯¯ > n−ϵ 1 + γ ¯¯¯¯ Xi = x ¾ ≤ 2e−2n−ϵ2/(1+γ)2M 2 ≤2e−2(n−−1)ϵ2/(1+γ)2M 2. Therefore, P n¯¯¯bhi −h (Xi) ¯¯¯ ≥ϵ o = E · P ½¯¯¯bhi −h (Xi) ¯¯¯ ≥ϵ ¯¯¯¯ Xi = X ¾¸ ≤2e−2(n+−1)ϵ2/(1+γ)2M 2 + 2e−2(n−−1)ϵ2/(1+γ)2M 2. In a similar way, it can be shown that for i ∈I−, P n¯¯¯bhi −h (Xi) ¯¯¯ > ϵ o ≤2e−2(n+−1)ϵ2/(1+γ)2M 2 + 2e−2(n−−1)ϵ2/(1+γ)2M 2. 6 Then, P ½ sup α∈A |Hn (α) −H (α)| > ϵ ¾ = P ( sup α∈A ¯¯¯¯¯ n X i=1 αiYi ³ bhi −h (Xi) ´¯¯¯¯¯ > ϵ ) ≤ P ( sup α∈A n X i=1 αi |Yi| ¯¯¯bhi −h (Xi) ¯¯¯ > ϵ ) = P ½ sup α∈A n X i∈I+ αi ¯¯¯bhi −h (Xi) ¯¯¯ + n X i∈I− αiγ ¯¯¯bhi −h (Xi) ¯¯¯ > ϵ ¾ ≤ P ½ sup α∈A n X i∈I+ αi ¯¯¯bhi −h (Xi) ¯¯¯ > ϵ 1 + γ ¯¯¯¯ B ¾ + P ½ sup α∈A n X i∈I− αiγ ¯¯¯bhi −h (Xi) ¯¯¯ > γϵ 1 + γ ¯¯¯¯ B ¾ = P ½ max i∈I+ ¯¯¯bhi −h (Xi) ¯¯¯ > ϵ 1 + γ ¯¯¯¯ B ¾ + P ½ max i∈I− ¯¯¯bhi −h (Xi) ¯¯¯ > ϵ 1 + γ ¯¯¯¯ B ¾ = P ½ [ i∈I+ ½¯¯¯bhi −h (Xi) ¯¯¯ > ϵ 1 + γ ¾ ¯¯¯¯ B ¾ + P ½ [ i∈I− ½¯¯¯bhi −h (Xi) ¯¯¯ > ϵ 1 + γ ¾ ¯¯¯¯ B ¾ ≤ X i∈I+ P ½¯¯¯bhi −h (Xi) ¯¯¯ > ϵ 1 + γ ¯¯¯¯ B ¾ + X i∈I− P ½¯¯¯bhi −h (Xi) ¯¯¯ > ϵ 1 + γ ¯¯¯¯ B ¾ ≤ n+ ³ 2e−2(n+−1)ϵ2/(1+γ)4M 2 + 2e−2(n−−1)ϵ2/(1+γ)4M 2´ + n− ³ 2e−2(n+−1)ϵ2/(1+γ)4M 2 + 2e−2(n−−1)ϵ2/(1+γ)4M 2´ = n ³ 2e−2(n+−1)ϵ2/(1+γ)4M 2 + 2e−2(n−−1)ϵ2/(1+γ)4M 2´ . A.2 Proof of Theorem 3 From Theorem 3 in [17], it suffices to show that Z ³ bdγ (x; bα) −dγ∗(x) ´2 dx →0 in probability. Since from the triangle inequality ∥bdγ (x; bα) −dγ∗(x) ∥L2 = ∥bdγ (x; bα) −dγ (x) + (γ −γ∗) f−(x) ∥L2 ≤∥bdγ (x; bα) −dγ (x) ∥L2 + ∥(γ −γ∗) f−(x) ∥L2 = p ISE (bα) + |γ −γ∗| · ∥f−(x) ∥L2, we need to show that ISE (bα) and γ converges in probability to 0 and γ∗, respectively. The convergence of γ to γ∗can be easily shown from the strong law of large numbers. In the previous analyses, we have shown the convergence of ISE (bα) by treating N+, N−and γ as deterministic variables but now we turn to the case where these variables are random. Define an event D = n N+ ≥np 2 , N−≥n(1−p) 2 , γ ≤2γ∗o . For any ϵ > 0, P {ISE (bα) > ϵ} ≤P © Dcª + P © ISE (bα) > ϵ, D ª . The first term converges to 0 from the strong law of large numbers. Let define a set S = © (n+, n−) ¯¯ n+ ≥np 2 , n−≥n(1−p) 2 , n− n+ ≤2γ∗ª . Then, P © ISE (bα) > ϵ, D ª = X P © ISE (bα) > ϵ, D ¯¯ N+ = n+, N−= n− ª · P {N+ = n+, N−= n−} = X (n+,n−)∈S P © ISE (bα) > ϵ ¯¯ N+ = n+, N−= n− ª · P {N+ = n+, N−= n−} ≤ max (n+,n−)∈S P © ISE (bα) > ϵ ¯¯ N+ = n+, N−= n− ª . (8) 7 Provided that σ →0 and nσ2d/ ln n →∞, any pair (n+, n−) ∈S satisfies σ →0, n+σ2d/ ln n → ∞, and n−σ2d/ ln n →∞as n →∞and thus the term in (8) converges to 0 from Theorem 2. This proves the theorem. References [1] B. Sch¨olkopf and A. J. Smola, Learning with Kernels, MIT Press, Cambridge, MA, 2002. [2] C. Cortes and V. Vapnik, “Support-vector networks,” Machine Learning, vol. 20, no. 3, pp. 273–297, 1995. [3] J. Kim and C. Scott, “Kernel classification via integrated squared error,” IEEE Workshop on Statistical Signal Processing, August 2007. [4] D. Kim, Least Squares Mixture Decomposition Estimation, unpublished doctoral dissertation, Dept. of Statistics, Virginia Polytechnic Inst. and State Univ., 1995. [5] Mark Girolami and Chao He, “Probability density estimation from optimally condensed data samples,” IEEE Transactions on Pattern Analysis and Machine Intelligence, vol. 25, no. 10, pp. 1253–1264, OCT 2003. [6] B.A. Turlach, “Bandwidth selection in kernel density estimation: A review,” Technical Report 9317, C.O.R.E. and Institut de Statistique, Universit´e Catholique de Louvain, 1993. [7] David W.Scott, “Parametric statistical modeling by minimum integrated square error,” Technometrics 43, pp. 274–285, 2001. [8] A.B. Tsybakov F. Bunea and M.H. Wegkamp, “Sparse density estimation with l1 penalties,” Proceedings of 20th Annual Conference on Learning Theory, COLT 2007, Lecture Notes in Artificial Intelligence, v4539, pp. 530– 543, 2007. [9] Ph. Rigollet and A.B. Tsybakov, “Linear and convex aggregation of density estimators,” https:// hal.ccsd.cnrs.fr/ccsd-00068216, 2004. [10] Robert Jenssen, Deniz Erdogmus, Jose C.Principe, and Torbjørn Eltoft, “Towards a unification of information theoretic learning and kernel method,” in Proc. IEEE Workshop on Machine Learning for Signal Processing (MLSP2004), Sao Luis, Brazil. [11] Peter Hall and Matthew P.Wand, “On nonparametric discrimination using density differeces,” Biometrika, vol. 75, no. 3, pp. 541–547, Sept 1988. [12] P. Meinicke, T. Twellmann, and H. Ritter, “Discriminative densities from maximum contrast estimation,” in Advances in Neural Information Proceeding Systems 15, Vancouver, Canada, 2002, pp. 985–992. [13] M. Di Marzio and C.C. Taylor, “Kernel density classification and boosting: an l2 analysis,” Statistics and Computing, vol. 15, pp. 113–123(11), April 2005. [14] E. Lehmann, Testing statistical hypotheses, Wiley, New York, 1986. [15] M.P. Wand and M.C. Jones, Kernel Smoothing, Chapman & Hall, 1995. [16] L. Devroye and G. Lugosi, “Combinatorial methods in density estimation,” 2001. [17] Charles T. Wolverton and Terry J. Wagner, “Asymptotically optimal discriminant fucntions for pattern classification,” IEEE Trans. Info. Theory, vol. 15, no. 2, pp. 258–265, Mar 1969. 8
2008
22
3,476
Extended Grassmann Kernels for Subspace-Based Learning Jihun Hamm GRASP Laboratory University of Pennsylvania Philadelphia, PA 19104 jhham@seas.upenn.edu Daniel D. Lee GRASP Laboratory University of Pennsylvania Philadelphia, PA 19104 ddlee@seas.upenn.edu Abstract Subspace-based learning problems involve data whose elements are linear subspaces of a vector space. To handle such data structures, Grassmann kernels have been proposed and used previously. In this paper, we analyze the relationship between Grassmann kernels and probabilistic similarity measures. Firstly, we show that the KL distance in the limit yields the Projection kernel on the Grassmann manifold, whereas the Bhattacharyya kernel becomes trivial in the limit and is suboptimal for subspace-based problems. Secondly, based on our analysis of the KL distance, we propose extensions of the Projection kernel which can be extended to the set of affine as well as scaled subspaces. We demonstrate the advantages of these extended kernels for classification and recognition tasks with Support Vector Machines and Kernel Discriminant Analysis using synthetic and real image databases. 1 Introduction In machine learning problems the data often live in a vector space, typically a Euclidean space. However, there are many other kinds of non-Euclidean spaces suitable for data outside this conventional context. In this paper we focus on the domain where each data sample is a linear subspace of vectors, rather than a single vector, of a Euclidean space. Low-dimensional subspace structures are commonly encountered in computer vision problems. For example, the variation of images due to the change of pose, illumination, etc, is well-aproximated by the subspace spanned by a few “eigenfaces”. More recent examples include the dynamical system models of video sequences from human actions or time-varying textures, represented by the linear span of the observability matrices [1, 14, 13]. Subspace-based learning is an approach to handle the data as a collection of subspaces instead of the usual vectors. The appropriate data space for the subspace-based learning is the Grassmann manifold G(m, D), which is defined as the set of m-dimensional linear subspaces in RD. In particular, we can define positive definite kernels on the Grassmann manifold, which allows us to treat the space as if it were a Euclidean space. Previously, the Binet-Cauchy kernel [17, 15] and the Projection kernel [16, 6] have been proposed and demonstrated the potential for subspace-based learning problems. On the other hand, the subspace-based learning problem can be approached purely probabilistically. Suppose the set of vectors are i.i.d samples from an arbitrary probability distribution. Then it is possible to compare two such distributions of vectors with probabilistic similarity measures, such as the KL distance1, the Chernoff distance, or the Bhattacharyya/Hellinger distance, to name a few [11, 7, 8, 18]. Furthermore, the Bhattacharyya affinity is indeed a positive definite kernel function on the space of distributions and have nice closed-form expressions for the exponential family [7]. 1by distance we mean any nonnegative measure of similarity and not necessarily a metric. 1 In this paper, we investigate the relationship between the Grassmann kernels and the probabilistic distances. The link is provided by the probabilistic generalization of subspaces with a Factor Analyzer which is a Gaussian ‘blob’ that has nonzero volume along all dimensions. Firstly, we show that the KL distance yields the Projection kernel on the Grassmann manifold in the limit of zero noise, whereas the Bhattacharyya kernel becomes trivial in the limit and is suboptimal for subspace-based problems. Secondly, based on our analysis of the KL distance, we propose an extension of the Projection kernel which is originally confined to the set of linear subspaces, to the set of affine as well as scaled subspaces. We will demonstrate the extended kernels with the Support Vector Machines and the Kernel Discriminant Analysis using synthetic and real image databases. The proposed kernels show the better performance compared to the previously used kernels such as Binet-Cauchy and the Bhattacharyya kernels. 2 Probabilistic subspace distances and kernels In this section we will consider the two well-known probabilistic distances, the KL distance and the Bhattacharyya distance, and establish their relationships to the Grassmann kernels. Although these probabilistic distances are not restricted to specific distributions, we will model the data distribution as the Mixture of Factor Analyzers (MFA) [4]. If we have i = 1, ..., N sets in the data, then each set is considered as i.i.d. samples from the i-th Factor Analyzer x ∼pi(x) = N(ui, Ci), Ci = YiY ′ i + σ2ID, (1) where ui ∈RD is the mean, Yi is a full-rank D × m matrix (D > m), and σ is the ambient noise level. The FA model is a practical substitute for a Gaussian distribution in case the dimensionality D of the images is greater than the number of samples n in a set. Otherwise it is impossible to estimate the full covariance C nor invert it. More importantly, we use the FA distribution to provide the link between the Grassmann manifold and the space of probabilistic distributions. In fact a linear subspace can be considered as the ‘flattened’ (σ →0) limit of a zero-mean (ui = 0), homogeneous (Y ′ i Yi = Im) FA distribution. We will look at the limits of the KL distance and the Bhattacharyya kernel under this condition. 2.1 KL distance in the limit The (symmetrized) KL distance is defined as JKL(p1, p2) = Z [p1(x) −p2(x)] log p1(x) p2(x) dx. (2) Let Ci = σ2I + YiY ′ i be the covariance matrix, and define eYi = Yi(σ2I + Y ′ i Yi)−1/2, and eZ = 2−1/2[eY1 eY2]. In this case the KL distance is JKL(p1, p2) = 1 2tr(−eY ′ 1 eY1 −eY ′ 2 eY2) + σ−2 2 tr(Y ′ 1Y1 + Y ′ 2Y2 −eY ′ 1Y2Y ′ 2 eY1 −eY ′ 2Y1Y ′ 1 eY2) + σ−2 2 (u1 −u2)′  2ID −eY1 eY ′ 1 −eY2 eY ′ 2  (u1 −u2). (3) Under the subspace condition (σ →0, ui = 0, Y ′ i Yi = Im, i = 1, ..., N), the KL distance simplifies to JKL(p1, p2) = 1 2(−2 m σ2 + 1) + σ−2 2  2m −2 1 σ2 + 1tr(Y ′ 1Y2Y ′ 2Y1)  = 1 2σ2(σ2 + 1)(2m −2tr(Y ′ 1Y2Y ′ 2Y1)) We can ignore the multiplying factors which do not depend on Y1 or Y2, and rewrite the distance as JKL(p1, p2) = 2m −2tr(Y ′ 1Y2Y ′ 2Y1). We immediately realize that the distance JKL(p1, p2) coincides with the definition of the squared Projection distance [2, 16, 6], with the corresponding Projection kernel kProj(Y1, Y2) = tr(Y ′ 1Y2Y ′ 2Y1). (4) 2 2.2 Bhattacharyya kernel in the limit Jebara and Kondor [7, 8] proposed the Probability Product kernel kProb(p1, p2) = Z [p1(x) p2(x)]α dx (α > 0) (5) which includes the Bhattacharyya kernel as a special case. Under the subspace condition (σ →0, ui = 0, Y ′ i Yi = Im, i = 1, ..., N) the kernel kProb becomes kProb(p1, p2) = π(1−2α)D2−αDα−D/2 σ2α(m−D)+D (σ2 + 1)αm det(I2m −eY ′ eY )−1/2 (6) ∝ det  Im − 1 (2σ2 + 1)2 Y ′ 1Y2Y ′ 2Y1 −1/2 . (7) Suppose the two subspaces span(Y1) and span(Y2) intersect only at the origin, that is, the singular values of Y ′ 1Y2 are strictly less than 1. In this case kProb has a finite value as σ →0 and the inversion of (7) is well-defined. In contrast, the diagonal terms of kProb become kProb(Y1, Y1) = det  (1 − 1 (2σ2 + 1)2 )Im −1/2 =  (2σ2 + 1)2 4σ2(σ2 + 1) m/2 , (8) which diverges to infinity as σ →0. This implies that after normalizing the kernel by the diagonal terms, the resulting kernel becomes a trivial kernel ˜kProb(Yi, Yj) =  1, span(Yi) = span(Yj) 0, otherwise , as σ →0. (9) The derivations are detailed in the thesis [5]. As we claimed earlier, the Probability Product kernel, including the Bhattacharyya kernel, loses its discriminating power as the distributions become close to subspaces. 3 Extended Projection Kernel Based on the analysis of the previous section, we will extend the Projection kernel (4) to more general spaces than the Grassmann manifold in this section. We will examine the two directions of extension: from linear to affine, and from homogeneous to scaled subspaces. 3.1 Extension to affine subspaces An affine subspace in RD is a linear subspace with an ‘offset’ . In that sense a linear subspace is simply an affine subspace with a zero offset. Analogously to the (linear) Grassmann manifold, we can define an affine Grassmann manifold as the set of all m-dim affine subspaces in RD space 2. The affine span is defined from the orthonormal basis Y ∈RD×m and an offset u ∈RD by aspan(Y, u) ≜{x | x = Y v + u, ∀v ∈Rm}. (10) By definition, the representation of an affine space by (Y, u) is not unique and there is an invariant condition for the equivalent of representations: Definition 1 (invariance to representations). aspan(Y1, u1) = aspan(Y2, u2) if and only if span(Y1) = span(Y2) and Y ⊥ 1 (Y ⊥ 1 )′u1 = Y ⊥ 2 (Y ⊥ 2 )′u2, where Y ⊥is any orthonormal basis for the orthogonal complement of span(Y ). Similarly to the definition of Grassmann kernels [6], we can now formally define the affine Grassmann kernel as follows. Let k : (Rm×D × RD) × (Rm×D × RD) →R be a real valued symmetric function k(Y1, u1, Y2, u2) = k(Y2, u2, Y1, u1). 2The Grassmann manifold is defined as a quotient space O(D)/O(m) × O(D −m) where O is the orthogonal group. The affine Grassmann manifold is similarly defined as E(D)/E(m) × O(D −m), where E is the Euclidean group. Fore more explanations, please refer to [5]. 3 Definition 2. A real valued symmetric function k is an affine Grassmann kernel if it is positive definite and invariant to different representations: k(Y1, u1, Y2, u2) = k(Y3, u3, Y4, u4) for any Y1, Y2, Y3, Y4, and u1, u2, u3, u4 such that aspan(Y1, u1) = aspan(Y3, u3) and aspan(Y2, u2) = aspan(Y4, u4). With this definition we check if the KL distance in the limit suggests an affine Grassmann kernel. The KL distance with the homogeneity condition only Y ′ 1Y1 = Y ′ 2Y2 = Im becomes, JKL(p1, p2) → 1 2σ2 [2m −2tr(Y ′ 1Y2Y ′ 2Y1) + (u1 −u2)′ (2ID −Y1Y ′ 1 −Y2Y ′ 2) (u1 −u2)] . Ignoring the multiplicative factor, the first term is the same is the original Projection kernel, which we will denote as the ‘linear’ kernel to emphasize the underlying assumption: kLin(Y1, Y2) = tr(Y1Y ′ 1Y2Y ′ 2), (11) The second term give rise to a new ‘kernel’ ku(Y1, u1, Y2, u2) = u′ 1(2ID −Y1Y ′ 1 −Y2Y ′ 2)u2, (12) which measures the similarity of the offsets u1 and u2 scaled by 2I −Y1Y ′ 1 −Y2Y ′ 2. However, this term is not invariant under the invariance condition unfortunately. We instead propose the slight modification: k(Y1, u1, Y2, u2) = u′ 1(I −Y1Y ′ 1)(I −Y2Y ′ 2)u2 The proof of the proposed form being invariant and positive definite is straightforward and is omitted. Combined with the linear term kLin, this defines the new ‘affine’ kernel kAff(Y1, u1, Y2, u2) = tr(Y1Y ′ 1Y2Y ′ 2) + u′ 1(I −Y1Y ′ 1)(I −Y2Y ′ 2)u2. (13) As we can see, the KL distance with only the homogeneity condition has two terms related to the subspace Y and the offset u. This suggests a general construction rule for affine kernels. If we have two separate positive kernels for subspaces and for offsets, we can add or multiply them together to construct new kernels [10]. 3.2 Extension to scaled subspaces We have assumed homogeneous subspace so far. However, if the subspaces are computed from the PCA of real data, the eigenvalues in general will have non-homogeneous values. To incorporate these scales for affine subspaces, we now allow the Y to be non-orthonormal and check if the resultant kernel is still valid. Let Yi be a full-rank D × m matrix, and bYi = Yi(Y ′ i Yi)−1/2 be the orthonormalization of Yi. Ignoring the multiplicative factors, the limiting (σ →0) ‘kernel’ from (3) becomes k = 1 2tr(bY1 bY ′ 1Y2Y ′ 2 + Y1Y ′ 1 bY2 bY ′ 2) + u′ 1(2I −bY1 bY ′ 1 −bY2 bY ′ 2)u2, which is again not well-defined. The second term is the same as (12) in the previous subsection, and can be modified in the same way to ku = u′ 1(I −bY1 bY ′ 1)(I −bY2 bY ′ 2)u2. The first term is not positive definite, and there are several ways to remedy it. We propose to use the following form k(Y1, Y2) = 1 2tr(Y1 bY ′ 1 bY2Y ′ 2 + bY1Y ′ 1Y2 bY ′ 2) = tr(bY ′ 1 bY2Y ′ 2Y1), among other possibilities. The sum of the two modified terms, is the proposed ‘affine scaled’ kernel: kAffSc(Y1, u1, Y2, u2) = tr(Y1 bY ′ 1 bY2Y ′ 2) + u′ 1(I −bY1 bY ′ 1)(I −bY2 bY ′ 2)u2. (14) This is a positive definite kernel which can be shown from the definition. 4 Summary of the extended Projection kernels The proposed kernels are summarized below. Let Yi be a full-rank D × m matrix, and let bYi = Yi(Y ′ i Yi)−1/2 the orthonormalization of Yi as before. kLin(Y1, Y2) = tr(bY ′ 1 bY2 bY ′ 2 bY1), kLinSc(Y1, Y2) = tr(bY ′ 1 bY2Y ′ 2Y1) kAff(Y1, Y2) = tr(bY ′ 1 bY2 bY ′ 2 bY1) + u′ 1(I −bY1 bY ′ 1)(I −bY2 bY ′ 2)u2 kAffSc(Y1, Y2) = tr(bY ′ 1 bY2Y ′ 2Y1) + u′ 1(I −bY1 bY ′ 1)(I −bY2 bY ′ 2)u2 (15) We also spherize the kernels ek(Y1, u1, Y2, u2) = k(Y1, u1, Y2, u2) k(Y1, u1, Y1, u1)−1/2 k(Y2, u2, Y2, u2)−1/2 so that k(Y1, u1, Y1, u1) = 1 for any Y1 and u1. There is a caveat in implementing these kernels. Although we used the same notations Y and bY for both linear and affine kernels, they are different in computation. For linear kernels the Y and bY are computed from data assuming u = 0, whereas for affine kernels the Y and bY are computed after removing the estimated mean u from the data. 3.3 Extension to nonlinear subspaces A systematic way of extending the Projection kernel from linear/affine subspaces to nonlinear spaces is to use an implicit map via a kernel function, where the latter kernel is to be distinguished from the former kernels. Note that the proposed kernels (15) can be computed only from the inner products of the column vectors of Y ’s and u’s including the orthonormalization procedure. If we replace the inner products of those vectors y′ iyi by a positive definite function f(yi, yj) on Euclidean spaces, this implicitly defines a nonlinear feature space. This ‘doubly kernel’ approach has already been proposed for the Binet-Cauchy kernel [17, 8] and for probabilistic distances in general [18]. We can adopt the trick for the extended Projection kernels as well to extend the kernels to operate on ‘nonlinear subspaces’3. 4 Experiments with synthetic data In this section we demonstrate the application of the extended Projection kernels to two-class classification problems with Support Vector Machines (SVMs). 4.1 Synthetic data The extended kernels are defined under different assumptions of data distribution. To test the kernels we generate three types of data – ‘easy’, ‘intermediate’ and ‘difficult’ – from MFA distribution, which cover the different ranges of data distribution. A total of N = 100 FA distributions are generated in D = 10 dimensional space. The parameters of each FA distribution pi(x) = N(ui, Ci) are randomly chosen such that • ‘Easy’ data have well separarted means ui and homogeneous scales Y ′ i Yi • ‘Intermediate’ data have partially overlapping means ui and homogeneous scales Y ′ i Yi • ‘Difficult’ data have totally overlapping means (u1 = ... = uN = 0) and randomly chosen scales between 0 and 1. The class label for each distribution pi is assigned as follows. We choose a pair of distribution p+ and p−which are the farthest apart from each other among all pairs of distributions. Then the labels of the remaining distributions pi are determined from whether they are close to p+ or p−. The distances are measured by the KL distance JKL. 3the preimage corresponding to the linear subspaces in the RKHS via the feature map 5 4.2 Algorithms and results We compare the performance of the Euclidean SVM with linear/ polynomial/ RBF kernels and the performance of SVM with Grassmann kernels. To test the original SVMs, we randomly sampled n = 50 point from each FA distribution pi(x). We evaluate the algorithm with N-fold cross validation by holding out one set and training with the other N −1 sets. The polynomial kernel used is k(x1, x2) = (⟨x1, x2⟩+ 1)3. To test the Grassmann SVM, we first estimated the mean ui and the basis Yi from n = 50 points of each FA distribution pi(x) used for the original SVM. The Yi, µi and σ are estimated simply from the probabilistic PCA [12], although they can also be estimated by the Expectation Maximization approach. Six different Grassmann kernels are compared: 1) the original and the extended Projection kernels (Linear, Linear Scaled, Affine, Affine Scaled), 2) the Binet-Cauchy kernel kBC(Y1, Y2) = (det Y ′ 1Y2)2 = det Y ′ 1Y2Y ′ 2Y1, and 3) the Bhattacharyya kernel kBhat(p1, p2) = R [p1(x) p2(x)]1/2 dx adapted for FA distributions. We evaluate the algorithms with leave-one-out test by holding out one subspace and training with the other N −1 subspaces. Table 1: Classification rates of the Euclidean SVMs and the Grassmann SVMs. The BC and Bhat are short for Binet-Cauchy and Bhattacharyya kernels, respectively. Euclidean Grassmann Probabilistic Linear Poly Linear Lin Sc Aff Aff Sc BC Bhat Easy 84.63 79.85 55.10 55.30 92.70 92.30 54.70 46.10 Intermediate 62.40 61.76 68.10 67.50 85.20 83.60 60.90 59.00 Difficult 52.00 63.74 80.10 81.00 80.30 81.20 68.90 77.30 Table 1 shows the classification rates of the Euclidean SVMs and the Grassmann SVMs, averaged for 10 trials. The results shows that best rates are obtained from the extended kernels, and the Euclidean kernels lag behind for all three types of data. Interestingly the polynomial kernels often perform worse than the linear kernels, and the RBF kernel performed even worse which we do not report. For the ‘difficult’ data where the means are zero, the linear SVMs degrade to the chancelevel (50%), which agrees with the intuitive picture that any decision hyperplane that passes the origin will roughly halve the points from a zero-mean distribution. As expected, the linear kernel is inappropriate for data with nonzero offsets (‘easy’ and ‘intermediate’), whereas the affine kernel performs well regardless of the offsets. However, there is no significant difference between the homogeneous and the scaled kernels. The Binet-Cauchy and the Bhattacharyya kernels mostly underperformed. We conclude that under certain conditions the extended kernels have clear advantages over the original linear kernels and the Euclidean kernels for the subspace-based classification problem. 5 Experiments with real-world data In this section we demonstrate the application of the extended Projection kernels to recognition problems with the kernel Fisher Discriminant Analysis [10]. 5.1 Databases The Yale face database and the Extended Yale face database [3] together consist of pictures of 38 subjects with 9 different poses and 45 different lighting conditions. The ETH-80 [9] is an object database designed for object categorization test under varying poses. The database consists of pictures of 8 object categories and 10 object instances for each category, recored under 41 different poses. 6 These databases have naturally factorized structures which make them ideal to test subspace-based learning algorithms with. In Yale Face database, a set consists of images of all illumination conditions a person at a fixed pose. By treating the set as a point in the Grassmann manifold, we can perform illumination-invarint learning tasks with the data. For ETH-80 database, a set consists of images of all possible poses of an object from a category. Also by treating such set as a point in the Grassmann manifold, we can perform pose-invariant learning tasks with the data. There are a total of N = 279 and 80 sets as described above respectively. The images are resized to the dimension of D = 504 and 1024 respectively, and the maximum of m = 9 dimensional subspaces are used to compute the kernels. The subspace parameters Yi, ui and σ are estimated from the probabilistic PCA [12]. 5.2 Algorithms and results We perform subject recognition tests with Yale Face, and categorization tests with ETH-80 database. Since these databases are highly multiclass (31 and 8 classes) relative to the total number of samples, we use the kernel Discriminant Analysis to reduce dimensionality and extract features, in conjunction with a 1-NN classifier. The six different Grassmann kernels are compared: the extended Projection (Lin/LinSc/Aff/Affsc) kernels, the Binet-Cauchy kernel, and the Bhattacharyya kernel. The baseline algorithm (Eucl) is the Linear Discriminant Analysis applied to the original images in the data from which the subspaces are computed. Figure 1 summarizes the average recognition/categoriazation rates from 9- and 10-fold cross validation with the Yale Face and ETH-80 databases respectively. The results shows that best rates are achieved from the extended kernels: linear scaled kernel in Yale Face and the affine kernel in ETH80. However the difference within the extended kernels are small. The performance of the extended kernels remain relatively unaffected by the subspace dimensionality, which is a convenient property in practice since we do not know the true dimensionality a priori. However the Binet-Cauchy and the Bhattacharyya kernels do not perform as well, and degrade fast as the subspace dimension increases. The analysis of the poor performance are given in the thesis [5]. 6 Conclusion In this paper we analyzed the relationship between probabilistic distances and the geometric Grassmann kernels, especially the KL distance and the Projection kernel. This analysis help us to understand the limitations of the Bhattacharyya kernel for subspace-based problems, and also suggest the extensions of the Projection kernel. With synthetic and real data we demonstrated that the extended kernels can outperform the original Projection kernel, as well as the previously used Bhattacharyya and the Binet-Cauchy kernels for subspace-based classification problems. The relationship between other probabilistic distances and the Grassmann kernels is yet to be fully explored, and we expect to see more results from a follow-up study. References [1] Gianfranco Doretto, Alessandro Chiuso, Ying Nian Wu, and Stefano Soatto. Dynamic textures. Int. J. Comput. Vision, 51(2):91–109, 2003. [2] Alan Edelman, Tom´as A. Arias, and Steven T. Smith. The geometry of algorithms with orthogonality constraints. SIAM J. Matrix Anal. Appl., 20(2):303–353, 1999. [3] Athinodoros S. Georghiades, Peter N. Belhumeur, and David J. Kriegman. From few to many: Illumination cone models for face recognition under variable lighting and pose. IEEE Trans. Pattern Anal. Mach. Intell., 23(6):643–660, 2001. [4] Zoubin Ghahramani and Geoffrey E. Hinton. The EM algorithm for mixtures of factor analyzers. Technical Report CRG-TR-96-1, Department of Computer Science, University of Toronto, 21 1996. [5] Jihun Hamm. Subspace-based Learning with Grassmann Manifolds. Ph.D thesis in Electrical and Systems Engineering, University of Pennsylvania, 2008. Available at http://www.seas.upenn.edu/ jhham/Papers/thesis-jh.pdf. [6] Jihun Hamm and Daniel Lee. Grassmann discriminant analysis: a unifying view on subspace-based learning. In Int. Conf. Mach. Learning, 2008. 7 1 3 5 7 9 40 50 60 70 80 90 100 Yale Face subspace dimension (m) rate (%) Eucl Lin LinSc Aff AffSc BC Bhat 1 3 5 7 9 40 50 60 70 80 90 100 ETH!80 subspace dimension (m) rate (%) Eucl Lin LinSc Aff AffSc BC Bhat Figure 1: Comparison of Grassmann kernels for face recognition/ object categorization tasks with kernel discriminant analysis. The extended Projection kernels (Lin/LinSc/Aff/ AffSc) outperform the baseline method (Eucl) and the Binet-Cauchy (BC) and the Bhattacharyya (Bhat) kernels. [7] Tony Jebara and Risi Imre Kondor. Bhattacharyya expected likelihood kernels. In COLT, pages 57–71, 2003. [8] Risi Imre Kondor and Tony Jebara. A kernel between sets of vectors. In Proc. of the 20th Int. Conf. on Mach. Learn., pages 361–368, 2003. [9] Bastian Leibe and Bernt Schiele. Analyzing appearance and contour based methods for object categorization. CVPR, 02:409, 2003. [10] Bernhard Sch¨olkopf and Alexander J. Smola. Learning with Kernels: Support Vector Machines, Regularization, Optimization, and Beyond. MIT Press, Cambridge, MA, USA, 2001. [11] Gregory Shakhnarovich, John W. Fisher, and Trevor Darrell. Face recognition from long-term observations. In Proc. of the 7th Euro. Conf. on Computer Vision, pages 851–868, London, UK, 2002. [12] Michael E. Tipping and Christopher M. Bishop. Probabilistic principal component analysis. Journal Of The Royal Statistical Society Series B, 61(3):611–622, 1999. [13] Pavan Turaga, Ashok Veeraraghavan, and Rama Chellappa. Statistical analysis on Stiefel and Grassmann manifolds with applications in computer vision. In CVPR, 2008. [14] Ashok Veeraraghavan, Amit K. Roy-Chowdhury, and Rama Chellappa. Matching shape sequences in video with applications in human movement analysis. IEEE Trans. Pattern Anal. Mach. Intell., 27(12):1896–1909, 2005. [15] S.V.N. Vishwanathan and Alexander J. Smola. Binet-Cauchy kernels. In NIPS, 2004. [16] Liwei Wang, Xiao Wang, and Jufu Feng. Subspace distance analysis with application to adaptive bayesian algorithm for face recognition. Pattern Recogn., 39(3):456–464, 2006. [17] Lior Wolf and Amnon Shashua. Learning over sets using kernel principal angles. J. Mach. Learn. Res., 4:913–931, 2003. [18] Shaohua Kevin Zhou and Rama Chellappa. From sample similarity to ensemble similarity: Probabilistic distance measures in Reproducing Kernel Hilbert Space. IEEE Trans. Pattern Anal. Mach. Intell., 28(6):917–929, 2006. 8
2008
220
3,477
Implicit Mixtures of Restricted Boltzmann Machines Vinod Nair and Geoffrey Hinton Department of Computer Science, University of Toronto 10 King’s College Road, Toronto, M5S 3G5 Canada {vnair,hinton}@cs.toronto.edu Abstract We present a mixture model whose components are Restricted Boltzmann Machines (RBMs). This possibility has not been considered before because computing the partition function of an RBM is intractable, which appears to make learning a mixture of RBMs intractable as well. Surprisingly, when formulated as a third-order Boltzmann machine, such a mixture model can be learned tractably using contrastive divergence. The energy function of the model captures threeway interactions among visible units, hidden units, and a single hidden discrete variable that represents the cluster label. The distinguishing feature of this model is that, unlike other mixture models, the mixing proportions are not explicitly parameterized. Instead, they are defined implicitly via the energy function and depend on all the parameters in the model. We present results for the MNIST and NORB datasets showing that the implicit mixture of RBMs learns clusters that reflect the class structure in the data. 1 Introduction A typical mixture model is composed of a number of separately parameterized density models each of which has two important properties: 1. There is an efficient way to compute the probability density (or mass) of a datapoint under each model. 2. There is an efficient way to change the parameters of each model so as to maximize or increase the sum of the log probabilities it assigns to a set of datapoints. The mixture is created by assigning a mixing proportion to each of the component models and it is typically fitted by using the EM algorithm that alternates between two steps. The E-step uses property 1 to compute the posterior probability that each datapoint came from each of the component models. The posterior is also called the “responsibility” of each model for a datapoint. The M-step uses property 2 to update the parameters of each model to raise the responsibility-weighted sum of the log probabilities it assigns to the datapoints. The M-step also changes the mixing proportions of the component models to match the proportion of the training data that they are responsible for. Restricted Boltzmann Machines [5] model binary data-vectors using binary latent variables. They are considerably more powerful than mixture of multivariate Bernoulli models 1 because they allow many of the latent variables to be on simultaneously so the number of alternative latent state vectors is exponential in the number of latent variables rather than being linear in this number as it is with a mixture of Bernoullis. An RBM with N hidden units can be viewed as a mixture of 2N Bernoulli models, one per latent state vector, with a lot of parameter sharing between the 2N component models and with the 2N mixing proportions being implicitly determined by the same parameters. 1A multivariate Bernoulli model consists of a set of probabilities, one per component of the binary data vector. 1 Hidden units Visible units Wij i j (a) Hidden units Visible units 1-of-K activation i j k Wijk K component RBMs (b) Hidden units Visible units Wijk 1-of-K activation i j k (c) Figure 1: (a) Schematic representation of an RBM, (b) an implicit mixture of RBMs as a third-order Boltzmann machine, (c) schematic representation of an implicit mixture. It can also be viewed as a product of N “uni-Bernoulli” models (plus one Bernoulli model that is implemented by the visible biases). A uni-Bernoulli model is a mixture of a uniform and a Bernoulli. The weights of a hidden unit define the ith probability in its Bernoulli model as pi = σ(wi), and the bias, b, of a hidden unit defines the mixing proportion of the Bernoulli in its uni-Bernoulli as σ(b), where σ(x) = (1 + exp(−x))−1. The modeling power of an RBM can always be increased by increasing the number of hidden units [10] or by adding extra hidden layers [12], but for datasets that contain several distinctly different types of data, such as images of different object classes, it would be more appropriate to use a mixture of RBM’s. The mixture could be used to model the raw data or some preprocessed representation that has already extracted features that are shared by different classes. Unfortunately, RBM’s cannot easily be used as the components of mixture models because they lack property 1: It is easy to compute the unnormalized density that an RBM assigns to a datapoint, but the normalization term is exponentially expensive to compute exactly and even approximating it is extremely time-consuming [11]. There is also no efficient way to modify the parameters of an RBM so that the log probability of the data is guaranteed to increase, but there are good approximate methods [5] so this is not the main problem. This paper describes a way of fitting a mixture of RBM’s without explicitly computing the partition function of each RBM. 2 The model We start with the energy function for a Restricted Boltzmann Machine (RBM) and then modify it to define the implicit mixture of RBMs. To simplify the description, we assume that the visible and hidden variables of the RBM are binary. The formulation below can be easily adapted to other types of variables (e.g., see [13]). The energy function for a Restricted Boltzmann Machine (RBM) is E(v, h) = − X i,j W R ij vihj, (1) where v is a vector of visible (observed) variables, h is a vector of hidden variables, and W R is a matrix of parameters that capture pairwise interactions between the visible and hidden variables. Now consider extending this model by including a discrete variable z with K possible states, represented as a K-dimensional binary vector with 1-of-K activation. Defining the energy function in terms of three-way interactions among the components of v, h, and z gives E(v, h, z) = − X i,j,k W I ijkvihjzk, (2) where W I is a 3D tensor of parameters. Each slice of this tensor along the z-dimension is a matrix that corresponds to the parameters of each of the K component RBMs. The joint distribution for the mixture model is P(v, h, z) = exp(−E(v, h, z)) ZI , (3) 2 where ZI = X u,g,y exp(−E(u, g, y)) (4) is the partition function of the implicit mixture model. Re-writing the joint distribution in the usual mixture model form gives P(v) = X h,z P(v, h, z) = K X k=1 X h P(v, h|zk = 1)P(zk = 1). (5) Equation 5 defines the implicit mixture of RBMs. P(v, h|zk = 1) is the kth component RBM’s distribution, with W R being the kth slice of W I. Unlike in a typical mixture model, the mixing proportion P(zk = 1) is not a separate parameter in our model. Instead, it is implicitly defined via the energy function in equation 2. Changing the bias of the kth unit in z changes the mixing proportion of the kth RBM, but all of the weights of all the RBM’s also influence it. Figure 1 gives a visual description of the implicit mixture model’s structure. 3 Learning Given a set of N training cases {v1, ..., vN}, we want to learn the parameters of the implicit mixture model by maximizing the log likelihood L = PN n=1 log P(vn) with respect to W I. We use gradient-based optimization to do this. The expression for the gradient is ∂L ∂W I = N ∂E(v, h, z) ∂W I  P (v,h,z) − N X n=1 ∂E(vn, h, z) ∂W I  P (h,z|vn) , (6) where ⟨⟩P () denotes an expectation with respect to the distribution P(). The two expectations in equation 6 can be estimated by sample means if unbiased samples can be generated from the corresponding distributions. The conditional distribution P(h, z|vα) is easy to sample from, but sampling the joint distribution P(v, h, z) requires prolonged Gibbs sampling and is intractable in practice. We get around this problem by using the contrastive divergence (CD) learning algorithm [5], which has been found to be effective for training a variety of energy-based models (e.g. [8],[9],[13],[4]). Sampling the conditional distributions: We now describe how to sample the conditional distributions P(h, z|v) and P(v|h, z), which are the main operations required for CD learning. The second case is easy: given zk = 1, we select the kth component RBM of the mixture model and then sample from its conditional distribution Pk(v|h). The bipartite structure of the RBM makes this distribution factorial. So the ith visible unit is drawn independently of the other units from the Bernoulli distribution P(vi = 1|h, zk = 1) = 1 1 + exp(−P j W I ijkhj). (7) Sampling P(h, z|v) is done in two steps. First, the K-way discrete distribution P(z|v) is computed (see below) and sampled. Then, given zk = 1, we select the kth component RBM and sample from its conditional distribution Pk(h|v). Again, this distribution is factorial, and the jth hidden unit is drawn from the Bernoulli distribution P(hj = 1|v, zk = 1) = 1 1 + exp(−P i W I ijkvi). (8) To compute P(z|v) we first note that P(zk = 1|v) ∝exp(−F(v, zk = 1)), (9) where the free energy F(v, zk = 1) is given by F(v, zk = 1) = − X j log(1 + exp( X i W I ijkvi)). (10) 3 If the number of possible states of z is small enough, then it is practical to compute the quantity F(v, zk = 1) for every k by brute-force. So we can compute P(zk = 1|v) = exp(−F(v, zk = 1)) P l exp(−F(v, zl = 1)). (11) Equation 11 defines the responsibility of the kth component RBM for the data vector v. Contrastive divergence learning: Below is a summary of the steps in the CD learning for the implicit mixture model. 1. For a training vector v+, pick a component RBM by sampling the responsibilities P(zk = 1|v+). Let l be the index of the selected RBM. 2. Sample h+ ∼Pl(h|v+). 3. Compute the outer product D+ l = v+hT +. 4. Sample v−∼Pl(v|h+). 5. Pick a component RBM by sampling the responsibilities P(zk = 1|v−). Let m be the index of the selected RBM. 6. Sample h−∼Pm(h|v−). 7. Compute the outer product D− m = v−hT −. Repeating the above steps for a mini-batch of Nb training cases results in two sets of outer products for each component k in the mixture model: S+ k = {D+ k1, ..., D+ kM} and S− k {D− k1, ..., D− kL}. Then the approximate likelihood gradient (averaged over the mini-batch) for the kth component RBM is 1 Nb ∂L ∂W I k ≈1 Nb   M X i=1 D+ ki − L X j=1 D− kj  . (12) Note that to compute the outer products D+ and D−for a given training vector, the component RBMs are selected through two separate stochastic picks. Therefore the sets S+ k and S− k need not be of the same size because the choice of the mixture component can be different for v+ and v−. Scaling free energies with a temperature parameter: In practice, the above learning algorithm causes all the training cases to be captured by a single component RBM, and the other components to be left unused. This is because free energy is an unnormalized quantity that can have very different numerical scales across the RBMs. One RBM may happen to produce much smaller free energies than the rest because of random differences in the initial parameter values, and thus end up with high responsibilities for most training cases. Even if all the component RBMs are initialized to the exact same initial parameter values, the problem can still arise after a few noisy weight updates. The solution is to use a temperature parameter T when computing the responsibilities: P(zk = 1|v) = exp(−F(v, zk = 1)/T) P l exp(−F(v, zl = 1)/T). (13) By choosing a large enough T, we can make sure that random scale differences in the free energies do not lead to the above collapse problem. One possibility is to start with a large T and then gradually anneal it as learning progresses. In our experiments we found that using a constant T works just as well as annealing, so we keep it fixed. 4 Results We apply the implicit mixture of RBMs to two datasets, MNIST [1] and NORB [7]. MNIST is a set of handwritten digit images belonging to ten different classes (the digits 0 to 9). NORB contains stereo-pair images of 3D toy objects taken under different lighting conditions and viewpoints. There are five classes of objects in this set (human, car, plane, truck and animal). We use MNIST mainly as a sanity check, and most of our results are for the much more difficult NORB dataset. Evaluation method: Since computing the exact partition function of an RBM is intractable, it is not possible to directly evaluate the quality of our mixture model’s fit to the data, e.g., by computing 4 Figure 2: Features of the mixture model with five component RBMs trained on all ten classes of MNIST images. the log probability of a test set under the model. Recently it was shown that Annealed Importance Sampling can be used to tractably approximate the partition function of an RBM [11]. While this is an attractive option to consider in future work, for this paper we use the computationally cheaper approach of evaluating the model by using it in a classification task. Classification accuracy is then used as an indirect quantitative measure of how good the model is. A reasonable evaluation criterion for a mixture modelling algorithm is that it should be able to find clusters that are mostly ‘pure’ with respect to class labels. That is, the set of data vectors that a particular mixture component has high responsibilities for should have the same class label. So it should be possible to accurately predict the class label of a given data vector from the responsibilities of the different mixture components for that vector. Once a mixture model is fully trained, we evaluate it by training a classifier that takes as input the responsibilities of the mixture components for a data vector and predicts its class label. The goodness of the mixture model is measured by the test set prediction accuracy of this classifier. 4.1 Results for MNIST Before attempting to learn a good mixture model of the whole MNIST dataset, we tried two simpler modeling tasks. First, we fitted an implicit mixture of two RBM’s with 100 hidden units each to an unlabelled dataset consisting of 4,000 twos and 4,000 threes. As we hoped, almost all of the two’s were modelled by one RBM and almost all of the threes by the other. On 2042 held-out test cases, there were only 24 errors when an image was assigned the label of the most probable RBM. This compares very favorably with logistic regression which needs 8000 labels in addition to the images and gives 36 errors on the test set even when using a penalty on the squared weights whose magnitude is set using a validation set. Logistic regression also gives a good indication of the performance that could be expected from fitting a mixture of two Gaussians with a shared covariance matrix, because logistic regression is equivalent to fitting such a mixture discriminatively. We then tried fitting an implicit mixture model with only five component RBMs, each with 25 hidden units, to the entire training set. We purposely make the model very small so that it is possible to visually inspect the features and the responsibilities of the component RBMs and understand what each component is modelling. This is meant to qualitatively confirm that the algorithm can learn a sensible clustering of the MNIST data. (Of course, the model will have poor classification accuracy as there are more classes than clusters, so it will merge multiple classes into a single cluster.) The features of the component RBMs are shown in figure 2 (top row). The plots in the bottom row show the fraction of training images for each of the ten classes that are hard-assigned to each component. The learning algorithm has produced a sensible mixture model in that visually similar digit classes are combined under the same mixture component. For example, ones and eights require many similar features, so they are captured with a single RBM (leftmost in fig. 2). Similarly, images of fours, sevens, and nines are all visually similar, and they are modelled together by one RBM (middle of fig. 2). 5 We have also trained larger models with many more mixture components. As the number of components increase, we expect the model to partition the image space more finely, with the different components specializing on various sub-classes of digits. If they specialize in a way that respects the class boundaries, then their responsibilities for a data vector will become a better predictor of its class label. The component RBMs use binary units both in the visible and hidden layers. The image dimensionality is 784 (28 × 28 pixels). We have tried various settings for the number of mixture components (from 20 to 120 in steps of 20) and a component’s hidden layer size (50, 100, 200, 500). Classification accuracy increases with more components, until 80 components. Additional components give slightly worse results. The hidden layer size is set to 100, but 200 and 500 also produce similar accuracies. Out of the 60,000 training images in MNIST, we use 50,000 to train the mixture model and the classifier, and the remaining 10,000 as a validation set for early stopping. The final models are then tested on a separate test set of 10,000 images. Once the mixture model is trained, we train a logistic regression classifier to predict the class label from the responsibilities2. It has as many inputs as there are mixture components, and a ten-way softmax over the class labels at the output. With 80 components, there are only 80 · 10 + 10 = 810 parameters in the classifier (including the 10 output biases). In our experiments, classification accuracy is consistently and significantly higher when unnormalized responsibilities are used as the classifier input, instead of the actual posterior probabilities of the mixture components given a data vector. These unnormalized values have no proper probabilistic interpretation, but nevertheless they allow for better classification, so we use them in all our experiments. Table 1: MNIST Test set error rates. Logistic regression % Test classifier input error Unnormalized 3.36% responsibilities Pixels 7.28% Table 1 shows the classification error rate of the resulting classifier on the MNIST test set. As a simple baseline comparison, we train a logistic regression classifier that predicts the class label from the raw pixels. This classifier has 784 · 10 + 10 = 7850 parameters and yet the mixture-based classifier has less than half the error rate. The unnormalized responsibilities therefore contain a significant amount of information about the class labels of the images, which indicates that the implicit mixture model has learned clusters that mostly agree with the class boundaries, even though it is not given any class information during training. 4.2 Results for NORB NORB is a much more difficult dataset than MNIST because the images are of very different classes of 3D objects (instead of 2D patterns) shown from different viewpoints and under various lighting conditions. The pixels are also no longer binary-valued, but instead span the grayscale range [0, 255]. So binary units are no longer appropriate for the visible layer of the component RBMs. Gaussian visible units have previously been shown to be effective for modelling grayscale images [6], and therefore we use them here. See [6] for details about Gaussian units. As in that paper, the variance of the units is fixed to 1, and only their means are learned. Learning an RBM with Gaussian visible units can be slow, as it may require a much greater number of weight updates than an equivalent RBM with binary visible units. This problem becomes even worse in our case since a large number of RBMs have to be trained simultaneously. We avoid it by first training a single RBM with Gaussian visible units and binary hidden units on the raw pixel data, and then treating the activities of its hidden layer as pre-processed data to which the implicit mixture model is applied. Since the hidden layer activities of the pre-processing RBM are binary, the mixture model can now be trained efficiently with binary units in the visible layer3. Once trained, the low-level RBM acts as a fixed pre-processing step that converts the raw grayscale images into 2Note that the mixture model parameters are kept fixed when training the classifier, so the learning of the mixture model is entirely unsupervised. 3We actually use the real-valued probabilities of the hidden units as the data, and we also use real-valued probabilities for the reconstructions. On other tasks, the learning gives similar results using binary values sampled from these real-valued probabilities but is slower. 6 Binary data Gaussian visible units (raw pixel data) i j Pre-processing transformation Wij Hidden units Wjmk 1-of-K activation m k Figure 3: Implicit mixture model used for MNORB. binary vectors. Its parameters are not modified further when training the mixture model. Figure 3 shows the components of the complete model. A difficulty with training the implicit mixture model (or any other mixture model) on NORB is that the ‘natural’ clusters in the dataset correspond to the six lighting conditions instead of the five object classes. The objects themselves are small (in terms of area) relative to the background, while lighting affects the entire image. Any clustering signal provided by the object classes will be weak compared to the effect of large lighting changes. So we simplify the dataset slightly by normalizing the lighting variations across images. Each image is multiplied by a scalar such that all images have the same average pixel value. This significantly reduces the interference of the lighting on the mixture learning4. Finally, to speed up experiments, we subsample the images from 96 × 96 to 32 × 32 and use only one image of the stereo pair. We refer to this dataset as ‘Modified NORB’ or ‘MNORB’. It contains 24,300 training images and an equal number of test images. From the training set, 4,300 are set aside as a validation set for early stopping. We use 2000 binary hidden units for the preprocessing RBM, so the input dimensionality of the implicit mixture model is 2000. We have tried many different settings for the number of mixture components and the hidden layer size of the components. The best classification results are given by 100 components, each with 500 hidden units. This model has about 100 · 500 · 2000 = 108 parameters, and takes about 10 days to train on an Intel Xeon 3Ghz processor. Table 2 shows the test set error rates for a logistic regression classifier trained on various input representations. Mixture of Factor Analyzers (MFA) [3] is similar to the implicit mixture of RBMs in that it also learns a clustering while simultaneously learning a latent representation per cluster component. But it is a directed model based on linear-Gaussian representations, and it can be learned tractably by maximizing likelihood with EM. We train MFA on the raw pixel data of MNORB. The MFA model that gives the best classification accuracy (shown in table 2) has 100 component Factor Analyzers with 100 factors each. (Note that simply making the number of learnable parameters equal is not enough to match the capacities of the different models because RBMs use binary latent representations, while FAs use continuous representations. So we cannot strictly control for capacity when comparing these models.) A mixture of multivariate Bernoulli distributions (see e.g. section 9.3.3 of [2]) is similar to an implicit mixture model whose component RBMs have no hidden units and only visible biases as trainable parameters. The differences are that a Bernoulli mixture is a directed model, it has explicitly parameterized mixing proportions, and maximum likelihood learning with EM is tractable. We train this model with 100 components on the activation probabilities of the preprocessing RBM’s hidden units. The classification error rate for this model is shown in table 2. 4The normalization does not completely remove lighting information from the data. A logistic regression classifier can still predict the lighting label with 18% test set error when trained and tested on normalized images, compared to 8% error for unnormalized images. 7 Table 2: MNORB Test set error rates for a logistic regression classifier with different types of input representations. Logistic regression classifier input % Test error Unnormalized responsibilities computed 14.65% by the implicit mixture of RBMs Probabilities computed by the transformation Wij in 16.07% fig 3 (i.e. the pre-processed representation) Raw pixels 20.60% Unnormalized responsibilities of an MFA model 22.65% trained on the pre-processed representation in fig 3 Unnormalized responsibilities of an MFA 24.57% model trained on raw pixels Unnormalized responsibilities of a Mixture of Bernoullis model trained on the pre-processed 28.53% representation in fig 3 These results show that the implicit mixture of RBMs has learned clusters that reflect the class structure in the data. By the classification accuracy criterion, the implicit mixture is also better than MFA. The results also confirm that the lack of explicitly parameterized mixing proportions does not prevent the implicit mixture model from discovering interesting cluster structure in the data. 5 Conclusions We have presented a tractable formulation of a mixture of RBMs. That such a formulation is even possible is a surprising discovery. The key insight here is that the mixture model can be cast as a third-order Boltzmann machine, provided we are willing to abandon explicitly parameterized mixing proportions. Then it can be learned tractably using contrastive divergence. As future work, it would be interesting to explore whether these ideas can be extended to modelling time-series data. References [1] Mnist database, http://yann.lecun.com/exdb/mnist/. [2] C. M. Bishop. Pattern Recognition and Machine Learning. Springer, 2006. [3] Z. Ghahramani and G. E. Hinton. The em algorithm for mixtures of factor analyzers. Technical Report CRG-TR-96-1, Dept. of Computer Science, University of Toronto, 1996. [4] X. He, R. S. Zemel, and M. A. Carreira-Perpinan. Multiscale conditional random fields for image labeling. In CVPR, pages 695–702, 2004. [5] G. E. Hinton. Training products of experts by minimizing contrastive divergence. Neural Computation, 14(8):1711–1800, 2002. [6] G. E. Hinton and R. Salakhutdinov. Reducing the dimensionality of data with neural networks. Science, 313:504–507, 2006. [7] Y. LeCun, F. J. Huang, and L. Bottou. Learning methods for generic object recognition with invariance to pose and lighting. In CVPR, Washington, D.C., 2004. [8] S. Roth and M. J. Black. Fields of experts: A framework for learning image priors. In CVPR, pages 860–867, 2005. [9] S. Roth and M. J. Black. Steerable random fields. In ICCV, 2007. [10] N. Le Roux and Y. Bengio. Representational power of restricted boltzmann machines and deep belief networks. Neural Computation, To appear. [11] R. Salakhutdinov and I. Murray. On the quantitative analysis of deep belief networks. In ICML, Helsinki, 2008. [12] I. Sutskever and G. E. Hinton. Deep narrow sigmoid belief networks are universal approximators. Neural Computation, To appear. [13] M. Welling, M. Rosen-Zvi, and G. E. Hinton. Exponential family harmoniums with an application to information retrieval. In NIPS 17, 2005. 8
2008
221
3,478
Self-organization using synaptic plasticity Vicenc¸ G´omez1 vgomez@iua.upf.edu Andreas Kaltenbrunner2 andreas.kaltenbrunner@upf.edu Hilbert J Kappen1 b.kappen@science.ru.nl Vicente L´opez2 vicente.lopez@barcelonamedia.org 1Department of Biophysics Radboud University Nijmegen 6525 EZ Nijmegen, The Netherlands 2Barcelona Media - Innovation Centre Av. Diagonal 177, 08018 Barcelona, Spain Abstract Large networks of spiking neurons show abrupt changes in their collective dynamics resembling phase transitions studied in statistical physics. An example of this phenomenon is the transition from irregular, noise-driven dynamics to regular, self-sustained behavior observed in networks of integrate-and-fire neurons as the interaction strength between the neurons increases. In this work we show how a network of spiking neurons is able to self-organize towards a critical state for which the range of possible inter-spike-intervals (dynamic range) is maximized. Self-organization occurs via synaptic dynamics that we analytically derive. The resulting plasticity rule is defined locally so that global homeostasis near the critical state is achieved by local regulation of individual synapses. 1 Introduction It is accepted that neural activity self-regulates to prevent neural circuits from becoming hyper- or hypoactive by means of homeostatic processes [14]. Closely related to this idea is the claim that optimal information processing in complex systems is attained at a critical point, near a transition between an ordered and an unordered regime of dynamics [3, 11, 9]. Recently, Kinouchi and Copelli [8] provided a realization of this claim, showing that sensitivity and dynamic range of a network are maximized at the critical point of a non-equilibrium phase transition. Their findings may explain how sensitivity over high dynamic ranges is achieved by living organisms. Self-Organized Criticality (SOC) [1] has been proposed as a mechanism for neural systems which evolve naturally to a critical state without any tuning of external parameters. In a critical state, typical macroscopic quantities present structural or temporal scale-invariance. Experimental results [2] show the presence of neuronal avalanches of scale-free distributed sizes and durations, thus giving evidence of SOC under suitable conditions. A possible regulation mechanism may be provided by synaptic plasticity, as proposed in [10], where synaptic depression is shown to cause the mean synaptic strengths to approach a critical value for a range of interaction parameters which grows with the system size. In this work we analytically derive a local synaptic rule that can drive and maintain a neural network near the critical state. According to the proposed rule, synapses are either strengthened or weakened whenever a post-synaptic neuron receives either more or less input from the population than the required to fire at its natural frequency. This simple principle is enough for the network to selforganize at a critical region where the dynamic range is maximized. We illustrate this using a model of non-leaky spiking neurons with delayed coupling for which a phase transition was analyzed in [7]. 1 2 The model The model under consideration was introduced in [12] and can be considered as an extension of [15, 5]. The state of a neuron i at time t is encoded by its activation level ai(t), which performs at discrete timesteps a random walk with positive drift towards an absorbing barrier L. This spontaneous evolution is modelled using a Bernoulli process with parameter p. When the threshold L is reached, the states of the other units j in the network are increased after one timestep by the synaptic efficacy ǫji, ai is reset to 1, and the unit i remains insensitive to incoming spikes during the following timestep. The evolution of a neuron i can be described by the following recursive rules: ai(t + 1) =              ai(t) + N X j=1,j̸=i ǫijHL(aj(t)) + 1 with probability p ai(t) + N X j=1,j̸=i ǫijHL(aj(t)) with probability 1 −p if ai(t) < L ai(t + 1) = 1 + N X j=1,j̸=i ǫijHL(aj(t)) if ai(t) ≥L (1) where HL(x) is the Heaviside step function: HL(x) = 1 if x ≥L, and 0 otherwise. Using the mean synaptic efficacy: ⟨ǫ⟩= PN i PN j,j̸=i ǫij/(N(N −1)) we describe the degree of interaction between the units with the following characteristic parameter: η = L −1 (N −1)⟨ǫ⟩, (2) which indicates whether the spontaneous dynamics (η > 1) or the message interchange mechanism (η ≤1) dominates the behavior of the system. As illustrated in the right raster-plot of Figure 1, at η > 1 neurons fire irregularly as independent oscillators, whereas at η = 1 (central raster-plot) they synchronize into several phase-locked clusters. The lower η, the less clusters can be observed. For η = 0.5 the network is fully synchronized (left raster-plot). In [7] it is shown that the system undergoes a phase transition around the critical value η = 1. The study provides upper (τmax) and lower bounds (τmin) for the mean inter-spike-interval (ISI) τ of the ensemble and shows that the range of possible ISIs taking the average network behavior (∆τ = τmax-τmin) is maximized at η = 1. This is illustrated in Figure 1 and has been observed as well in [8] for a similar neural model. The average of the mean ISI ⟨τ⟩is of order N x with exponent x = 1 for η > 1, x = 0.5 for η = 1, and x = 0 for η < 1 as N →∞, and can be approximated as shown in [7] with 1: τapp = 1 + L −1 −N⟨ǫ⟩ 2p + sL −1 −N⟨ǫ⟩ 2p + 1 2 + N⟨ǫ⟩ 2p . (3) 3 Self-organization using synaptic plasticity We now introduce synaptic dynamics in the model. We first present the dissipated spontaneous evolution, a magnitude also maximized at η = 1. The gradient of this magnitude turns to be simple analytically and leads to a plasticity rule that can be expressed using only local information encoded in the post-synaptic unit. 3.1 The dissipated spontaneous evolution During one ISI, we distinguish between the spontaneous evolution carried out by a unit and the actual spontaneous evolution needed for a unit to reach the threshold L. The difference of both quantities can be regarded as a surplus of spontaneous evolution, which is dissipated during an ISI. 1The equation was denoted ⟨τ⟩min in [7]. We slightly modified it using ⟨ǫ⟩and replacing η by Eq. (2). 2 0.5 0.6 0.7 0.8 0.9 1 1.1 1.2 1.3 1.4 1.5 0 10 20 30 40 50 60 η ∆τ = τmax − τmin 0 50 100 # neuron time η > 1 noisy firing 0 25 50 # neuron η ≤ 1 clustering 0 10 20 # neuron time η = 0.5 full synchronization Figure 1: Number of possible ISIs according to the bound ∆τ = τmax −τmin derived in [7]. For η > 1 the network presents sub-critical behavior and is dominated by the noise. For η < 1 it shows super-critical behavior. Criticality is produced at η = 1, which coincides to the onset of sustained activity. At this point, the network is also broken down in a maximal number of clusters of units which fire according to a periodic pattern. Figure 2a shows an example trajectory of a neuron’s state. First, we calculate the spontaneous evolution of the given unit during one ISI, which it is just its number of stochastic state transitions during an ISI of length τ (thick black lines in Figure 2a). These state transitions occur with probability p at every timestep except from the timestep directly after spiking. Using the average ISI-length ⟨τ⟩ over many spikes and all units we can calculate the average total spontaneous evolution: Etotal = (⟨τ⟩−1)p. (4) Since the state of a given unit can exceed the threshold because of the received messages from the rest of the population (blue dashed lines in Figure 2a), a fraction of (4) is actually not required to induce a spike in that unit, and therefore is dissipated. We can obtain this fraction by subtracting from (4) the actual number of state transitions that was required to reach the threshold L. The latter quantity can be referred to as effective spontaneous evolution Eeff and is on average L −1 minus (N −1)⟨ǫ⟩, the mean evolution caused by the messages received from the rest of the units during an ISI. For η ≤1, the activity is self-sustained and the messages from other units are enough to drive a unit above the threshold. In this case, all the spontaneous evolution is dissipated and Eeff = 0. Summarizing, we have that: Eeff = max{0, L −1 −(N −1)⟨ǫ⟩} = L −1 −(N −1)⟨ǫ⟩ for η ≥1 0 for η < 1 (5) If we subtract (5) from Etotal (4), we obtain the mean dissipated spontaneous evolution, which is visualized as red dimensioning in Figure 2a: Ediss = Etotal −Eeff = (⟨τ⟩−1)p −max{0, L −1 −(N −1)⟨ǫ⟩}. (6) Using (3) as an approximation of ⟨τ⟩we can get an analytic expression for Ediss. Figures 2b and c show this analytic curve Ediss in function of η together with the outcome of simulations. At η > 1 the units reach the threshold L mainly because of their spontaneous evolution. Hence, Etotal ≈Eeff and Ediss ≈0. The difference between Etotal and Eeff increases as η approaches 1 because the message interchange progressively dominates the dynamics. At η < 1, we have Eeff = 0. In this scenario Ediss = Etotal, is mainly determined by the ISI ⟨τ⟩and thus decays again for decreasing η. The maximum can be found at η = 1. 3.2 Synaptic dynamics After having presented our magnitude of interest we now derive a plasticity rule in the model. Our approach essentially assumes that updates of the individual synapses ǫij are made in the direction of 3 0.5 1 1.5 0 5 10 15 20 25 η Surplus of spontaneous evolution (b) Sim. Ediss 0.8 0.9 1 1.1 1.2 0 20 40 60 80 100 η (c) Etotal Eeff Ediss 0 2 4 6 8 10 12 14 16 1 3 5 7 9 11 L t a1(t) Etotal ≈ (〈τ〉−1)p ε12+ε13 ≈ (N−1) 〈ε〉 Eeff Ediss L−1 ε12 ε13 threshold (a) Spontaneous evolution Messages from other units spike Figure 2: (a) Example trajectory of the state of a neuron: the dissipated spontaneous evolution Ediss is the difference between the total spontaneous evolution Etotal (thick black lines) and the actual evolution required to reach the threshold Eeff (dark gray dimensioning) in one ISI. (b) Ediss is maximized at the critical point. (c) The three different evolutions involved in the analysis (parameters for (b) and (c) are N = L = 1000 and p = 0.9. For the mean ISI we used τapp of Eq. (3)). the gradient of Ediss. The analytical results are rather simple and allow a clear interpretation of the underlying mechanism governing the dynamics of the network under the proposed synaptic rule. We start approximating the terms N⟨ǫ⟩and (N −1)⟨ǫ⟩by the sum of all pre-synaptic efficacies ǫik: N⟨ǫ⟩= (N −1)⟨ǫ⟩+ ⟨ǫ⟩≈(N −1)⟨ǫ⟩= N X i=1 X k̸=i ǫik/N ≈ X k̸=i ǫik. (7) This can be done for large N and if we suppose that the distribution of ǫik is the same for all i. Ediss is now defined in terms of each individual neuron i as: Ei diss =  L −1 −P k̸=i ǫik 2p + sL −1 −P k̸=i ǫik 2p + 1 2 + P k̸=i ǫik 2p  p −max{0, L −1 − X k̸=i ǫik}. (8) An update of ǫij occurs when a spike from the pre-synaptic unit j induces a spike in a post-synaptic unit i. Other schedulings are also possible. The results are robust as long as synaptic updates are produced at the spike-time of the post-synaptic neuron. ∆ǫij = κ∂Ei diss ∂ǫij = κ ∂Ei total ∂ǫij − ∂Ei eff ∂ǫij ! , (9) where the constant κ scales the amount of change in the synapse. We can write the gradient as: ∂Ei diss ∂ǫij = −1 2  L−1−P k̸=i ǫik 2p + 1 2  r L−1−P k̸=i ǫik 2p + 1 2 + P k̸=i ǫik 2p −1 2 −      0 if (L −1 −P k̸=i ǫik) < 0 indef if (L −1 −P k̸=i ǫik) = 0 −1 if (L −1 −P k̸=i ǫik) > 0. (10) For a plasticity rule to be biologically plausible it must be local, so only information encoded in the states of the pre-synaptic j and the post-synaptic i neurons must be considered to update ǫij. 4 −500 −250 0 250 500 −1 −0.5 0 0.5 1 Li (a) dEtotal dEtotal+1 dEdiss −500 −250 0 250 500 −0.5 −0.25 0 0.25 0.5 Li ∆εij (b) c = 0.05 c = 0.5 c = 5 Figure 3: Plasticity rule. (a) First derivative of the dissipated spontaneous evolution Ediss for κ = 1, L = 1000 and c = 0.9. (b) The same rule for different values of c. We propagate P k̸=i ǫik to the state of the post-synaptic unit i by considering for every unit i, an effective threshold Li which decreases deterministically every time an incoming pulse is received [6]. At the end of an ISI Li ≈(L−1−P k̸=i ǫik) and encodes implicitly all pre-synaptic efficacies of i. Intuitively, Li indicates how the activity received from the population in the last ISI differs from the activity required to induce and spike in i. The only term involving non-local information in (10) is the noise rate p. We replace it by a constant c and show later its limited influence on the synaptic rule. With these modifications we can write the derivative of Ei diss with respect to ǫij as a function of only local terms: ∂Ei diss ∂ǫij = −Li −c 2 q (Li + 2c)2 + 2c(L −Li) + sgn(Li) 2 (11) Note that, although the derivation based on the surplus spontaneous evolution (10) may involve information not locally accessible to the neuron, the derived rule (11) only requires a mechanism to keep track of the difference between the natural ISI and the actual one. We can understand the mechanism involved in a particular synaptic update by analyzing in detail Eq. (11). In the case of a negative effective threshold (Li < 0) unit i receives more input from the rest of the units than the required to spike, which translates into a weakening of the synapse. Conversely, if Li > 0 some spontaneous evolution was required for the unit i to fire, Eq. (11) is positive and the synapse is strengthened. The intermediate case (Li = 0), corresponds to η = 1 and no synaptic update is needed (nor is it defined). We will consider it thus 0 for practical purposes. Figure 3a shows Eq. (11) in bold lines together with ∂Ei total/∂ǫij (dashed line, corresponding to η < 1) and ∂Ei total/∂ǫij + 1 (dashed-dotted, η > 1), for different values of the effective threshold Li of a given unit at the end on an ISI. Etotal indicates the amount of synaptic change and Eeff determines whether the synapse is strengthened or weakened. The largest updates occur in the transition from a positive to a negative Li and tend to zero for larger absolute values of Li. Therefore, significant updates correspond to those synapses with post-synaptic neurons which during the last ISI have received a similar amount of activity from the whole network as the one required to fire. We remark the similarity between Figure 3b and the rule characterizing spike time dependent plasticity (STDP) [4, 13]. Although in STDP the change in the synaptic conductances is determined by the relative spike timing of the pre-synaptic neuron and the post-synaptic neuron and here it is determined by Li at the spiking time of the post-synaptic unit i, the largest changes in STDP occur also in an abrupt transition from strengthening to weakening corresponding to Li = 0 in Figure 3a. Figure 3b illustrates the role of c in the plasticity rule. For small c, updates are only significant in a tiny range of Li values near zero. For higher values of c, the interval of relevant updates is widened. The shape of the rule, however, is preserved, and the role of c is just to scale the change in the synapse. For the rest of this manuscript, we will use c = 1. 5 0 200 400 600 1 1.2 1.4 1.6 1.8 η’ κ = 0.1 0.98 1 1.02 η’ κ = 0.1 0 1000 2000 3000 1 1.2 1.4 1.6 1.8 η’ κ = 0.01 0.98 1 1.02 η’ κ = 0.01 0 1000 2000 0.6 0.8 1 η’ # periods 0.98 1 1.02 η’ κ = 0.1 0 100 200 300 0.98 1 1.02 η’ # periods κ = 0.01 0 1 2 x 10 4 0.6 0.8 1 η’ # periods Figure 4: Empirical results of convergence toward η = 1 for three different initial states above (top four plots) and below (bottom four plots) the critical point. Horizontal axis denote number of ISIs of the same random unit during all the simulations. On the left, results using the constant κ = 0.1. Larger panels shows the full trajectory until 103 timesteps after convergence. Smaller panels are a zoom of the first trajectory η0 = 1.1 (top) and η = 0.87 (bottom). Right panels show the same type of results but using a smaller constant κ = 0.01. 3.3 Simulations In this section we show empirical results for the proposed plasticity rule. We focus our analysis on the time τconv required for the system to converge toward the critical point. In particular, we analyze how τconv depends on the starting initial configuration and on the constant κ. For the experiments we use a network composed of N = 500 units with homogeneous L = 500 and p = 0.9. Synapses are initialized homogeneously and random initial states are chosen for all units in each trial. Every time a unit i fires, we update its afferent synapses ǫij, for all j ̸= i, which breaks the homogeneity in the interaction strengths. The network starts with a certain initial condition η0 and evolves according to its original discrete dynamics, Eq. (1), together with plasticity rule (9). To measure the time τconv necessary to reach a value close to η = 1 for the first time, we select a neuron i randomly and compute η every time i fires. We assume convergence when η ∈(1−ν, 1+ν) for the first time. In these initial experiments, ν is set to κ/5 and κ is either 0.1 or 0.01. We performed 50 random experiments for different initial configurations. In all cases, after an initial transient, the network settles close to η = 1, presenting some fluctuations. These fluctuations did not grow even after 106 ISIs in all realizations. Figure 4 shows examples for η0 ∈{0.58, 0.7, 0.87, 1.1, 1.3, 1.7}. We can see that for larger updates of the synapses (κ = 0.1) the network converges faster. However, fluctuations around the reached state, slightly above η = 1, are approximately one order of magnitude bigger than for κ = 0.01. We therefore can conclude that κ determines the speed of convergence and the quality and stability of the dynamics at the critical state: high values of κ cause fast convergence but turn the dynamics of the network less stable at the critical state. We study now how τconv depends on η0 in more detail. Given N, L, c and κ, we can approximate the global change in η after one entire ISI of a random unit assuming that all neurons change its afferent synapses uniformly. This gives us a recursive definition for the sequence of ηts generated by the synaptic plasticity rule: ∆(ηt) = κ(N −1)   −Leff(ηt) −c 2 q (Leff(ηt) + 2c)2 + 2c(L −Leff(ηt)) + sgn(ηt −1) 2  , 6 0.5 1 1.5 2 10 0 10 1 10 2 10 3 10 4 10 5 10 6 η0 time (number of timesteps) Time−steps required to reach η=1 (b) κ = 0.01 τconv_steps Simulations −−−−−−−−−−− κ = 0.1 τconv_steps Simulations 0.5 1 1.5 2 10 0 10 1 10 2 10 3 10 4 10 5 η0 time (periods) Periods required to reach η=1 (a) κ = 0.01 τconv Simulations −−−−−−−−−−− κ = 0.1 τconv Simulations Figure 5: Number of ISIs (a) and timesteps (b) required to reach the critical state in function of the initial configuration η0. Rounded dots indicate empirical results as averages over 10 different realizations starting from the same η0. Continuous curves correspond to Eq. (12). Parameter values are N = 500, L = 500, p = 0.9, c = 1, ν = κ/5. where Leff(ηt) = (L −1)  1 −1 ηt  and ηt+1 = ηt + ∆(ηt). Then the number of ISIs and the number of timesteps can be obtained by2: τconv = min({i : |ηt −1| ≤ν}), τconv steps = τconv X t=0 τapp(ηt). (12) Figure 5 shows empirical values of τconv and τconv steps for several values of η0 together with the approximations (12). Despite the inhomogeneous coupling strengths, the analytical approximations (continuous lines) of the experiments (circles) are quite accurate. Typically, for η0 < 1 more spikes are required for convergence than for η0 > 1. However, the opposite occurs if we consider timesteps as time units. A hysteresis effect (described in [7]) present in the system if η0 < 1, causes the system to be more resistant against synaptic changes, which increases the number of updates (spikes) necessary to achieve the same effect as for η0 > 1. Nevertheless, since the ISIs are much shorter for supercritical coupling the actual number of time steps is still lower than for subcritical coupling. 4 Discussion Based on the amount of spontaneous evolution which is dissipated during an ISI, we have derived a local synaptic mechanism which causes a network of spiking neurons to self-organize near a critical state. Our motivation differs from those of similar studies, for instance [8], where the average branching ratio σ of the network is used to characterize criticality. Briefly, σ is defined as the average number of excitations created in the next time step by a spike of a given neuron. The inverse of η plays the role of the branching ratio σ in our model. If we initialize the units uniformly in [1, L], we have approximately one unit in every subinterval of length ηǫ, and in consequence, the closest unit to the threshold spikes in 1/η cases if it receives a spike. For η > 1, a spike of a neuron rarely induces another neuron to spike, so σ < 1. Conversely, for η < 1, the spike of a single neuron triggers more than one neuron to spike (σ > 1). Only for η = 1 the spike of a neuron elicits the order of one spike (σ = 1). Our study thus represents a realization of a local synaptic mechanism which induces global homeostasis towards an optimal branching factor. This idea is also related to the SOC rule proposed in [3], where a mechanism is defined for threshold gates (binary units) in terms of bit flip probabilities instead of spiking neurons. As in our model, criticality is achieved via synaptic scaling, where each neuron adjusts its synaptic input according to an effective threshold called margin. 2The value of τapp(ηt) has to be calculated using an ⟨ǫ⟩corresponding to ηt in Eq. (3). 7 When the network is operating at the critical regime, the dynamics can be seen as balancing between a predictable pattern of activity and uncorrelated random behavior typically present in SOC. One would also expect to find macroscopic magnitudes distributed according to scale-free distributions. Preliminary results indicate that, if the stochastic evolution is reset to zero (p = 0) at the critical state, inducing an artificial spike on a randomly selected unit causes neuronal avalanches of sizes and lengths which span several orders of magnitude and follow heavy tailed distributions. These results are in concordance with what is usually found for SOC and will be published elsewhere. The spontaneous evolution can be interpreted for instance as activity from other brain areas not considered in the pool of the simulated units, or as stochastic sensory input. Our results indicate that the amount of this stochastic activity that is absorbed by the system is maximized at an optimal state, which in a sense minimizes the possible effect of fluctuations due to noise on the behavior of the system. The application of the synaptic rule for information processing is left for future research. We advance, however, that external perturbations when the network is critical would cause a transient activity. During the transient, synapses could be modified according to some other form of learning to encode the proper values which drive the whole network to attain a characteristic synchronized pattern for the external stimuli presented. We conjecture that the hysteresis effect shown in the regime of η < 1 may be suitable for such purposes, since the network then is able to keep the same pattern of activity until the critical state is reached again. Acknowledgments We thank Joaqu´ın J. Torres and Max Welling for useful suggestions and interesting discussions. References [1] P. Bak. How nature works: The Science of Self-Organized Criticality. Springer, 1996. [2] J. M. Beggs and D. Plenz. Neuronal avalanches in neocortical circuits. Journal of Neuroscience, 23(35):11167–11177, December 2003. [3] N. Bertschinger, T. Natschl¨ager, and R. A. Legenstein. At the edge of chaos: Real-time computations and self-organized criticality in recurrent neural networks. In Advances in Neural Information Processing Systems 17, pages 145–152. MIT Press, Cambridge, MA, 2005. [4] G. Q. Bi and M. M. Poo. Synaptic modifications in cultured hippocampal neurons: Dependence on spike timing, synaptic strength, and postsynaptic cell type. Journal Of Neuroscience, 18:10464–10472, 1998. [5] G. L. Gerstein and B. Mandelbrot. Random walk models for the spike activity of a single neuron. Biophys J., 4:41–68, 1964. [6] V. G´omez, A. Kaltenbrunner, and V. L´opez. Event modeling of message interchange in stochastic neural ensembles. In IJCNN’06, Vancouver, BC, Canada, pages 81–88, 2006. [7] A. Kaltenbrunner, V. G´omez, and V. L´opez. Phase transition and hysteresis in an ensemble of stochastic spiking neurons. Neural Computation, 19(11):3011–3050, 2007. [8] O. Kinouchi and M. Copelli. Optimal dynamical range of excitable networks at criticality. Nature Physics, 2:348, 2006. [9] C. G. Langton. Computation at the edge of chaos: Phase transitions and emergent computation. Physica D Nonlinear Phenomena, 42:12–37, jun 1990. [10] A. Levina, J. M. Herrmann, and T. Geisel. Dynamical synapses causing self-organized criticality in neural networks. Nature Physics, 3(12):857–860, 2007. [11] N. H. Packard. Adaptation toward the edge of chaos. In: Dynamics Patterns in Complex Systems, pages 293–301. World Scientific: Singapore, 1988. A. J. Mandell, J. A. S. Kelso, and M. F. Shlesinger, editors. [12] F. Rodr´ıguez, A. Su´arez, and V. L´opez. Period focusing induced by network feedback in populations of noisy integrate-and-fire neurons. Neural Computation, 13(11):2495–2516, 2001. [13] S. Song, K. D. Miller, and L. F. Abbott. Competitive hebbian learning through spike-timing-dependent synaptic plasticity. Nature Neuroscience, 3(9):919–926, 2000. [14] G. G. Turrigiano and S. B. Nelson. Homeostatic plasticity in the developing nervous system. Nature Reviews Neuroscience, 5(2):97–107, 2004. [15] C. Van Vreeswijk and L. F. Abbott. Self-sustained firing in populations of integrate-and-fire neurons. SIAM J. Appl. Math., 53(1):253–264, 1993. 8
2008
222
3,479
Interpreting the Neural Code with Formal Concept Analysis Dominik Endres, Peter F¨oldi´ak School of Psychology,University of St. Andrews KY16 9JP, UK {dme2,pf2}@st-andrews.ac.uk Abstract We propose a novel application of Formal Concept Analysis (FCA) to neural decoding: instead of just trying to figure out which stimulus was presented, we demonstrate how to explore the semantic relationships in the neural representation of large sets of stimuli. FCA provides a way of displaying and interpreting such relationships via concept lattices. We explore the effects of neural code sparsity on the lattice. We then analyze neurophysiological data from high-level visual cortical area STSa, using an exact Bayesian approach to construct the formal context needed by FCA. Prominent features of the resulting concept lattices are discussed, including hierarchical face representation and indications for a product-of-experts code in real neurons. 1 Introduction Mammalian brains consist of billions of neurons, each capable of independent electrical activity. From an information-theoretic perspective, the patterns of activation of these neurons can be understood as the codewords comprising the neural code. The neural code describes which pattern of activity corresponds to what information item. We are interested in the (high-level) visual system, where such items may indicate the presence of a stimulus object or the value of some stimulus attribute, assuming that each time this item is represented the neural activity pattern will be the same or at least similar. Neural decoding is the attempt to reconstruct the stimulus from the observed pattern of activation in a given population of neurons [1, 2, 3, 4]. Popular decoding quality measures, such as Fisher’s linear discriminant [5] or mutual information [6] capture how accurately a stimulus can be determined from a neural activity pattern (e.g., [4]). While these measures are certainly useful, they tell us little about the structure of the neural code, which is what we are concerned with here. Furthermore, we would also like to elucidate how this structure relates to the represented information items, i.e. we are interested in the semantic aspects of the neural code. To explore the relationship between the representations of related items, F¨oldi´ak [7] demonstrated that a sparse neural code can be interpreted as a graph (a kind of ”semantic net”). In this interpretation, the neural responses are assumed to be binary (active/inactive). Each codeword can then be represented as a set of active units (a subset of all units). The codewords can now be partially ordered under set inclusion: codeword A ≤codeword B iff the set of active neurons of A is a subset of the active neurons of B. This ordering relation is capable of capturing semantic relationships between the represented information items. There is a duality between the information items and the sets representing them: a more general class corresponds to a smaller subset of active neurons, and more specific items are represented by larger sets [7]. Additionally, storing codewords as sets is especially efficient for sparse codes. The resulting graphs (lattices) are an interesting representation of the relationships implicit in the code. We would also like to be able to represent how the relationship between sets of active neurons translates into the corresponding relationship between the encoded stimuli. These observations can be formalized by the well developed branch of mathematical order theory called Formal Concept Analysis (FCA) [8, 9]. In FCA, data from a binary relation (or formal context) is represented as a concept lattice. Each concept has a set of formal objects as an extent and a set of formal attributes as an intent. In our application, the stimuli are the formal objects, and the neurons are the formal attributes. The FCA approach exploits the duality of extensional and intensional descriptions and allows to visually explore the data in lattice diagrams. FCA has shown to be useful for data exploration and knowledge discovery in numerous applications in a variety of fields [10, 11]. We give a short introduction to FCA in section 2 and demonstrate how the sparseness (or denseness) of the neural code affects the structure of the concept lattice in section 3. Section 4 describes the generative classifier model which we use to build the formal context from the responses of neurons in the high-level visual cortex of monkeys. Finally, we discuss the concept lattices so obtained in section 5. 2 Formal Concept Analysis Central to FCA[9] is the notion of the formal context K := (G, M, I), which is comprised of a set of formal objects G, a set of formal attributes M and a binary relation I ⊆G×M between members of G and M. In our application, the members of G are visual stimuli, whereas the members of M are the neurons. If neuron m ∈M responds when stimulus g ∈G is presented, then we write (g, m) ∈I or gIm. It is customary to represent the context as a cross table, where the row(column) headings are the object(attribute) names. For each pair (g, m) ∈I, the corresponding cell in the cross table has an ”x”. Table 1, left, shows a simple example context. n1 n2 n3 monkeyFace × × monkeyHand × humanFace × spider × concept extent (stimuli) intent (neurons) 0 ALL NONE 1 spider n3 2 humanFace monkeyFace n1 3 monkeyFace monkeyHand n2 4 monkeyFace n1 n2 5 NONE ALL Table 1: Left: a simple example context, represented as a cross-table. The objects (rows) are 4 visual stimuli, the attributes (columns) are 3 (hypothetical) neurons n1,n2,n3. An ”x” in a cell indicates that a stimulus elicited a response from the corresponding neuron. Right: the concepts of this context. Concepts are lectically ordered [9]. Colors correspond to fig.1. Define the prime operator for subsets A ⊆G as A′ = {m ∈M|∀g ∈A : gIm} i.e. A′ is the set of all attributes shared by the objects in A. Likewise, for B ⊆M define B′ = {g ∈G|∀m ∈B : gIm} i.e. B′ is the set of all objects having all attributes in B. Definition 2.1 [9] A formal concept of the context K is a pair (A, B) with A ⊆G, B ⊆M such that A′ = B and B′ = A. A is called the extent and B is the intent of the concept (A, B). IB(K) denotes the set of all concepts of the context K. In other words, given the relation I, (A, B) is a concept if A determines B and vice versa. A and B are sometimes called closed subsets of G and M with respect to I. Table 1, right, lists all concepts of the context in table 1, left. One can visualize the defining property of a concept as follows: if (A, B) is a concept, reorder the rows and columns of the cross table such that all objects in A are in adjacent rows, and all attributes in B are in adjacent columns. The cells corresponding to all g ∈A and m ∈B then form a rectangular block of ”x”s with no empty spaces in between. In the example above, this can be seen (without reordering rows and columns) for concepts 1,3,4. For a graphical representation of the relationships between concepts, one defines an order IB(K): Definition 2.2 [9] If (A1, B1) and (A2, B2) are concepts of a context, (A1, B1) is a subconcept of (A2, B2) if A1 ⊆A2 (which is equivalent to B1 ⊇B2). In this case, (A2, B2) is a superconcept of (A1, B1) and we write (A1, B1) ≤(A2, B2). The relation ≤is called the order of the concepts. It can be shown [8, 9] that IB(K) and the concept order form a complete lattice. The concept lattice of the context in table 1, with full and reduced labeling, is shown in fig.1. Full labeling means that a concept node is depicted with its full extent and intent. A reduced labeled concept lattice shows an object only in the smallest (w.r.t. the concept order of definition 2.2) concept of whose extent the object is a member. This concept is called the object concept, or the concept that introduces the object. Likewise, an attribute is shown only in the largest concept of whose intent the attribute is a member, the attribute concept, which introduces the attribute. The closedness of extents and intents has an important consequence for neuroscientific applications. Adding attributes to M (e.g. responses of additional neurons) will very probably grow IB(K). However, the original concepts will be embedded as a substructure in the larger lattice, with their ordering relationships preserved. Figure 1: Concept lattice computed from the context in table 1. Each node is a concept, arrows represent superconcept relation, i.e. an arrow from X to Y reads: X is a superconcept of Y . Colors correspond to table 1, right. The number in the leftmost compartment is the concept number. Middle compartment contains the extent, rightmost compartment the intent. Left: fully labeled concepts, i.e. all members of extents and intents are listed in each concept node. Right: reduced labeling. An object/attribute is only listed in the extent/intent of the smallest/largest concept that contains it. Reduced labeling is very useful for drawing large concept lattices. The lattice diagrams make the ordering relationship between the concepts graphically explicit: concept 3 contains all ”monkey-related” stimuli, concept 2 encompasses all ”faces”. They have a common child, concept 4, which is the ”monkeyFace” concept. The ”spider” concept (concept 1) is incomparable to any other concept except the top and the bottom of the lattice. Note that these relationships arise as a consequence of the (here hypothetical) response behavior of the neurons. We will show (section 5) that the response patterns of real neurons can lead to similarly interpretable structures. From a decoding perspective, a fully labeled concept shows those stimuli that have activated at least the set of neurons in the intent. In contrast, the stimuli associated with a concept in reduced labeling will activate the set of neurons in the intent, but no others. The fully labeled concepts show stimuli encoded by activity of the active neurons of the concept without knowledge of the firing state of the other neurons. Reduced labels, on the other hand show those stimuli that elicited a response only from the neurons in the intent. 3 Concept lattices of local, sparse and dense codes One feature of neural codes which has attracted a considerable amount of interest is its sparseness. In the case of a binary neural code, the sparseness of a codeword is inversely related to the fraction of active neurons. The average sparseness across all codewords is the sparseness of the code [12, 13]. Sparse codes, i.e. codes where this fraction is low, are found interesting for a variety of reasons: they offer a good compromise between encoding capacity, ease of decoding and robustness [14], they seem to be employed in the mammalian visual processing system [15] and they are well suited to representing the visual environment we live in [15, 16]. It is also possible to define sparseness for graded or even continuous-valued responses (see e.g. [17, 4, 13]). To study what structural effects different levels of sparseness would have on a neural code, we generated random codes, i.e. each of 10 stimuli was associated with randomly drawn responses of 10 neurons, subject to the constraints that the code be perfectly decodable and that the sparseness of each codeword was equal to the sparseness of the code. Fig.2 shows the contexts (represented as cross-tables) and the concept lattices of a local code (activity ratio 0.1), a sparse code (activity ratio 0.2) and a dense code (activity ratio 0.5). neuron x s x t x i x m x u x l x u x s x x neuron x x s x x t x x i x x m x x u x x l x x u x x s x x x x neuron x x x x x s x x x x x t x x x x x i x x x x x m x x x x x u x x x x x l x x x x x u x x x x x s x x x x x x x x x x Figure 2: Contexts (represented as cross-tables) and concept lattices for a local, sparse and dense random neural code. Each context was built out of the responses of 10 (hypothetical) neurons to 10 stimuli. Each node represents a concept, the left(right) compartment contains the number of introduced stimuli(neurons). In a local code, the response patters to different stimuli have no overlapping activations, hence the lattice representing this code is an antichain with top and bottom element added. Each concept in the antichain introduces (at least) one stimulus and (at least) one neuron. In contrast, a dense code results in a lot of concepts which introduce neither a stimulus nor a neuron. The lattice of the dense code is also substantially longer than that of the sparse and local codes. The most obvious differences between the lattices is the total number of concepts. A dense code, even for a small number of stimuli, will give rise to a lot of concepts, because the neuron sets representing the stimuli are very probably going to have non-empty intersections. These intersections are potentially the intents of concepts which are larger than those concepts that introduce the stimuli. Hence, the latter are found towards the bottom of the lattice. This implies that they have large intents, which is of course a consequence of the density of the code. Determining these intents thus requires the observation of a large number of neurons, which is unappealing from a decoding perspective. The local code does not have this drawback, but is hampered by a small encoding capacity (maximal number of concepts with non-empty extents): the concept lattice in fig.2 is the largest one which can be constructed for a local code comprised of 10 binary neurons. Which of the above structures is most appropriate depends on the conceptual structure of environment to be encoded. 4 Building a formal context from responses of high-level visual neurons To explore whether FCA is a suitable tool for interpreting real neural codes, we constructed formal contexts from the responses of high-level visual cortical cells in area STSa (part of the temporal lobe) of monkeys. Characterizing the responses of these cells is a difficult task. They exhibit complex nonlinearities and invariances which make it impossible to apply linear techniques, such as reverse correlation [18, 19, 20]. The concept lattice obtained by FCA might enable us to display and browse these invariances: if the response of a subset of cells indicates the presence of an invariant feature in a stimulus, then all stimuli having this feature should form the extent of a concept whose intent is given by the responding cells, much like the ”monkey” and ”face” concepts in the example in section 2. 4.1 Physiological data The data were obtained through [21], where the experimental details can be found. Briefly, spike trains were obtained from neurons within the upper and lower banks of the superior temporal sulcus (STSa) via standard extracellular recording techniques [22] from an awake and behaving monkey (Macaca mulatta) performing a fixation task. This area contains cells which are responsive to faces. The recorded firing patters were turned into distinct samples, each of which contained the spikes from −300 ms before to 600 ms after the stimulus onset with a temporal resolution of 1 ms. The stimulus set consisted of 1704 images, containing color and black and white views of human and monkey head and body, animals, fruits, natural outdoor scenes, abstract drawings and cartoons. Stimuli were presented for 55ms each without inter-stimulus gaps in random sequences. While this rapid serial visual presentation (RSVP) paradigm complicates the task of extracting stimulus-related information from the spiketrains, it has the advantage of allowing for the testing of a large number of stimuli. A given cell was tested on a subset of 600 or 1200 of these stimuli, each stimulus was presented between 1-15 times. 4.2 Bayesian thresholding Before we can apply FCA, we need to extract a binary attribute from the raw spiketrains. While FCA can also deal with many-valued attributes, see [23, 9], we will employ binary thresholding as a starting point. Moreover, when time windows are limited (e.g. in the RSVP condition) it is usually impossible to extract more than 1 bit of stimulus identity-related information from a spiketrain per stimulus [24]. We do not suggest that real neurons have a binary activation function. We are merely concerned with finding a maximally informative response binarization, to allow for the construction of meaningful concepts. We do this by Bayesian thresholding, as detailed in appendix A. This procedure also avails us of a null hypothesis H0 =”the responses contain no information about the stimuli”. 4.3 Cell selection The experimental data consisted of recordings from 26 cells. To minimize the risk that the computed neural responses were a result of random fluctuations, we excluded a cell if 1.) H0 was more probable than 10−6 or 2.) the posterior standard deviations of the counting window parameters were larger than 20ms, indicating large uncertainties about the response timing. Cells which did not respond above the threshold included all cells excluded by the above criteria (except one). Furthermore, since not all cells were tested on all stimuli, we also had to select pairs of subsets of cells and stimuli such that all cells in a pair were tested on all stimuli. Incidentally, this selection can also be accomplished with FCA, by determining the concepts of a context with gJm =”stimulus g was tested on cell m” and selecting those with a large number of stimuli × number of cells. Two of these cell and stimulus subset pairs (”A”, containing 364 stimuli and 13 cells, and ”B”, containing 600 stimuli, 12 cells) were selected for further analysis. 5 Results To analyze the neural code, the thresholded neural resposes were used to build stimulus-by-cellresponse contexts. We performed FCA on these with COLIBRICONCEPTS1, created stimulus image montages and plotted the lattices2. The complete concept lattices were too large to display on a page. Graphs of lattices A and B with reduced labeling on the stimuli are included in the supplementary 1see http://code.google.com/p/colibri-concepts/ 2with IMAGEMAGICK, http://www.imagemagick.org and GRAPHVIZ, http://www.graphviz.org A B Figure 3: A: a subgraph of lattice A with reduced labeling on the stimuli, i.e. stimuli are only shown in their object concepts. The ∅indicates that an extent is the intersection of its superconcepts’ extents, i.e. no new stimuli were introduced by this concept. All cells forming this part of the concept lattice were responsive to faces. B: a subgraph of lattice B, fully labeled. The concepts on the right side are not exclusively ”face” concepts, but most members of their extents have something ”roundish” about them. material (files latticeA neuroFCA.pdf and latticeB neuroFCA.pdf). In these graphs, the top of the frame around each concept image contains the concept number and the list of cells in the intent. Fig.3, A shows a subgraph from lattice A, which exclusively contained ”face” concepts. This subgraph, with full labeling, is also a part of the supplementary material (file faceSubgraphLatticeA neuroFCA.pdf). The top concepts introduce human and cartoon faces, i.e. their extents are consist of general ”face” images, while their intents are small (3 cells). In contrast, the lower concepts introduce mostly single monkey faces, with the bottom concepts having an intent of 7 cells. We may interpret this as an indication that the neural code has a higher ”resolution” for faces of conspecifics than for faces in general, i.e. other monkeys are represented in greater detail in a monkey’s brain than humans or cartoons. This feature can be observed in most lattices we generated. Fig.3, B shows a subgraph from lattice B with full labeling. The concepts in the left half of the graph are face concepts, whereas the extents of the concepts in the right half also contain a number of non-face stimuli. Most of the latter have something ”roundish” about them. The bottom concept, being subordinate to both the ”round” and the ”face” concepts, encompasses stimuli with both characteristics, which points towards a product-of-experts encoding [25]. This example also highlights another advantage of FCA over standard hierarchical analysis techniques, e.g. hierarchical clustering: it does not impose a tree structure when the data do not support it (a shortcoming of the analysis in [26]). For preliminary validation, we experimented with stimulus shuffling (i.e. randomly assigning stimuli to the recorded responses) to determine whether the found concepts are indeed meaningful. This procedure leaves the lattice structure intact, but mixes up the extents. A ’naive’ observer was then no longer able to label the concepts (as in fig.3, ’round’, ’face’ or ’conspecifics’). Evidence of concept stability was obtained by trying different binarization thresholds: as stated in appendix A, we used a threshold probability of 0.5. This threshold can be raised up to 0.7 without losing any of the conceptual structures described in fig.3, although some of the stimuli migrate upwards in the lattice. 6 Conclusion We demonstrated the potential usefulness of FCA for the exploration and interpretation of neural codes. This technique is feasible even for high-level visual codes, where linear decoding methods [19, 20] fail, and it provides qualitative information about the structure of the code which goes beyond stimulus label decoding [4]. Clearly, this application of FCA is still in its infancy. It would be very interesting to repeat the analysis presented here on data obtained from simultaneous multicell recordings, to elucidate whether the conceptual structures derived by FCA are used for decoding by real brains. On a larger scale than single neurons, FCA could also be employed to study the relationships in fMRI data [27]. Acknowledgment D. Endres was supported by MRC fellowship G0501319. References [1] A. P. Georgopoulos, A. B. Schwartz, and R. E. Kettner. Neuronal population coding of movement direction. Science, 233(4771):1416–1419, 1986. [2] P F¨oldi´ak. The ’Ideal Homunculus’: Decoding neural population responses by Bayesian inference. Perception, 22 suppl:43, 1993. [3] MW Oram, P F¨oldi´ak, DI Perrett, and F Sengpiel. The ’Ideal Homunculus’: decoding neural population signals. Trends In Neurosciences, 21:259–265, June 1998. [4] R. Q. Quiroga, L. Reddy, C. Koch, and I. Fried. Decoding Visual Inputs From Multiple Neurons in the Human Temporal Lobe. J Neurophysiol, 98(4):1997–2007, 2007. [5] OR Duda, PE Hart, and DG Stork. Pattern classification. John Wiley & Sons, New York, Chichester, 2001. [6] T. M. Cover and J. A. Thomas. Elements of Information Theory. John Wiley & Sons, New York, 1991. [7] P F¨oldi´ak. Sparse neural representation for semantic indexing. In XIII Conference of the European Society of Cognitive Psychology (ESCOP-2003), 2003. http://www.standrews.ac.uk/∼pf2/escopill2.pdf. [8] R. Wille. Restructuring lattice theory: an approach based on hierarchies of concepts. In I. Rival, editor, Ordered sets, pages 445–470. Reidel, Dordrecht-Boston, 1982. [9] Bernhard Ganter and Rudolf Wille. Formal Concept Analysis: Mathematical foundations. Springer, 1999. [10] B. Ganter, G. Stumme, and R. Wille, editors. Formal Concept Analysis, Foundations and Applications, volume 3626 of Lecture Notes in Computer Science. Springer, 2005. [11] U. Priss. Formal concept analysis in information science. Annual Review of Information Science and Technology, 40:521–543, 2006. [12] P F¨oldi´ak. Sparse coding in the primate cortex. In Michael A Arbib, editor, The Handbook of Brain Theory and Neural Networks, pages 1064–1068. MIT Press, second edition, 2002. [13] P F¨oldi´ak and D Endres. Sparse coding. Scholarpedia, 3(1):2984, 2008. http://www.scholarpedia.org/article/Sparse coding. [14] P F¨oldi´ak. Forming sparse representations by local anti-Hebbian learning. Biological Cybernetics, 64:165–170, 1990. [15] B. A Olshausen, D. J Field, and A Pelah. Sparse coding with an overcomplete basis set: a strategy employed by V1. Vision Res., 37(23):3311–3325, 1997. [16] Eero P Simoncelli and Bruno A Olshausen. Natural image statistics and neural representation. Annual Review of Neuroscience, 24:1193–1216, 2001. [17] ET Rolls and A Treves. The relative advantages of sparse versus distributed encoding for neuronal networks in the brain. Network, 1:407–421, 1990. [18] P Dayan and LF Abbott. Theoretical Neuroscience. MIT Press, London, Cambridge, 2001. [19] J.P. Jones and L. A. Palmer. An evaluation of the two-dimensional Gabor filter model of simple receptive fields in cat striate cortex. Journal of Neurophysiology, 58(6):1233–1258, 1987. [20] D. L. Ringach. Spatial structure and symmetry of simple-cell receptive fields in macaque primary visual cortex. Journal of Neurophysiology, 88:455–463, 2002. [21] P F¨oldi´ak, D Xiao, C Keysers, R Edwards, and DI Perrett. Rapid serial visual presentation for the determination of neural selectivity in area STSa. Progress in Brain Research, pages 107–116, 2004. [22] M. W. Oram and D. I. Perrett. Time course of neural responses discriminating different views of the face and head. Journal of Neurophysiology, 68(1):70–84, 1992. [23] R. Wille and F. Lehmann. A triadic approach to formal concept analysis. In G. Ellis, R. Levinson, W. Rich, and J. F. Sowa, editors, Conceptual structures: applications, implementation and theory, pages 32–43. Springer, Berlin-Heidelberg-New York, 1995. [24] D. Endres. Bayesian and Information-Theoretic Tools for Neuroscience. PhD thesis, School of Psychology, University of St. Andrews, U.K., 2006. http://hdl.handle.net/10023/162. [25] GE Hinton. Products of experts. In Ninth International Conference on Artificial Neural Networks ICANN 99, number 470 in ICANN, 1999. [26] R Kiani, H Esteky, K Mirpour, and K Tanaka. Object category structure in response patterns of neuronal population in monkey inferior temporal cortex. Journal of Neurophysiology, 97(6):4296–4309, April 2007. [27] K. N. Kay, T. Naselaris, R. J. Prenger, and J. L. Gallant. Identifying natural images from human brain activity. Nature, 452:352–255, 2008. http://dx.doi.org/10.1038/nature06713. [28] D. Endres and P. F¨oldi´ak. Exact Bayesian bin classification: a fast alternative to bayesian classification and its application to neural response analysis. Journal of Computational Neuroscience, 24(1):24–35, 2008. DOI: 10.1007/s10827-007-0039-5. A Method of Bayesian thresholding A standard way of obtaining binary responses from neurons is thresholding the spike count within a certain time window. This is a relatively straightforward task, if the stimuli are presented well separated in time and a lot of trials per stimulus are available. Then latencies and response offsets are often clearly discernible and thus choosing the time window is not too difficult. However, under RSVP conditions with few trials per stimulus, response separation becomes more tricky, as the responses to subsequent stimuli will tend to follow each other without an intermediate return to baseline activity. Moreover, neural resposes tend to be rather noisy. We will therefore employ a simplified version of the generative Bayesian Bin classification algorithm (BBCa) [28], which was shown to perform well on RSVP data [24]. BBCa was designed for the purpose of inferring stimulus labels g from a continuous-valued, scalar measure z of a neural response. The range of z is divided into a number of contiguous bins. Within each bin, the observation model for the g is a Bernoulli scheme with a Dirichlet prior over its parameters. It is shown in [28] that one can iterate/integrate over all possible bin boundary configurations efficiently, thus making exact Bayesian inference feasible. We make two simplifications to BBCa: 1) z is discrete, because we are counting spikes and 2) we use models with only 1 bin boundary in the range of z. The bin membership of a given neural response can then serve as the binary attribute required for FCA, since BBCa weighs bin configurations by their classification (i.e. stimulus label decoding) performance. We proceed in a straight Bayesian fashion: since the bin membership is the only variable we are interested in, all other parameters (counting window size and position, class membership probabilities, bin boundaries) are marginalized. This minimizes the risk of spurious results due to ”contrived” information (i.e. choices of parameters) made at some stage of the inference process. Afterwards, the probability that the response belongs to the upper bin is thresholded at a probability of 0.5. BBCa can also be used for model comparison. Running the algorithm with no bin boundaries in the range of z effectively yields the probability of the data given the ”null hypothesis” H0: z does not contain any information about g. We can then compare it against the alternative hypothesis described above (i.e. the information which bin z is in tells us something about g) to determine whether the cell has responded at all.
2008
223
3,480
Global Ranking Using Continuous Conditional Random Fields 1Tao Qin, 1Tie-Yan Liu, 2Xu-Dong Zhang, 2De-Sheng Wang, 1Hang Li 1Microsoft Research Asia, 2Tsinghua University 1{taoqin, tyliu, hangli}@microsoft.com 2{zhangxd, wangdsh ee}@tsinghua.edu.cn Abstract This paper studies global ranking problem by learning to rank methods. Conventional learning to rank methods are usually designed for ‘local ranking’, in the sense that the ranking model is defined on a single object, for example, a document in information retrieval. For many applications, this is a very loose approximation. Relations always exist between objects and it is better to define the ranking model as a function on all the objects to be ranked (i.e., the relations are also included). This paper refers to the problem as global ranking and proposes employing a Continuous Conditional Random Fields (CRF) for conducting the learning task. The Continuous CRF model is defined as a conditional probability distribution over ranking scores of objects conditioned on the objects. It can naturally represent the content information of objects as well as the relation information between objects, necessary for global ranking. Taking two specific information retrieval tasks as examples, the paper shows how the Continuous CRF method can perform global ranking better than baselines. 1 Introduction Learning to rank is aimed at constructing a model for ordering objects by means of machine learning. It is useful in many areas including information retrieval, data mining, natural language processing, bioinformatics, and speech recognition. In this paper, we take information retrieval as an example. Traditionally learning to rank is restricted to ‘local ranking’, in which the ranking model is defined on a single object. In other words, the relations between the objects are not directly represented in the model. In many application tasks this is far from being enough, however. For example, in Pseudo Relevance Feedback [17, 8], we manage to rank documents on the basis of not only relevance of documents to the query, but also similarity between documents. Therefore, the use of a model solely based on individual documents would not be sufficient. (Previously, heuristic methods were developed for Pseudo Relevance Feedback.) Similar things happen in the tasks of Topic Distillation [12, 11] and Subtopic Retrieval [18]. Ideally, in information retrieval we would exploit a ranking model defined as a function on all the documents with respect to the query. In other words, ranking should be conducted on the basis of the contents of objects as well as the relations between objects. We refer to this setting as ‘global ranking’ and give a formal description on it with information retrieval as an example. Conditional Random Fields (CRF) technique is a powerful tool for relational learning, because it allows the uses of both relations between objects and contents of objects [16]. However, conventional CRF cannot be directly applied to global ranking because it is a discrete model in the sense that the output variables are discrete [16]. In this work, we propose a Continuous CRF model (C-CRF) to deal with the problem. The C-CRF model is defined as a conditional probability distribution over ranking scores of objects (documents) conditioned on the objects (documents). The specific 1 probability distribution can be represented by an undirected graph, and the output variables (ranking scores) can be continuous. To our knowledge, this is the first time such kind of CRF model is proposed. We apply C-CRF to two global ranking tasks: Pseudo Relevance Feedback and Topic Distillation. Experimental results on benchmark data show that our method performs better than baseline methods. 2 Global Ranking Problem Document ranking in information retrieval is a problem as follows. When the user submits a query, the system retrieves all the documents containing at least one query term, calculates a ranking score for each of the documents using the ranking model, and sorts the documents according to the ranking scores. The scores can represent relevance, importance, and/or diversity of documents. Let q denote a query. Let x(q) = {x(q) 1 , x(q) 2 , . . . , x(q) n(q)} denote the documents retrieved with q, and y(q) = {y(q) 1 , y(q) 2 , . . . , y(q) n(q)} denote the ranking scores assigned to the documents. Here n(q) stands for the number of documents retrieved with q. Note that the numbers vary according to queries. We assume that y(q) is determined by a ranking model. We call the ranking ‘local ranking’, if the ranking model is defined as y(q) i = f(x(q) i ), i = 1, . . . , n(q) (1) Furthermore, we call the ranking ‘global ranking’, if the ranking model is defined as y(q) = F(x(q)) (2) The major difference between the two is that F takes on all the documents together as its input, while f takes on an individual document as its input. In other words, in global ranking, we use not only the content information of documents but also the relation information between documents. There are many specific application tasks that can be viewed as examples of global ranking. These include Pseudo Relevance Feedback, Topic Distillation, and Subtopic Retrieval. 3 Continuous CRF for Global Ranking 3.1 Continuous CRF Let {hk(y(q) i , x(q))}K1 k=1 be a set of real-valued feature functions defined on document set x(q) and ranking score y(q) i (i = 1, · · · , n(q)), and {gk(y(q) i , y(q) j , x(q))}K2 k=1 be a set of real-valued feature functions defined on y(q) i , y(q) j , and x(q) (i, j = 1, · · · , n(q), i ̸= j). Continuous Conditional Random Fields is a conditional probability distribution with the following density function, Pr(y(q)|x(q)) = 1 Z(x(q)) exp (X i K1 X k=1 αkhk(y(q) i , x(q)) + X i,j K2 X k=1 βkgk(y(q) i , y(q) j , x(q)) ) , (3) where α is a K1-dimensional parameter vector and β is a K2-dimensional parameter vector, and Z(x(q)) is a normalization function, Z(x(q)) = Z y(q) exp (X i K1 X k=1 αkhk(y(q) i , x(q)) + X i,j K2 X k=1 βkgk(y(q) i , y(q) j , x(q)) ) dy(q). (4) Given a set of documents x(q) for a query, we select the ranking score vector y(q) with the maximum conditional probability Pr(y(q)|x(q)) as the output of our proposed global ranking model: F(x(q)) = arg max y(q) Pr(y(q)|x(q)). (5) 2 C-CRF is a graphical model, as depicted in Figure 1. In the conditioned undirected graph, a white vertex represents a ranking score, a gray vertex represents a document, an edge between two white vertexes represents the dependency between ranking scores, and an edge between a gray vertex and a white vertex represents the dependency of a ranking score on its document (content). (In principle a ranking score can depend on all the documents of the query; here for ease of presentation we only consider the simple case in which it only depends on the corresponding document.) y3 y5 y1 y4 y6 y2 x1 x2 x3 x4 x5 x6 Figure 1: Continuous CRF Model In C-CRF, feature function hk represents the dependency between the ranking score of a document and the content of it, and feature function gk represents a relation between the ranking scores of two documents. Different retrieval tasks may have different relations (e.g. similarity relation, parent-child relation), as will be explained in Section 4. For ease of reference, we call the feature functions hk vertex features, and the feature functions gk edge features. Note that in conventional CRF the output random variables are discrete while in C-CRF the output variables are continuous. This makes the inference of C-CRF largely different from that of conventional CRF, as will be seen in Section 4. 3.2 Learning In the inference of C-CRF, the paramters {α, β} are given, while in learning, they are to be estimated. Given training data {x(q), y(q)}N q=1, where each x(q) = {x(q) 1 , x(q) 2 , ..., x(q) n(q)} is a set of documents of query q, and each y(q) = {y(q) 1 , y(q) 2 , ..., y(q) n(q)} is a set of ranking scores associated with the documents of query q, we employ Maximum Likelihood Estimation to estimate the parameters {α, β} of C-CRF. Specifically, we calculate the conditional log likelihood of the training data with respect to the C-CRF model, L(α, β) = N X q=1 log Pr(y(q)|x(q); α, β). (6) We then use Gradient Ascend to maximze the log likelihood, and use the optimal parameter ˆα, ˆβ to rank the documents of a new query. 4 Case Study 4.1 Pseudo Relevance Feedback (PRF) Pseudo Relevance Feedback (PRF) [17, 8] is an example of global ranking, in which similarity between documents are considered in the ranking process. Conceptually, in this task one first conducts a round of ranking, assuming that the top ranked documents are relevant; then conducts another round of ranking, using similarity information between the top ranked documents and the other documents to boost some relevant documents dropped in the first round. The underlying assumption is that similar documents are likely to have similar ranking scores. Here we consider a method of using C-CRF for performing the task. 4.1.1 Continuous CRF for Pseudo Relevance Feedback We first introduce vertex feature functions. The relevance of a document to the query depends on many factors, such as term frequency, page importance, and so on. For each factor we define a vertex feature function. Suppose that x(q) i,k is the k-th relevance factor of document xi with respect to query 3 q extracted by operator tk: x(q) i,k = tk(xi, q). We define the k-th feature function1hk(yi, x) as hk(yi, x) = −(yi −xi,k)2. (7) Next, we introduce the edge feature function. Recall that there are two rounds in PRF: the first round scores each document, and the second round re-ranks the documents considering similarity between documents. Here the similarities between any two documents are supposed to be given. We incorporate them into the edge feature function. g(yi, yj, x) = −1 2Si,j(yi −yj)2, (8) where Si,j is similarity between documents xi and xj, which can be extracted by some operator s from the raw content2 of document xi and xj: Si,j = s(xi, xj). The larger Si,j is, the more similar the two documents are. Sine only similarity relation is considered in this task, we have only one edge function (K2 = 1). The C-CRF for Pseudo Relevance Feedback then becomes Pr(y|x) = 1 Z(x) exp (X i K1 X k=1 −αk(yi −xi,k)2 + X i,j −β 2 Si,j(yi −yj)2 ) , (9) where Z(x) is defined as Z(x) = Z y exp (X i K1 X k=1 −αk(yi −xi,k)2 + X i,j −β 2 Si,j(yi −yj)2 ) dy. (10) To guarantee that exp nP i PK1 k=1 −αk(yi −xi,k)2 + P i,j −β 2 Si,j(yi −yj)2o is integrable, we must have αk > 03 and β > 0. The item P i PK1 k=1 −αk(yi −xi,k)2 in Eq. (9) plays a role similar to the first round of PRF: the ranking score yi is determined solely by the relevance factors of document xi. The item P i,j −β 2 Si,j(yi −yj)2 in Eq. (9) plays a role similar to the second round of PRF: it makes sure that similar documents have similar ranking scores. We can see that CRF combines the two rounds of ranking of PRF into one. To rank the documents of a query, we calculate the ranking scores of documents with respect to this query in the following way. F(x) = arg max y Pr(y|x; α, β) = (αT eI + βD −βS)−1Xα. (11) where e is a K1-dimensional all-ones vector, I is an n × n identity matrix, S is a similarity matrix with Si,j = s(xi, xj), D is an n × n diagonal matrix with Di,i = P j Si,j, and X is a factor matrix with Xi,k = xi,k. If we ignore the relation between documents and set β = 0, then the ranking model degenerates to F(x) = Xα, which is equivalent to a linear model used in conventional local ranking. For n documents, the time complexity of straightforwardly computing the ranking model (11) is of order O(n3) and thus the computation is expensive. The main cost of the computation comes from matrix inversion. We employ a fast computation technique to quickly perform the task. First, we make S a sparse matrix, which has at most K non-zero values in each row and each column. We can do so by only considering the similarity between each document and its K 2 nearest neighbors. Next, we use the Gibbs-Poole-Stockmeyer algorithm [9] to convert S to a banded matrix. Finally we solve the following system of linear equation and take the solution as ranking scores. (αT eI + βD −βS)F(x) = Xα (12) Since S is a banded matrix, the scores F(x) in Eq.(12) can be computed with time complexity of O(n) when K ≪n [5]. That is to say, the time complexity of testing a new query is comparable with those of existing local ranking methods. 1We omit superscript (q) in this section when there is no confusion. 2Note that Si,j is not computed from the ranking factors of documents xi and xj but from their raw terms. For more details, please refer to our technique report [13]. 3αk > 0 means that the factor xi,k is positively correlated with the ranking score yi. Considering that some factor may be negatively correlated with yi, we double a factor xi,k into two factors xi,k and xi,k′ = −xi,k in experiments. Then if αk′ > αk, one can get the factor xi,k is negatively correlated with the ranking score yi. 4 Algorithm 1 Learning Algorithm of Continuous CRF for Pseudo Relevance Feedback Input: training data {(x(1), y(1)), · · · , (x(N), y(N))}, number of iterations T and learning rate η Initialize parameter log αk and log β for t = 1 to T do for i = 1 to N do Compute gradient ∇log αk and ∇log β using Eq. (13) and (14) for a single query (x(i), y(i), S(i)). Update log αk = log αk + η × ∇log αk and log β = log β + η × ∇log β end for end for Output: parameters of CRF model αk and β. 4.1.2 Learning In learning, we try to maximize the log likelihood. Note that maximization of L(α, β) in Eq. (6) is a constrained optimization problem because we need to guarantee that αk > 0 and β > 0. Gradient Ascent cannot be directly applied to such a constrained optimization problem. Here we adopt a technique similar to that in [3]. Specifically, we maximize L(α, β) with respect to log αk and log β instead of αk and β. As a result, the new optimization issue becomes unconstrained and Gradient Ascent method can be used. Algorithm 1 shows the learning algorithm based on Stochastic Gradient Ascent 4, in which the gradient ∇log αk and ∇log β can be computed as follows5. ∇log αk = ∂L(α, β) ∂log αk = −αk (³ −1 2(A−T ) :T I : ´ + 2XT ,kA−1b −bT A−1A−1b + X i (y2 i −2yixi,k) ) (13) ∇log β = ∂L(α, β) ∂log β = −β (³ −1 2(A−T ) :T (D −S) : ´ −bT A−1(D −S)A−1b + X i,j 1 2Si,j(yi −yj)2 ) (14) where A = αT eI + βD −βS, |A| is determinant of matrix A, b = Xα, c = P i PK1 k=1 αkx2 i,k, X : denotes the long column vector formed by concatenating the columns of matrix X, and X,k denotes the k-th column of matrix X. 4.2 Topic Distillation (TD) Topic Distillation [12] is another example of global ranking. In this task, one selects a page that can best represent the topic of the query from a web site by using structure (relation) information of the site. If both a page and its parent page are concerned with the topic, then the parent page is preferred (to be ranked higher) [12, 11]. Here we apply C-CRF to Topic Distillation. 4.2.1 Continuous CRF for Topic Distillation We define the vertex feature function hk(yi, x) in the same way as in Eq.(7). Recall that in Topic Distillation, a page is more preferred than its child page if both of them are relevant to a query. Here the parent-child relation between two pages is supposed to be given. We incorporate them into the edge feature function. Specifically, we define the (and the only) edge feature function as g(yi, yj, x) = Ri,j(yi −yj), (15) where Ri,j = r(xi, xj) denotes the parent-child relation: r(xi, xj) = 1 if document xi is the parent of xj, and r(xi, xj) = 0 for other cases. The C-CRF for Topic Distillation then becomes Pr(y|x) = 1 Z(x) exp (X i K1 X k=1 −αk(yi −xi,k)2 + X i,j βRi,j(yi −yj) ) , (16) 4Stochastic Gradient means conducting gradient ascent from one query to another. 5Details can be found in [13]. 5 where Z(x) is defined as Z(x) = Z y exp (X i K1 X k=1 −αk(yi −xi,k)2 + X i,j βRi,j(yi −yj) ) dy. (17) To guarantee that exp nP i PK1 k=1 −αk(yi −xi,k)2 + P i,j βRi,j(yi −yj) o is integrable, we must have αk > 0. The C-CRF can naturally model Topic Distillation: if the value of Ri,j is one, then the value of yi is large than that of yj with high probability. To rank the documents of a query, we calculate the ranking scores in the following way. F(x) = arg max y Pr(y|x; α, β) = 1 αT e (2Xα + β(Dr −Dc)e) (18) where Dr and Dc are two diagonal matrixes with Dri,i = P j Ri,j and Dci,i = P j Rj,i. Similarly to Pseudo Relevance Feedback, if we ignore the relation between documents and set β = 0, the ranking model degenerates to a linear ranking model in conventional local ranking. 4.2.2 Learning In learning, we use Gradient Ascent to maximize the log likelihood. We use the same technique as that for PRF to guarantee αk > 0. The gradient of L(α, β) with respect to log αk and β can be found6 in Eq. (19) and (20). Due to space limitation, we omit the details of the learning algorithm, which is similar to Algorithm 1. ∇log αk = ∂L(α, β) ∂log αk = αk ( n 2a + 1 4a2 bT b −1 2abT X,k + X i x2 i,k − X i (yi −xi,k)2 ) (19) ∇β = ∂L(α, β) ∂β = −1 2abT (Dr −Dc)e + X i,j Ri,j(yi −yj) (20) where where n denotes number of documents for the query, and a = αT e, b = 2Xα+β(Dr−Dc)e, c = P i PK1 k=1 αkx2 i,k, X,k denotes the k-th column of matrix X. 4.3 Continuous CRF for Multiple Relations We only consider using one type of relation in the previous two cases. We can also conduct global ranking by utilizing multiple types of relation. C-CRF is a powerful tool to perform the task. It can easily incorporate various types of relation as edge feature functions. For example, we can combine similarity relation and parent-child relation by using the following C-CRF model: Pr(y|x) = 1 Z(x) exp (X i K1 X k=1 −αk(yi −xi,k)2 + X i,j µ β1Ri,j(yi −yj) −β2 Si,j 2 (yi −yj)2 ¶  . In this case, the ranking scores of documents for a new query is calculated as follows. F(x) = arg max y Pr(y|x; α, β) = (αT eI + β2D −β2S)−1 µ Xα + β1 2 (Dr −Dc)e ¶ 5 Experiments We empirically tested the performance of C-CRF on both Pseudo Relevance Feedback and Topic Distillation7. As data, we used LETOR [10], which is a public dataset for learning to rank research. 6Please refer to [13] for the derivation of the two equations. 7Please refer to [13] for more details of experiments. 6 Table 1: Ranking Accuracy PRF on OHSUMED Data Algorithms ndcg1 ndcg2 ndcg5 BM25 0.3994 0.3931 0.3972 BM25-PRF 0.3962 0.4277 0.3981 RankSVM 0.4952 0.4755 0.4579 ListNet 0.5231 0.497 0.4662 C-CRF 0.5443 0.4986 0.4808 TD on TREC2004 Data Algorithms ndcg1 ndcg2 ndcg5 BM25 0.3067 0.2933 0.2293 ST 0.3200 0.3133 0.3232 SS 0.3200 0.3200 0.3227 RankSVM 0.4400 0.4333 0.3935 ListNet 0.4400 0.4267 0.4209 C-CRF 0.5200 0.4733 0.4428 We made use of OHSUMED in LETOR for Pseudo Relevance Feedback and TREC2004 in LETOR for Topic Distillation. As evaluation measure, we utilized NDCG@n (Normalized Discounted Cumulative Gain) [6]. As baseline methods for the two tasks, we used several local ranking algorithms such as BM25, RankSVM [7] and ListNet [2]. BM25 is a widely used non-learning ranking method. RankSVM is a state-of-the-art algorithm of the pairwise approach to learning to rank, and ListNet is a stateof-the-art algorithm of the listwise approach. For Pseudo Relevance Feedback, we also compared with a traditional feedback method based on BM25 (BM25-PRF for short). For Topic Distillation, we also compared with two traditional methods, sitemap based term propagation (ST) and sitemap based score propagation (SS) [11], which propagate the relevance along sitemap structure. These algorithms can be regarded as a kind of global ranking methods but they are not based on supervised learning. We conducted 5 fold cross validation for C-CRF and all the baseline methods, using the partition provided in LETOR. The left part of Table 1 shows the ranking accuracies of BM25, BM25-PRF, RankSVM, ListNet, and C-CRF, in terms of NDCG averaged over five trials on OHSUMED data. C-CRF’s performance is superior to the performances of RankSVM and ListNet. This is particularly true for NDCG@1; C-CRF achieves about 5 points higher accuracy than RankSVM and more than 2 points higher accuracy than ListNet. The results indicate that C-CRF based global ranking can indeed improve search relevance. C-CRF also outperforms BM25-PRF, the traditional method of using similarity information for ranking. The result suggests that it is better to employ a supervised learning approach for the task. The right part of Table 1 shows the performances of BM25, SS, ST, RankSVM, ListNet, and C-CRF model in terms of NDCG averaged over 5 trials on TREC data. C-CRF outperforms RankSVM and ListNet at all NDCG positions. This is particularly true for NDCG@1. C-CRF achieves 8 points higher accuracy than RankSVM and ListNet, which is a more than 15% relative improvement. The result indicates that C-CRF based global ranking can achieve better results than local ranking for this task. C-CRF also outperforms SS and ST, the traditional method of using parent-child information for Topic Distillation. The result suggests that it is better to employ a learning based approach. 6 Related Work Most existing work on using relation information in learning is for classification (e.g., [19, 1]) and clustering (e.g., [4, 15]). To the best of our knowledge, there was not much work on using relation for ranking, except Relational Ranking SVM (RRSVM) proposed in [14], which is based on a similar motivation as our work. There are large differences between RRSVM and C-CRF, however. For RRSVM, it is hard to combine the uses of multiple types of relation. In contrast, C-CRF can easily do it by incorportating the relations in different edge feature functions. There is a hyper parameter β in RRSVM representing the trade-off between content and relation information. It needs to be manually tuned. This is not necessary for C-CRF, however, because the trade-off between them is handled naturally by the feature weights in the model, which can be learnt automatically. Furthermore, in some cases certain approximation must be made on the model in RRSVM (e.g. for Topic Distillation) in order to fit into the learning framework of SVM. Such kind of approximation is unnecessary in C-CRF anyway. 7 Besides, C-CRF achieves better ranking accuracy than that reported for RRSVM [14] on the same benchmark dataset. 7 Conclusions We studied learning to rank methods for global ranking problem, in which we use both content information of objects and relation information between objects for ranking. A Continuous CRF (C-CRF) model was proposed for performing the learning task. Taking Pseudo Relevance Feedback and Topic Distillation as examples, we showed how to use C-CRF in global ranking. Experimental results on benchmark data show that C-CRF improves upon the baseline methods in the global ranking tasks. There are still issues which we need to investigate at the next step. (1) We have studied the method of learning C-CRF with Maximum Likelihood Estimation. It is interesting to see how to apply Maximum A Posteriori Estimation to the problem. (2) We have assumed absolute ranking scores given in training data. We will study how to train C-CRF with relative preference data. (3) We have studied two global ranking tasks: Pseudo Relevance Feedback and Topic Distillation. We plan to look at other tasks in the future. References [1] M. Belkin, P. Niyogi, and V. Sindhwani. Manifold regularization: A geometric framework for learning from labeled and unlabeled examples. J. Mach. Learn. Res., 7:2399–2434, 2006. [2] Z. Cao, T. Qin, T.-Y. Liu, M.-F. Tsai, and H. Li. Learning to rank: from pairwise approach to listwise approach. In ICML ’07, pages 129–136, 2007. [3] W. Chu and Z. Ghahramani. Gaussian processes for ordinal regression. Journal of Machine Learning Research, 6:1019–1041, 2005. [4] I. S. Dhillon. Co-clustering documents and words using bipartite spectral graph partitioning. In KDD ’01. [5] G. H. Golub and C. F. V. Loan. Matrix computations (3rd ed.). Johns Hopkins University Press, 1996. [6] K. J¨arvelin and J. Kek¨al¨ainen. Cumulated gain-based evaluation of ir techniques. ACM Trans. Inf. Syst., 20(4):422–446, 2002. [7] T. Joachims. Optimizing search engines using clickthrough data. In KDD ’02, pages 133–142, 2002. [8] K. L. Kwok. A document-document similarity measure based on cited titles and probability theory, and its application to relevance feedback retrieval. In SIGIR ’84, pages 221–231, 1984. [9] J. G. Lewis. Algorithm 582: The gibbs-poole-stockmeyer and gibbs-king algorithms for reordering sparse matrices. ACM Trans. Math. Softw., 8(2):190–194, 1982. [10] T.-Y. Liu, J. Xu, T. Qin, W.-Y. Xiong, and H. Li. Letor: Benchmark dataset for research on learning to rank for information retrieval. In SIGIR ’07 Workshop, 2007. [11] T. Qin, T.-Y. Liu, X.-D. Zhang, Z. Chen, and W.-Y. Ma. A study of relevance propagation for web search. In SIGIR ’05, pages 408–415, 2005. [12] T. Qin, T.-Y. Liu, X.-D. Zhang, G. Feng, D.-S. Wang, and W.-Y. Ma. Topic distillation via sub-site retrieval. Information Processing & Management, 43(2):445–460, 2007. [13] T. Qin, T.-Y. Liu, X.-D. Zhang, D.-S. Wang, and H. Li. Global ranking of documents using continuous conditional random fields. Technical Report MSR-TR-2008-156, Microsoft Corporation, 2008. [14] T. Qin, T.-Y. Liu, X.-D. Zhang, D.-S. Wang, W.-Y. Xiong, and H. Li. Learning to rank relational objects and its application to web search. In WWW ’08, 2008. [15] J. Shi and J. Malik. Normalized cuts and image segmentation. IEEE Transactions on Pattern Analysis and Machine Intelligence, 22(8):888–905, 2000. [16] C. Sutton and A. McCallum. An introduction to conditional random fields for relational learning. In L. Getoor and B. Taskar, editors, Introduction to Statistical Relational Learning. MIT Press, 2006. [17] T. Tao and C. Zhai. Regularized estimation of mixture models for robust pseudo-relevance feedback. In SIGIR ’06, pages 162–169, 2006. [18] C. X. Zhai, W. W. Cohen, and J. Lafferty. Beyond independent relevance: methods and evaluation metrics for subtopic retrieval. In SIGIR ’03, pages 10–17, 2003. [19] D. Zhou, O. Bousquet, T. Lal, J. Weston, and B. Sch¨olkopf. Learning with local and global consistency, 2003. In 18th Annual Conf. on Neural Information Processing Systems. 8
2008
224
3,481
Improving on Expectation Propagation Manfred Opper Computer Science, TU Berlin opperm@cs.tu-berlin.de Ulrich Paquet Computer Laboratory, University of Cambridge ulrich@cantab.net Ole Winther Informatics and Mathematical Modelling, Technical University of Denmark owi@imm.dtu.dk Abstract A series of corrections is developed for the fixed points of Expectation Propagation (EP), which is one of the most popular methods for approximate probabilistic inference. These corrections can lead to improvements of the inference approximation or serve as a sanity check, indicating when EP yields unrealiable results. 1 Introduction The expectation propagation (EP) message passing algorithm is often considered as the method of choice for approximate Bayesian inference when both good accuracy and computational efficiency are required [5]. One recent example is a comparison of EP with extensive MCMC simulations for Gaussian process (GP) classifiers [4], which has shown that not only the predictive distribution, but also the typically much harder marginal likelihood (the partition function) of the data, are approximated remarkably well for a variety of data sets. However, while such empirical studies hold great value, they can not guarantee the same performance on other data sets or when completely different types of Bayesian models are considered. In this paper methods are developed to assess the quality of the EP approximation. We compute explicit expressions for the remainder terms of the approximation. This leads to various corrections for partition functions and posterior distributions. Under the hypothesis that the EP approximation works well, we identify quantities which can be assumed to be small and can be used in a series expansion of the corrections with increasing complexity. The computation of low order corrections in this expansion is often feasible, typically require only moderate computational efforts, and can lead to an improvement to the EP approximation or to the indication that the approximation cannot be trusted. 2 Expectation Propagation in a Nutshell Since it is the goal of this paper to compute corrections to the EP approximation, we will not discuss details of EP algorithms but rather characterise the fixed points which are reached when such algorithms converge. EP is applied to probabilistic models with an unobserved latent variable x having an intractable distribution p(x). In applications p(x) is usually the Bayesian posterior distribution conditioned on a set of observations. Since the dependency on the latter variables is not important for the subsequent theory, we will skip them in our notation. 1 It is assumed that p(x) factorizes into a product of terms fn such that p(x) = 1 Z Y n fn(x) , (1) where the normalising partition function Z = R dx Q n fn(x) is also intractable. We then assume an approximation to p(x) in the form q(x) = Y n gn(x) (2) where the terms gn(x) belong to a tractable, e.g. exponential family of distributions. To compute the optimal parameters of the gn term approximation a set of auxiliary tilted distributions is defined via qn(x) = 1 Zn q(x)fn(x) gn(x)  . (3) Here a single approximating term gn is replaced by an original term fn. Assuming that this replacement leaves qn still tractable, the parameters in gn are determined by the condition that q(x) and all qn(x) should be made as similar as possible. This is usually achieved by requiring that these distributions share a set of generalised moments (which usually coincide with the sufficient statistics of the exponential family). Note, that we will not assume that this expectation consistency [8] for the moments is derived by minimising a Kullback–Leibler divergence, as was done in the original derivations of EP [5]. Such an assumption would limit the applicability of the approximate inference and exclude e.g. the approximation of models with binary, Ising variables by a Gaussian model as in one of the applications in the last section. The corresponding approximation to the normalising partition function in (1) was given in [8] and [7] and reads in our present notation1 ZEP = Y n Zn . (4) 3 Corrections to EP An expression for the remainder terms which are neglected by the EP approximation can be obtained by solving for fn in (3), and taking the product to get Y n fn(x) = Y n Znqn(x)gn(x) q(x)  = ZEP q(x) Y n qn(x) q(x)  . (5) Hence Z = R dx Q n fn(x) = ZEP R, with R = Z dx q(x) Y n qn(x) q(x)  and p(x) = 1 R q(x) Y n qn(x) q(x)  . (6) This shows that corrections to EP are small when all distributions qn are indeed close to q, justifying the optimality criterion of EP. For related expansions, see [2, 3, 9]. Exact probabilistic inference with the corrections described here again leads to intractable computations. However, we can derive exact perturbation expansions involving a series of corrections with increasing computational complexity. Assuming that EP already yields a good approximation, the computation of a small number of these terms maybe sufficient to obtain the most dominant corrections. On the other hand, when the leading corrections come out large or do not sufficiently decrease with order, this may indicate that the EP approximation is inaccurate. Two such perturbation expansions are be presented in this section. 1The definition of partition functions Zn is slightly different from previous works. 2 3.1 Expansion I: Clusters The most basic expansion is based on the variables εn(x) = qn(x) q(x) −1 which we can assume to be typically small, when the EP approximation is good. Expanding the products in (6) we obtain the correction to the partition function R = Z dx q(x) Y n (1 + εn(x)) (7) = 1 + X n1<n2 εn1(x)εn2(x) q + X n1<n2<n3 εn1(x)εn2(x)εn3(x) q + . . . , (8) which is a finite series in terms of growing clusters of “interacting” variables εn(x). Here the brackets ⟨. . .⟩q denote expectations with respect to the distribution q. Note, that the first order term P n ⟨εn(x)⟩q = 0 vanishes by the normalization of qn and q. As we will see later, the computation of corrections is feasible when qn is just a finite mixture of K simpler densities from the exponential family to which q belongs. Then the number of mixture components in the j-th term of the expansion of R is just of the order O(Kj) and an evaluation of low order terms should be tractable. In a similar way, we get p(x) = q(x) 1 + P n εn(x) + P n1<n2 εn1(x)εn2(x) + . . .  1 + P n1<n2 ⟨εn1(x)εn2(x)⟩q + . . . , (9) In order to keep the resulting density normalized to one, we should keep as many terms in the numerator as in the denominator. As an example, the first order correction to q(x) is p(x) ≈ X n qn(x) −(N −1)q(x) . (10) 3.2 Expansion II: Cumulants One of most important applications of EP is to the case of statistical models with Gaussian process priors. Here x is a latent variable with Gaussian prior distribution and covariance E[xx⊤] = K where K is the kernel matrix. In this case we have N +1 terms f0, f1, . . . , fN in (1) where f0(x) = g0(x) = exp[−1 2x⊤K−1x]. For n ≥1 each fn(x) = tn(xn) is the likelihood term for the nth observation which depends only on a single component xn of the vector x. The corresponding approximating terms are chosen to be Gaussian of the form gn(x) ∝ eγnx−1 2 λnx2. The 2N parameters γn and λn are determined in such a way that q(x) and the distributions qn(x) have the same first and second marginal moments ⟨xn⟩and ⟨x2 n⟩. In this case, the computation of corrections (7) would require the computation of multivariate integrals of increasing dimensionality. Hence, a different type of expansion seems more appropriate. The main idea is to expand with respect to the higher order cumulants of the distributions qn. To derive this expansion, we simplify (6) using the fact that q(x) = q(x\n|xn)q(xn) and qn(x) = q(x\n|xn)qn(xn), where we have (with a slight abuse of notation) introduced q(xn) and qn(xn), the marginals of q(x) and qn(x). Thus p(x) = 1 R q(x)F(x) and R = R dx q(x)F(x), where F(x) = Y n qn(xn) q(xn)  . (11) Since q(xn) and the qn(xn) have the same first two cumulants, corrections can be expressed by the higher cumulants of the qn(xn) (note, that the higher cumulants of q(xn) vanish). The cumulants cln of qn(xn) are defined by their characteristic functions χn(k) via qn(xn) = Z dk 2π e−ikxnχn(k) and ln χn(k) = X l (i)l cln l! kl . (12) Expressing the Gaussian marginals q(xn) by their first and second cumulants, the means mn and the variances Snn and introducing the function rn(k) = X l≥3 (i)l cln l! kl (13) 3 which contains the contributions of all higher order cumulants, we get F(x) = Y n R dkn exp  −ikn(xn −mn) −1 2Snnk2 n + rn(kn)  R dkn exp  −ikn(xn −mn) −1 2Snnk2n  ! (14) = Z dη sY n Snn 2π exp " − X n Snnη2 n 2 # exp "X n rn  ηn −i(xn −mn) Snn # (15) where in the last equality we have introduced a shift of variables ηn = kn + i (xn−mn) Snn . An expansion can be performed with respect to the cumulants in the terms gn which had been neglected in the EP approximation. The basic computations are most easily explained for the correction R to the partition function. 3.2.1 Correction to the partition function Since q(x) is a multivariate Gaussian of the form q(x) = N(x; m, S), the correction R to the partition Z involves a double Gaussian average over the vector x and the set of ηn. This can be simplified by combining them into a single complex zero mean Gaussian random vector defined as zn = ηn −i xn−mn Snn such that R = * exp "X n rn (zn) #+ z (16) The most remarkable property of the Gaussian z is its covariance which is easily found to be ⟨zizj⟩z = −Sij SiiSjj when i ̸= j, and ⟨z2 i ⟩z = 0 . (17) The last equation has important consequences for the surviving terms in an expansion of R! Assuming that the gn are small we perform a power series expansion of ln R ln R = ln * exp h X n rn (zn) i+ z = X n ⟨rn⟩z + 1 2 D X n rn 2E z −1 2  X n ⟨rn⟩z 2 ± . . . (18) = 1 2 X m̸=n ⟨rmrn⟩z ± . . . = X m̸=n X l≥3 clnclm l!  Snm SnnSmm l ± . . . (19) Here we have repeatedly used the fact that each factor zn in expectations ⟨zl nzs m⟩have to be paired (by Wick’s theorem) with a factor zm where m ̸= n (diagonal terms vanish by (17)). This gives nonzero contributions only, when l = s and there are l! ways for pairing.2 This expansion gives a hint why EP may work typically well for multivariate models when covariances Sij are small compared to the variances Sii. While we may expect that ln ZEP = O(N) where N is the number of variables xn, the vanishing of the “self interactions” indicates that corrections may not scale with N. 3.2.2 Correction to marginal moments The predictive density of a novel observation can be treated by extending the Gaussian prior to include a new latent variable x∗with E[x∗x] = k∗and E[x2 ∗] = k∗, and appears as an average of a likelihood term over the posterior marginal of x∗. A correction for the predictive density can also be derived in terms of the cumulant expansion by averaging the conditional distribution p(x∗|x) = N(x∗; k⊤ ∗K−1x, σ2 ∗) with σ2 ∗= k∗−k⊤ ∗K−1k∗. Using the expression (15) we obtain (where we set R = 1 in (6) to lowest order) p(x∗) = Z dx p(x∗|x) p(x) = N(x∗; µx∗, s2 x∗) * 1 + X n rn  ηn −ixn −mn Snn  + . . . + η,x∼N(x;µ,Σ) (20) 2The terms in the expansion might be organised in Feynman graphs, where “self interaction” loops are absent. 4 1 2 3 4 5 6 −235 −230 −225 −220 −215 −210 −205 −200 −195 Number of components K logZ Figure 1: ln Z approximations obtained from q(x)’s factorization in (2), for sec. 4.1’s mixture model, as obtained by: variational Bayes (see [1] for details) as red squares; α = 1 2 in Minka’s αdivergence message passing scheme, described in [6], as magenta triangles; EP as blue circles; EP with the 2nd order correction in (8) as green diamonds. For 20 runs each, the colour intensities correspond to the frequency of reaching different estimates. A Monte Carlo estimate of the true ln Z, as found by parallel tempering with thermodynamic integration, is shown as a line with twostandard deviation error bars. where µx∗= k⊤ ∗K−1m and variance s2 x∗= k∗−k⊤ ∗(K + Λ−1)−1k∗and Λ = diag(λ) denotes the parameters in the Gaussian terms gn. The average in (20) is over a Gaussian x with Σ−1 = (K −k−1 ∗k∗k⊤ ∗)−1 + Λ−1 and µ = (x∗−µx∗)σ−2 ∗ΣK−1k∗+ m. By simplifying the inner expectation over the complex Gaussian variables η we obtain p(x∗) = N(x∗; µx∗, s2 x∗)  1 + X n X l≥3 cln l!  1 √Snn l * hl xn −mn √Snn + x∼N(x;µ,Σ) + · · ·   (21) where hl is the lth Hermite polynomial. The Hermite polynomials are averaged over a Gaussian density where the only occurrence of x∗is through (x∗−µx∗) in µ, so that the expansion ultimately appears as a polynomial in x∗. A correction to the predictive density follows from averaging t∗(x∗) over (21). 4 Applications 4.1 Mixture of Gaussians This section illustrates an example where a large first nontrivial correction term in (8) reflects an inaccurate EP approximation. We explain this for a K-component Gaussian mixture model. Consider N observed data points ζn with likelihood terms fn(x) = P κ πκN(ζn; µκ, Γ−1 κ ), with n ≥1 and with the mixing weights πκ forming a probability vector. The latent variables are then x = {πκ, µκ, Γκ}K κ=1. For our prior on x we use a Dirichlet distribution and product of NormalWisharts densities so that f0(x) = D(π) Q κ NW(µκ, Γκ). When we multiply the fn terms we see that intractability for the mixture model arises because the number of terms in the marginal likelihood is KN, rather than because integration is intractable. The computation of lower-order terms in (8) should therefore be immediately feasible. The approximation q(x) and each gn(x) are chosen to be of the same exponential family form as f0(x), where we don’t require gn(x) to be normalizable. For brevity we omit the details of the EP algorithm for this mixture model, and assume here that an EP fixed point has been found, possibly using some damping. Fig. 1 shows various approximations to the log marginal likelihood ln Z for ζn coming from the acidity data set. It is evident that the “true peak” doesn’t match the peak obtained by approximate inference, and we will wrongly predict which K maximizes the log marginal likelihood. Without having to resort to Monte Carlo methods, the second order correction for K = 3 both corrects our prediction and already confirms that the original approximation might be inadequate. 4.2 Gaussian Process Classification The GP classification model arises when we observe N data points ζn with class labels yn ∈ {−1, 1}, and model y through a latent function x with the GP prior mentioned in sec. 3.2. The 5 0.0001 0.001 0.001 0.01 0.01 0.01 0.1 0.1 0.1 0.1 0.2 0.2 0.2 0.2 0.3 0.3 0.3 0.3 0.3 0.3 0.4 0.4 0.4 0.4 0.4 0.5 0.5 0.5 0.5 0.6 0.6 0.6 log lengthscale, ln(ℓ) log magnitude, ln(σ) 1.5 2 2.5 3 3.5 4 4.5 5 0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5 (a) ln R, second order, with l = 3, 4. 0.0001 0.001 0.001 0.01 0.01 0.01 0.1 0.1 0.1 0.1 0.2 0.2 0.2 0.2 0.3 0.4 log lengthscale, ln(ℓ) log magnitude, ln(σ) 1.5 2 2.5 3 3.5 4 4.5 5 0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5 (b) Monte Carlo ln R Figure 2: A comparison of a perturbation expansion of (19) against Monte Carlo estimates of the true correction ln R, using the USPS data set from [4]. likelihood terms for yn are assumed to be tn(xn) = Φ(ynxn), where Φ(·) denotes the cumulative Normal density. Eq. (19) shows how to compute the cumulant expansion by dovetailing the EP fixed point with the characteristic function of qn(xn): From the EP fixed point we have q(x) = N(x; m, S) and gn ∝ eγnxn−1 2 λnxn; consequently the marginal density of xn in q(x)/gn(xn) from (3) is N(xn; µ, v2), where v−2 = 1/Snn −λn and µ = v−2(mn/Snn −γn). Using (3) again we have qn(xn) = 1 Zn Φ(ynxn)N(xn; µ, v2) . (22) The characteristic function of qn(xn) is obtained by the inversion of (12), χn(k) = eikxn = eikµ−1 2 k2v2 Φ(wk) Φ(w) , with w = ynµ √ 1 + v2 and wk = ynµ + ikv2 √ 1 + v2 , (23) with expectations ⟨· · ·⟩being with respect to qn(xn). Raw moments are computed through derivatives of the characteristic function, i.e. ⟨xj n⟩= i−jχ(j) n (0). The cumulants cln are determined from the derivatives of ln χn(k) evaluated at zero (or equally from raw moments, e.g. c3n = 2⟨xn⟩3 −3⟨xn⟩⟨x2 n⟩+ ⟨x3 n⟩), such that c3n = α3β  2β2 + 3wβ + w2 −1  (24) c4n = −α4β  6β3 + 12wβ2 + 7w2β + w3 −4β −3w  , (25) where α = v2/ √ 1 + v2 and β = N(w; 0, 1)/Φ(w). An extensive MCMC evaluation of EP for GP classification on various data sets was recently given by [4], showing that the log marginal likelihood of the data can be approximated remarkably well. An even more accurate estimation of the approximation error is given by considering the second order correction in (19) (computed here up to l = 4). For GPC we generally found that the l = 3 term dominates l = 4, and we do not include any higher cumulants here. Fig. 2 illustrates the ln R correction on the binary subproblem of the USPS 3’s vs. 5’s digits data set, with N = 767, as was used by [4]. We used the same kernel k(ζ, ζ′) = σ2 exp(−1 2∥ζ −ζ′∥2/ℓ2) as [4], and evaluated (19) on a similar grid of ln ℓand ln σ values. For the same grid values we obtained Monte Carlo estimates of ln Z, and hence ln R. They are plotted in fig. 2(b) for the cases where they estimate ln Z to sufficient accuracy (up to four decimal places) to obtain a smoothly varying plot of ln R.3 The correction from (19), as computed here, is O(N 2), and compares favourably to O(N 3) complexity of EP for GPC. 3The Monte Carlo estimates in [4] are accurate enough for showing EP’s close approximation to ln Z, but not enough to make any quantified statement about ln R. 6 −6 −4 −2 0 2 4 6 −0.6 −0.4 −0.2 0 0.2 0.4 0.6 0.8 1 1.2 Location of ζ∗ Coefficients of xa ∗& correction ratio yn = +1 yn = −1 coeff of x* 0 coeff of x* 1 coeff of x* 2 coeff of x* 3 correction ratio pgpc(y* = 1) / pcorr(y* = 1) Figure 3: The initial coefficients of the polynomial in x∗, as they ultimately appear in the first nontrivial correction term in (21). Cumulants l = 3 and l = 4 were used. The coefficients are shown for test points ζ∗after observing data points ζn. The ratio between the standard and (1st order) corrected GP classification predictive density is also illustrated. In fig. 3 we show the coefficients of the polynomial corrections (21) in powers of x∗to the predictive density p(x∗), using 3rd and 4th cumulants. The small corrections arise as whenever terms ynmn are positive and large compared to the posterior variance, non-Gaussian terms fn(x) = tn(xn) ≈1 for almost all values of xn which have significant probability under the Gaussian distribution that is proportional to q(x)/gn(xn). For these terms qn(x) is therefore almost Gaussian and higher cumulants are small. A example where this will no longer be the case is a GP model with tn(xn) = 1 for |xn| < a and tn(xn) = 0 for |xn| > a. This is a regression model yn = xn+νn where i.i.d. noise variables νn have uniform distribution and the observed outputs are all zero, i.e. yn = 0. For this case, the exact posterior variance does not shrink to zero even if the number of data points goes to infinity. The EP approximation however has the variance decrease to zero and our corrections increase with sample size. 4.3 Ising models Somewhat surprising (and probably less known) is the fact that EP and our corrections apply well to a fairly limiting case of the GP model where the terms are of the form tn(xn) = eθnxn (δ(xn + 1) + δ(xn −1)), where δ(x) is the Dirac distribution. These terms, together with a “Gaussian” f0(x) = exp[P i<j Jijxixj] (where we do not assume that the matrix J is negative definite), makes this GP model an Ising model with binary variables xn = ±1. As shown in [8], this model can still be treated with the same type of Gaussian term approximations as ordinary GP models, allowing for surprisingly accurate estimation of the mean and covariance. Here we will show the effect of our corrections for toy models, where exact inference is possible by enumeration. The tilted distributions qn(xn) are biased binary distributions with cumulants: c3n = −2mn(1 − m2 n), c4n = −2 + 8m2 n −6m4 n, etc. We will consider two different scenarios for random θ and J 10 −1 10 0 10 1 10 −6 10 −4 10 −2 10 0 MAD 2 node marginals β 10 −1 10 0 10 1 10 −10 10 −5 10 0 10 5 AD Free energy β Figure 4: The left plot shows the MAD of the estimated covariance matrix from the exact one for different values of β for EP (blue), EP 2nd order l = 4 corrections (blue with triangles), Bethe or loopy belief propagation (LBP; dashed green) and Kikuchi or generalized LBP (dash–dotted red). The Bethe and Kikuchi approximations both give covariance estimates for all variable pairs as the model is fully connected. The right plot shows the absolute deviation of ln Z from the true value using second order perturbations with l = 3, 4, 5 (l = 3 is the smallest change). The remaining line styles are the same as in the left plot. 7 described in detail in [8]. In the first scenario, with N = 10, the Jij’s are generated independently at random according to Jij = βwij and wij ∼N(0, 1). For varying β, the maximum absolute deviation (MAD) of the estimated covariance matrices from the exact one maxi,j |Σest ij −Σexact ij | is shown in fig. 4 left. The absolute deviation on the log partition function is shown in fig. 4 right. In the Wainwright-Jordan set-up N = 16 nodes are either fully connected or connected to nearest neighbors in a 4–by–4 grid. The external field (observation) strengths θi are drawn from a uniform distribution θi ∼U[−dobs, dobs] with dobs = 0.25. Three types of coupling strength statistics are considered: repulsive (anti-ferromagnetic) Jij ∼U[−2dcoup, 0], mixed Jij ∼U[−dcoup, +dcoup] and attractive (ferromagnetic) Jij ∼U[0, +2dcoup]. Table 1 gives the MAD of marginals averaged of 100 repetitions. The results for both set-ups give rise to the conclusion that when the EP approximation works well then the correction give an order of magnitude of improvement. In the opposite situation, the correction might worsen the results. Table 1: Average MAD of marginals in a Wainwright-Jordan set-up, comparing loopy belief propagation (LBP), log-determinant relaxation (LD), EP, EP with l = 5 correction (EP+), and EP with only one spanning tree approximating term (EP tree). Problem type Method Graph Coupling dcoup LBP LD EP EP+ EP tree Repulsive 0.25 0.037 0.020 0.003 0.00058487 0.0017 Repulsive 0.50 0.071 0.018 0.031 0.0157 0.0143 Full Mixed 0.25 0.004 0.020 0.002 0.00042727 0.0013 Mixed 0.50 0.055 0.021 0.022 0.0159 0.0151 Attractive 0.06 0.024 0.027 0.004 0.0023 0.0025 Attractive 0.12 0.435 0.033 0.117 0.1066 0.0211 Repulsive 1.0 0.294 0.047 0.153 0.1693 0.0031 Repulsive 2.0 0.342 0.041 0.198 0.4244 0.0021 Grid Mixed 1.0 0.014 0.016 0.011 0.0122 0.0018 Mixed 2.0 0.095 0.038 0.082 0.0984 0.0068 Attractive 1.0 0.440 0.047 0.125 0.1759 0.0028 Attractive 2.0 0.520 0.042 0.177 0.4730 0.0002 5 Outlook We expect that it will be possible to develop similar corrections to other approximate inference methods, such as the variational approach or the “power EP” approximations which interpolate between the variational method and EP. This may help the user to decide which approximation is more accurate for a given problem. We will also attempt an analysis of the scaling of higher order terms in these expansions to see if they are asymptotic or have a finite radius of convergence. References [1] H. Attias. A variational Bayesian framework for graphical models. In Advances in Neural Information Processing Systems 12, 2000. [2] M. Chertkov and V. Y. Chernyak. Loop series for discrete statistical models on graphs. Journal of Statistical Mechanics: Theory and Experiment, page P06009, 2006. [3] S. Ikeda, T. Tanaka, and S. Amari. Information geometry of turbo and low-density parity-check codes. IEEE Transactions on Information Theory, 50(6):1097, 2004. [4] M. Kuss and C. E. Rasmussen. Assessing approximate inference for binary Gaussian process classification. Journal of Machine Learning Research, 6:1679–1704, 2005. [5] T. P. Minka. Expectation propagation for approximate Bayesian inference. In UAI 2001, pages 362–369, 2001. [6] T. P. Minka. Divergence measures and message passing. Technical Report MSR-TR-2005-173, Microsoft Research, Cambridge, UK, 2005. [7] T.P. Minka. The EP energy function and minimization schemes. Technical report, 2001. [8] M. Opper and O. Winther. Expectation consistent approximate inference. Journal of Machine Learning Research, 6:2177–2204, 2005. [9] E. Sudderth, M. Wainwright, and A. Willsky. Loop series and Bethe variational bounds in attractive graphical models. In Advances in Neural Information Processing Systems 20, pages 1425–1432. 2008. 8
2008
225
3,482
Learning a Discriminative Hidden Part Model for Human Action Recognition Yang Wang School of Computing Science Simon Fraser University Burnaby, BC, Canada, V5A 1S6 ywang12@cs.sfu.ca Greg Mori School of Computing Science Simon Fraser University Burnaby, BC, Canada, V5A 1S6 mori@cs.sfu.ca Abstract We present a discriminative part-based approach for human action recognition from video sequences using motion features. Our model is based on the recently proposed hidden conditional random field (hCRF) for object recognition. Similar to hCRF for object recognition, we model a human action by a flexible constellation of parts conditioned on image observations. Different from object recognition, our model combines both large-scale global features and local patch features to distinguish various actions. Our experimental results show that our model is comparable to other state-of-the-art approaches in action recognition. In particular, our experimental results demonstrate that combining large-scale global features and local patch features performs significantly better than directly applying hCRF on local patches alone. 1 Introduction Recognizing human actions from videos is a task of obvious scientific and practical importance. In this paper, we consider the problem of recognizing human actions from video sequences on a frame-by-frame basis. We develop a discriminatively trained hidden part model to represent human actions. Our model is inspired by the hidden conditional random field (hCRF) model [16] in object recognition. In object recognition, there are three major representations: global template (rigid, e.g. [3], or deformable, e.g. [1]), bag-of-words [18], and part-based [7, 6]. All three representations have been shown to be effective on certain object recognition tasks. In particular, recent work [6] has shown that part-based models outperform global templates and bag-of-words on challenging object recognition tasks. A lot of the ideas used in object recognition can also be found in action recognition. For example, there is work [2] that treats actions as space-time shapes and reduces the problem of action recognition to 3D object recognition. In action recognition, both global template [5] and bag-of-words models [14, 4, 15] have been shown to be effective on certain tasks. Although conceptually appealing and promising, the merit of part-based models has not yet been widely recognized in action recognition. The goal of this work is to address this gap. Our work is partly inspired by a recent work in part-based event detection [10]. In that work, template matching is combined with a pictorial structure model to detect and localize actions in crowded videos. One limitation of that work is that one has to manually specify the parts. Unlike Ke et al. [10], the parts in our model are initialized automatically. (a) (b) (c) (d) (e) Figure 1: Construction of the motion descriptor. (a) original image; (b) optical flow; (c) x and y components of optical flow vectors Fx, Fy; (d) half-wave rectification of x and y components to obtain 4 separate channels F + x , F − x , F + y , F − y ; (e) final blurry motion descriptors Fb+ x , Fb− x , Fb+ y , Fb− y . The major contribution of this work is that we combine the flexibility of part-based approaches with the global perspectives of large-scale template features in a discriminative model. We show that the combination of part-based and large-scale template features improves the final results. 2 Our Model The hidden conditional random field model [16] was originally proposed for object recognition and has also been applied in sequence labeling [19]. Objects are modeled as flexible constellations of parts conditioned on the appearances of local patches found by interest point operators. The probability of the assignment of parts to local features is modeled by a conditional random field (CRF) [11]. The advantage of the hCRF is that it relaxes the conditional independence assumption commonly used in the bag-of-words approaches of object recognition. Similarly, local patches can also be used to distinguish actions. Figure. 4(a) shows some examples of human motion and the local patches that can be used to distinguish them. A bag-of-words representation can be used to model these local patches for action recognition. However, it suffers from the same restriction of conditional independence assumption that ignores the spatial structures of the parts. In this work, we use a variant of hCRF to model the constellation of these local patches in order to alleviate this restriction. There are also some important differences between objects and actions. For objects, local patches could carry enough information for recognition. But for actions, we believe local patches are not sufficiently informative. In our approach, we modify the hCRF model to combine local patches and large-scale global features. The large-scale global features are represented by a root model that takes the frame as a whole. Another important difference with [16] is that we use the learned root model to find discriminative local patches, rather than using a generic interest-point operator. 2.1 Motion features Our model is built upon the optical flow features in [5]. This motion descriptor has been shown to perform reliably with noisy image sequences, and has been applied in various tasks, such as action classification, motion synthesis, etc. To calculate the motion descriptor, we first need to track and stabilize the persons in a video sequence. Any reasonable tracking or human detection algorithm can be used, since the motion descriptor we use is very robust to jitters introduced by the tracking. Given a stabilized video sequence in which the person of interest appears in the center of the field of view, we compute the optical flow at each frame using the Lucas-Kanade [12] algorithm. The optical flow vector field F is then split into two scalar fields Fx and Fy, corresponding to the x and y components of F. Fx and Fy are further half-wave rectified into four non-negative channels F + x , F − x , F + y , F − y , so that Fx = F + x −F − x and Fy = F + y −F − y . These four non-negative channels are then blurred with a Gaussian kernel and normalized to obtain the final four channels Fb+ x ,Fb− x ,Fb+ y ,Fb− y (see Fig. 1). 2.2 Hidden conditional random field(hCRF) Now we describe how we model a frame I in a video sequence. Let x be the motion feature of this frame, and y be the corresponding class label of this frame, ranging over a finite label alphabet Y. Our task is to learn a mapping from x to y. We assume each image I contains a set of salient patches {I1, I2, ..., Im}. we will describe how to find these salient patches in Sec. 3. Our training set consists of labeled images (xt, yt) (as a notation convention, we use superscripts to index training images and subscripts to index patches) for t = 1, 2, ..., n, where yt ∈Y and xt = (xt 1, xt 2..., xt m). xt i = xt(It i) is the feature vector extracted from the global motion feature xt at the location of the patch It i. For each image I = {I1, I2, ..., Im}, we assume there exists a vector of hidden “part” variables h = {h1, h2, ..., hm}, where each hi takes values from a finite set H of possible parts. Intuitively, each hi assigns a part label to the patch Ii, where i = 1, 2, ..., m. For example, for the action “waving-two-hands”, these parts may be used to characterize the movement patterns of the left and right arms. The values of h are not observed in the training set, and will become the hidden variables of the model. We assume there are certain constraints between some pairs of (hj, hk). For example, in the case of “waving-two-hands”, two patches hj and hk at the left hand might have the constraint that they tend to have the same part label, since both of them are characterized by the movement of the left hand. If we consider hi(i = 1, 2, ..., m) to be vertices in a graph G = (E, V ), the constraint between hj and hk is denoted by an edge (j, k) ∈E. See Fig. 2 for an illustration of our model. Note that the graph structure can be different for different images. We will describe how to find the graph structure E in Sec. 3. y x hk hi xi xj xk hj φ(·) ϕ(·) ω(·) ψ(·) class label hidden parts image Figure 2: Illustration of the model. Each circle corresponds to a variable, and each square corresponds to a factor in the model. Given the motion feature x of an image I, its corresponding class label y, and part labels h, a hidden conditional random field is defined as p(y, h|x; θ) = exp(Ψ(y,x,h;θ)) P ˆy∈Y P ˆh∈Hm exp(Ψ(ˆy,x,ˆh;θ)), where θ is the model parameter, and Ψ(y, h, x; θ) ∈R is a potential function parameterized by θ. It follows that p(y|x; θ) = X h∈Hm p(y, h|x; θ) = P h∈Hm exp(Ψ(y, h, x; θ)) P ˆy∈Y P h∈Hm exp(Ψ(ˆy, h, x; θ)) (1) We assume Ψ(y, h, x) is linear in the parameters θ = {α, β, γ, η}: Ψ(y, h, x; θ) = X j∈V α⊤·φ(xj, hj)+ X j∈V β⊤·ϕ(y, hj)+ X (j,k)∈E γ⊤·ψ(y, hj, hk)+η⊤·ω(y, x) (2) where φ(·) and ϕ(·) are feature vectors depending on unary hj’s, ψ(·) is a feature vector depending on pairs of (hj, hk), ω(·) is a feature vector that does not depend on the values of hidden variables. The details of these feature vectors are described in the following. Unary potential α⊤· φ(xj, hj) : This potential function models the compatibility between xj and the part label hj, i.e., how likely the patch xj is labeled as part hj. It is parameterized as α⊤· φ(xj, hj) = X c∈H α⊤ c · 1{hj=c} · [f a(xj) f s(xj)] (3) where we use [f a(xj) f s(xj)] to denote the concatenation of two vectors f a(xj) and f s(xj). f a(xj) is a feature vector describing the appearance of the patch xj. In our case, f a(xj) is simply the concatenation of four channels of the motion features at patch xj, i.e., f a(xj) = [Fb+ x (xj) Fb− x (xj) Fb+ y (xj) Fb− y (xj)]. f s(xj) is a feature vector describing the spatial location of the patch xj. We discretize the whole image locations into l bins, and f s(xj) is a length l vector of all zeros with a single one for the bin occupied by xj. The parameter αc can be interpreted as the measurement of compatibility between feature vector [f a(xj) f s(xj)] and the part label hj = c. The parameter α is simply the concatenation of αc for all c ∈H. Unary potential β⊤·ϕ(y, hj) : This potential function models the compatibility between class label y and part label hj, i.e., how likely an image with class label y contains a patch with part label hj. It is parameterized as β⊤· ϕ(y, hj) = X a∈Y X b∈H βa,b · 1{y=a} · 1{hj=b} (4) where βa,b indicates the compatibility between y = a and hj = b. Pairwise potential γ⊤· ψ(y, hj, hk): This pairwise potential function models the compatibility between class label y and a pair of part labels (hj, hk), i.e., how likely an image with class label y contains a pair of patches with part labels hj and hk, where (j, k) ∈E corresponds to an edge in the graph. It is parameterized as γ⊤· ψ(y, hj, hk) = X a∈Y X b∈H X c∈H γa,b,c · 1{y=a} · 1{hj=b} · 1{hk=c} (5) where γa,b,c indicates the compatibility of y = a, hj = b and hk = c for the edge (j, k) ∈E. Root model η⊤· ω(y, x): The root model is a potential function that models the compatibility of class label y and the large-scale global feature of the whole image. It is parameterized as η⊤· ω(y, x) = X a∈Y η⊤ a · 1{y=a} · g(x) (6) where g(x) is a feature vector describing the appearance of the whole image. In our case, g(x) is the concatenation of all the four channels of the motion features in the image, i.e., g(x) = [Fb+ x Fb− x Fb+ y Fb− y ]. ηa can be interpreted as a root filter that measures the compatibility between the appearance of an image g(x) and a class label y = a. And η is simply the concatenation of ηa for all a ∈Y. The parameterization of Ψ(y, h, x) is similar to that used in object recognition [16]. But there are two important differences. First of all, our definition of the unary potential function φ(·) encodes both appearance and spatial information of the patches. Secondly, we have a potential function ω(·) describing the large scale appearance of the whole image. The representation in Quattoni et al. [16] only models local patches extracted from the image. This may be appropriate for object recognition. But for human action recognition, it is not clear that local patches can be sufficiently informative. We will demonstrate this experimentally in Sec. 4. 3 Learning and Inference The model parameters θ are learned by maximizing the conditional log-likelihood on the training images: θ∗= arg max θ L(θ) = arg max θ X t log p(yt|xt; θ) = arg max θ X t log X h p(yt, h|xt; θ) ! (7) The objective function L(θ) in Quattoni et al.[16] also has a regularization term −1 2σ2 ||θ||2. In our experiments, we find that the regularization does not seem to have much effect on the final results, so we will use the un-regularized version. Different from conditional random field (CRF) [11], the objective function L(θ) of hCRF is not concave, due to the hidden variables h. But we can still use gradient ascent to find θ that is locally optimal. The gradient of the log-likelihood with respect to the t-th training image (xt, yt) can be calculated as: ∂Lt(θ) ∂α = X j∈V  Ep(hj|yt,xt;θ)φ(xt j, hj) −Ep(hj,y|xt;θ)φ(xt j, hj)  ∂Lt(θ) ∂β = X j∈V  Ep(hj|yt,xt;θ)ϕ(hj, yt) −Ep(hj,y|xt;θ)ϕ(hj, y)  ∂Lt(θ) ∂γ = X (j,k)∈E  Ep(hj,hk|yt,xt;θ)ψ(yt, hj, hk) −Ep(hj,hk,y|xt;θ)ψ(y, hj, hk)  ∂Lt(θ) ∂η = ω(yt, xt) −Ep(y|xt;θ)ω(y, xt) (8) Assuming the edges E form a tree, the expectations in Eq. 8 can be calculated in O(|Y||E||H|2) time using belief propagation. Now we describe several details about how the above ideas are implemented. Learning root filter η: Given a set of training images (xt, yt), we firstly learn the root filter η by solving the following optimization problem: η∗= arg max η X t log L(yt|xt; η) = arg max η X t log exp η⊤· ω(yt, xt)  P y exp (η⊤· ω(y, xt)) (9) In other words, η∗is learned by only considering the feature vector ω(·). We then use η∗as the starting point for η in the gradient ascent (Eq. 8). Other parameters α, β, γ are initialized randomly. Patch initialization: We use a simple heuristic similar to that used in [6] to initialize ten salient patches on every training image from the root filter η∗trained above. For each training image I with class label a, we apply the root filter ηa on I, then select an rectangle region of size 5 × 5 in the image that has the most positive energy. We zero out the weights in this region and repeat until ten patches are selected. Figure 4(a) shows examples of the patches found in some images. The tree G = (V, E) is formed by running a minimum spanning tree algorithm over the ten patches. Inference: During testing, we do not know the class label of a given test image, so we cannot use the patch initialization described above to initialize the patches, since we do not know which root filter to use. Instead, we run root filters from all the classes on a test image, then calculate the probabilities of all possible instantiations of patches under our learned model, and classify the image by picking the class label that gives the maximum of the these probabilities. In other words, for a testing image with motion descriptor x, we first obtain |Y| instances {x(1), x(2), ..., x(|Y|)}, where each x(k) is obtained by initializing the patches on x using the root filter ηk. The final class label y∗of x is obtained as y∗= arg maxy  max{p(y|x(1); θ), p(y|x(2); θ), ..., p(y|x(|Y|); θ)}  . 4 Experiments We test our algorithm on two publicly available datasets that have been widely used in action recognition: Weizmann human action dataset [2], and KTH human motion dataset [17]. Performance on these benchmarks is saturating – state-of-the-art approaches achieve near-perfect results. We show our method achieves results comparable to the state-of-the-art, and more importantly that our extended hCRF model significantly outperforms a direct application of the original hCRF model [16]. Weizmann dataset: The Weizmann human action dataset contains 83 video sequences showing nine different people, each performing nine different actions: running, walking, jumpingjack, jumping-forward-on-two-legs,jumping-in-place-on-two-legs, galloping-sideways, wavingtwo-hands, waving-one-hand, bending. We track and stabilize the figures using the background subtraction masks that come with this dataset. We randomly choose videos of five subjects as training set, and the videos in the remaining four subjects as test set. We learn three hCRF models with different sizes of possible part labels, |H| = 6, 10, 20. Our model classifies every frame in a video sequence (i.e., per-frame classification), but 1.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.02 0.93 0.01 0.02 0.00 0.00 0.00 0.00 0.01 0.01 0.03 0.74 0.00 0.06 0.02 0.12 0.02 0.00 0.01 0.00 0.00 0.99 0.00 0.00 0.00 0.00 0.00 0.00 0.05 0.00 0.00 0.72 0.06 0.17 0.00 0.00 0.00 0.01 0.07 0.00 0.02 0.73 0.17 0.00 0.00 0.00 0.00 0.01 0.00 0.05 0.06 0.88 0.00 0.00 0.00 0.00 0.00 0.01 0.00 0.00 0.00 0.99 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 1.00 bend jack jump pjump run side walk wave1 wave2 bend jack jump pjump run side walk wave1 wave2 1.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 1.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 1.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 1.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 1.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.75 0.25 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 1.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 1.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 1.00 bend jack jump pjump run side walk wave1 wave2 bend jack jump pjump run side walk wave1 wave2 Frame-by-frame classification Video classification Figure 3: Confusion matrices of classification results on Weizmann dataset. Horizontal rows are ground truths, and vertical columns are predictions. method root model local hCRF our approach |H| = 6 |H| = 10 |H| = 20 |H| = 6 |H| = 10 |H| = 20 per-frame 0.7470 0.5722 0.6656 0.6383 0.8682 0.9029 0.8557 per-video 0.8889 0.5556 0.6944 0.6111 0.9167 0.9722 0.9444 Table 1: Comparison of two baseline systems with our approach on Weizmann dataset. we can also obtain the class label for the whole video sequence by the majority voting of the labels of its frames (i.e., per-video classification). We show the confusion matrix with |H| = 10 for both per-frame and per-video classification in Fig. 3. We compare our system to two baseline methods. The first baseline (root model) only uses the root filter η⊤· ω(y, x), which is simply a discriminative version of Efros et al. [5]. The second baseline (local hCRF) is a direct application of the original hCRF model [16]. It is similar to our model, but without the root filter η⊤· ω(y, x), i.e., local hCRF only uses the root filter to initialize the salient patches, but does not use it in the final model. The comparative results are shown in Table 1. Our approach significantly outperforms the two baseline methods. We also compare our results(with |H| = 10) with previous work in Table 2. Note [2] classifies space-time cubes. It is not clear how it can be compared with other methods that classify frames or videos. Our result is significantly better than [13], and comparable to [8]. Although we accept the fact that the comparison is not completely fair, since [13] does not use any tracking or background subtraction. We visualize the learned parts in Fig. 4(a). Each patch is represented by a color that corresponds to the most likely part label of that patch. We also visualize the root filters applied on these images in Fig. 4(b). KTH dataset: The KTH human motion dataset contains six types of human actions (walking, jogging, running, boxing, hand waving and hand clapping) performed several times by 25 subjects in four different scenarios: outdoors, outdoors with scale variation, outdoors with different clothes and indoors. We first run an automatic preprocessing step to track and stabilize the video sequences, so that all the figures appear in the center of the field of view. We split the videos roughly equally into training/test sets and randomly sample 10 frames from each video. The confusion matrices (with |H| = 10) for both per-frame and per-video classification are per-frame(%) per-video(%) per-cube(%) Our method 90.3 97.2 N/A Jhuang et al. [8] N/A 98.8 N/A Niebles & Fei-Fei [13] 55 72.8 N/A Blank et al. [2] N/A N/A 99.64 Table 2: Comparison of classification accuracy with previous work on the Weizmann dataset. (a) (b) Figure 4: (a) Visualization of the learned parts. Patches are colored according to their most likely part labels. Each color corresponds to a part label. Some interesting observations can be made. For example, the part label represented by red seems to correspond to the “moving down” patterns mostly observed in the “bending” action. The part label represented by green seems to correspond to the motion patterns distinctive of “hand-waving” actions; (b) Visualization of root filters applied on these images. For each image with class label c, we apply the root filter ηc. The results show the filter responses aggregated over four motion descriptor channels. Bright areas correspond to positive energies, i.e., areas that are discriminative for this class. 0.55 0.04 0.03 0.10 0.17 0.12 0.02 0.74 0.10 0.07 0.04 0.02 0.02 0.10 0.77 0.01 0.05 0.04 0.02 0.01 0.04 0.55 0.20 0.18 0.01 0.00 0.07 0.09 0.67 0.16 0.02 0.01 0.05 0.08 0.10 0.73 boxing handclapping handwaving jogging running walking boxing handclapping handwaving jogging running walking 0.86 0.00 0.03 0.02 0.05 0.05 0.00 0.97 0.00 0.03 0.00 0.00 0.00 0.02 0.98 0.00 0.00 0.00 0.00 0.00 0.00 0.67 0.19 0.14 0.00 0.00 0.02 0.03 0.84 0.11 0.00 0.00 0.04 0.01 0.01 0.93 boxing handclapping handwaving jogging running walking boxing handclapping handwaving jogging running walking Frame-by-frame classification Video classification Figure 5: Confusion matrices of classification results on KTH dataset. Horizontal rows are ground truths, and vertical columns are predictions. shown in Fig. 5. The comparison with the two baseline algorithms is summarized in Table 3. Again, our approach outperforms the two baselines systems. The comparison with other approaches is summarized in Table 4. We should emphasize that we do not attempt a direct comparison, since different methods listed in Table 4 have all sorts of variations in their experiments (e.g., different split of training/test data, whether temporal smoothing is used, whether per-frame classification can be performed, whether tracking/background subtraction is used, whether the whole dataset is used etc.), which make it impossible to directly compare them. We provide the results only to show that our approach is comparable to the state-of-the-art. method root model local hCRF our approach |H| = 6 |H| = 10 |H| = 20 |H| = 6 |H| = 10 |H| = 20 per-frame 0.5377 0.4749 0.4452 0.4282 0.6633 0.6698 0.6444 per-video 0.7339 0.5607 0.5814 0.5504 0.7855 0.8760 0.7512 Table 3: Comparison of two baseline systems with our approach on KTH dataset. methods accuracy(%) Our method 87.60 Jhuang et al. [8] 91.70 Nowozin et al. [15] 87.04 Niebles et al. [14] 81.50 Doll´ar et al. [4] 81.17 Schuldt et al. [17] 71.72 Ke et al. [9] 62.96 Table 4: Comparison of per-video classification accuracy with previous approaches on KTH dataset. 5 Conclusion We have presented a discriminatively learned part model for human action recognition. Unlike previous work [10], our model does not require manual specification of the parts. Instead, the parts are initialized by a learned root filter. Our model combines both large-scale features used in global templates and local patch features used in bag-of-words models. Our experimental results show that our model is quite effective in recognizing actions. The results are comparable to the state-of-theart approaches. In particular, we show that the combination of large-scale features and local patch features performs significantly better than using either of them alone. References [1] A. C. Berg, T. L. Berg, and J. Malik. Shape matching and object recognition using low distortion correspondence. In IEEE CVPR, 2005. [2] M. Blank, L. Gorelick, E. Shechtman, M. Irani, and R. Basri. Actions as space-time shapes. In IEEE ICCV, 2005. [3] N. Dalal and B. Triggs. Histogram of oriented gradients for human detection. In IEEE CVPR, 2005. [4] P. Doll´ar, V. Rabaud, G. Cottrell, and S. Belongie. Behavior recognition via sparse spatio-temporal features. In VS-PETS Workshop, 2005. [5] A. A. Efros, A. C. Berg, G. Mori, and J. Malik. Recognizing action at a distance. In IEEE ICCV, 2003. [6] P. Felzenszwalb, D. McAllester, and D. Ramanan. A discriminatively trained, multiscale, deformable part model. In IEEE CVPR, 2008. [7] P. F. Felzenszwalb and D. P. Huttenlocher. Pictorial structures for object recognition. IJCV, 61(1):55–79, January 2003. [8] H. Jhuang, T. Serre, L. Wolf, and T. Poggio. A biologically inspired system for action recognition. In IEEE ICCV, 2007. [9] Y. Ke, R. Sukthankar, and M. Hebert. Efficient visual event detection using volumetric features. In IEEE ICCV, 2005. [10] Y. Ke, R. Sukthankar, and M. Hebert. Event detection in crowded videos. In IEEE ICCV, 2007. [11] J. Lafferty, A. McCallum, and F. Pereira. Conditional random fields: Probabilistic models for segmenting and labeling sequence data. In ICML, 2001. [12] B. D. Lucas and T. Kanade. An iterative image registration technique with an application to stereo vision. In Proc. DARPA Image Understanding Workshop, 1981. [13] J. C. Niebles and L. Fei-Fei. A hierarchical model of shape and appearance for human action classification. In IEEE CVPR, 2007. [14] J. C. Niebles, H. Wang, and L. Fei-Fei. Unsupervised learning of human action categories using spatialtemporal words. In BMVC, 2006. [15] S. Nowozin, G. Bakir, and K. Tsuda. Discriminative subsequence mining for action classification. In IEEE ICCV, 2007. [16] A. Quattoni, M. Collins, and T. Darrell. Conditional random fields for object recognition. In NIPS 17, 2005. [17] C. Schuldt, L. Laptev, and B. Caputo. Recognizing human actions: a local SVM approach. In IEEE ICPR, 2004. [18] J. Sivic, B. C. Russell, A. A. Efros, A. Zisserman, and W. T. Freeman. Discovering objects and their location in images. In IEEE ICCV, 2005. [19] S. B. Wang, A. Quattoni, L.-P. Morency, D. Demirdjian, and T. Darrell. Hidden conditional random fields for gesture recognition. In IEEE CVPR, 2006.
2008
226
3,483
Adaptive Template Matching with Shift-Invariant Semi-NMF Jonathan Le Roux Graduate School of Information Science and Technology The University of Tokyo leroux@hil.t.u-tokyo.ac.jp Alain de Cheveign´e CNRS, Universit´e Paris 5, and Ecole Normale Sup´erieure Alain.de.Cheveigne@ens.fr Lucas C. Parra∗ Biomedical Engineering City College of New York City University of New York parra@ccny.cuny.edu Abstract How does one extract unknown but stereotypical events that are linearly superimposed within a signal with variable latencies and variable amplitudes? One could think of using template matching or matching pursuit to find the arbitrarily shifted linear components. However, traditional matching approaches require that the templates be known a priori. To overcome this restriction we use instead semi Non-Negative Matrix Factorization (semiNMF) that we extend to allow for time shifts when matching the templates to the signal. The algorithm estimates templates directly from the data along with their non-negative amplitudes. The resulting method can be thought of as an adaptive template matching procedure. We demonstrate the procedure on the task of extracting spikes from single channel extracellular recordings. On these data the algorithm essentially performs spike detection and unsupervised spike clustering. Results on simulated data and extracellular recordings indicate that the method performs well for signalto-noise ratios of 6dB or higher and that spike templates are recovered accurately provided they are sufficiently different. 1 Introduction It is often the case that an observed waveform is the superposition of elementary waveforms, taken from a limited set and added with variable latencies and variable but positive amplitudes. Examples are a music waveform, made up of the superposition of stereotyped instrumental notes, or extracellular recordings of nerve activity, made up of the superposition of spikes from multiple neurons. In these examples, the elementary waveforms include both positive and negative excursions, but they usually contribute with a positive weight. Additionally, the elementary events are often temporally compact and their occurrence temporally sparse. Conventional template matching uses a known template and correlates it with the signal; events are assumed to occur at times where the correlation is high. Multiple template matching raises combinatorial issues that are addressed by Matching Pursuit [1]. However these techniques assume a preexisting dictionary of templates. We ∗Corresponding author wondered whether one can estimate the templates directly from the data, together with their timing and amplitude. Over the last decade a number of blind decomposition methods have been developed that address a similar problem: given data, can one find the amplitudes and profiles of constituent signals that explain the data in some optimal way. This includes independent component analysis (ICA), non-negative matrix factorization (NMF), and a variety of other blind source separation algorithms. The different algorithms all assume a linear superposition of the templates, but vary in their specific assumptions about the statistics of the templates and the mixing process. These assumptions are necessary to obtain useful results because the problem is under-constrained. ICA does not fit our needs because it does not implement the constraint that components (templates) are added with positive weights. NMF constrains weights to be nonnegative but requires templates to also be non-negative. We will use instead the semi-NMF algorithm of Chris Ding [2, 3] that allows factoring a matrix into a product of a non-negative and an arbitrary matrix. To accommodate time shifts we modify it following the ideas of Morten Mørup [4] who presented a shift-invariant version of the NMF algorithm, that also includes sparsity constraints. We begin with the conventional formulation of the NMF modeling task as a matrix factorization problem and then derive in the subsequent section the case of a 1D sequence of data. NMF models a data matrix X as a factorization, ˆX = AB , (1) with A ≥0 and B ≥0 and finds these coefficients such that the square modeling error ||X −ˆX||2 is minimized. Matrix A can be thought of as component amplitudes and the rows of matrix B are the component templates. Semi-NMF drops the non-negative constraint for B, while shift-NMF allows the component templates to be shifted in time. In the NMF algorithm, there is an update equation for A and an update equation for B. Semi-NMF and shift-NMF each modifies one of these equations, fortunately not the same, so their updates can be interleaved without interference. 2 Review of semi-NMF Assume we are given N observations or segments of data with T samples arranged as a matrix Xnt. (The segments can also represent different epochs, trials, or even different channels.) The goal is to model this data as a linear superposition of K component templates Bkt with amplitudes Ank, i.e., ˆXnt = X k AnkBkt = Ak nBkt . (2) The second expression here uses Einstein notation: indices that appear both as superscript and subscript within a product are to be summed. In contrast to matrix notation, all dimensions of an expression are apparent, including those that are absorbed by a sum, and the notation readily extends to more than two dimensions, which we will need when we introduce delays. We use this notation throughout the paper and include explicit sum signs only to avoid possible confusion. Now, to minimize the modeling error E = ||X −ˆX||2 2 = X nt ¡ Xnt −Ak nBkt ¢2 , (3) the semi-NMF algorithm iterates between finding the optimum B for a given A, which is trivially given by the classic least squares solution, Bkt = (An kAk′n)−1 Ak′ n Xn t , (4) and improving the estimate of A for a given B with the multiplicative update Ank ←Ank s (XtnBkt)+ + Ak′ n (Bt k′Bkt)− (XtnBkt)−+ Ak′ n (Bt k′Bkt)+ . (5) In these expressions, k′ is a summation index; (M)−1 stands for matrix inverse of M; and, (M)+ = 1 2(|M| + M) and (M)−= 1 2(|M| −M) are to be applied on each element of matrix M. The multiplicative update (5) ensures that A remains non-negative in each step; while, baring constraints for B, the optimum solution for B for a given A is found in a single step with (4). 3 Shift-invariant semi-NMF 3.1 Formulation of the model for a 1D sequence Consider now the case where the data is given as a 1-dimensional time sequence Xt. In the course of time, various events of unknown identity and variable amplitude appear in this signal. We describe an event of type k with a template Bkl of length L. Time index l represents now a time lag measured from the onset of the template. An event can occur at any point in time, say at time sample n, and it may have a variable amplitude. In addition, we do not know a priori what the event type is and so we assign to each time sample n and each event type k an amplitude Ank ≥0. The goal is to find the templates B and amplitudes A that explain the data. In this formulation of the model, the timing of an event is given by a non-zero sample in the amplitude matrix A. Ideally, each event is identified uniquely and is well localized in time. This means that for a given n the estimated amplitudes are positive for only one k, and neighboring samples in time have zero amplitudes. This new model can be written as ˆXt = X n Ak nBk,t−n (6) = X n X l Ak nδn,t−lBkl . (7) The Kronecker delta δtl was used to induce the desired shifts n. We can dispense with the cumbersome shift in the index if we introduce ˜Atkl = X n Ankδn,t−l . (8) The tensor ˜Atkl represents a block Toeplitz matrix, with K blocks of dimension T ×L. Each block implements a convolution of the k-th template Bkl with amplitudes signal Ank. With this definition the model is written now simply as: ˆXt = ˜Akl t Bkl , (9) with Ank ≥0. We will also require a unit-norm constraint on the K templates in B, namely, Bl kBkl = 1, to disambiguate the arbitrary scale in the product of A and B. 3.2 Optimization criterion with sparseness prior Under the assumption that the data represent a small set of well-localized events, matrix A should consist of a sparse series of pulses, the other samples having zero amplitude. To favor solutions having this property, we use a generalized Gaussian distribution as prior probability for the amplitudes. Assuming Gaussian white noise, the new cost function given by the negative log-posterior reads (up to a scaling factor), E = 1 2||X −ˆX||2 2 + β ||A||α α (10) = 1 2 X t ³ Xt −˜Akl t Bkl ´2 + β X kl Aα kl , (11) where ||·||p denotes the Lp norm (or quasi-norm for 0 < p < 1). The shape parameter α of the generalized Gaussian distribution controls the odds of observing low versus high amplitude values and should be chosen based on the expected rate of events. For our data we mostly choose α = 1/4. The parameter β is a normalization constant which depends on the power of the noise, σ2 N, and the power of the amplitudes, σ2 A, with β = σ2 N σα A ¡ Γ(3/α)/Γ(1/α) ¢α/2. 3.3 A update The update for A which minimizes this cost function is similar to update (5) with some modifications. In (5), amplitudes A can be treated as a matrix of dimensions T × K and each update can be applied separately for every n. Here the problem is no longer separable in n and we need to treat A as a 1 × TK matrix. B is now a TK × T matrix of shifted templates defined as ˜Bnkt = Bk,t−n. The new update equation is similar to (5), but differs in the term BBT : Ank ←Ank v u u u u t ³ ˜XlnBkl ´+ + An′k′ ³ ˜Bt n′k′ ˜Bnkt ´− ³ ˜XlnBkl ´− + An′k′ ³ ˜Bt n′k′ ˜Bnkt ´+ + αβAα−1 nk . (12) The summation in the BBT term is over t, and is 0 most of the time when the events do not overlap. We also defined ˜Xl n = Xn+l, and the time index in the summation ˜Xl nBkl extends only over lags l from 0 to L−1. To limit the memory cost of this operation, we implemented it by computing only the non-zero parts of the TK × TK matrix BBT as 2L −1 blocks of size K × K. The extra term in the denominator of (12) is the gradient of the sparseness term in (11). A convergence proof for (12) can be obtained by modifying the convergence proof of the semi-NMF algorithm in [2] to include the extra Lα norm as penalty term. The proof relies on a new inequality on the Lα norm recently introduced by Kameoka to prove the convergence of his complex-NMF framework [5]. 3.4 B update The templates B that minimize the square modeling error, i.e., the first term of the cost function (11), are given by a least-squares solution which now writes: Bkl = ³ ˜At kl ˜Atk′l′ ´−1 ˜Ak′l′ t Xt . (13) The matrix inverse is now over a matrix of LK by LK elements. Note that the sparseness prior will act to reduce the magnitude of A. Any scaling of A can be compensated by a corresponding inverse scaling of B so that the first term of the cost function remains unaffected. The unit-norm constraint for the templates B therefore prevents A from shrinking arbitrarily. 3.5 Normalization The normalization constraint of the templates B can be implemented using Lagrange multipliers, leading to the constrained least squares solution: Bkl = ³ ˜At kl ˜Atk′l′ + Λkl,k′l′ ´−1 ˜Ak′l′ t Xt . (14) Here, Λkl,k′l′ represents a diagonal matrix of size KL × KL with K different Lagrange multipliers as parameters that need to be adjusted so that Bl kBkl = 1 for all k. This can be done with a Newton-Raphson root search of the K functions fk(Λ) = Bl kBkl −1. The K dimensional search for the Lagrange multipliers in Λ can be interleaved with updates of A and B. For simplicity however, in our first implementation we used the unconstrained least squares solution (Λ = 0) and renormalized B and A every 10 iterations. 4 Performance evaluations We evaluated the algorithm on synthetic and real data. Synthetic data are used to provide a quantitative evaluation of performance as a function of SNR and the similarity of different templates. The algorithm is then applied to extracellular recordings of neuronal spiking activity and we evaluate its ability to recover two distinct spike types that are typically superimposed in this data. 1 250 500 750 1000 −1 0 1 Amplitude Noisy data Time (sample) 1 13 25 Templates B Lag 1 250 500 750 1000 Time (sample) Event amplitudes A 1 250 500 750 1000 −1 0 1 Amplitude Reconstructed waveform Time (sample) 1 15 30 Templates B Lag 1 250 500 750 1000 Time (sample) Event amplitudes A Figure 1: Example of synthetic spike trains and estimated model parameters at an SNR of 2 (6 dB). Top left: synthetic data. Bottom left: synthetic parameters (templates B and weight matrices A). Top right: reconstructed data. Bottom right: estimated parameters. 4.1 Quantitative evaluation on synthetic data The goal of these simulations is to measure performance based on known truth data. We report detection rate, false-alarm rate, and classification error. In addition we report how accurately the templates have been recovered. We generated synthetic spike trains with two types of “spikes” and added Gaussian white noise. Figure 1 shows an example for SNR = σA/σN = 2 (or 6 dB). The two sets of panels show the templates B (original on the left and recovered on the right), amplitudes A (same as above) and noisy data X (left) and estimated ˆX (right). The figure shows the model parameters which resulted in a minimum cost. Clearly, for this SNR the templates have been recovered accurately and their occurrences within the waveform have been found with only a few missing events. Performance as a function of varying SNR is shown in Figure 2. Detection rate is measured as the number of events recovered over the total number of events in the original data. False-alarms occur when noise is interpreted as actual events. Presence or absence of a recovered event is determined by comparing the original pulse train with the reconstructed pulse train A (channel number k is ignored). Templates in this example have a correlation time (3 dB down) of 2-4 samples and so we tolerate a misalignment of events of up to ±2 samples. We simulated 30 events with amplitudes uniformly distributed in [0, 1]. The algorithm tends to miss smaller events with amplitudes comparable to the noise amplitude. To capture this effect, we also report a detection rate that is weighted by event amplitude. Some events may be detected but assigned to the wrong template. We therefore report also classification performance. Finally, we report the goodness of fit as R2 for the templates B and the continuous valued amplitudes A for the events that are present in the original data. Note that the proposed algorithm implements implicitly a clustering and classification process. Obviously, the performance of this type of unsupervised clustering will degrade as the templates become more and more similar. Figure 2 shows the same performance numbers as a function of the similarity of the templates (without additive noise). A similarity of 0 corresponds to the templates shown as examples in Figure 1 (these are almost orthogonal with a cosine of 74◦), and similarity 1 means identical templates. Evidently the algorithm is most reliable when the target templates are dissimilar. 4.2 Analysis of extracellular recordings The original motivation for this algorithm was to analyze extracellular recordings from single electrodes in the guinea pig cochlear nucleus. Spherical and globular bushy cells in the anteroventral cochlear nucleus (AVCN) are assumed to function as reliable relays of spike trains from the auditory nerve, with “primary-like” responses that resemble those of auditory nerve fibers. Every incoming spike evokes a discharge within the outgoing axon [6]. 0 0.5 1 1.5 0 0.5 1 Detection σN/σA 0 0.5 1 1.5 0 0.5 1 Weighted detection σN/σA 0 0.5 1 1.5 0 0.5 1 Misclassification σN/σA 0 0.5 1 1.5 0 0.5 1 False alarm σN/σA 0 0.5 1 1.5 0 0.5 1 R2 B σN/σA 0 0.5 1 1.5 0 0.5 1 R2 A σN/σA 0 0.5 1 0 0.5 1 Detection Similarity 0 0.5 1 0 0.5 1 Weighted detection Similarity 0 0.5 1 0 0.5 1 Misclassification Similarity 0 0.5 1 0 0.5 1 False alarm Similarity 0 0.5 1 0 0.5 1 R2 B Similarity 0 0.5 1 0 0.5 1 R2 A Similarity Figure 2: Left graph: performance as a function of SNR. Error bars represent standard deviation over 100 repetitions with varying random amplitudes and random noise. Top left: detection rate. Top center: weighted detection rate. Top right: misclassification rate (events attributed to the wrong template). Bottom left: false alarm rate (detected events which do not correspond to an event in the original data). Bottom center: R2 of the templates B. Bottom right: R2 of the amplitudes A. Right graph: same as a function of similarity between templates. However, recent observations give a more nuanced picture, suggesting that the post-synaptic spike may sometimes be suppressed according to a process that is not well understood [7]. Extracellular recordings from primary-like cells within AVCN with a single electrode typically show a succession of events made up of three sub-events: a small pre-synaptic spike from the large auditory nerve fiber terminal, a medium-sized post-synaptic spike from the initial segment of the axon where it is triggered (the IS spike), and a large-sized spike produced by back-propagation into the soma and dendrites of the cell (the soma-dendritic or SD spike) (Fig. 3). Their relative amplitudes depend upon the position of the electrode tip relative to the cell. Our aim is to isolate each of these components to understand the process by which the SD spike is sometimes suppressed. The events may overlap in time (in particular the SD spike always overlaps with an IS spike), with varying positive amplitudes. They are temporally compact, on the order of a millisecond, and they occur repeatedly but sparsely throughout the recording, with positive amplitudes. The assumptions of our algorithm are met by these data, as well as by multi-unit recordings reflecting the activity of several neurons (the “spike sorting problem”). In the portions of our data that are sufficiently sparse (spontaneous activity), the components may be separated by an ad-hoc procedure: (a) trigger on the high-amplitude IS-soma complexes and set to zero, (b) trigger on the remaining isolated IS spikes and average to derive an IS spike template (the pre-synaptic spike is treated as part of the IS spike), (c) find the best match (in terms of regression) of the initial portion of the template to the initial portion of each IS-SD complex, (d) subtract the matching waveform to isolate the SD spikes, realign, and average to derive an SD spike template. The resulting templates are shown in Fig. 3 (top right). This ad-hoc procedure is highly dependent on prior assumptions, and we wished to have a more general and “agnostic” method to apply to a wider range of situations. Figure 3 (bottom) shows the result of our automated algorithm. The automatically recovered spike templates seem to capture a number of the key features. Template 1, in blue, resembles the SD spike, and template 2, in red, is similar to the IS spike. The SD spikes are larger and have sharper peaks as compared to the IS spikes, while the IS spikes have an initial peak at 0.7 ms leading the main spike. The larger size of the extracted spikes corresponding to template 1 is correctly reflected in the histogram of the recovered amplitudes. However the estimated spike shapes are inaccurate. The main difference is in the small peak preceding the template 1. This is perhaps to be expected as the SD spike is always preceded in the raw data by a smaller IS spike. The expected templates were very similar (with a cosine of 38◦as estimated from the manually extracted spikes), making the task particularly difficult. 0 0.1 0.2 0.3 0.4 0.5 −1 0 1 2 Time (s) Reconstructed waveform and residual 0 0.625 1.25 1.875 2.5 Manually constructed templates B mV Time (ms) 0 0.625 1.25 1.875 2.5 Estimated templates B mV Time (ms) 0.05 0.1 0.15 0.2 0 10 20 Amplitude Frequency Distribution of the amplitudes A Reconstructed Residual 1 SD 2 IS 1 2 1 2 Figure 3: Experimental results on extracellular recordings. Top left: reconstructed waveform (blue) and residual between the original data and the reconstructed waveform (red). Top right: templates B estimated manually from the data. Bottom left: estimated templates B. Bottom right: distribution of estimated amplitudes A. The SD spikes (blue) generally occur with larger amplitudes than the IS spikes (red). 4.3 Implementation details As with the original NMF and semi-NMF algorithms, the present algorithm is only locally convergent. To obtain good solutions, we restart the algorithm several times with random initializations for A (drawn independently from the uniform distribution in [0, 1]) and select the solution with the maximum posterior likelihood or minimum cost (11). In addition to these multiple restarts, we use a few heuristics that are motivated by the desired result of spike detection. We can thus prevent the algorithm from converging to some obviously suboptimal solutions: Re-centering the templates: We noticed that local minima with poor performance typically occurred when the templates B were not centered within the L lags. In those cases the main peaks could be adjusted to fit the data, but the portion of the template that extends outside the window of L samples could not be adjusted. To prune these suboptimal solutions, it was sufficient to center the templates during the updates while shifting the amplitudes accordingly. Pruning events: We observed that spikes tended to generate non-zero amplitudes in A in clusters of 1 to 3 samples. After convergence we compact these to pulses of 1-sample duration located at the center of these clusters. Spike amplitude was preserved by scaling the pulse amplitudes to match the sum of amplitudes in the cluster. Re-training with a less conservative sparseness constraint: To ensure that templates B are not affected by noise we initially train the algorithm with a strong penalty term (large β effectively assuming strong noise power σ2 N). Only spikes with large amplitudes remain after convergence and the templates are determined by only those strong spikes that have high SNR. After extracting templates accurately, we retrain the model amplitudes A while keeping the templates B fixed assuming now a weaker noise power (smaller β). As a result of these steps, the algorithm converged frequently to good solutions (approximately 50 % of the time on the simulated data). The performance reported here represents the results with minimum error after 6 random restarts. 5 Discussion and outlook Alternative models: The present 1D formulation of the problem is similar to that of Morten Mørup [4] who presented a 2D version of this model that is limited to non-negative templates. We have also derived a version of the model with observations X arranged as a matrix, as well as a version in which event timing is encoded explicitly as time delays τn following [8]. We are omitting these alternative formulations here for the sake of brevity. Alternative priors: In addition to the generalized Gaussian prior, we tested also Gaussian process priors [9] to encourage orthogonality between the k sequences and refractoriness in time. However, we found that the quadratic expression of a Gaussian process competed with the Lα sparseness term. In the future, we intend to combine both criteria by allowing for correlations in the generalized Gaussian. The corresponding distributions are known as elliptically symmetric densities [10] and the corresponding process is called a spherically invariant random processes, e.g., [11]. Sparseness and dimensionality reduction: As with many linear decomposition methods, a key feature of the algorithm is to represent the data within a small linear subspace. This is particularly true for the semi-NMF algorithm since, provided a sufficiently large K and without enforcing a sparsity constraint, the positivity constraint on A actually amounts to no constraint at all (identical templates with opposite sign can accomplish the same as allowing negative A). For instance, without sparseness constraint on the amplitudes, a trivial solution in our examples above would be a template B1l with a single positive spike somewhere and another template B2l with a single negative spike, and all the time course encoded in An1 and An2. MISO identification: The identifiability problem is compounded by the fact that the estimation of templates B in this present formulation represents a multiple-input singleoutput (MISO) system identification problem. In the general case, MISO identification is known to be under-determined [12]. In the present case, the ambiguities of MISO identification may be limited due to the fact that we allow only for limited system length L as compared to the number of samples N. Essentially, as the number of examples increases with increasing length of the signal X, the ambiguity in B is reduced. These issues will be adressed in future work. References [1] S. Mallat and Z. Zhang, “Matching pursuit with time-frequency dictionnaries,” IEEE Trans. Signal Process., vol. 41, pp. 3397–3415, 1993. [2] C. Ding, T. Li, and M. I. Jordan, “Convex and semi-nonnegative matrix factorization for clustering and low-dimension representation,” Lawrence Berkeley National Laboratory, Tech. Rep. LBNL-60428, 2006. [3] T. Li and C. Ding, “The relationships among various nonnegative matrix factorization methods for clustering,” in Proc. ICDM, 2006, pp. 362–371. [4] M. Mørup, M. N. Schmidt, and L. K. Hansen, “Shift invariant sparse coding of image and music data,” Technical University of Denmark, Tech. Rep. IMM2008-04659, 2008. [5] H. Kameoka, N. Ono, K. Kashino, and S. Sagayama, “Complex NMF: A new sparse representation for acoustic signals,” in Proc. ICASSP, Apr. 2009. [6] P. X. Joris, L. H. Carney, P. H. Smith, and T. C. T. Yin, “Enhancement of neural synchronization in the anteroventral cochlear nucleus. I. Responses to tones at the characteristic frequency,” J. Neurophysiol., vol. 71, pp. 1022–1036, 1994. [7] S. Arkadiusz, M. Sayles, and I. M. Winter, “Spike waveforms in the anteroventral cochlear nucleus revisited,” in ARO midwinter meeting, no. Abstract #678, 2008. [8] M. Mørup, K. H. Madsen, and L. K. Hansen, “Shifted non-negative matrix factorization,” in Proc. MLSP, 2007, pp. 139–144. [9] C. E. Rasmussen and C. K. I. Williams, Gaussian Processes for Machine Learning, ser. Adaptive Computation and Machine Learning. Cambridge, MA: The MIT Press, Jan. 2006. [10] K. Fang, S. Kotz, and K. Ng, Symmetric Multivariate and Related Distributions. London: Chapman and Hall, 1990. [11] M. Rangaswamy, D. Weiner, and A. Oeztuerk, “Non-Gaussian random vector identification using spherically invariant random processes,” IEEE Trans. Aerospace and Electronic Systems, vol. 29, no. 1, pp. 111–123, Jan. 1993. [12] J. Benesty, J. Chen, and Y. Huang, Microphone Array Signal Processing. Berlin, Germany: Springer-Verlag, 2008.
2008
227
3,484
Extracting State Transition Dynamics from Multiple Spike Trains with Correlated Poisson HMM Kentaro Katahira1,2, Jun Nishikawa2, Kazuo Okanoya2 and Masato Okada1,2 1Graduate School of Frontier Sciences The University of Tokyo Kashiwa, Chiba 277-8561, Japan 2RIKEN Brain Science Institute Wako, Saitama 351-0198, Japan katahira@mns.k.u-tokyo.ac.jp Abstract Neural activity is non-stationary and varies across time. Hidden Markov Models (HMMs) have been used to track the state transition among quasi-stationary discrete neural states. Within this context, independent Poisson models have been used for the output distribution of HMMs; hence, the model is incapable of tracking the change in correlation without modulating the firing rate. To achieve this, we applied a multivariate Poisson distribution with correlation terms for the output distribution of HMMs. We formulated a Variational Bayes (VB) inference for the model. The VB could automatically determine the appropriate number of hidden states and correlation types while avoiding the overlearning problem. We developed an efficient algorithm for computing posteriors using the recursive relationship of a multivariate Poisson distribution. We demonstrated the performance of our method on synthetic data and a real spike train recorded from a songbird. 1 Introduction Neural activities are highly non-stationary and vary from time to time according to stimuli and internal state changes. Hidden Markov Models (HMMs) have been used for segmenting spike trains into quasi-stationary states, in which the spike train is regarded as stationary, hence the statistics (e.g., cross-correlation and inter-spike interval) can be calculated [1, 2, 3]. We can also calculate these statistics by using time-binned count data (e.g., the Peri-Stimulus Time Histogram or PSTH). However, we need a large trial set to obtain good estimates for all bins, which can be problematic in neurophysiological experiments. HMMs enlarge the effective amount of data for estimating the statistics. Moreover, the PSTH approach cannot be applied to cases where we cannot align spike data to stimuli or the behaviors of animals. HMMs are suitable for such situations. Previous studies using HMMs have assumed that all neural activities were independent of one another given the hidden states; hence, the models could not discriminate states whose firing rates were almost the same but whose correlations among neurons were different. However, there has been reports that shows the correlation between neurons changes within a fraction of a second without modulating the firing rate (e.g., [4]). We developed a method that enabled us to segment spike trains based on differences in neuronal correlation as well as the firing rate. Treating neuronal correlations (including higher-order, and not only pairwise correlations) among multiple spike trains has been one of the central challenges in computational neuroscience. There have been approaches to calculating correlations by binarizing spike trains with small bin sizes [5, 6]. These approaches are limited to treating correlations of short bin length that includes at most one spike. Here, we introduce a multivariate Poisson distribution with a higher-order correlation structure (simply abbreviated as a correlated Poisson distribution) as the output distribution for HMMs. The correlated Poisson distribution can incorporate correlation at arbitrary time intervals. 1 To construct optimal model from limited neurophysiological data, it is crucial to select a model that has appropriate complexity, and avoid over-fitting. In our model, model complexity corresponds to the number of hidden states and types of correlations (we have a choice as to whether to include pairwise correlation, third-order correlation, or higher order correlation). The maximum likelihood approach adopted in previous studies [1, 7, 8] cannot be used for this purpose since the likelihood criterion simply increases as the number of model parameters increases. A number of model-selection criteria used with the maximum likelihood approach, i.e., Akaike’s information criteria (AIC), minimum description length (MDL), and Bayesian information criteria (BIC) are based on the asymptotic assumption that only holds when a large number of data is obtained. Furthermore, asymptotic normality, which is assumed in these criteria, does not hold in non-identifiable models including HMMs [9]. In this study, we applied the variational Bayes (VB) method [10, 11] to HMMs whose output distribution is a correlated Poisson distribution. VB is one of the approximations of the Bayes method and can avoid over-fitting even when the sample size is small. An optimal model structure can be determined based on tractable variational free energy, which is the upper bound of the negative marginal log-likelihood. Since the variational free energy does not need the asymptotic assumption, VB works well even when the sample size is small in practice [12]. The computation of posteriors for a correlated Poisson distribution imposes serious computational burdens. We developed an efficient algorithm to calculate these by using the recurrence relationship of a multivariate Poisson distribution [13]. To the best of our knowledge, this is the first report that has introduced VB method for a correlated Poisson distribution. Although Markov chain Monte Carlo (MCMC) methods has been applied to inferring posteriors for a correlated Poisson distribution [14], MCMC schemes are computationally demanding. We demonstrate the performance of the method on multiple spike data both on a synthesized spike train and real spike data recorded from the forebrain nucleus for the vocal control (HVC) of an anesthetized songbird. 2 Method 2.1 HMM with multivariate Poisson distribution Suppose that we obtain spike trains of C neurons by using simultaneous recordings. As preprocessing, we first discretize the spike trains with a non-overlapping window whose length is ∆to obtain spike-count data. The number of spikes of neurons c in the tth window of the nth trial is denoted by xn,t c . The spike-count data are summarized as Xn,t = {xn,t c }C c=1 and X = {Xn,t}N,T n=1,t=1. Let us assume spike-count data-set X is produced by a K-valued discrete hidden state, Y = {yn,t}N,T n=1,t=1, and the sequences of hidden states are generated by a first-order Markov process whose state transition matrix is a = {aij}K,K i=1,j=1: aij = p(yn,t = j|yn,t−1 = i), ∀n,t and the initial state probability is π = {πi} : πi = p(yn,1 = i), ∀n, where ∑K i=1 πi = 1, ∑K j=1 aij = 1, aij ≥0, ∀i,j. Hidden states yt are represented by a binary variable yn,t k such that if the hidden state at the tth window of the nth trial is k, then yn,t k = 1; otherwise 0. At state k, the spike count is assumed to be generated according to p(xn,t c |λk), whose specific form is given in the following. Next, we introduce the correlated Poisson distribution. For brevity, we have omitted the superscript, n, t, for the moment. As an example, let us first consider cases of the trivariate Poisson model (C = 3) with second- and third-order correlations. We will introduce an auxiliary hidden variable, sl, l ∈Φ ≡{1, 2, 3, 12, 13, 23, 123} which satisfies x1 =s1 + s12 + s13 + s123, x2 =s2 + s12 + s23 + s123, x3 =s3 + s13 + s23 + s123. Each sl obeys P(sl|λl), where P(x|λ) denotes a univariate Poisson distribution: P(x|λ) = λx x! e−λ. Due to the reproducing properties of the Poisson distribution, each xi also marginally follows a Poisson distribution with parameter λi + λij + λik + λijk, i, j, k ∈{1, 2, 3}, i ̸= j ̸= k. The mean vector of this distribution is (λ1 +λ12 +λ13 +λ123, λ2 +λ12 +λ23 +λ123, λ3 +λ13 +λ23 +λ123)T 2 (T denotes the transposition) and its variance-covariance matrix is given by (λ1 + λ12 + λ13 + λ123 λ12 + λ123 λ13 + λ123 λ12 + λ123 λ2 + λ12 + λ23 + λ123 λ23 + λ123 λ13 + λ123 λ23 + λ123 λ3 + λ13 + λ23 + λ123 ) . The general definition of the multivariate Poisson distribution is given using the vector, S = (s1, s2, ..., sL)T , and C × L matrix B = [B1, B2, ..., BJ], C ≤L with 0 and 1 elements, where Bj, j = 1, ..., J is a sub-matrix of dimensions C ×C Cj, where CCj is the number of combinations of choosing j from C elements. Vector x = (x1, x2, ..., xC)T defined as x = BS follows a multivariate Poisson distribution. In the above trivariate example, S = (s1, s2, s3, s12, s13, s23, s123)T and B = [B1, B2, B3], where B1 = 0 @ 1 0 0 0 1 0 0 0 1 1 A , B2 = 0 @ 1 1 0 1 0 1 0 1 1 1 A , B3 = 0 @ 1 1 1 1 A . (1) We can also consider only the second-order correlation model by setting B = [B1, B2] and S = (s1, s2, s3, s12, s13, s23)T , or only the third-order correlation model by setting B = [B1, B3] and S = (s1, s2, s3, s123)T . The probability mass function of x is given by p(x|λk) = ∑ S∈G(x) ∏ l∈Φ P(sl|λk,l), (2) where G(x) denotes the set of S such that x = BS. The calculation of this probability can be computationally expensive, since summations over possible S might be exhaustive, especially when there is a large number of spikes per window. However, the computational burden can be alleviated by using recurrence relations for a multivariate Poisson distribution [13]. For further details on computation, see the Appendix. We call the HMM with this output distribution the Correlated Poisson HMM (CP-HMM). When we assume that the spike counts for all neurons are independent, (i.e., B = B1, S = (s1, s2, s3)T ), the output distribution is reduced to p(x|λk) = C ∏ c=1 P(xc|λk,c). (3) We call the HMM with this distribution the independent Poisson HMM (IP-HMM). IP-HMM is a special case of CP-HMM. The complete log-likelihood for CP-HMM is log p(X, Y, S|θ) = N ∑ n=1 [ K ∑ k=1 yn,1 k log πk + T ∑ t=2 K ∑ k=1 K ∑ k′=1 yn,t−1 k yn,t k′ log akk′ + T ∑ t=1 K ∑ k=1 yn,t k log { 1Sn,t[G(Xn,t)] ∏ l∈Φ P(sn,t l |λk,l) }] , (4) where θ = (π, a, λ) and 1A[x] is an indicator function, which equals 1 if A ∈x and 0 otherwise. 2.2 Variational Bayes Here, we derive VB for CP-HMMs. We use conjugate prior distributions for all parameters of CPHMMs, which enabled the posterior distribution to have the same form as the prior distribution. The prior distribution for initial probability distribution π and state transition matrix a is the Dirichlet distribution: φ(π) = D({πk}K k=1|{u(π) k }K k=1), φ(a) = K ∏ i=1 D({aik}K k=1|{u(A) k }K k=1). (5) where D(·) is defined as D({ak}K k=1|{uk}K k=1) = Γ(PK k=1 uk) QK k=1 Γ(uk) ∏k k=1 auk−1 k . The conjugate prior for the parameter of the Poisson mean, λ = {λk,l}K k=1,l=1, of each auxiliary hidden variable, {sl}l∈Φ, is φ(λ) = K ∏ k=1 ∏ l∈Φ G(λk,l|κ0, ξ0), (6) 3 where G(·) denotes the Gamma distribution defined as G(λ|κ, ξ) = ξκ Γ(κ)λκ−1e−λξ. In the experiments we discuss in the following, we set the hyperparameters as u(π) j = u(A) j = 0.1, ∀j, and κ0 = 0.1, ξ0 = 0.1. The Bayesian method calculates p(θ, Z|X, M), which is a posterior of unknown parameters and hidden variable set Z = (Y, S) given the data and model structure, M (in our case, this indicates the number of hidden states, and correlation structure). However, the calculation of the posterior involves a difficult integral. The VB approach approximates the true posterior, p(θ, Z|X, M), by factored test distribution r(θ)Q(Z). To make the test distribution closer to the true posterior, we need to minimize Kullback-Leibler (KL) divergence from r(θ)Q(Z) to p(θ, Z|X, M): KL(r(θ)Q(Z)||p(θ, Z|X, M)) ≡ ⟨ log r(θ)Q(Z) p(Z, θ|X, M) ⟩ r(θ)Q(Z) = log p(X|M) −⟨log p(X, Z, θ|M)⟩r(θ)Q(Z) −Hr(θ) −HQ(Z), (7) where ⟨·⟩p(x) denotes the expectation over p(x) and Hp(x) = ⟨−log p(x)⟩p(x) is the entropy of the distribution, p(x). Since the log marginal likelihood log p(X|M) is independent of r(θ) and Q(Z), minimizing KL divergence is equivalent to minimizing variational free energy F ≡−⟨log p(X, Z, θ|M)⟩r(θ)Q(Z) −Hr(θ) −HQ(Z). (8) VB alternatively minimizes F with respect to Q(Z) and r(θ). This minimization with respect to Q(Z) is called the VB-E step, and the VB-M step for r(θ). VB-E step By using the Lagrange multiplier method, the VB-E step is derived as Q(Z) = 1 CQ exp⟨log p(X, Z|θ)⟩r(θ), where CQ is a normalization constant. More specifically, the following quantities are calculated: ⟨yn,t k ⟩Q(Z) = ˜p(yn,t k = 1|Xn,1:t)˜p(Xn,t+1:T |yn,t k = 1) ∑K i=1 ˜p(yn,t i = 1|Xn,1:t)˜p(Xn,t+1:T |yn,t i = 1) ⟨yn,t−1 k yn,t k′ ⟩Q(Z) = ˜p(yn,t−1 k = 1|Xn,1:t−1)˜akk′ ˜p(Xn,t|λ′ k)˜p(Xn,t+1:T |yn,t k′ = 1) ∑K i=1 ∑K j=1 ˜p(yn,t−1 i = 1|Xn,1:t−1)˜aij ˜p(Xn,t|λj)˜p(Xn,t+1:T |yn,t j = 1) These quantities are obtained by the forward-backward algorithm [11]. The subnormarized quantity ˜aij is defined as ˜aij = exp(⟨log aij⟩r(a)) and ˜p(Xn,t|λk) is ˜p(Xn,t|λk) = ∑ Sn,t k ∈G(Xn,t) ∏ l∈Φ ˜P(sn,t k,l |λk,l), (9) where ˜P(sl|λk,l) is a sub-normalized distribution: ˜P(sl|λk,l) = exp { sl log ˜λk,l −log(sl!) −¯λk,l } , (10) where ˜λk,l = exp { ⟨log λk,l⟩r(λk) } , ¯λk,l = ⟨λk,l⟩r(λk). These quantities can be calculated by using the recurrence relations of the multivariate Poisson distribution (See the Appendix). The calculation of the posterior for S is given as: ⟨sn,t k,l ⟩Q(Z) = ⟨yn,t k ⟩Q(Z) ∑ Sn,t k ∈G(Xn,t) sn,t k,l ∏ l∈Φ ˜P(sn,t k,l |λk,l) ∑ Sn,t k ∈G(Xn,t) ∏ l∈Φ ˜P(sn,t k,l |λk,l) . (11) This is also calculated by using the recurrence relations of the multivariate Poisson distribution. VB-M step By again using the Lagrange multiplier method, the VB-M step is derived as r(θ) = 1 Cr φ(θ) exp⟨log p(X, Z|θ)⟩Q(Z), 4 0 1 0 5 0 5 0 5 0 5 0 5 0 5 0 20 40 60 80 100 0 5 0 1 2 0 0.5 1 1.5 0 0.5 1 1 2 3 4 5 4000 4100 4200 4300 4400 4500 4600 Variational free energy Number of hidden states A (a) B (b) (c) (d) C Independent 2nd-order 3rd-order (true model) Full-order t (window index) State 3 State 1 State 2 State 3 State 3 State 2 State 1 Figure 1: Typical examples of estimation results for correlated Poisson-HMM with third-order correlation applied to simulated spike train. A: From top, 1) spike train of three neurons, 2) the probability of state k staying at window t denoted by ⟨yt k⟩Q(Z), 3) spike count data xt i, and 4) posterior mean for hidden variables st k,l. B: Posterior mean for Poisson mean λk,l for all states. C: Variational free energy calculated for all models. where Cr is a normalization constant. More specifically, r(θ) = r(π)r(a)r(λ), and r(π) = D({πk}K k=1|{wπ k }K k=1), r(a) = K Y i=1 D({aik}K k=1|{wa ik}K k=1), r(λ) = K Y k=1 Y l∈Φ G(λk,l|wκ k,l, wξ k), where wκ k,l = κ0 + N X n=1 T X t=1 ⟨sn,t k,l ⟩Q(Z), wξ k = ξ0 + N X n=1 T X t=1 ⟨yn,t k ⟩Q(Z), wπ j = u(π) j + N X n=1 ⟨yn,1 j ⟩Q(Z), wa ij = u(a) j + N X n=1 T X t=2 ⟨yn,t−1 i yn,t j ⟩Q(Z). The VB computes the VB-E and VB-M steps alternatively until the variational free energy converges to a local minimum. In the experiment we discuss in the following, we started the algorithm from 10 different initializations to avoid a poor local minimum solution. 3 Demonstration on synthetic spike train By using the synthetic spike train of three neurons, let us first demonstrate how to apply our method to a spike train. In the case of three neurons, we have four choices for the correlation types that have (1) no correlation term, (2) only a second-order correlation term, (3) only a third-order correlation term, and (4) both of these. After this, we will call them IP-HMM, 2CP-HMM, 3CP-HMM, and fullCP-HMM. We generated spike trains by using a multivariate Poisson distribution with only a thirdorder correlation whose Poisson mean depends on periods as: (a) λ1 = λ2 = λ3 = 0.5, λ123 = 0.0 for t ∈[1, 10], (b) λ1 = λ2 = λ3 = 1.5, λ123 = 0.0 for t ∈[11, 50], (c) λ1 = λ2 = λ3 = 0.5, λ123 = 1.0 for t ∈[51, 90], and (d) λ1 = λ2 = λ3 = 0.5, and λ123 = 0.0 for t ∈[91, 100]. The periods (b) and (c) have the same mean firing rate (the mean spike count in one window is λi + λ123 = 1.5, i ∈{1, 2, 3}), but they only differ in the third-order correlation. Therefore, classical Poisson-HMMs that employ an independent Poisson assumption [1, 2, 7] are not able to segment them into distinct states. Figure 1A shows that our method was able to do so. We generated 5 Table 1: Results of model selection for spike trains from HVC Stimulus K Correlation Structure BOS 4 Independent REV 4 3rd-order Silent 3 Independent Table 2: Results of model selection with time stationary assumption (K = 1) Stimulus Correlation Structure BOS 2nd order REV 2nd order Silent Full order 0 1 2 3 4 5 0 20 40 State 1 0 10 20 State 2 0 5 10 State 3 0 1 2 State 4 A: BOS B: REV 0 20 40 State 1 0 10 20 State 2 0 10 20 State 3 0 1 2 State 4 C: Silent 0 1 2 3 4 5 0 1 2 3 4 5 0 20 40 State 1 0 10 20 State 2 0 0.1 0.2 State 3 Time (sec.) Figure 2: Typical examples of estimates of VB for spike train from HVC with (A) bird’s own song, (B) its reversed song, and (C) no stimuli presented. Selected model based on variational free energy was used for each condition (see Table 1). Each row corresponds to different trials. Background color indicates most probable state at each time window. Right panels indicate posterior mean ¯λk,l for all states. spike trains for 10 trials, but only one trial is shown. The periods (b) and (c) are segmented into states 1 and 2, whose Poisson means are different (Fig. 1B). The bottom four lines in Fig. 1A plot the posterior mean for {st k,l}l∈Φ (Here, we omitted the index of trial n). These plots separately visualize the contribution of the independent factor and correlation factor on spike counts xt c, c ∈{1, 2, 3}. The spike counts in period (b) can be viewed as independent firing. Even if the spikes are in the same window, this can be regarded as just a coincidence predicted by the assumption of independent firing. In contrast, the spike counts in period (c) can be regarded as having been contributed by common factor st 2,123, as well as independent factors st 2,i, i ∈{1, 2, 3}. Here, we used a 3CP-HMM having three hidden states. Because periods (a) and (d) have identical statistics, it is clear that the model with three states (K = 3) is sufficient for modeling this spike train. Then, can we select this model from the data? Figure 1C shows the variational free energy, F. The 3CP-HMM with three hidden states yields the lowest F, implying that it is optimal. The 3CP-HMMs with fewer hidden states, IP-HMMs, or 2CP-HMMs cannot represent the statistical structure of the data, and hence yield higher F. The 3CP-HMMs with more hidden states (K > 3) or full-CP-HMMs (K ≥3) can include an optimal model, but by being penalized by a Bayesian Occam’s razor, yield higher F. Thus, we can select the optimal model based on F, at least in this example. 4 Application to spike trains from HVC in songbird We applied our method to data collected from the nucleus HVC of songbird. HVC is an important nucleus that integrates auditory information and motor information of song sequences [15]. We obtained spike trains of three single units by using a silicon probe from one anesthetized Bengalese finch. The bird’s own song (BOS) and reversed song (REV) were presented 50 times for each 6 Table 3: Log-likelihood on test data (REV). Method Log-likelihood (mean ± s.d.) Independent & stationary assumption (K = 1) -255.691 (± 2.074) Stationary assumption (K = 1, correlation type is selected) -247.640 (± 1.659) Independent assumption (IP-HMM) (K is selected) -230.353 (± 0.958) CP-HMM (all selected) -229.143 (± 1.242) full-CP-HMM (K is selected) -230.272 (± 1.244) stimulus during recording. Spontaneous activities (Silent) were recorded so that we could obtain the same amount of data as the stimulus-presented data. More details on the recordings are described elsewhere [16]. We modeled spike trains for all stimuli using IP-HMMs and CP-HMMs by varying the number of states K and various correlation structure. We then selected the model that yielded the lowest free energy. We used window length ∆= 100 (ms). The selected models are summarized in Table 1. Figure 2 shows a typical example of spike trains and the segmentation results for the selected models. The CP-HMMs were only selected for spike trains when REV was presented. If we assume that the spike statistics did not change over the trials (in our case, this corresponds to the model with only one hidden state, K = 1), CP-HMMs were selected under all experimental conditions. These results reflect the fact that neurons in anesthetized animals simultaneously transit between high-firing and low-firing states [17], which can be captured by a Poisson distribution with correlation terms. Timestationary assumptions have often been employed to obtain a sufficient sample size for estimating correlation (e.g., [6]). Our results suggest that we should be careful when interpreting such results; even when the spike trains seem to have a correlation, if we take state transition into account, spike trains may be better captured by using an independent Poisson model. We measured predictive performance on test data to verify how well our model capture the statistical properties of the spike train. Here, we used spike trains for REV where 3CP-HMM was selected. We first divided spike trains into 20 training and 20 test trials. In the training phase, we constructed models using the model selection based on the variational free energy with four restrictions: (1) an independent & stationary assumption (K = 1), (2) a stationary assumption (K = 1, correlation type was selected), (3) IP-HMM (K was selected), (4) CP-HMM (no restrictions), and (5) the full-CP-HMM (K was selected). In the prediction phase, we calculated the log-likelihood on test data under the posterior mean ⟨θ⟩r(θ) of selected models. The results are summarized in Table 3. We took averaged over different choices of training set and prediction sets. We can see that the log-likelihood on the test data improved by taking both the state transition and correlation structure into consideration. These results imply that CP-HMMs can characterize the spike train better than classical Poisson-HMMs. The full-CP-HMM include 2nd-order CP-HMM, but shows lower predictive performance than the model in which correlation type were selected. This is likely due to over-fitting to the training data. The VB approach selected the model with tappropriate complexity avoiding over-fitting. 5 Discussion We constructed HMMs whose output is a correlated multivariate Poisson distribution for extracting state-transition dynamics from multiple spike trains. We applied the VB method for inferring the posterior over the parameter and hidden variables of the models. We have seen that VB can be used to select an appropriate model (the number of hidden states and correlation structure), which gives a better prediction. Our method incorporated the correlated Poisson distribution for treating pairwise and higher-order correlations. There have been approaches that have calculated correlations by binarizing spike data with log-linear [5] or maximum-entropy models [6]. These approaches are limited to treating correlations in short bin lengths, which include at most one spike. In contrast, our approach can incorporate correlations in an arbitrary time window from exact synchronization to firing-rate correlations on a modest time scale. The major disadvantages of our model are that it is incapable of negative correlations. It can be incorporated by employing a mixture of multivariatePoisson distributions for the output distribution of HMMs. VB can easily be extended to such models. 7 Appendix: Calculation of correlated Poisson distribution in VB-E step The sub-normalized distribution (Eq.9) can be calculated by using the recurrence relation of multivariate Poisson distribution [13]. Let us consider the tri-variate (C = 3) with the second-order correlation case, where B = [B1, B2]. Here, the recursive scheme for the calculating Eq.9 is: • If all elements of X = (X1, X2, X3) are non-zero, then x1 ˜P(X1 = x1, X2 = x2, X3 = x3|λ) =˜λ1 ˜P(X1 = x1 −1, X2 = x2, X3 = x3|λ) + ˜λ12 ˜P(X1 = x1 −1, X2 = x2 −1, X3 = x3|λ) + ˜λ13 ˜P(X1 = x1 −1, X2 = x2, X3 = x3 −1|λ). • If at most one element of X is non-zero, then ˜P(X1 = x1, X2 = x2, X3 = x3|λ) = exp   − ∑ i<j ˜λij    3 ∏ i=1 ˜P(Xi = xi|λi), i, j ∈1, 2, 3. • If only one of the xi’s (say, xk) is zero, then ˜P(X1 = x1, X2 = x2, X3 = x3|λ) = exp{−˜λik −˜λjk} ˜P(Xi = xi, Xj = xj|λi, λj, λij). This recursive scheme can be generalized to more than three dimensions. We use the alternative definition of the multivariate Poisson random vector, x such that x = ∑k l=1 ϕlsl, where the vectors, ϕl, denote a lth column of matrix B. Let us define vector λ∗= (˜λ1 ˜P(X = x−ϕ1|λ), ..., ˜λk ˜P(X = x −ϕk|λ))T . Then, the recurrence relations are rewritten as x ˜P(X = x|λ) = Bλ∗. (12) By using the quantities obtained in this calculation, ⟨sn,t k,l ⟩Q(Z) is calculated as ⟨sn,t k,l ⟩Q(S) = ⟨yn,t k ⟩Q(Z) ˜λk,l ˜P(Xn,t −ϕl|λk) ˜P(Xn,t|λk) . (13) References [1] M. Abeles, H. Bergman, I. Gat, I. Meilijson, E. Seidemann, N. Thishby, and E. Vaadia, Proc Nat Acad Sci USA, 92:8616-8620, 1995. [2] I. Gat, N. Tishby, and M. Abeles, Network: Computation in Neural Systems, 8:297-22, 1997. [3] L. M. Jones, A. Fontanini, B. F. Sadacca, P. Miller, and D. B. Katz, Proc Nat Acad Sci USA 104:18772-18777, 2007. [4] E. Vaadia, I. Haalman, M. Abeles. H. Bergman, Y. Prut, H. Slovin, and A. Aertsen, Nature, 373:515-518, 1995. [5] H. Nakahara, and S. Amari, Neural Computation 14:2269-2316, 2002. [6] E. Schneidman, M. J. Berry, R. Segev and W. Bialek, Nature 440:1007-1012, 2006. [7] G. Radons, J.D. Becker, B. D¨ulfer, and J Kr¨uger, Biological Cybernetics, 71:359-73, 1994. [8] M. Danoczy and R. Hahnloser, Advances in NIPS, 18, 2005. [9] K. Yamazaki and S. Watanabe, Neurocomputing 69:62-84, 2005. [10] H. Attias, in Proc. of 15th Conference on Uncertainty in Artificial Intelligence, 21-30, 1999. [11] M. J. Beal, Variational Algorithms for Approximate Bayesian Inference, Ph.D thesis, University College London, 2003. [12] S. Watanabe, Y. Minami, A. Nakamura, and N. Ueda, Advances in NIPS, 15, 2002. [13] K. Kano and K. Kawamura, Communications in Statistics, 20:165-178, 1991. [14] L. Meligkotsidou, Statistics and Computing, 17:93-107, 2007 [15] A.C. Yu and D. Margoliash, Science, 273:1871-1875, 1996. [16] J. Nishikawa and K. Okanoya, in preparation. [17] G. Uchida, M. Fukuda, and M. Tanifuji, Physical Review E, 73:031910, 2006 8
2008
228
3,485
Partially Observed Maximum Entropy Discrimination Markov Networks Jun Zhu† Eric P. Xing‡ Bo Zhang† †State Key Lab of Intelligent Tech & Sys, Tsinghua National TNList Lab, Dept. Comp Sci & Tech, †Tsinghua University, Beijing China. jun-zhu@mails.thu.edu.cn; dcszb@thu.edu.cn ‡School of Comp. Sci., Carnegie Mellon University, Pittsburgh, PA 15213, epxing@cs.cmu.edu Abstract Learning graphical models with hidden variables can offer semantic insights to complex data and lead to salient structured predictors without relying on expensive, sometime unattainable fully annotated training data. While likelihood-based methods have been extensively explored, to our knowledge, learning structured prediction models with latent variables based on the max-margin principle remains largely an open problem. In this paper, we present a partially observed Maximum Entropy Discrimination Markov Network (PoMEN) model that attempts to combine the advantages of Bayesian and margin based paradigms for learning Markov networks from partially labeled data. PoMEN leads to an averaging prediction rule that resembles a Bayes predictor that is more robust to overfitting, but is also built on the desirable discriminative laws resemble those of the M3N. We develop an EM-style algorithm utilizing existing convex optimization algorithms for M3N as a subroutine. We demonstrate competent performance of PoMEN over existing methods on a real-world web data extraction task. 1 Introduction Inferring structured predictions based on high-dimensional, often multi-modal and hybrid covariates remains a central problem in data mining (e.g., web-info extraction), machine intelligence (e.g., machine translation), and scientific discovery (e.g., genome annotation). Several recent approaches to this problem are based on learning discriminative graphical models defined on composite features that explicitly exploit the structured dependencies among input elements and structured interpretational outputs. Different learning paradigms have been explored, including the maximum conditional likelihood [7] and max-margin learning [2, 12, 13], with remarkable success. However, the problem of structured input/output learning can be intriguing and significantly more difficult when there exist hidden substructures in the data, which is not uncommon in realistic problems. As is well-known in the probabilistic graphical model literature, hidden variables can facilitate natural incorporation of structured domain knowledge such as latent semantic concepts or unobserved dependence hierarchies into the model, which can often result in more intuitive representation and more compact parameterization of the model; but learning a partially observed model is often non-trivial because it involves optimizing against a more complex cost function, which is usually not convex and requires additional efforts to impute or marginalize out hidden variables. Most existing work along this line, such as the hidden CRF for object recognition [9] and scene segmentation [14] and the dynamic hierarchical MRF for web data extraction [18], falls in the likelihood-based learning. For the max-margin learning, which is arguably a more desirable discriminative learning paradigm in many application scenarios, learning a Makov network with hidden variables can be extremely difficult and little work has been done except [11], where, in order to obtain a convex program, the uncertainty in mixture modeling is simplified by a reduction using the MAP component. 1 A major reason for the difficulty of considering latent structures in max-margin models is the lack of a natural probabilistic interpretation of such models, which on the other hand offers the key insight in likelihood-based learning to design algorithms such as EM for learning partially observed models. Recent work on semi-supervised or unsupervised max-margin learning [1, 4, 16] was all short of an explicit probabilistic interpretation of their algorithms of handling latent variables. The recently proposed Maximum Entropy Discrimination Markov Networks (MaxEnDNet) [20, 19] represent a key advance in this direction. MaxEnDNet offers a general framework to combine Bayesian-style learning and max-margin learning in structured prediction. Given a prior distribution of a structuredprediction model, and leveraging a new prediction-rule that is based on a weighted average over an ensemble of prediction models, MaxEnDNet adopts a structured minimum relative entropy principle to learn a posterior distribution of the prediction model in a subspace defined by a set of expected margin constraints. This elegant combination of probabilistic and maximum margin concepts provides a natural path to incorporate hidden structured variables in learning max-margin Markov networks (M3N), which is the focus of this paper. It has been shown in [20] that, in the fully observed case, MaxEnDNet subsumes the standard M3N [12]. But MaxEnDNet in its full generality offers a number of important advantages while retaining all the merits of the M3N. For example, structured prediction under MaxEnDNet is based on an averaging model and therefore enjoys a desirable smoothing effect, with a uniform convergence bound on generalization error, as shown in [20]; MaxEnDNet admits a prior that can be designed to introduce useful regularization effects, such as a sparsity bias, as explored in the Laplace M3N [19, 20]. In this paper, we explore yet another advantage of MaxEnDNet stemmed from the Bayesian-style max-margin learning formalism on incorporating hidden variables. We present the partially observed MaxEnDNet (PoMEN), which offers a principled way to incorporate latent structures carrying domain knowledge and learn a discriminative model with partially labeled data. The reducibility of MaxEnDNet to M3N renders many existing convex optimization algorithms developed for learning M3N directly applicable as subroutines for learning our proposed model. We describe an EM-style algorithm for PoMEN based on existing algorithms for M3N. As a practical application, we apply the proposed model to a web data extraction task–product information extraction, where collecting fully labeled training data is very difficult. The results show the promise of max-margin learning as opposed to likelihood-based estimation in the presence of hidden variables. The paper is organized as follows. Section 2 reviews the basic max-margin structured prediction formalism and MaxEnDNet. Section 3 presents the partially observed MaxEnDNet. Section 4 applies the model to real web data extraction, and Section 5 brings this paper to a conclusion. 2 Preliminaries Our goal is to learn a predictive function h : X 7→Y from a structured input x ∈X to a structured output y ∈Y, where Y = Y1×· · ·×Yl represents a combinatorial space of structured interpretations of multi-facet objects. For example, in part-of-speech (POS) tagging, Yi consists of all the POS tags and each label y = (y1, · · · , yl) is a sequence of POS tags, and each input x is a sentence (word sequence). We assume that the feasible set of labels Y(x) ⊆Y is finite for any x. Let F(x, y; w) be a parametric discriminant function. A common choice of F is a linear model, where F is defined by a set of K feature functions fk : X × Y 7→R and their weights wk: F(x, y; w) = w⊤f(x, y). A commonly used predictive function is: h0(x; w) = arg max y∈Y(x) F(x, y; w). (1) By using different loss functions, the parameters w can be estimated by maximizing the conditional likelihood [7] or by maximizing the margin [2, 12, 13] on labeled training data. 2.1 Maximum margin Markov networks Under the M3N formalism, which we will generalize in this paper, given a set of fully labeled training data D = {(xi, yi)}N i=1, the max-margin learning [12] solves the following optimization problem and achieves an optimum point estimate of the weight vector w: P0 (M3N) : min w∈F0,ξ∈RN + 1 2∥w∥2 + C N X i=1 ξi, (2) where ξi represents a slack variable absorbing errors in training data, C is a positive constant, R+ denotes non-negative real numbers, and F0 is the feasible space for w: F0 = {w : w⊤∆fi(y) ≥ 2 ∆ℓi(y) −ξi; ∀i, ∀y ̸= yi}, of which ∆fi(y) = f(xi, yi) −f(xi, y), w⊤∆fi(y) is the “margin” between the true label yi and a prediction y, and ∆ℓi(y) is a loss function with respect to yi. Various loss functions have been proposed for P0. In this paper, we adopt the hamming loss [12]: ∆ℓi(y) = P|xi| j=1 I(yj ̸= yi j), where I(·) is an indicator function that equals to 1 if the argument is true and 0 otherwise. The optimization problem P0 is intractable because of the exponential number of constraints in F0. Exploring sparse dependencies among individual labels yi in y, as reflected in the specific design of the feature functions (e.g., based on pair-wise labeling potentials), efficient optimization algorithms based on cutting-plane [13] or message-passing [12], and various gradientbased methods [3, 10] have been proposed to obtain approximate solution to P0. As described shortly, these algorithms can be directly employed as subroutines in solving our proposed model. 2.2 Maximum Entropy Discrimination Markov Networks Instead of predicting based on a single rule F(·; w) as in M3N using w, the structured maximum entropy discrimination formalism [19] facilitates a Bayes-style prediction by averaging F(·; w) over a distribution of rules according to a posterior distribution of the weights, p(w): h1(x) = arg max y∈Y(x) Z p(w)F(x, y; w) dw , (3) where p(w) is learned by solving an optimization problem referred to as a maximum entropy discrimination Markov network (MaxEnDNet, or MEN) [20] that elegantly combines Bayesian-style learning with max-margin learning. In a MaxEnDNet, a prior over w is introduced to regularize its distribution, and the margins resulting from predictor (3) are used to define a feasible distribution subspace. More formally, given a set of fully observed training data D and a prior distribution p0(w), MaxEnDNet solves the following problem for an optimal posterior p(w|D) or p(w): P1 (MaxEnDNet) : min p(w)∈F1,ξ∈RN + KL(p(w)||p0(w)) + U(ξ), (4) where the objective function KL(p(w)||p0(w)) + U(ξ) is known as the generalized entropy [8, 5], or regularized KL-divergence, and U(ξ) is a closed proper convex function over the slack variables ξ. U is also known as an additional “potential” term in the maximum entropy principle. The feasible distribution subspace F1 is defined as follows: F1 = n p(w) : Z p(w)[∆Fi(y; w) −∆ℓi(y)] dw ≥−ξi, ∀i, ∀y o , where ∆Fi(y; w) = F(xi, yi; w) −F(xi, y; w). P1 is a variational optimization problem over p(w) in the feasible subspace F1. Since both the KLdivergence and the U function in P1 are convex, and the constraints in F1 are linear, P1 is a convex program. Thus, one can apply the calculus of variations to the Lagrangian to obtain a variational extremum, followed by a dual transformation of P1. As proved in [20], solution to P1 leads to a GLIM for p(w), whose parameters are closely connected to the solution of the M3N. Theorem 1 (MaxEnDNet (adapted from [20])) The variational optimization problem P1 underlying a MaxEnDNet gives rise to the following optimum distribution of Markov network parameters: p(w) = 1 Z(α)p0(w) exp  X i,y αi(y)[∆Fi(y; w) −∆ℓi(y)] , (5) where Z(α) is a normalization factor and the Lagrangian multipliers αi(y) (corresponding to constraints in F1) can be obtained by solving the following dual problem of P1: D1 : max α −log Z(α) −U ⋆(α) s.t. αi(y) ≥0, ∀i, ∀y, where U ⋆(·) is the conjugate of the slack function U(·), i.e., U ⋆(α) = supξ P i,y αi(y)ξi −U(ξ)  . It can be shown that when F(x, y; w) = w⊤f(x, y), U(ξ) = C P i ξi, and p0(w) is a standard Gaussian N(w|0, I), then p(w) is also a Gaussian with shifted mean P i,y αi(y)∆fi(y) and covariance matrix I, where the Lagrangian multipliers αi(y) can be obtained by solving problem D1 of the form that is isomorphic to the dual of M3N. When applying this p(w) to Eq. (3), one can obtain a predictor that is identical to that of the M3N. From the above reduction, it should be clear that M3N is a special case of MaxEnDNet. But the MaxEnDNet in its full generality offers a number of important advantages while retaining all the 3 (a) (b) (c) Figure 1: (a) A web page with two data records containing 7 and 8 elements respectively; (b) A partial vision tree of the page in Figure 1(a), where grey nodes are the roots of the two records; (c) A label hierarchy for product information extraction, where the root node represents an entire instance (a web page); leaf nodes are the attributes (i.e. Name, Image, Price, and Description); and inner nodes are the intermediate class labels defined for parts of a web page, e.g. {N, I} is a class label for blocks containing both Name and Image. merits of the M3N. First, the MaxEnDNet prediction is based on model averaging and therefore enjoys a desirable smoothing effect, with a uniform convergence bound on generalization error, as shown in [20]. Second, MaxEnDNet admits a prior that can be designed to introduce useful regularization effects, such as a sparsity bias, as explored in the Laplace M3N [19, 20]. Third, as explored in this paper, MaxEnDNet offers a principled way to incorporate hidden generative models underlying the structured predictions, but allows the predictive model to be discriminatively trained based on partially labeled data. In the sequel, we introduce partially observed MaxEnDNet (PoMEN), that combines (possibly latent) generative model and discriminative training for structured prediction. 3 Partially Observed MaxEnDNet Consider, for example, the problem of web data extraction, which is to identify interested information from web pages. Each sample is a data record or an entire web page which is represented as a set of HTML elements. One striking characteristic of web data extraction is that various types of structural dependencies between HTML elements exist, e.g. the HTML tag tree or the Document Object Model (DOM) structure is itself hierarchical. In [17], fully observed hierarchical CRFs are shown to have great promise and achieve better performance than flat models like linear-chain CRFs [7]. One method to construct a hierarchical model is to first use a parser to construct a so called vision tree [17]. For example, Figure 1(b) is a part of the vision tree of the page in Figure 1(a). Then, based on the vision tree, a hierarchical model can be constructed accordingly to extract the interested attributes, e.g. a product’s name, image, price, description, etc. In such a hierarchical extraction model, inner nodes are useful to incorporate long distance dependencies, and the variables at one level are refinements of the variables at upper levels. To reflect the refinement relationship, the class labels defined as in [17] are also organized in a hierarchy as in Figure 1(c). Due to concerns over labeling cost and annotation-ambiguity caused by the overlapping of class labels as in Figure 1(c), it is desirable to effectively learn a hierarchical extraction model with partially labeled data. Without loss of generality, assume that the structured labeling of a sample consists of two parts—an observed part y and a hidden part z. Both y and z are structured labels, and furthermore the hidden variables are not isolated, but are statistically dependent on each other and on the observed data according to a graphical model p(y, z, w|x) = p(w, z|x)p(y|x, z, w), where p(y|x, z, w) takes the form of a Boltzmann distribution p(y|x, z, w) = 1 Z exp{−F(x, y, z; w)} and x is a global condition as in CRFs [7]. Following the spirit of a margin-based structured predictor such as M3N, we employ only the unnormalized energy function F(x, y, z; w) (which usually consists of linear combinations of feature functions or potentials) as the cost function for structured prediction, and we adopt a prediction rule directly extended from the MaxEnDNet—average over all the possible models defined by different w, and at the same time marginalized over all hidden variables z. That is, h2(x) = arg max y∈Y(x) X z Z p(w, z)F(x, y, z; w) dw . (6) Now our problem is learning the optimum p(w, z) from data. Let {z} ≡(z1, . . . , zN) denote the ensemble of hidden labels of all the samples. Analogous to the setup for learning the MaxEnDNet, we specify a prior distribution p0({z}) over all the hidden structured labels. The feasible space F2 of p(w, {z}) can be defined as follows according to the margin constraints: F2 = n p(w, {z}) : X z Z p(w, z)[∆Fi(y, z; w) −∆ℓi(y)] dw ≥−ξi, ∀i, ∀y o , 4 where ∆Fi(y, z; w) = F(xi, yi, z; w) −F(xi, y, z; w), and p(w, z) is the marginal distribution of p(w, {z}) on a single sample, which will be used in (6) to compute the structured prediction. Again we learn the optimum p(w, {z}) based on a structured minimum relative entropy principle as in MaxEnDNet. Specifically, let p0(w, {z}) represent a given joint prior over the parameters and the hidden variables, we define the PoMEN problem that gives rise to the optimum p(w, {z}): P2 (PoMEN) : min p(w,{z})∈F2,ξ∈RN + KL(p(w, {z})||p0(w, {z})) + U(ξ). (7) Analogous to P1, P2 is a variational optimization problem over p(w, {z}) in the feasible space F2. Again since both the KL and the U function in P2 are convex, and the constraints in F2 are linear, P2 is a convex program. Thus, we can employ a technique similar to that used to solve MaxEnDNet to solve the PoMEN problem. 3.1 Learning PoMEN For a fully general p(w, {z}) where hidden variables in all samples are coupled, solving P2 based on an extension of Theorem 1 would involve very high-dimensional integration and summation that is in practice intractable. In this paper we consider a simpler case where the hidden labels of different samples are iid and independent of the parameter w in both the prior and the posterior distributions, that is, p0(w, {z}) = p0(w) QN i=1 p0(zi) and p(w, {z}) = p(w) QN i=1 p(zi). This assumption will hold true in a graphical model where w corresponds to only the observed y variables at the bottom of a hierarchical model. For many practical applications such as the hierarchical web-info extraction, such a model is realistic and adequate. For more general models where dependencies are more global, we can use the above factored model as a generalized mean field approximation to the true distribution, but this extension is beyond the scope of this paper, and will be explored later in the full paper. Generalizing Theorem 1, following a coordinate descent principle, now we present an alternating minimization (EM-style) procedure for P2: Step 1: keep p(z) fixed, infer p(w) by solving the following problem: min p(w)∈F′ 1,ξ∈RN + KL(p(w)||p0(w)) + C X i ξi, (8) where F′ 1 = {p(w) : R p(w)Ep(z)[∆Fi(y, z; w) −∆ℓi(y)] dw ≥−ξi, ∀i, ∀y}, which is a generalized version of F1 with hidden variables. Thus, we can apply the same convex optimization techniques as being used for solving the problem P1. Specifically, assume that the prior distribution p0(w) is a standard normal and F(x, y, z; w) = w⊤f(x, y, z), then the solution (i.e. posterior distribution) is p(w) = N(w|µw, I), where µw = P i,y αi(y)Ep(z)[∆fi(y, z)]. The dual variables α are achieved by solving a dual problem: max α∈P(C) X i,y αi(y)∆ℓi(y) −1 2∥ X i,y αi(y)Ep(z)[∆fi(y, z)]∥2, (9) where P(C) = {α : P y αi(y) = C; αi(y) ≥0, ∀i, ∀y}. This dual problem is isomorphic to the dual form of the M3N optimization problem, and we can use existing algorithms developed for M3N, such as [12, 3] to solve it. Alternatively, we can solve the following primal problem via employing existing subgradient [10] or cutting plane [13] algorithms: min w∈F′ 0,ξ∈RN + 1 2w⊤w + C N X i=1 ξi, (10) where F′ 0 = {w : w⊤Ep(z)[∆fi(y, z)] ≥∆ℓi(y) −ξi; ξi ≥0, ∀i, ∀y}, which is a generalized version of F0. It is easy to show that the solution to this primal problem is the posterior mean of p(w), which will be used to make prediction in the predictive function h2. Note that the primal problem is very similar to that of M3N, except the expectations in F′ 0. This is not surprising since it can be shown that M3N is a special case of MaxEnDNet. We will discuss how to efficiently compute the expectations Ep(z)[∆fi(y, z)] in Step 2. Step 2: keep p(w) fixed, based on the factorization assumption p({z}) = Q i p(zi) and p0({z}) = Q i p0(zi), the distribution p(z) for each sample i can be obtained by solving the following problem: min p(z)∈F⋆ 1 ,ξi∈R+ KL(p(z)||p0(z)) + Cξi, (11) 5 where F⋆ 1 = {p(z) : P z p(z) R p(w)[w⊤∆fi(y, z) −∆ℓi(y)] dw ≥−ξi, ∀y}. Since p(w) is a normal distribution as shown in Step 1, F⋆ 1 = {p(z) : P z p(z)[µ⊤ w∆fi(y, z) −∆ℓi(y)  ≥ −ξi, ∀y}. Similarly, by introducing a set of Lagrangian multipliers β(y), we can get: p(z) = 1 Z(β)p0(z) exp n X y β(y)[µ⊤ w∆fi(y, z) −∆ℓi(y)] o , and the dual variables β(y) can be obtained by solving the following dual problem: max β∈Pi(C) −log  X z p0(z) exp{ X y β(y)[µ⊤ w∆fi(y, z) −∆ℓi(y)]}  , (12) where Pi(C) = {P y β(y) = C, β(y) ≥0, ∀y}. This non-linear constrained optimization problem can be solved with existing solvers, like IPOPT [15]. With a little algebra, we can compute the gradients as follows: ∂log Z(β) ∂β(y) = µ⊤ wEp(z)[∆fi(y, z)] −∆ℓi(y). To efficiently calculate the expectations Ep(z)[∆fi(y, z)] as required in Step1 and in the above gradients. We make a gentle assumption that the prior distribution p0(z) is an exponential distribution of the following form: p0(z) = exp n X m φm(z) o . (13) This assumption is general enough for our purpose, and covers the following commonly used priors: i. Log-linear Prior: defined by a set of feature functions and their weights. For example, in a pairwise Markov network, we can define the prior model as: p0(z) ∝ exp  P (i,j)∈E P k λkgk(zi, zj) , where gk(zi, zj) are feature functions and λk are weights. ii. Independent Prior: defined as p0(z) = Qℓ j=1 p0(zj). In the logarithm space, we can write it as: p0(z) = exp{Pℓ j=1 log p0(zj)}. iii. Markov Prior: the prior model have the Markov property w.r.t the model’s structure. For example, for a chain graph, the prior distribution can be written as: p0(z) = p(z1) Qℓ j=2 p0(zj|zj−1). Similarly, in the logarithm space, p0(z) = exp{log p0(z1) + Pℓ j=2 log p0(zj|zj−1)}. With the above assumption, p(z) is an exponential family distribution, and the expectations, Ep(z)[∆fi(y, z)], can be efficiently calculated by exploring the sparseness of the model’s structure to compute marginal probabilities, e.g. p(zi) and p(zi, zj) in pairwise Markov networks. When the model’s tree width is not large, this can be done exactly. For complex models, approximate inference like loopy belief propagation and variational methods can be applied. However, since the number of constraints in (12) is exponential to the size of the observed labels, the optimization problem cannot be efficiently solved. A key observation, as explored in [12], is that we can interpret β(y) as a probability distribution of y because of the regularity constraints: P y β(y) = C, β(y) ≥0, ∀y. Thus, we can introduce a set of marginal dual variables and transfer the dual problem (12) to an equivalent form with a polynomial number of constraints. The derivatives with respect to each marginal dual parameter is of the same structure as the above gradients. 4 Experiments We apply PoMEN to the problem of web data extraction, and compare it with partially observed CRFs (PoHCRF) [9], and fully observed hierarchical CRFs (HCRF) [17] and hierarchical M3N (HM3N) which has the same hierarchical model structure as the HCRF. 4.1 Data Sets, Evaluation Criteria, and Prior for Latent Variables We concern ourselves with the problem of identifying product items for sale on the web. For each product item, four attributes – Name, Image, Price, and Description are extracted in our experiments. The evaluation data consists of product web pages generated from 37 different templates. For each template, there are 5 pages for training and 10 for testing. We evaluate all the methods on two different levels of inputs, record level and page level. For record-level evaluation, we assume that data records are given, and we compare different models on accuracy of extracting attributes in the given records. For page-level evaluation, the inputs are raw web pages and all the models perform 6 0 20 40 0.85 0.86 0.87 0.88 0.89 0.9 0.91 0.92 Training Ratio Average F1 HCRF PoHCRF HM3N PoM3N 0 20 40 0.65 0.7 0.75 0.8 0.85 Training Ratio Block Instance Accuracy HCRF PoHCRF HM3N PoM3N (a) 0 50 0.6 0.65 0.7 0.75 0.8 0.85 0.9 Training Ratio F1 Name HCRF PoHCRF HM3N PoM3N 0 50 0.93 0.935 0.94 0.945 0.95 0.955 0.96 0.965 0.97 Training Ratio F1 Image HCRF PoHCRF HM3N PoM3N 0 50 0.93 0.94 0.95 0.96 0.97 0.98 Training Ratio F1 Price HCRF PoHCRF HM3N PoM3N 0 50 0.78 0.79 0.8 0.81 0.82 0.83 0.84 0.85 0.86 Training Ratio F1 Description HCRF PoHCRF HM3N PoM3N (b) Figure 2: (a) The F1 and block instance accuracy of record-level evaluation from 4 models under different amount of training data. (b) The F1 and its variance on the attributes: Name, Image, Price, and Description. 0 20 40 0.6 0.65 0.7 0.75 0.8 0.85 0.9 0.95 1 Training Ratio Average F1 0 20 40 0.6 0.65 0.7 0.75 0.8 0.85 0.9 0.95 1 Training Ratio Block Instance Accuracy HCRF PoHCRF HM3N PoM3N HCRF PoHCRF HM3N PoM3N (a) 0 20 40 0.6 0.65 0.7 0.75 0.8 0.85 0.9 0.95 1 Training Ratio Average F1 0 20 40 0.6 0.65 0.7 0.75 0.8 0.85 0.9 0.95 1 Training Ratio Block Instance Accuracy HCRF PoHCRF HM3N PoM3N HCRF PoHCRF HM3N PoM3N (b) Figure 3: The average F1 and block instance accuracy of different models with different ratios of training data for two types of page-level evaluation: (a) ST1; and (b) ST2. both record detection and attribute extraction simultaneously as in [17]. In the 185 training pages, there are 1585 data records in total; in the 370 testing pages, 3391 data records are collected. As for evaluation criteria, we use the standard precision, recall, and their harmonic value F1 for each attribute and the two comprehensive measures, i.e. average F1 and block instance accuracy, as defined in [17]. We adopt an independent prior described earlier for the latent variables, each factor p0(zi) over a single latent label is assumed to be uniform. 4.2 Record-Level Evaluation In this evaluation, partially observed training data are the data records whose leaf nodes are labeled and inner nodes are hidden. We randomly select m = 5, 10, 20, 30, 40, or, 50 percent of the training records as training data, and test on all the testing records. For each m, 10 independent experiments were conducted and the average performance is summarized in Figure 2. From Figure 2(a), it can be seen that the HM3N performs slightly better than HCRF trained on fully labeled data. For the two partially observed models, PoMEN performs much better than PoHCRF in both average F1 and block instance accuracy, and with lower variances of the score, especially when the training set is small. As the number of training data increases, PoMEN performs comparably w.r.t. the fully observed HM3N. For all the models, higher scores and lower variances are achieved with more training data. Figure 2(b) shows the F1 score on each attribute. Overall, for attributes Image, Price, and Description, although all models generally perform better with more training data, the improvement is small; and the differences between different models are small. This is possibly because the features of these attributes are usually consistent and distinctive, and therefore easier to learn and predict. For the attribute Name, however, a large number of training data are needed to learn a good model because its underlying features have diverse appearance on web pages. 4.3 Page-Level Evaluation Experiments on page-level prediction is conducted similarly as above, and the results are summarized in Figure 3. Two different partial labeling strategies are used to generate training data. ST1: label the leaf nodes and the nodes that represent data records; ST2: label more information based on ST1, e.g., label also the nodes above the “Data Record” nodes in the hierarchy as in Figure 1(c). Due to space limitation, we only report average F1 and block instance accuracy. For ST1, PoMEN achieves better scores and lower variances than PoHCRF in both average F1 and block instance accuracy. The HM3N performs slightly better than HCRF (both trained on full labeling), and PoMEN performs comparably with the fully observed HCRF in block instance accuracy. For ST2, with more supervision information, PoHCRF achieves higher performance that is comparable to that of HM3N in average F1, but slightly lower than HM3N in block instance accuracy. For 7 the latent models, PoHCRF performs slightly better in average F1, and PoMEN does better in block instance accuracy; moreover, the variances of PoMEN are much smaller than those of PoHCRF in both average F1 and block instance accuracy. We can also see that PoMEN does not change much when additional label information is provided in ST2. Thus, the max-margin principle could provide a better paradigm than the likelihood-based estimation for learning latent hierarchical models. For the second step of learning PoMEN, the IPOPT solver [15] was used to compute the distribution p(z). Interestingly, the performance of PoMEN does not change much during the iteration, and our results were achieved within 3 iterations. It is possible that in hierarchical models, since inner variables usually represent overlapping concepts, the initial distribution are already reasonably good to describe confidence on the labeling due to implicit consistence across the labels. This is unlike the multi-label learning [6] where only one of the multiple labels is true and during the iteration more probability mass should be redistributed on the true label during the EM iterations. 5 Conclusions We have presented an extension of the standard max-margin learning to address the challenging problem of learning Markov networks with the existence of structured hidden variables. Our approach is a generalization of the maximum entropy discrimination Markov networks (MaxEnDNet), which offer a general framework to combine Bayesian-style and max-margin learning and subsume the standard M3N as a special case, to consider structured hidden variables. For the partially observed MaxEnDNet, we developed an EM-style algorithm based on existing convex optimization algorithms developed for the standard M3N. We applied the proposed model to a real-world web data extraction task and showed that learning latent hierarchical models based on the max-margin principle could be better than the likelihood-based learning with hidden variables. Acknowledgments This work was done while J.Z. was a visiting researcher at CMU under a State Scholarship from China, and supports from NSF DBI-0546594 and DBI-0640543 awarded to E.X.; J.Z. and B.Z. are also supported by Chinese NSF Grant 60621062 and 60605003; National Key Foundation R&D Projects 2003CB317007, 2004CB318108 and 2007CB311003; and Basic Research Foundation of Tsinghua National Lab for Info Sci & Tech. References [1] Y. Altun, D. McAllester, and M. Belkin. Maximum margin semi-supervised learning for structured variables. In NIPS, 2006. [2] Y. Altun, I. Tsochantaridis, and T. Hofmann. Hidden markov support vector machines. In ICML, 2003. [3] P. Bartlett, M. Collins, B. Taskar, and D. McAllester. Exponentiated gradient algorithms for larg-margin structured classification. In NIPS, 2004. [4] U. Brefeld and T. Scheffer. Semi-supervised learning for structured output variables. In ICML, 2006. [5] M. Dud´ık, S.J. Phillips, and R.E. Schapire. Maximum entropy density estimation with generalized regularization and an application to species distribution modeling. JMLR, (8):1217–1260, 2007. [6] R. Jin and Z. Ghahramani. Learning with multiple labels. In NIPS, 2002. [7] J. Lafferty, A. McCallum, and F. Pereira. Conditional random fields: Probabilistic models for segmenting and labeling sequence data. In ICML, 2001. [8] G. Lebanon and J. Lafferty. Boosting and maximum likelihood for exponential models. In NIPS, 2001. [9] A. Quattoni, M. Collins, and T. Darrell. Conditional random fields for object recognition. In NIPS, 2004. [10] N.D. Ratliff, J.A. Bagnell, and M.A. Zinkevich. (online) subgradient methods for structured prediction. In AISTATS, 2007. [11] F. Sha and L. Saul. Large margin hidden markov models for automatic speech recognition. In NIPS, 2006. [12] B. Taskar, C. Guestrin, and D. Koller. Max-margin markov networks. In NIPS, 2003. [13] I. Tsochantaridis, T. Hofmann, T. Joachims, and Y. Altun. Support vector machine learning for interdependent and structured output spaces. In ICML, 2004. [14] J. Verbeek and B. Triggs. Scene segmentation with conditional random fields learned from partially labeled images. In NIPS, 2007. [15] A. W¨achter and L.T. Biegler. On the implementation of a primal-dual interior point filter line search algorithm for large-scale nonlinear programming. Mathematical Programming, (106(1)):25–57, 2006. [16] L. Xu, D. Wilkinson, F. Southey, and D. Schuurmans. Discriminative unsupervised learning of structured predictors. In ICML, 2006. [17] J. Zhu, Z. Nie, J.-R. Wen, B. Zhang, and W.-Y. Ma. Simultaneous record detection and attribute labeling in web data extraction. In SIGKDD, 2006. [18] J. Zhu, Z. Nie, B. Zhang, and J.-R. Wen. Dynamic hierarchical markov random fields and their application to web data extraction. In ICML, 2007. [19] J. Zhu, E.P. Xing, and B. Zhang. Laplace maximum margin markov networks. In ICML, 2008. [20] J. Zhu, E.P. Xing, and B. Zhang. Maximum entropy discrimination markov networks. Technical Report CMU-ML-08-104, Machine Learning Department, Carnegie Mellon University, 2008. 8
2008
229
3,486
Influence of graph construction on graph-based clustering measures Markus Maier Ulrike von Luxburg Max Planck Institute for Biological Cybernetics, T¨ubingen, Germany Matthias Hein Saarland University, Saarbr¨ucken, Germany Abstract Graph clustering methods such as spectral clustering are defined for general weighted graphs. In machine learning, however, data often is not given in form of a graph, but in terms of similarity (or distance) values between points. In this case, first a neighborhood graph is constructed using the similarities between the points and then a graph clustering algorithm is applied to this graph. In this paper we investigate the influence of the construction of the similarity graph on the clustering results. We first study the convergence of graph clustering criteria such as the normalized cut (Ncut) as the sample size tends to infinity. We find that the limit expressions are different for different types of graph, for example the r-neighborhood graph or the k-nearest neighbor graph. In plain words: Ncut on a kNN graph does something systematically different than Ncut on an r-neighborhood graph! This finding shows that graph clustering criteria cannot be studied independently of the kind of graph they are applied to. We also provide examples which show that these differences can be observed for toy and real data already for rather small sample sizes. 1 Introduction In many areas of machine learning such as clustering, dimensionality reduction, or semi-supervised learning, neighborhood graphs are used to model local relationships between data points and to build global structure from local information. The easiest and most popular neighborhood graphs are the r-neighborhood graph, in which every point is connected to all other points within a distance of r, and the k-nearest neighbor (kNN) graph, in which every point is connected to the k closest neighboring points. When applying graph based machine learning methods to given sets of data points, there are several choices to be made: the type of the graph to construct (e.g., r-neighborhood graph or kNN graph), and the connectivity parameter (r or k, respectively). However, the question how these choices should be made has received only little attention in the literature. This is not so severe in the domain of supervised learning, where parameters can be set using cross-validation. However, it poses a serious problem in unsupervised learning. While different researchers use different heuristics and their “gut feeling” to set these parameters, neither systematic empirical studies have been conducted (for example: how sensitive are the results to the graph parameters?), nor do theoretical results exist which lead to well-justified heuristics. Our goal in this paper is to address the theoretical side of this question in the context of graph based clustering. In this work, we consider clustering in a statistical setting: we assume that a finite set of data points has been sampled from some underlying distribution. Ultimately, what we want to find is a good clustering of the underlying data space. We assume that the quality of a clustering is defined by some clustering objective function. In this paper we focus on the case of the normalized cut 1 objective function Ncut (Shi and Malik, 2000) and on the question if and how the results of graph based clustering algorithms are affected by the graph type and the parameters that are chosen for the construction of the neighborhood graph. To this end, we first want to study the convergence of the clustering criterion (Ncut) on different kinds of graphs (kNN graph and r-neighborhood graph), as the sample size tends to infinity. To our own surprise, when studying this convergence it turned out that, depending on the type of graph, the normalized cut converges to different limit values! That is, the (suitably normalized) values of Ncut tend to a different limit functional, depending on whether we use the r-neighborhood graph or the kNN graph on the finite sample. Intuitively, what happens is as follows: On any given graph, the normalized cut is one unique, well-defined mathematical expression. But of course, given a fixed partition of a sample of points, this Ncut value is different for different graphs constructed on the sample (different graph constructions put different numbers of edges between points, which leads to different Ncut values). It can now be shown that even after appropriate rescaling, such differences remain visible in the limit for the sample size tending to infinity. For example, we will see that depending on the type of graph, the limit criterion integrates over different powers of the density. This can lead to the effect that the minimizer of Ncut on the kNN graph is different from the minimizer of Ncut on the r-graph. This means that ultimately, the question about the “best Ncut” clustering, given infinite amount of data, has different answers, depending on which underlying graph we use! This observation opens Pandora’s box on clustering criteria: the “meaning” of a clustering criterion does not only depend on the exact definition of the criterion itself, but also on how the graph on the finite sample is constructed. In the case of Ncut this means that Ncut is not just “one well-defined criterion”, but it corresponds to a whole bunch of criteria, which differ depending on the underlying graph. More sloppy: Ncut on a kNN graph does something different than Ncut on an r-neighborhood graph! The first part of our paper is devoted to the mathematical derivation of our results. We investigate how and under which conditions the Ncut criterion converges on the different graphs, and what the corresponding limit expressions are. The second part of our paper shows that these findings are not only of theoretical interest, but that they also influence concrete algorithms such as spectral clustering in practice. We give examples of well-clustered distributions (mixtures of Gaussians), where the optimal limit cut on the kNN graph is different from the one on the r-neighborhood graph. Moreover, these results can be reproduced with finite samples. That is, given a finite sample from some well-clustered distribution, normalized spectral clustering on the kNN graph produces systematically different results from spectral clustering on the r-neighborhood graph. 2 Definitions and assumptions Given a graph G = (V, E) with weights w : E →R and a partition of the nodes V into (C, V \ C) we define cut(C, V \ C) = P u∈C,v∈V \C w(u, v) + w(v, u), vol(C) = P u∈C,v∈V w(u, v), and Ncut(C, V \ C) = cut(C, V \ C)  1 vol(C) + 1 vol(V \ C)  . Given a finite set of points x1, . . . , xn we consider two main types of neighborhood graphs: • the r-neighborhood graph Gn,r: there is an edge from point xi to point xj if dist(xi, xj) ≤r for all 1 ≤i, j ≤n, i ̸= j. • the directed k-nearest neighbor graph Gn,k: there is a directed edge from xi to xj if xj is one of the k nearest neighbors of xi for 1 ≤i, j ≤n, i ̸= j. In the following we work on the space Rd with Euclidean metric dist. We denote by ηd the volume of the d-dimensional unit ball in Rd and by B(x, r) the ball with radius r centered at x. On the space Rd we will study partitions which are induced by some hypersurface S. Given a surface S which separates the data points in two non-empty parts C+ and C−, we denote by cutn,r(S) the number of edges in Gn,r that go from a sample point on one side of the surface to a sample point on the other side of the surface. The corresponding quantity for the directed k-nearest neighbor graph is denoted by cutn,k(S). For a set A ⊆Rd the volume of {x1, . . . , xn} ∩A in the graph Gn,r is denoted by voln,r(A), and correspondingly voln,k(A) in the graph Gn,k. 2 General assumptions in the whole paper: The data points x1, ..., xn are drawn independently from some density p on Rd. This density is bounded from below and above, that is 0 < pmin ≤ p(x) ≤pmax. In particular, it has compact support C. We assume that the boundary ∂C of C is well-behaved, that means it is a set of Lebesgue measure 0 and we can find a constant γ > 0 such that for r sufficiently small, vol(B(x, r) ∩C) ≥γ vol(B(x, r)) for all x ∈C. Furthermore we assume that p is twice differentiable in the interior of C and that the derivatives are bounded. The measure on Rd induced by p will be denoted by µ, that means, for a measurable set A we set µ(A) = R A p(x)dx. For the cut surface S, we assume that the volume of S ∩∂C with respect to the (d −1)-dimensional measure on S is a set of measure 0. Moreover, S splits the space Rd into two sets C+ and C−with positive probability mass. While the setting introduced above is very general, we make some substantial simplifications in this paper. First, we consider all graphs as unweighted graphs (the proofs are already technical enough in this setting). We have not yet had time to prove the corresponding theorems for weighted graphs, but would expect that this might lead yet to other limit expressions. This will be a point for future work. Moreover, in the case of the kNN-graph we consider the directed graph for simplicity. Some statements can be carried over by simple arguments from the directed graph to the symmetric graph, but not all of them. In general, we study the setting where one wants to find two clusters which are induced by some hypersurface in Rd. In this paper we only consider the case where S is a hyperplane. Our results can be generalized to more general (smooth) surfaces, provided one makes a few assumptions on the regularity of the surface S. The proofs are more technical, though. 3 Limits of quality measures In this section we study the asymptotic behavior of the quantities introduced above for both the unweighted directed kNN graph and the unweighted r-graph. Due to the lack of space we only provide proof sketches; detailed proofs can be found in the supplement Maier et al. (2008). Let (kn)n∈N be an increasing sequence. Given a finite sample x1, ..., xn from the underlying distribution, we will construct the graph Gn,kn and study the convergence of Ncutn,kn(S), that is the Ncut value induced by S, evaluated on the graph Gn,kn. Similarly, given a sequence (rn)n∈N of radii, we consider the convergence of Ncutn,rn induced by S on the graph Gn,rn. In the following R S ds denotes the (d −1)-dimensional surface integral along S. Here is our main result: Theorem 1 (Limit values of Ncut on different graphs) Assume the general assumptions hold for the density p on Rd and a fixed hyperplane S in Rd. Consider the sequences (kn)n∈N ⊂N and (rn)n∈N ⊂R. For the kNN graph, assume that kn/n →0. In case d = 1, assume that kn/√n → ∞, in case d ≥2 assume kn/ log n →∞. Then we have for n →∞ d r n kn Ncutn,kn(S) a.s. −→ 2ηd−1 (d + 1)η1+1/d d Z S p1−1/d(s)ds „“ Z C+ p(x)dx ”−1 + “ Z C−p(x)dx ”−1« . For the r-neighborhood graph, assume rn > 0, rn →0 and nrd+1 n →∞for n →∞. Then 1 rn Ncutn,rn(S) a.s. −→ 2ηd−1 (d + 1)ηd Z S p2(s)ds „“ Z C+ p2(x)dx ”−1 + “ Z C−p2(x)dx ”−1« . Proof (Sketch for the case of the kNN graph, the case of the r graph is similar. Details see Maier et al., 2008.). Define the scaling factors ccut(n, kn) = n−1+1/dk−1−1/d and cvol(n, kn) = (nkn)−1. Then, (n/kn)1/d Ncut(S) can be decomposed in cut and volume term:  ccut(n, kn) cutn,kn(S)  ·  (cvol(n, kn) voln,kn(C+))−1 + (cvol(n, kn) voln,kn(C−))−1 . In Proposition 3 below we will see that the volume term satisfies cvol(n, kn) voln,kn(C+) a.s. −→ Z C+ p(x)dx, and the corresponding expression holds for C−. For the cut term we will prove below that ccut(n, kn) cutn,kn(S) a.s. −→ 2ηd−1 (d + 1)η1+1/d d Z S p1−1/d(s)ds. (1) 3 This will be done using a standard decomposition into variance and bias term, which will be treated in Propositions 1 and 2, respectively. □ Proposition 1 (Limit values of E cutn,kn and E cutn,rn) Let the general assumptions hold, and S be an arbitrary, but fixed hyperplane. For the kNN graph, if kn/n →0 and kn/ log n →∞for n →∞, then E  1 nkn d r n kn cutn,kn(S)  → 2ηd−1 d + 1 η−1−1/d d Z S p1−1/d(s)ds. For the r-neighborhood graph, if rn →0, rn > 0 for n →∞, then E cutn,rn(S) n2rd+1 n  → 2ηd−1 d + 1 Z S p2(s)ds. Proof (Sketch, see Maier et al., 2008) . We start with the case of the r-neighborhood graph. By Ni (i = 1, ..., n) denote the number of edges in the graph that start in point xi and end in some point on the other side of the cut surface S. As all points are sampled i.i.d, we have E cutn,rn(S)  = Pn i=1 ENi = nEN1. Suppose the position of the first point is x. The idea to compute the expected number of edges originating in x is as follows. We consider a ball B(x, rn) of radius rn around x (where rn is the current parameter of the r-neighborhood graph). The expected number of edges originating in x equals the expected number of points which lie in the intersection of this ball with the other side of the hyperplane. That is, setting g(x, rn) = µ B(x, rn) ∩C+ if x ∈C− µ B(x, rn) ∩C− if x ∈C+ we have E(N1|X1 = x) = (n −1)g(x, rn), since the number of points in the intersection of B(x, rn) with the other side of the hyperplane is binomially distributed with parameters n −1 and g(x, rn). Integrating this conditional expectation over all positions of the point x in Rd gives E cutn,rn(S)  = n(n −1) Z Rd g(x, rn)p(x)dx. The second important idea is that instead of integrating over Rd, we first integrate over the hyperplane S and then, at each point s ∈S, along the normal line through s, that is the line s + t⃗n, t ∈R, where ⃗n denotes the normal vector of the hyperplane pointing towards C+. This leads to n(n −1) Z Rd g(x, rn)p(x)dx = n(n −1) Z S Z ∞ −∞ g(s + t⃗n, rn)p(s + t⃗n) dt ds. This has two advantages. First, if x is far enough from S (that is, dist(x, s) > rn for all s ∈S), then g(x, rn) = 0 and the corresponding terms in the integral vanish. Second, if x is close to s ∈S and the radius rn is small, then the density on the ball B(x, rn) can be considered approximately homogeneous, that is p(y) ≈p(s) for all y ∈B(x, rn). Thus, Z ∞ −∞ g(s + t⃗n, rn)p(s + t⃗n) dt = Z rn −rn g(s + t⃗n, rn)p(s + t⃗n) dt ≈2 Z rn 0 p(s) vol B(s + t⃗n, rn) ∩C− p(s) dt. It is not hard to see that vol B(s+t⃗n, rn)∩C− = rd nA(t/rn), where A(t/rn) denotes the volume of the cap of the unit ball capped at distance t/rn. Solving the integrals leads to Z rn 0 vol B(s + t⃗n, rn) ∩C− dt = rd+1 n Z 1 0 A(t)dt = rd+1 n ηd−1 d + 1. Combining the steps above we obtain the result for the r-neighborhood graph. 4 In the case of the kNN graph, the proof follows a similar principle. We have to replace the radius rn by the k-nearest neighbor radius, that is, the distance of a data point to its kth nearest neighbor. This leads to additional difficulties, as this radius is a random variable as well. By a technical lemma one can show that for large n, under the condition kn/ log n →∞we can replace the integration over the possible values of the kNN radius by its expectation. Then we observe that as kn/n →0, the expected kNN radius converges to 0, that is for large n we only have to integrate over balls of homogeneous density. In a region of homogeneous density ˜p, the expected kNN radius is given as (k/((n−1)ηd˜p))1/d. Now similar arguments as above lead to the desired result. □ Proposition 1 already shows one of the most important differences between the limits of the expected cut for the different graphs: For the r-graph we integrate over p2, while we integrate over p1−1/d for the kNN graph. This difference comes from the fact that the kNN-radius is a random quantity, which is not the case for the deterministically chosen radius rn in the r-graph. Proposition 2 (Deviation of cutn,kn and cutn,rn from their means) Let the general assumptions hold. For the kNN graph, if the dimension d = 1 then assume kn/√n →∞, for d ≥2 assume kn/ log n →∞. In both cases let kn/n →0. Then 1 nkn d r n kn cutn,kn(S) −E  1 nkn d r n kn cutn,kn(S)  a.s. −→ 0. For the r-neighborhood graph, let rn > 0, rn →0 such that nrd+1 n →∞for n →∞. Then 1 n2rd+1 n cutn,rn(S) −E  1 n2rd+1 n cutn,rn(S)  a.s. −→ 0. Proof (Sketch, details see Maier et al., 2008). Using McDiarmid’s inequality (with a kissing number argument to obtain the bounded differences condition) or a U-statistics argument leads to exponential decay rates for the deviation probabilities (and thus to convergence in probability). The almost sure convergence can then be obtained using the Borel-Cantelli lemma. □ Proposition 3 (Limits of voln,kn and voln,rn) Let the general assumptions hold, and H ⊆Rd an arbitrary measurable subset. Then, as n →∞, for the kNN graph we have 1 nkn voln,kn(H) a.s. −→ µ(H). For the r-neighborhood graph, if nrd →∞we have 1 n2rdn voln,rn(H) a.s. −→ ηd Z H p2(x)dx. Proof. In the graph Gn,kn there are exactly k outgoing edges from each node. Thus the expected number of edges originating in H depends on the number of sample points in H only, which is binomially distributed with parameters n and µ(H). For the graph Gn,rn we decompose the volume into the contributions of all the points, and for a single point we condition on its location. The number of outgoing edges, provided the point is at position x, is the number of other points in B(x, rn), which is binomially distributed with parameters (n −1) and µ(B(x, rn)). If rn is sufficiently small we can approximate µ(B(x, rn)) by ηdrd np(x) under our conditions on the density. Almost sure convergence is proved using McDiarmid’s inequality or a U-statistics argument. □ Other convergence results. In the literature, we only know of one other limit result for graph cuts, proved by Narayanan et al. (2007). Here the authors study the case of a fully connected graph with Gaussian weights wt(xi, xj) = 1/(4πt)d/2 exp(−dist(xi −xj)2/4t). Denoting the corresponding cut value by cutn,t, the authors show that if tn →0 such that tn > 1/n1/(2d+2), then √π n√tn cutn,tn → Z S p(s) ds a.s. Comparing this result to ours, we can see that it corroborates our finding: yet another graph leads to yet another limit result (for cut, as the authors did not study the Ncut criterion). 5 4 Examples where different limits of Ncut lead to different optimal cuts In Theorem 1 we have proved that the kNN graph leads to a different limit functional for Ncut(S) than the r-neighborhood graph. Now we want to show that this difference is not only a mathematical subtlety without practical relevance. We will see that if we select an optimal cut based on the limit criterion for the kNN graph we can obtain a different result than if we use the limit criterion based on the r-neighborhood graph. Moreover, this finding does not only apply to the limit cuts, but also to cuts constructed on finite samples. This shows that on finite data sets, different constructions of the graph can lead to systematic differences in the clustering results. Consider Gaussian mixture distributions in one and two dimensions of the form P3 i=1 αiN([µi, 0, . . . , 0], σiI) which are set to 0 where they are below a threshold θ (and properly rescaled), with specific parameters dim µ1 µ2 µ3 σ1 σ1 σ1 α1 α2 α3 θ 1 0 0.5 1 0.4 0.1 0.1 0.66 0.17 0.17 0.1 2 −1.1 0 1.3 0.2 0.4 0.1 0.4 0.55 0.05 0.01 For density plots, see Figure 1. We first investigate the theoretic limit Ncut values, for hyperplanes which cut perpendicular to the first dimension (which is the “informative” dimension of the data). For the chosen densities, the limit Ncut expressions from Theorem 1 can be computed analytically. The plots in Figure 2 show the theoretic limits. In particular, the minimal Ncut value in the kNN case is obtained at a different position than the minimal value in the r-neighborhood case. This effect can also be observed in a finite sample setting. We sampled n = 2000 points from the given distributions and constructed the (unweighted) kNN graph (we tried a range of parameters of k and r, our results are stable with respect to this choice). Then we evaluated the empirical Ncut values for all hyperplanes which cut perpendicular to the informative dimension, similar as in the last paragraph. This experiment was repeated 100 times. Figure 2 shows the means of the Ncut values of these hyperplanes, evaluated on the sample graphs. We can see that the empirical plots are very similar to the limit plots produced above. Moreover, we applied normalized spectral clustering (cf. von Luxburg, 2007) to the mixture data sets. Instead of the directed kNN graph we used the undirected one, as standard spectral clustering is not defined for directed graphs. We compare different clusterings by the minimal matching distance: dMM(Clust1, Clust2) = min π Pn i=1 1Clust1(xi)̸=π(Clust2(xi))  /(2n) where the minimum is taken over all permutations π of the labels. In the case of two clusters, this distance corresponds to the 0-1-loss as used in classification: a minimal matching distance of 0.38, say, means that 38% of the data points lie in different clusters. In our spectral clustering experiment, we could observe that the clusterings obtained by spectral clustering are usually very close to the theoretically optimal hyperplane splits predicted by theory (the minimal matching distances to the optimal hyperplane splits were always in the order of 0.03 or smaller). As predicted by theory, both kinds of graph give different cuts in the data. An illustration of this phenomenon for the case of dimension 2 can be found in Figure 3. To give a quantitative evaluation of this phenomenon, we computed the mean minimal matching distances between clusterings obtained by the same type of graph over the different samples (denoted dkNN and dr), and the mean difference dkNN −r between the clusterings obtained by different graph types: Example dkNN dr dkNN −r 1 dim 0.00039 ± 0.0005 0.0005 ± 0.00045 0.32 ± 0.012 2 dim 0.0029 ± 0.0013 0.0005 ± 0.0005 0.48 ± 0.045 We can see that for the same graph, the clustering results are very stable (differences in the order of 10−3) whereas the differences between the kNN graph and the r-neighborhood graph are substantial (0.32 and 0.48, respectively). This difference is exactly the one induced by assigning the middle mode of the density to different clusters, which is the effect predicted by theory. It is tempting to conjecture that these effects might be due to the fact that the number of Gaussians and the number of clusters we are looking for do not 0. But this is not the case: for a sum of two 6 −1 0 1 2 0 0.5 1 Density example 1 −2 −1 0 1 2 0 0.5 1 Density example 2 (informative dimension only) Figure 1: Densities in the examples. In the two-dimensional case, we plot the informative dimension (marginal over the other dimensions) only. The dashed blue vertical line depicts the optimal limit cut of the r-graph, the solid red vertical line the optimal limit cut of the kNN graph. −2 0 2 0 10 20 NCut of hyperplanes, kNN graph, d=1, n=2000, k=30 emp pred −2 0 2 0 10 20 NCut of hyperplanes, kNN graph, d=2, n=2000, k=100 emp pred −2 0 2 0 10 20 Ncut of hyperplanes, r−graph, d=1, n=2000, r=0.1 emp pred −2 0 2 0 10 20 Ncut of hyperplanes, r−graph, d=2, n=2000, r=0.3 emp pred Figure 2: Ncut values for hyperplanes: theoretical predictions (dashed) and empirical means (solid). The optimal cut is indicated by the dotted line. The top row shows the results for the kNN graph, the bottom row for the r-graph. In the left column the result for one dimension, in the right column for two dimensions. Gaussians in one dimension with means 0.2 and 0.4, variances 0.05 and 0.03, weights 0.8 and 0.2, and a threshold of 0.1 the same effects can be observed. Finally, we conducted an experiment similar to the last one on two real data sets (breast cancer and heart from the Data Repository by G. R¨atsch). Here we chose the parameters k = 20 and r = 3.2 for breast cancer and r = 4.3 for heart (among the parameters we tried, these were the parameters where the results were most stable, that is where dkNN and dr were minimal). Then we ran spectral clustering on different subsamples of the data sets (n = 200 for breast cancer, n = 170 for heart). To evaluate whether our clusterings were any useful at all, we computed the minimal matching distance between the clusterings and the true class labels and obtained distances of 0.27 for the r-graph and 0.44 for the kNN graph on breast cancer and 0.17 and 0.19 for heart. These results are reasonable (standard classifiers lead to classification errors of 0.27 and 0.17 on these data sets). Moreover, to exclude other artifacts such as different cluster sizes obtained with the kNN or r-graph, we also computed the expected random distances between clusterings, based on the actual cluster sizes we obtained in the experiments. We obtained the following table: Example dkNN rand. dkNN dr rand. dr dkNN −r rand. dkNN −r breast canc. 0.13 ± 0.15 0.48 ± 0.01 0.40 ± 0.10 0.22 ± 0.01 0.40 ± 0.10 0.44 ± 0.01 heart 0.06 ± 0.02 0.47 ± 0.02 0.06 ± 0.02 0.44 ± 0.02 0.07 ± 0.03 0.47 ± 0.02 We can see that in the example of breast cancer, the distances dkNN and dr are much smaller than the distance dkNN −r. This shows that the clustering results differ considerably between the two kinds of graph (and compared to the expected random effects, this difference does not look random at all). For heart, on the other side, we do not observe significant differences between the two graphs. This experiment shows that for some data sets a systematic difference between the clusterings based on different graph types exists. But of course, such differences can occur for many reasons. The 7 −2 −1 0 1 2 −1.5 −1 −0.5 0 0.5 1 1.5 r−graph, n=2000, r=0.3 −2 −1 0 1 2 −1.5 −1 −0.5 0 0.5 1 1.5 kNN graph, n=2000, k=100 Figure 3: Results of spectral clustering in two dimensions, for r-graph (left) and kNN graph (right) different limit results might just be one potential reason, and other reasons might exist. But whatever the reason is, it is interesting to observe these systematic differences between graph types in real data. 5 Discussion In this paper we have investigated the influence of the graph construction on graph-based clustering measures such as the normalized cut. We have seen that depending on the type of graph, the Ncut criterion converges to different limit results. In our paper, we computed the exact limit expressions for the r-neighborhood graph and the kNN graph. 2, yet a different limit result for a complete graph using Gaussian weights exists in the literature (Narayanan et al., 2007). The fact that all these different graphs lead to different clustering criteria shows that these criteria cannot be studied isolated from the graph they will be applied to. From a theoretical side, there are several directions in which our work can be improved. Some technical improvements concern using the symmetric instead of the directed kNN graph, and adding weights to the edges. In the supplement (Maier et al., 2008) we also prove rates of convergence for our results. It would be interesting to use these to determine an optimal choice of the connectivity parameter k or r of the graphs (we have already proved such results in a completely different graph clustering setting, cf. Maier et al., 2007). Another extension which does not look too difficult is obtaining uniform convergence results. Here one just has to take care that one uses a suitably restricted class of candidate surfaces S (note that uniform convergence results over the set of all partitions of Rd are impossible, cf. von Luxburg et al., 2008). For practice, it will be important to study how the different limit results influence clustering results. So far, we do not have much intuition about when the different limit expressions lead to different optimal solutions, and when these solutions will show up in practice. The examples we provided above already show that different graphs indeed can lead to systematically different clusterings in practice. Gaining more understanding of this effect will be an important direction of research if one wants to understand the nature of different graph clustering criteria. References Data Repository by G. R¨atsch. http://ida.first.fraunhofer.de/projects/bench/benchmarks.htm. M. Maier, M. Hein, and U. von Luxburg. Cluster identification in nearest-neighbor graphs. In M.Hutter, R. Servedio, and E. Takimoto, editors, Proceedings of the 18th Conference on Algorithmic Learning Theory, volume 4754 of Lecture Notes in Artificial Intelligence, pages 196–210. Springer, Berlin, 2007. Markus Maier, Ulrike von Luxburg, and Matthias Hein. Influence of graph construction on graph-based quality measures - technical supplement. http://www.kyb.mpg.de/bs/people/mmaier/nips08supplement.html, 2008. Hariharan Narayanan, Mikhail Belkin, and Partha Niyogi. On the relation between low density separation, spectral clustering and graph cuts. In NIPS 20, 2007. J. Shi and J. Malik. Normalized cuts and image segmentation. IEEE Transactions on Pattern Analysis and Machine Intelligence, 22(8):888–905, 2000. U. von Luxburg. A tutorial on spectral clustering. Statistics and Computing, 17(4):395 – 416, 2007. U. von Luxburg, S. Bubeck, S. Jegelka, and M. Kaufmann. Consistent minimization of clustering objective functions. In NIPS 21, 2008. 8
2008
23
3,487
Playing Pinball with non-invasive BCI Michael W. Tangermann Machine Learning Laboratory Berlin Institute of Technology Berlin, Germany schroedm@cs.tu-berlin.de Matthias Krauledat Machine Learning Laboratory Berlin Institute of Technology Berlin, Germany kraulem@cs.tu-berlin.de Konrad Grzeska Machine Learning Laboratory Berlin Institute of Technology Berlin, Germany konradg@cs.tu-berlin.de Max Sagebaum Machine Learning Laboratory Berlin Institute of Technology Berlin, Germany max.sagebaum@first.fraunhofer.de Carmen Vidaurre Machine Learning Laboratory Berlin Institute of Technology Berlin, Germany vidcar@cs.tu-berlin.de Benjamin Blankertz Machine Learning Laboratory Berlin Institute of Technology Berlin, Germany blanker@cs.tu-berlin.de Klaus-Robert M¨uller Machine Learning Laboratory, Berlin Institute of Technology, Berlin, Germany krm@cs.tu-berlin.de Abstract Compared to invasive Brain-Computer Interfaces (BCI), non-invasive BCI systems based on Electroencephalogram (EEG) signals have not been applied successfully for precisely timed control tasks. In the present study, however, we demonstrate and report on the interaction of subjects with a real device: a pinball machine. Results of this study clearly show that fast and well-timed control well beyond chance level is possible, even though the environment is extremely rich and requires precisely timed and complex predictive behavior. Using machine learning methods for mental state decoding, BCI-based pinball control is possible within the first session without the necessity to employ lengthy subject training. The current study shows clearly that very compelling control with excellent timing and dynamics is possible for a non-invasive BCI. 1 Introduction Brain computer interfaces (BCI) have seen a rapid development towards faster and more userfriendly systems for thought-based control of devices such as video games, wheel chairs, robotic devices etc. While a full control of even complex trajectories has become possible for invasive BCIs [1, 2, 3], non-invasive EEG-based systems have been considered hardly able to provide such high information transfer rates between man and machine [4, 5]. This paper will show evidence that real-time BCI control of a machine is possible with little subject training. The machine studied (a standard pinball machine, see Fig. 1 requires only two classes for control but a very fast and precise reaction; predictive behavior and learning are mandatory. We 1 consider it a formidable platform for studying timing and dynamics of brain control in real-time interaction with a physical machine. Furthermore this paradigm is well suited for future investigations of mental states during complex real-time tasks and decision-making processes. Figure 1: Left: pinball machine used for the present study. Middle: Close look at the build-in gadgets of the play field. Right: Zoom into the modified parts of the play field (side walls and central bump). Compared to highly controlled and simplified lab settings, a pinball machine provides flow (according to the definition in [6]), a rich and complex feedback, acoustic and visual distractors, and a challenging behavioral task. These components are well-known ingredients for engaging and immersive game environments [7]. In case of the pinball machine model used in this study, this receives further evidence from the high sales figures that have made the Addams Family model the all-time popular pinball machine. Given the reaction-time critical pinball game and the intrinsic delays imposed on the subjects by the BCI technology, it is very interesting to observe that subjects can manage to control and maintain the necessary timing and dynamics. The prediction of upcoming game situations and behavioral adaptation to the machine and BCI constraints are necessary ingredients to master this difficult task. The following Sections Sec. 2 and Sec. 3 briefly introduce the used motor paradigm, spatial filter methods, the experimental paradigm, the decoding and machine learning techniques used, Sec. 4 provides the statistics and results, and finally a brief discussion is given in section Sec. 5. 2 Background 2.1 Neurophysiology Macroscopic brain activity during resting wakefulness contains distinct rhythms located over various brain areas. Sensorimotor cortices show rhythmic macroscopic EEG oscillations (µ-rhythm or sensorimotor rhythm, SMR), with spectral peak energies of about 8–14 Hz (α-band) and/or 16–28 Hz (β-band) localized in the motor and somatosensory cortex ([8]). A large class of EEG-based BCI systems relies on the fact that amplitude modulations of sensorimotor rhythms can be caused, e.g. by imagining movements. For example, the power of the µ-rhythm decreases during imagined hand movements in the corresponding representation area which is located in the contralateral sensorimotor cortex. This phenomenon is called event-related desynchronization (ERD, [9, 10]), while the increase of band power is termed event-related synchronization (ERS). This may be observed, e.g., during motor imagery over flanking sensorimotor areas, possibly reflecting an ‘surround inhibition’ enhancing focal cortical activation, see [11, 10]. The exact location and the exact frequency band of the sensorimotor rhythm is subject-specific. Hence indi2 vidually optimized filters can increase the signal-to-noise ratio dramatically [12]. To this end, the CSP technique has proven to be useful. 2.2 Common Spatial Pattern (CSP) Analysis Common Spatial Pattern and its extensions (e.g. [13, 14, 15, 16, 12]) is a technique to analyze multi-channel data based on recordings from two classes (conditions). It is used e.g. in BCI systems based on the modulation of brain rhythms. CSP yields a data-driven supervised decomposition of the signal parameterized by a matrix W ∈IRC×C0 (C being the number of channels; C0 ≤C) that projects the signal x(t) ∈IRC in the original sensor space to xCSP(t) ∈IRC0, which lives in the surrogate sensor space, as follows: xCSP(t) = W⊤x(t). Each column vector of W represents a spatial filter. In particular CSP filters maximize the EEG signal’s variance under one condition while simultaneously minimizing it for the other condition. Since variance of band-pass filtered signals is equal to band power, CSP analysis is applied to band-pass filtered signals in order to obtain an effective discrimination of mental states that are characterized by ERD/ERS effects (see above). In the example of left vs. right hand motor imagery, the CSP algorithm will find two groups of spatial filters. The first will show high band power during left hand motor imagery and low band power during right hand motor imagery, and the second vice versa. Let Σi be the covariance matrix of the trial-concatenated matrix of dimension [C × T] (where C is the number of electrodes and T is the number of concatenated samples) belonging to the respective class i ∈{1, 2}. The CSP analysis consists of calculating a matrix W ∈IRC×C and a diagonal matrix D with elements in [0, 1] such that W⊤Σ1W = D and W⊤Σ2W = I −D (1) where I ∈IRC×C is the identity matrix. This can be solved as a generalized eigenvalue problem. The projection that is given by the i-th column of matrix W has a relative variance of di (i-th element of D) for trials of class 1 and relative variance 1 −di for trials of class 2. If di is near 1, the filter given by the i-th column of W (i.e., the ith spatial filter) maximizes the variance for class 1, and since 1 −di is near 0, it also minimizes the variance for class 2. Typically one would retain projections corresponding to two or three of the highest eigenvalues di, i.e., CSP filters for class 1, and projections corresponding to the two or three lowest eigenvalues, i.e., CSP filters for class 2. For a detailed review of the CSP technique with respect to the application in BCI see [12]. 3 Experiment 3.1 Paradigm Standard EEG lab experiments typically realize an environment that avoids distractions in order to have maximum control over all parameters of the experiment. Since the subjects respond to a small number of artificial stimuli, a stimulus-locked averaging reveals the average characteristics of their brain response. If we are interested in understanding broader behavioral brain responses in cognitively demanding natural environments then stimulus/response-locked averaging may no longer be easily possible. The complexity in interaction may be caused by (1) a large number of possibilities to respond, (2) a large spread in response times and quality due to a rich environment (e.g. real objects that have a variety of physical properties), (3) a changing environment where the underlying nonstationarity is caused by a large number of states, and possibly by even more, but unknown influencing factors. While the first steps towards complex paradigms use simulators that show an increased complexity but still allow complete introspection into the system state, it is evident that the interaction with real physical devices has an even higher complexity but also provides a rich multi-modal sensory experience for the user. However, gaining even only partial introspection into the system states of complex physical devices and into the interaction processes between the system and the mental processes of the user requires a huge effort. Here modern machine learning and signal processing methods (e.g. [17, 18, 19, 20]) are helpful, since they have been developed to analyze EEG on a single trial basis (e.g. [21, 22]). They can adapt 3 to changing signal characteristics (e.g. [23, 24, 25]) and they can deal with missing and noisy data [26, 27] – even beyond the field of computational neuroscience and BCI [28]. 3.2 Setup In this study seven subjects played with the pinball machine. They were known for well-classifiable EEG signals in simple BCI applications. One subject played successfully and enjoyed it, but was excluded from further analysis as his/her games had not been video-taped. From the remaining six subjects, three managed to acquire good control, played very successfully and enjoyed this experience. One subject managed to get limited control and reported to enjoy the games although some of his/her scores were close to chance. The performance of these four subjects was measured in a rigorous manner. The remaining two subjects could not establish reliable control and were also excluded from further analysis. An overview of the technical setup and the data processing steps involved is given by Fig. 2. The experiment was organized in several stages: the calibration of the BCI system (Sec. 3.3), the fine-tuning of parameters in a simple cursor feedback paradigm (Sec. 3.4), the application of the BCI control system during pinball games (Sec. 3.5), the pseudo-random control of pinball games (Sec. 3.6), and ball insertions without any paddle activity (Sec. 3.7). Filter (FQ / spatial) Classifier Low-level controller Amplifier / Digitizer Paddle control signal EEG Player Feedback Figure 2: Schematic view of the BCI-controlled pinball machine. The user’s EEG signals upon motor imagery are amplified, digitized, filtered in the frequency domain and the spatial domain by CSP. Band power features are extracted and classified. The classifier output is translated by a low-level controller into paddle movements. 3.3 Calibration of the BCI system The BCI system was calibrated individually for each of the subjects (VPMa, VPks, VPzq, VPlf) to discriminate two classes of motor imagery (left hand and right hand). The calibration procedure followed a standard Berlin BCI (BBCI) paradigm based on spatial filters and oscillatory features that avoids and prevents the use of class-correlated EOG or EMG artefacts (see [29, 28] for details). Visualizing the spatial filters and the resulting patterns of activity showed that EOG or EMG components were disregarded for the calibration of the BCI system. For the calibration, 100 (VPMa) or 75 (VPks, VPzq, VPlf) trials of motor imagery were collected for each class. For every trial of 4–5s duration, the class of the motor imagery was indicated on a computer screen by visual cues. The calibration procedure included the determination of a subject-specific frequency band for the mu-rhythm (see Sec. 2.1), filtering the 64-channel EEG-data to this band, the determination of classdiscriminant spatial filters with Common Spatial Pattern (CSP, see Sec. 2.2), and the training of a regularized linear classification method (LDA) based on the power features of the filtered data. All subjects showed a crossvalidation error below 10% on the calibration data. 3.4 Cursor feedback control by BCI The bias of the classifier, a gain factor and thresholds for an idle-class (for classifier outputs close to the decision plane) were adapted during a short control task running on a computer screen. The subject had to control a horizontally moving cursor to a target on the left or right side of the screen 4 for approximately 2 minutes while fixating a cross in the center. During this procedure the above mentioned parameters were fine-tuned according to the test persons’s ratings. The goals were to determine parameter values that translate the classifier output to a suitable range for the final application and – for the test persons – to reach a subjective feeling of control. For an exhaustive study on the role of bias adaptation in BCI, especially in the context of changing from calibration to feedback, see [30, 24]. 3.5 Pinball control by BCI A real, physical pinball machine (in our study an Addams Family model) needs good control in terms of classification accuracy and timing (dynamics). The subject has to learn the physical properties of the machine to play well. The subject’s expectation needs to be trained as bumpers, magnets like ”The Power” and many other built-in sources of surprise (see middle image in Fig. 1) can cause the ball to go into rather unpredictable directions. This interaction with the pinball machine makes the game interesting and challenging. Fast brain dynamics that participate in the eye-hand coordination and visual memory play an essential role to cope with these difficulties. The task difficulty increases further, as with any game, there is a strong emotional engagement of the subject which gives rise to non-stationarities in the statistics. Moreover the physical machine is very noisy and distracting due to its various sources of visual and auditory stimulation, and only a small percentage of these stimulations is task relevant. Three modifications were implemented in order to reduce the frequency of manual ball launches (1 and 3) and to increase the frequency of balls passing the paddle areas (1 and 2). While the original character of the game was not changed, the modifications introduced slight simplification to conduct the experiment. The right image of Fig. 1 depicts the modifications: 1. side limits that prevents balls from exiting without passing the paddles 2. a soft central bump in front of the paddles that biases balls to pass one of the paddles rather than exiting in a perfect vertical trajectory. This is necessary, as the classifier output could not activate both paddles at exactly the same time. 3. a reduced slope of the game field (about half the original slope), that somewhat slows down the game speed. During the BCI-controlled gaming (”bci” control mode), the subject sat in front of the pinball machine, hands resting on the arm rests except for short times when new balls had to be launched with the pulling lever. The EEG signals recorded in the previous 500ms were translated by the BCI system into a control signal. A simple low-level control mechanism was implemented in software that translated the continuous classifier output by thresholding into a three-class signal (left flipper, idle, right flipper) using the thresholds pre-determined during the cursor control (see Sec. 3.4). Furthermore it introduced a logic that translated a very long lasting control signal for the left or right class into a hold-and-shoot mechanism. This allowed the user to catch slow balls rolling sideways down towards a paddle. The user played several games of 10 to 12 balls each. Performance was observed in terms of the playing time per ball, the score per game and the number of high-quality shots. The latter were defined by the presence of one of the following two conditions, which have been evaluated in an offline video analysis of the game: (1) a precisely timed shot that hit the ball by the center of the paddle and drives it into one of the scoring zones of the lower half of the field and (2) a precisely timed shot that drives the ball directly into the upper half of the field. 3.6 Pseudo random control mode This ”rand” control mode was incorporated into the experimental setup in order to deliver a fair performance baseline. Here, the BCI system was up and running with the same settings as in the BCI-controlled pinball game, but no player was present. Instead an EEG file previously recorded during the BCI-controlled pinball game was fed into the BCI system and generated the control signal for the pinball machine. These signals produced the same statistics of paddle movements as in the real feedback setting. But as the balls were launched at random time points, the paddle behavior was not synchronized with the ball positions. Therefore, the pseudo random control mode marks 5 the chance level of the system. In this mode several games of 10-12 balls each were performed. The same performance measures were applied as for BCI-controlled gaming. 3.7 No control mode For performance comparisons, two performance ratings (time per ball and points per game) were also taken for a series of balls that were launched without any paddle movements (”none” control mode). 4 Results As video recordings have been available for the four subjects, a detailed analysis of the game performances was possible. It is introduced for the example of the best subject VPMa in Fig. 3. The analysis compares three different scoring measures for BCI control (bbci), pseudo-random control (rand) and no control (none) and shows the histogram of high-quality shots per ball. The average rand none Control Mode n=112 n=22 bbci rand none 0 1 2 3 4 5 6 7 Quality Shots per Ball Control Mode n=81 n=112 n=22 Performance Comparison Subject VPMa bbci rand none 0 10 20 30 40 Million Points per Game Control Mode n=10 n=10 n=12 bbci 0 10 20 30 40 50 60 Ball Duration [s] n=81 High-Quality Shots per Ball 0 1 2 3 4 5 6 7 0 10 20 30 40 50 60 70 Percentage bci control rand control normalized histograms of Figure 3: Performance comparison for three control modes of the pinball machine and the normalized histograms of high-quality shots per ball for subject VPMa. ball duration (median) is significantly higher for the BCI-controlled gaming (average of 15s over 81 balls) than for the pseudo-random control (average of 8s over 112 balls). A confidence interval is reflected by the notches above and below the median values in the boxplot of Fig. 3. Boxes whose notches do not overlap indicate that the medians of the two groups differ at the 5% significance level. The increased average ball duration under BCI control is caused by the larger number of highquality shots per ball. While in pseudo-random control only 7% of the balls scored more than one high-quality shot per ball, this rate raises drastically to 45% for the BCI control of subject VPMa. A comparison of the game scores for 10 games of BCI control and 10 games of pseudo-random control shows, that these differ even stronger due to the nonlinear characteristic of the score. The rightmost plot in Fig. 3 shows the normalized histograms of the high-quality shots. The pooled data of all four subjects in Fig. 4 reflects these performance differences to a large extend. Again, BCI control is significantly superior to the pseudo random control. The difference in normalized histograms between BCI control and pseudo random control reveals, that even for the pooled data BCI-controlled games more often have a larger number of high-quality shots. Not surprisingly, the BCI-controlled games showed a number of paddle movements in moments, when no ball was in the vicinity of the paddles. These so-called false hits are indirectly reflected in the performance measures for the pseudo-random control. As pseudo-random control mode was able to gain significantly better results than no control at all (see e.g. modes rand and none in Fig. 3), these false hits can not be neglected. In order to study this issue, the pseudo-random control was based on an EEG file, which had been previously recorded during the BCI-controlled gaming, the dynamics of the paddle movements was identical during both of these control modes. Under these very similar conditions, the higher scores of the BCI control must be credited to the control ability of the BCI user, especially to the precise timing of a large number of paddle shots. A video of the gaming performance which provides an impression of the astonishing level of timing and dynamical control – much better than the figures can show – is available under http://www. bbci.de/supplementary/. It should be added that for this experiment it was very easy to recruit highly motivated subjects, who enjoyed the session. 6 rand none Control Mode Performance Comparison Four Subjects bbci rand none Control Mode bbci 0 10 20 30 40 50 60 Ball Duration [s] High-Quality Shots per Ball 0 1 2 3 4 5 6 7 -15 -10 -5 0 5 10 Percentage 0 10 20 30 40 Million Points per Game n=42 n=43 n=42 n=543 n=346 n=490 Difference of normalized histograms: (bci control) - (rand control) Figure 4: Performance comparison for combined data of four subjects (VPMa, VPks, VPzq, VPlf). 5 Discussion To date, BCI is mainly perceived as an opportunity for the disabled to regain interaction with their environment, say, through BCI actuated spelling or other forms of BCI control. The present study is relevant to rehabilitation since it explores the limits of BCI with respect to timing, dynamics and speed of interaction in a difficult real-time task. We would, however, like to re-iterate to consider machine learning methods developed in BCI also as novel powerful tools for the neurosciences – not only when operated invasively for harvesting on local field potentials (LFP) and on micro electrode array data [1, 2, 3] or for decoding functional MRI [31] – but also for non-invasive, low-risk EEG-BCI. An important novel aspect of our study was to analyze EEG recorded during predictive behavior, in other words we made use of the subject’s expectation and experience of the system delay. Learning curves and traces of adaptation on the subject side, the use of error potentials as well as emerging subject specific strategy differences and many other exciting question must remain untouched in this first study. Emotion, surprise and other mental states or cognitive processes that play an important role in such complex real-time paradigms still await their consideration in future studies. Acknowledgments We thank Brain Products GmbH for funding and for help with the preparation of the pinball machine. Funding by the European Community under the PASCAL Network of Excellence (IST2002-506778) and under the FP7 Programme (TOBI ICT-2007-224631), by the Bundesministerium f¨ur Bildung und Forschung (BMBF) (FKZ 01IBE01A and FKZ 16SV2231) and by the Deutsche Forschungsgemeinschaft (DFG) (VitalBCI MU 987/3-1) is gratefully acknowledged. Last but not least, we would like to thank our reviewers for their valuable comments. References [1] J. M. Carmena, M. A. Lebedev, R. E. Crist, J. E. O’Doherty, D. M. Santucci, D. F. Dimitrov, P. G. Patil, C. S. Henriquez, and M. A. Nicolelis. Learning to control a brain-machine interface for reaching and grasping by primates. PLoS Biol, E42, 2003. [2] D. M. Taylor, S. I. Tillery, and A. B. Schwartz. Direct cortical control of 3D neuroprosthetic devices. Science, 296:1829–1832, 2002. [3] L.R. Hochberg, M.D. Serruya, G.M. Friehs, J.A. Mukand, M. Saleh, A.H. Caplan, A. Branner, D. Chen, R.D. Penn, and J.P. Donoghue. Neuronal ensemble control of prosthetic devices by a human with tetraplegia. Nature, 442(7099):164–171, July 2006. [4] J. R. Wolpaw and D. J. McFarland. Control of a two-dimensional movement signal by a noninvasive brain-computer interface in humans. Proc Natl Acad Sci USA, 101(51):17849–17854, 2004. [5] Andrea K¨ubler and Klaus-Robert M¨uller. An introduction to brain computer interfacing. In Guido Dornhege et al., editors, Toward Brain-Computer Interfacing, pages 1–25. MIT press, Cambridge, MA, 2007. [6] W. A. IJsselsteijn, H. H. Nap, Y. A. W. de Kort, K. Poels andA. Jurgelionis, and F. Bellotti. Characterizing and measuring user experiences in digital games. In Proceedings of the ACE, Salzburg, 2007. [7] C. Jennett, A. L. Cox, P. Cairns, S. Dhoparee, A. Epps, T. Tijs, and A. Walton. Measuring and defining the experience of immersion in games. International Journal of Human Computer Studies, 2008. 7 [8] H. Jasper and H.L. Andrews. Normal differentiation of occipital and precentral regions in man. Arch. Neurol. Psychiat. (Chicago), 39:96–115, 1938. [9] Gert Pfurtscheller and F.H. Lopes da Silva. Event-related EEG/MEG synchronization and desynchronization: basic principles. Clin Neurophysiol, 110(11):1842–1857, Nov 1999. [10] G. Pfurtscheller, C. Brunner, A. Schl¨ogl, and F.H. Lopes da Silva. Mu rhythm (de)synchronization and EEG single-trial classification of different motor imagery tasks. NeuroImage, 31(1):153–159, 2006. [11] C. Neuper and G. Pfurtscheller. Evidence for distinct beta resonance frequencies in human EEG related to specific sensorimotor cortical areas. Clin Neurophysiol, 112:2084–2097, 2001. [12] Benjamin Blankertz, Ryota Tomioka, Steven Lemm, Motoaki Kawanabe, and Klaus-Robert M¨uller. Optimizing spatial filters for robust EEG single-trial analysis. IEEE Signal Proc Magazine, 25(1):41–56, January 2008. [13] Keinosuke Fukunaga. Introduction to statistical pattern recognition. Academic Press, Boston, 2nd edition edition, 1990. [14] Z. J. Koles. The quantitative extraction and topographic mapping of the abnormal components in the clinical EEG. Electroencephalogr Clin Neurophysiol, 79(6):440–447, 1991. [15] Steven Lemm, Benjamin Blankertz, Gabriel Curio, and Klaus-Robert M¨uller. Spatio-spectral filters for improving classification of single trial EEG. IEEE Trans Biomed Eng, 52(9):1541–1548, 2005. [16] Guido Dornhege, Benjamin Blankertz, Matthias Krauledat, Florian Losch, Gabriel Curio, and KlausRobert M¨uller. Optimizing spatio-temporal filters for improving brain-computer interfacing. In Advances in Neural Inf. Proc. Systems (NIPS 05), volume 18, pages 315–322, Cambridge, MA, 2006. MIT Press. [17] B. Sch¨olkopf and A.J. Smola. Learning with Kernels. MIT Press, Cambridge, MA, 2002. [18] K.-R. M¨uller, S. Mika, G. R¨atsch, K. Tsuda, and B. Sch¨olkopf. An introduction to kernel-based learning algorithms. IEEE Neural Networks, 12(2):181–201, May 2001. [19] Klaus-Robert M¨uller, Charles W. Anderson, and Gary E. Birch. Linear and non-linear methods for braincomputer interfaces. IEEE Trans Neural Sys Rehab Eng, 11(2):165–169, 2003. [20] S. Haykin. Neural Networks : A Comprehensive Foundation. Macmillan, New York, 1994. [21] N.J. Hill, T. N. Lal, M. Tangermann, T. Hinterberger, G. Widman, C. E. Elger, B. Sch¨olkopf, and N. Birbaumer. Classifying event-related desynchronization in EEG, ECoG and MEG signals. In Guido Dornhege et al., editors, Toward Brain-Computer Interfacing, pages 235–260. MIT press, Cambridge, MA, 2007. [22] Benjamin Blankertz, Florian Losch, Matthias Krauledat, Guido Dornhege, Gabriel Curio, and KlausRobert M¨uller. The Berlin Brain-Computer Interface: Accurate performance from first-session in BCInaive subjects. IEEE Trans Biomed Eng, 2008. in press. [23] Matthias Krauledat, Michael Schr¨oder, Benjamin Blankertz, and Klaus-Robert M¨uller. Reducing calibration time for brain-computer interfaces: A clustering approach. In B. Sch¨olkopf, J. Platt, and T. Hoffman, editors, Advances in Neural Information Processing Systems 19, pages 753–760, Cambridge, MA, 2007. MIT Press. [24] Masashi Sugiyama, Matthias Krauledat, and Klaus-Robert M¨uller. Covariate shift adaptation by importance weighted cross validation. Journal of Machine Learning Research, 8:1027–1061, 2007. [25] Pradeep Shenoy, Matthias Krauledat, Benjamin Blankertz, Rajesh P. N. Rao, and Klaus-Robert M¨uller. Towards adaptive classification for BCI. J Neural Eng, 3(1):R13–R23, 2006. [26] Guido Dornhege, Matthias Krauledat, Klaus-Robert M¨uller, and Benjamin Blankertz. General signal processing and machine learning tools for BCI. In Guido Dornhege et al., editors, Toward Brain-Computer Interfacing, pages 207–233. MIT Press, Cambridge, MA, 2007. [27] Matthias Krauledat, Guido Dornhege, Benjamin Blankertz, and Klaus-Robert M¨uller. Robustifying EEG data analysis by removing outliers. Chaos and Complexity Letters, 2(3):259–274, 2007. [28] Klaus-Robert M¨uller, Michael Tangermann, Guido Dornhege, Matthias Krauledat, Gabriel Curio, and Benjamin Blankertz. Machine learning for real-time single-trial EEG-analysis: From brain-computer interfacing to mental state monitoring. J Neurosci Methods, 167(1):82–90, 2008. [29] Benjamin Blankertz, Guido Dornhege, Matthias Krauledat, Klaus-Robert M¨uller, and Gabriel Curio. The non-invasive Berlin Brain-Computer Interface: Fast acquisition of effective performance in untrained subjects. NeuroImage, 37(2):539–550, 2007. [30] Matthias Krauledat, Pradeep Shenoy, Benjamin Blankertz, Rajesh P. N. Rao, and Klaus-Robert M¨uller. Adaptation in CSP-based BCI systems. In Guido Dornhege et al., editors, Toward Brain-Computer Interfacing, pages 305–309. MIT Press, Cambridge, MA, 2007. [31] J.D. Haynes and G. Rees. Decoding mental states from brain activity in humans. Nature Reviews Neuroscience, 7:523–534, 2006. 8
2008
230
3,488
Logistic Normal Priors for Unsupervised Probabilistic Grammar Induction Shay B. Cohen Kevin Gimpel Noah A. Smith Language Technologies Institute School of Computer Science Carnegie Mellon University {scohen,kgimpel,nasmith}@cs.cmu.edu Abstract We explore a new Bayesian model for probabilistic grammars, a family of distributions over discrete structures that includes hidden Markov models and probabilistic context-free grammars. Our model extends the correlated topic model framework to probabilistic grammars, exploiting the logistic normal distribution as a prior over the grammar parameters. We derive a variational EM algorithm for that model, and then experiment with the task of unsupervised grammar induction for natural language dependency parsing. We show that our model achieves superior results over previous models that use different priors. 1 Introduction Unsupervised learning of structured variables in data is a difficult problem that has received considerable recent attention. In this paper, we consider learning probabilistic grammars, a class of structure models that includes Markov models, hidden Markov models (HMMs) and probabilistic context-free grammars (PCFGs). Central to natural language processing (NLP), probabilistic grammars are recursive generative models over discrete graphical structures, built out of conditional multinomial distributions, that make independence assumptions to permit efficient exact probabilistic inference. There has been an increased interest in the use of Bayesian methods as applied to probabilistic grammars for NLP, including part-of-speech tagging [10, 20], phrase-structure parsing [7, 11, 16], and combinations of models [8]. In Bayesian-minded work with probabilistic grammars, a common thread is the use of a Dirichlet prior for the underlying multinomials, because as the conjugate prior for the multinomial, it bestows computational feasibility. The Dirichlet prior can also be used to encourage the desired property of sparsity in the learned grammar [11]. A related widely known example is the latent Dirichlet allocation (LDA) model for topic modeling in document collections [5], in which each document’s topic distribution is treated as a hidden variable, as is the topic distribution from which each word is drawn.1 Blei and Lafferty [4] showed empirical improvements over LDA using a logistic normal distribution that permits different topics to correlate with each other, resulting in a correlated topic model (CTM). Here we aim to learn analogous correlations such as: a word that is likely to take one kind of argument (e.g., singular nouns) may be likely to take others as well (e.g., plural or proper nouns). By permitting such correlations via the distribution over the 1A certain variant of LDA can be seen as a Bayesian version of a zero-order HMM, where the unigram state (topic) distribution is sampled first for each sequence (document). μk ∑k ηk θk y x K N K Figure 1: A graphical model for the logistic normal probabilistic grammar. y is the derivation, x is the observed string. parameters, we hope to break independence assumptions typically made about the behavior of different part-of-speech tags. In this paper, we present a model, in the Bayesian setting, which extends CTM for probabilistic grammars. We also derive an inference algorithm for that model, which is ultimately used to provide a point estimate for the grammar, permitting us to perform fast and exact inference. This is required if the learned grammar is to be used as a component in an application. The rest of the paper is organized as follows. §2 gives a general form for probabilistic grammars built out of multinomial distributions. §3 describes our model and an efficient variational inference algorithm. §4 presents a probabilistic context-free dependency grammar often used in unsupervised natural language learning. Experimental results showing the competitiveness of our method for estimating that grammar are presented in §5. 2 Probabilistic Grammars A probabilistic grammar defines a probability distribution over a certain kind of structured object (a derivation of the underlying symbolic grammar) explained through step-by-step stochastic process. HMMs, for example, can be understood as a random walk through a probabilistic finite-state network, with an output symbol sampled at each state. PCFGs generate phrase-structure trees by recursively rewriting nonterminal symbols as sequences of “child” symbols (each itself either a nonterminal symbol or a terminal symbol analogous to the emissions of an HMM). Each step or emission of an HMM and each rewriting operation of a PCFG is conditionally independent of the others given a single structural element (one HMM or PCFG state); this Markov property permits efficient inference. In general, a probabilistic grammar defines the joint probability of a string x and a grammatical derivation y: p(x, y | θ) = K Y k=1 Nk Y i=1 θfk,i(x,y) k,i = exp K X k=1 Nk X i=1 fk,i(x, y) log θk,i (1) where fk,i is a function that “counts” the number of times the kth distribution’s ith event occurs in the derivation. The parameters θ are a collection of K multinomials ⟨θ1, ..., θK⟩, the kth of which includes Nk events. Note that there may be many derivations y for a given string x—perhaps even infinitely many in some kinds of grammars. HMMs and vanilla PCFGs are the best known probabilistic grammars, but there are others. For example, in §5 we experiment with the “dependency model with valence,” a probabilistic grammar for dependency parsing first proposed in [14]. 3 Logistic Normal Prior on Probabilistic Grammars A natural choice for a prior over the parameters of a probabilistic grammar is a Dirichlet prior. The Dirichlet family is conjugate to the multinomial family, which makes the inference more elegant and less computationally intensive. In addition, a Dirichlet prior can encourage sparse solutions, a property which is important with probabilistic grammars [11]. However, in [4], Blei and Lafferty noticed that the Dirichlet distribution is limited in its expressive power when modeling a corpus of documents, since it is less flexible about capturing relationships between possible topics. To solve this modeling issue, they extended the LDA model to use a logistic normal distribution [2] yielding correlated topic models. The logistic normal distribution maps a d-dimensional multivariate Gaussian to a distribution on the d-dimensional probability simplex, Sd = {⟨z1, ..., zd⟩∈Rd : zi ≥0, Pd i=1 zi = 1}, by exponentiating the normally-distributed variables and normalizing. Here we take a step analogous to Blei and Lafferty, aiming to capture correlations between the grammar’s parameters. Our hierarchical generative model, which we call a logisticnormal probabilistic grammar, generates a sentence and derivation tree ⟨x, y⟩as follows (see also Fig. 1): 1. Generate ηk ∼N(µk, Σk) for k = 1, ..., K. 2. Set θk,i = exp(ηk,i) .PNk i′=1 exp(ηk,i′) for k = 1, ..., K and i = 1, ..., Nk. 3. Generate x and y from p(x, y | θ) (i.e., sample from the probabilistic grammar). We now turn to derive a variational inference algorithm for the model.2 Variational Bayesian inference seeks an approximate posterior function q(η, y) which maximizes a lower bound (the negated variational free energy) on the log-likelihood [12], a bound which is achieved using Jensen’s inequality: log p(x, y | µ, Σ) ≥PK i=1 Eq [log p(ηi | µi, Σi)] + Eq [log p(x, y | η)] + H(q) (2) We make a mean-field assumption, and assume that the posterior has the following form: q(η, y) = QK k=1 QNk i=1 q(ηk,i | ˜µk,i, ˜σ2 k,i)  × q(y) (3) where q(ηk,i | ˜µk,i, ˜σ2 k,i) is a Gaussian N(˜µk,i, ˜σ2 k,i). Unfolding the expectation with respect to q(y) in the second term in Eq. 2, while recalling that θ is a deterministic function of η, we have that: Eq [log p(x, y | η)] = Eq(η) hPK k=1 PNk i=1 P y q(y)fk,i(x, y) | {z } ˜ fk,i log θk,i i = Eq(η) hPK k=1 PNk i=1 ˜fk,i  ηk,i −log PNk i′=1 exp ηk,i′ i (4) where ˜fk,i is the expected number of occurrences of the ith event in distribution k, under q(y).3 The logarithm term in Eq. 4 is problematic, so we follow [4] in approximating it with a first-order Taylor expansion, introducing K more variational parameters ˜ζ1, ..., ˜ζK: log PNk i′=1 exp ηk,i′  ≤log ˜ζk −1 + 1 ˜ζk PNk i′=1 exp ηk,i′ (5) We now have Eq[log p(x, y | η)] ≥ Eq(η) hPK k=1 PNk i=1 ˜fk,i  ηk,i −log ˜ζk + 1 −1 ˜ζk PNk i′=1 exp ηk,i′ i (6) = PK k=1 PNk i=1 ˜fk,i  ˜µk,i −log ˜ζk + 1 −1 ˜ζk PNk i′=1 exp  ˜µk,i + ˜σ2 k,i 2  | {z } ˜ ψk,i = PK k=1 PNk i=1 ˜fk,i ˜ψk,i (7) 2We note that variational inference algorithms have been successfully applied to grammar learning tasks, for example, in [16] and [15]. 3With probabilistic grammars, this quantity can be computed using a summing dynamic programming algorithm like the forward-backward or inside-outside algorithm. Note the shorthand ˜ψk,i to denote an expression involving ˜µ, ˜σ, and ˜ζ. The final form of our bound is:4 log p(x, y | µ, Σ) ≥ PK k=1 Eq [log p(ηk | µk, Σk)]  + PK k=1 PNk i=1 ˜fk,i ˜ψk,i  + H(q) (8) Since, we are interested in EM-style algorithm, we will alternate between finding the maximizing q(η) and the maximizing q(y). Maximization with respect to q(η) is not hard, because q(η) is parametrized (see Appendix A). The following lemma shows that fortunately, finding the maximizing q(y), which we did not parametrize originally, is not hard either: Lemma 1. Let r(y | x, e ˜ ψ) denote the conditional distribution over y given x defined as: r(y | x, e ˜ ψ) = 1 Z( ˜ ψ) QK k=1 QNk i=1 exp ˜ψk,ifk,i(x, y) (9) where Z( ˜ ψ) is a normalization constant. Then q(y) = r(y | x, e ˜ ψ) maximizes the bound in Eq. 8. Proof. First note that H(q) = H(q(η | ˜µ, ˜σ)) + H(q(y)). This means that the terms we are interested in maximizing from Eq. 8 are the following, after writing down ˜fk,i explicitly: L = argmax q(y) P y q(y) PK k=1 PNk i=1 fk,i(x, y) ˜ψk,i  + H(q(y)) (10) However, note that: L = argmin q(y) DKL(q(y)∥r(y | x, e ˜ ψ)) (11) where DKL denotes the KL divergence. To see that, combine the definition of KL divergence with the fact that PK k=1 PNk i=1 fk,i(x, y) ˜ψk,i −log Z( ˜ ψ) = log r(y | x, e ˜ ψ) where log Z( ˜ ψ) does not depend on q(y). Eq. 11 is minimized when q = r. Interestingly, from the above lemma, the minimizing q(y) has the same form as the probabilistic grammar in discussion, only without having sum-to-one constraints on θ (leading to the required normalization constant). As in classic EM with probabilistic grammars, we never need to represent q(y) explicitly; we need only ˜f, which can be calculated as expected feature values under r(y | x, e ˜ ψ) using dynamic programming. As noted, we are interested in a point estimate of θ. To achieve this, we will use the above variational method within an EM algorithm that estimates µ and Σ in empirical Bayes fashion, then estimates θ as µ, the mean of the learned prior. In the E-step, we maximize the bound with respect to the variational parameters (˜µ, ˜σ, ˜ζ, and ˜f) using coordinate ascent. We optimize each of these separately in turn, cycling through, using appropriate optimization algorithms for each (conjugate gradient for ˜µ, Newton’s method for ˜σ, a closed form for ˜ζ, and dynamic programming to solve for ˜f). In the M-step, we apply maximum likelihood estimation with respect to µ and Σ given sufficient statistics gathered from the variational parameters in the E-step. The full algorithm is given in Appendix A. 4 Probabilistic Dependency Grammar Model Dependency grammar [19] refers to linguistic theories that posit graphical representations of sentences in which words are vertices and the syntax is a tree. Such grammars can be context-free or context-sensitive in power, and they can be made probabilistic [9]. Dependency syntax is widely used in information extraction, machine translation, question 4A tighter bound was proposed in [1], but we follow [4] for simplicity. x = ⟨NNP VBD JJ NNP⟩; y = NNP Patrick spoke little French NNP VBD JJ Figure 2: An example of a dependency tree (derivation y). NNP denotes a proper noun, VBD a past-tense verb, and JJ an adjective, following the Penn Treebank conventions. answering, and other natural language processing applications. Here, we are interested in unsupervised dependency parsing using the “dependency model with valence” [14]. The model is a probabilistic head automaton grammar [3] with a “split” form that renders inference cubic in the length of the sentence [6]. Let x = ⟨x1, x2, ..., xn⟩be a sentence (here, as in prior work, represented as a sequence of part-of-speech tags). x0 is a special “wall” symbol, $, on the left of every sentence. A tree y is defined by a pair of functions yleft and yright (both {0, 1, 2, ..., n} →2{1,2,...,n}) that map each word to its sets of left and right dependents, respectively. Here, the graph is constrained to be a projective tree rooted at x0 = $: each word except $ has a single parent, and there are no cycles or crossing dependencies. yleft(0) is taken to be empty, and yright(0) contains the sentence’s single head. Let y(i) denote the subtree rooted at position i. The probability P(y(i) | xi, θ) of generating this subtree, given its head word xi, is defined recursively: P(y(i) | xi, θ) = Q D∈{left,right} θs(stop | xi, D, [yD(i) = ∅]) (12) × Q j∈yD(i) θs(¬stop | xi, D, firsty(j)) × θc(xj | xi, D) × P(y(j) | xj, θ) where firsty(j) is a predicate defined to be true iffxj is the closest child (on either side) to its parent xi. The probability of the entire tree is given by p(x, y | θ) = P(y(0) | $, θ). The parameters θ are the multinomial distributions θs(· | ·, ·, ·) and θc(· | ·, ·). To follow the general setting of Eq. 1, we index these distributions as θ1, ..., θK. Figure 2 shows a dependency tree and its probability under this model. 5 Experiments Data Following the setting in [13], we experimented using part-of-speech sequences from the Wall Street Journal Penn Treebank [17], stripped of words and punctuation. We follow standard parsing conventions and train on sections 2–21,5 tune on section 22, and report final results on section 23. Evaluation After learning a point estimate θ, we predict y for unseen test data (by parsing with the probabilistic grammar) and report the fraction of words whose predicted parent matches the gold standard corpus, known as attachment accuracy. Two parsing methods were considered: the most probable “Viterbi” parse (argmaxy p(y | x, θ)) and the minimum Bayes risk (MBR) parse (argminy Ep(y′|x,θ)[ℓ(y; x, y′)]) with dependency attachment error as the loss function. Settings Our experiment compares four methods for estimating the probabilistic grammar’s parameters: EM Maximum likelihood estimate of θ using the EM algorithm to optimize p(x | θ) [14]. EM-MAP Maximum a posteriori estimate of θ using the EM algorithm and a fixed symmetric Dirichlet prior with α > 1 to optimize p(x, θ | α). Tune α to maximize the likelihood of an unannotated development dataset, using grid search over [1.1, 30]. 5Training in the unsupervised setting for this data set can be expensive, and requires running a cubic-time dynamic programming algorithm iteratively, so we follow common practice in restricting the training set (but not development or test sets) to sentences of length ten or fewer words. Short sentences are also less structurally ambiguous and may therefore be easier to learn from. VB-Dirichlet Use variational Bayes inference to estimate the posterior distribution p(θ | x, α), which is a Dirichlet. Tune the symmetric Dirichlet prior’s parameter α to maximize the likelihood of an unannotated development dataset, using grid search over [0.0001, 30]. Use the mean of the posterior Dirichlet as a point estimate for θ. VB-EM-Dirichlet Use variational Bayes EM to optimize p(x | α) with respect to α. Use the mean of the learned Dirichlet as a point estimate for θ (similar to [5]). VB-EM-Log-Normal Use variational Bayes EM to optimize p(x | µ, Σ) with respect to µ and Σ. Use the (exponentiated) mean of this Gaussian as a point estimate for θ. Initialization is known to be important for EM as well as for the other algorithms we experiment with, since it involves non-convex optimization. We used the successful initializer from [14], which estimates θ using soft counts on the training data where, in an n-length sentence, (a) each word is counted as the sentence’s head 1 n times, and (b) each word xi attaches to xj proportional to |i −j|, normalized to a single attachment per word. This initializer is used with EM, EM-MAP, VB-Dirichlet, and VB-EM-Dirichlet. In the case of VB-EM-Log-Normal, it is used as an initializer both for µ and inside the E-step. In all experiments reported here, we run the iterative estimation algorithm until the likelihood of a held-out, unannotated dataset stops increasing. For learning with the logistic normal prior, we consider two initializations of the covariance matrices Σk. The first is the Nk × Nk identity matrix. We then tried to bias the solution by injecting prior knowledge about the part-of-speech tags. Injecting a bias to parameter estimation of the DMV model has proved to be useful [18]. To do that, we mapped the tag set (34 tags) to twelve disjoint tag families.6 The covariance matrices for all dependency distributions were initialized with 1 on the diagonal, 0.5 between tags which belong to the same family, and 0 otherwise. These results are given in Table 1 with the annotation “families.” Results Table 1 shows experimental results. We report attachment accuracy on three subsets of the corpus: sentences of length ≤10 (typically reported in prior work and most similar to the training dataset), length ≤20, and the full corpus. The Bayesian methods all outperform the common baseline (in which we attach each word to the word on its right), but the logistic normal prior performs considerably better than the other two methods as well. The learned covariance matrices were very sparse when using the identity matrix to initialize. The diagonal values showed considerable variation, suggesting the importance of variance alone. When using the “tag families” initialization for the covariance, there were 151 elements across the covariance matrices which were not identically 0 (out of more than 1,000), pointing to a learned relationship between parameters. In this case, most covariance matrices for θc dependencies were diagonal, while many of the covariance matrices for the stopping probabilities (θs) had significant correlations. 6 Conclusion We have considered a Bayesian model for probabilistic grammars, which is based on the logistic normal prior. Experimentally, several different approaches for grammar induction were compared based on different priors. We found that a logistic normal prior outperforms earlier approaches, presumably because it can capitalize on similarity between part-of-speech tags, as different tags tend to appear as arguments in similar syntactic contexts. We achieved state-of-the-art unsupervised dependency parsing results. 6These are simply coarser tags: adjective, adverb, conjunction, foreign, interjection, noun, number, particle, preposition, pronoun, proper, verb. The coarse tags were chosen manually to fit seven treebanks in different languages. attachment accuracy (%) Viterbi decoding MBR decoding |x| ≤10 |x| ≤20 all |x| ≤10 |x| ≤20 all Attach-Right 38.4 33.4 31.7 38.4 33.4 31.7 EM 45.8 39.1 34.2 46.1 39.9 35.9 EM-MAP, α = 1.1 45.9 39.5 34.9 46.2 40.6 36.7 VB-Dirichlet, α = 0.25 46.9 40.0 35.7 47.1 41.1 37.6 VB-EM-Dirichlet 45.9 39.4 34.9 46.1 40.6 36.9 VB-EM-Log-Normal, Σ(0) k = I 56.6 43.3 37.4 59.1 45.9 39.9 VB-EM-Log-Normal, families 59.3 45.1 39.0 59.4 45.9 40.5 Table 1: Attachment accuracy of different learning methods on unseen test data from the Penn Treebank of varying levels of difficulty imposed through a length filter. Attach-Right attaches each word to the word on its right and the last word to $. EM and EM-MAP with a Dirichlet prior (α > 1) are reproductions of earlier results [14, 18]. Acknowledgments The authors would like to thank the anonymous reviewers, John Lafferty, and Matthew Harrison for their useful feedback and comments. This work was made possible by an IBM faculty award, NSF grants IIS-0713265 and IIS-0836431 to the third author and computational resources provided by Yahoo. References [1] A. Ahmed and E. Xing. On tight approximate inference of the logistic normal topic admixture model. In Proc. of AISTATS, 2007. [2] J. Aitchison and S. M. Shen. Logistic-normal distributions: some properties and uses. Biometrika, 67:261–272, 1980. [3] H. Alshawi and A. L. Buchsbaum. Head automata and bilingual tiling: Translation with minimal representations. In Proc. of ACL, 1996. [4] D. Blei and J. D. Lafferty. Correlated topic models. In Proc. of NIPS, 2006. [5] D. Blei, A. Ng, and M. Jordan. Latent Dirichlet allocation. Journal of Machine Learning Research, 3:993–1022, 2003. [6] J. Eisner. Bilexical grammars and a cubic-time probabilistic parser. In Proc. of IWPT, 1997. [7] J. Eisner. Transformational priors over grammars. In Proc. of EMNLP, 2002. [8] J. R. Finkel, C. D. Manning, and A. Y. Ng. Solving the problem of cascading errors: Approximate Bayesian inference for linguistic annotation pipelines. In Proc. of EMNLP, 2006. [9] H. Gaifman. Dependency systems and phrase-structure systems. Information and Control, 8, 1965. [10] S. Goldwater and T. L. Griffiths. A fully Bayesian approach to unsupervised part-ofspeech tagging. In Proc. of ACL, 2007. [11] M. Johnson, T. L. Griffiths, and S. Goldwater. Bayesian inference for PCFGs via Markov chain Monte Carlo. In Proc. of NAACL, 2007. [12] M. I. Jordan, Z. Ghahramani, T. S. Jaakola, and L. K. Saul. An introduction to variational methods for graphical models. Machine Learning, 37(2):183–233, 1999. [13] D. Klein and C. D. Manning. A generative constituent-context model for improved grammar induction. In Proc. of ACL, 2002. [14] D. Klein and C. D. Manning. Corpus-based induction of syntactic structure: Models of dependency and constituency. In Proc. of ACL, 2004. [15] K. Kurihara and T. Sato. Variational Bayesian grammar induction for natural language. In Proc. of ICGI, 2006. [16] P. Liang, S. Petrov, M. Jordan, and D. Klein. The infinite PCFG using hierarchical Dirichlet processes. In Proc. of EMNLP, 2007. [17] M. P. Marcus, B. Santorini, and M. A. Marcinkiewicz. Building a large annotated corpus of English: The Penn treebank. Computational Linguistics, 19:313–330, 1993. [18] N. A. Smith and J. Eisner. Annealing structural bias in multilingual weighted grammar induction. In Proc. of COLING-ACL, 2006. [19] L. Tesni`ere. ´El´ement de Syntaxe Structurale. Klincksieck, 1959. [20] K. Toutanova and M. Johnson. A Bayesian LDA-based model for semi-supervised part-of-speech tagging. In Proc. of NIPS, 2007. A VB-EM for Logistic-Normal Probabilistic Grammars The algorithm for variational inference with probabilistic grammars using logistic normal prior follows.7 Since the updates for ˜ζl,(t) k are fast, we perform them after each optimization routine in the E-step (suppressed for clarity). There are variational parameters for each training example, indexed by ℓ. We denote by B the variational bound in Eq. 8. Our stopping criterion relies on the likelihood of a held-out set (§5) using a point estimate of the model. Input: initial parameters µ(0), Σ(0), training data x, and development data x′ Output: learned parameters µ, Σ t ←1 ; repeat E-step (for each training example ℓ= 1, ..., M): repeat optimize for ˜µℓ,(t) k , k = 1, ..., K: use conjugate gradient descent with ∂L ∂˜µℓ k,i = − “ (Σ(t−1) k )−1)(µ(t−1) k −˜µℓ k) ” i −˜f ℓ k,i + PNk i′=1 “ ˜fk,i′/˜ζk ” exp ` ˜µk,i′ + ˜σ2 k,i′/2 ´ ; optimize ˜σℓ,(t) k , k = 1, ..., K: use Newton’s method for each coordinate (with ˜σℓ k,i > 0) with ∂L ∂˜σ2 k,i = −Σ(t−1) k,ii /2 − “PNk i′=1 ˜fk,i′ ” exp(˜µk,i + ˜σ2 k,i/2)/2˜ζk + 1/2˜σ2 k,i; update ˜ζℓ,(t) k , ∀k: ˜ζℓ,(t) k ←PNk i=1 exp “ ˜µℓ,(t) k,i + (˜σℓ,(t) k,i )2/2 ” ; update ˜ ψ ℓ,(t) k , ∀k: ˜ψℓ,(t) k,i ←˜µℓ,(t) k,i −log ˜ζℓ,(t) k + 1 − 1 ˜ζℓ,(t) k PNk i′=1 exp “ ˜µℓ,(t) k,i + (˜σℓ,(t) k,i )2/2 ” ; compute expected counts ˜f ℓ,(t) k , k = 1, ..., K: use an inside-outside algorithm to re-estimate expected counts ˜f ℓ,(t) k,i in weighted grammar q(y) with weights e ˜ ψℓ; until B does not change ; M-step: Estimate µ(t) and Σ(t) using the following maximum likelihood closed form solution: µ(t) k,i ← 1 M PM ℓ=1 ˜µℓ,(t) k,i h Σ(t) k i i,j ← 1 M “PM ℓ=1 ˜µℓ,(t) k,i ˜µℓ,(t) k,j + (˜σℓ,(t))2 k,iδi,j + Mµ(t) k,iµ(t) k,j −µ(t) k,j PM ℓ=1 ˜µℓ,(t) k,i −µ(t) k,i PM ℓ=1 ˜µℓ,(t) k,j ” where δi,j = 1 if i = j and 0 otherwise. until likelihood of held-out data, p(x′ | E[µ(t)]), decreases ; t ←t + 1; return µ(t), Σ(t) 7An implementation of the algorithm is available at http://www.ark.cs.cmu.edu/DAGEEM.
2008
231
3,489
Risk Bounds for Randomized Sample Compressed Classifiers Mohak Shah Centre for Intelligent Machines McGill University Montreal, QC, Canada, H3A 2A7 mohak@cim.mcgill.ca Abstract We derive risk bounds for the randomized classifiers in Sample Compression setting where the classifier-specification utilizes two sources of information viz. the compression set and the message string. By extending the recently proposed Occam’s Hammer principle to the data-dependent settings, we derive point-wise versions of the bounds on the stochastic sample compressed classifiers and also recover the corresponding classical PAC-Bayes bound. We further show how these compare favorably to the existing results. 1 Introduction The Sample compression framework [Littlestone and Warmuth, 1986, Floyd and Warmuth, 1995] has resulted in an important class of learning algorithms known as sample compression algorithms. These algorithms have been shown to be competitive with the state-of-the-art algorithms such as the SVM in practice [Marchand and Shawe-Taylor, 2002, Laviolette et al., 2005]. Moreover, the approach has also resulted in practical realizable bounds and has shown significant promise in using these bounds in model selection. On another learning theoretic front, the PAC-Bayes approach [McAllester, 1999] has shown that stochastic classifier selection can prove to be more powerful than outputing a deterministic classifier. With regard to the sample compression settings, this was further confirmed in the case of sample compressed Gibbs classifier by Laviolette and Marchand [2007]. However, the specific classifier output by the algorithm (according to a selected posterior) is generally of immediate interest since this is the classifier whose future performance is of relevance in practice. Diluting such guarantees in terms of the expectancy of the risk over the posterior over the classifier space, although gives tighter risk bounds, result in averaged statements over the expected true error. A significant result in obtaining such guarantees for the specific randomized classifier has appeared in the form of Occam’s Hammer [Blanchard and Fleuret, 2007]. It deals with bounding the performance of algorithms that result in a set output when given training data. With respect to classifiers, this results in a bound on the true risk of the randomized classifier output by the algorithm in accordance with a learned posterior over the classifier space from training data. Blanchard and Fleuret [2007] also present a PAC-Bayes bound for the data-independent settings (when the classifier space is defined independently of the training data). Motivated by this result, we derive risk bounds for the randomized sample compressed classifiers. Note that the classifier space in the case of sample compression settings, unlike other settings, is data-dependent in the sense that it is defined upon the specification of training data.1 The rest of 1Note that the classifier space depends on the amount of the training data as we see further and not on the training data themselves. Hence, a data-independent prior over the classifier space can still be obtained in this setting, e.g., in the PAC-Bayes case, owing to the independence of the classifier space definition from the content of the training data. the paper is organized as follows: Section 2 provides a background on the sample compressed classifiers and establishes the context; Section 3 then states the Occam’s Hammer for the dataindependent settings. We then derive bounds for the randomized sample compressed classifier in Section 4 followed by showing how we can recover bounds for the sample compressed Gibbs case (classical PAC-Bayes for sample compressed classifiers) in Section 5. We conclude in Section 6. 2 Sample Compressed (SC) Classifiers We consider binary classification problems where the input space X consists of an arbitrary subset of Rn and the output space Y = {−1, +1}. An example z def = (x, y) is an input-output pair where x ∈X and y ∈Y. Sample Compression learning algorithms are characterized as follows: Given a training set S = {z1, . . . , zm} of m examples, the classifier A(S) returned by algorithm A is described entirely by two complementary sources of information: a subset zi of S, called the compression set, and a message string σ which represents the additional information needed to obtain a classifier from the compression set zi. Given a training set S, the compression set zi is defined by a vector i of indices i def = (i1, i2, . . . , i|i|) with ij ∈{1, . . . , m} ∀j and i1 < i2 < . . . < i|i| and where |i| denotes the number of indices present in i. Hence, zi denotes the ith example of S whereas zi denotes the subset of examples of S that are pointed to by the vector of indices i defined above. We will use i to denote the set of indices not present in i. Hence, we have S = zi ∪zi for any vector i ∈I where I denotes the set of the 2m possible realizations of i. Finally, a learning algorithm is a sample compression learning algorithm (that is identified solely by a compression set zi and a message string σ) iff there exists a Reconstruction Function R : (X × Y)|i| × K −→H, associated with A. Here, H is the (data-dependent) classifier space and K ⊂I × M s.t. M = ∪i∈IM(i). That is, R outputs a classifier R(σ, zi) when given an arbitrary compression set zi ⊆S and message string σ chosen from the set M(zi) of all distinct messages that can be supplied to R with the compression set zi. We seek a tight risk bound for arbitrary reconstruction functions that holds uniformly for all compression sets and message strings. For this, we adopt the PAC setting where each example z is drawn according to a fixed, but unknown, probability distribution D on X × Y. The true risk R(f) of any classifier f is defined as the probability that it misclassifies an example drawn according to D: R(f) def = Pr(x,y)∼D (f(x) ̸= y) = E(x,y)∼DI(f(x) ̸= y) where I(a) = 1 if predicate a is true and 0 otherwise. Given a training set S = {z1, . . . , zm} of m examples, the empirical risk RS(f) on S, of any classifier f, is defined according to: RS(f) def = 1 m m X i=1 I(f(xi) ̸= yi) def = E(x,y)∼SI(f(x) ̸= y) Let Zm denote the collection of m random variables whose instantiation gives a training sample S = zm = {z1, . . . , zm}. To obtain the tightest possible risk bound, we will fully exploit the fact that the distribution of classification errors is a binomial. We now discuss the generic Occam’s Hammer principle (w.r.t. the classification scenario) and then go on to show how it can be applied to the sample compression setting. 3 Occam’s Hammer for data independent setting In this section, we briefly detail the Occam’s hammer [Blanchard and Fleuret, 2007] for dataindependent setting. For the sake of simplicity, we retain the key notations of Blanchard and Fleuret [2007]. Occam’s hammer work by bounding the probability of bad event defined as follows. For every classifier h ∈H, and a confidence parameter δ ∈[0, 1], the bad event B(h, δ) is defined as the region where the desired property on the classifier h does not hold, with probability δ. That is, PrS∼Dm [S ∈B(h, δ)] ≤δ. Further, it assumes that this region is nondecreasing in δ. Intuitively, this means that with decreasing δ the bound on the true error of the classifier h becomes tighter. With the above assumption satisfied, let, P be a non-negative reference measure on the classifier space H known as the volumic measure. Let Π be a probability distribution on H absolutely continuous w.r.t. P such that π = dΠ dP. Let Γ be a probability distribution on (0, +∞) (the inverse density prior). Then Occam’s Hammer [Blanchard and Fleuret, 2007] states that: Theorem 1 [Blanchard and Fleuret, 2007] Given the above assumption and P, Π, Γ defined as above, define the level function ∆(h, u) = min(δπ(h)β(u), 1). where β(x) = R x 0 udΓ(u) for x ∈(0, +∞). Then for any algorithm S 7→θS returning a probability density θS over H with respect to P, and such that (S, h) 7→θS(h) is jointly measurable in its two variables, it holds that Pr S∼Dm,h∼Q  S ∈B(h, ∆(h, θS(h)−1))  ≤δ, where Q is the distribution on H such that dQ dP = θS. Note above that Q is the (data-dependent)posterior distribution on H after observing the data sample S while P is the data-independent prior on H. The subscript S in θS denotes this. Moreover, the distribution Π on the space of classifiers may or may not be data-dependent. As we will see later, in the case of sample compression learning settings we will consider priors over the space of classifiers without reference to the data (such as PAC-Bayes case). To this end, we can either opt for a prior Π independent of the data or make it the same as the volume measure P which establishes a distribution on the classifier space without reference to the data. 4 Bounds for Randomized SC Classifiers We work in the sample compression settings and as mentioned before, each classifier in this setting is denoted in terms of a compression set and a message string. A reconstruction function then uses these two information sources to reconstruct the classifier. This essentially means that we deal with a data-dependent hypothesis space. This is in contrast with other notions of hypothesis class complexity measures such as VC dimension. The hypothesis space is defined, in our case, based on the size of data sample (and not the actual contents of the sample). Hence, we consider the priors built on the size of the possible compression sets and associated message strings. More precisely, we consider prior distribution P with probability density P(zi, σ) to be facotorizable in its compression set dependent component and message string component (conditioned on a given compression set) such that: P(zi, σ) = PI(i)PM(zi)(σ) (1) with PI(i) = 1 (m |i|)p(|i|) such that Pm d=0 p(d) = 1. The above choice of the form for PI(i) is appropriate since we do not have any a priori information to distinguish one compression set from other. However, as we will see later, we should choose p(d) such that we give more weight to smaller compression sets. Let PK be the set of all distributions P on K satisfying above equation. Then, we are interested in algorithms that output a posterior Q ∈PK over the space of classifiers with probability density Q(zi, σ) factorizable as QI(i)QM(zi)(σ). A sample compressed classifier is then defined by choosing a classifier (zi, σ) according to the posterior Q(zi, σ). This is basically the Gibbs classifier defined in the PAC-Bayes settings where the idea is to bound the true risk of this Gibbs classifier defined as R(GQ) = E(zi,σ)∼QR((zi, σ)). On the other hand, we are interested in bounding the true risk of the specific classifier (zi, σ) output according to Q. As shown in [Laviolette and Marchand, 2007], a rescaled posterior Q of the following form can provide tighter guarantees while maintaining the Occam’s principle of parsimony. Definition 2 Given a distribution Q ∈PK, we denote by Q the distribution: Q(zi, σ) def = Q(zi, σ) |i|E(zi,σ)∼Q 1 |i| = QI(i)QM(zi)(σ) |i|E(zi,σ)∼Q 1 |i| = QI(i)QM(zi)(σ) ∀(zi, σ) ∈K Hence, note that the posterior is effectively rescaled for the compression set part. Hence, any classifier (zi, σ) ∼Q = i ∼QI, σ ∼QM(zi). Further, if we denote by dQ the expected value of the compression set size over the choice of parameters according to the scaled posterior, dQ def = Ei∼QI,σ∼QM(zi)|i|, then, E(zi,σ)∼Q 1 |i| = 1 Ei∼QI,σ∼QM(zi)|i| = 1 m −dQ Now, we proceed to derive the bounds for the randomized sample compressed classifiers starting with a PAC-Bayes bound. 4.1 A PAC-Bayes Bound for randomized SC classifier We exploit the fact that the distribution of the errors is binomial and define the following error quantities (for a given i, and hence zi over z|i|): Definition 3 Let S ∈Dm with D a distribution on X × Y, and (zi, σ) ∈K. We denote by BinS(i, σ), the probability that the classifier R(zi, σ) of (true) risk R(zbi, σ) makes |i|Rzi(zi, σ) or fewer errors on z′ i ∼D|i|. That is, BinS(i, σ) = |i|Rzi(zi,σ) X λ=0 |i| λ  (R(σ, zi))λ(1 −R(σ, zi))|i|−λ and by BS(i, σ), the probability that this classifier makes exactly |i|Rzi(zi, σ) errors on z′ i ∼D|i|. That is, BS(i, σ) =  |i| |i|Rzi(zi, σ)  (R(zi, σ))|i|Rzi (zi,σ)(1 −R(zi, σ))|i|−|i|Rzi(zi,σ) Now, approximating the binomial by relative entropy Chernoff bound [Langford, 2005], we have, for a classifier f: mRS(f) X j=0 m j  (R(f))j(1 −R(f))m−j ≤exp(−m · kl(RS(f)∥R(f))) for all RS(f) ≤R(f). As also shown in [Laviolette and Marchand, 2007], since m j  = m m−j  and kl(RS(f)∥R(f)) = kl(1 −RS(f)∥1 −R(f)), the above inequality holds true for each factor inside the sum on the left hand side. Consequently, in the case of sample compressed classifier, ∀(zi, σ) ∈K and ∀S ∈ (X × Y)m: BS(i, σ) ≤exp  −|i| · kl(Rzi(σ, zi)∥R(σ, zi))  (2) Bounding this by δ yields: PrS∼Dm  kl(Rzi(σ, zi)∥R(σ, zi)) ≤ln 1 δ |i|  ≥1 −δ (3) Now, consider the quantity in the probability in Equation 3 as the bad event over classifiers defined by a compression set i and an associated message string σ. Let ψzm(i, σ) be the posterior probability density of the rescaled data-dependent posterior distribution Q over the classifier space with respect to the volume measure P. We can now replace δ for this bad event by the delta of the Occam’s hammer defined as: ln(min(δπ(hS)β(ψzm(i, σ)−1), 1)−1) = ln+  1 δ·π(h) · 1 min((k + 1)−1ψzm(i, σ)−k+1 k , 1)  = ln+  1 δ·π(h) · max((k + 1)ψzm(i, σ) k+1 k , 1)  ≤ ln+  1 δ·π(h) · (k + 1) max(ψzm(i, σ) k+1 k , 1)  ≤ ln  1 δ·π(h) · (k + 1)  + ln+  ψzm(i, σ) k+1 k  where ln+ denotes max(0, ln), the positive part of the logarithm. However, note that we are interested in data-independent priors over the space of classifiers2, and hence, we consider our prior Π to be the same as the volume measure P over the classifier space yielding π as unity. That is, our prior gives a distribution over the classifier space without any regard to the data. Substituting for ψzm(i, σ) (the fraction of respective densities; Radon-Nikodym derivative)3, we obtain the following result: Theorem 4 For any reconstruction function R : Dm × K −→H and for any prior distribution P over compression set and message strings, the sample compression algorithms A(S) returns a posterior distribution Q, then, for δ ∈(0, 1] and k > 0, we have: Pr S∼Dm,i∼QI,σ∼QM(zi)  kl(Rzi(zi, σ)∥R(zi, σ)) ≤ 1 m −|i|  ln k + 1 δ  + (1 + 1 k) ln+ Q(zi, σ) P(zi, σ)  ≥1 −δ where Rzi(zi, σ) is the empirical risk of the classifier reconstructed from (zi, σ) on the training examples not in the compression set and R(zi, σ) is the corresponding true risk. Note that we do not encounter the 1 m−dQ factor in the bound instead of 1 m−|i| unlike the bound of Laviolette and Marchand [2007]. This is because the PAC-Bayes bound of Laviolette and Marchand [2007] computes the expectancy over the kl-divergence of the empirical and true risk of the classifiers chosen according to Q. This, as a result of rescaling of Q in preference of smaller compression sets, is reflected in the bound. On the other hand, the bound of Theorem 4 is a point-wise version bounding the true error of the specific classifier chosen according to Q and hence concerns the specific compression set utilized by this classifier. 4.2 A Binomial Tail Inversion Bound for randomized SC classifier A tighter condition can be imposed on the true risk of the classifier by considering the binomial tail inversion over the distribution of errors. The binomial tail inversion Bin k m, δ  is defined as the largest risk value that a classifier can have while still having a probability of at least δ of observing at most k errors out of m examples: Bin  k m, δ  def = sup  r : Bin  k m, r  ≥δ  where Bin  k m, r  def = k X j=0 m j  rj(1 −r)m−j From this definition, it follows that Bin (RS(f), δ) is the smallest upper bound, which holds with probability at least 1 −δ, on the true risk of any classifier f with an observed empirical risk RS(f) on a test set of m examples (test set bound): PZm  R(f) ≤Bin  RZm(f), δ  ≥1 −δ ∀f (4) This bound can be converted to a training set bound in a standard manner by considering a measure over the classifier space (see for instance [Langford, 2005, Theorem 4.1]). Moreover, in the sample compression case, we are interested in the empirical risk of the classifier on the examples not in the compression set (consistent compression set assumption). Now, let δr be a δ-weighed measure on the classifier space, i.e., i and σ. Then, for the compression sets and associated message strings, 2Hence, the missing S in the subscript of π(h) in the r.h.s. above. 3Alternatively, let P(zi, σ) and Q(zi, σ) denote the probability densities of the prior distribution P and rescaled posterior distributions Q over classifiers such that dQ = Q(zi, σ)dµ and dP = P(zi, σ)dµ w.r.t. some measure µ. This too yields dQ dP = Q(zi,σ) P (zi,σ). Note that the final expression is independent of the underlying measure µ. consider the following bad event with empirical risk of the classifier measured as BinS((zi, σ)) for i ∼QI, σ ∼QM(zi): B(h, δ) =  R(zi, σ) > Bin(Rzi(zi, σ), δr) Now, we replace δr with the level function of Occam’s hammer (with the same assumption of Π = P, π = 1): min(δπ(hS)β(ψzm(i, σ)−1), 1) ≤ δ · min((k + 1)−1ψzm(i, σ)−k+1 k , 1) ≤ δ · 1 max((k + 1)ψzm(i, σ) k+1 k , 1) ≤ δ 1 (k + 1) max(ψzm(i, σ) k+1 k , 1) ≤ δ (k + 1)ψzm(i, σ) k+1 k Hence, we have proved the following: Theorem 5 For any reconstruction function R : Dm × K −→H and for any prior distribution P over the compression set and message strings, the sample compression algorithms A(S) returns a posterior distribution Q, then, for δ ∈(0, 1] and k > 0, we have: Pr S∼Dm,i∼QI,σ∼QM(zi)  R(zi, σ) ≤Bin  Rzi(zi, σ), δ (k + 1) Q(zi,σ) P (zi,σ)  k+1 k  ≥1 −δ We can obtain a looser bound by approximating the binomial tail inversion bound using [Laviolette et al., 2005, Lemma 1]: Corollary 6 Given all our previous definitions, the following holds with probability 1 −δ over the joint draw of S ∼Dm and i ∼QI, σ ∼QM(zi): R(zi, σ) ≤1 −exp  −1 m −|i| −|i|Rzi(zi, σ)  ln  m −|i| |i|Rzi(zi, σ)  + ln k + 1 δ  + (1 + 1 k ) ln Q(zi, σ) P(zi, σ)  5 Recovering the PAC-Bayes bound for SC Gibbs Classifier Let us now see how a bound can be obtained for the Gibbs setting. We follow the general line of argument of Blanchard and Fleuret [2007] to recover the PAC-Bayes bound for the Sample Compressed Gibbs classifier. However, note that we do this for the data-dependent setting here and also utilize the rescaled posterior over the space of sample compressed classifiers. The PAC-Bayes bound of Theorem 4 basically states that ES∼Dm[ Pr i∼QI,σ∼QM(zi) [kl(Rzi(zi, σ)∥R(zi, σ)) > ϕ(δ)]] ≤δ where ϕ(δ) = 1 m −|i|  ln k + 1 δ  + (1 + 1 k ) ln+ Q(zi, σ) P(zi, σ)  Consequently, ES∼Dm[ Pr i∼QI,σ∼QM(zi) [kl(Rzi(zi, σ)∥R(zi, σ)) > ϕ(δγ)]] ≤δγ Now, bounding the argument of expectancy above using the Markov inequality, we get: Pr S∼Dm  Pr i∼QI,σ∼QM(zi) [kl(Rzi(zi, σ)∥R(zi, σ)) > ϕ(δγ)] > γ  ≤δ Now, discretizing the argument over (δi, γi) = (δ2−i, 2−i), we obtain Pr S∼Dm  Pr i∼QI,σ∼QM(zi) [kl(Rzi(zi, σ)∥R(zi, σ)) > ϕ(δiγi)] > γi  ≤δi Taking the union bound over δi, i ≥1 now yields: Pr S∼Dm  Pr i∼QI,σ∼QM(zi) [kl(Rzi(zi, σ)∥R(zi, σ)) > ϕ(δ2−2i] ≤2−i  > 1 −δ ∀i ≥0 Now, let us consider the argument of the above statement for a fixed sample S. Then, for all i ≥0, the following holds with probability 1 −δ: Pr i∼QI,σ∼QM(zi)  kl(Rzi(zi, σ)∥R(zi, σ)) > 1 m −|i|  ln k + 1 δ  + 2i ln2 + (1 + 1 k ) ln+ Q(zi, σ) P(zi, σ)  ≤2−i and hence: Pr i∼QI,σ∼QM(zi)  ΦS(zi, σ) > 2i ln 2  ≤2−i where: ΦS(zi, σ) = (m −|i|)kl(Rzi(zi, σ)∥R(zi, σ)) −ln k + 1 δ  −(1 + 1 k) ln+ Q(zi, σ) P(zi, σ)  We wish to bound, for the Gibbs classifier, Ei∼QI,σ∼QM(zi)ΦS(zi, σ): Ei∼QI,σ∼QM(zi)[ΦS(zi, σ)] ≤ Z 2i ln 2>0 Pr i∼QI,σ∼QM(zi) [ΦS(zi, σ) ≥2i ln2]d(2i ln 2) ≤ 2 ln 2 X i≥0 Pri∼QI,σ∼QM(zi)[ΦS(zi, σ) ≥2i ln 2] ≤3 (5) Now, we have: Lemma 7 [Laviolette and Marchand, 2007] For any f : K −→R+, and for any Q, Q′ ∈PK related by Q′(zi, σ)f(zi, σ) = 1 E(zi,σ)∼Q 1 f(zi,σ) Q(zi, σ), we have: E(zi,σ)∼Q′  f(zi, σ)kl(Rzi(zi, σ)∥R(zi, σ))  ≥ 1 E(zi,σ)∼Q 1 f(zi,σ) kl(RS(GQ)∥R(GQ)) where RS(GQ) and R(GQ) denote the empirical and true risk of the Gibbs classifier with posterior Q respectively. Hence, with Q′ = Q and f(zi, σ) = |i|, Lemma 7 yields: E(zi,σ)∼Q(|i|kl(Rzi(zi, σ)∥R(zi, σ))) ≥ 1 1 m−dQ kl(RS(GQ)∥R(GQ)) (6) Further, Ei∼QI,σ∼QM(zi)  ln+ Q(zi, σ) P(zi, σ)  = Ei∼QI,σ∼QM(zi)  ln+  Q(zi, σ) PI(i)PM(zi)(σ)  = E(zi,σ)∼P  Q(zi, σ) PI(i)PM(zi)(σ)  · ln+  Q(zi, σ) PI(i)PM(zi)(σ)  ≤ E(zi,σ)∼P  Q(zi, σ) PI(i)PM(zi)(σ)  · ln  Q(zi, σ) PI(i)PM(zi)(σ)  −max 0≤x<1 x ln x ≤ KL(Q∥P) + 0.5 (7) Equations 6 and 7 along with Equation 5 and substituting k = m −1 yields the final result: Theorem 8 For any reconstruction functionR : Dm × K −→H and for any prior distribution P over compression set and message strings, for δ ∈(0, 1], we have: Pr S∼Dm  ∀Q ∈PK : kl(RS(GQ)∥R(GQ)) ≤ 1 m −dQ 1 + 1 m −1  KL(Q∥P) + 1 2(m −1) + ln m δ  + 3.5  ≥1 −δ Theorem 8 recovers almost exactly the PAC-Bayes bound for the Sample Compressed Classifiers of Laviolette and Marchand [2007]. The key differences are an additional 1 (m−dQ)(m−1) weighted KL-divergence term, ln( m δ ) instead of the ln( m+1 δ ) and the additional trailing terms bounded by 4 m−dQ . Note that the bound of Theorem 8 is derived in a relatively more straightforward manner with the Occam’s Hammer criterion. 6 Conclusion It has been shown that stochastic classifier selection is preferable to deterministic selection by the PAC-Bayes principle resulting in tighter risk bounds over averaged risk of classifiers according to the learned posterior. Further, this observation resulted in tight bounds in the case of stochastic sample compressed classifiers [Laviolette and Marchand, 2007] also showing that sparsity considerations are of importance even in this scenario via. the rescaled posterior. However, of immediate relevance are the guarantees of the specific classifier output by such algorithms according to the learned posterior and hence a point-wise version of this bound is indeed needed. We have derived bounds for such randomized sample compressed classifiers by adapting Occam’s Hammer principle to the data-dependent sample compression settings. This has resulted in bounds on the specific classifier output by a sample compression learning algorithm according to the learned data-dependent posterior and is more relevant in practice. Further, we also showed how classical PAC-Bayes bound for the sample compressed Gibbs classifier can be recovered in a more direct manner and show that this compares favorably to the existing result of Laviolette and Marchand [2007]. Acknowledgments The author would like to thank John Langford for interesting discussions. References Gilles Blanchard and Franc¸ois Fleuret. Occam’s hammer. In Proceedings of the 20th Annual Conference on Learning Theory (COLT-2007), volume 4539 of Lecture Notes on Computer Science, pages 112–126, 2007. Sally Floyd and Manfred Warmuth. Sample compression, learnability, and the Vapnik-Chervonenkis dimension. Machine Learning, 21(3):269–304, 1995. John Langford. Tutorial on practical prediction theory for classification. Journal of Machine Learning Research, 3:273–306, 2005. Franc¸ois Laviolette and Mario Marchand. PAC-Bayes risk bounds for stochastic averages and majority votes of sample-compressed classifiers. Journal of Machine Learning Research, 8:1461–1487, 2007. Francois Laviolette, Mario Marchand, and Mohak Shah. Margin-sparsity trade-off for the set covering machine. In Proceedings of the 16th European Conference on Machine Learning, ECML 2005, volume 3720 of Lecture Notes in Artificial Intelligence, pages 206–217. Springer, 2005. N. Littlestone and M. Warmuth. Relating data compression and learnability. Technical report, University of California Santa Cruz, Santa Cruz, CA, 1986. Mario Marchand and John Shawe-Taylor. The Set Covering Machine. Journal of Machine Learning Reasearch, 3:723–746, 2002. David McAllester. Some PAC-Bayesian theorems. Machine Learning, 37:355–363, 1999.
2008
232
3,490
Learning the Semantic Correlation: An Alternative Way to Gain from Unlabeled Text Yi Zhang Machine Learning Department Carnegie Mellon University yizhang1@cs.cmu.edu Jeff Schneider The Robotics Institute Carnegie Mellon University schneide@cs.cmu.edu Artur Dubrawski The Robotics Institute Carnegie Mellon University awd@cs.cmu.edu Abstract In this paper, we address the question of what kind of knowledge is generally transferable from unlabeled text. We suggest and analyze the semantic correlation of words as a generally transferable structure of the language and propose a new method to learn this structure using an appropriately chosen latent variable model. This semantic correlation contains structural information of the language space and can be used to control the joint shrinkage of model parameters for any specific task in the same space through regularization. In an empirical study, we construct 190 different text classification tasks from a real-world benchmark, and the unlabeled documents are a mixture from all these tasks. We test the ability of various algorithms to use the mixed unlabeled text to enhance all classification tasks. Empirical results show that the proposed approach is a reliable and scalable method for semi-supervised learning, regardless of the source of unlabeled data, the specific task to be enhanced, and the prediction model used. 1 Introduction The availability of large amounts of unlabeled data such as text on the Internet is a strong motivation for research in semi-supervised learning [4]. Currently, most of these methods assume that the unlabeled data belong to the same classes or share the generative distributions with the labeled examples, e.g., generative models [10], low-density separation [8, 13], and graph-based methods [3]. As indicated in [11], unlabeled data in real-world applications do not necessarily follow the classes or distribution of labeled examples, and semi-supervised learning algorithms that give up this assumption have wider applicability in practice. As a result, some algorithms avoid using unlabeled examples directly in model training and instead focus on “changes of representation” that find a more informative representation from unlabeled data and use it to encode the labeled examples [4, 1, 11]. However, even algorithms for learning good features from unlabeled data still make a strong assumption: those learned high-level features will be relevant to the specific prediction task at hand. This assumption might be problematic. Many functions can be defined over an input space and a specific task corresponds to only one of them. The feature extraction on unlabeled data is an unsupervised process and thus a “blindly” learned representation might be irrelevant to a specific task, especially when the unlabeled data are not from the same task. To tackle this problem, some recent work avoids blind feature extraction by incorporating external knowledge about the task being enhanced [1]: the high-level features are learned by principal component analysis on the weights of several models, and these models are trained from some “auxiliary” tasks constructed by domain knowledge. In this paper, we explore the possibility of extracting generally transferable knowledge from unlabeled text without information about the task to be enhanced. This knowledge is represented as the semantic correlation structure of the words in the text domain and is shown to be transferable among documents of different themes. This structure is extracted using a latent topic model combined with a bootstrapping procedure. The rationale is that the latent topics (or more generally, high-level features) extracted from unlabeled data might be irrelevant to a particular task, but the word distribution in these topics reveals the structural information of the language, represented by the semantic correlation among words. For any specific task defined on the same input space, this information can be used to control the joint shrinkage of model parameters through informative regularization. The use of covariance or correlation structure has already been mentioned in transfer learning [12, 9]. A covariance structure can be transferred from a few related tasks to a target task [12] or inferred from meta-features [9]. In fact, one way to view the present work is: 1) we automatically construct a large number of diverse but meaningful “tasks” from unlabeled text without using external knowledge, where each “task” is actually extracted as a latent variable; 2) we propose to learn the semantic correlation structure of the word space from these dummy tasks and show that this structure is generally transferable regardless of the source of unlabeled data; 3) this structure can be efficiently incorporated into a broad category of prediction models via regularization, which leads to a very scalable and applicable semi-supervised learning framework. 2 Semantic Correlation: Transferable Structure from Unlabeled Text 2.1 Latent Topics and Semantic Structure Latent topics extracted from unlabeled text might be irrelevant to a particular task, but the composition of these topics in terms of word distribution reveals information about the semantic structure of the language. Assume a latent topic model [7, 2] of the word space X, or more generally, a latent variable model characterizing the input space X: x = Az (1) where x = [x1, x2, . . . , xp]T is the p-dimensional vector of input variables, and z = [z1, z2, . . . , zk]T represents latent variables in the k-dimensional latent space Z. A is a p × k matrix, representing a generative process from a probabilistic view or a projection from a deterministic view. For a latent topic model, x corresponds to the bag-of-words vector of a document divided by the document length, z is the distribution of k latent topics in the document, and A is the distribution of p words in k latent topics. Various models fit in this formula including PCA, ICA, sparse coding, and non-negative matrix factorization. Different documents have different topic distributions, z, and thus different word distributions, x, but A can be considered an invariant structure of the language. Each pdimensional column vector of A denotes the word distribution in a latent topic, and serves as an “observation” in the p dimensional word space, indicating the semantic roles of p words in this topic. Given a large set of k latent topics represented by k p-dimensional vectors {a(,1), a(,2), . . . , a(,k)}, we can define the semantic covariance of p words as follows. Let A denote the matrix formed by treating each vector a(,t), t = 1, 2, . . ., k as a column, and let a(i,) and a(i,t) denote a row vector and an element of this matrix, respectively. The semantic covariance of word i and word j is defined as: covs(xi, xj) = 1 k k X t=1 (ait −a(i,))(ajt −a(j,)) = 1 k k X t=1 aitajt −a(i,)a(j,) (2) where a(i,) is the mean of the ith row in A. Naturally, the semantic correlation is: corrs(xi, xj) = covs(xi, xj) p covs(xi, xi)covs(xj, xj) (3) 2.2 Comparing Semantic Correlation and Data Correlation Suppose we observe a set of n documents in word space X, denoted by an n × p data matrix DX where each document corresponds to a p-dimensional bag-of-words vector of counts. We refer to the correlation between words computed directly from DX as the data correlation. This data correlation may not be transferable between tasks since documents from different themes may have distinct topic distributions and word distributions, which lead to different word correlations in data space. Here we show intuitively why we expect the data correlation to have limited use across distinct tasks, while we expect the semantic correlation to be transferable. Consider the latent variable model in eq. (1), which relates A to data space X. We focus on semantic covariance and data covariance, and assume that the bag-of-words vector is divided by the length of the document so that it corresponds to x in eq. (1). From eq. (1), an input variable xi can be written as xi = Pk t=1 aitzt, and therefore, the data covariance of word i and word j can be expressed as: cov(xi, xj) = E[(xi −Exi)(xj −Exj)] (4) = E[ k X t=1 ait(zt −Ezt) k X t=1 ajt(zt −Ezt)] = k X t=1 k X t′=1 aitajt′E[(zt −Ezt)(zt′ −Ezt′)] = k X t=1 k X t′=1 aitajt′cov(zt, zt′) Thus, data covariance is directly related to the covariance among latent topics. Documents from different sources have different topic distributions and thus different covariance terms cov(zt, zt′) in latent space. As a result, the data covariance learned from one source of documents may not be transferable to another class of documents. On the other hand, the semantic covariance in eq. (2) is completely determined by the structure of A. Intuitively, the data covariance among words must contain some information about the semantic relationship of words. This can also be observed from eq. (4). If we ignore the effect of the covariance among topics by assuming that latent topics are independently distributed and have the same variance (denoted as σ2), eq. (4) can be written as: cov(xi, xj) = σ2 k X t=1 aitajt (5) Algorithm 1 Estimation of semantic correlation structure Input: data D = Du ∪Dl, latent variable model M Output: semantic correlation matrix Σs Parameters: α, k, N Initialize V ←∅ repeat Dsamp ←Sampling(D, α) {(z1, a(,1)), (z2, a(,2)), . . . , (zk, a(,k))} ←M(k, Dsamp) V ←V ∪{a(,1), a(,2), . . . , a(,k)} until |V| ≥kN Compute Σs: Σs(i, j) ←corrs(xi, xj) Comparing this to the last form in eq. (2), we see the similarity between data and semantic covariance. In fact, our empirical study shows that data correlation from unlabeled text does contain useful information, but is not as informative as semantic correlation. 3 Semantic Structure Learning and Informative Regularization Consider a set of nl labeled documents Dl = {(xl i, yl i) ∈X × Yl, i = 1, · · · nl}, where X ⊆Rp is the p-dimensional word space, and Yl = {−1, 1} for classification and Yl ⊆R for regression. Also assume that a large set of nu unlabeled documents Du = {xu i ∈ X, i = 1, · · · nu} is available. The goal is to learn a good function fl : X →Yl, which is a classifier or a regressor. In this section we introduce a framework to transfer knowledge from unlabeled text. Section 3.1 proposes an approach to learning the semantic structure of the word space from a set of unlabeled text. In section 3.2, we discuss how to efficiently apply the learned structure to a broad category of prediction models through regularization. 3.1 Learning the Semantic Correlation The semantic correlation among words can be estimated using eq. (3) by observing a large number of different latent topics. However, obtaining a large set of diverse but meaningful topics is hard, since the number of meaningful topics extracted by a latent topic model is usually not very large. To solve this problem, resampling techniques such as bootstrapping [5] can be combined with a chosen latent variable model, which provides a principled way to estimate the semantic correlation. The procedure is given in Algorithm 1, which uses all the available data D = Du ∪Dl and a latent variable model M as the input. The algorithm repeats N iterations. In each iteration it draws an α percentage sample1 from the data and extracts k latent topics from the sample by applying the model M. After N iterations, the p × p semantic correlation matrix Σs is estimated from the kN observations of word distribution in latent topics. The algorithm requires an appropriate latent variable model M (e.g., latent dirichlet allocation for text data), and a number k of latent variables extracted each iteration from the sampled data. The number of iterations N is set as large as necessary to obtain a reliable estimation. 3.2 Knowledge Transfer by Informative Regularization This section discusses how to use the semantic structure Σs in any specific learning task defined on the input space X. For the prediction model, we mainly consider regularized linear models with an l-2 norm penalty, e.g., support vector machines, ridge regression, logistic regression with a Gaussian prior, etc. The model is represented by a p-dimensional weight vector w and an intercept b. The prediction is computed as wT x + b for regression 1In this paper, we use α = 50% sampling without replacement. Other choices can be made. or by setting a threshold θ (usually θ = 0) on wT x + b for classification. To learn w and b, we minimize a loss function L on the training examples plus a regularization term on w: argmin w,b nl X i=1 L(yl i, wT xl i + b) + λwT w (6) Different models correspond to different loss functions [6], e.g., SVMs use hinge loss, logistic regression uses log-likelihood loss, and ridge regression uses squared error loss. The regularization term λwT w = λwT I−1w is well known to be equivalent to the Bayesian approach that imposes a Gaussian prior with zero mean and an identity correlation matrix. The correlation is often set to an identity matrix due to lack of knowledge about the input space. If a covariance or correlation structure is known, e.g., the semantic structure of the word space, the prior can be more informative [12]. Incorporating Σs into the Gaussian prior leads to a new regularization term and the resulting model is: argmin w,b nl X i=1 L(yl i, wT xl i + b) + λwT Σ−1 s w (7) Extending the discussion on SVMs in [9], all regularized linear models in the form of eq. (7) can be easily solved by three steps. First, transform the training examples by ˜xl i = Σ 1 2s xl i (8) Second, learn the standard linear model in the transformed space: argmin ˜ w,b nl X i=1 L(yl i, ˜wT ˜xl i + b) + λ˜wT ˜w (9) Finally, the optimal solution for (7) is obtained by: w = Σ 1 2s ˜w (10) This equivalence is derived from wT xl i = ˜wT ˜xl i and wT Σ−1 s w = ˜wT ˜w. Semantic correlation is transferable to any specific task and thus can be computed offline. As a result, semi-supervised learning for any task simply requires the linear transformation in eq. (8) before training on the labeled examples, which is very scalable. 4 Experiments We use the by-date version of the 20-NewsGroups data set2, where 11314 training and 7532 testing documents are divided by date and denoted as Dtr and Dts here. Documents are represented by bag-of-words vectors. The vocabulary is built to include the most frequent 200 words in each of the 20 newsgroups, while the 20 most frequent words over all 20 newsgroups are removed. This yields an input space X with p = 1443 features (words). Documents come from 20 newsgroups, so we construct 190 binary classification tasks, one for each pair of newsgroups. For each task, a few documents in the two newsgroups are selected from Dtr as the labeled examples, denoted as Dl in section 3. The rest of the documents in Dtr are used as the unlabeled data, denoted by Du. Note that Du is a mixture from all the 20 newsgroups. In this sense, semi-supervised learning algorithms that assume the unlabeled data come from the target task or the same generative distribution are unlikely to work very well. The test data for each binary task are all the relevant documents in Dts, i.e., documents in Dts that belong to one of the two chosen newsgroups. For any task we 2http://people.csail.mit.edu/jrennie/20Newsgroups/ always have Du ∪Dl = Dtr, so Algorithm 1 is run only once on Dtr to learn the semantic correlation structure Σs that is used by all 190 tasks. The documents are well distributed over the 20 newsgroups and thus there are large numbers of training documents in Dtr for each newsgroup. To limit the number of labeled examples for each binary prediction task, we use 5%, 10%, 20% of the relevant documents in Dtr as the labeled examples Dl, and the rest of the relevant and all irrelevant documents in Dtr as the unlabeled data Du. We denote these tests as 5%-Test, 10%-Test, and 20%-Test. The result of each test is averaged over 10 random runs, with Dl randomly selected from Dtr. The testing data for each task are fixed to be all relevant documents in Dts, which is invariant for a task among different tests and random runs. Methods for comparison are as follows. (1) Comparison based on SVM. For each classification task, we compare: SVM directly trained on labeled examples Dl (denoted SV M), SVM trained on Dl in the latent topic space extracted by latent dirichlet allocation on Dl ∪Du [2] (denoted SV MLDA), SVM trained on Dl in principal component space extracted by PCA on Dl ∪Du (denoted SV MPCA), SVM trained on Dl via informative regularization with semantic correlation Σs in the prior (denoted SV MIR), SVM trained on Dl via informative regularization with data correlation in the prior (denoted SV MIR(data)), where the data correlation Σ is estimated from bag-of-words vectors of documents in Dl ∪Du. (2) Comparison based on L-2 Regularized Logistic Regression. Analogous to the SVM comparison with logistic regression (denoted LGR) as the base classifier. (3) Comparison based on ridge regression. Ridge regression (denoted RR) is used as the base classifier: examples are labeled as +1 and −1, and prediction is made by wT x+b > 0. (4) Comparison to semi-supervised SVM. Recently a fast semi-supervised SVM using L-2 loss was proposed [13], which makes it possible to handle large-scale unlabeled documents. We compare: L2-SVM directly trained on Dl (L2-SV M), semi-supervised L2SVM trained on Dl ∪Du (L2-S3V M), and L2-SVM trained on Dl via informative regularization with semantic correlation (L2-SV MIR). The semi-supervised SVM should not work well since the unlabeled data is a mixture from all tasks. Therefore, we also test an “oracle” semi-supervised SVM, using labeled examples together with unlabeled examples coming only from the two relevant newsgroups (L2-S3V Moracle). Here are additional implementation details. The regularization parameter λ for each model is determined by 5-fold cross-validation in the range 10−6 to 106. LibSVM 2.85 is used for SVM. For PCA, we tried 10, 20, 30, 50, 100, 200, 400 principal components and report PCA using 200 principal components as the best result. For latent dirichlet allocation, we use the implementation at http://chasen.org/∼daiti-m/dist/lda/. We tried k = 10, 20, 30, 50, 100, 200 latent topics with 30 topics performing best. For the proposed method, Algorithm 1 uses latent dirichlet allocation with k = 30 topics per sampling, repeats N = 100 iterations, and Σs is estimated from these 3000 latent topics. L2-S3V M (code available as SVMlin [13]) has a second parameter λu for unlabeled examples, which is set to 1 as in [13]. Unlabeled data for L2-S3V M is downsampled to 3000 documents for each run to make training (and cross-validation) feasible. Empirical results are shown in Tables 1- 4. For each semi-supervised learning algorithm, we report two performance measures: the average classification error over all 190 tasks, and the gain/loss ratio compared to the corresponding supervised learning method. The former measures the effectiveness of using the unlabeled data, while the latter measures the reliability of the knowledge transfer. From Tables 1 - 3, IR based methods with semantic correlation significantly outperform standard supervised learning, LDA based methods, PCA based methods, and is also generally more effective than IR with data correlation. The LDA based algorithms slightly improve the prediction performance when using SVM or logistic regression as the base classifier, while decreasing the performance when using ridge Table 1: Comparison over 190 tasks, based on SVMs 5%-Test 10%-Test 20%-Test SV M 14.22% 10.34% 7.88% SV MLDA(30) 9.76% (179/11) 8.01% (171/19) 6.90% (161/29) SV MPCA(200) 13.32% (123/67) 10.31% (104/86) 8.29% (89/101) SV MIR 7.58% (190/0) 6.11% (190/0) 5.13% (183/7) SV MIR(data) 9.40% (185/5) 7.14% (183/7) 5.70% (180/10) Table 2: Comparison over 190 tasks, based on regularized logistic regression 5%-Test 10%-Test 20%-Test LGR 11.70% 8.43% 6.67% LGRLDA(30) 8.21% (171/19) 7.38% (156/34) 6.79% (134/56) LGRPCA(200) 11.43% (105/85) 8.95% (65/125) 7.28% (64/122) LGRIR 6.70% (189/1) 5.78% (181/9) 5.19% (169/21) LGRIR(data) 8.46% (172/18) 7.21% (157/33) 6.46% (132/58) Table 3: Comparison over 190 tasks, based on ridge regression 5%-Test 10%-Test 20%-Test RR 14.13% 10.73% 8.90% RRLDA(30) 14.08% (111/101) 11.98% (67/102) 11.34% (42/148) RRPCA(200) 15.50% (56/132) 12.80% (33/157) 11.53% (17/173) RRIR 10.55% (182/8) 8.88% (161/29) 8.01% (134/56) RRIR(data) 10.68% (176/14) 8.94% (157/33) 7.99% (139/51) Table 4: Comparison to semi-supervised SVMs over 190 tasks, based on L2-SVM 5%-Test 10%-Test 20%-Test L2-SV M 11.18% 8.41% 6.65% L2-S3V M 14.14% (14/176) 11.64% (5/185) 10.04% (1/189) L2-S3V Moracle 8.22% (189/1) 6.95% (185/5) 6.00% (164/24) L2-SV MIR 6.87% (188/2) 5.73% (180/10) 4.98% (177/13) regression. This is possibly because the loss function of ridge regression is not a good approximation to the 0/1 classification error, and therefore, ridge regression is more sensitive to irrelevant latent features extracted from mixed unlabeled documents. The PCA based methods are generally worse than standard supervised learning, which indicates they are sensitive to the mixed unlabeled data. In Table 4, the L2-S3V M performs worse than standard L2-SV M, showing that traditional semi-supervised learning cannot handle unlabeled data outside the target task. We can also see that the L2-SV MIR even outperforms the oracle version of semi-supervised SVM (L2-S3V Moracle) by achieving similar gain/loss ratio but better average classification error. This is a very promising result since it shows that information can be gained from other tasks even in excess of what can be gained from a significant amount of unlabeled data on the task at hand. In conclusion, the empirical results show that the proposed approach is an effective and reliable (also scalable) method for semi-supervised learning, regardless of the source of unlabeled data, the specific task to be enhanced, and the base prediction model used. It is interesting to directly compare the semantic correlation Σs and the data correlation Σ matrices learned from the data. We make three observations: 1) The average value of entries is 0.0147 in the semantic correlation and 0.0341 in the data correlation. We Table 5: Top 10 distinct word pairs in terms of semantic correlation vs. data correlation gaza/lebanes biker/yamaha motorcycl/yamaha batter/clemen yanke/catcher 0.956/0.007 0.937/−0.004 0.970/0.030 0.932/−0.002 0.934/0.002 palestin/lebanes cage/ama toyota/mileag mileag/mustang brave/batter 0.946/0.181 0.921/−0.005 0.934/0.009 0.923/−0.002 0.950/0.025 have 1617834 entries with higher data correlation and 462972 entries with higher semantic correlation. Thus overall word pairs tend to have higher values in the data correlation. 2) However, if we list the top 1000 pairs of words with the largest absolute difference between the two correlations, they all have very high semantic correlation and low data correlation. 3) We list the top 10 such word pairs and their semantic/data correlations in Table 5. The words are indeed quite related. In conclusion, entries in Σs seem to have a power-law distribution where a few pairs of words have very high correlation and the rest have low correlation, which is consistent with our intuition about words. However, the data correlation misses highly correlated words found by the semantic correlation even though it generally assigns higher correlation to most word pairs. This is consistent with the data correlation not being transferable among documents of different themes. When the unlabeled documents are a mixture from different sources, the estimation of data correlation is affected by the fact that the mixture of input documents is not consistent. Acknowledgments This work was supported by the Centers of Disease Control and Prevention (award R01-PH 000028) and by the National Science Foundation (grant IIS-0325581). References [1] R. K. Ando and T. Zhang. A framework for learning predictive structures from multiple tasks and unlabeled data. JMLR, 6:1817–1853, 2005. [2] D. M. Blei, A. Y. Ng, and M. I. Jordan. Latent dirichlet allocation. JMLR, 3:993–1022, 2003. [3] A. Blum and S. Chawla. Learning from labeled and unlabeled data using graph mincuts. In ICML, pages 19–26, 2001. [4] O. Chapelle, B. Scholkopf, and A. Zien. Semi-supervised Learning. The MIT Press, 2006. [5] B. Efron. Bootstrap methods: Another look at the jackknife. The Annals of Statistics, 7, 1979. [6] T. Hastie, R. Tibshirani, and J. Friedman. The Elements of Statistical Learning: Data Mining, Inference and Prediction. Springer, New York, 2001. [7] T. Hofmann. Probabilistic latent semantic analysis. In UAI, 1999. [8] T. Joachims. Transductive inference for text classification using support vector machines. In ICML, pages 200–209, 1999. [9] E. Krupka and N. Tishby. Incorporating Prior Knowledge on Features into Learning. In AISTATS, pages 227–234, 2007. [10] K. Nigam, A. K. McCallum, S. Thrun, and T. Mitchell. Text classification from labeled and unlabeled documents using em. Machine Learning, 39:103–134, 2000. [11] R. Raina, A. Battle, H. Lee, and B. P. A. Y. Ng. Self-taught learning: Transfer learning from unlabeled data. In ICML, pages 759–766, 2007. [12] R. Raina, A. Y. Ng, and D. Koller. Constructing informative priors using transfer learning. In ICML, pages 713–720, 2006. [13] V. Sindhwani and S. Keerthi. Large scale semi-supervised linear svms. In SIGIR, 2006.
2008
233
3,491
Online Optimization in X-Armed Bandits S´ebastien Bubeck INRIA Lille, SequeL project, France sebastien.bubeck@inria.fr R´emi Munos INRIA Lille, SequeL project, France remi.munos@inria.fr Gilles Stoltz Ecole Normale Sup´erieure and HEC Paris gilles.stoltz@ens.fr Csaba Szepesv´ari Department of Computing Science, University of Alberta szepesva@cs.ualberta.ca ∗ Abstract We consider a generalization of stochastic bandit problems where the set of arms, X, is allowed to be a generic topological space. We constraint the mean-payoff function with a dissimilarity function over X in a way that is more general than Lipschitz. We construct an arm selection policy whose regret improves upon previous result for a large class of problems. In particular, our results imply that if X is the unit hypercube in a Euclidean space and the mean-payoff function has a finite number of global maxima around which the behavior of the function is locally H¨older with a known exponent, then the expected regret is bounded up to a logarithmic factor by √n, i.e., the rate of the growth of the regret is independent of the dimension of the space. Moreover, we prove the minimax optimality of our algorithm for the class of mean-payoff functions we consider. 1 Introduction and motivation Bandit problems arise in many settings, including clinical trials, scheduling, on-line parameter tuning of algorithms or optimization of controllers based on simulations. In the classical bandit problem there are a finite number of arms that the decision maker can select at discrete time steps. Selecting an arm results in a random reward, whose distribution is determined by the identity of the arm selected. The distributions associated with the arms are unknown to the decision maker whose goal is to maximize the expected sum of the rewards received. In many practical situations the arms belong to a large set. This set could be continuous [1; 6; 3; 2; 7], hybrid-continuous, or it could be the space of infinite sequences over a finite alphabet [4]. In this paper we consider stochastic bandit problems where the set of arms, X, is allowed to be an arbitrary topological space. We assume that the decision maker knows a dissimilarity function defined over this space that constraints the shape of the mean-payoff function. In particular, the dissimilarity function is assumed to put a lower bound on the mean-payoff function from below at each maxima. We also assume that the decision maker is able to cover the space of arms in a recursive manner, successively refining the regions in the covering such that the diameters of these sets shrink at a known geometric rate when measured with the dissimilarity. ∗Csaba Szepesv´ari is on leave from MTA SZTAKI. He also greatly acknowledges the support received from the Alberta Ingenuity Fund, iCore and NSERC. 1 Our work generalizes and improves previous works on continuum-armed bandit problems: Kleinberg [6] and Auer et al. [2] focussed on one-dimensional problems. Recently, Kleinberg et al. [7] considered generic metric spaces assuming that the mean-payoff function is Lipschitz with respect to the (known) metric of the space. They proposed an interesting algorithm that achieves essentially the best possible regret in a minimax sense with respect to these environments. The goal of this paper is to further these works in a number of ways: (i) we allow the set of arms to be a generic topological space; (ii) we propose a practical algorithm motivated by the recent very successful tree-based optimization algorithms [8; 5; 4] and show that the algorithm is (iii) able to exploit higher order smoothness. In particular, as we shall argue in Section 7, (i) improves upon the results of Auer et al. [2], while (i), (ii) and (iii) improve upon the work of Kleinberg et al. [7]. Compared to Kleinberg et al. [7], our work represents an improvement in the fact that just like Auer et al. [2] we make use of the local properties of the mean-payoff function around the maxima only, and not a global property, such as Lipschitzness in the whole space. This allows us to obtain a regret which scales as eO(√n) 1 when e.g. the space is the unit hypercube and the mean-payoff function is locally H¨older with known exponent in the neighborhood of any maxima (which are in finite number) and bounded away from the maxima outside of these neighborhoods. Thus, we get the desirable property that the rate of growth of the regret is independent of the dimensionality of the input space. We also prove a minimax lower bound that matches our upper bound up to logarithmic factors, showing that the performance of our algorithm is essentially unimprovable in a minimax sense. Besides these theoretical advances the algorithm is anytime and easy to implement. Since it is based on ideas that have proved to be efficient, we expect it to perform well in practice and to make a significant impact on how on-line global optimization is performed. 2 Problem setup, notation We consider a topological space X, whose elements will be referred to as arms. A decision maker “pulls” the arms in X one at a time at discrete time steps. Each pull results in a reward that depends on the arm chosen and which the decision maker learns of. The goal of the decision maker is to choose the arms so as to maximize the sum of the rewards that he receives. In this paper we are concerned with stochastic environments. Such an environment M associates to each arm x ∈X a distribution Mx on the real line. The support of these distributions is assumed to be uniformly bounded with a known bound. For the sake of simplicity, we assume this bound is 1. We denote by f(x) the expectation of Mx, which is assumed to be measurable (all measurability concepts are with respect to the Borel-algebra over X). The function f : X →R thus defined is called the mean-payoff function. When in round n the decision maker pulls arm Xn ∈X, he receives a reward Yn drawn from MXn, independently of the past arm choices and rewards. A pulling strategy of a decision maker is determined by a sequence ϕ = (ϕn)n≥1 of measurable mappings, where each ϕn maps the history space Hn = X × [0, 1] n−1 to the space of probability measures over X. By convention, ϕ1 does not take any argument. A strategy is deterministic if for every n the range of ϕn contains only Dirac distributions. According to the process that was already informally described, a pulling strategy ϕ and an environment M jointly determine a random process (X1, Y1, X2, Y2, . . .) in the following way: In round one, the decision maker draws an arm X1 at random from ϕ1 and gets a payoff Y1 drawn from MX1. In round n ≥2, first, Xn is drawn at random according to ϕn(X1, Y1, . . . , Xn−1, Yn−1), but otherwise independently of the past. Then the decision maker gets a rewards Yn drawn from MXn, independently of all other random variables in the past given Xn. Let f ∗= supx∈X f(x) be the maximal expected payoff. The cumulative regret of a pulling strategy in environment M is bRn = n f ∗−Pn t=1 Yt, and the cumulative pseudo-regret is Rn = n f ∗−Pn t=1 f(Xt). 1We write un = eO(vu) when un = O(vn) up to a logarithmic factor. 2 In the sequel, we restrict our attention to the expected regret E [Rn], which in fact equals E[ bRn], as can be seen by the application of the tower rule. 3 The Hierarchical Optimistic Optimization (HOO) strategy 3.1 Trees of coverings We first introduce the notion of a tree of coverings. Our algorithm will require such a tree as an input. Definition 1 (Tree of coverings). A tree of coverings is a family of measurable subsets (Ph,i)1≤i≤2h, h≥0 of X such that for all fixed integer h ≥0, the covering ∪1≤i≤2hPh,i = X holds. Moreover, the elements of the covering are obtained recursively: each subset Ph,i is covered by the two subsets Ph+1,2i−1 and Ph+1,2i. A tree of coverings can be represented, as the name suggests, by a binary tree T . The whole domain X = P0,1 corresponds to the root of the tree and Ph,i corresponds to the i–th node of depth h, which will be referred to as node (h, i) in the sequel. The fact that each Ph,i is covered by the two subsets Ph+1,2i−1 and Ph+1,2i corresponds to the childhood relationship in the tree. Although the definition allows the childregions of a node to cover a larger part of the space, typically the size of the regions shrinks as depth h increases (cf. Assumption 1). Remark 1. Our algorithm will instantiate the nodes of the tree on an ”as needed” basis, one by one. In fact, at any round n it will only need n nodes connected to the root. 3.2 Statement of the HOO strategy The algorithm picks at each round a node in the infinite tree T as follows. In the first round, it chooses the root node (0, 1). Now, consider round n + 1 with n ≥1. Let us denote by Tn the set of nodes that have been picked in previous rounds and by Sn the nodes which are not in Tn but whose parent is. The algorithm picks at round n + 1 a node (Hn+1, In+1) ∈Sn according to the deterministic rule that will be described below. After selecting the node, the algorithm further chooses an arm Xn+1 ∈PHn+1,In+1. This selection can be stochastic or deterministic. We do not put any further restriction on it. The algorithm then gets a reward Yn+1 as described above and the procedure goes on: (Hn+1, In+1) is added to Tn to form Tn+1 and the children of (Hn+1, In+1) are added to Sn to give rise to Sn+1. Let us now turn to how (Hn+1, In+1) is selected. Along with the nodes the algorithm stores what we call B–values. The node (Hn+1, In+1) ∈Sn to expand at round n + 1 is picked by following a path from the root to a node in Sn, where at each node along the path the child with the larger B–value is selected (ties are broken arbitrarily). In order to define a node’s B–value, we need a few quantities. Let C(h, i) be the set that collects (h, i) and its descendants. We let Nh,i(n) = n X t=1 I{(Ht,It)∈C(h,i)} be the number of times the node (h, i) was visited. A given node (h, i) is always picked at most once, but since its descendants may be picked afterwards, subsequent paths in the tree can go through it. Consequently, 1 ≤Nh,i(n) ≤n for all nodes (h, i) ∈Tn. Let bµh,i(n) be the empirical average of the rewards received for the time-points when the path followed by the algorithm went through (h, i): bµh,i(n) = 1 Nh,i(n) n X t=1 Yt I{(Ht,It)∈C(h,i)}. The corresponding upper confidence bound is by definition Uh,i(n) = bµh,i(n) + s 2 ln n Nh,i(n) + ν1ρh, 3 where 0 < ρ < 1 and ν1 > 0 are parameters of the algorithm (to be chosen later by the decision maker, see Assumption 1). For nodes not in Tn, by convention, Uh,i(n) = +∞. Now, for a node (h, i) in Sn, we define its B–value to be Bh,i(n) = +∞. The B–values for nodes in Tn are given by Bh,i(n) = min n Uh,i(n), max  Bh+1,2i−1(n), Bh+1,2i(n) o . Note that the algorithm is deterministic (apart, maybe, from the arbitrary random choice of Xt in PHt,It). Its total space requirement is linear in n while total running time at round n is at most quadratic in n, though we conjecture that it is O(n log n) on average. 4 Assumptions made on the model and statement of the main result We suppose that X is equipped with a dissimilarity ℓ, that is a non-negative mapping ℓ: X 2 →R satisfying ℓ(x, x) = 0. The diameter (with respect to ℓ) of a subset A of X is given by diam A = supx,y∈A ℓ(x, y). Given the dissimilarity ℓ, the “open” ball with radius ε > 0 and center c ∈X is B(c, ε) = { x ∈X : ℓ(c, x) < ε } (we do not require the topology induced by ℓto be related to the topology of X.) In what follows when we refer to an (open) ball, we refer to the ball defined with respect to ℓ. The dissimilarity will be used to capture the smoothness of the mean-payoff function. The decision maker chooses ℓand the tree of coverings. The following assumption relates this choice to the parameters ρ and ν1 of the algorithm: Assumption 1. There exist ρ < 1 and ν1, ν2 > 0 such that for all integers h ≥0 and all i = 1, . . . , 2h, the diameter of Ph,i is bounded by ν1ρh, and Ph,i contains an open ball P′ h,i of radius ν2ρh. For a given h, the P′ h,i are disjoint for 1 ≤i ≤2h. Remark 2. A typical choice for the coverings in a cubic domain is to let the domains be hyper-rectangles. They can be obtained, e.g., in a dyadic manner, by splitting at each step hyper-rectangles in the middle along their longest side, in an axis parallel manner; if all sides are equal, we split them along the first axis. In this example, if X = [0, 1]D and ℓ(x, y) = ∥x −y∥α then we can take ρ = 2−α/D, ν1 = ( √ D/2)α and ν2 = 1/8α. The next assumption concerns the environment. Definition 2. We say that f is weakly Lipschitz with respect to ℓif for all x, y ∈X, f ∗−f(y) ≤f ∗−f(x) + max  f ∗−f(x), ℓ(x, y) . (1) Note that weak Lipschitzness is satisfied whenever f is 1–Lipschitz, i.e., for all x, y ∈X, one has |f(x) − f(y)| ≤ℓ(x, y). On the other hand, weak Lipschitzness implies local (one-sided) 1–Lipschitzness at any maxima. Indeed, at an optimal arm x∗(i.e., such that f(x∗) = f ∗), (1) rewrites to f(x∗) −f(y) ≤ ℓ(x∗, y). However, weak Lipschitzness does not constraint the growth of the loss in the vicinity of other points. Further, weak Lipschitzness, unlike Lipschitzness, does not constraint the local decrease of the loss at any point. Thus, weak-Lipschitzness is a property that lies somewhere between a growth condition on the loss around optimal arms and (one-sided) Lipschitzness. Note that since weak Lipschitzness is defined with respect to a dissimilarity, it can actually capture higher-order smoothness at the optima. For example, f(x) = 1 −x2 is weak Lipschitz with the dissimilarity ℓ(x, y) = c(x −y)2 for some appropriate constant c. Assumption 2. The mean-payoff function f is weakly Lipschitz. Let f ∗ h,i = supx∈Ph,i f(x) and ∆h,i = f ∗−f ∗ h,i be the suboptimality of node (h, i). We say that a node (h, i) is optimal (respectively, suboptimal) if ∆h,i = 0 (respectively, ∆h,i > 0). Let Xε def = { x ∈X : f(x) ≥f ∗−ε } be the set of ε-optimal arms. The following result follows from the definitions; a proof can be found in the appendix. 4 Lemma 1. Let Assumption 1 and 2 hold. If the suboptimality ∆h,i of a region is bounded by cν1ρh for some c > 0, then all arms in Ph,i are max{2c, c + 1}ν1ρh-optimal. The last assumption is closely related to Assumption 2 of Auer et al. [2], who observed that the regret of a continuum-armed bandit algorithm should depend on how fast the volume of the sets of ε-optimal arms shrinks as ε →0. Here, we capture this by defining a new notion, the near-optimality dimension of the mean-payoff function. The connection between these concepts, as well as the zooming dimension defined by Kleinberg et al. [7] will be further discussed in Section 7. Define the packing number P(X, ℓ, ε) to be the size of the largest packing of X with disjoint open balls of radius ε with respect to the dissimilarity ℓ.2 We now define the near-optimality dimension, which characterizes the size of the sets Xε in terms of ε, and then state our main result. Definition 3. For c > 0 and ε0 > 0, the (c, ε0)–near-optimality dimension of f with respect to ℓequals inf n d ∈[0, +∞) : ∃C s.t. ∀ε ≤ε0, P Xcε, ℓ, ε  ≤C ε−do (2) (with the usual convention that inf ∅= +∞). Theorem 1 (Main result). Let Assumptions 1 and 2 hold and assume that the (4ν1/ν2, ν2)–near-optimality dimension of the considered environment is d < +∞. Then, for any d′ > d there exists a constant C(d′) such that for all n ≥1, ERn ≤C(d′) n(d′+1)/(d′+2) ln n 1/(d′+2) . Further, if the near-optimality dimension is achieved, i.e., the infimum is achieved in (2), then the result holds also for d′ = d. Remark 3. We can relax the weak-Lipschitz property by requiring it to hold only locally around the maxima. In fact, at the price of increased constants, the result continues to hold if there exists ε > 0 such that (1) holds for any x, y ∈Xε. To show this we only need to carefully adapt the steps of the proof below. We omit the details from this extended abstract. 5 Analysis of the regret and proof of the main result We first state three lemmas, whose proofs can be found in the appendix. The proofs of Lemmas 3 and 4 rely on concentration-of-measure techniques, while that of Lemma 2 follows from a simple case study. Let us fix some path (0, 1), (1, i∗ 1), ..., (h, i∗ h), ..., of optimal nodes, starting from the root. Lemma 2. Let (h, i) be a suboptimal node. Let k be the largest depth such that (k, i∗ k) is on the path from the root to (h, i). Then we have E  Nh,i(n)  ≤u+ n X t=u+1 P n Nh,i(t) > u and  Uh,i(t) > f ∗or Us,i∗ s ≤f ∗for some s ∈{k+1, . . . , t−1} o . Lemma 3. Let Assumptions 1 and 2 hold. Then, for all optimal nodes and for all integers n ≥ 1, P  Uh,i(n) ≤f ∗ ≤n−3. Lemma 4. Let Assumptions 1 and 2 hold. Then, for all integers t ≤n, for all suboptimal nodes (h, i) such that ∆h,i > ν1ρh, and for all integers u ≥1 such that u ≥ 8 ln n (∆h,i−ν1ρh)2 , one has P  Uh,i(t) > f ∗and Nh,i(t) > u ≤t n−4. 2Note that sometimes packing numbers are defined as the largest packing with disjoint open balls of radius ε/2, or, ε-nets. 5 Taking u as the integer part of (8 ln n)/(∆h,i −ν1ρh)2, and combining the results of Lemma 2, 3, and 4 with a union bound leads to the following key result. Lemma 5. Under Assumptions 1 and 2, for all suboptimal nodes (h, i) such that ∆h,i > ν1ρh, we have, for all n ≥1, E[Nh,i(n)] ≤ 8 ln n (∆h,i −ν1ρh)2 + 2 n . We are now ready to prove Theorem 1. Proof. For the sake of simplicity we assume that the infimum in the definition of near-optimality is achieved. To obtain the result in the general case one only needs to replace d below by d′ > d in the proof below. First step. For all h = 1, 2, . . ., denote by Ih the nodes at depth h that are 2ν1ρh–optimal, i.e., the nodes (h, i) such that f ∗ h,i ≥f ∗−2ν1ρh. Then, I is the union of these sets of nodes. Further, let J be the set of nodes that are not in I but whose parent is in I. We then denote by Jh the nodes in J that are located at depth h in the tree. Lemma 4 bounds the expected number of times each node (h, i) ∈Jh is visited. Since ∆h,i > 2ν1ρh, we get E  Nh,i(n)  ≤8 ln n ν2 1ρ2h + 2 n . Second step. We bound here the cardinality |Ih|, h > 0. If (h, i) ∈Ih then since ∆h,i ≤2ν1ρh, by Lemma 1 Ph,i ⊂X4ν1ρh. Since by Assumption 1, the sets (Ph,i), for (h, i) ∈Ih, contain disjoint balls of radius ν2ρh, we have that |Ih| ≤P ∪(h,i)∈IhPh,i, ℓ, ν2ρh ≤P X(4ν1/ν2) ν2ρh, ℓ, ν2ρh ≤C ν2ρh−d , where we used the assumption that d is the (4ν1/ν2, ν2)–near-optimality dimension of f (and C is the constant introduced in the definition of the near-optimality dimension). Third step. Choose η > 0 and let H be the smallest integer such that ρH ≤η. We partition the infinite tree T into three sets of nodes, T = T1 ∪T2 ∪T3. The set T1 contains nodes of IH and their descendants, T2 = ∪0≤h<HIh, and T3 contains the nodes ∪1≤h≤HJh and their descendants. (Note that T1 and T3 are potentially infinite, while T2 is finite.) We denote by (Ht, It) the node that was chosen by the forecaster at round t to pick Xt. From the definition of the forecaster, no two such random variables are equal, since each node is picked at most once. We decompose the regret according to the element Tj where the chosen nodes (Ht, It) belong to: E  Rn  = E " n X t=1 (f ∗−f(Xt)) # = E  Rn,1  + E  Rn,2  + E  Rn,3  , where for all i = 1, 2, 3, Rn,i = n X t=1 (f ∗−f(Xt))I{(Ht,It)∈Ti} . The contribution from T1 is easy to bound. By definition any node in IH is 2ν1ρH-optimal. Hence, by Lemma 1 the corresponding domain is included in X4ν1ρH. The domains of these nodes’ descendants are of course still included in X4ν1ρH. Therefore, E[Rn,1] ≤4nν1ρH. For h ≥1, consider a node (h, i) ∈T2. It belongs to Ih and is therefore 2ν1ρh–optimal. By Lemma 1, the corresponding domain is included in X4ν1ρh. By the result of the second step and using that each node is played at most once, one gets E  Rn,2  ≤ H−1 X h=0 4ν1ρh |Ih| ≤4ν1C ν−d 2 H−1 X h=0 ρh(1−d) . 6 We finish with the contribution from T3. We first remark that since the parent of any element (h, i) ∈Jh is in Ih−1, by Lemma 1 again, we have that Ph,i ⊂X4ν1ρh−1. To each node (Ht, It) played in T3, we associate the element (H′ t, I′ t) of some Jh on the path from the root to (Ht, It). When (Ht, It) is played, the chosen arm Xt belongs also to PH′ t,I′ t. Decomposing Rn,3 according to the elements of ∪1≤h≤HJh, we then bound the regret from T3 as E  Rn,3  ≤ H X h=1 4ν1ρh−1 X i : (h,i)∈Jh E  Nh,i(n)  ≤ H X h=1 4ν1ρh−1 |Jh| 8 ln n ν2 1ρ2h + 2 n  where we used the result of the first step. Now, it follows from that fact that the parent of Jh is in Ih−1 that |Jh| ≤2|Ih−1|. Substituting this and the bound on |Ih−1|, we get E  Rn,3  ≤8ν1C ν−d 2 H X h=1 ρh(1−d)+d−1 8 ln n ν2 1ρ2h + 2 n  . Fourth step. Putting things together, we have proved E  Rn  ≤ 4nν1ρH + 4ν1C ν−d 2 H−1 X h=0 ρh(1−d) + 8ν1C ν−d 2 H X h=1 ρh(1−d)+d−1  8 ln n ν2 1ρ2h + 2 n  = O nρH + (ln n) H X h=1 ρ−h(1+d) ! = O  nρH + ρ−H(1+d) ln n  = O  n(d+1)/(d+2) (ln n)1/(d+2) by using first that ρ < 1 and then, by optimizing over ρH (the worst value being ρH ∼( n ln n)−1/(d+2)). 6 Minimax optimality The packing dimension of a set X is the smallest d such that there exists a constant k such that for all ε > 0, P X, ℓ, ε  ≤k ε−d. For instance, compact subsets of Rd (with non-empty interior) have a packing dimension of d whenever ℓis a norm. If X has a packing dimension of d, then all environments have a near-optimality dimension less than d. The proof of the main theorem indicates that the constant C(d) only depends on d, k (of the definition of packing dimension), ν1, ν2, and ρ, but not on the environment as long as it is weakly Lipschitz. Hence, we can extract from it a distribution-free bound of the form eO(n(d+1)/(d+2)). In fact, this bound can be shown to be optimal as is illustrated by the theorem below, whose assumptions are satisfied by, e.g., compact subsets of Rd and if ℓis some norm of Rd. The proof can be found in the appendix. Theorem 2. If X is such that there exists c > 0 with P(X, ℓ, ε) ≥c ε−d ≥2 for all ε ≤1/4 then for all n ≥4d−1 c/ ln(4/3), all strategies ϕ are bound to suffer a regret of at least sup E Rn(ϕ) ≥1 4 1 4 r c 4 ln(4/3) 2/(d+2) n(d+1)/(d+2), where the supremum is taken over all environments with weakly Lipschitz payoff functions. 7 Discussion Several works [1; 6; 3; 2; 7] have considered continuum-armed bandits in Euclidean or metric spaces and provided upper- and lower-bounds on the regret for given classes of environments. Cope [3] derived a regret of eO(√n) for compact and convex subset of Rd and a mean-payoff function with unique minima and second order smoothness. Kleinberg [6] considered mean-payoff functions f on the real line that are H¨older with degree 0 < α ≤1. The derived regret is Θ(n(α+1)/(α+2)). Auer et al. [2] extended the analysis to classes of functions with only a local H¨older assumption around maximum (with possibly higher smoothness degree α ∈[0, ∞)), and derived the regret Θ(n 1+α−αβ 1+2α−αβ ), where β is such that the Lebesgue measure of ε-optimal 7 states is O(εβ). Another setting is that of [7] who considered a metric space (X, ℓ) and assumed that f is Lipschitz w.r.t. ℓ. The obtained regret is eO(n(d+1)/(d+2)) where d is the zooming dimension (defined similarly to our near-optimality dimension, but using covering numbers instead of packing numbers and the sets Xε \ Xε/2). When (X, ℓ) is a metric space covering and packing numbers are equivalent and we may prove that the zooming dimension and near-optimality dimensions are equal. Our main contribution compared to [7] is that our weak-Lipschitz assumption, which is substantially weaker than the global Lipschitz assumption assumed in [7], enables our algorithm to work better in some common situations, such as when the mean-payoff function assumes a local smoothness whose order is larger than one. In order to relate all these results, let us consider a specific example: Let X = [0, 1]D and assume that the mean-reward function f is locally equivalent to a H¨older function with degree α ∈[0, ∞) around any maxima x∗of f (the number of maxima is assumed to be finite): f(x∗) −f(x) = Θ(||x −x∗||α) as x →x∗. (3) This means that ∃c1, c2, ε0 > 0, ∀x, s.t. ||x −x∗|| ≤ε0, c1||x −x∗||α ≤f(x∗) −f(x) ≤c2||x −x∗||α. Under this assumption, the result of Auer et al. [2] shows that for D = 1, the regret is Θ(√n) (since here β = 1/α). Our result allows us to extend the √n regret rate to any dimension D. Indeed, if we choose our dissimilarity measure to be ℓα(x, y) def = ||x −y||α, we may prove that f satisfies a locally weak-Lipschitz condition (as defined in Remark 3) and that the near-optimality dimension is 0. Thus our regret is eO(√n), i.e., the rate is independent of the dimension D. In comparison, since Kleinberg et al. [7] have to satisfy a global Lipschitz assumption, they can not use ℓα when α > 1. Indeed a function globally Lipschitz with respect to ℓα is essentially constant. Moreover ℓα does not define a metric for α > 1. If one resort to the Euclidean metric to fulfill their requirement that f be Lipschitz w.r.t. the metric then the zooming dimension becomes D(α −1)/α, while the regret becomes eO(n(D(α−1)+α)/(D(α−1)+2α)), which is strictly worse than eO(√n) and in fact becomes close to the slow rate eO(n(D+1)/(D+2)) when α is larger. Nevertheless, in the case of α ≤1 they get the same regret rate. In contrast, our result shows that under very weak constraints on the mean-payoff function and if the local behavior of the function around its maximum (or finite number of maxima) is known then global optimization suffers a regret of order eO(√n), independent of the space dimension. As an interesting sidenote let us also remark that our results allow different smoothness orders along different dimensions, i.e., heterogenous smoothness spaces. References [1] R. Agrawal. The continuum-armed bandit problem. SIAM J. Control and Optimization, 33:1926–1951, 1995. [2] P. Auer, R. Ortner, and Cs. Szepesv´ari. Improved rates for the stochastic continuum-armed bandit problem. 20th Conference on Learning Theory, pages 454–468, 2007. [3] E. Cope. Regret and convergence bounds for immediate-reward reinforcement learning with continuous action spaces. Preprint, 2004. [4] P.-A. Coquelin and R. Munos. Bandit algorithms for tree search. In Proceedings of 23rd Conference on Uncertainty in Artificial Intelligence, 2007. [5] S. Gelly, Y. Wang, R. Munos, and O. Teytaud. Modification of UCT with patterns in Monte-Carlo go. Technical Report RR-6062, INRIA, 2006. [6] R. Kleinberg. Nearly tight bounds for the continuum-armed bandit problem. In 18th Advances in Neural Information Processing Systems, 2004. [7] R. Kleinberg, A. Slivkins, and E. Upfal. Multi-armed bandits in metric spaces. In Proceedings of the 40th ACM Symposium on Theory of Computing, 2008. [8] L. Kocsis and Cs. Szepesv´ari. Bandit based Monte-Carlo planning. In Proceedings of the 15th European Conference on Machine Learning, pages 282–293, 2006. 8
2008
234
3,492
Variational Mixture of Gaussian Process Experts Chao Yuan and Claus Neubauer Siemens Corporate Research Integrated Data Systems Department 755 College Road East, Princeton, NJ 08540 {chao.yuan,claus.neubauer}@siemens.com Abstract Mixture of Gaussian processes models extended a single Gaussian process with ability of modeling multi-modal data and reduction of training complexity. Previous inference algorithms for these models are mostly based on Gibbs sampling, which can be very slow, particularly for large-scale data sets. We present a new generative mixture of experts model. Each expert is still a Gaussian process but is reformulated by a linear model. This breaks the dependency among training outputs and enables us to use a much faster variational Bayesian algorithm for training. Our gating network is more flexible than previous generative approaches as inputs for each expert are modeled by a Gaussian mixture model. The number of experts and number of Gaussian components for an expert are inferred automatically. A variety of tests show the advantages of our method. 1 Introduction Despite of its widespread success in regression problems, Gaussian process (GP) has two limitations. First, it cannot handle data with multi-modality. Multi-modality can exist in the input dimension (e.g., non-stationarity), in the output dimension (given the same input, the output has multiple modes), or in a combination of both. Secondly, the cost of training is O(N 3), where N is the size of the training set, which can be too expensive for large data sets. Mixture of GP experts models were proposed to tackle the above problems (Rasmussen & Ghahramani [1]; Meeds & Osindero [2]). Monte Carlo Markov Chain (MCMC) sampling methods (e.g., Gibbs sampling) are the standard approaches to train these models, which theoretically can achieve very accurate results. However, MCMC methods can be slow to converge and their convergence can be difficult to diagnose. It is thus important to explore alternatives. In this paper, we propose a new generative mixture of Gaussian processes model for regression problems and apply variational Bayesian methods to train it. Each Gaussian process expert is described by a linear model, which breaks the dependency among training outputs and makes variational inference feasible. The distribution of inputs for each expert is modeled by a Gaussian mixture model (GMM). Thus, our gating network can handle missing inputs and is more flexible than single Gaussian-based gating models [2-4]. The number of experts and the number of components for each GMM are automatically inferred. Training using variational methods is much faster than using MCMC. The rest of this paper is organized as follows. Section 2 surveys the related work. Section 3 describes the proposed algorithm. We present test results in Section 4 and summarize this paper in Section 5. 2 Related work Gaussian process is a powerful tool for regression problems (Rasmussen & Williams [5]). It elegantly models the dependency among data with a Gaussian distribution: P(Y) = N(Y|0, K+σ2 nI), 1 mlc Rlc m0 R0 r S ql αx p αy vl θl γl a b Il z x t y L C Figure 1: The graphical model representation for the proposed mixture of experts model. It consists of a hyperparameter set Θ = {L, αy, C, αx, m0, R0, r, S, θ1:L, I1:L, a, b} and a parameter set Ψ = {p, ql, mlc, Rlc, vl, γl | l = 1, 2, ..., L and c = 1, 2, ..., C}. The local expert is a GP linear model to predict output y from input x; the gating network is a GMM for input x. Data can be generated as follows. Step 1, determine hyperparameters Θ. Step 2, sample parameters Ψ. Step 3, to sample one data point x and y, we sequentially sample expert indicator t, cluster indicator z, x and y. Step 3 is independently repeated until enough data points are generated. where Y = {y1:N} are N training outputs and I is an identity matrix. We will use y1:N to denote y1, y2, ..., yN. The kernel matrix K considered here consists of kernel functions between pairs of inputs xi and xj: Kij = k(xi, xj) = σ2 f exp(−Pd m=1 1/(2σ2 gm)(xim −xjm)2), where d is the dimension of the input x. The d + 2 hyperparameters σn, σf, σg1, σg2, ..., σgd can be efficiently estimated from the data. However, Gaussian process has difficulties in modeling large-scale data and multi-modal data. The first issue was addressed by various sparse Gaussian processes [6-9, 16]. The mixture of experts (MoE) framework offers a natural solution for multi-modality problems (Jacobs et al. [10]). Early MoE work used linear experts [3, 4, 11, 12] and some of them were neatly trained via variational methods [4, 11, 12]. However, these methods cannot model nonlinear data sets well. Tresp [13] proposed a mixture of GPs model that can be trained fast using the EM algorithm. However, hyperparameters including the number of experts needed to be specified and the training complexity issue was not addressed. By introducing the Dirichlet process mixture (DPM) prior, infinite mixture of GPs models are able to infer the number of experts, both hyperparameters and parameters via Gibbs sampling [1, 2]. However, these models are trained by MCMC methods, which demand expensive training and testing time (as collected samples are usually combined to give predictive distributions). How to select samples and how many samples to be used are still challenging problems. 3 Algorithm description Fig.1 shows the graphical model of the proposed mixture of experts. It consists of the local expert part and gating network part, which are covered in Sections 3.1 and 3.2, respectively. In Section 3.3, we describe how to perform variational inference of this model. 3.1 Local Gaussian process expert A local Gaussian process expert is specified by the following linear model given the expert indicator t = l (where l = 1 : L) and other related variables: P(y|x, t = l, vl, θl, Il, γl) = N(y|vT l φl(x), γ−1 l ). (1) This linear model is symbolized by the inner product of the weight vector vl and a nonlinear feature vector φl(x). φl(x) is a vector of kernel functions between a test input x and a subset of training inputs: [kl(x, xIl1), kl(x, xIl2), ..., kl(x, xIlM )]T . The active set Il denotes the indices of selected M training samples. How to select Il will be addressed in Section 3.3; for now let us assume that we use the whole training set as the active set. vl has a Gaussian distribution N(vl|0, U−1 l ) with 0 mean and inverse covariance Ul. Ul is set to Kl + σ2 hlI, where Kl is a M × M kernel matrix consisting of kernel functions between training samples in the active set. σ2 hl is needed to avoid singularity of Ul. θl = {σhl, σfl, σgl1, σgl2, ..., σgld} denotes the set of hyperparameters for this 2 linear model. Note that φl(x) depends on θl. γl is the inverse variance of this linear model. The prior of γl is set as a Gamma distribution: Γ(γl|a, b) ∝baγa−1 l e−bγl with hyperparameters a and b. It is easy to see that for each expert, y is a Gaussian process defined on x. Such a linear model was proposed by Silverman [14] and was used by sparse Gaussian process models [6, 8]. If we set σ2 hl = 0 and γl = 1 σ2 nl , the joint distribution of the training outputs Y, assuming they are from the same expert l, can be proved to be N(Y|0, Kl + σ2 nlI). This has exactly the same form of a regular Gaussian process. However, the largest advantage of this linear model is that it breaks the dependency of y1:N once t1:N are given; i.e., P(y1:N|x1:N, t1:N, v1:L, θ1:L, I1:L, γ1:L) = QN n=1 P(yn|xn, tn = l, vl, θl, Il, γl). This makes the variational inference of the mixture of Gaussian processes feasible. 3.2 Gating network A gating network determines which expert to use based on input x. We consider a generative gating network, where expert indicator t is generated by a categorical distribution P(t = l) = pl. p = [p1 p2 ... pL] is given a symmetric Dirichlet distribution P(p) = Dir(p|αy/L, αy/L, ..., αy/L). Given expert indicator t = l, we assume that x follows a Gaussian mixture model (GMM) with C components. Each component (cluster) is modeled by a Gaussian distribution P(x|t = l, z = c, mlc, Rlc) = N(x|mlc, R−1 lc ). z is the cluster indicator which has a categorical distribution P(z = c|t = l, ql) = qlc. In addition, we give mlc a Gaussian prior N(mlc|m0, R−1 0 ), Rlc a Wishart prior W(Rlc|r, S) and ql a symmetric Dirichlet prior Dir(ql|αx/C, αx/C, ..., αx/C). In previous generative gating networks [2-4], the expert indicator also acts as the cluster indicator (or t = z) such that inputs for an expert can only have one Gaussian distribution. In comparison, our model is more flexible by modeling inputs x for each expert as a Gaussian mixture distribution. One can also put prior (e.g., inverse Gamma distribution) on αx and αy as done in [1, 2, 15]. In this paper we treat them as fixed hyperparameters. 3.3 Variational inference Variational EM algorithm Given a set of training data D = {(xn, yn) | n = 1 : N}, the task of learning is to estimate unknown hyperparameters and infer posterior distribution of parameters. This problem is nicely addressed by the variational EM algorithm. The objective is to maximize log P(D|Θ) over hyperparameters Θ. Parameters Ψ, expert indicators T = {t1:N} and cluster indicators Z = {z1:N} are treated as hidden variables, denoted by Ω= {Ψ, T, Z}. It is possible to estimate all hyperparameters via the EM algorithm. However, most of the hyperparameters are generic and are thus fixed as follows. m0 and R0 are set to be the mean and inverse covariance of the training inputs, respectively. We fix degree of freedom r = d and the scale matrix S = 100I for the Wishart distribution. αx, αy, C and L are all set to 10. Following Bishop & Svens´en [12], we set a = 0.01 and b = 0.0001. Such settings give broad priors to the parameters and make our model sufficiently flexible. Our algorithm is not found to be sensitive to these generic hyperparameters. The only hyperparameters remain to be estimated are Θ = {θ1:L, I1:L}. Note that these GP-related hyperparameters are problem specific and should not be assumed known. In the E-step, based on the current estimates of Θ, posterior probability of hidden variables P(Ω|D, Θ) is computed. Variational inference is involved in this step by approximating P(Ω|D, Θ) with a factorized distribution Q(Ω) = Y l,c Q(mlc)Q(Rlc) Y l Q(ql)Q(vl)Q(γl)Q(p) Y n Q(tn, zn). (2) Each hidden variable has the same type of posterior distribution as its conjugate prior. To compute the distribution for a hidden variable ωi, we need to compute the posterior mean of log P(D, Ω|Θ) over all hidden variables except ωi: ⟨log P(D, Ω|Θ)⟩Ω/ωi. The derivation is standard and is thus omitted. Variational inference for each hidden variable takes linear time with respect to N, C and L, because the factorized form of P(D, Ω|Θ) leads to separation of hidden variables in log P(D, Ω|Θ). If we switch from our linear model to a regular Gaussian process, one will encounter a prohibitive 3 complexity of O(LN) for integrating log P(y1:N|x1:N, t1:N, Θ) over t1:N. Also note that C = L = 10 represents the maximum number of clusters and experts. The actual number is usually smaller. During iteration, if a cluster c for expert l does not have a single training sample supporting it (Q(tn = l, zn = c) > 0), this cluster and its associated parameters mlc and Rlc will be removed. Similarly, we remove an expert l if no Q(tn = l) > 0. These C and L choices are flexible enough for all our tests, but for more complicated data, larger values may be needed. In the M-step, we search for Θ which maximizes ⟨log P(D, Ω|Θ)⟩Ω. We employ the conjugate gradient method to estimate θ1:L similarly to [5]. Both E-step and M-step are repeated until the algorithm converges. For better efficiency, we do not select the active sets I1:L in each M-step; instead, we fix I1:L during the EM algorithm and only update I1:L once when the EM algorithm converges. The details are given after we introduce the algorithm initialization. Initialization Without proper initialization, variational methods can be easily trapped into local optima. Consequently, using pure randomization methods, one cannot rely on a single result, but has to run the algorithm multiple times and then either pick the best result [12] or average the results [11]. We present a new initialization method that only needs the algorithm to run once. Our method is based on the assumption that the combined data including x and y for an expert are usually distributed locally in the combined d + 1 dimensional space. Therefore, clustering methods such as k-mean can be used to cluster data, one cluster for one expert. Experts are initialized incrementally as follows. First, all training data are used to train one expert. Secondly, we cluster all training data into two clusters and train one expert per cluster. We do this four times and collect a total of L = 1 + 2 + 3 + 4 = 10 experts. Different experts represent different local portions of training data in different scales. Although our assumption may not be true in some cases (e.g., one expert’s data intersect with others), this initialization method does give us a meaningful starting point. In practice, we find it effective and reliable. Active set selection We now address the problem of selecting active set Il of size M in defining the feature vector φl for expert l. The posterior distribution Q(vl) can be proved to be Gaussian with inverse covariance eUl = ⟨γl⟩P n Tnlφl(xn)φl(xn)T + Kl + σ2 hlI and mean eµl = eU−1 l ⟨γl⟩P n Tnlynφl(xn). Tnl is an abbreviation for Q(tn = l) and ⟨γl⟩is the posterior mean of γl. Inverting eUl has a complexity of O(M 3). Thus, for small data sets, the active set can be set to the full training set (M = N). But for large data sets, we have to select a subset with M < N. The active set Il is randomly initialized. With Il fixed, we run the variational EM algorithm and obtain Q(Ω) and Θ. Now we want to improve our results by updating Il. Our method is inspired by the maximum a posteriori probability (MAP) used by sparse Gaussian processes [6, 8]. Specifically, the optimization target in our case is maxIl,vl P(vl|D) ≈Q(vl) with posterior distributions of other hidden variables fixed. The justification of this choice is that a good Il should be strongly supported by data D such that Q(vl) is highly peaked. Since Q(vl) is Gaussian, vl is always eµl at the optimal point and thus this optimization is equivalent to maximizing the determinant of the inverse covariance max Il | eUl| = |⟨γl⟩ X n Tnlφl(xn)φl(xn)T + Kl + σ2 hlI|. (3) Note that if Tnl is one for all n, our method turns into a MAP-based sparse Gaussian process. However, even in that case, our criterion maxIl,vl P(vl|D) differs from maxIl,vl P(D|vl)P(vl) derived in previous MAP-based work [6, 8]. First, the denominator P(D) is ignored by previous methods, which actually depends on Il. Secondly, |Kl + σ2 hlI| in P(vl) is also ignored in previous methods. For these reasons, previous methods are not real MAP estimation but its approximations. Looking for the global optimal active set with size M is not feasible. Thus, similarly to many sparse Gaussian processes, we consider a greedy algorithm by adding one index to Il each time. For a candidate index i, computing the new eUl requires O(NM); incremental updating Cholesky factorization of eUl requires O(M 2) and computing the new | eUl| needs O(1). Therefore, checking one candidate i takes O(NM). We consider selecting the best index from κ = 100 randomly selected candidates [6, 8], which makes the total time for adding one index O(κNM). For adding all M indices, the total time is O(κNM 2). Such a complexity is comparable to that of [6], but higher than those of [7, 8]. Note that this time is needed for each of the L experts. 4 In a summary, the variational EM algorithm with active set selection proceeds as follows. During initialization, training data are clustered and assigned to each expert by the k-mean clustering algorithm noted above; the data assigned to each expert is used for randomly selecting the active set and then training the linear model. During each iteration, we run variational EM to update parameters and hyperparameters; when the EM algorithm converges, we update the active set and Q(vl) for each expert. Such an iteration is repeated until convergence. It is also possible to define the feature vector φl(x) as [k(x, x1), k(x, x2), ..., k(x, xM)]T , where each x is a pseudo-input (Snelson & Ghahramani [9]). In this way, these pseudo-inputs X can be viewed as hyperparameters and can be optimized in the same variational EM algorithm without resorting to a separate update for active sets as we do. This is theoretically more sound. However, it leads to a large number of hyperparameters to be optimized. Although overfitting may not be an issue, the authors cautioned that this method can be vulnerable to local optima. Predictive distribution Once training is done, for a test input x∗, its predictive distribution P(y∗|x∗, D, Θ) is evaluated as following: P(y∗|x∗, D, Θ) = Z P(y∗|x∗, Ω, Θ)P(Ω|D, Θ)dΩ≈ Z P(y∗|x∗, Ω, Θ)Q(Ω)dΩ ≈P(y∗|x∗, ⟨p⟩, {⟨ql⟩}, {⟨mlc⟩}, {⟨Rlc⟩}, {⟨vl⟩}, {⟨γl⟩}, {θl}, {Il}). (4) The first approximation uses the results from the variational inference. Note that expert indicators T and cluster indicators Z are integrated out. Suppose that there are sufficient training data. Thus, the posterior distribution of all parameters are usually highly peaked. This leads to the second approximation, where the integral reduces to point evaluation at the posterior mean of each parameter. Eq.(4) can be easily computed using standard predictive algorithm for mixture of linear experts. See appendix for more details. 4 Test results For all data sets, we normalize each dimension of data to zero mean and unit variance before using them for training. After training, to plot fitting results, we de-normalize data into their original scales. Artificial toy data We consider the toy data set used by [2], which consists of four continuous functions covering input ranges (0, 15), (35, 60), (45, 80) and (80, 100), respectively. Different levels of noise (with standard deviations std = 7, 7, 4 and 2) are added to different functions. This is a challenging multi-modality problem in both input and output dimensions. Fig.2 (left) shows 400 points generated by this toy model, each point with a equal probability 0.25 to be assigned to one of the four functions. Using these 400 points as training data, our method found two experts that fit the data nicely. Fig.2 (left) shows the results. In general, expert one represents the last two functions while expert two represents the first two functions. One may desire to recover each function separately by an expert. However, note the fact that the first two functions have the same noise level (std = 7); so it is reasonable to use just one GP to model these two functions. In fact, we recovered a very close estimated std = 1/ p ⟨γ2⟩= 6.87 for the second expert. The stds of the last two functions are also close (4 vs. 2), and are also similar to 1/ p ⟨γ1⟩= 2.48 of the first expert. Note that the GP for expert one appears to fit the data of the first function comparably well to that of expert two. However, the gating network does not support this: the means of the GMM for expert one does not cover the region of the first function. Ref.[2] and our method performed similarly well in discovering different modalities in different input regions. We did not plot the mean of the predictive distribution as this data set has multiple modes in the output dimension. Our results were produced using an active set size M = 60. Larger active sets did not give appreciably better results. Motorcycle data Our algorithm was also applied to the 2D motorcycle data set [14], which contains 133 data points with input-dependent noise as shown in Fig.2 (right). Our algorithm yielded two experts with the first expert modeling the majority of the points and the second expert only depicting the beginning part. The estimated stds of the two experts are 23.46 and 2.21, respectively. This appears to correctly represent different levels of noise present in different parts of the data. 5 0 20 40 60 80 100 −100 −50 0 50 10 20 30 40 50 −150 −100 −50 0 50 100 data for expert 1 GP for expert 1 m for expert 1 data for expert 2 GP for expert 2 m for expert 2 mean of experts posterior samples Figure 2: Test results for toy data (left) and motorcycle data (right). Each data point is assigned to an expert l based on its posterior probability Q(tn = l) and is referred to as “data for expert l”. The means of the GMM for each expert are also shown at the bottom as “m for expert l”. In the right figure, the mean of the predictive distribution is shown as a solid line and samples drawn from the predictive distribution are shown as dots (100 samples for each of the 45 horizontal locations). We also plot the mean of the predictive distribution (4) in Fig.2 (right). Our mean result compares favorably with other methods using medians of mixtures [1, 2]. In particular, our result is similar to that of [1] at input ≤30. At input > 35, the result of [1] abruptly becomes flat while our result is smooth and appears to fit data better. The result of [2] is jagged, which may suggest using more Gibbs samples for smoother results. In terms of the full predictive (posterior) distribution (represented by samples in Fig.2 (right)), our results are better at input ≤40 as more artifacts are produced by [1, 2] (especially between 15 and 25). However, our results have more artifacts at input > 40 because that region shares the same std = 23.46 as the other region where input is between 15 and 40. The active set size of our method is set to 40. Training using matlab 7 on a Pentium 2.4 GHz machine took 20 seconds, compared to one hour spent by Gibbs sampling method [1]. Robot arm data We consider the two-link robot arm data set used by [12]. Fig.3 (left) shows the kinematics of such a 2D robot. The joint angles are limited to the ranges 0.3 ≤θ1 ≤1.2 and π/2 ≤θ2 ≤3π/2. Based on the forward kinematic equations (see [12]) the end point position (x1, x2) has a unique solution given values of joint angles (θ1, θ2). However, we are interested in the inverse kinematics problem: given the end point position, we want to estimate the joint angles. We randomly generated 2000 points based on the forward kinematics, with the first 1000 points for training and the remaining 1000 points for testing. Although noise can be added, we did not do so to make our results comparable to those of [12]. Since this problem involves predicting two correlated outputs at the same time, we used an independent set of local experts for each output but let these two outputs share the same gating network. This was easily adapted in our algorithm. Our algorithm found five experts vs. 16 experts used by [12]. The average number of GMM components is 3. We use residue plots [12] to present results (see Fig.3). Compared to that of [12], the first residue plot is much cleaner suggesting that our errors are much smaller. This is expected as we use more powerful GP experts vs. linear experts used by [12]. The second residue plot (not used in [12]) also gives clean result but is worse than the first plot. This is because the modality with the smaller posterior probability is more likely to be replaced by false positive modes. The active set size was set to 100. A larger size did not improve the results. DELVE data We applied our algorithm to three widely used DELVE data sets: Boston, Kin-8nm and Pumadyn-32nm. These data sets appear to be single modal because impressive results were achieved by a single GP. The purpose of this test is to check how our algorithm (intended for multimodality) handles single modality without knowing it. We followed the standard DELVE testing framework: for the Boston data, there are two tests each using 128 training examples; for both Kin-8nm and Pumadyn-32nm data, there are four tests, each using 1024 training examples. Table 1 shows the standardised squared errors for the test. The scores from all previous methods are copied from Waterhouse [11]. We used the full training set as the active set. Reducing the active 6 0 0.5 1 0 0.5 1 A B C θ1 θ2 0 0.5 1 0 0.5 1 0 0.5 1 0 0.5 1 Figure 3: Test results for robot arm data set. Left: illustration of the robot kinematics (adapted from [12]). Our task is to estimate the joint angles (θ1, θ2) based on the end point positions. In region B, there are two modalities for the same end point position. In regions A and C, there is only one modality. Middle: the first residue plot. For a test point, its predictive distribution is a Gaussian mixture. The mean of the Gaussian distribution with the highest probability was fed into the forward kinematics to obtain the estimated end point position. A line was drawn between the estimated and real end point positions; the length of the line indicates the magnitude of the error. The average line length (error) is a very small 0.00067 so many lines appear as dots. Right: the second residue plot using the mean of the Gaussian distribution with the second highest probability only for region B. The average line length is 0.001. Both residue plots are needed to check whether both modalities are detected correctly. Date sets gp mars mlp me vmgp Boston 0.194 ± 0.061 0.157 ± 0.009 0.159 ± 0.023 0.157 ± 0.002 Kin8nm 0.116 ± 0.006 0.460 ± 0.013 0.094 ± 0.013 0.182 ± 0.020 0.119 ± 0.005 Pum32nm 0.044 ± 0.009 0.061 ± 0.003 0.046 ± 0.023 0.701 ± 0.079 0.041 ± 0.005 Table 1: Standardised squared errors of different methods on the DELVE data sets. Our method (vmgp) is compared with a single Gaussian process trained using a maximum a posteriori method (gp), a bagged version of MARS (mars), a multi-layer perceptron trained using hybrid MCMC (mlp) and a committee of mixtures of linear experts (me) [11]. set compromised the results, suggesting that for these high dimensional data sets, a large number of training examples are required; and for the present training sets, each training example carries information not represented by others. We started with ten experts and found an average of 2, 1 and 2.75 experts for these data sets, respectively. The average number of GMM components for these data sets are 8.5, 10 and 9.5, respectively, indicating that more GMM components are needed for modeling higher dimensional inputs. Our results are comparable to and sometimes better than those of previous methods. Finally, to test how our active set selection algorithm performs, we conducted a standard test for sparse GPs: 7168 samples from Pumadyn-32nm were used for training and the remaining 1024 were for testing. The active set size M was varied from 10 to 150. The error was 0.0569 when M = 10, but quickly reduced to 0.0225, the same as the benchmark error in [7], when M = 25. We rapidly achieved 0.0196 at M = 50 and the error did not decrease after that. This result is better than that of [7] and comparable to the best result of [9]. 5 Conclusions We present a new mixture of Gaussian processes model and apply variational Bayesian method to train it. The proposed algorithm nicely addresses data multi-modality and training complexity issues of a single Gaussian process. Our method achieved comparable results to previous MCMCbased models on several 2D data sets. One future direction is to compare all algorithms using high dimensional data so we can draw more meaningful conclusions. However, one clear advantage of 7 our method is that training is much faster. This makes our method more suitable for many real-world applications where speed is critical. Our active set selection method works well on the Pumadyn-32nm data set. But this test was done in the context of mixture of GPs. To make a fair comparison to other sparse GPs, we can set L = 1 and also try more data sets. It is worthy noting that in the current implementation, the active set size M is fixed for all experts. This can be improved by using a smaller M for an expert with a smaller number of supporting training samples. Acknowledgments Thanks to Carl Rasmussen and Christopher Williams for sharing the GPML matlab package. Appendix Eq.(4) can be expressed as a weighted sum of all experts, where hyperparameters and parameters are omitted: P(y∗|x∗) = X l X c P(t∗= l, z∗= c|x∗)P(y∗|x∗, t∗= l). (A-1) The first term in (A-1) is the posterior probability for expert t∗= l and it is the sum of P(t∗= l, z∗= c|x∗) = P(x∗|t∗= l, z∗= c)P(t∗= l, z∗= c) P l′ P c′ P(x∗|t∗= l′, z∗= c′)P(t∗= l′, z∗= c′), (A-2) where P(t∗= l, z∗= c) = ⟨pl⟩⟨qlc⟩. The second term in (A-1) is the predictive probability for y∗given expert l, which is Gaussian. References [1] C. E. Rasmussen and Z. Ghahramani. Infinite mixtures of Gaussian process experts. In Advances in Neural Information Processing Systems 14. MIT Press, 2002. [2] E. Meeds and S. Osindero. An alternative infinite mixture of Gaussian process experts. In Advances in Neural Information Processing Systems 18. MIT Press, 2006. [3] L. Xu, M. I. Jordan, and G. E. Hinton. An alternative model for mixtures of experts. In Advances in Neural Information Processing Systems 7. MIT Press, 1995. [4] N. Ueda and Z. Ghahramani. Bayesian model search for mixture models based on optimizing variational bounds. Neural Networks, 15(10):1223–1241, 2002. [5] C. E. Rasmussen and C. K. I. Williams. Gaussian Processes for Machine Learning. MIT Press, 2006. [6] A. J. Smola and P. Bartlett. Sparse greedy Gaussian process regression. In Advances in Neural Information Processing Systems 13. MIT Press, 2001. [7] M. Seeger, C. K. I. Williams, and N. D. Lawrence. Fast forward selection to speed up sparse Gaussian process regression. In Workshop on Artificial Intelligence and Statistics 9, 2003. [8] S. S. Keerthi and W. Chu. A matching pursuit approach to sparse Gaussian process regression. In Advances in Neural Information Processing Systems 18. MIT Press, 2006. [9] E. Snelson and Z. Ghahramani. Sparse Gaussian processes using pseudo-inputs. In Advances in Neural Information Processing Systems 18. MIT Press, 2006. [10] R. A. Jacobs, M. I. Jordan, S. J. Nowlan, and G. E. Hinton. Adaptive mixture of local experts. Neural computation, 3:79–87, 1991. [11] S. Waterhouse. Classification and regression using mixtures of experts. PhD Theis, Department of Engineering, Cambridge University, 1997. [12] C. M. Bishop and M. Svens´en. Bayesian hierarchical mixtures of experts. In Proc. Uncertainty in Artificial Intelligence, 2003. [13] V. Tresp. Mixtures of Gaussian processes. In Advances in Neural Information Processing Systems 13. MIT Press, 2001. [14] B. W. Silverman. Some aspects of the spline smoothing approach to non-parametric regression curve fitting. J. Royal. Stat. Society. B, 47(1):1–52, 1985. [15] C. E. Rasmussen. The infinite Gaussian mixture model. In Advances in Neural Information Processing Systems 12. MIT Press, 2000. [16] L. Csat´o and M. Opper. Sparse on-line Gaussian processes. Neural Computation, 14(3):641–668, 2002. 8
2008
235
3,493
On the Design of Loss Functions for Classification: theory, robustness to outliers, and SavageBoost Hamed Masnadi-Shirazi Statistical Visual Computing Laboratory, University of California, San Diego La Jolla, CA 92039 hmasnadi@ucsd.edu Nuno Vasconcelos Statistical Visual Computing Laboratory, University of California, San Diego La Jolla, CA 92039 nuno@ucsd.edu Abstract The machine learning problem of classifier design is studied from the perspective of probability elicitation, in statistics. This shows that the standard approach of proceeding from the specification of a loss, to the minimization of conditional risk is overly restrictive. It is shown that a better alternative is to start from the specification of a functional form for the minimum conditional risk, and derive the loss function. This has various consequences of practical interest, such as showing that 1) the widely adopted practice of relying on convex loss functions is unnecessary, and 2) many new losses can be derived for classification problems. These points are illustrated by the derivation of a new loss which is not convex, but does not compromise the computational tractability of classifier design, and is robust to the contamination of data with outliers. A new boosting algorithm, SavageBoost, is derived for the minimization of this loss. Experimental results show that it is indeed less sensitive to outliers than conventional methods, such as Ada, Real, or LogitBoost, and converges in fewer iterations. 1 Introduction The binary classification of examples x is usually performed with recourse to the mapping ˆy = sign[f(x)], where f is a function from a pre-defined class F, and ˆy the predicted class label. Most state-of-the-art classifier design algorithms, including SVMs, boosting, and logistic regression, determine the optimal function f ∗by a three step procedure: 1) define a loss function φ(yf(x)), where y is the class label of x, 2) select a function class F, and 3) search within F for the function f ∗which minimizes the expected value of the loss, known as minimum conditional risk. Although tremendously successful, these methods have been known to suffer from some limitations, such as slow convergence, or too much sensitivity to the presence of outliers in the data [1, 2]. Such limitations can be attributed to the loss functions φ(·) on which the algorithms are based. These are convex bounds on the so-called 0-1 loss, which produces classifiers of minimum probability of error, but is too difficult to handle from a computational point of view. In this work, we analyze the problem of classifier design from a different perspective, that has long been used to study the problem of probability elicitation, in the statistics literature. We show that the two problems are identical, and probability elicitation can be seen as a reverse procedure for solving the classification problem: 1) define the functional form of expected elicitation loss, 2) select a function class F, and 3) derive a loss function φ. Both probability elicitation and classifier design reduce to the problem of minimizing a Bregman divergence. We derive equivalence results, which allow the representation of the classifier design procedures in “probability elicitation form”, and the representation of the probability elicitation procedures in “machine learning form”. This equivalence is useful in two ways. From the elicitation point of view, the risk functions used in machine learning can be used as new elicitation losses. From the machine learning point of view, new insights on the relationship between loss φ, optimal function f ∗, and minimum risk are obtained. In particular, it is shown that the classical progression from loss to risk is overly restrictive: once a loss φ is specified, 1 both the optimal f ∗, and the functional form of the minimum risk are immediately pined down. This is, however, not the case for the reverse progression: it is shown that any functional form of the minimum conditional risk, which satisfies some mild constraints, supports many (φ, f ∗) pairs. Hence, once the risk is selected, one degree of freedom remains: by selecting a class of f ∗, it is possible to tailor the loss φ, so as to guarantee classifiers with desirable traits. In addition to this, the elicitation view reveals that the machine learning emphasis on convex losses φ is misguided. In particular, it is shown that what matters is the convexity of the minimum conditional risk. Once a functional form is selected for this quantity, the convexity of the loss φ does not affect the convexity of the Bregman divergence to be optimized. These results suggest that many new loss functions can be derived for classifier design. We illustrate this, by deriving a new loss that trades convexity for boundedness. Unlike all previous φ, the one now proposed remains constant for strongly negative values of its argument. This is akin to robust loss functions proposed in the statistics literature to reduce the impact of outliers. We derive a new boosting algorithm, denoted SavageBoost, by combination of the new loss and the procedure used by Friedman to derive RealBoost [3]. Experimental results show that the new boosting algorithm is indeed more outlier resistant than classical methods, such as AdaBoost, RealBoost, and LogitBoost. 2 Classification and risk minimization A classifier is a mapping g : X →{−1, 1} that assigns a class label y ∈{−1, 1} to a feature vector x ∈X, where X is some feature space. If feature vectors are drawn with probability density PX(x), PY (y) is the probability distribution of the labels y ∈{−1, 1}, and L(x, y) a loss function, the classification risk is R(f) = EX,Y [L(g(x), y)]. Under the 0-1 loss, L0/1(x, y) = 1 if g(x) ̸= y and 0 otherwise, this risk is the expected probability of classification error, and is well known to be minimized by the Bayes decision rule. Denoting by η(x) = PY |X(1|x) this can be written as g∗(x) = sign[2η(x) −1]. (1) Classifiers are usually implemented with mappings of the form g(x) = sign[f(x)], where f is some mapping from X to R. The minimization of the 0-1 loss requires that sign[f ∗(x)] = sign[2η(x) −1], ∀x (2) When the classes are separable, any f(x) such that yf(x) ≥0, ∀x has zero classification error. The 0-1 loss can be written as a function of this quantity L0/1(x, y) = φ0/1[yf(x)] = sign[−yf(x)]. This motivates the minimization of the expected value of this loss as a goal for machine learning. However, this minimization is usually difficult. Many algorithms have been proposed to minimize alternative risks, based on convex upper-bounds of the 0-1 loss. These risks are of the form Rφ(f) = EX,Y [φ(yf(x))] (3) where φ(·) is a convex upper bound of φ0/1(·). Some examples of φ(·) functions in the literature are given in Table 1. Since these functions are non-negative, the risk is minimized by minimizing the conditional risk EY |X[φ(yf(x))|X = x] for every x ∈X. This conditional risk can be written as Cφ(η, f) = ηφ(f) + (1 −η)φ(−f), (4) where we have omitted the dependence of η and f on x for notational convenience. Various authors have shown that, for the φ(·) of Table 1, the function f ∗ φ which minimizes (4) f ∗ φ(η) = arg min f Cφ(η, f) (5) satisfies (2) [3, 4, 5]. These functions are also presented in Table 1. It can, in fact, be shown that (2) holds for any f ∗ φ(·) which minimizes (4) whenever φ(·) is convex, differentiable at the origin, and has derivative φ′(0) = 0 [5]. While learning algorithms based on the minimization of (4), such as SVMs, boosting, or logistic regression, can perform quite well, they are known to be overly sensitive to outliers [1, 2]. These are points for which yf(x) < 0. As can be seen from Figure 1, the sensitivity stems from the large 2 Table 1: Machine learning algorithms progress from loss φ, to inverse link function f ∗ φ(η), and minimum conditional risk C∗ φ(η). Algorithm φ(v) f ∗ φ(η) C∗ φ(η) Least squares (1 −v)2 2η −1 4η(1 −η) Modified LS max(1 −v, 0)2 2η −1 4η(1 −η) SVM max(1 −v, 0) sign(2η −1) 1 −|2η −1| Boosting exp(−v) 1 2 log η 1−η 2 p η(1 −η) Logistic Regression log(1 + e−v) log η 1−η -η log η −(1 −η) log(1 −η) (infinite) weight given to these points by the φ(·) functions when yf(x) →−∞. In this work, we show that this problem can be eliminated by allowing non-convex φ(·). This may, at first thought, seem like a bad idea, given the widely held belief that the success of the aforementioned algorithms is precisely due to the convexity of these functions. We will see, however, that the convexity of φ(·) is not important. What really matters is the fact, noted by [4], that the minimum conditional risk C∗ φ(η) = inf f Cφ(η, f) = Cφ(η, f ∗ φ) (6) satisfies two properties. First, it is a concave function of η (η ∈[0, 1])1. Second, if f ∗ φ is differentiable, then C∗ φ(η) is differentiable and, for any pair (v, ˆη) such that v = f ∗ φ(ˆη), Cφ(η, v) −C∗ φ(η) = B−C∗ φ(η, ˆη), (7) where BF (η, ˆη) = F(η) −F(ˆη) −(η −ˆη)F ′(ˆη). (8) is the Bregman divergence of the convex function F. The second property provides an interesting interpretation of the learning algorithms as methods for the estimation of the class posterior probability η(x): the search for the f(x) which minimizes (4) is equivalent to a search for the probability estimate ˆη(x) which minimizes (7). This raises the question of whether minimizing a cost of the form of (4) is the best way to elicit the posterior probability η(x). 3 Probability elicitation This question has been extensively studied in statistics. In particular, Savage studied the problem of designing reward functions that encourage probability forecasters to make accurate predictions [6]. The problem is formulated as follows. • let I1(ˆη) be the reward for the prediction ˆη when the event y = 1 holds. • let I−1(ˆη) be the reward for the prediction ˆη when the event y = −1 holds. The expected reward is I(η, ˆη) = ηI1(ˆη) + (1 −η)I−1(ˆη). (9) Savage asked the question of which functions I1(·), I−1(·) make the expected reward maximal when ˆη = η, ∀η. These are the functions such that I(η, ˆη) ≤I(η, η) = J(η), ∀η (10) with equality if and only if ˆη = η. Using the linearity of I(η, ˆη) on η, and the fact that J(η) is supported by I(η, ˆη) at, and only at, η = ˆη, this implies that J(η) is strictly convex [6, 7]. Savage then showed that (10) holds if and only if I1(η) = J(η) + (1 −η)J′(η) (11) I−1(η) = J(η) −ηJ′(η). (12) Defining the loss of the prediction of η by ˆη as the difference to the maximum reward L(η, ˆη) = I(η, η) −I(η, ˆη) 1Here, and throughout the paper, we omit the dependence of η on x, whenever we are referring to functions of η, i.e. mappings whose range is [0, 1]. 3 Table 2: Probability elicitation form for various machine learning algorithms, and Savage’s procedure. In Savage 1 and 2 m′ = m + k. Algorithm I1(η) I−1(η) J(η) Least squares −4(1 −η)2 −4η2 −4η(1 −η) Modified LS −4(1 −η)2 −4η2 −4η(1 −η) SVM sign[2η −1] −1 sign[2η −1] + 1 |2η −1| −1 Boosting − q 1−η η − q η 1−η −2 p η(1 −η) Log. Regression log η log(1 −η) η log η + (1 −η) log(1 −η) Savage 1 −k(1 −η)2 + m′ + l −kη2 + m kη2 + lη + m Savage 2 −k(1/η + log η) + m′ + l −k log η + m′ m + lη −k log η it follows that L(η, ˆη) = BJ(η, ˆη), (13) i.e. the loss is the Bregman divergence of J. Hence, for any probability η, the best prediction ˆη is the one of minimum Bregman divergence with η. Savage went on to investigate which functions J(η) are admissible. He showed that for losses of the form L(η, ˆη) = H(h(η) −h(ˆη)), with H(0) = 0 and H(v) > 0, v ̸= 0, and h(v) any function, only two cases are possible. In the first h(v) = v, i.e. the loss only depends on the difference η −ˆη, and the admissible J are J1(η) = kη2 + lη + m, (14) for some integers (k, l, m). In the second h(v) = log(v), i.e. the loss only depends on the ratio η/ˆη, and the admissible J are of the form J2(η) = m + lη −k log η. (15) 4 Classification vs. probability elicitation The discussion above shows that the optimization carried out by the learning algorithms is identical to Savage’s procedure for probability elicitation. Both procedures reduce to the search for ˆη∗= arg min ˆη BF (η, ˆη), (16) where F(η) is a convex function. In both cases, this is done indirectly. Savage starts from the specification of F(η) = J(η), from which the conditional rewards I1(η) and I2(η) are derived, using (11) and (12). ˆη∗is then found by maximizing the expected reward I(η, ˆη) of (9) with respect to ˆη. The learning algorithms start from the loss φ(·). The conditional risk Cφ(η, f) is then minimized with respect to f, so as to obtain the minimum conditional risk C∗ φ(η) and the corresponding f ∗ φ(ˆη). This is identical to solving (16) with F(η) = −C∗ φ(η). Using the relation J(η) = −C∗ φ(η) it is possible to express the learning algorithms in “Savage form”, i.e. as procedures for the maximization of (9), by deriving the conditional reward functions associated with each of the C∗ φ(η) in Table 1. This is done with (11) and (12) and the results are shown in Table 2. In all cases I1(η) = −φ(f ∗ φ(η)) and I−1(η) = −φ(−f ∗ φ(η)). The opposite question of whether Savage’s algorithms be expressed in “machine learning form”, i.e. as the minimization of (4), is more difficult. It requires that the Ii(η) satisfy I1(η) = −φ(f(η)) (17) I−1(η) = −φ(−f(η)) (18) for some f(η), and therefore constrains J(η). To understand the relationship between J, φ, and f ∗ φ it helps to think of the latter as an inverse link function. Or, assuming that f ∗ φ is invertible, to think of η = (f ∗ φ)−1(v) as a link function, which maps a real v into a probability η. Under this interpretation, it is natural to consider link functions which exhibit the following symmetry f −1(−v) = 1 −f −1(v). (19) Note that this implies that f −1(0) = 1/2, i.e. f maps v = 0 to η = 1/2. We refer to such link functions as symmetric, and show that they impose a special symmetry on J(η). 4 Table 3: Probability elicitation form progresses from minimum conditional risk, and link function (f ∗ φ)−1(η), to loss φ. f ∗ φ(η) is not invertible for the SVM and modified LS methods. Algorithm J(η) (f ∗ φ)−1(v) φ(v) Least squares −4η(1 −η) 1 2(v + 1) (1 −v)2 Modified LS −4η(1 −η) NA max(1 −v, 0)2 SVM |2η −1| −1 N/A max(1 −v, 0) Boosting −2 p η(1 −η) e2v 1+e2v exp(−v) Logistic Regression η log η + (1 −η) log(1 −η) ev 1+ev log(1 + e−v) Theorem 1. Let I1(η) and I−1(η) be two functions derived from a continuously differentiable function J(η) according to (11) and (12), and f(η) be an invertible function which satisfies (19). Then (17) and (18) hold if and only if J(η) = J(1 −η). (20) In this case, φ(v) = −J[f −1(v)] −(1 −f −1(v))J′[f −1(v)]. (21) The theorem shows that for any pair J(η), f(η), such that J(η) has the symmetry of (20) and f(η) the symmetry of (19), the expected reward of (9) can be written in the “machine learning form” of (4), using (17) and (18) with the φ(v) given by (21). The following corollary specializes this result to the case where J(η) = −C∗ φ(η). Corollary 2. Let I1(η) and I−1(η) be two functions derived with (11) and (12) from any continuously differentiable J(η) = −C∗ φ(η), such that C∗ φ(η) = C∗ φ(1 −η), (22) and fφ(η) be any invertible function which satisfies (19). Then I1(η) = −φ(fφ(η)) (23) I−1(η) = −φ(−fφ(η)) (24) with φ(v) = C∗ φ[f −1 φ (v)] + (1 −f −1 φ (v))(C∗ φ)′[f −1 φ (v)]. (25) Note that there could be many pairs φ, fφ for which the corollary holds2. Selecting a particular fφ “pins down” φ, according to (25). This is the case of the algorithms in Table 1, for which C∗ φ(η) and f ∗ φ have the symmetries required by the corollary. The link functions associated with these algorithms are presented in Table 3. From these and (25) it is possible to recover φ(v), also shown in the table. 5 New loss functions The discussion above provides an integrated picture of the “machine learning” and “probability elicitation” view of the classification problem. Table 1 summarizes the steps of the “machine learning view”: start from the loss φ(v), and find 1) the inverse link function f ∗ φ(η) of minimum conditional risk, and 2) the value of this risk C∗ φ(η). Table 3 summarizes the steps of the “probability elicitation view”: start from 1) the expected maximum reward function J(η) and 2) the link function (f ∗ φ)−1(v), and determine the loss function φ(v). If J(η) = −C∗ φ(η), the two procedures are equivalent, since they both reduce to the search for the probability estimate ˆη∗of (16). Comparing to Table 2, it is clear that the least squares procedures are special cases of Savage 1, with k = −l = 4 and m = 0, and the link function η = (v + 1)/2. The constraint k = −l is necessary 2This makes the notation fφ and C∗ φ technically inaccurate. C∗ f,φ would be more suitable. We, nevertheless, retain the C∗ φ notation for the sake of consistency with the literature. 5 −6 −5 −4 −3 −2 −1 0 1 2 0 0.5 1 1.5 2 2.5 3 3.5 4 v φ(v) Least squares Modified LS SVM Boosting Logistic Reg. Savage Loss Zero−One 0 0.2 0.4 0.6 0.8 1 0 0.2 0.4 0.6 0.8 1 η C* φ(η) Least squares Modified LS SVM Boosting Logistic Reg. Savage Loss Zero−One Figure 1: Loss function φ(v) (left) and minimum conditional risk C∗ φ(η) (right) associated with the different methods discussed in the text. for (22) to hold, but not the others. For Savage 2, a “machine learning form” is not possible (at this point), because J(η) ̸= J(1 −η). We currently do not know if such a form can be derived in cases like this, i.e. where the symmetries of (19) and/or (22) are absent. From the probability elicitation point of view, an important contribution of the machine learning research (in addition to the algorithms themselves) has been to identify new J functions, namely those associated with the techniques other than least squares. From the machine learning point of view, the elicitation perspective is interesting because it enables the derivation of new φ functions. The main observation is that, under the customary specification of φ, both C∗ φ(η) and f ∗ φ(η) are immediately set, leaving no open degrees of freedom. In fact, the selection of φ can be seen as the indirect selection of a link function (f ∗ φ)−1 and a minimum conditional risk C∗ φ(η). The latter is an approximation to the minimum conditional risk of the 0-1 loss, C∗ φ0/1(η) = 1 −max(η, 1 −η). The approximations associated with the existing algorithms are shown in Figure 1. The approximation error is smallest for the SVM, followed by least squares, logistic regression, and boosting, but all approximations are comparable. The alternative, suggested by the probability elicitation view, is to start with the selection of the approximation directly. In addition to allowing direct control over the quantity that is usually of interest (the minimum expected risk of the classifier), the selection of C∗ φ(η) (which is equivalent to the selection of J(η)) has the added advantage of leaving one degree of freedom open. As stated by Corollary 2 it is further possible to select across φ functions, by controlling the link function fφ. This allows tailoring properties of detail of the classifier, while maintaining its performance constant, in terms of the expected risk. We demonstrate this point, by proposing a new loss function φ. We start by selecting the minimum conditional risk of least squares (using Savage’s version with k = −l = 1, m = 0) C∗ φ(η) = η(1 −η), because it provides the best approximation to the Bayes error, while avoiding the lack of differentiability of the SVM. We next replace the traditional link function of least squares by the logistic link function (classically used with logistic regression) f ∗ φ = 1 2 log η 1−η. When used in the context of boosting (LogitBoost [3]), this link function has been found less sensitive to outliers than other variants [8]. We then resort to (25) to find the φ function, which we denote by Savage loss, φ(v) = 1 (1 + e2v)2 . (26) A plot of this function is presented in Figure 1, along with those associated with all the algorithms of Table 1. Note that the proposed loss is very similar to that of least squares in the region where |v| is small (the margin), but quickly becomes constant as v →−∞. This is unlike all other previous φ functions, and suggests that classifiers designed with the new loss should be more robust to outliers. It is also interesting to note that the new loss function is not convex, violating what has been an hallmark of the φ functions used in the literature. The convexity of φ is, however, not important, a fact that is made clear by the elicitation view. Note that the convexity of the expected reward of (9) only depends on the convexity of the functions I1(η) and I−1(η). These, in turn, only depend on the choice of J(η), as shown by (11) and (12). From Corollary 2 it follows that, as long as the symmetries of (22) and (19) hold, and φ is selected according to (25), the selection of C∗ φ(η) 6 Algorithm 1 SavageBoost Input: Training set D = {(x1, y1), . . . , (xn, yn)}, where y ∈{1, −1} is the class label of example x, and number M of weak learners in the final decision rule. Initialization: Select uniform weights w(1) i = 1 |D|, ∀i. for m = {1, . . . , M} do compute the gradient step Gm(x) with (30). update weights wi according to w(m+1) i = w(m) i × eyiGm(xi). end for Output: decision rule h(x) = sgn[PM m=1 Gm(x)]. completely determines the convexity of the conditional risk of (4). Whether φ is itself convex does not matter. 6 SavageBoost We have hypothesized that classifiers designed with (26) should be more robust than those derived from the previous φ functions. To test this we designed a boosting algorithm based in the new loss, using the procedure proposed by Friedman to derive RealBoost [3]. At each iteration the algorithm searches for the weak learner G(x) which further reduces the conditional risk EY |X[φ(y(f(x) + G(x)))|X = x] of the current f(x), for every x ∈X. The optimal weak learner is G∗(x) = arg min G(x)  η(x)φw(G(x)) + (1 −η(x))φw(−G(x)) (27) where φw(yG(x)) = 1 (1 + w(x, y)2e2y(G(x)))2 (28) and w(x, y) = eyf(x) (29) The minimization is by gradient descent. Setting the gradient with respect to G(x) to zero results in G∗(x) = 1 2  log Pw(y = 1|x) Pw(y = −1|x)  (30) where Pw(y = i|x) are probability estimates obtained from the re-weighted training set. At each iteration the optimal weak learner is found from (30) and reweighing is performed according to (29). We refer to the algorithm as SavageBoost, and summarize it in the inset. 7 Experimental results We compared SavageBoost to AdaBoost [9], RealBoost [3], and LogitBoost [3]. The latter is generally considered more robust to outliers [8] and thus a good candidate for comparison. Ten binary UCI data sets were used: Pima-diabetes, breast cancer diagnostic, breast cancer prognostic, original Wisconsin breast cancer, liver disorder, sonar, echo-cardiogram, Cleveland heart disease, tic-tac-toe and Haberman’s survival. We followed the training/testing procedure outlined in [2] to explore the robustness of the algorithms to outliers. In all cases, five fold validation was used with varying levels of outlier contamination. Figure 2 shows the average error of the four methods on the LiverDisorder set. Table 4 shows the number of times each method produced the smallest error (#wins) over the ten data sets at a given contamination level, as well as the average error% over all data sets (at that contamination level). Our results confirm previous studies that have noted AdaBoost’s sensitivity to outliers [1]. Among the previous methods AdaBoost indeed performed the worst, followed by RealBoost, with LogistBoost producing the best results. This confirms previous reports that LogitBoost is less sensitive to outliers [8]. SavageBoost produced generally better results than Ada and RealBoost at all contamination levels, including 0% contamination. LogitBoost achieves 7 0 5 10 15 20 25 30 35 40 28 30 32 34 36 38 40 42 44 46 48 %Error Outlier Percentage Sav. Loss (SavageBoost) Exp Loss (RealBoost) Log Loss (LogitBoost) Exp Loss (AdaBoost) Figure 2: Average error for four boosting methods at different contamination levels. Table 4: (number of wins, average error%) for each method and outlier percentage. Method 0% outliers 5% outliers 40% outliers Savage Loss (SavageBoost) (4, 19.22%) (4, 19.91%) (6, 25.9%) Log Loss(LogitBoost) (4, 20.96%) (4, 22.04%) (3, 31.73%) Exp Loss(RealBoost) (2, 23.99%) (2, 25.34%) (0, 33.18%) Exp Loss(AdaBoost) (0, 24.58%) (0, 26.45%) (1, 38.22%) comparable results at low contamination levels (0%, 5%) but has higher error when contamination is significant. With 40% contamination SavageBoost has 6 wins, compared to 3 for LogitBoost and, on average, about 6% less error. Although, in all experiments, each algorithm was allowed 50 iterations, SavageBoost converged much faster than the others, requiring an average of 25 iterations at 0% cantamination. This is in contrast to 50 iterations for LogitBoost and 45 iterations for RealBoost. We attribute fast convergence to the bounded nature of the new loss, that prevents so called ”early stopping” problems [10]. Fast convergence is, of course, a great benefit in terms of the computational efficiency of training and testing. This issue will be studied in greater detail in the future. References [1] T. G. Dietterich, “An experimental comparison of three methods for constructing ensembles of decision trees: Bagging, boosting, and randomization,” Machine Learning, 2000. [2] Y. Wu and Y. Liu, “Robust truncated-hinge-loss support vector machines,” JASA, 2007. [3] J. Friedman, T. Hastie, and R. Tibshirani, “Additive logistic regression: A statistical view of boosting,” Annals of Statistics, 2000. [4] T. Zhang, “Statistical behavior and consistency of classification methods based on convex risk minimization,” Annals of Statistics, 2004. [5] P. Bartlett, M. Jordan, and J. D. McAuliffe, “Convexity, classification, and risk bounds,” JASA, 2006. [6] L. J. Savage, “The elicitation of personal probabilities and expectations,” JASA, vol. 66, pp. 783–801, 1971. [7] S. Boyd and L. Vandenberghe, Convex Optimization. Cambridge: Cambridge University Press, 2004. [8] R. McDonald, D. Hand, and I. Eckley, “An empirical comparison of three boosting algorithms on real data sets with artificial class noise,” in International Workshop on Multiple Classifier Systems, 2003. [9] Y. Freund and R. Schapire, “A decision-theoretic generalization of on-line learning and an application to boosting,” Journal of Computer and System Sciences, 1997. [10] T. Zhang and B. Yu, “Boosting with early stopping: Convergence and consistency,” Annals of Statistics, 2005. 8
2008
236
3,494
Non-stationary dynamic Bayesian networks Joshua W. Robinson and Alexander J. Hartemink Department of Computer Science Duke University Durham, NC 27708-0129 {josh,amink}@cs.duke.edu Abstract A principled mechanism for identifying conditional dependencies in time-series data is provided through structure learning of dynamic Bayesian networks (DBNs). An important assumption of DBN structure learning is that the data are generated by a stationary process—an assumption that is not true in many important settings. In this paper, we introduce a new class of graphical models called non-stationary dynamic Bayesian networks, in which the conditional dependence structure of the underlying data-generation process is permitted to change over time. Non-stationary dynamic Bayesian networks represent a new framework for studying problems in which the structure of a network is evolving over time. We define the non-stationary DBN model, present an MCMC sampling algorithm for learning the structure of the model from time-series data under different assumptions, and demonstrate the effectiveness of the algorithm on both simulated and biological data. 1 Introduction Structure learning of dynamic Bayesian networks allows conditional dependencies to be identified in time-series data with the assumption that the data are generated by a distribution that does not change with time (i.e., it is stationary). An assumption of stationarity is adequate in many situations since certain aspects of data acquisition or generation can be easily controlled and repeated. However, other interesting and important circumstances exist where that assumption does not hold and potential non-stationarity cannot be ignored. As one example, structure learning of DBNs has been used widely in reconstructing transcriptional regulatory networks from gene expression data [1]. But during development, these regulatory networks are evolving over time, with certain conditional dependencies between gene products being created as the organism develops, while others are destroyed. As another example, dynamic Bayesian networks have been used to identify the networks of neural information flow that operate in the brains of songbirds [2]. However, as the songbird learns from its environment, the networks of neural information flow are themselves slowly adapting to make the processing of sensory information more efficient. As yet another example, one can use a DBN to model traffic flow patterns. The roads upon which traffic passes do not change on a daily basis, but the dynamic utilization of those roads changes daily during morning rush, lunch, evening rush, and weekends. If one collects time-series data describing the levels of gene products in the case of transcriptional regulation, neural activity in the case of neural information flow, or traffic density in the case of traffic flow, and attempts to learn a DBN describing the conditional dependencies in these time-series, one could be seriously misled if the data-generation process is non-stationary. Here, we introduce a new class of graphical model called a non-stationary dynamic Bayesian network (nsDBN), in which the conditional dependence structure of the underlying data-generation 1 process is permitted to change over time. In the remainder of the paper, we introduce and define the nsDBN framework, present a simple but elegant algorithm for efficiently learning the structure of an nsDBN from time-series data under different assumptions, and demonstrate the effectiveness of these algorithms on both simulated and experimental data. 1.1 Previous work In this paper, we are interested in identifying how the conditional dependencies between time-series change over time; thus, we focus on the task of inferring network structure as opposed to parameters of the graphical model. In particular, we are not as interested in making predictions about future data (such as spam prediction via a na¨ıve Bayes classifier) as we are in analysis of collected data to identify non-stationary relationships between variables in multivariate time-series. Here we describe the few previous approaches to identifying non-stationary networks and discuss the advantages and disadvantages of each. The model we describe in this paper has none of the disadvantages of the models described below primarily because it makes fewer assumptions about the relationships between variables. Recent work modeling the temporal progression of networks from the social networks community includes an extension to the discrete temporal network model [3], in which the the networks are latent (unobserved) variables that generate observed time-series data [4]. Unfortunately, this technique has certain drawbacks: the variable correlations remain constant over time, only undirected edges can be identified, and segment or epoch divisions must be identified a priori. In the continuous domain, some research has focused on learning the structure of a time-varying Gaussian graphical model [5] with a reversible-jump MCMC approach to estimate the time-varying variance structure of the data. However, some limitations of this method include: the network evolution is restricted to changing at most a single edge at a time and the total number of segments is assumed known a priori. A similar algorithm—also based on Gaussian graphical models—iterates between a convex optimization for determining the graph structure and a dynamic programming algorithm for calculating the segmentation [6]. This approach is fast, has no single edge change restriction, and the number of segments is calculated a posteriori; however, it does require that the graph structure is decomposable. Additionally, both of the aforementioned approaches only identify undirected edges and assume that the networks in each segment are independent, preventing data and parameters from being shared between segments. 2 Brief review of structure learning of Bayesian networks Bayesian networks are directed acyclic graphical models that represent conditional dependencies between variables as edges. They define a simple decomposition of the complete joint distribution— a variable is conditionally independent of its non-descendants given its parents. Therefore, the joint distribution of every variable xi can be rewritten as Q i P(xi|πi, θi), where πi are the parents of xi, and θi parameterizes the conditional probability distribution between a variable and its parents. The posterior probability of a given network G (i.e., the set of conditional dependencies) after having observed data D is estimated via Bayes’ rule: P(G|D) ∝P(D|G)P(G). The structure prior P(G) can be used to incorporate prior knowledge about the network structure, either about the existence of specific edges or the topology more generally (e.g., sparse); if prior information is not available, this is often assumed uniform. The marginal likelihood P(D|G) can be computed exactly, given a conjugate prior for θi. When the θi are independent and multinomially distributed, a Dirichlet conjugate prior is used, and the data are complete, the exactly solution for the marginal likelihood is the Bayesian-Dirichlet equivalent (BDe) metric [7]. Since we will be modifying it later in this paper, we show the expression for the BDe metric here: P(D|G) = n Y i=1 qi Y j=1 Γ(αij) Γ(αij + Nij) ri Y k=1 Γ(αijk + Nijk) Γ(αijk) (1) where qi is the number of configurations of the parent set πi, ri is the number of discrete states of variable xi, Nij = Pri k=1 Nijk, Nijk is the number of times Xi took on the value k given the parent configuration j, and αij and αijk are Dirichlet hyper-parameters on various entries in Θ. If αijk is set everywhere to α/(qiri), we get a special case of the BDe metric: the uniform BDe metric (BDeu). 2 Given a metric for evaluating the marginal likelihood P(D|G), a technique for finding the best network(s) must be chosen. Heuristic search methods (i.e., simulated annealing, greedy hill-climbing) may be used to find a best network or set of networks. Alternatively, sampling methods may be used to estimate a posterior over all networks [8]. If the best network is all that is desired, heuristic searches will typically find it more quickly than sampling techniques. In settings where many modes are expected, sampling techniques will more accurately capture posterior probabilities regarding various properties of the network. Finally, once a search or sampling strategy has been selected, we must determine how to move through the space of all networks. A move set defines a set of local traversal operators for moving from a particular state (i.e., a network) to nearby states. Ideally, the move set includes changes that allow posterior modes to be frequently visited. For example, it is reasonable to assume that networks that differ by a single edge will have similar likelihoods. A well designed move set results in fast convergence since less time is spent in the low probability regions of the state space. For Bayesian networks, the move set is often chosen to be {add an edge, delete an edge, and reverse an edge} [8]. DBNs are an extension of Bayesian networks to time-series data, enabling cyclic dependencies between variables to be modeled across time. Structure learning of DBNs is essentially the same as described above, except that modeling assumptions are made regarding how far back in time one variable can depend on another (minimum and maximum lag), and constraints need to be placed on edges so that they do not go backwards in time. For notational simplicity, we assume hereafter that the minimum and maximum lag are both 1. More detailed reviews of structure learning can be found in [9, 10]. 3 Learning non-stationary dynamic Bayesian networks We would like to extend the dynamic Bayesian network model to account for non-stationarity. In this section, we detail how the structure learning procedure for DBNs to must be changed to account for non-stationarity when learning non-stationary DBNs (nsDBNs). Assume that we observe the state of n random variables at N discrete times. Call this multivariate time-series data D, and further assume that it is generated according to a non-stationary process, which is unknown. The process is non-stationary in the sense that the network of conditional dependencies prevailing at any given time is itself changing over time. We call the initial network of conditional dependencies G1 and subsequent networks are called Gi for i = 2, 3, . . . , m. We define ∆gi to be the set of edges that change (either added or deleted) between Gi and Gi+1. The number of edge changes specified in ∆gi is Si. We define the transition time ti to be the time at which Gi is replaced by Gi+1 in the data-generation process. We call the period of time between consecutive transition times—during which a single network of conditional dependencies is operative—an epoch. So we say that G1 prevails during the first epoch, G2 prevails during the second epoch, and so forth. We will refer to the entire series of prevailing networks as the structure of the nsDBN. Since we wish to learn a set of networks instead of one network we must derive a new expression for the marginal likelihood. Assume that there exist m different epochs with m −1 transition times T = {t1, . . . , tm−1}. The network Gi+1 prevailing in epoch i + 1 differs from network Gi prevailing in epoch i by a set of edge changes we call ∆gi. We would like to determine the sequence of networks G1, . . . , Gm that maximize the posterior: P(G1, . . . , Gm|D, T) ∝ P(D|G1, . . . , Gm, T)P(G1, . . . , Gm) (2) ∝ P(D|G1, ∆g1, . . . , ∆gm−1, T)P(G1, ∆g1, . . . , ∆gm−1) (3) ∝ P(D|G1, ∆g1, . . . , ∆gm−1, T)P(G1)P(∆g1, . . . , ∆gm−1) (4) We assume the prior over networks can be further split into independent components describing the initial network and subsequent edge changes, as demonstrated in Equation (4). As in the stationary setting, if prior knowledge about particular edges or overall topology is available, an informative prior can be placed on G1. In the results reported here, we assume this to be uniform. We do, however, place some prior assumptions on the ways in which edges change in the structure. First, we assume that the networks evolve smoothly over time. To encode this prior knowledge, we place an exponential prior with rate λs on the total number of edge changes s = P i Si. We also assume that the networks evolve slowly over time (i.e., a transition does not occur at every observation) by 3 placing another exponential prior with rate λm on the number of epochs m. The updated posterior for an nsDBN structure is given as: P(G1, ∆g1, . . . , ∆gm−1|T) ∝P(D|G1, ∆g1, . . . , ∆gm−1, T) e−λsse−λmm To evaluate the new likelihood, we choose to extend the BDe metric because after the parameters have been marginalized away, edges are the only representation of conditional dependencies that are left; this provides a useful definition of non-stationarity that is both simple to define and easy to analyze. We will assume that any other sources of non-stationarity are either small enough to not alter edges in the predicted network or large enough to be approximated by edge changes in the predicted network. In Equation (1), Nij and Nijk are calculated for a particular parent set over the entire dataset D. However, in an nsDBN, a node may have multiple parent sets operative at different times. The calculation for Nij and Nijk must therefore be modified to specify the intervals during which each parent set is operative. Note that an interval may be defined over several epochs. Specifically, an epoch is defined between adjacent transition times while an interval is defined over the epochs during which a particular parent set is operative (which may include all epochs). For each node i, the previous parent set πi in the BDe metric is replaced by a set of parent sets πih, where h indexes the interval Ih during which parent set πih is operative for node i. Let pi be the number of such intervals and let qih be the number of configurations of πih. Then we can write: P(D|G1, . . . , Gm, T) ∝ n Y i=1 pi Y h=1 qih Y j=1 Γ(αij(Ih)) Γ(αij(Ih) + Nij(Ih)) ri Y k=1 Γ(αijk(Ih) + Nijk(Ih)) Γ(αijk(Ih)) (5) where the counts Nijk and pseudocounts αijk have been modified to apply only to the data in each interval Ih. The modified BDe metric will be referred to as nsBDe. We have chosen to set αijk(Ih) = (αijk|Ih|)/N (e.g., proportional to the length of the interval during which that particular parent set is operative). We use a sampling approach rather than heuristic search because the posterior over structures includes many modes. Additionally, sampling allows us to answer questions like “what are the most likely transition times?”—a question that would be difficult to answer in the context of heuristic search. Because the number of possible nsDBN structures is so large (significantly greater than the number of possible DBNs), we must be careful about what options are included in the move set. To achieve quick convergence, we want to ensure that every move in the move set efficiently jumps between posterior modes. Therefore, the majority of the next section is devoted to describing effective move sets under different levels of uncertainty. 4 Different settings regarding the number and times of transitions An nsDBN can be identified under a variety of settings that differ in the level of uncertainty about the number of transitions and whether the transition times are known. The different settings are abbreviated according to the type of uncertainty: whether the number of transitions is known (KN) or unknown (UN) and whether the transition times themselves are known (KT) or unknown (UT). When the number and times of transitions are known a priori (KNKT setting), we only need to identify the most likely initial network G1 and sets of edge changes ∆g1 . . . ∆gm−1. Thus, we wish to maximize Equation (4). To create a move set that results in an effectively mixing chain, we consider which types of local moves result in jumps between posterior modes. As mentioned earlier, structures that differ by a single edge will probably have similar likelihoods. Additionally, structures that have slightly different edge change sets will have similar likelihoods. The add edge, remove edge, add to edge set, remove from edge set, and move from edge set moves are listed as (M1) −(M5) in Table 1 in the Appendix. Knowing in advance the times at which all the transitions occur is often unrealistic. When the number of transitions is known but the times are unknown a priori (KNUT setting), the transition times T must also be estimated a posteriori. 4 Figure 1: Structure learning of nsDBNs under several settings. A. True non-stationary datageneration process. Under the KNKT setting, the recovered structure is exactly this one. B. Under the KNUT setting, the algorithm learns the model-averaged nsDBN structure shown. C: Posterior probabilities of transition times when learning an nsDBN in the UNUT setting (with λs = 1 and λm = 5). The blue triangles represent the true transition times and the red dots represent one standard deviation from the mean probability obtained from several runs. D: Posterior probabilities of the number of epochs. Structures with the same edge sets but slightly different transition times will probably have similar likelihoods. Therefore, we can add a new move that proposes a local shift to one of the transition times: let d be some small positive integer and let the new time t′ i be drawn from a discrete uniform distribution t′ i ∼DU(ti −d, ti + d) with the constraint that ti−1 < t′ i < ti+1. Initially, we set the m −1 transition times so that the epochs are roughly equal in length. The complete move set for this setting includes all of the moves described previously as well as the new local shift move, listed as (M6) in Table 1 in the Appendix. Finally, when the number and times of transitions are unknown (UNUT setting), both m and T must be estimated. While this is the most interesting setting, it is also the most difficult since one of the unknowns is the number of unknowns. Using the reversible jump Markov chain Monte Carlo sampling technique [11], we can further augment the move set to allow for the number of transitions to change. Since the number of epochs m is allowed to vary, this is the only setting that incorporates the prior on m. To allow the number of transitions to change during sampling, we introduce merge and split operations to the move set. For the merge operation, two adjacent edge sets (∆gi and ∆gi+1) are combined to create a new edge set. The transition time of the new edge set is selected to be the mean of the previous locations weighted by the size of each edge set: t′ i = (Siti +Si+1ti+1)/(Si +Si+1). For the split operation, an edge set ∆gi is randomly chosen and randomly partitioned into two new edge sets ∆g′ i and ∆g′ i+1 with all subsequent edge sets re-indexed appropriately. Each new transition time is selected as described above. The move set is completed with the inclusion of the add transition time and delete transition time operations. These moves are similar to the split and merge operations except they also increase or decrease s, the total number of edge changes in the structure. The four additional moves are listed as (M7) −(M10) in Table 1 in the Appendix. 5 Results on simulated data To evaluate the effectiveness of our method, we first apply it to a small, simulated dataset. The first experiment is on a simulated ten node network with six single-edge changes between seven 5 epochs where the length of each epoch varies between 20 and 400 observations. The true network is shown in Figure 1A. For each of the three settings, we generate ten individual datasets and then collect 250,000 samples from each, with the first 50,000 samples thrown out for burn-in. We repeat the sample collection 25 times for each dataset to obtain variance estimates on posterior quantities of interest. The sample collection takes about 25 seconds for each dataset on a 3.6GHz dual-core Intel Xeon machine with 4 GB of RAM, but all runs can easily be executed in parallel. To obtain a consensus (model averaged) structure prediction, an edge is considered present at a particular time if the posterior probability of the edge is greater than 0.5. In the KNKT setting, the sampler rapidly converges to the correct solution. The value of λm has no effect in this setting, and the value of λs is varied between 0.1 and 50. The predicted structure is identical to the true structure shown in Figure 1A for a broad range of values: 0.5 ≤λs ≤10.0, indicating robust and accurate learning. In the KNUT setting, transition times are unknown and must be estimated a posteriori. The value of λm still has no effect in this setting and the value of λs is again varied between 0.1 and 50. The predicted consensus structure is shown in Figure 1B for λs = 5.0; this choice of λs provides the most accurate predictions. The estimated structure and transition times are very close to the truth. All edges are correct, with the exception of two missing edges in G1, and the predicted transition times are all within 10 of the true transition times. We also discovered that the convergence rate under the KNUT and the KNKT settings were very similar for a given m. This implies that the posterior over transition times is quite smooth; therefore, the mixing rate is not greatly affected when sampling transition times. Finally, we consider the UNUT setting, when the number and times of transitions are both unknown. We use the range 1 ≤λs ≤5 because we know from the previous settings that the most accurate solutions were obtained from a prior within this range; the range 1 ≤λm ≤50 is selected to provide a wide range of estimates for the prior since we have no a priori knowledge of what it should be. We can examine the posterior probabilities of transition times over all sampled structures, shown in Figure 1C. Highly probable transition times correspond closely with the true transition times indicated by blue triangles; nevertheless, some uncertainty exists on about the exact locations of t3 and t4 since the fourth epoch is exceedingly short. We can also examine the posterior number of epochs, shown in Figure 1D. The most probable posterior number of epochs is six, close to the true number of seven. To identify the best parameter settings for λs and λm, we examine the best F1-measure (the harmonic mean of the precision and recall) for each. The best F1-measure of 0.992 is obtained when λs = 5 and λm = 1, although nearly all choices result in an F1-measure above 0.90 (see Appendix). To evaluate the scalability of our technique, we also simulated data from a 100 variable network with an average of fifty edges over five epochs spanning 4800 observations, with one to three edges changing between each epoch. Learning nsDBNs on this data for λs ∈{1, 2, 5} and λm ∈{2, 3, 5} results in F1-measures above 0.93, with the λs = 1 and λm = 5 assignments to be best for this data, with an F1-measure of 0.953. 6 Results on Drosophila muscle development gene expression data We also apply our method to identify non-stationary networks using Drosophila development gene expression data from [12]. This data contains expression measurements over 66 time steps of 4028 Drosophila genes throughout development and growth during the embryonic, larval, pupal, and adult stages of life. Using a subset of the genes involved in muscle development, some researchers have identified a single directed network [13], while others have learned a time-varying undirected network [4]. To facilitate comparison with as many existing methods as possible, we apply our method to the same data. Unfortunately, no other techniques predict non-stationary directed networks, so our prediction in Figure 2C is compared to the stationary directed network in Figure 2A and the non-stationary undirected network in Figure 2B. While all three predictions share many edges, certain similarities between our prediction and one or both of the other two predictions are of special interest. In all three predictions, a cluster seems to form around myo61f, msp-300, up, mhc, prm, and mlc1. All of these genes except up are in the 6 Figure 2: Learning nsDBNS from the Drosophila muscle development data. A. The directed network reported by [13]. B. The undirected networks reported by [4]. C. The nsDBN structure learned under the KNKT setting with λs = 2.0. Only the edges that occurred in greater than 50 percent of the samples are shown, with thicker edges representing connections that occurred more frequently. D. Posterior probabilities of transition times using λm = λs = 2 under the UNUT setting. Blue triangles represent the borders of embryonic, larval, pupal, and adult stages. E. Posterior probability of the number of epochs under the UNUT setting. myosin family, which contains genes involved in muscle contraction. Within the directed predictions, msp-300 primarily serves as a hub gene that regulates the other myosin family genes. It is interesting to note that the undirected method predicts connections between mcl1, prm, and mhc while neither directed method make these predictions. Since msp-300 seems to serve as a regulator to these genes, the method from [4] may be unable to distinguish between direct interactions and correlations due to its undirected nature. Despite the similarities, some notable differences exist between our prediction and the other two predictions. First, we predict interactions from myo61f to both prm and up, neither of which is predicted in the other methods, suggesting a greater role for myo61f during muscle development. Also, we do not predict any interactions with twi. During muscle development in Drosophila, twi acts as a regulator of mef2 that in turn regulates some myosin family genes, including mlc1 and mhc [14]; our prediction of no direct connection from twi mirrors this biological behavior. Finally, we note that in our predicted structure, actn never connects as a regulator (parent) to any other genes, unlike in the network in Figure 2A. Since actn (actinin) only binds actin, we do not expect it to regulate other muscle development genes, even indirectly. We can also look at the posterior probabilities of transition times and epochs under the UNUT setting. These plots are shown in Figure 2D and 2E, respectively. The transition times with high posterior probabilities correspond well to the embryonic→larval and the larval→pupal transitions, but a posterior peak occurs well before the supposed time of the pupal→adult transition; this reveals that the gene expression program governing the transition to adult morphology is active well before the fly emerges from the pupa, as would clearly be expected. Also, we see that the most probable number of epochs is three or four, mirroring closely the total number of developmental stages. Since we could not biologically validate the fly network, we generated a non-stationary time-series with the same number of nodes and a similar level of connectivity to evaluate the accuracy a recovered nsDBN on a problem of exactly this size. We generated data from an nsDBN with 66 observations and transition times at 30, 40, and 58 to mirror the number of observations in embryonic, larval, pupal, and adult stages of the experimental fly data. Since it is difficult to estimate the amount of noise in the experimental data, we simulated noise at 1:1 to 4:1 signal-to-noise ratios. 7 Finally, since many biological processes have more variables than observations, we examined the effect of increasing the number of experimental replicates. We found that the best F1-measures (greater than 0.75 across all signal-to-noise ratios and experimental replicates) were obtained when λm = λs = 2, which is why we used those values to analyze the Drosophila muscle network data. 7 Discussion Non-stationary dynamic Bayesian networks provide a useful framework for learning Bayesian networks when the generating processes are non-stationary. Using the move sets described in this paper, nsDBN learning is efficient even for networks of 100 variables, generalizable to situations of varying uncertainty (KNKT, KNUT, and UNUT), and the predictions are stable over many choices of hyper-parameters. Additionally, by using a sampling-based approach, our method allows us to assess a confidence for each predicted edge—an advantage that neither [13] nor [4] share. We have demonstrated the feasibility of learning an nsDBN in all three settings using simulated data, and in the KNKT and UNUT settings using real biological data. Although the predicted fly muscle development networks are difficult to verify, simulated experiments of a similar scale demonstrate highly accurate predictions, even with noisy data and few replicates. Non-stationary DBNs offer all of the advantages of DBNs (identifying directed non-linear interactions between multivariate time-series) and are additionally able to identify non-stationarities in the interactions between time-series. In future work, we hope to analyze data from other fields that have traditionally used dynamic Bayesian networks and instead use nsDBNs to identify and model previously unknown or uncharacterized non-stationary behavior. References [1] Nir Friedman, Michal Linial, Iftach Nachman, and Dana Pe’er. Using Bayesian networks to analyze expression data. In RECOMB 4, pages 127–135. ACM Press, 2000. [2] V. Anne Smith, Jing Yu, Tom V. Smulders, Alexander J. Hartemink, and Erich D. Jarvis. Computational inference of neural information flow networks. PLoS Computational Biology, 2(11):1436–1449, 2006. [3] Steve Hanneke and Eric P. Xing. Discrete temporal models of social networks. In Workshop on Statistical Network Analysis, ICML 23, 2006. [4] Fan Guo, Steve Hanneke, Wenjie Fu, and Eric P. Xing. Recovering temporally rewiring networks: A model-based approach. In ICML 24, 2007. [5] Makram Talih and Nicolas Hengartner. Structural learning with time-varying components: Tracking the cross-section of financial time series. Journal of the Royal Statistical Society B, 67(3):321–341, 2005. [6] Xiang Xuan and Kevin Murphy. Modeling changing dependency structure in multivariate time series. In ICML 24, 2007. [7] David Heckerman, Dan Geiger, and David Maxwell Chickering. Learning Bayesian networks: The combination of knowledge and statistical data. Machine Learning, 20(3):197–243, 1995. [8] Claudia Tarantola. MCMC model determination for discrete graphical models. Statistical Modelling, 4(1):39–61, 2004. [9] P Krause. Learning probabilistic networks. The Knowledge Engineering Review, 13(4):321–351, 1998. [10] Kevin Murphy. Learning Bayesian network structure from sparse data sets. U.C. Berkeley Technical Report, Computer Science Department 990, University of California at Berkeley, 2001. [11] Peter J. Green. Reversible jump Markov chain Monte Carlo computation and Bayesian model determination. Biometrika, 82(4):711–732, 1995. [12] M Arbeitman, E Furlong, F Imam, E Johnson, B Null, B Baker, M Krasnow, M Scott, R Davis, and K White. Gene expression during the life cycle of Drosophila melanogaster. Science, 5590(297):2270– 2275, 2002. [13] Wentao Zhao, Erchin Serpedin, and Edward R. Dougherty. Inferring gene regulatory networks from time series data using the minimum description length principle. Bioinformatics, 22(17):2129–2135, 2006. [14] T Sandmann, L Jensen, J Jakobsen, M Karzynski, M Eichenlaub, P Bork, and E Furlong. A temporal map of transcription factor activity: mef2 directly regulates target genes at all stages of muscle development. Developmental Cell, 10(6):797–807, 2006. 8
2008
237
3,495
Nonlinear causal discovery with additive noise models Patrik O. Hoyer University of Helsinki Finland Dominik Janzing MPI for Biological Cybernetics T¨ubingen, Germany Joris Mooij MPI for Biological Cybernetics T¨ubingen, Germany Jonas Peters MPI for Biological Cybernetics T¨ubingen, Germany Bernhard Sch¨olkopf MPI for Biological Cybernetics T¨ubingen, Germany Abstract The discovery of causal relationships between a set of observed variables is a fundamental problem in science. For continuous-valued data linear acyclic causal models with additive noise are often used because these models are well understood and there are well-known methods to fit them to data. In reality, of course, many causal relationships are more or less nonlinear, raising some doubts as to the applicability and usefulness of purely linear methods. In this contribution we show that the basic linear framework can be generalized to nonlinear models. In this extended framework, nonlinearities in the data-generating process are in fact a blessing rather than a curse, as they typically provide information on the underlying causal system and allow more aspects of the true data-generating mechanisms to be identified. In addition to theoretical results we show simulations and some simple real data experiments illustrating the identification power provided by nonlinearities. 1 Introduction Causal relationships are fundamental to science because they enable predictions of the consequences of actions [1]. While controlled randomized experiments constitute the primary tool for identifying causal relationships, such experiments are in many cases either unethical, too expensive, or technically impossible. The development of causal discovery methods to infer causal relationships from uncontrolled data constitutes an important current research topic [1, 2, 3, 4, 5, 6, 7, 8]. If the observed data is continuous-valued, methods based on linear causal models (aka structural equation models) are commonly applied [1, 2, 9]. This is not necessarily because the true causal relationships are really believed to be linear, but rather it reflects the fact that linear models are well understood and easy to work with. A standard approach is to estimate a so-called Markov equivalence class of directed acyclic graphs (all representing the same conditional independencies) from the data [1, 2, 3]. For continuous variables, the independence tests often assume linear models with additive Gaussian noise [2]. Recently, however, it has been shown that for linear models, non-Gaussianity in the data can actually aid in distinguishing the causal directions and allow one to uniquely identify the generating graph under favourable conditions [7]. Thus the practical case of non-Gaussian data which long was considered a nuisance turned out to be helpful in the causal discovery setting. In this contribution we show that nonlinearities can play a role quite similar to that of nonGaussianity: When causal relationships are nonlinear it typically helps break the symmetry between the observed variables and allows the identification of causal directions. As Friedman and Nachman have pointed out [10], non-invertible functional relationships between the observed variables can provide clues to the generating causal model. However, we show that the phenomenon is much more general; for nonlinear models with additive noise almost any nonlinearities (invertible or not) will typically yield identifiable models. Note that other methods to select among Markov equivalent DAGs [11, 8] have (so far) mainly focussed on mixtures of discrete and continuous variables. In the next section, we start by defining the family of models under study, and then, in Section 3 we give theoretical results on the identifiability of these models from non-interventional data. We describe a practical method for inferring the generating model from a sample of data vectors in Section 4, and show its utility in simulations and on real data (Section 5). 2 Model definition We assume that the observed data has been generated in the following way: Each observed variable xi is associated with a node i in a directed acyclic graph G, and the value of xi is obtained as a function of its parents in G, plus independent additive noise ni, i.e. xi := fi(xpa(i)) + ni, (1) where fi is an arbitrary function (possibly different for each i), xpa(i) is a vector containing the elements xj such that there is an edge from j to i in the DAG G, the noise variables ni may have arbitrary probability densities pni(ni), and the noise variables are jointly independent, that is pn(n) =  i pni(ni), where n denotes the vector containing the noise variables ni. Our data then consists of a number of vectors x sampled independently, each using G, the same functions fi, and the ni sampled independently from the same densities pni(ni). Note that this model includes the special case when all the fi are linear and all the pni are Gaussian, yielding the standard linear–Gaussian model family [2, 3, 9]. When the functions are linear but the densities pni are non-Gaussian we obtain the linear–non-Gaussian models described in [7]. The goal of causal discovery is, given the data vectors, to infer as much as possible about the generating mechanism; in particular, we seek to infer the generating graph G. In the next section we discuss the prospects of this task in the theoretical case where the joint distribution px(x) of the observed data can be estimated exactly. Later, in Section 4, we experimentally tackle the practical case of a finite-size data sample. 3 Identifiability Our main theoretical results concern the simplest non-trivial graph: the case of two variables. The experimental results will, however, demonstrate that the basic principle works even in the general case of N variables. Figure 1 illustrates the basic identifiability principle for the two-variable model. Denoting the two variables x and y, we are considering the generative model y := f(x) + n where x and n are 5 -5 0 5 0 -5 5 0 -5 0 -3 3 5 0 -5 5 -5 0 5 0 -5 0 -3 3 a b c d e f !5 0 5 0.000 0.005 0.010 0.015 0.020 yvals cm1 !3 !2 !1 0 1 2 3 0.000 0.005 0.010 0.015 0.020 0.025 0.030 xvals[theinds] cm1[theinds] !5 0 5 0.000 0.005 0.010 0.015 0.020 yvals cm1 !3 !2 !1 0 1 2 3 0.00 0.01 0.02 0.03 0.04 xvals[theinds] cm1[theinds] p(y | x) p(y | x) p(x | y) p(x | y) y x x y y x y x x y p(x,y)>0 p(x,y)>0 f(x) noise p(x) p(x) noise g Figure 1: Identification of causal direction based on constancy of conditionals. See main text for a detailed explanation of (a)–(f). (g) shows an example of a joint density p(x,y) generated by a causal model x  y with y := f(x) + n where f is nonlinear, the supports of the densities px(x) and pn(n) are compact regions, and the function f is constant on each connected component of the support of px. The support of the joint density is now given by the two gray squares. Note that the input distribution px, the noise distribution pn and f can in fact be chosen such that the joint density is symmetrical with respect to the two variables, i.e. p(x,y) = p(y,x), making it obvious that there will also be a valid backward model. both Gaussian and statistically independent. In panel (a) we plot the joint density p(x, y) of the observed variables, for the linear case of f(x) = x. As a trivial consequence of the model, the conditional density p(y | x) has identical shape for all values of x and is simply shifted by the function f(x); this is illustrated in panel (b). In general, there is no reason to believe that this relationship would also hold for the conditionals p(x | y) for different values of y but, as is well known, for the linear–Gaussian model this is actually the case, as illustrated in panel (c). Panels (d-f) show the corresponding joint and conditional densities for the corresponding model with a nonlinear function f(x) = x + x3. Notice how the conditionals p(x | y) look different for different values of y, indicating that a reverse causal model of the form x := g(y) + ˜n (with y and ˜n statistically independent) would not be able to fit the joint density. As we will show in this section, this will in fact typically be the case, however, not always. To see the latter, we first show that there exist models other than the linear–Gaussian and the independent case which admit both a forward x →y and a backward x ←y model. Panel (g) of Figure 1 presents a nonlinear functional model with additive non-Gaussian noise and non-Gaussian input distributions that nevertheless admits a backward model. The functions and probability densitities can be chosen to be (arbitrarily many times) differentiable. Note that the example of panel (g) in Figure 1 is somewhat artificial: p has compact support, and x, y are independent inside the connected components of the support. Roughly speaking, the nonlinearity of f does not matter since it occurs where p is zero — an artifical situation which is avoided by the requirement that from now on, we will assume that all probability densities are strictly positive. Moreover, we assume that all functions (including densities) are three times differentiable. In this case, the following theorem shows that for generic choices of f, px(x), and pn(n), there exists no backward model. Theorem 1 Let the joint probability density of x and y be given by p(x, y) = pn(y −f(x))px(x) , (2) where pn, px are probability densities on R. If there is a backward model of the same form, i.e., p(x, y) = p˜n(x −g(y))py(y) , (3) then, denoting ν := log pn and ξ := log px, the triple (f, px, pn) must satisfy the following differential equation for all x, y with ν′′(y −f(x))f ′(x) ̸= 0: ξ′′′ = ξ′′  −ν′′′f ′ ν′′ + f ′′ f ′  −2ν′′f ′′f ′ + ν′f ′′′ + ν′ν′′′f ′′f ′ ν′′ −ν′(f ′′)2 f ′ , (4) where we have skipped the arguments y −f(x), x, and x for ν, ξ, and f and their derivatives, respectively. Moreover, if for a fixed pair (f, ν) there exists y ∈R such that ν′′(y −f(x))f ′(x) ̸= 0 for all but a countable set of points x ∈R, the set of all px for which p has a backward model is contained in a 3-dimensional affine space. Loosely speaking, the statement that the differential equation for ξ has a 3-dimensional space of solutions (while a priori, the space of all possible log-marginals ξ is infinite dimensional) amounts to saying that in the generic case, our forward model cannot be inverted. A simple corollary is that if both the marginal density px(x) and the noise density pn(y −f(x)) are Gaussian then the existence of a backward model implies linearity of f: Corollary 1 Assume that ν′′′ = ξ′′′ = 0 everywhere. If a backward model exists, then f is linear. The proofs of Theorem 1 and Corollary 1 are provided in the Appendix. Finally, we note that even when f is linear and pn and px are non-Gaussian, although a linear backward model has previously been ruled out [7], there exist special cases where there is a nonlinear backward model with independent additive noise. One such case is when f(x) = −x and px and pn are Gumbel distributions: px(x) = exp(−x −exp(−x)) and pn(n) = exp(−n −exp(−n)). Then taking py(y) = exp(−y −2 log(1 + exp(−y))), p˜n(˜n) = exp(−2˜n −exp(−˜n)) and g(y) = log(1 + exp(−y)) one obtains p(x, y) = pn(y −f(x))px(x) = p˜n(x −g(y))py(y). Although the above results strictly only concern the two-variable case, there are strong reasons to believe that the general argument also holds for larger models. In this brief contribution we do not pursue any further theoretical results, rather we show empirically that the estimation principle can be extended to networks involving more than two variables. 4 Model estimation Section 3 established for the two-variable case that given knowledge of the exact densities, the true model is (in the generic case) identifiable. We now consider practical estimation methods which infer the generating graph from sample data. Again, we begin by considering the case of two observed scalar variables x and y. Our basic method is straightforward: First, test whether x and y are statistically independent. If they are not, we continue as described in the following manner: We test whether a model y := f(x)+n is consistent with the data, simply by doing a nonlinear regression of y on x (to get an estimate ˆf of f), calculating the corresponding residuals ˆn = y −ˆf(x), and testing whether ˆn is independent of x. If so, we accept the model y := f(x) + n; if not, we reject it. We then similarly test whether the reverse model x := g(y) + n fits the data. The above procedure will result in one of several possible scenarios. First, if x and y are deemed mutually independent we infer that there is no causal relationship between the two, and no further analysis is performed. On the other hand, if they are dependent but both directional models are accepted we conclude that either model may be correct but we cannot infer it from the data. A more positive result is when we are able to reject one of the directions and (tentatively) accept the other. Finally, it may be the case that neither direction is consistent with the data, in which case we conclude that the generating mechanism is more complex and cannot be described using this model. This procedure could be generalized to an arbitrary number N of observed variables, in the following way: For each DAG Gi over the observed variables, test whether it is consistent with the data by constructing a nonlinear regression of each variable on its parents, and subsequently testing whether the resulting residuals are mutually independent. If any independence test is rejected, Gi is rejected. On the other hand, if none of the independence tests are rejected, Gi is consistent with the data. The above procedure is obviously feasible only for very small networks (roughly N ≤7 or so) and also suffers from the problem of multiple hypothesis testing; an important future improvement would be to take this properly into account. Furthermore, the above algorithm returns all DAGs consistent with the data, including all those for which consistent subgraphs exist. Our current implementation removes any such unnecessarily complex graphs from the output. The selection of the nonlinear regressor and of the particular independence tests are not constrained. Any prior information on the types of functional relationships or the distributions of the noise should optimally be utilized here. In our implementation, we perform the regression using Gaussian Processes [12] and the independence tests using kernel methods [13]. Note that one must take care to avoid overfitting, as overfitting may lead one to falsely accept models which should be rejected. 5 Experiments To show the ability of our method to find the correct model when all the assumptions hold we have applied our implementation to a variety of simulated and real data. For the regression, we used the GPML code from [14] corresponding to [12], using a Gaussian kernel and independent Gaussian noise, optimizing the hyperparameters for each regression individually.1 In principle, any regression method can be used; we have verified that our results do not depend significantly on the choice of the regression method by comparing with ν-SVR [15] and with thinplate spline kernel regression [16]. For the independence test, we implemented the HSIC [13] with a Gaussian kernel, where we used the gamma distribution as an approximation for the distribution of the HSIC under the null hypothesis of independence in order to calculate the p-value of the test result. Simulations. The main results for the two-variable case are shown in Figure 2. We simulated data using the model y = x + bx3 + n; the random variables x and n were sampled from a Gaussian distribution and their absolute values were raised to the power q while keeping the original sign. 1The assumption of Gaussian noise is somewhat inconsistent with our general setting where the residuals are allowed to have any distribution (we even prefer the noise to be non-Gaussian); in practice however, the regression yields acceptable results as long as the noise is sufficiently similar to Gaussian noise. In case of significant outliers, other regression methods may yield better results. (a) 0 1 paccept paccept 0.5 1 1.5 2 qq correct reverse b = 0 (b) 0 1 paccept paccept −1 0 1 bb correct reverse q = 1 Figure 2: Results of simulations (see main text for details): (a) The proportion of times the forward and the reverse model were accepted, paccept, as a function of the non-Gaussianity parameter q (for b = 0), and (b) as a function of the nonlinearity parameter b (for q = 1). The parameter b controls the strength of the nonlinearity of the function, b = 0 corresponding to the linear case. The parameter q controls the non-Gaussianity of the noise: q = 1 gives a Gaussian, while q > 1 and q < 1 produces super-Gaussian and sub-Gaussian distributions respectively. We used 300 (x, y) samples for each trial and used a significance level of 2% for rejecting the null hypothesis of independence of residuals and cause. For each b value (or q value) we repeated the experiment 100 times in order to estimate the acceptance probabilities. Panel (a) shows that our method can solve the well-known linear but non-Gaussian special case [7]. By plotting the acceptance probability of the correct and the reverse model as a function of non-Gaussianity we can see that when the distributions are sufficiently non-Gaussian the method is able to infer the correct causal direction. Then, in panel (b) we similarly demonstrate that we can identify the correct direction for the Gaussian marginal and Gaussian noise model when the functional relationship is sufficiently nonlinear. Note in particular, that the model is identifiable also for positive b in which case the function is invertible, indicating that non-invertibility is not a necessary condition for identification. We also did experiments for 4 variables w, x, y and z with a diamond-like causal structure. We took w ∼U(−3, 3), x = w2 + nx with nx ∼U(−1, 1), y = 4 p |w|+ny with ny ∼U(−1, 1), z = 2 sin x+2 sin y+nz with nz ∼U(−1, 1). We sampled 500 (w, x, y, z) tuples from the model and applied the algorithm described in Section 4 in order to reconstruct the DAG structure. The simplest DAG that was consistent with the data (with significance level 2% for each test) turned out to be precisely the true causal structure. All five other DAGs for which the true DAG is a subgraph were also consistent with the data. w x y z Real-world data. Of particular empirical interest is how well the proposed method performs on real world datasets for which the assumptions of our method might only hold approximately. Due to space constraints we only discuss three real world datasets here. The first dataset, the “Old Faithful” dataset [17] contains data about the duration of an eruption and the time interval between subsequent eruptions of the Old Faithful geyser in Yellowstone National Park, USA. Our method obtains a p-value of 0.5 for the (forward) model “current duration causes next interval length” and a p-value of 4.4 × 10−9 for the (backward) model “next interval length causes current duration”. Thus, we accept the model where the time interval between the current and the next eruption is a function of the duration of the current eruption, but reject the reverse model. This is in line with the chronological ordering of these events. Figure 3 illustrates the data, the forward and backward fit and the residuals for both fits. Note that for the forward model, the residuals seem to be independent of the duration, whereas for the backward model, the residuals are clearly dependent on the interval length. Time-shifting the data by one time step, we obtain for the (forward) model “current interval length causes next duration” a p-value smaller than 10−15 and for the (backward) model “next duration causes current interval length” we get a p-value of 1.8 × 10−8. Hence, our simple nonlinear model with independent additive noise is not consistent with the data in either direction. The second dataset, the “Abalone” dataset from the UCI ML repository [18], contains measurements of the number of rings in the shell of abalone (a group of shellfish), which indicate their age, and the length of the shell. Figure 4 shows the results for a subsample of 500 datapoints. The correct model “age causes length” leads to a p-value of 0.19, while the reverse model “length causes age” comes (a) 0 2 4 6 40 60 80 100 duration interval (b) 0 2 4 6 −20 0 20 40 duration residuals of (a) (c) 40 60 80 100 0 2 4 6 interval duration (d) 40 60 80 100 −4 −2 0 2 interval residuals of (c) Figure 3: The Old Faithful Geyser data: (a) forward fit corresponding to “current duration causes next interval length”; (b) residuals for forward fit; (c) backward fit corresponding to “next interval length causes current duration”; (d) residuals for backward fit. (a) 0 10 20 30 0 0.2 0.4 0.6 0.8 rings length (b) 0 10 20 30 −0.4 −0.2 0 0.2 0.4 rings residuals of (a) (c) 0 0.5 1 0 10 20 30 length rings (d) 0 0.5 1 −10 0 10 20 length residuals of (c) Figure 4: Abalone data: (a) forward fit corresponding to “age (rings) causes length”; (b) residuals for forward fit; (c) backward fit corresponding to “length causes age (rings)”; (d) residuals for backward fit. (a) 0 1000 2000 3000 −5 0 5 10 15 altitude temperature (b) 0 1000 2000 3000 −2 −1 0 1 2 altitude residuals of (a) (c) −10 0 10 20 0 1000 2000 3000 temperature altitude (d) −10 0 10 20 −400 −200 0 200 400 temperature residuals of (c) Figure 5: Altitude–temperature data. (a) forward fit corresponding to “altitude causes temperature”; (b) residuals for forward fit; (c) backward fit corresponding to “temperature causes altitude”; (d) residuals for backward fit. with p < 10−15. This is in accordance with our intuition. Note that our method favors the correct direction although the assumption of independent additive noise is only approximately correct here; indeed, the variance of the length is dependent on age. Finally, we assay the method on a simple example involving two observed variables: The altitude above sea level (in meters) and the local yearly average outdoor temperature in centigrade, for 349 weather stations in Germany, collected over the time period of 1961–1990 [19]. The correct model “altitude causes temperature” leads to p = 0.017, while “temperature causes altitude” can clearly be rejected (p = 8 × 10−15), in agreement with common understanding of causality in this case. The results are shown in Figure 5. 6 Conclusions In this paper, we have shown that the linear–non-Gaussian causal discovery framework can be generalized to admit nonlinear functional dependencies as long as the noise on the variables remains additive. In this approach nonlinear relationships are in fact helpful rather than a hindrance, as they tend to break the symmetry between the variables and allow the correct causal directions to be identified. Although there exist special cases which admit reverse models we have shown that in the generic case the model is identifiable. We have illustrated our method on both simulated and real world datasets. Acknowledgments We thank Kun Zhang for pointing out an error in the original manuscript. This work was supported in part by the IST Programme of the European Community, under the PASCAL2 Network of Excellence, IST-2007-216886. P.O.H. was supported by the Academy of Finland and by University of Helsinki Research Funds. A Proof of Theorem 1 Set π(x, y) := log p(x, y) = ν(y −f(x)) + ξ(x) , (5) and ˜ν := log p˜n, η := log py. If eq. (3) holds, then π(x, y) = ˜ν(x −g(y)) + η(y) , implying ∂2π ∂x∂y = −˜ν′′(x −g(y))g′(y) and ∂2π ∂x2 = ˜ν′′(x −g(y)) . We conclude ∂ ∂x  ∂2π/∂x2 ∂2π/(∂x∂y)  = 0 . (6) Using eq. (5) we obtain ∂2π ∂x∂y = −ν′′(y −f(x))f ′(x) , (7) and ∂2π ∂x2 = ∂ ∂x (−ν′(y −f(x))f ′(x) + ξ′(x)) = ν′′(f ′)2 −ν′f ′′ + ξ′′ , (8) where we have dropped the arguments for convenience. Combining eqs. (7) and (8) yields ∂ ∂x ∂2π ∂x2 ∂2π ∂x∂y ! = −2f ′′ + ν′f ′′′ ν′′f ′ −ξ′′′ 1 ν′′f ′ + ν′ν′′′f ′′ (ν′′)2 −ν′(f ′′)2 ν′′(f ′)2 −ξ′′ ν′′′ (ν′′)2 + ξ′′ f ′′ ν′′(f ′)2 . Due to eq. (6) this expression must vanish and we obtain DE (4) by term reordering. Given f, ν, we obtain for every fixed y a linear inhomogeneous DE for ξ: ξ′′′(x) = ξ′′(x)G(x, y) + H(x, y) , (9) where G and H are defined by G := −ν′′′f ′ ν′′ + f ′′ f ′ and H := −2ν′′f ′′f ′ + ν′f ′′′ + ν′ν′′′f ′′f ′ ν′′ −ν′(f ′′)2 f ′ . Setting z := ξ′′ we have z′(x) = z(x)G(x, y) + H(x, y) . Given that such a function z exists, it is given by z(x) = z(x0)e R x x0 G(˜x,y)d˜x + Z x x0 e R x ˆx G(˜x,y)d˜xH(ˆx, y)dˆx . (10) Let y be fixed such that ν′′(y −f(x))f ′(x) ̸= 0 holds for all but countably many x. Then z is determined by z(x0) since we can extend eq. (10) to the remaining points. The set of all functions ξ satisfying the linear inhomogenous DE (9) is a 3-dimensional affine space: Once we have fixed ξ(x0), ξ′(x0), ξ′′(x0) for some arbitrary point x0, ξ is completely determined. Given fixed f and ν, the set of all ξ admitting a backward model is contained in this subspace. □ B Proof of Corollary 1 Similarly to how (6) was derived, under the assumption of the existence of a reverse model one can derive ∂2π ∂x∂y · ∂ ∂x ∂2π ∂x2  = ∂2π ∂x2 · ∂ ∂x  ∂2π ∂x∂y  Now using (7) and (8), we obtain (−ν′′f ′) · ∂ ∂x ν′′(f ′)2 −ν′f ′′ + ξ′′ = (ν′′(f ′)2 −ν′f ′′ + ξ′′) · ∂ ∂x (−ν′′f ′) which reduces to −2(ν′′f ′)2f ′′ + ν′′f ′ν′f ′′′ −ν′′f ′ξ′′′ = −ν′f ′′ν′′′(f ′)2 + ξ′′ν′′′(f ′)2 + ν′′ν′(f ′′)2 −ν′′f ′′ξ′′. Substituting the assumptions ξ′′′ = 0 and ν′′′ = 0 (and hence ν′′ = C everywhere with C ̸= 0 since otherwise ν cannot be a proper log-density) yields ν′y −f(x)  · f ′f ′′′ −(f ′′)2 = 2C(f ′)2f ′′ −f ′′ξ′′. Since C ̸= 0 there exists an α such that ν′(α) = 0. Then, restricting ourselves to the submanifold {(x, y) ∈R2 : y −f(x) = α} on which ν′ = 0, we have 0 = f ′′(2C(f ′)2 −ξ′′). Therefore, for all x in the open set [f ′′ ̸= 0], we have (f ′(x))2 = ξ′′/(2C) which is a constant, so f ′′ = 0 on [f ′′ ̸= 0]: a contradiction. Therefore, f ′′ = 0 everywhere. □ References [1] J. Pearl. Causality: Models, Reasoning, and Inference. Cambridge University Press, 2000. [2] P. Spirtes, C. Glymour, and R. Scheines. Causation, Prediction, and Search. Springer-Verlag, 1993. (2nd ed. MIT Press 2000). [3] D. Geiger and D. Heckerman. Learning Gaussian networks. In Proc. of the 10th Annual Conference on Uncertainty in Artificial Intelligence, pages 235–243, 1994. [4] D. Heckerman, C. Meek, and G. Cooper. A Bayesian approach to causal discovery. In C. Glymour and G. F. Cooper, editors, Computation, Causation, and Discovery, pages 141–166. MIT Press, 1999. [5] T. Richardson and P. Spirtes. Automated discovery of linear feedback models. In C. Glymour and G. F. Cooper, editors, Computation, Causation, and Discovery, pages 253–304. MIT Press, 1999. [6] R. Silva, R. Scheines, C. Glymour, and P. Spirtes. Learning the structure of linear latent variable models. Journal of Machine Learning Research, 7:191–246, 2006. [7] S. Shimizu, P. O. Hoyer, A. Hyv¨arinen, and A. J. Kerminen. A linear non-Gaussian acyclic model for causal discovery. Journal of Machine Learning Research, 7:2003–2030, 2006. [8] X. Sun, D. Janzing, and B. Sch¨olkopf. Distinguishing between cause and effect via kernel-based complexity measures for conditional probability densities. Neurocomputing, pages 1248–1256, 2008. [9] K. A. Bollen. Structural Equations with Latent Variables. John Wiley & Sons, 1989. [10] N. Friedman and I. Nachman. Gaussian process networks. In Proc. of the 16th Annual Conference on Uncertainty in Artificial Intelligence, pages 211–219, 2000. [11] X. Sun, D. Janzing, and B. Sch¨olkopf. Causal inference by choosing graphs with most plausible Markov kernels. In Proceeding of the 9th Int. Symp. Art. Int. and Math., Fort Lauderdale, Florida, 2006. [12] C. E. Rasmussen and C. Williams. Gaussian Processes for Machine Learning. MIT Press, 2006. [13] A. Gretton, R. Herbrich, A. Smola, O. Bousquet, and B. Sch¨olkopf. Kernel methods for measuring independence. Journal of Machine Learning Research, 6:2075–2129, 2005. [14] GPML code. http://www.gaussianprocess.org/gpml/code. [15] B. Sch¨olkopf, A. J. Smola, and R. Williamson. Shrinking the tube: A new support vector regression algorithm. In Advances in Neural Information Processing 11 (Proc. NIPS*1998). MIT Press, 1999. [16] G. Wahba. Spline Models for Observational Data. Series in Applied Math., Vol. 59, SIAM, Philadelphia, 1990. [17] A. Azzalini and A. W. Bowman. A look at some data on the Old Faithful Geyser. Applied Statistics, 39(3):357–365, 1990. [18] A. Asuncion and D.J. Newman. UCI machine learning repository, 2007. [19] Climate data collected by the Deutscher Wetter Dienst. http://www.dwd.de/.
2008
238
3,496
Simple Local Models for Complex Dynamical Systems Erik Talvitie Computer Science and Engineering University of Michigan etalviti@umich.edu Satinder Singh Computer Science and Engineering University of Michigan baveja@umich.edu Abstract We present a novel mathematical formalism for the idea of a “local model” of an uncontrolled dynamical system, a model that makes only certain predictions in only certain situations. As a result of its restricted responsibilities, a local model may be far simpler than a complete model of the system. We then show how one might combine several local models to produce a more detailed model. We demonstrate our ability to learn a collection of local models on a large-scale example and do a preliminary empirical comparison of learning a collection of local models and some other model learning methods. 1 Introduction Building models that make good predictions about the world can be a complicated task. Humans, however, seem to have the remarkable ability to split this task up into manageable chunks. For instance, the activity in a park may have many complex interacting components (people, dogs, balls, etc.) and answering questions about their joint state would be impossible. It can be much simpler to answer abstract questions like “Where will the ball bounce?” ignoring most of the detail of what else might happen in the next moment. Some other questions like “What will the dog do?” may still be very difficult to answer in general, as dogs are complicated objects and their behavior depends on many factors. However, in certain situations, it may be relatively easy to make a prediction. If a ball has just been thrown, one may reasonably predict that the dog will chase it, without too much consideration of other potentially relevant facts. In short, it seems that humans have a lot of simple, localized pieces of knowledge that allow them to make predictions about particular aspects of the world in restricted situations. They can combine these abstract predictions to form more concrete, detailed predictions. Of course, there has been substantial effort in exploiting locality/independence structure in AI. Much of it is focused on static domains without temporal concerns (e.g. [1]), though these ideas have been applied in dynamical settings as well (e.g. [2, 3]). Our main contribution is to provide a novel mathematical formulation of “local models” of dynamical systems that make only certain predictions in only certain situations. We also show how to combine them into a more complete model. Finally, we present empirical illustrations of the use of our local models. 1.1 Background In this paper we will focus on learning models of uncontrolled discrete dynamical systems (we leave consideration of controlled systems to future work). At each time step i the system emits an observation oi from a finite set of observations O. We call sequences of observations tests and let T be the set of all possible tests of all lengths. At time step i, the history is simply the sequence o1o2...oi of past observations. We use the letter φ to represent the null history in which no observation has yet been emitted. A prediction of a test t = oi+1...oi+k given a history h = o1...oi, which we denote p(t|h), is the conditional probability that the sequence t will occur, given that the sequence h has already occurred: p(t|h) def= Pr(oi+1 = oi+1, ..., oi+k = oi+k|o1 = o1, ..., oi = oi). The set of all histories H is defined: H def= {t ∈T : p(t|φ) > 0} ∪{φ}. We use models to make predictions: 1 Definition 1. A complete model can generate predictions p(t|h) for all t ∈T and h ∈H. A model that can make every such prediction can make any conditional prediction about the system [4]. For instance, one may want to make predictions about whether any one of a set of possible futures will occur (e.g. “Will the man throw a ball any time before he leaves the park?”). We can represent this type of prediction using a union test (also called a “collective outcome” by Jaeger [5]). Definition 2. A union test T ⊆T is a set of tests such that if t ∈T then no prefix of t is in T. The prediction of a union test is a sum of predictions: p(T|h) def= P t∈T p(t|h). Models may be provided by an expert, or we can learn them from experience with the system (in the form of a data set of observation sequences emitted by the system). The complexity of representing and learning a model often depends on the complexity of the system being modeled. The measure of complexity that we will adopt is called the linear dimension [6] and is defined as the rank of the “system dynamics matrix” (the infinite matrix of predictions whose ijth entry is p(tj|hi) for all tj ∈T and hi ∈H). It is also closely related to the number of underlying states in a Hidden Markov Model. We will not define it more formally here but note that when we say one system is simpler than another, we mean that it has a smaller linear dimension. We will now present the main contributions of our work, starting by precisely defining a local model, and then showing how they can be combined to create a more complete model. 2 Local Models In contrast to a complete model, a local model has limited prediction responsibilities and hence makes only certain predictions in certain situations. Definition 3. Given a set of tests of interest T I and a set of histories of interest HI, a local model is any model that generates the predictions of interest: p(t|h) for all t ∈T I and h ∈HI. We will assume, in general, that the tests of interest are union tests. In this paper, we will place a constraint on HI ⊆H which we will call the “semi-Markov” property, due to its close relationship to the concept of the same name in the “options” literature [7]; this assumption will be relaxed in future work. In words, we require that, in order to determine if the current history is of interest, we need only look at what has happened since the preceeding history of interest. Put formally, Definition 4. A set of histories of interest HI is semi-Markov iff h, h′ ∈HI ∪{φ} and ht ∈HI for some t ∈T , implies that either h′t ∈HI or p(h′t|φ) = 0. Figure 1: 1D Ball Bounce As a simple example, consider the 1D Ball Bounce system (see Figure 1). The agent observes a line of pixels, one of which (the location of the “ball”) is black; the rest are white. The ball moves along the line, changing direction when it hits the edge. Each time step, with probability 0.5, the ball sticks in place, and with probability 0.5 it moves one square in its current direction. One natural local model would make one-step predictions about only one pixel, p. It has two tests of interest: the set of all one-step tests in which the pixel p is black, and the set of all one-step tests in which p is white. All histories are of interest. This local model answers the question “What is the chance the ball will be in pixel p next?” Note that, in order to answer this question, we need only observe the color of the pixels neighboring p. We will refer to this example as Model A. Another, even more restricted local model would be one that has the same tests of interest, but whose histories of interest are only those that end with pixel p being black. This local model would essentially answer the question “When the ball is in pixel p, what is the chance that it will stick?” In order to make this prediction, the local model can ignore all detail; the prediction for the test of interest is always 0.5 at histories of interest. We will refer to this local model as Model B. In general, as in the examples above, we expect that many details about the world are irrelevant to making the predictions of interest and could be ignored in order to simplify the local model. Taking an approach similar to that of, e.g., Wolfe & Barto [8], Soni & Singh [9], or Talvitie et al. [10], given tests and histories of interest, we will show how to convert a primitive observation sequence into an 2 abstract observation sequence that ignores unnecessary detail. A complete model of the abstracted system can be used as a local model in the original, primitive system. The abstraction proceeds in two steps (shown in Figure 2). First, we construct an intermediate system which makes predictions for all tests, but only updates at histories of interest. Then we further abstract the system by ignoring details irrelevant to making predictions for just the tests of interest. 2.1 Abstracting Details for Local Predictions Incorporating Histories Of Interest: Intuitively, since a local model is never asked to make a prediction at a history outside of HI, one way to simplify it is to only update its predictions at histories of interest. Essentially, it “wakes up” whenever a history of interest occurs, sees what observation sequence happened since it was last awake, updates, and then goes dormant until the next history of interest. We call the sequences of observations that happen between histories of interest bridging tests. The set of bridging tests T B is induced by the set of histories of interest. Definition 5. A test t ∈T is a bridging test iff for all j < |t|, and all h ∈HI, ht[1...j] /∈HI (where t[1...j] denotes the j-length prefix of t) and either ∃h ∈HI such that ht ∈HI or |t| = ∞. Figure 2: Mapping experience in the original system to experience in the TE system, and then to experience in the abstract system. Conceptually, we transform the primitive observation sequence into a sequence of abstract observations in which each observation corresponds to a bridging test. We call such a transformed sequence the Temporally Extended or TE sequence (see Figure 2). Note that even when the primitive system has a small number of observations, the TE system can have infinitely many, because there can be an infinity of bridging tests. However, because it does not update between histories of interest, a model of TE may be simpler than a model of the original system. To see this, consider again the 1D Ball Bounce of size k. This system has linear dimension O(2k), intuitively because the ball has 2 possible directions and k possible positions. Recall Model B, that only applies when the ball lands on a particular pixel. The bridging tests, then, are all possible ways the ball could travel to an edge and back. The probability of each bridging test depends only on the current direction of the ball. As such, the TE system here has linear dimension 2, regardless of k. It is possible to show formally that the TE system is never more complex than the original system. Proposition 1. If the linear dimension of a dynamical system is n then, given a semi-Markov set of histories of interest HI, the linear dimension of the induced TE system, nT E ≤n. Proof. (Sketch) The linear dimension of a system is the rank of the system dynamics matrix (SDM) corresponding to the system [6]. The matrix corresponding to the TE system is the submatrix of the SDM of the original system with only columns and rows corresponding to histories and tests that are sequences of bridging tests. A submatrix never has greater rank than the matrix that contains it. What good is a model of the TE system? We next show that a model of the TE system can make predictions for all tests t ∈T in all histories of interest h ∈HI. Specifically, we show that the prediction for any test in a history of interest can be expressed as a prediction of a union test in TE. For the following, note that every history of interest h ∈HI can be written as a corresponding sequence of bridging tests, which we will call sh. Also, we will use the subscript TE to distinguish predictions pT E(t|h) in TE from predictions p(t|h) in the original system. Proposition 2. For any primitive test t ∈T in the original system, there is a union test St in TE such that p(t|h) = pT E(St|sh) for all h ∈HI. Proof. We will present a constructive proof. First suppose t can be written as a sequence of bridging tests st. Then trivially St = {st}. If t does not correspond to a sequence of bridging tests, we can re-write it as the concatenation of two tests: t = t1t2 such that t1 is the longest prefix of t that is a sequence of bridging tests (which may be null) and t2 /∈T B. Now, p(t|h) = p(t1|h)p(t2|ht1), where h, ht1 ∈HI. We know already that p(t1|h) = pT E(st1|sh). To calculate p(t2|ht1) note that 3 there must be a set of bridging tests Bt2 which have t2 as a prefix: Bt2 def= {b ∈T B : b[1...|t2|] = t2}. The probability of seeing t2 is the probability of seeing any of the bridging tests in Bt2. Thus, at the history of interest ht1, p(t2|ht1) = P b∈Bt2 p(b|ht1) = P b∈Bt2 pT E(b|shst1). So, we let St = {st1b : b ∈Bt2}, which gives us the result. Since tests of interest are union tests, to make the prediction of interest p(T|h) for some T ∈T I and h ∈HI using a model of TE, we have simply p(T|h) = pT E(ST |sh) = P t∈T pT E(St|sh). A model of TE is simpler than a complete model of the system because it only makes predictions at histories of interest. However, it still makes predictions for all tests. We can further simplify our modeling task by focusing on predicting the tests of interest. Incorporating Tests of Interest: Recall Model A from our example. Since all histories are of interest, bridging tests are single observations, and TE is exactly equivalent to the original system. However, note that in order to make the predictions of interest, one must only know whether the ball is neighboring or on the pixel. So, we need only distinguish observations in which the ball is nearby, and we can group the rest into one abstract observation: “the ball is far from the pixel.” In general we will attempt to abstract away unnecessary details of bridging tests by aliasing bridging tests that are equivalent with respect to making the predictions of interest. Specifically, we will define a partition, or a many-to-one mapping, from TE observations (the bridging tests T B) to abstract observations A. We will then use a model of the abstract system with A as its observations (see Figure 2) as our local model. So, A must have the following properties: (1) we must be able to express the tests of interest as a union of sequences of abstract observations in A and (2) an abstracted history must contain enough detail to make accurate predictions for the tests of interest. Let us first consider how to satisfy (1). For ease of exposition, we will discuss a special case. We assume that tests of interest are unions of one-step tests (i.e., for any T ∈T I, T ⊆O) and that T I partitions O, so every observation is contained within exactly one test of interest. One natural example that satisfies this assumption is where the local model makes one-step predictions for a particular dimension of a vector-valued observation. There is no fundamental barrier to treating tests of interest that are arbitrary union tests, but the development of the general case is more complex. Note that if a union test T ⊂O, then the equivalent TE union test, ST , consists of every bridging test that begins with an observation in T. So, if T I partitions O, then SI def={ST : T ∈T I} partitions the bridging tests, T B, according to their first observation. As such, if we chose A = SI, or any refinement thereof, we would satisfy criterion (1). However, SI may not satisfy (2). For instance, in our 1D Ball Bounce, in order to make accurate predictions for one pixel it does not suffice to observe that pixel and ignore the rest. We must also distinguish the color of the neighboring pixels. This problem was treated explicitly by Talvitie et al. [10]. They define an accurate partition: Definition 6. An observation abstraction A is accurate with respect to T I iff for any two primitive histories h1 = o1...ok and h2 = o′1...o′k such that ∀i oi and o′i are contained within the same abstract observation Oi ∈A, we have p(T|h1) = p(T|h2), ∀T ∈T I. The system we are abstracting is TE, so the observations are bridging tests. We require an accurate refinement of SI. Any refinement of SI satisfies criterion (1). Furthermore, an accurate refinement is one that only aliases two histories if they result in the same predictions for the tests of interest. Thus, we can use an abstract history to make exactly the same predictions for the tests of interest that we would make if we had access to the primitive history. So, an accurate refinement also satisfies criterion (2). Furthermore, an accurate refinement always exists, because the partition that distinguishes every observation is trivially accurate, though in general we expect to be able to abstract away some detail. Finally, a model of the abstract system may be far simpler than a model of the original system or the TE system, and can be no more complex: Proposition 3. If the linear dimension of a dynamical system is n then the linear dimension of any local model M, nM ≤nT E ≤n. Proof. (Sketch) The rows and columns of the SDM corresponding to an abstraction of TE are linear combinations of rows and columns of the SDM of TE [10]. So, the rank of the abstract SDM can be no more than the rank of the SDM for TE. 4 Learning a local model: We are given tests and histories of interest and an accurate abstraction. To learn a local model, we first translate the primitive trajectories into TE trajectories using the histories of interest, and then translate the TE trajectories into abstract trajectories using the accurate abstraction (as in Figure 2). We can then train any model on the abstracted data. In our experiments, we use POMDPs [11], PSRs [4], and low-order Markov models as local model representations. 2.2 Combining Local Models Consider a collection of local models M. Each local model M ∈M has tests of interest T I M, histories of interest HI M, and is an exact model of the abstract system induced by a given accurate refinement, AM. At any history h, the set of models Mh def= {M ∈M : h ∈HI M} is available to make predictions for their tests of interest. However, we may wish to make predictions that are not specifically of interest to any local model. In that case, we must combine the abstract, coarse predictions made by individual models into more fine-grained joint predictions. We will make a modeling assumption that allows us to efficiently combine the predictions of local models: Definition 7. The local models in Mh are mutually conditionally independent, given h iff for any subset {M1, M2, ..., Mk} ⊆Mh, and any T1 ∈T I M1, T2 ∈T I M2, ..., Tk ∈T I Mk, the prediction of the intersection is equal to the product of the predictions: p(∩k i=1Ti|h) = Qk i=1 p(Ti|h). A domain expert specifying the structure of a collection of local models should strive to satisfy this property as best as possible since, given this assumption, a collection of local models can be used to make many more predictions than can be made by each individual model. We can compute the predictions of finer-grained tests (intersections of tests of interest) by multiplying predictions together. We can also compute the predictions of unions of tests of interest using the standard formula: Pr(A ∪B) = Pr(A) + Pr(B) −Pr(A ∩B). At any history h for which Mh ̸= ∅, a collection of local models can be used to make predictions for any union test that can be constructed by unioning/intersecting the tests of interest of the models in Mh. This may not include all tests. Of course making all predictions may not be practical, or necessary. A collection of local models can selectively focus on making the most important predictions well, ignoring or approximating less important predictions to save on representational complexity. Of course, a collection of local models can be a complete model. For instance, note that any model that can make the predictions p(o|h) for every o ∈O and h ∈H is a complete model. This is because every prediction can be expressed in terms of one-step predictions: p(o1...ok|h) = p(o1|h)p(o2|ho1)...p(ok|ho1...ok−1). As such, if every one-step test is expressible as an intersection of tests of interest of models in Mh at every h, then M is a complete model. That said, for a given M, the mutual conditional independence property may or may not hold. If it does not, predictions made using M will be approximate, even if each local model in M makes its predictions of interest exactly. It would be useful, in future work, to explore bounds on the error of this approximation. When learning a collection of local models in this paper, we assume that tests and histories of interest as well as an accurate refinement for each model are given. We then train each local model individually on abstract data. This is a fair amount of knowledge to assume as given, though it is analogous to providing the structure of a graphical model and learning only the distribution parameters, which is common practice. Automatically splitting a system into simple local models is an interesting, challenging problem, and ripe ground for future research. We hope that casting the structure learning problem in the light of our framework may illuminate new avenues to progress. 2.3 Relationship to Other Structured Representations Here we briefly discuss a few especially relevant alternative modeling technologies that also aim to exploit local and independence structure in dynamical systems. DBNs: The dynamic Bayes network (DBN) [2] is a representation that exploits conditional independence structure. The main difference between DBNs and our collection of local models is that DBNs specify independence structure over “hidden variables” whose values are never observed. Our representation expresses structure entirely in terms of predictions of observations. Thus our structural assumptions can be verified using statistical tests on the data while DBN assumptions cannot be directly verified. That said, a DBN does decompose its world state into a set of random variables. It 5 Table 1: Local model structure for the arcade game HI M: M applies when history ends with: T I M: M makes one-step predictions for: AM: M additionally distinguishes bridging tests by: Ball hitting brick b Color of 6×4 pixels within b Type of special bricks hit and type of special brick most recently hit Ball not hitting brick b Color of 6×4 pixels within b None Ball in position p, coming from direction d Absence or presence of ball color in 6 × 6 pixels around p Configuration of bricks adjacent to p in last step of bridging test No brick in pixel p and no ball near pixel p Color of pixel p None stores the conditional probability distribution for each variable, given the values in the previous time step. These distributions are like local models that make one-step predictions about their variable. For each variable, a DBN also specifies which other variables can be ignored when predicting its next value. This is essentially our accurate refinement, which identifies details a local model can ignore. Histories of interest are related to the concept of context-specific independence [12]. Relational Models: Relational models (e.g. [3]) treat the state of the world as a conjunction of predicates. The state evolves using “update rules,” consisting of pre-conditions specifying when the rule applies and post-conditions (changes to the state). Update rules are essentially local models with pre and post-conditions playing the roles of histories and tests of interest. Relational models typically focus on Markov worlds. We address partial observability by essentially generalizing the “update rule.” The main strength of relational models is that they include first-order variables in update rules, allowing for sophisticated parameter tying and generalization. We use parameter tying in our experiments, but do not incorporate the formalism of variables into our framework. Others: Wolfe and Singh recently introduced the Factored PSR [13] which is essentially a special collection of local models. Also related are maximum entropy models (e.g. [14], [15]) which represent predictions as weighted products of features of the future and the past. 3 Experimental Results Figure 3: Arcade game Large Scale Example: In this section we present preliminary empirical results illustrating the application of collections of local models. Our first example is a modified, uncontrolled version of an arcade game (see Figure 3). The observations are 64 × 42 pixel images. In the image is a 2 × 2 pixel ball and a wall of 6 × 4 pixel bricks. After the ball hits a brick, the brick disappears. When the ball hits the bottom wall, it bounces at a randomly selected angle. An episode ends when there are no more bricks. In our version there are two types of “special bricks.” After the ball hits a dark brick, all bricks require two hits rather than one to break. After the ball hits a light brick, all bricks require only one hit to break. When they are first placed, bricks are regular (medium gray) with probability 0.9 and dark or light each with probability 0.05. This system is stochastic, partially observable (and because of the special bricks, not short-order Markov). It has roughly 1020 observations and even more underlying states. The decomposition into local models is specified in Table 11. Quite naturally, we have local models to predict how the bricks (rows 1-2), the ball (row 3), and the background (row 4) will behave. This structure satisfies the mutual conditional independence property, and since every pixel is predicted by some model at every history, we can make fully detailed 64× 42 pixel one-step predictions. More or less subdivision of models could be applied, the tradeoff being the complexity of individual models versus the total number of local models. With the structure we have selected there are approximately 25,000 local models. Of course, naively training 25,000 models is impractical. We can improve our data efficiency and training time though parameter tying. In this system, the behavior of objects does not depend on their position. To take advantage of this, for each type of local model 1Note: there are 30 bricks b, 2,688 pixels p, 2,183 possible positions p for the ball, and 9 possible directions d the ball could come from, including the case in the first step, where the ball simply appears in a pixel. 6 0 5000 10000 0 0.5 1 # Training Episodes Avg. Likelihood Ratio Size 5 Local POMDP Local PSR DBN POMDP PSR 0 5000 10000 0 0.5 1 Size 20 # Training Episodes Avg. Likelihood Ratio Local POMDP Local PSR DBN POMDP PSR Figure 5: Left: Results for the 1D Ball Bounce problem. Error bars are omitted to avoid graph clutter. Right: DBN structure used. All nodes are binary. The shaded nodes are hidden. Links from “Vel.” at t −1 to all nodes at t omitted for simplicity. (12 in total, since there is a ball model for each of the 9 directions) we combine all translated trajectories associated with various positions and use them to train a single shared model. Each local model maintains its own state, but the underlying model parameters are shared across all models of the same type, associated with different positions. Note that position does matter in the first time step, since the ball always appears in the same place. As a result, our model makes bad predictions about the first time step. For clarity of presentation, we will ignore the first time-step in our results. For the local models themselves, we used lookup table based short-order Markov representations. Though the overall system is not short-order Markov, each local model is. Our learned local models were first-order Markov except the one responsible for predicting what will happen to a brick when the ball hits it. This model was second-order Markov. No local model had more than 200 states. 0 50 100 150 200 250 0 0.5 1 Avg. Likelihood Ratio 0 50 100 150 200 2500 50 100 # Training Trajectories Avg. % Episodes Dropped Figure 4: Results for the arcade game example. The learning curve for this collection of local models can be seen in Figure 4. In each trial we train the models on various numbers of episodes (ending when there are no more bricks, or after 1000 steps) and measure the likelihood w.r.t. 50 test episodes. We report the average over 20 trials. Even with parameter tying, our model can assign zero probability to a test sequence, due to data sparsity issues. The solid line shows the likelihood ratio (the log likelihood of the true system divided by the log likelihood of our model) ignoring the episodes that caused an infinite log likelihood. The dashed line shows the proportion of episodes we dropped. The likelihood ratio approaches 1 while the proportion of “bad” episodes approaches 0, implying that we are learning a good model in about 100 episodes. Learning Comparisons: In this experiment, we will compare parameter learning results for collections of local models to a few other methods on a simple example, whose complexity is easily controlled. Recall the 1D Ball Bounce. We learned a model of the 1D Ball Bounce of size 5 and 20 using two collections of local models with no parameter tying (using PSRs and POMDPs as local models respectively), two flat models (a PSR and a POMDP), and a DBN 2. Both collections of local models have the following structure: for every pixel, there are two types of model. One predicts the color of the pixel in the next time step in histories when the ball is not in the immediate neighborhood about the pixel. This model ignores all pixels other than the one it is predicting. The other model applies when the ball is in the pixel. It jointly predicts the colors of the pixel and its two neighbors. This model distinguishes bridging tests in which the ball went to the left, the right, or stayed on the pixel in the first step. This collection of local models satisfies the mutual conditional independence property and allows prediction of primitive one-step tests. As with the arcade game example, in each trial we trained each model on various numbers of episodes (of length 50) and then measured their log likelihood on 1000 test episodes (also of length 2We initialized each local POMDP with 5 states and the flat POMDP with 10 and 40 states for the different problem sizes. For the DBN we used the graphical structure shown in Figure 5(c) and trained using the Graphical Models Toolkit [16]. We stopped EM after a maximum of 50 iterations. PSR training also has a free parameter (see [17] for details). Via parameter sweep we chose 0.02 for local PSRs and for the flat PSR 0.175 and 0.005, respectively for the size 5 and size 20 domains. 7 50). We report the likelihood ratio averaged over 20 trials. The results are shown in Figure 5. The collections of local models both perform well, outperforming the flat models (dashed lines). Both of the flat models’ performance degrades as the size of the world increases from 5 to 20. The collections of local models are less affected by problem size. The local PSRs seem to take more data than the local POMDPs to learn a good model, however they ultimately seem to learn a better model. The unexpected result is that DBN training seemed to perform worse than flat POMDP training. We have no explanation for this effect, other than the fact that different graphical structures could cause different local extrema issues for the EM algorithm. Clearly, given these results, a more thorough empirical comparison across a wider variety of problems is warranted. Conclusions: We have presented a novel formalization of the idea of a “local model.” Preliminary empirical results show that collections of local models can be learned for large-scale systems and that the data complexity of parameter learning compares favorably to that of other representations. Acknowledgments Erik Talvitie was supported under the NSF GRFP. Satinder Singh was supported by NSF grant IIS0413004. Any opinions, findings, and conclusions or recommendations expressed in this material are those of the authors and do not necessarily reflect the views of the NSF. References [1] Lise Getoor, Nir Friedman, Daphne Koller, and Benjamin Taskar. Learning probabilistic models of relational structure. Journal of Machine Learning Research, 3:679–707, 2002. [2] Zoubin Ghahramani and Michael I. Jordan. Factorial hidden Markov models. In Advances in Neural Information Processing Systems 8 (NIPS), pages 472–478, 1995. [3] Hanna M. Pasula, Luke S. Zettlemoyer, and Leslie Pack Kaelbling. Learning symbolic models of stochastic domains. Journal of Artificial Intelligence, 29:309–352, 2007. [4] Michael Littman, Richard Sutton, and Satinder Singh. Predictive representations of state. In Advances in Neural Information Processing Systems 14 (NIPS), pages 1555–1561, 2002. [5] Herbert Jaeger. Observable operator models for discrete stochastic time series. Neural Computation, 12(6):1371–1398, 2000. [6] Satinder Singh, Michael R. James, and Matthew R. Rudary. Predictive state representations: A new theory for modeling dynamical systems. In Uncertainty in Artificial Intelligence 20 (UAI), pages 512–519, 2004. [7] Richard Sutton, Doina Precup, and Satinder Singh. Between mdps and semi-mdps: A framework for temporal abstraction in reinforcement learning. Artificial Intelligence, 112:181–211, 1999. [8] Alicia Peregrin Wolfe and Andrew G. Barto. Decision tree methods for finding reusable MDP homomorphisms. In National Conference on Artificial Intelligence 21 (AAAI), 2006. [9] Vishal Soni and Satinder Singh. Abstraction in predictive state representations. In National Conference on Artificial Intelligence 22 (AAAI), 2007. [10] Erik Talvitie, Britton Wolfe, and Satinder Singh. Building incomplete but accurate models. In International Symposium on Artificial Intelligence and Mathematics (ISAIM), 2008. [11] George E. Monahan. A survey of partially observable markov decisions processes: Theory, models, and algorithms. Management Science, 28(1):1–16, 1982. [12] Craig Boutilier, Nir Friedman, Moises Goldszmidt, and Daphne Koller. Context-specific independence in bayesian networks. In Uncertainty in Artificial Intelligence 12 (UAI), pages 115–123, 1996. [13] Britton Wolfe, Michael James, and Satinder Singh. Approximate predictive state representations. In Autonomous Agents and Multiagent Systems 7 (AAMAS), 2008. [14] Adam Berger, Stephen Della Pietra, and Vincent Della Pietra. A maximum entropy approach to natural language processing. Computational Linguistics, 22(1):39–71, 1996. [15] David Wingate and Satinder Singh. Exponential family predictive representations of state. In Advances in Neural Information Processing Systems 20 (NIPS), pages 1617–1624, 2007. [16] Jeff Bilmes. The graphical models toolkit (gmtk), 2007. http://ssli.ee.washington.edu/ ˜bilmes/gmtk. [17] Michael James and Satinder Singh. Learning and discovery of predictive state representations in dynamical systems with reset. In International Conference on Machine Learning 21 (ICML), 2004. 8
2008
239
3,497
MDPs with Non-Deterministic Policies Mahdi Milani Fard School of Computer Science McGill University Montreal, Canada mmilan1@cs.mcgill.ca Joelle Pineau School of Computer Science McGill University Montreal, Canada jpineau@cs.mcgill.ca Abstract Markov Decision Processes (MDPs) have been extensively studied and used in the context of planning and decision-making, and many methods exist to find the optimal policy for problems modelled as MDPs. Although finding the optimal policy is sufficient in many domains, in certain applications such as decision support systems where the policy is executed by a human (rather than a machine), finding all possible near-optimal policies might be useful as it provides more flexibility to the person executing the policy. In this paper we introduce the new concept of non-deterministic MDP policies, and address the question of finding near-optimal non-deterministic policies. We propose two solutions to this problem, one based on a Mixed Integer Program and the other one based on a search algorithm. We include experimental results obtained from applying this framework to optimize treatment choices in the context of a medical decision support system. 1 Introduction Markov Decision Processes (MDPs) have been extensively studied in the context of planning and decision-making. In particular, MDPs have emerged as a useful framework for optimizing action choices in the context of medical decision support systems [1, 2, 3, 4]. Given an adequate MDP model (or data source), many methods can be used to find a good action-selection policy. This policy is usually a deterministic or stochastic function [5]. But policies of these types face a substantial barrier in terms of gaining acceptance from the medical community, because they are highly prescriptive and leave little room for the doctor’s input. In such cases, where the actions are executed by a human, it may be preferable to instead provide several (near-)equivalently good action choices, so that the agent can pick among those according to his or her own heuristics and preferences. 1 To address this problem, this paper introduces the notion of a non-deterministic policy 2, which is a function mapping each state to a set of actions, from which the acting agent can choose. We aim for this set to be as large as possible, to provide freedom of choice to the agent, while excluding any action that is significantly worse than optimal. Unlike stochastic policies, here we make no assumptions regarding which action will be executed. This choice can be based on the doctor’s qualitative assessment, patient’s preferences, or availability of treatment. While working with non-deterministic policies, it is important to ensure that by adding some freedom of choice to the policy, the worst-case expected return of the policy is still close enough to the optimal value. We address this point by providing guarantees on the expected return of the nondeterministic policy. We define a set of optimization problems to find such a policy and provide two algorithms to solve this problem. The first is based on a Mixed Integer Program formulation, which provides the best solution—in the sense of maximizing the choice of action, while remaining 1This is especially useful given that human preferences are often difficult to quantify objectively, and thus difficult to incorporate in the reward function. 2Borrowing the term “non-deterministic” from the theory of computation, as opposed to deterministic or stochastic actions. within an allowed performance-loss threshold—but with high computational cost. Then we describe a simple search algorithm that can be much more efficient in some cases. The main contributions of this work are to introduce the concept of non-deterministic policies, provide solution methods to compute such policies, and demonstrate the usefulness of this new model for providing acceptable solutions in medical decision support systems. From a pratical perspective, we aim to improve the acceptability of MDP-based decision-support systems. 2 Non-Deterministic Policies In this section, we formulate the concept of non-deterministic policies and provide some definitions that are used throughout the paper. An MDP M = (S, A, T, R) is defined by a set of states S, a function A(s) mapping each state to a set of action, a transition function T(s, a, s0) defined as: T(s, a, s0) = p(st+1 = s0|st = s, at = a), 8s, s0 2 S, a 2 A(s), (1) and a reward function R(s, a) : S ⇥A ! [Rmin, Rmax]. Throughout the paper we assume finite state, finite action, discounted reward MDPs, with the discount factor denoted by γ. A deterministic policy is a function from states to actions. The optimal deterministic policy is the policy that maximizes the expected discounted sum of rewards (P t γtrt) if the agent acts according to that policy. The value of a state-action pair (s, a) according to the optimal deterministic policy on an MDP M = (S, A, T, R) satisfies the Bellman optimality equation [6]: Q⇤ M(s, a) = R(s, a) + γ X s0 ✓ T(s, a, s0) max a02A(s0) Q⇤ M(s0, a0) ◆ . (2) We further define the optimal value of state s denoted by V ⇤ M(s) to be maxa2A(s) Q⇤ M(s, a). A non-deterministic policy is a function that maps each state s to a non-empty set of actions denoted by ⇧(s) ✓A(s). The agent can choose to do any action a 2 ⇧(s) whenever the MDP is in state s. Here we will provide a worst-case analysis, presuming that the agent may choose the worst action in each state. The value of a state-action pair (s, a) according to a non-deterministic policy ⇧on an MDP M = (S, A, T, R) is given by the recursive definition: Q⇧ M(s, a) = R(s, a) + γ X s0 ✓ T(s, a, s0) min a02⇧(s0) Q⇧ M(s0, a0) ◆ , (3) which is the worst-case expected return under the allowed set of actions. We define the value of state s according to a non-deterministic policy ⇧denoted by V ⇧ M(s) to be mina2⇧(s) Q⇧ M(s, a). To calculate the value of a non-deterministic policy, we construct an MDP M 0 = (S0, A0, R0, T 0) where S0 = S, A0 = ⇧, R0 = −R and T 0 = T. It is straight-forward to show that: Q⇧ M(s, a) = −Q⇤ M 0(s, a). (4) A non-deterministic policy ⇧is said to be augmented with state-action pair (s, a) denoted by ⇧0 = ⇧+ (s, a), if it satisfies: ⇧0(s0) = ⇢⇧(s0), s0 6= s ⇧(s0) [ {a}, s0 = s (5) If a policy ⇧can be achieved by a number of augmentations from a policy ⇧0, we say that ⇧ includes ⇧0. The size of a policy ⇧, denoted by |⇧|, is the sum of the cardinality of the action sets in ⇧: |⇧| = P s |⇧(s)|. A non-deterministic policy ⇧is said to be non-augmentable according to a constraint if and only if ⇧satisfies , and for any state-action pair (s, a), ⇧+ (s, a) does not satisfy . In this paper we will be working with constraints that have this particular property: if a policy ⇧does not satisfy , any policy that includes ⇧does not satisfy . We will refer to such constraints as being monotonic. A non-deterministic policy ⇧on an MDP M is said to be ✏-optimal (✏2 [0, 1]) if we have:3 V ⇧ M(s) ≥(1 −✏)V ⇤ M(s), 8s 2 S. (6) This can be thought of as a constraint on the space of non-deterministic policies which makes sure that the worst-case expected return is within some range of the optimal value. It is straight forward to show that this constraint is monotonic. A conservative ✏-optimal non-deterministic policy ⇧on an MDP M is a policy that is nonaugmentable according to this constraint: R(s, a) + γ X s0 (T(s, a, s0)(1 −✏)V ⇤ M(s0)) ≥(1 −✏)V ⇤ M(s), 8a 2 ⇧(s). (7) This constraint indicates that we only add those actions to the policy whose reward plus (1 −✏) of the future optimal return is within the sub-optimal margin. This ensures that non-deterministic policy is ✏-optimal by using the inequality: Q⇧ M(s, a) ≥R(s, a) + γ X s0 (T(s, a, s0)(1 −✏)V ⇤ M(s0)) , (8) instead of solving Eqn 3 and using the inequality constraint in Eqn 6. Applying Eqn 7 guarantees that the non-deterministic policy is ✏-optimal while it may still be augmentable according to Eqn 6, hence the name conservative. It can also be shown that the conservative policy is unique. A non-augmentable ✏-optimal non-deterministic policy ⇧on an MDP M is a policy that is not augmentable according to the constraint in Eqn 6. It is easy to show that any non-augmentable ✏-optimal policy includes the conservative policy. However, non-augmentable ✏-optimal policies are not necessarily unique. In this paper we will focus on a search problem in the space of nonaugmentable ✏-optimal policies, trying to maximize some criteria. Specifically, we will be trying to find non-deterministic policies that give the acting agent more options while staying within an acceptable sub-optimal margin. We now present an example that clarifies the concepts introduced so far. To simplify drawing graphs of the MDP and policies, we assume deterministic transitions in this example. However the concepts apply to any probabilistic MDP as well. Fig 1 shows a sample MDP. The labels on the arcs show action names and the corresponding rewards are shown in the parentheses. We assume γ ' 1 and ✏= 0.05. Fig 2 shows the optimal policy of this MDP. The conservative ✏-optimal non-deterministic policy of this MDP is shown in Fig 3. a(0) b(−3) a(0) b(−3) a(100) b(99) a(0) a(0) S1 S2 S3 S4 S5 Figure 1: Example MDP a(0) a(0) a(100) a(0) a(0) S1 S2 S3 S4 S5 Figure 2: Optimal policy a(0) a(0) a(100) b(99) a(0) a(0) S1 S2 S3 S4 S5 Figure 3: Conservative policy Fig 4 includes two possible non-augmentable ✏-optimal policies. Although both policies in Fig 4 are ✏-optimal, the union of these is not ✏-optimal. This is due to the fact that adding an option to one of the states removes the possibility of adding options to other states, which illustrates why local changes are not always appropriate when searching in the space of ✏-optimal policies. 3In some of the MDP literature, ✏-optimality is defined as an additive constraint (Q⇧ M ≥Q⇤ M −✏) [7]. The derivations will be analogous in that case. a(0) a(0) b(−3) a(100) b(99) a(0) a(0) S1 S2 S3 S4 S5 a(0) b(−3) a(0) a(100) b(99) a(0) a(0) S1 S2 S3 S4 S5 Figure 4: Two non-augmentable policies 3 Optimization Problem We formalize the problem of finding an ✏-optimal non-deterministic policy in terms of an optimization problem. There are several optimization criteria that can be formulated, while still complying with the ✏-optimal constraint. Notice that the last two problems can be defined both in the space of all ✏-optimal policies or only the non-augmentable ones. • Maximizing the size of the policy: According to this criterion, we seek non-augmentable ✏-optimal policies that have the biggest overall size. This provides more options to the agent while still keeping the ✏-optimal guarantees. The algorithms proposed in this paper use this optimization criterion. Notice that the solution to this optimization problem is nonaugmentable according to the ✏-optimal constraint, because it maximizes the overall size of the policy. • Maximizing the margin: We aim to maximize margin of a non-deterministic policy ⇧: ΦM(⇧) = min s ✓ min a2⇧(s),a0 /2⇧(s) (Q(s, a) −Q(s, a0)) ◆ . (9) This optimization criterion is useful when one wants to find a clear separation between the good and bad actions in each state. • Minimizing the uncertainly: If we learn the models from data we will have some uncertainly about the optimal action in each state. We can use some variance estimation on the value function [8] along with a Z-Test to get some confidence level on our comparisons and find the probability of having the wrong order when comparing actions according to their values. Let Q be the value of the true model and ˆQ be our empirical estimate based on some dataset D. We aim to minimize the uncertainly of a non-deterministic policy ⇧: ΦM(⇧) = max s ✓ max a2⇧(s),a0 /2⇧(s) p (Q(s, a) < Q(s, a0)|D) ◆ . (10) 4 Solving the Optimization Problem In the following sections we provide algorithms to solve the first optimization problem mentioned above, which aims to maximize the size of the policy. We focus on this criterion as it seems most appropriate for medical decision support systems, where it is desirable for the acceptability of the system to find policies that provide as much choice as possible for the acting agent. We first present a Mixed Integer Program formulation of the problem, and then present a search algorithm that uses the monotonic property of the ✏-optimal constraint. While the MIP method is useful as a general formulation of the problem, the search algorithm has potential for further extensions with heuristics. 4.1 Mixed Integer Program Recall that we can formulate the problem of finding the optimal deterministic policy on an MDP as a simple linear program [5]: minV µT V, subject to V (s) ≥R(s, a) + γ P s0 T(s, a, s0)V (s0) 8s, a, (11) where µ can be thought of as the initial distribution over the states. The solution to the above problem is the optimal value function (denoted by V ⇤). Similarly, having computed V ⇤using Eqn 11, the problem of a search for an optimal non-deterministic policy according to the size criterion can be rewritten as a Mixed Integer Program:4 maxV,⇧(µT V + (Vmax −Vmin)eT s ⇧ea), subject to V (s) ≥(1 −✏)V ⇤(s) 8s P a ⇧(s, a) > 0 8s V (s) R(s, a) + γ P s0 T(s, a, s0)V (s0) + Vmax(1 −⇧(s, a)) 8s, a. (12) Here we are overloading the notation ⇧to define a binary matrix representing the policy. ⇧(s, a) is 1 if a 2 ⇧(s), and 0 otherwise. We define Vmax = Rmax/(1 −γ) and Vmin = Rmin/(1 −γ). e’s are column vectors of 1 with the appropriate dimensions. The first set of constraints makes sure that we stay within ✏of the optimal return. The second set of constraints ensures that at least one action is selected per state. The third set ensures that for those state-action pairs that are chosen in any policy, the Bellman constraint holds, and otherwise, the constant Vmax makes the constraint trivial. Notice that the solution to the above maximizes |⇧| and the result is non-augmentable. As a counter argument, suppose that we could add a state-action pair to the solution ⇧, while still staying in ✏sub-optimal margin. By adding that pair, the objective function is increased by (Vmax −Vmin), which is bigger than any possible decrease in the µT V term, and thus the objective is improved, which conflicts with ⇧being the solution. We can use any MIP solver to solve the above problem. Note however that we do not make use of the monotonic nature of the constraints. A general purpose MIP solver could end up searching in the space of all the possible non-deterministic policies, which would require exponential running time. 4.2 Search Algorithm We can make use of the monotonic property of the ✏-optimal policies to narrow down the search. We start by computing the conservative policy. We then augment it until we arrive at a non-augmentable policy. We make use of the fact that if a policy is not ✏-optimal, neither is any other policy that includes it, and thus we can cut the search tree at this point. The following algorithm is a one-sided recursive depth-first-search-like algorithm that searches in the space of plausible non-deterministic policies to maximize a function g(⇧). Here we assume that there is an ordering on the set of state-action pairs {pi} = {(sj, ak)}. This ordering can be chosen according to some heuristic along with a mechanism to cut down some parts of the search space. V ⇤ is the optimal value function and the function V returns the value of the non-deterministic policy that can be calculated by minimizing Equation 3. Function getOptimal(⇧, startIndex, ✏) ⇧o ⇧ for i startIndex to |S||A| do (s, a) pi if a /2 ⇧(s) & V (⇧+ (s, a)) ≥(1 −✏)V ⇤then ⇧0 getOptimal (⇧+ (s, a), i + 1, ✏) if g(⇧0) > g(⇧o) then ⇧o ⇧0 end end end return ⇧o We should make a call to the above function passing in the conservative policy ⇧m and starting from the first state-action pair: getOptimal(⇧m, 0, ✏). The asymptotic running time of the above algorithm is O((|S||A|)d(tm + tg)), where d is the maximum size of an ✏-optimal policy minus the size of the conservative policy, tm is the time to solve the original MDP and tg is the time to calculate the function g. Although the worst-case running time is still exponential in the number of state-action pairs, the run-time is much less when the search space is sufficiently small. The |A| term is due to the fact that we check all possible augmentations for 4Note that in this MIP, unlike the standard LP for MDPs, the choice of µ can affect the solution in cases where there is a tie in the size of ⇧. each state. Note that this algorithm searches in the space of all ✏-optimal policies rather than only the non-augmentable ones. If we set function g(⇧) = |⇧|, then the algorithm will return the biggest non-augmentable ✏-optimal policy. This search can be further improved by using heuristics to order the state-action pairs and prune the search. One can also start the search from any other policy rather than the conservative policy. This can be potentially useful if we have further constraints on the problem. One way to narrow down the search is to only add the action that has the maximum value for any state s: ⇧0 = ⇧+ ✓ s, arg max Q(s,a) ◆ , (13) This leads to a running time of O(|S|d(tm + tg)). However this does not guarantee that we see all non-augmentable policies. This is due to the fact that after adding an action, the order of values might change. If the transition structure of the MDP contains no loop with non-zero probability (transition graph is directed acyclic, DAG), then this heuristic will produce the optimal result while cutting down the search time. In other cases, one might do a partial evaluation of the augmented policy to approximate the value after adding the actions, possibly by doing a few backups rather than using the original Q values. This offers the possibility of trading-off computation time for better solutions. 5 Empirical Evaluation To evaluate our proposed algorithms, we first test the both the MIP and search formulations on MDPs created randomly, and then test the search algorithm on a real-world treatment design scenario. To begin, we generated random MDPs with 5 states and 4 actions. The transitions are deterministic (chosen uniformly random) and the rewards are random values between 0 and 1, except for one of the states with reward 10 for one of the actions; γ was set to 0.95. The MIP method was implemented with MATLAB and CPLEX. Fig 5 shows the solution to the MIP defined in Eqn 12 for a particular randomly generated MDP. We see that the size of non-deterministic policy increases as the performance threshold is relaxed. 1, 0.4 3, 0.9 3, 9.9 3, 0.5 3, 0.2 S1 S4 S5 S2 S3 1, 0.4 2, 0.7 3, 0.9 3, 9.9 3, 0.5 3, 0.2 S1 S4 S5 S2 S3 1, 0.4 2, 0.7 3, 0.5 3, 0.9 3, 9.9 3, 0.5 3, 0.2 S1 S4 S5 S2 S3 1, 0.4 2, 0.7 3, 0.5 3, 0.9 3, 9.9 3, 0.5 4, 0.2 3, 0.2 S1 S4 S5 S2 S3 Figure 5: MIP solution for different values of ✏2 {0, 0.01, 0.02, 0.03}. The labels on the edges are action indices, followed by the corresponding immediate rewards. To compare the running time of the MIP solver and the search algorithm, we constructed random MDPs as described above with more state-action pairs. Fig 6 Left shows the running time averaged over 20 different random MDPs , assuming ✏= 0.01. It can be seen that both algorithms have                             Figure 6: Left: Running time of MIP and search algorithm as a function of the number of state-action pairs. Right: Average percentage of state-action pairs that were different in the noisy policy. exponential running time. The running time of the search algorithm has a bigger constant factor, but has a smaller exponent base which results in a faster asymptotic running time. To study how stable non-deterministic policies are to potential noise in the models, we check to see how much the policy changes when Gaussian noise is added to the reward function. Fig 6 Right shows the percentage of the total state-action pairs that were either added or removed from the resulting policy by adding noise to the reward model (we assume a constant ✏= 0.02). We see that the resulting non-deterministic policy changes somewhat, but not drastically, even with noise level of similar magnitude as the reward function. Next, we implemented the full search algorithm on an MDP constructed for a medical decisionmaking task involving real patient data. The data was collected as part of a large (4000+ patients) multi-step randomized clinical trial, designed to investigate the comparative effectiveness of different treatments provided sequentially for patients suffering from depression [9]. The goal is to find a treatment plan that maximizes the chance of remission. The dataset includes a large number of measured outcomes. For the current experiment, we focus on a numerical score called the Quick Inventory of Depressive Symptomatology (QIDS), which was used in the study to assess levels of depression (including when patients achieved remission). For the purposes of our experiment, we discretize the QIDS scores (which range from 5 to 27) uniformly into quartiles, and assume that this, along with the treatment step (up to 4 steps were allowed), completely describe the patient’s state. Note that the underlying transition graph can be treated as a DAG because the study is limited to four steps of treatment. There are 19 actions (treatments) in total. A reward of 1 is given if the patient achieves remission (at any step) and a reward of 0 is given otherwise. The transition and reward models were generated empirically from the data using a frequentist approach. Table 1: Policy and running time of the full search algorithm on the medical problem ✏= 0.02 ✏= 0.015 ✏= 0.01 ✏= 0 Time (seconds) 118.7 12.3 3.5 1.4 5 < QIDS < 9 CT CT CT CT SER SER BUP, CIT+BUS 9 QIDS < 12 CIT+BUP CIT+BUP CIT+BUP CIT+BUP CIT+CT CIT+CT 12 QIDS < 16 VEN VEN VEN VEN CIT+BUS CIT+BUS CT 16 QIDS 27 CT CT CT CT CIT+CT CIT+CT CIT+CT Table 1 shows the non-deterministic policy obtained for each state during the second step of the trial (each acronym refers to a specific treatment). This is computed using the search algorithm, assuming different values of ✏. Although this problem is not tractable with the MIP formulation (304 state-action pairs), a full search in the space of ✏-optimal policies is still possible. Table 1 also shows the running time of the algorithm, which as expected increases as we relax the threshold ✏. Here we did not use any heuristics. However, as the underlying transition graph is a DAG, we could use the heuristic discussed in the previous section (Eqn 13) to get the same policies even faster. An interesting question is how to set ✏a priori. In practice, a doctor may use the full table as a guideline, using smaller values of ✏when s/he wants to rely more on the decision support system, and larger values when relying more on his/her own assessments. 6 Discussion This paper introduces a framework for computing non-deterministic policies for MDPs. We believe this framework can be especially useful in the context of decision support systems to provide more choice and flexibility to the acting agent. This should improve acceptability of decision support systems in fields where the policy is used to guide (or advise) a human expert, notably for the optimization of medical treatments. The framework we propose relies on two competing objectives. On the one hand we want to provide as much choice as possible in the non-deterministic policy, while at the same time preserving some guarantees on the return (compared to the optimal policy). We present two algorithms that can solve such an optimization problem: a MIP formulation that can be solved by any general MIP solver, and a search algorithm that uses the monotonic property of the studied constraints to cut down on the running time. The search algorithm is particularly useful when we have good heuristics to further prune the search space. Future work will consider different optimizing criteria, such as those outlined in Section 3, which may be more appropriate for some domains with very large action sets. A limitation of our current approach is that the algorithms presented so far are limited to relatively small domains, and scale well only for domains with special properties, such as a DAG structure in the transition model or good heuristics for pruning the search. This clearly points to future work in developing better approximation techniques. Nonetheless it is worth keeping in mind that many domains of application, may not be that large (see [1, 2, 3, 4] for examples) and the techniques as presented can already have a substantial impact. Finally, it is worth noting that non-deterministic policies can also be useful in cases where the MDP transition and reward models are imperfectly specified or learned from data, though we have not explored this case in detail yet. In such a setting, the difference between the optimal and a near optimal policy may not be computed accurately. Thus, it is useful to find all actions that are close to optimal so that the real optimal action is not missed. An interesting question here is whether we can find the smallest non-deterministic policy that will include the optimal policy with some probability 1−δ. This is similar to the framework in [7], and could be useful in cases where there is not enough data to compare policies with good statistical significance. Acknowledgements: The authors wish to thank A. John Rush, Susan A. Murphy, Doina Precup, and Stephane Ross for helpful discussions regarding this work. Funding was provided by the National Institutes of Health (grant R21 DA019800) and the NSERC Discovery Grant program. References [1] A. Schaefer, M. Bailey, S. Shechter, and M. Roberts. Handbook of Operations Research / Management Science Applications in Health Care, chapter Medical decisions using Markov decision processes. Kluwer Academic Publishers, 2004. [2] M. Hauskrecht and H. Fraser. Planning treatment of ischemic heart disease with partially observable Markov decision processes. Artificial Intelligence in Medicine, 18(3):221–244, 2000. [3] P. Magni, S. Quaglini, M. Marchetti, and G. Barosi. Deciding when to intervene: a Markov decision process approach. International Journal of Medical Informatics, 60(3):237–253, 2000. [4] D. Ernst, G. B. Stan, J. Concalves, and L. Wehenkel. Clinical data based optimal sti strategies for hiv: a reinforcement learning approach. In Proceedings of Benelearn, 2006. [5] D.P. Bertsekas. Dynamic Programming and Optimal Control, Vol 2. Athena Scientific, 1995. [6] R.S. Sutton and A.G. Barto. Reinforcement Learning: An Introduction. MIT Press, Cambridge, MA, 1998. [7] M. Kearns and S. Singh. Near-optimal reinforcement learning in poly. time. Machine Learning, 49, 2002. [8] S. Mannor, D. Simester, P. Sun, and J.N. Tsitsiklis. Bias and variance in value function estimation. In Proceedings of ICML, 2004. [9] M. Fava, A.J. Rush, and M.H. Trivedi et al. Background and rationale for the sequenced treatment alternatives to relieve depression (STAR*D) study. Psychiatr Clin North Am, 26(2):457–94, 2003.
2008
24
3,498
Fitted Q-iteration by Advantage Weighted Regression Gerhard Neumann Institute for Theoretical Computer Science Graz University of Technology A-8010 Graz, Austria gerhard@igi.tu-graz.ac.at Jan Peters Max Planck Institute for Biological Cybernetics D-72076 Tübingen, Germany mail@jan-peters.net Abstract Recently, fitted Q-iteration (FQI) based methods have become more popular due to their increased sample efficiency, a more stable learning process and the higher quality of the resulting policy. However, these methods remain hard to use for continuous action spaces which frequently occur in real-world tasks, e.g., in robotics and other technical applications. The greedy action selection commonly used for the policy improvement step is particularly problematic as it is expensive for continuous actions, can cause an unstable learning process, introduces an optimization bias and results in highly non-smooth policies unsuitable for real-world systems. In this paper, we show that by using a soft-greedy action selection the policy improvement step used in FQI can be simplified to an inexpensive advantageweighted regression. With this result, we are able to derive a new, computationally efficient FQI algorithm which can even deal with high dimensional action spaces. 1 Introduction Reinforcement Learning [1] addresses the problem of how autonomous agents can improve their behavior using their experience. At each time step t the agent can observe its current state st ∈X and chooses an appropriate action at ∈A. Subsequently, the agent gets feedback on the quality of the action, i.e., the reward rt = r(st, at), and observes the next state st+1. The goal of the agent is to maximize the accumulated reward expected in the future. In this paper, we focus on learning policies for continuous, multi-dimensional control problems. Thus the state space X and action space A are continuous and multi-dimensional, meaning that discretizations start to become prohibitively expensive. While discrete-state/action reinforcement learning is a widely studied problem with rigorous convergence proofs, the same does not hold true for continuous states and actions. For continuous state spaces, few convergence guarantees exist and pathological cases of bad performance can be generated easily [2]. Moreover, many methods cannot be transferred straightforwardly to continuous actions. Current approaches often circumvent continuous action spaces by focusing on problems where the actor can rely on a discrete set of actions, e.g., when learning a policy for driving to a goal in minimum time, an actor only needs three actions: the maximum acceleration when starting, zero acceleration at maximum velocity and maximum throttle down when the goal is sufficiently close for a point landing. While this approach (called bang-bang in traditional control) works for the large class of minimum time control problems, it is also a limited approach as cost functions relevant to the real-world incorporate much more complex constraints, e.g., cost-functions in biological systems often punish the jerkiness of the movement [3], the amount of used metabolic energy [4] or the variance at the end-point [5]. For physical technical systems, the incorporation of further optimization criteria is of essential importance; just as a minimum time policy is prone to damage the car on the long-run, a similar policy would be highly dangerous for a robot and its environment and the resulting energy-consumption would reduce its autonomy. More complex, action-dependent immediate reward functions require that much larger sets of actions are being employed. We consider the use of continuous actions for fitted Q-iteration (FQI) based algorithms. FQI is a batch mode reinforcement learning (BMRL) algorithm. The algorithm mantains an estimate of the state-action value function Q(s, a) and uses the greedy operator maxa Q(s, a) on the action space for improving the policy. While this works well for discrete action spaces, the greedy operation is hard to perform for high-dimensional continuous actions. For this reason, the application of fitted Q-iteration based methods is often restricted to low-dimensional action spaces which can be efficiently discretized. In this paper, we show that the use of a stochastic soft-max policy instead of a greedy policy allows us to reduce the policy improvement step used in FQI to a simple advantageweighted regression. The greedy operation maxa Q(s, a) over the actions is replaced by a less harmful greedy operation over the parameter space of the value function. This result allows us to derive a new, computationally efficient algorithm which is based on Locally-Advantage-WEighted Regression (LAWER). We test our algorithm on three different benchmark tasks, i.e., the pendulum swing-up [6], the acrobot swing-up [1] and a dynamic version of the puddle-world [7] with 2 and 3 dimensions. We show that in spite of the soft-greedy action selection, our algorithm is able to produce high quality policies. 2 Fitted Q-Iteration In fitted Q-iteration [8, 6, 9] (FQI), we assume that all the experience of the agent up to the current time is given in the form H = {< si, ai, ri, s′ i >}1≤i≤N. The task of the learning algorithm is to estimate an optimal control policy from this historical data. FQI approximates the state-action value function Q(s, a) by iteratively using supervised regression techniques. New target values for the regression are generated by ˜Qk+1(i) = ri + γVk(s′ i) = ri + γ max a′ Qk(s′ i, a′). (1) The regression problem for finding the function Qk+1 is defined by the list of data-point pairs Dk and the regression procedure Regress Dk(Qk) = ½h (si, ai), ˜Qk+1(i) i 1≤i≤N ¾ , Qk+1 = Regress(Dk(Qk)) (2) FQI can be viewed as approximate value iteration with state-action value functions [9]. Previous experiments show that function approximators such as neural networks [6], radial basis function networks [8], CMAC [10] and regression trees [8] can be employed in this context. In [9], performance bounds for the value function approximation are given for a wide range of function approximators. The performance bounds also hold true for continuous action spaces, but only in the case of an actor-critic variant of FQI. Unfortunately, to our knowledge, no experiments with this variant exist in the literature. Additionally, it is not clear how to apply this actor-critic variant efficiently for nonparametric function approximators. FQI has proven to outperform classical online RL methods in many applications [8]. Nevertheless, FQI relies on the greedy action selection in Equation (1). Thus, the algorithm frequently requires a discrete set of actions and generalization to continuous actions is not straightforward. Using the greedy operator for continuous action spaces is a hard problem by itself as the use of expensive optimization methods is needed for high dimensional actions. Moreover the returned values of the greedy operator often result in an optimization bias causing an unstable learning process, including oscillations and divergence [11]. For a comparison with our algorithm, we use the Cross-Entropy (CE) optimization method [12] to find the maximum Q-values. In our implementation, we maintain a Gaussian distribution for the belief of the optimal action. We sample nCE actions from this distribution. Then, the best eCE < nCE actions (with the highest Q-values) are used to update the parameters of this distribution. The whole process is repeated for kCE iterations, starting with a uniformly distributed set of sample actions. FQI is inherently an offline method - given historical data, the algorithm estimates the optimal policy. However, FQI can also be used for online learning. After the FQI algorithm is finished, new episodes can be collected with the currently best inferred policy and the FQI algorithm is restarted. 3 Fitted Q-Iteration by Advantage Weighted Regression A different method for policy updates in continuous action spaces is reinforcement learning by reward-weighted regression [13]. As shown by the authors, the action selection problem in the immediate reward RL setting with continuous actions can be formulated as expectation-maximization (EM) based algorithm and, subsequently, reduced to a reward-weighted regression. The weighted regression can be applied with ease to high-dimensional action spaces; no greedy operation in the action space is needed. While we do not directly follow the work in [13], we follow the general idea. 3.1 Weighted regression for value estimation In this section we consider the task of estimating the value function V of a stochastic policy π(·|s) when the state-action value function Q is already given. The value function can be calculated by V (s) = R a π(a|s)Q(s, a)da. Yet, the integral over the action space is hard to perform for continuous actions. However, we will show how we can approximate the value function without the evaluation of this integral. Consider the quadratic error function Error( ˆV ) = Z s µ(s) µZ a π(a|s)Q(s, a)da −ˆV (s) ¶2 ds (3) = Z s µ(s) µZ a π(a|s) ³ Q(s, a) −ˆV (s) ´ da ¶2 ds, (4) which is used to find an approximation ˆV of the value function. µ(s) denotes the state distribution when following policy π(·|a). Since the squared function is convex we can use Jensens inequality for probability density functions to derive an upper bound of Equation (4) Error( ˆV ) ≤ Z s µ(s) Z a π(a|s) ³ Q(s, a) −ˆV (s) ´2 dads = ErrorB( ˆV ). (5) The solution ˆV ∗for minimizing the upper bound ErrorB( ˆV ) is the same as for the original error function Error( ˆV ). Proof. To see this, we compute the square and replace the term R a π(a|s)Q(s, a)da by the value function V (s). This is done for the error function Error( ˆV ) and for the upper bound ErrorB( ˆV ). Error( ˆV ) = Z s µ(s) ³ V (s) −ˆV (s) ´2 ds = Z s µ(s) ³ V (s)2 −2V (s) ˆV (s) + ˆV (s)2´ ds (6) ErrorB( ˆV ) = Z s µ(s) Z a π(a|s) ³ Q(s, a)2 −2Q(s, a) ˆV (s) + ˆV (s)2´ dads (7) = Z s µ(s) µZ a π(a|s)Q(s, a)2da −2V (s) ˆV (s) + ˆV (s)2 ¶ ds (8) Both error functions are the same except for an additive constant which does not depend on ˆV . In difference to the original error function, the upper bound ErrorB can be approximated straightforwardly by samples {(si, ai), Q(si, ai)}1≤i≤N gained by following some behavior policy πb(·|s). ErrorB( ˆV ) ≈ N X i=1 µ(s)π(ai|si) µb(si)πb(ai|si) ³ Q(si, ai) −ˆV (si) ´2 , (9) µb(s) defines the state distribution when following the behavior policy πb. The term 1/(µb(si)πb(si, ai)) ensures that we do not give more weight on states and actions preferred by πb. This is a well known method in importance sampling. In order to keep our algorithm tractable, the factors πb(ai|si), µb(si) and µ(si) will all be set to 1/N. The minimization of Equation (9) defines a weighted regression problem which is given by the dataset DV , the weighting U and the weighted regression procedure WeightedRegress DV = n [(si, ai), Q(si, ai)]1≤i≤N o , U = {[π(ai|si)]1≤i≤N} , ˆV = WeightedRegress(DV , U) (10) Algorithm 1 FQI with Advantage Weighted Regression Input: H = {< si, ai, ri, s′ i >}1≤i≤N, τ and L (Number of Iterations) Initialize ˆV0(s) = 0. for k = 0 to L −1 do Dk( ˆVk) = ½h (si, ai), ri + γ ˆVk(s′ i) i 1≤i≤N ¾ Qk+1 = Regress(Dk( ˆVk)) A(i) = Qk+1(si, ai) −ˆVk(si) Estimate mA(si) and σA(si) for 1 ≤i ≤N U = {[exp(τ(A(i) −mA(si))/σA(si)]i≤i≤N} ˆVk+1 = WeightedRegress(Dk( ˆVk), U) end for The result shows that in order to approximate the value function V (s), we do not need to carry out the expensive integration over the action space for each state si. It is sufficient to know the Q-values at a finite set of state-action pairs. 3.2 Soft-greedy policy improvement We use a soft-max policy [1] in the policy improvement step of the FQI algorithm. Our soft-max policy π1(a|s) is based on the advantage function A(s, a) = Q(s, a)−V (s). We additionally assume the knowledge of the mean mA(s) and the standard deviation of σA(s) of the advantage function at state s. These quantities can be estimated locally or approximated by additional regressions. The policy π1(a|s) is defined as π1(a|s) = exp(τ ¯A(s, a)) R a exp(τ ¯A(s, a))da, ¯A(s, a) = A(s,a)−mA(s) σA(s) . (11) τ controls the greediness of the policy. If we assume that the advantages A(s, a) are distributed with N(A(s, a)|mA(s), σ2 A(s)), all normalized advantage values ¯A(s, a) have the same distribution. Thus, the denominator of π1 is constant for all states and we can use the term exp(τ ¯A(s, a)) ∝ π1(a|s) directly as weighting for the regression defined in Equation (10). The resulting approximated value function ˆV (s) is used to replace the greedy operator V (s′ i) = maxa′ Q(s′ i, a′) in the FQI algorithm. The FQI by Advantage Weighted Regression (AWR) algorithm is given in Algorithm 1. As we can see, the Q-function Qk is only queried once for each step in the history H. Furthermore only already seen state action pairs (si, ai) are used for this query. After the FQI algorithm is finished we still need to determine a policy for subsequent data collection. The policy can be obtained in the same way as for reward-weighted regression [13], only the advantage is used instead of the reward for the weighting - thus, we are optimizing the long term costs instead of the immediate one. 4 Locally-Advantage-WEighted Regression (LAWER) Based on the FQI by AWR algorithm, we propose a new, computationally efficient fitted Q-iteration algorithm which uses Locally Weighted Regression (LWR, [14]) as function approximator. Similar to kernel based methods, our algorithm needs to be able to calculate the similarity wi(s) between a state si in the dataset H and state s. To simplify the notation, we will denote wi(sj) as wij for all sj ∈H. wi(s) is calculated by a Gaussian kernel wi(s) = exp(−(si −s)T D(si −s)). The diagonal matrix D determines the bandwidth of the kernel. Additionally, our algorithm also needs a similarity measure wa ij between two actions ai and aj. Again wa ij can be calculated by a Gaussian kernel wa ij = exp(−(ai −aj)T Da(ai −aj)). Using the state similarity wij, we can estimate the mean and the standard deviation of the advantage function for each state si mA(si) = P j wijA(j) P j wij , σ2 A(si) = P j wij(A(j)−mA(sj))2 P j wij . (12) 4.1 Approximating the value functions For the approximation of the Q-function, we use Locally Weighted Regression [14]. The Q-function is therefore given by: Qk+1(s, a) = ˜sA(SA T WSA)−1SA T WQk+1 (13) where ˜sA = [1, sT , aT ]T , SA = [˜sA(1),˜sA(2), ...,˜sA(N)]T is the state-action matrix, W = diag(wi(s)wa i (a)) is the local weighting matrix consisting of state and action similarities, and Qk+1 = [ ˜Qk+1(1), ˜Qk+1(2), . . . , ˜Qk+1(N)]T is the vector of the Q-values (see Equation (1). For approximating the V-function we can multiplicatively combine the advantage-based weighting ui = exp(τ ¯A(si, ai)) and the state similarity weights wi(s). The value V k+1(s) is given by 1: Vk+1(s) = ˜s(ST US)−1ST UQk+1, (14) where ˜s = [1, sT ]T , S = [˜s1,˜s2, ...,˜sN]T is the state matrix and U = diag(wi(s)ui) is the weight matrix. We bound the estimate of ˆVk+1(s) by maxi|wi(s)>0.001 Qk+1(i) in order to prevent the local regression from adding a positive bias which might cause divergence of the value iteration. A problem with nonparametric value function approximators is their strongly increasing computational complexity with an increasing number of data points. A simple solution to avoid this problem is to introduce a local forgetting mechanism. Whenever parts of the state space are oversampled, old examples in this area are removed from the dataset. 4.2 Approximating the policy Similar to reward-weighted regression [13], we use a stochastic policy π(a|s) = N(a|µ(s), diag(σ2(s))) with Gaussian exploration as approximation of the optimal policy. The mean µ(s) and the variance σ2(s) are given by µ(s) = ˜s(ST US)−1ST UA, σ2(s) = σ2 initα0+P i wi(s)ui(ai−µ(si))2 α0+P i wi(s)ui , (15) where A = [a1, a2, . . . , aN]T denotes the action matrix. The variance σ2 automatically adapts the exploration of the policy to the uncertainty of the optimal action. With σ2 init and α0 we can set the initial exploration of the policy. σinit is always set to the bandwidth of the action space. α0 sets the weight of the initial variance in comparision to the variance comming from the data, α0 is set to 3 for all experiments. 5 Evaluations We evaluated the LAWER algorithm on three benchmark tasks, the pendulum swing up task, the acrobot swing up task and a dynamic version of the puddle-world (i.e., augmenting the puddleworld by velocities, inertia, etc.) with 2 and 3 dimensions. We compare our algorithm to tree-based FQI [8] (CE-Tree), neural FQI [6] (CE-Net) and LWR-based FQI (CE-LWR) which all use the Cross-Entropy (CE) optimization to find the maximum Q-values. For the CE optimization we used nCE = 10 samples for one dimensional, nCE = 25 samples for 2-dimensional and nCE = 64 for 3-dimensional control variables. eCE was always set to 0.3nCE and we used kCE = 3 iterations. To enforce exploration when collecting new data, a Gaussian noise of ǫ = N(0, 1.0) was added to the CE-based policy. For the tree-based algorithm, an ensemble of M = 20 trees was used, K was set to the number of state and action variables and nmin was set to 2 (see [8]). For the CE-Net algorithm we used a neural network with 2 hidden layers and 10 neurons per layer and trained the network with the algorithm proposed in [6] for 600 epochs. For all experiments, a discount factor of γ = 0.99 was used. The immediate reward function was quadratic in the distance to the goal position xG and in the applied torque/force r = −c1(x −xG)2 −c2a2. For evaluating the learning process, the exploration-free (i.e., σ(s) = 0, ǫ = 0) performance of the policy was evaluated after each data-collection/FQI cycle. This was done by determining the accumulated reward during an episode starting from the specified initial position. All errorbars represent a 95% confidence interval. 1In practice, ridge regression V k+1(s) = ˜s(ST WS + σI)−1ST WQk+1 is used to avoid numerical instabilities in the regression. 5 10 15 20 −40 −30 −20 −10 Number of Data Collections Average Reward LAWER CE Tree CE LWR CE Net (a) 5 10 15 20 −80 −60 −40 −20 Number of Data Collections Average Reward LAWER CE Tree CE LWR CE Net (b) −5 0 5 LAWER −5 0 5 u [N] CE Tree 0 1 2 3 4 5 −5 0 5 Time [s] CE LWR (c) −5 0 5 LAWER −5 0 5 u [N] CE Tree 0 1 2 3 4 5 −5 0 5 Time [s] CE LWR (d) Figure 1: (a) Evaluation of LAWER and CE-based FQI algorithms on the pendulum swing-up task for c2 = 0.005 . The plots are averaged over 10 trials. (b) The same evaluation for c2 = 0.025. (c) Learned torque trajectories for c2 = 0.005. (d) Learned torque trajectories for c2 = 0.025. 5.1 Pendulum swing-up task In this task, a pendulum needs to be swung up from the position at the bottom to the top position [6]. The state space consists of the angular deviation θ from the top position and the angular velocity ˙θ of the pendulum. The system dynamics are given by 0.5ml2¨θ = mg sin(θ) + u , the torque of the motor u was limited to [−5N, 5N]. The mass was set to m = 1kg and length of the link to 1m. The time step was set to 0.05s. Two experiments with different torque punishments c2 = 0.005 and c2 = 0.025 were performed. We used L = 150 iterations. The matrices D and DA were set to D = diag(30, 3) and DA = diag(2). In the data collection phase, 5 episodes with 150 steps were collected starting from the bottom position and 5 episodes starting from a random position. A comparison of the LAWER algorithm to CE-based algorithms for c2 = 0.005 is shown in Figure 1(a) and for c2 = 0.025 in Figure 1(b). Our algorithm shows a comparable performance to the tree-based FQI algorithm while being computationally much more efficient. All other CE-based FQI algorithms show a slightly decreased performance. In Figure 1(c) and (d) we can see typical examples of learned torque trajectories when starting from the bottom position for the LAWER, the CE-Tree and the CE-LWR algorithm. In Figure 1(c) the trajectories are shown for c2 = 0.005 and in Figure 1(d) for c2 = 0.025. All algorithms were able to discover a fast solution with 1 swing-up for the first setting and a more energy-efficient solution with 2 swing-ups for the second setting. Still, there are qualitative differences in the trajectories. Due to the advantage-weighted regression, LAWER was able to produce very smooth trajectories while the trajectories found by the CE-based methods look more jerky. In Figure 2(a) we can see the influence of the parameter τ on the performance of the LAWER algorithm. The algorithm works for a large range of τ values. 5.2 Acrobot swing-up task In order to asses the performance of LAWER on a complex highly non-linear control task, we used the acrobot (for a description of the system, see [1]). The torque was limited to [−5N, 5N]. Both masses were set to 1kg and both lengths of the links to 0.5m. A time step of 0.1s was used. L = 100 iterations were used for the FQI algorithms. In the data-collection phase the agent could observe 25 episodes starting from the bottom position and 25 starting from a random position. Each episode had 100 steps. The matrices D and DA were set to D = diag(20, 23.6, 10, 10.5) and DA = diag(2). The comparison of the LAWER and the CE-Tree algorithm is shown in Figure 2(a). Due to the adaptive state discretization, the tree-based algorithm is able to learn faster, but in the end, the LAWER algorithm is able to produce policies of higher quality than the tree-based algorithm. 5.3 Dynamic puddle-world In the puddle-world task [7], the agent has to find a way to a predefined goal area in a continuousvalued maze world (see Figure 3(a)). The agent gets negative reward when going through puddles. In difference to the standard puddle-world setting where the agent has a 2-dimensional state space (the x and y position), we use a more demanding setting. We have created a dynamic version of the puddle-world where the agent can set a force accelerating a k-dimensional point mass (m = 1kg). 2 3 4 5 6 7 −60 −50 −40 −30 −20 −10 τ Average Reward c2 = 0.005 c2 = 0.025 (a) 5 10 15 20 −50 −40 −30 −20 Number of Data Collections Average Reward LAWER CE Tree (b) 0 1 1 Start Goal (c) Figure 2: (a) Evaluation of the average reward gained over a whole learning trial on the pendulum swing-up task for different settings of τ (b) Comparison of the LAWER and the CE-Tree algorithm on the acrobot swing-up task (c) Setting of the 2-dimensional dynamic puddle-world. 5 10 15 20 25 30 −100 −80 −60 −40 −20 Number of Data Collections Average Reward LAWER CE Tree (a) 5 10 15 20 25 30 −150 −100 −50 Number of Data Collections Average Reward LAWER CE Tree (b) −2 0 2 u1 −2 0 2 u2 0 1 2 3 4 5 −2 0 2 Time [s] u3 (c) −2 0 2 u1 −2 0 2 u2 0 1 2 3 4 5 −2 0 2 Time [s] u3 (d) Figure 3: (a) Comparison of the CE-Tree and the LAWER algorithm for the 2-dimensional dynamic puddle-world. (b) Comparison of the CE-Tree and the LAWER algorithm for the 3-dimensional dynamic puddle-world. (c) Torque trajectories for the 3-dimensional puddle world learned with the LAWER algorithm. (d) Torque trajectories learned with the CE-Tree algorithm. This was done for k = 2 and k = 3 dimensions. The puddle-world illustrates the scalability of the algorithms to multidimensional continuous action spaces (2 respectively 3 dimensional). The positions were limited to [0, 1] and the velocities to [−1, 1]. The maximum force that could be applied in one direction was restricted to 2N and the time step was set to 0.1s. The setting of the 2-dimensional puddle-world can be seen in Figure 2(c). Whenever the agent was about to leave the predefined area, the velocities were set to zero and an additional reward of −5 was given. We compared the LAWER with the CE-Tree algorithm. L = 50 iterations were used. The matrices D and DA were set to D = diag(10, 10, 2.5, 2.5) and DA = diag(2.5, 2.5) for the 2-dimensional and to D = diag(8, 8, 8, 2, 2, 2) and DA = diag(1, 1, 1) for the 3-dimensional puddle-world. In the data collection phase the agent could observe 20 episodes with 50 steps starting from the predefined initial position and 20 episodes starting from a random position. In Figure 3(a), we can see the comparison of the CE-Tree and the LAWER algorithm for the 2dimensional puddle-world and in Figure 3(b) for the 3-dimensional puddle-world. The results show that the tree-based algorithm has an advantage in the beginning of the learning process. However, the CE-Tree algorithm has problems finding a good policy in the 3-dimensional action-space, while the LAWER algorithm still performs well in this setting. This can be seen clearly in the comparison of the learned force trajectories which are shown in Figure 3(c) for the LAWER algorithm and in Figure 3(d) for the CE-Tree algorithm. The trajectories for the CE-Tree algorithm are very jerky and almost random for the first and third dimension of the control variable, whereas the trajectories found by the LAWER algorithm look very smooth and goal directed. 6 Conclusion and future work In this paper, we focused on solving RL problems with continuous action spaces with fitted Qiteration based algorithms. The computational complexity of the max operator maxa Q(s, a) often makes FQI algorithms intractable for high dimensional continuous action spaces. We proposed a new method which circumvents the max operator by the use of a stochastic soft-max policy that allows us to reduce the policy improvement step V (s) = maxa Q(s, a) to a weighted regression problem. Based on this result, we can derive the LAWER algorithm, a new, computationally efficient FQI algorithm based on LWR. Experiments have shown that the LAWER algorithm is able to produce high quality smooth policies, even for high dimensional action spaces where the use of expensive optimization methods for calculating maxa Q(s, a) becomes problematic and only quite suboptimal policies are found. Moreover, the computational costs of using continuous actions for standard FQI are daunting. The LAWER algorithm needed on average 2780s for the pendulum, 17600s for the acrobot, 13700s for the 2Dpuddle-world and 24200s for the 3D-puddle world benchmark task. The CE-Tree algorithm needed on average 59900s, 201900s, 134400s and 212000s, which is an order of magnitude slower than the LAWER algorithm. The CE-Net and CE-LWR algorithm showed comparable running times as the CE-Tree algorithm. A lot of work has been spent to optimize the implementations of the algorithms. The simulations were run on a P4 Xeon with 3.2 gigahertz. Still, in comparison to the tree-based FQI approach, our algorithm has handicaps when dealing with high dimensional state spaces. The distance kernel matrices have to be chosen appropriately by the user. Additionally, the uniform distance measure throughout the state space is not adequate for many complex control tasks and might degrade the performance. Future research will concentrate on combining the AWR approach with the regression trees presented in [8]. 7 Acknowledgement This paper was partially funded by the Austrian Science Fund FWF project # P17229. The first author also wants to thank Bernhard Schölkopf and the MPI for Biological Cybernetics in Tübingen for the academic internship which made this work possible. References [1] R. Sutton and A. Barto, Reinforcement Learning. Boston, MA: MIT Press, 1998. [2] J. A. Boyan and A. W. Moore, “Generalization in reinforcement learning: Safely approximating the value function,” in Advances in Neural Information Processing Systems 7, pp. 369–376, MIT Press, 1995. [3] P. Viviani and T. Flash, “Minimum-jerk, two-thirds power law, and isochrony: Converging approaches to movement planning,” Journal of Experimental Psychology: Human Perception and Performance, vol. 21, no. 1, pp. 32–53, 1995. [4] R. M. Alexander, “A minimum energy cost hypothesis for human arm trajectories,” Biological Cybernetics, vol. 76, pp. 97–105, 1997. [5] C. M. Harris and D. M. Wolpert, “Signal-dependent noise determines motor planning.,” Nature, vol. 394, pp. 780–784, August 1998. [6] M. Riedmiller, “Neural fitted Q-iteration - first experiences with a data efficient neural reinforcement learning method,” in Proceedings of the European Conference on Machine Learning (ECML), 2005. [7] R. Sutton, “Generalization in reinforcement learning: Successful examples using sparse coarse coding,” in Advances in Neural Information Processing Systems 8, pp. 1038–1044, MIT Press, 1996. [8] D. Ernst, P. Geurts, and L. Wehenkel, “Tree-based batch mode reinforcement learning,” J. Mach. Learn. Res., vol. 6, pp. 503–556, 2005. [9] A. Antos, R. Munos, and C. Szepesvari, “Fitted Q-iteration in continuous action-space MDPs,” in Advances in Neural Information Processing Systems 20, pp. 9–16, Cambridge, MA: MIT Press, 2008. [10] S. Timmer and M. Riedmiller, “Fitted Q-iteration with CMACs,” pp. 1–8, 2007. [11] J. Peters and S. Schaal, “Policy learning for motor skills,” in Proceedings of 14th International Conference on Neural Information Processing (ICONIP), 2007. [12] P.-T. de Boer, D. Kroese, S. Mannor, and R. Rubinstein, “A tutorial on the cross-entropy method,” Annals of Operations Research, vol. 134, pp. 19–67, January 2005. [13] J. Peters and S. Schaal, “Reinforcement learning by reward-weighted regression for operational space control,” in Proceedings of the International Conference on Machine Learning (ICML), 2007. [14] C. G. Atkeson, A. W. Moore, and S. Schaal, “Locally weighted learning,” Artificial Intelligence Review, vol. 11, no. 1-5, pp. 11–73, 1997.
2008
240
3,499
On the Generalization Ability of Online Strongly Convex Programming Algorithms Sham M. Kakade TTI Chicago Chicago, IL 60637 sham@tti-c.org Ambuj Tewari TTI Chicago Chicago, IL 60637 tewari@tti-c.org Abstract This paper examines the generalization properties of online convex programming algorithms when the loss function is Lipschitz and strongly convex. Our main result is a sharp bound, that holds with high probability, on the excess risk of the output of an online algorithm in terms of the average regret. This allows one to use recent algorithms with logarithmic cumulative regret guarantees to achieve fast convergence rates for the excess risk with high probability. As a corollary, we characterize the convergence rate of PEGASOS (with high probability), a recently proposed method for solving the SVM optimization problem. 1 Introduction Online regret minimizing algorithms provide some of the most successful algorithms for many machine learning problems, both in terms of the speed of optimization and the quality of generalization. Notable examples include efficient learning algorithms for structured prediction [Collins, 2002] (an algorithm now widely used) and for ranking problems [Crammer et al., 2006] (providing competitive results with a fast implementation). Online convex optimization is a sequential paradigm in which at each round, the learner predicts a vector wt ∈S ⊂Rn, nature responds with a convex loss function, ℓt, and the learner suffers loss ℓt(wt). In this setting, the goal of the learner is to minimize the regret: T X t=1 ℓt(wt) −min w∈S T X t=1 ℓt(w) which is the difference between his cumulative loss and the cumulative loss of the optimal fixed vector. Typically, these algorithms are used to train a learning algorithm incrementally, by sequentially feeding the algorithm a data sequence, (X1, Y1), . . . , (XT , YT ) (generated in an i.i.d. manner). In essence, the loss function used in the above paradigm at time t is ℓ(w; (Xt, Yt)), and this leads to a guaranteed bound on the regret: RegT = T X t=1 ℓ(wt; (Xt, Yt)) −min w∈S T X t=1 ℓ(w; (Xt, Yt)) However, in the batch setting, we are typically interested in finding a parameter bw with good generalization ability, i.e. we would like: R(bw) −min w∈S R(w) to be small, where R(w) := E [ℓ(w; (X, Y ))] is the risk. Intuitively, it seems plausible that low regret on an i.i.d. sequence, should imply good generalization performance. In fact, for most of the empirically successful online algorithms, we have a set of techniques to understand the generalization performance of these algorithms on new data via ‘online to batch’ conversions — the conversions relate the regret of the algorithm (on past data) to the generalization performance (on future data). These include cases which are tailored to general convex functions [Cesa-Bianchi et al., 2004] (whose regret is O( √ T)) and mistake bound settings [CesaBianchi and Gentile, 2008] (where the the regret could be O(1) under separability assumptions). In these conversions, we typically choose bw to be the average of the wt produced by our online algorithm. Recently, there has been a growing body of work providing online algorithms for strongly convex loss functions (i.e. ℓt is strongly convex), with regret guarantees that are merely O(ln T). Such algorithms have the potential to be highly applicable since many machine learning optimization problems are in fact strongly convex — either with strongly convex loss functions (e.g. log loss, square loss) or, indirectly, via strongly convex regularizers (e.g. L2 or KL based regularization). Note that in the latter case, the loss function itself may only be just convex but a strongly convex regularizer effectively makes this a strongly convex optimization problem; e.g. the SVM optimization problem uses the hinge loss with L2 regularization. In fact, for this case, the PEGASOS algorithm of Shalev-Shwartz et al. [2007] — based on the online strongly convex programming algorithm of Hazan et al. [2006] — is a state-of-the-art SVM solver. Also, Ratliff et al. [2007] provide a similar subgradient method for max-margin based structured prediction, which also has favorable empirical performance. The aim of this paper is to examine the generalization properties of online convex programming algorithms when the loss function is strongly convex (where strong convexity can be defined in a general sense, with respect to some arbitrary norm || · ||). Suppose we have an online algorithm which has some guaranteed cumulative regret bound RegT (e.g. say RegT ≤ln T with T samples). Then a corollary of our main result shows that with probability greater than 1 −δ ln T, we obtain a parameter bw from our online algorithm such that: R(bw) −min w R(w) ≤RegT T + O   q RegT ln 1 δ T + ln 1 δ T  . Here, the constants hidden in the O-notation are determined by the Lipschitz constant and the strong convexity parameter of the loss ℓ. Importantly, note that the correction term is of lower order than the regret — if the regret is ln T then the additional penalty is O( √ ln T T ). If one naively uses the Hoeffding-Azuma methods in Cesa-Bianchi et al. [2004], one would obtain a significantly worse penalty of O(1/ √ T). This result solves an open problem in Shalev-Shwartz et al. [2007], which was on characterizing the convergence rate of the PEGASOS algorithm, with high probability. PEGASOS is an online strongly convex programming algorithm for the SVM objective function — it repeatedly (and randomly) subsamples the training set in order to minimize the empirical SVM objective function. A corollary to this work essentially shows the convergence rate of PEGASOS (as a randomized optimization algorithm) is concentrated rather sharply. Ratliff et al. [2007] also provide an online algorithm (based on Hazan et al. [2006]) for max-margin based structured prediction. Our results are also directly applicable in providing a sharper concentration result in their setting (In particular, see the regret bound in Equation 15, for which our results can be applied to). This paper continues the line of research initiated by several researchers [Littlestone, 1989, CesaBianchi et al., 2004, Zhang, 2005, Cesa-Bianchi and Gentile, 2008] which looks at how to convert online algorithms into batch algorithms with provable guarantees. Cesa-Bianchi and Gentile [2008] prove faster rates in the case when the cumulative loss of the online algorithm is small. Here, we are interested in the case where the cumulative regret is small. The work of Zhang [2005] is closest to ours. Zhang [2005] explicitly goes via the exponential moment method to derive sharper concentration results. In particular, for the regression problem with squared loss, Zhang [2005] gives a result similar to ours (see Theorem 8 therein). The present work can also be seen as generalizing his result to the case where we have strong convexity with respect to a general norm. Coupled with recent advances in low regret algorithms in this setting, we are able to provide a result that holds more generally. Our key technical tool is a probabilistic inequality due to Freedman [Freedman, 1975]. This, combined with a variance bound (Lemma 1) that follows from our assumptions about the loss function, allows us to derive our main result (Theorem 2). We then apply it to statistical learning with bounded loss, and to PEGASOS in Section 4. 2 Setting Fix a compact convex subset S of some space equipped with a norm ∥·∥. Let ∥·∥∗be the dual norm defined by ∥v∥∗:= supw : ∥w∥≤1 v · w. Let Z be a random variable taking values in some space Z. Our goal is to minimize F(w) := E [f(w; Z)] over w ∈S. Here, f : S × Z →[0, B] is some function satisfying the following assumption. Assumption LIST. (LIpschitz and STrongly convex assumption) For all z ∈Z, the function fz(w) = f(w; z) is convex in w and satisfies: 1. fz has Lipschitz constant L w.r.t. to the norm ∥·∥, i.e. ∀w ∈S, ∀λ ∈∂fz(w) (∂fz denotes the subdifferential of fz), ∥λ∥∗≤L. Note that this assumption implies ∀w, w′ ∈S, |fz(w) −fz(w′)| ≤L∥w −w′∥. 2. fz is ν-strongly convex w.r.t. ∥· ∥, i.e. ∀θ ∈[0, 1], ∀w, w′ ∈S, fz(θw + (1 −θ)w′) ≤θfz(w) + (1 −θ)fz(w′) −ν 2θ(1 −θ)∥w −w′∥2 . Denote the minimizer of F by w⋆, w⋆:= arg minw∈SF(w). We consider an online setting in which independent (but not necessarily identically distributed) random variables Z1, . . . , ZT become available to us in that order. These have the property that ∀t, ∀w ∈S, E [f(w; Zt)] = F(w) . Now consider an algorithm that starts out with some w1 and at time t, having seen Zt, updates the parameter wt to wt+1. Let Et−1 [·] denote conditional expectation w.r.t. Z1, . . . , Zt−1. Note that wt is measurable w.r.t. Z1, . . . , Zt−1 and hence Et−1 [f(wt; Zt)] = F(wt). Define the statistics, RegT := T X t=1 f(wt; Zt) −min w∈S T X t=1 f(w; Zt) , DiffT := T X t=1 (F(wt) −F(w⋆)) = T X t=1 F(wt) −TF(w⋆) . Define the sequence of random variables ξt := F(wt) −F(w⋆) −(f(wt; Zt) −f(w⋆; Zt)) . (1) Since Et−1 [f(wt; Zt)] = F(wt) and Et−1 [f(w⋆; Zt)] = F(w⋆), ξt is a martingale difference sequence. This definition needs some explanation as it is important to look at the right martingale difference sequence to derive the results we want. Even under assumption LIST, 1 T P t f(wt; Zt) and 1 T P t f(w⋆; Zt) will not be concentrated around 1 T P t F(wt) and F(w⋆) respectively at a rate better then O(1/ √ T) in general. But if we look at the difference, we are able to get sharper concentration. 3 A General Online to Batch Conversion The following simple lemma is crucial for us. It says that under assumption LIST, the variance of the increment in the regret f(wt; Zt) −f(w⋆; Zt) is bounded by its (conditional) expectation F(wt) −F(w⋆). Such a control on the variance is often the main ingredient in obtaining sharper concentration results. Lemma 1. Suppose assumption LIST holds and let ξt be the martingale difference sequence defined in (1). Let Vart−1ξt := Et−1  ξ2 t  be the conditional variance of ξt given Z1, . . . , Zt−1. Then, under assumption LIST, we have, Vart−1ξt ≤4L2 ν (F(wt) −F(w⋆)) . The variance bound given by the above lemma allows us to prove our main theorem. Theorem 2. Under assumption LIST, we have, with probability at least 1 −4 ln(T)δ, 1 T T X t=1 F(wt) −F(w⋆) ≤RegT T + 4 r L2 ln(1/δ) ν p RegT T + max 16L2 ν , 6B  ln(1/δ) T Further, using Jensen’s inequality, 1 T P t F(wt) can be replaced by F( ¯w) where ¯w := 1 T P t wt. 3.1 Proofs Proof of Lemma 1. We have, Vart−1ξt ≤Et−1 h (f(wt; Zt) −f(w⋆; Zt))2i [ Assumption LIST, part 1 ] ≤Et−1  L2∥wt −w⋆∥2 = L2∥wt −w⋆∥2 . (2) On the other hand, using part 2 of assumption LIST, we also have for any w, w′ ∈S, f(w; Z) + f(w′; Z) 2 ≥f w + w′ 2 ; Z  + ν 8∥w −w′∥2 . Taking expectation this gives, for any w, w′ ∈S, F(w) + F(w′) 2 ≥F w + w′ 2  + ν 8∥w −w′∥2 . Now using this with w = wt, w′ = w⋆, we get F(wt) + F(w⋆) 2 ≥F wt + w⋆ 2  + ν 8∥wt −w⋆∥2 [∵w⋆minimizes F] ≥F(w⋆) + ν 8∥wt −w⋆∥2 . This implies that ∥wt −w⋆∥2 ≤4(F(wt) −F(w⋆)) ν (3) Combining (2) and (3) we get, Vart−1ξt ≤4L2 ν (F(wt) −F(w⋆)) The proof of Theorem 2 relies on the following inequality for martingales which is an easy consequence of Freedman’s inequality [Freedman, 1975, Theorem 1.6]. The proof of this lemma can be found in the appendix. Lemma 3. Suppose X1, . . . , XT is a martingale difference sequence with |Xt| ≤b. Let VartXt = Var (Xt | X1, . . . , Xt−1) . Let V = PT t=1 VartXt be the sum of conditional variances of Xt’s. Further, let σ = √ V . Then we have, for any δ < 1/e and T ≥3, Prob T X t=1 Xt > max n 2σ, 3b p ln(1/δ) o p ln(1/δ) ! ≤4 ln(T)δ . Proof of Theorem 2. By Lemma 1, we have σ := qPT t=1 Vartξt ≤ q 4L2 ν DiffT . Note that |ξt| ≤ 2B because our f has range [0, B]. Therefore, Lemma 3 gives us that with probability at least 1 −4 ln(T)δ, we have T X t=1 ξt ≤max n 2σ, 6B p ln(1/δ) o p ln(1/δ) . By definition of RegT , DiffT −RegT ≤ T X t=1 ξt and therefore, with probability, 1 −4 ln(T)δ, we have DiffT −RegT ≤max ( 4 r L2 ν DiffT , 6B p ln(1/δ) ) p ln(1/δ) . Using Lemma 4 below to solve the above quadratic inequality for DiffT , gives PT t=1 F(wt) T −F(w⋆) ≤RegT T + 4 r L2 ln(1/δ) ν p RegT T + max 16L2 ν , 6B  ln(1/δ) T The following elementary lemma was required to solve a recursive inequality in the proof of the above theorem. Its proof can be found in the appendix. Lemma 4. Suppose s, r, d, b, ∆≥0 and we have s −r ≤max{4 √ ds, 6b∆}∆. Then, it follows that s ≤r + 4 √ dr∆+ max{16d, 6b}∆2 . 4 Applications 4.1 Online to Batch Conversion for Learning with Bounded Loss Suppose (X1, Y1), . . . , (XT , YT ) are drawn i.i.d. from a distribution. The pairs (Xi, Yi) belong to X × Y and our algorithm are allowed to make predictions in a space D ⊇Y. A loss function ℓ: D × Y →[0, 1] measures quality of predictions. Fix a convex set S of some normed space and a function h : X × S →D. Let our hypotheses class be {x 7→h(x; w) | w ∈S}. On input x, the hypothesis parameterized by w predicts h(x; w) and incurs loss ℓ(h(x; w), y) if the correct prediction is y. The risk of w is defined by R(w) := E [ℓ(h(X; w), Y )] and let w⋆:= arg minw∈S R(w) denote the (parameter for) the hypothesis with minimum risk. It is easy to see that this setting falls under the general framework given above by thinking of the pair (X, Y ) as Z and setting f(w; Z) = f(w; (X, Y )) to be ℓ(h(X; w), Y ). Note that F(w) becomes the risk R(w). The range of f is [0, 1] by our assumption about the loss functions so B = 1. Suppose we run an online algorithm on our data that generates a sequence of hypotheses w0, . . . , wT such that wt is measurable w.r.t. X<t, Y<t. Define the statistics, RegT := T X t=1 ℓ(h(Xt; wt), Yt) −min w∈S T X t=1 ℓ(h(Xt; w), Yt) , DiffT := T X t=1 (R(wt) −R(w⋆)) = T X t=1 R(wt) −TR(w⋆) . At the end, we output ¯w := (PT t=1 wt)/T. The following corollary then follows immediately from Theorem 2. It bounds the excess risk R( ¯w) −R(w⋆). Corollary 5. Suppose assumption LIST is satisfied for f(w; (x, y)) := ℓ(h(x; w), y). Then we have, with probability at least 1 −4 ln(T)δ, R( ¯w) −R(w⋆) ≤RegT T + 4 r L2 ln(1/δ) ν p RegT T + max 16L2 ν , 6  ln(1/δ) T Recently, it has been proved [Kakade and Shalev-Shwartz, 2008] that if assumption LIST is satisfied for w 7→ℓ(h(x; w), y) then there is an online algorithm that generates w1, . . . , wT such that RegT ≤L2(1 + ln T) 2ν . Plugging it in the corollary above gives the following result. Corollary 6. Suppose assumption LIST is satisfied for f(w; (x, y)) := ℓ(h(x; w), y). Then there is an online algorithm that generates w1, . . . , wT and in the end outputs ¯w such that, with probability at least 1 −4 ln(T)δ, R( ¯w) −R(w⋆) ≤L2 ln T νT + 4L2√ ln T νT s ln 1 δ  + max 16L2 ν , 6  ln(1/δ) T , for any T ≥3. 4.2 High Probability Bound for PEGASOS PEGASOS [Shalev-Shwartz et al., 2007] is a recently proposed method for solving the primal SVM problem. Recall that in the SVM optimization problem we are given m example, label pairs (xi, yi) ∈Rd × {±1}. Assume that ∥xi∥≤R for all i where ∥· ∥is the standard L2 norm. Let F(w) = λ 2 ∥w∥2 + 1 m m X i=1 ℓ(w; (xi, yi)) (4) be the SVM objective function. The loss function ℓ(w; (x, y)) = [1 −y(w · x)]+ is the hinge loss. At time t, PEGASOS takes a (random) approximation f(w; Zt) = λ 2 ∥w∥2 + 1 k X (x,y)∈Zt ℓ(w; (x, y)) , of the SVM objective function to estimate the gradient and updates the current weight vector wt to wt+1. Here Zt is a random subset of the data set of size k. Note that F(w) can be written as F(w) = E λ2 2 ∥w∥2 + ℓ(w; Z)  where Z is an example (xi, yi) drawn uniformly at random from the m data points. It is also easy to verify that ∀w, E [f(w; Zt)] = F(w) . It can be shown that w⋆:= arg min F(w) will satisfy ∥w⋆∥≤1/ √ λ so we set S =  w ∈Rd : ∥w∥≤ 1 √ λ  . For any z that is a subset of the data set, the function w 7→f(w; z) = λ 2 ∥w∥2 + 1 |z| X (x,y)∈z ℓ(w; (x, y)) is Lipschitz on S with Lipschitz constant L = √ λ + R and is λ-strongly convex. Also f(w; z) ∈ [0, 3/2 + R/ √ λ]. So, the PEGASOS setting falls under our general framework and satisfies assumption LIST. Theorem 1 in Shalev-Shwartz et al. [2007] says, for any w, T ≥3, T X t=1 f(wt; Zt) ≤ T X t=1 f(w; Zt) + L2 ln T λ , (5) where L = √ λ + R. It was noted in that paper that plugging in w = w⋆and taking expectations, we easily get EZ1,...,ZT " T X t=1 F(wt) # ≤TF(w⋆) + L2 ln T λ . Here we use Theorem 2 to prove an inequality that holds with high probability, not just in expectation. Corollary 7. Let F be the SVM objective function defined in (4) and w1, . . . , wT be the sequence of weight vectors generated by the PEGASOS algorithm. Further, let w⋆denote the minimizer of the SVM objective. Then, with probability 1 −4δ ln(T), we have T X t=1 F(wt)−TF(w⋆) ≤L2 ln T λ + 4L2√ ln T λ s ln 1 δ  +max 16L2 λ , 9 + 6R √ λ  ln 1 δ  , (6) for any T ≥3. Therefore, assuming R = 1, we have, for λ small enough, with probability at least 1 −δ, 1 T T X t=1 F(wt) −F(w⋆) = O ln T δ λT ! . Proof. Note that (5) implies that RegT ≤ L2 ln T λ . The corollary then follows immediately from Theorem 2 by plugging in ν = λ and B = 3/2 + R/ √ λ. References N. Cesa-Bianchi and C. Gentile. Improved risk tail bounds for on-line algorithms. IEEE Transactions on Information Theory, 54(1):286–390, 2008. N. Cesa-Bianchi, A. Conconi, and C. Gentile. On the generalization ability of on-line learning algorithms. IEEE Transactions on Information Theory, 50(9):2050–2057, September 2004. M. Collins. Discriminative training methods for hidden Markov models: Theory and experiments with perceptron algorithms. In Conference on Empirical Methods in Natural Language Processing, 2002. K. Crammer, O. Dekel, J. Keshet, S. Shalev-Shwartz, and Y. Singer. Online passive aggressive algorithms. Journal of Machine Learning Research, 7:551–585, Mar 2006. David A. Freedman. On tail probabilities for martingales. The Annals of Probability, 3(1):100–118, Feb 1975. E. Hazan, A. Kalai, S. Kale, and A. Agarwal. Logarithmic regret algorithms for online convex optimization. In Proceedings of the Nineteenth Annual Conference on Computational Learning Theory, 2006. S. Kakade and S. Shalev-Shwartz. Mind the duality gap: Logarithmic regret algorithms for online optimization. Advances in Neural Information Processing Systems, 2008. N. Littlestone. Mistake bounds and logarithmic linear-threshold learning algorithms. PhD thesis, U. C. Santa Cruz, March 1989. Nathan Ratliff, James (Drew) Bagnell, and Martin Zinkevich. (online) subgradient methods for structured prediction. In Eleventh International Conference on Artificial Intelligence and Statistics (AIStats), March 2007. Shai Shalev-Shwartz, Yoram Singer, and Nathan Srebro. Pegasos: Primal Estimated sub-GrAdient SOlver for SVM. In Proceedings of the Twenty-Fourth International Conference on Machine Learning (ICML), pages 807–814, 2007. T. Zhang. Data dependent concentration bounds for sequential prediction algorithms. In Proceedings of the Eighteenth Annual Conference on Computational Learning Theory, pages 173–187, 2005. Appendix Proof of Lemma 3. Note that a crude upper bound on VartXt is b2. Thus, σ ≤b √ T. We choose a discretization 0 = α−1 < α0 < . . . < αl such that αi+1 = rαi for i ≥0 and αl ≥b √ T. We will specify the choice of α0 and r shortly. We then have, for any c > 0, Prob X t Xt > c max{rσ, α0} p ln(1/δ) ! = l X j=0 Prob P t Xt > c max{rσ, α0} p ln(1/δ) & αj−1 < σ ≤αj  ≤ l X j=0 Prob P t Xt > cαj p ln(1/δ) & α2 j−1 < V ≤α2 j  ≤ l X j=0 Prob X t Xt > cαj p ln(1/δ) & V ≤α2 j ! (⋆) ≤ l X j=0 exp   −c2α2 j ln(1/δ) 2α2 j + 2 3  cαj p ln(1/δ)  b   = l X j=0 exp   −c2αj ln(1/δ) 2αj + 2 3  c p ln(1/δ)  b   where the inequality (⋆) follows from Freedman’s inequality. If we now choose α0 = bc p ln(1/δ) then αj ≥bc p ln(1/δ) for all j and hence every term in the above summation is bounded by exp  −c2 ln(1/δ) 2+2/3  which is less then δ if we choose c = 5/3. Set r = 2/c = 6/5. We want α0rl ≥b √ T. Since c p ln(1/δ) ≥1, choosing l = logr( √ T) ensures that. Thus we have Prob T X t=1 Xt > 5 3 max{6 5σ, 5 3b p ln(1/δ)} p ln(1/δ) ! = Prob X t Xt > c max{rσ, α0} p ln(1/δ) ! ≤(l + 1)δ = (log6/5( √ T) + 1)δ ≤(6 ln( √ T) + 1)δ ≤4 ln(T)δ . (∵T ≥3) Proof of Lemma 4. The assumption of the lemma implies that one of the following inequalities holds: s −r ≤6b∆2 s −r ≤4 √ ds∆. (7) In the second case, we have √s 2 −(4 √ d∆)√s −r ≤0 which means that √s should be smaller than the larger root of the above quadratic. This gives us, s = (√s)2 ≤  2 √ d∆+ p 4d∆2 + r 2 ≤4d∆2 + 4d∆2 + r + 4 p 4d2∆4 + d∆2r [∵√x + y ≤√x + √y] ≤8d∆2 + r + 8d∆2 + 4 √ dr∆ ≤r + 4 √ dr∆+ 16d∆2 . (8) Combining (7) and (8) finishes the proof.
2008
241